@foxy.io/elements 1.24.0-beta.4 → 1.24.0-beta.6
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/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +13 -31
- package/dist/cdn/foxy-customer.js +7 -7
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +4 -4
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +2 -2
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -2
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-479ad951.js → shared-099c1f57.js} +1 -1
- package/dist/cdn/{shared-c4240bc6.js → shared-0c0ee663.js} +1 -1
- package/dist/cdn/shared-1196b6a7.js +1 -0
- package/dist/cdn/shared-13fbea95.js +122 -0
- package/dist/cdn/{shared-8474bc4a.js → shared-27d21f4a.js} +1 -1
- package/dist/cdn/shared-2edcd981.js +1 -0
- package/dist/cdn/{shared-a92ae606.js → shared-31d8e3b8.js} +1 -1
- package/dist/cdn/shared-35728235.js +1 -0
- package/dist/cdn/shared-3b709ddc.js +29 -0
- package/dist/cdn/shared-3bcc07cd.js +1 -0
- package/dist/cdn/shared-3c2414d4.js +9 -0
- package/dist/cdn/{shared-31651a9c.js → shared-3f04e4cc.js} +1 -1
- package/dist/cdn/{shared-ba658670.js → shared-406ce9ad.js} +1 -1
- package/dist/cdn/{shared-6f84ac3e.js → shared-4b20fc75.js} +1 -1
- package/dist/cdn/shared-4c2e9064.js +15 -0
- package/dist/cdn/{shared-1d28220a.js → shared-5103c1b4.js} +1 -1
- package/dist/cdn/{shared-4674063d.js → shared-5784c088.js} +27 -27
- package/dist/cdn/shared-584174ff.js +1 -0
- package/dist/cdn/{shared-1b060170.js → shared-59fc6288.js} +1 -1
- package/dist/cdn/{shared-51d28e6d.js → shared-5a889c45.js} +1 -1
- package/dist/cdn/{shared-c7f2f1ab.js → shared-5cf7b194.js} +1 -1
- package/dist/cdn/{shared-9c626d58.js → shared-5db85492.js} +1 -1
- package/dist/cdn/shared-601f27b1.js +1 -0
- package/dist/cdn/{shared-36725fe3.js → shared-621b3283.js} +1 -1
- package/dist/cdn/shared-630a0ff2.js +1 -0
- package/dist/cdn/{shared-984fcdf5.js → shared-6daeb197.js} +3 -3
- package/dist/cdn/{shared-4c956a8e.js → shared-7723f756.js} +1 -1
- package/dist/cdn/{shared-4dc58b73.js → shared-773e7177.js} +1 -1
- package/dist/cdn/{shared-6dc64a17.js → shared-799dc083.js} +1 -1
- package/dist/cdn/{shared-e84fa0ea.js → shared-7a455b15.js} +1 -1
- package/dist/cdn/{shared-e6828dbf.js → shared-7abbc95c.js} +5 -5
- package/dist/cdn/shared-7f33a83a.js +12 -12
- package/dist/cdn/{shared-69a21b9d.js → shared-7fab31ac.js} +1 -1
- package/dist/cdn/shared-800ee6c0.js +1 -0
- package/dist/cdn/shared-8a9c64b2.js +1 -0
- package/dist/cdn/{shared-db21f6db.js → shared-8f922de8.js} +2 -2
- package/dist/cdn/{shared-e6997950.js → shared-9048eeb2.js} +1 -1
- package/dist/cdn/{shared-e10052d0.js → shared-9954ee26.js} +2 -2
- package/dist/cdn/{shared-4bbd600d.js → shared-9aa72495.js} +1 -1
- package/dist/cdn/shared-9b12aeac.js +1 -0
- package/dist/cdn/{shared-6abdfcf2.js → shared-9b486845.js} +1 -1
- package/dist/cdn/{shared-b3ac59eb.js → shared-ad80244a.js} +2 -2
- package/dist/cdn/{shared-c6c6ba69.js → shared-b446c140.js} +1 -1
- package/dist/cdn/shared-b7556b77.js +1 -0
- package/dist/cdn/{shared-30bebd39.js → shared-b87d1af0.js} +3 -3
- package/dist/cdn/{shared-0a248c0d.js → shared-ba93be6b.js} +1 -1
- package/dist/cdn/{shared-9caffb4d.js → shared-baeef007.js} +1 -1
- package/dist/cdn/{shared-64f98a0f.js → shared-bee111d6.js} +7 -2
- package/dist/cdn/shared-c76ef8d8.js +804 -0
- package/dist/cdn/{shared-65318cc1.js → shared-c839e147.js} +1 -1
- package/dist/cdn/{shared-4904bca4.js → shared-d1f5de89.js} +1 -1
- package/dist/cdn/{shared-a3c73e91.js → shared-d90dbae7.js} +1 -1
- package/dist/cdn/{shared-dccf0420.js → shared-ddac7722.js} +2 -2
- package/dist/cdn/{shared-e8e92fe3.js → shared-de3dae6c.js} +2 -2
- package/dist/cdn/shared-e006e82c.js +1 -0
- package/dist/cdn/shared-e2e2ca6a.js +1 -0
- package/dist/cdn/shared-e5239bec.js +212 -0
- package/dist/cdn/shared-e8a51c60.js +1 -0
- package/dist/cdn/shared-e8a85228.js +1 -0
- package/dist/cdn/{shared-17d0db7f.js → shared-eb8a0fdf.js} +3 -3
- package/dist/cdn/{shared-88e36564.js → shared-ef7f2d07.js} +26 -27
- package/dist/cdn/{shared-665d6cc4.js → shared-efaf8d49.js} +1 -1
- package/dist/cdn/{shared-ff992ead.js → shared-f0a9f3c2.js} +1 -1
- package/dist/cdn/{shared-379b37e6.js → shared-f21e5761.js} +7 -11
- package/dist/cdn/shared-f241722a.js +1 -0
- package/dist/cdn/{shared-b48a83b0.js → shared-f29acc38.js} +1 -1
- package/dist/cdn/{shared-e7c3b7b6.js → shared-f29d410a.js} +1 -1
- package/dist/cdn/{shared-bdb51db9.js → shared-f5bbb1e0.js} +1 -1
- package/dist/cdn/{shared-c97e0d6e.js → shared-fcfbfbdb.js} +1 -1
- package/dist/cdn/{shared-bafcab47.js → shared-fd40a40c.js} +3 -3
- package/dist/cdn/{shared-4b67d699.js → shared-fd96bcd1.js} +1 -1
- package/dist/cdn/{shared-dfe2602a.js → shared-ff7fd5fa.js} +1 -1
- package/dist/cdn/{shared-d14c2060.js → shared-fff03a45.js} +1 -1
- package/dist/cdn/translations/address-form/en.json +577 -0
- package/dist/cdn/translations/customer/en.json +653 -15
- package/dist/cdn/translations/customer-form/en.json +84 -15
- package/dist/cdn/translations/customer-portal/en.json +694 -32
- package/dist/cdn/translations/customer-portal-settings/en.json +9 -0
- package/dist/cdn/translations/transaction/en.json +79 -15
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +10 -0
- package/dist/elements/internal/InternalForm/InternalForm.js +48 -1
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalForm/index.d.ts +1 -0
- package/dist/elements/internal/InternalForm/index.js +1 -0
- package/dist/elements/internal/InternalForm/index.js.map +1 -1
- package/dist/elements/internal/InternalForm/types.d.ts +4 -0
- package/dist/elements/internal/InternalForm/types.js +2 -0
- package/dist/elements/internal/InternalForm/types.js.map +1 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +5 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +36 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.d.ts +1 -0
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js +11 -0
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js.map +1 -0
- package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -1
- package/dist/elements/public/AddressForm/AddressForm.js +53 -17
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AddressForm/countries.d.ts +1 -1
- package/dist/elements/public/AddressForm/countries.js +554 -251
- package/dist/elements/public/AddressForm/countries.js.map +1 -1
- package/dist/elements/public/Customer/Customer.d.ts +5 -2
- package/dist/elements/public/Customer/Customer.js +10 -0
- package/dist/elements/public/Customer/Customer.js.map +1 -1
- package/dist/elements/public/Customer/types.d.ts +1 -0
- package/dist/elements/public/Customer/types.js.map +1 -1
- package/dist/elements/public/CustomerApi/CustomerApi.d.ts +33 -2
- package/dist/elements/public/CustomerApi/CustomerApi.js +62 -11
- package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.d.ts +47 -15
- package/dist/elements/public/CustomerForm/CustomerForm.js +259 -155
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/index.d.ts +6 -6
- package/dist/elements/public/CustomerForm/index.js +6 -6
- package/dist/elements/public/CustomerForm/index.js.map +1 -1
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/InternalCustomerFormLegalNoticeControl.d.ts +5 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/InternalCustomerFormLegalNoticeControl.js +23 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/InternalCustomerFormLegalNoticeControl.js.map +1 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/index.d.ts +4 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/index.js +6 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/index.js.map +1 -0
- package/dist/elements/public/CustomerForm/types.d.ts +27 -7
- package/dist/elements/public/CustomerForm/types.js.map +1 -1
- package/dist/elements/public/CustomerPortal/CustomerPortal.js +12 -15
- package/dist/elements/public/CustomerPortal/CustomerPortal.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.d.ts +8 -11
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +9 -33
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.d.ts +14 -10
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +152 -16
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/index.d.ts +2 -0
- package/dist/elements/public/CustomerPortal/index.js +2 -2
- package/dist/elements/public/CustomerPortal/index.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js +14 -0
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/machine.js +10 -0
- package/dist/elements/public/CustomerPortalSettings/machine.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUp.d.ts +14 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUp.js +132 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUp.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUpChangeEvent.d.ts +4 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUpChangeEvent.js +6 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUpChangeEvent.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettings/types.d.ts +4 -0
- package/dist/elements/public/CustomerPortalSettings/types.js.map +1 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +1 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -1
- package/dist/elements/public/FormDialog/FormDialog.d.ts +2 -0
- package/dist/elements/public/FormDialog/FormDialog.js +6 -0
- package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
- package/dist/elements/public/FormDialog/types.d.ts +3 -1
- package/dist/elements/public/FormDialog/types.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/NucleonElement/types.d.ts +1 -1
- package/dist/elements/public/NucleonElement/types.js.map +1 -1
- package/dist/mixins/themeable.js +16 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/types/hapi.d.ts +14 -0
- package/dist/types/hapi.js.map +1 -1
- package/dist/utils/parse-duration.js +2 -2
- package/dist/utils/parse-duration.js.map +1 -1
- package/package.json +13 -11
- package/dist/cdn/shared-09d4fbb8.js +0 -29
- package/dist/cdn/shared-1d08a5ad.js +0 -1
- package/dist/cdn/shared-1eac92fa.js +0 -1
- package/dist/cdn/shared-25f64060.js +0 -1
- package/dist/cdn/shared-307262a1.js +0 -15
- package/dist/cdn/shared-332f2997.js +0 -1
- package/dist/cdn/shared-39f3b48d.js +0 -1
- package/dist/cdn/shared-432c5183.js +0 -9
- package/dist/cdn/shared-4dee79d4.js +0 -1
- package/dist/cdn/shared-53061389.js +0 -1
- package/dist/cdn/shared-59042137.js +0 -201
- package/dist/cdn/shared-65ba8b39.js +0 -1
- package/dist/cdn/shared-77a4d8e8.js +0 -1
- package/dist/cdn/shared-7f5618ba.js +0 -1
- package/dist/cdn/shared-92f27a38.js +0 -1
- package/dist/cdn/shared-b0f534ef.js +0 -1
- package/dist/cdn/shared-be24dd36.js +0 -804
- package/dist/cdn/shared-bf62a65b.js +0 -1
- package/dist/cdn/shared-c2d3b32b.js +0 -1
- package/dist/cdn/shared-cf269a17.js +0 -1
- package/dist/cdn/shared-fe54babe.js +0 -1
- package/dist/cdn/shared-fef9ecc1.js +0 -122
- package/dist/elements/public/AddressForm/regions.d.ts +0 -1
- package/dist/elements/public/AddressForm/regions.js +0 -67
- package/dist/elements/public/AddressForm/regions.js.map +0 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.d.ts +0 -29
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js +0 -169
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js.map +0 -1
- /package/dist/cdn/{shared-64657919.js → shared-343d1fd7.js} +0 -0
- /package/dist/cdn/{shared-d6276c83.js → shared-3ab0306f.js} +0 -0
- /package/dist/cdn/{shared-e6f3e9f0.js → shared-bb05cfed.js} +0 -0
- /package/dist/cdn/{shared-99065f2a.js → shared-d7be11de.js} +0 -0
- /package/dist/cdn/{shared-0479553e.js → shared-f9180815.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-ef7f2d07.js";import{I as e}from"./shared-ff7fd5fa.js";import{_ as t}from"./shared-4c2e9064.js";import{i as a}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";import{A as i}from"./shared-35728235.js";let r,l=e=>e;customElements.define("foxy-internal-async-combo-box-control",class extends e{constructor(){var e;super(...arguments),e=this,this.allowCustomValue=!1,this.itemLabelPath=null,this.itemValuePath=null,this.selectedItem=void 0,this.first=null,this.__dataProvider=async function(t,a){if(!e.first)return a([],0);const s=new URL(e.first);s.searchParams.set("offset",String(t.page*t.pageSize)),s.searchParams.set("limit",String(t.pageSize)),t.filter&&e.itemLabelPath&&s.searchParams.set(e.itemLabelPath,`*${t.filter}*`);const r=await new i(e).fetch(s.toString());if(!r.ok)throw new Error(await r.text());const l=await r.json();a(Array.from(Object.values(l._embedded))[0],l.total_items)}}static get properties(){return t(t({},super.properties),{},{allowCustomValue:{type:Boolean,attribute:"allow-custom-value"},itemLabelPath:{type:String,attribute:"item-label-path"},itemValuePath:{type:String,attribute:"item-value-path"},selectedItem:{attribute:!1},first:{type:String}})}renderControl(){var e,t;return s(r||(r=l` <vaadin-combo-box item-value-path="${0}" item-label-path="${0}" error-message="${0}" item-id-path="_links.self.href" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?allow-custom-value="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .dataProvider="${0}" .selectedItem="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),a(null!==(e=this.itemValuePath)&&void 0!==e?e:void 0),a(null!==(t=this.itemLabelPath)&&void 0!==t?t:void 0),a(this._errorMessage),this.helperText,this.placeholder,this.label,this.allowCustomValue,this.disabled,this.readonly,this._checkValidity,this.__dataProvider,this.selectedItem,this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,this._value===t.value?(this.selectedItem=t.selectedItem,this.dispatchEvent(new CustomEvent("selected-item-changed"))):t.value=this._value}))}updated(e){if(super.updated(e),e.has("first")||e.has("itemLabelPath")){const e=this.renderRoot.querySelector("vaadin-combo-box");e&&(e.size=0,e.size=1)}}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./shared-
|
|
1
|
+
import{_ as e}from"./shared-4c2e9064.js";import{L as s,h as t}from"./shared-7f33a83a.js";import{w as r}from"./shared-3b709ddc.js";let a,o=e=>e;class d extends s{constructor(){super(...arguments),this.frame=!1}static get properties(){return e(e({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(a||(a=o` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded ${0}"> <slot></slot> </div> </section> `),"text-s font-medium text-secondary leading-none "+(this.frame?"":"pl-m"),this.frame?"border border-contrast-10 overflow-hidden":"")}}export{d as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-7abbc95c.js";import{I as e}from"./shared-ff7fd5fa.js";import{_ as s}from"./shared-4c2e9064.js";import{i as t}from"./shared-d3bf9ac0.js";import{h as r}from"./shared-7f33a83a.js";let i,l,a,o=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.prefix=null,this.suffix=null}static get properties(){return s(s({},super.properties),{},{prefix:{},suffix:{}})}renderControl(){return r(i||(i=o` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),t(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var s;return"Enter"===e.key&&(null===(s=this.nucleon)||void 0===s?void 0:s.submit())}),(e=>{const s=e.currentTarget;this._value=s.value}),this.prefix?r(l||(l=o`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?r(a||(a=o`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-b446c140.js";import"./shared-5784c088.js";import{_ as e}from"./shared-4c2e9064.js";import{s as l,h as t,c as a,L as s}from"./shared-7f33a83a.js";import{o as n}from"./shared-bb05cfed.js";import{c as o}from"./shared-4e709717.js";import{i}from"./shared-d3bf9ac0.js";import{a as r}from"./shared-79d0699c.js";import{r as d}from"./shared-d519a301.js";import{R as u,T as c,a as v}from"./shared-3b709ddc.js";import{I as p}from"./shared-fd96bcd1.js";import{C as b}from"./shared-5cf7b194.js";var f,h;!function(e){e.Attribute="attribute",e.Boolean="boolean",e.String="string",e.Number="number",e.Date="date",e.Any="any"}(f||(f={})),function(e){e.LessThanOrEqual="lessthanorequal",e.LessThan="lessthan",e.GreaterThanOrEqual="greaterthanorequal",e.GreaterThan="greaterthan",e.IsDefined="isdefined",e.Not="not",e.In="in"}(h||(h={}));let g;const m=l(g||(g=(e=>e)`
|
|
2
2
|
<svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M26.4 14.7399C26.4 15.2922 25.9523 15.7399 25.4 15.7399H10.6C10.0477 15.7399 9.60001 15.2922 9.60001 14.7399V14.2C9.60001 13.6477 10.0477 13.2 10.6 13.2H25.4C25.9523 13.2 26.4 13.6477 26.4 14.2V14.7399ZM26.4 21.8C26.4 22.3523 25.9523 22.8 25.4 22.8H10.6C10.0477 22.8 9.60001 22.3523 9.60001 21.8V21.2601C9.60001 20.7078 10.0477 20.2601 10.6 20.2601H25.4C25.9523 20.2601 26.4 20.7078 26.4 21.2601V21.8Z" class="fill-current"/>
|
|
4
4
|
</svg>
|
|
@@ -61,4 +61,4 @@ import"./shared-c6c6ba69.js";import"./shared-4674063d.js";import{_ as e}from"./s
|
|
|
61
61
|
<svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
62
62
|
<path d="M11 11V14H16.5V26H19.5V14H25V11H11Z" class="fill-current"/>
|
|
63
63
|
</svg>
|
|
64
|
-
`));let R,U,G,W,F,Q=e=>e;function J(e){var l,a,s;const n=null===(a=null===(l=e.list)||void 0===l?void 0:l.every((l=>l.value!==e.value)))||void 0===a||a;return t(R||(R=Q` <label class="${0}"> <div class="relative flex-1 min-w-0 overflow-hidden"> <select class="${0}" ?disabled="${0}" @change="${0}"> ${0} ${0} </select> </div> ${0} </label> `),o({"flex items-center transition-colors group text-tertiary":!0,"cursor-pointer hover-bg-contrast-5":!e.disabled&&!e.readonly,"cursor-default":e.disabled||e.readonly}),o({"bg-transparent relative appearance-none flex h-m px-s":!0,"font-medium w-full max-w-full whitespace-nowrap focus-outline-none":!0,"text-tertiary":n&&!e.disabled,"text-body":!n&&!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":!n&&e.readonly,"cursor-pointer":!e.disabled&&!e.readonly,"cursor-default":e.disabled||e.readonly}),e.disabled||e.readonly,(l=>{const t=l.currentTarget,a=t.options[t.options.selectedIndex].value;e.onChange(a)}),n?t(U||(U=Q` <option value="" disabled="disabled" ?selected="${0}">${0}</option> `),n,e.t(e.label)):"",null===(s=e.list)||void 0===s?void 0:s.map((({label:l,value:a})=>t(G||(G=Q` <option value="${0}" ?selected="${0}"> ${0} </option> `),a,a===e.value,e.t(l)))),n?"":t(W||(W=Q` <span class="${0}"> ${0} </span> ${0} `),o({"font-tnum text-xs font-medium border mr-s px-xs rounded-s border-current inline-block":!0,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly}),e.t(e.label),e.clearable&&!e.readonly?t(F||(F=Q` <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="icon-inline text-l" icon="icons:remove-circle-outline"> </iron-icon> </button> `),e.t("delete"),o({"w-s h-s mr-xs flex items-center justify-center transition-colors rounded-full":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"hover-bg-contrast-5 hover-text-error text-body":!e.disabled,"text-disabled":e.disabled}),e.disabled,(()=>e.onChange(""))):""))}let K,P,X,Y,ee,le=e=>e;function te(e){var l;const a=`${null!==(l=e.id)&&void 0!==l?l:String(Math.floor(Math.random()*Math.pow(10,8)))}-list`,s=!!e.displayValue;let n=e.value;if("date"===e.type){const l=new Date(e.value);n=isNaN(l.getTime())?"":r(l)}return t(K||(K=le` <label class="relative flex items-center cursor-text group text-tertiary"> <div class="relative flex-1 min-w-0 overflow-hidden"> ${0} <input placeholder="${0}" class="${0}" list="${0}" type="${0}" max="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),s?t(P||(P=le` <div aria-hidden="true" class="${0}"> <div class="truncate">${0}</div> </div> `),o({"absolute inset-0 h-m px-s font-medium flex items-center":!0,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly}),e.t(e.displayValue)):"",n||"date"===e.type?"":e.t(e.label),o({"bg-base relative flex h-m px-s font-medium w-full":!0,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly,"flex max-w-full whitespace-nowrap":!0,"focus-outline-none":!0,"opacity-0 focus-opacity-100":s}),i(e.list?a:void 0),"date"===e.type?"datetime-local":e.type,i("date"===e.type?"9999-12-31T23:59":""),n,e.disabled||e.readonly,(l=>{const t=l.currentTarget;let a=t.value;try{if("date"===e.type){const e=new Date(t.value);isNaN(e.getTime())||(a=e.toISOString())}}catch(e){}e.onChange(a)}),o({"font-tnum text-xs font-medium border border-current mr-s px-xs rounded-s":!0,"inline-block":!!n||"date"===e.type,"sr-only":!n&&"date"!==e.type,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly}),e.t(e.label),e.list?t(X||(X=le` <datalist id="${0}"> ${0} </datalist> `),a,e.list.map((({label:l,value:a})=>t(Y||(Y=le`<option value="${0}">${0}</option>`),a,e.t(l))))):"",e.disabled||e.readonly?"":t(ee||(ee=le` <div class="absolute inset-0 transition-colors bg-transparent group-hover-bg-contrast-5 pointer-events-none"></div> `)))}let ae,se,ne=e=>e;let oe,ie=e=>e;function re({parsedValue:l,disabled:t,readonly:a,options:s,option:n,t:o,onChange:i}){return te({displayValue:null==n?void 0:n.label,disabled:t,readonly:a,value:l.path,label:"field",list:s.map((l=>e(e({},l),{},{value:l.path}))),type:"text",id:"path",t:o,onChange:e=>i({operator:null,value:"",path:e})})}let de,ue=e=>e;let ce,ve,pe=e=>e;function fe(l){var a,s;const{parsedValue:i,isFullSize:r,isNested:u,readonly:c,disabled:v,options:p,t:f,onConvert:g,onDelete:C,onChange:x}=l,V=null!==(a=p.find((e=>e.path===i.path)))&&void 0!==a?a:null,H=null!==(s=null==V?void 0:V.type)&&void 0!==s?s:h.Any,M=i.operator,N={parsedValue:i,disabled:v,readonly:c,options:p,option:V,t:f,onChange:x},j={[h.Attribute]:B,[h.Boolean]:_,[h.Number]:S,[h.String]:z,[h.Date]:q,[h.Any]:A};return t(ce||(ce=pe` <div class="flex items-center space-x-s" aria-label="${0}"> <div class="${0}"> <div class="bg-contrast-10"> <div class="grid gap-1px grid-vertical sm-grid-horizontal"> <div class="bg-base" title="${0}"> <div class="${0}" aria-hidden="true"> ${0} </div> </div> <div class="bg-base"> ${0} </div> <div class="bg-base">${0}</div> <div class="bg-base"> ${0} </div> </div> </div> </div> <div class="${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:remove-circle-outline"> </iron-icon> </button> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:add-circle-outline"> </iron-icon> </button> </div> </div> `),f("query_builder_rule"),o({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!u&&!c,"border-contrast-50":!!u||c,"border-dashed":c,"border-solid":!c}),f(`type_${H}`),o({"w-m h-m":!0,"text-tertiary":!c&&!v,"text-disabled":c||v}),V?j[H]:A,i.path&&(H===h.Attribute||i.name)?t(ve||(ve=pe` <div class="bg-contrast-10 grid gap-1px grid-cols-1 sm-grid-cols-2"> <div class="bg-base">${0}</div> <div class="bg-base">${0}</div> </div> `),re(N),function(l){var t;return te({disabled:l.disabled,readonly:l.readonly,value:null!==(t=l.parsedValue.name)&&void 0!==t?t:"",label:"name",type:"text",t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{name:t}))})}(N)):re(N),function(l){const a=l.parsedValue.operator,s={[b.GreaterThan]:y,[b.GreaterThanOrEqual]:n,[b.In]:w,[b.IsDefined]:$,[b.LessThan]:L,[b.LessThanOrEqual]:Z,[b.Not]:I},i={[h.Attribute]:[b.In,b.Not,b.IsDefined],[h.Boolean]:[],[h.String]:[b.In,b.Not],[h.Number]:[b.In,b.Not,b.GreaterThan,b.LessThan,b.GreaterThanOrEqual,b.LessThanOrEqual],[h.Date]:[b.In,b.Not],[h.Any]:Object.values(b)},r=l.option?i[l.option.type]:l.parsedValue.name?Object.values(b):Object.values(b).filter((e=>e!==b.IsDefined)),d=l.disabled||l.readonly||0===r.length||!l.parsedValue.path;return t(oe||(oe=ie` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),l.t(`operator_${null!=a?a:"equal"}`),o({"flex items-center justify-center w-m h-m transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-disabled cursor-default":d,"hover-bg-contrast-5":!d}),d,(()=>{var t;const s=a?r.indexOf(a):-1,n=null!==(t=r[s+1])&&void 0!==t?t:null;l.onChange(e(e({},l.parsedValue),{},{operator:n,value:l.parsedValue.value}))}),a?s[a]:m)}(N),M===b.In?function(l){var a,s,n,o;const i=(null===(a=l.option)||void 0===a?void 0:a.list)?J:te,r=l.parsedValue.value.split(","),u=null!==(n=null===(s=l.option)||void 0===s?void 0:s.type)&&void 0!==n?n:h.Any,c=u===h.Number?"number":u===h.Date?"date":"text",v=null===(o=l.option)||void 0===o?void 0:o.list,p=[...r.filter((e=>!!e))];return l.readonly||p.push(null),t(ae||(ae=ne` <div class="bg-contrast-10 grid grid-cols-1 gap-1px"> ${0} </div> `),d(p,((e,l)=>l),((a,s)=>{var n;return t(se||(se=ne` <div class="bg-base"> ${0} </div> `),i({type:c,list:v,t:l.t,value:null!=a?a:"",label:a?String(s+1):"add_value",disabled:l.disabled,readonly:l.readonly,clearable:!0,displayValue:null===(n=null==v?void 0:v.find((e=>e.value===a)))||void 0===n?void 0:n.label,onChange:t=>{t?r[s]=t:r.splice(s,1),l.onChange(e(e({},l.parsedValue),{},{value:r.join(",")}))}}))})))}(N):M===b.IsDefined?function(l){return J({readonly:l.readonly,disabled:l.disabled,value:l.parsedValue.value,label:"value",list:[{label:"is_defined_true",value:"true"},{label:"is_defined_false",value:"false"}],t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{value:t}))})}(N):H===h.Boolean?function(l){var t,a,s,n,o,i;const{parsedValue:r,option:d,readonly:u,disabled:c,t:v,onChange:p}=l,f=null!==(s=null===(a=null===(t=null==d?void 0:d.list)||void 0===t?void 0:t.find((e=>"false"===e.value)))||void 0===a?void 0:a.label)&&void 0!==s?s:"false",h=[{label:null!==(i=null===(o=null===(n=null==d?void 0:d.list)||void 0===n?void 0:n.find((e=>"true"===e.value)))||void 0===o?void 0:o.label)&&void 0!==i?i:"true",value:"true"},{label:f,value:"false"}];return J({disabled:c,readonly:u,value:r.value,label:"value",list:h,t:v,onChange:l=>p(e(e({},r),{},{value:l}))})}(N):null===M&&[h.Number,h.Date].includes(H)?function(l){var a,s,n;const{t:o,parsedValue:i,option:r,readonly:d,disabled:u,onChange:c}=l,v=i.value.split(".."),p=v.length>=1?v[0]:"",f=v.length>=2?v[1]:"",b=(null==r?void 0:r.list)?J:te,g=null!==(a=null==r?void 0:r.type)&&void 0!==a?a:h.Any,m=g===h.Number?"number":g===h.Date?"date":"text",C=null==r?void 0:r.list;return t(de||(de=ue` <div class="grid bg-contrast-10 gap-1px grid-cols-1 grid-rows-2 sm-grid-cols-2 sm-grid-rows-1"> <div class="bg-base"> ${0} </div> <div class="bg-base"> ${0} </div> </div> `),b({displayValue:null===(s=null==C?void 0:C.find((e=>e.value===p)))||void 0===s?void 0:s.label,readonly:d,disabled:u,value:p,label:"range_from",type:m,list:C,t:o,onChange:l=>c(e(e({},i),{},{value:`${l}..${f}`}))}),b({displayValue:null===(n=null==C?void 0:C.find((e=>e.value===f)))||void 0===n?void 0:n.label,readonly:d,disabled:u,label:"range_to",value:f,type:m,list:C,t:o,onChange:l=>c(e(e({},i),{},{value:`${p}..${l}`}))}))}(N):function(l){var t,a,s,n;const{t:o,option:i,parsedValue:r,readonly:d,disabled:u,onChange:c}=l,v=(null==i?void 0:i.list)?J:te,p=null!==(t=null==i?void 0:i.type)&&void 0!==t?t:h.Any;return v({displayValue:null===(s=null===(a=null==i?void 0:i.list)||void 0===a?void 0:a.find((e=>e.value===r.value)))||void 0===s?void 0:s.label,readonly:d,disabled:u||!r.path,value:null!==(n=r.value)&&void 0!==n?n:"",label:"value",type:p===h.Number?"number":p===h.Date?"date":"text",list:null==i?void 0:i.list,t:o,onChange:l=>c(e(e({},r),{},{value:l}))})}(N),o({"-mr-s self-start flex-col sm-flex-row flex-shrink-0 items-center":!0,"border-t border-b border-transparent divide-y divide-transparent":!0,hidden:!!r||c,flex:!r}),f("delete"),o({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-secondary hover-bg-contrast-5 hover-text-error":!v,"cursor-default text-disabled":v,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!i.path}),v||c||!i.path,C,f("add_or_clause"),o({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-success hover-bg-contrast-5":!v,"cursor-default text-disabled":v,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!i.path||!!u}),v||c||!i.path,g)}let he,be,ge,me,Ce=e=>e;function ye(l){const a=t(he||(he=Ce`<div class="h-xs"></div>`)),s=t(be||(be=Ce` <div class="flex items-center h-s"> <div class="w-m text-center leading-none uppercase font-medium text-xs text-contrast-30"> ${0} </div> <div class="flex-1 border-t border-contrast-20"></div> <div class="w-m ml-s flex-shrink-0"></div> <div class="hidden sm-block w-m flex-shrink-0"></div> </div> `),l.t("or"));return t(ge||(ge=Ce` <div aria-label="${0}"> ${0} </div> `),l.t("query_builder_group"),d([...l.parsedValues,null],((e,l)=>String(l)),((n,o)=>{const i=o>0?l.isNested?s:a:"";return null===n?[i,fe({isFullSize:!l.isNested&&0===l.parsedValues.length,isNested:l.isNested,disabled:l.disabled,readonly:l.readonly,options:l.options,parsedValue:{path:"",operator:null,value:""},t:l.t,onChange:e=>l.onChange([...l.parsedValues,e])})]:Array.isArray(n)?[i,t(me||(me=Ce` <div class="bg-contrast-10 rounded-t-l rounded-b-l p-s -m-s"> ${0} </div> `),ye({parsedValues:n,isNested:!0,disabled:l.disabled,readonly:l.readonly,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues],a=e;t[o]=e.length>1?a:a[0],l.onChange(t)}}))]:[i,fe({parsedValue:n,isNested:l.isNested,disabled:l.disabled,readonly:l.readonly,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues];t[o]=e,l.onChange(t)},onDelete:()=>{const e=l.parsedValues.filter(((e,l)=>l!==o));l.onChange(e)},onConvert:()=>{const t=[...l.parsedValues];t[o]=[n,e(e({},n),{},{operator:null,value:""})],l.onChange(t)}})]})))}function xe(e){var l;const[t,a]=e.split("=").map(decodeURIComponent),s=null!==(l=Object.values(b).find((e=>t.endsWith(`:${e}`))))&&void 0!==l?l:null;let n,o=t.substring(0,s?t.lastIndexOf(":"):void 0);const i=t.lastIndexOf("[");return o.endsWith("]")&&-1!==i&&(n=o.substring(i+1,o.length-1),o=o.substring(0,i),o.endsWith(":name")&&(o=o.substring(0,o.length-5))),{name:n,path:o,value:a,operator:s}}function we(e){let l=e.path;return e.name&&(l+=`:name[${e.name}]`),e.operator&&(l+=`:${e.operator}`),l=`${encodeURIComponent(l)}=${encodeURIComponent(e.value)}`,"="===l?"":l}function Ve(e){const l=e.reduce(((e,l)=>{if(Array.isArray(l)){const t=[l[0].value,l.slice(1).map((e=>we(e)))].join("|");e.push(`${l[0].path}=${encodeURIComponent(t)}`)}else"zoom"!==l.path&&e.push(we(l));return e}),[]),t=$e(e).join(",");return t&&l.push(`zoom=${encodeURIComponent(t)}`),l.join("&")}function $e(e){return e.map((e=>{if(Array.isArray(e))return $e(e);if(e.name)return[e.path];const l=e.path.split(":");return l.slice(0,l.length-1)})).flat().sort(((e,l)=>l.length-e.length)).filter(((e,l,t)=>t.every(((t,a)=>(a>=l||t!==e)&&!t.startsWith(`${e}:`)))))}let He;const Le=a(He||(He=(e=>e)`.gap-1px{gap:1px}.grid-vertical{grid-template:auto/var(--lumo-size-m) 1fr}:host([sm]) .sm-grid-horizontal{grid-template:auto/var(--lumo-size-m) 1fr var(--lumo-size-m) 1fr}`)),Me=f(u(c(v(p(s),"query-builder"))));class Ze extends Me{constructor(){super(...arguments),this.options=null,this.value=null}static get properties(){return e(e({},super.properties),{},{options:{type:Array},value:{type:String}})}static get styles(){return[super.styles,Le]}render(){var e,l;const t=new Set(["zoom","limit","offset","order","fields"]),a=[],s=[];var n;return(n=null!==(e=this.value)&&void 0!==e?e:"",n.split("&").filter((e=>!!e)).map((e=>{const[l,t]=e.split("=").map(decodeURIComponent);return(null==t?void 0:t.includes("|"))?`${encodeURIComponent(l)}=${t}`.split("|").map((e=>xe(e))):xe(e)}))).forEach((e=>{Array.isArray(e)||!t.has(e.path)?s.push(e):a.push(e)})),ye({parsedValues:s,disabled:this.disabled,readonly:this.readonly,options:null!==(l=this.options)&&void 0!==l?l:[],t:this.t.bind(this),onChange:e=>{this.value=Ve([...e,...a]),this.dispatchEvent(new Ze.ChangeEvent("change"))}})}}Ze.ChangeEvent=class extends CustomEvent{},Ze.Operator=b,Ze.Type=h,customElements.define("foxy-query-builder",Ze);export{Ze as Q,h as T};
|
|
64
|
+
`));let R,U,G,W,F,Q=e=>e;function J(e){var l,a,s;const n=null===(a=null===(l=e.list)||void 0===l?void 0:l.every((l=>l.value!==e.value)))||void 0===a||a;return t(R||(R=Q` <label class="${0}"> <div class="relative flex-1 min-w-0 overflow-hidden"> <select class="${0}" ?disabled="${0}" @change="${0}"> ${0} ${0} </select> </div> ${0} </label> `),o({"flex items-center transition-colors group text-tertiary":!0,"cursor-pointer hover-bg-contrast-5":!e.disabled&&!e.readonly,"cursor-default":e.disabled||e.readonly}),o({"bg-transparent relative appearance-none flex h-m px-s":!0,"font-medium w-full max-w-full whitespace-nowrap focus-outline-none":!0,"text-tertiary":n&&!e.disabled,"text-body":!n&&!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":!n&&e.readonly,"cursor-pointer":!e.disabled&&!e.readonly,"cursor-default":e.disabled||e.readonly}),e.disabled||e.readonly,(l=>{const t=l.currentTarget,a=t.options[t.options.selectedIndex].value;e.onChange(a)}),n?t(U||(U=Q` <option value="" disabled="disabled" ?selected="${0}">${0}</option> `),n,e.t(e.label)):"",null===(s=e.list)||void 0===s?void 0:s.map((({label:l,value:a})=>t(G||(G=Q` <option value="${0}" ?selected="${0}"> ${0} </option> `),a,a===e.value,e.t(l)))),n?"":t(W||(W=Q` <span class="${0}"> ${0} </span> ${0} `),o({"font-tnum text-xs font-medium border mr-s px-xs rounded-s border-current inline-block":!0,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly}),e.t(e.label),e.clearable&&!e.readonly?t(F||(F=Q` <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="icon-inline text-l" icon="icons:remove-circle-outline"> </iron-icon> </button> `),e.t("delete"),o({"w-s h-s mr-xs flex items-center justify-center transition-colors rounded-full":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"hover-bg-contrast-5 hover-text-error text-body":!e.disabled,"text-disabled":e.disabled}),e.disabled,(()=>e.onChange(""))):""))}let K,P,X,Y,ee,le=e=>e;function te(e){var l;const a=`${null!==(l=e.id)&&void 0!==l?l:String(Math.floor(Math.random()*Math.pow(10,8)))}-list`,s=!!e.displayValue;let n=e.value;if("date"===e.type){const l=new Date(e.value);n=isNaN(l.getTime())?"":r(l)}return t(K||(K=le` <label class="relative flex items-center cursor-text group text-tertiary"> <div class="relative flex-1 min-w-0 overflow-hidden"> ${0} <input placeholder="${0}" class="${0}" list="${0}" type="${0}" max="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),s?t(P||(P=le` <div aria-hidden="true" class="${0}"> <div class="truncate">${0}</div> </div> `),o({"absolute inset-0 h-m px-s font-medium flex items-center":!0,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly}),e.t(e.displayValue)):"",n||"date"===e.type?"":e.t(e.label),o({"bg-base relative flex h-m px-s font-medium w-full":!0,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly,"flex max-w-full whitespace-nowrap":!0,"focus-outline-none":!0,"opacity-0 focus-opacity-100":s}),i(e.list?a:void 0),"date"===e.type?"datetime-local":e.type,i("date"===e.type?"9999-12-31T23:59":""),n,e.disabled||e.readonly,(l=>{const t=l.currentTarget;let a=t.value;try{if("date"===e.type){const e=new Date(t.value);isNaN(e.getTime())||(a=e.toISOString())}}catch(e){}e.onChange(a)}),o({"font-tnum text-xs font-medium border border-current mr-s px-xs rounded-s":!0,"inline-block":!!n||"date"===e.type,"sr-only":!n&&"date"!==e.type,"text-body":!e.disabled&&!e.readonly,"text-disabled":e.disabled,"text-secondary":e.readonly}),e.t(e.label),e.list?t(X||(X=le` <datalist id="${0}"> ${0} </datalist> `),a,e.list.map((({label:l,value:a})=>t(Y||(Y=le`<option value="${0}">${0}</option>`),a,e.t(l))))):"",e.disabled||e.readonly?"":t(ee||(ee=le` <div class="absolute inset-0 transition-colors bg-transparent group-hover-bg-contrast-5 pointer-events-none"></div> `)))}let ae,se,ne=e=>e;let oe,ie=e=>e;function re({parsedValue:l,disabled:t,readonly:a,options:s,option:n,t:o,onChange:i}){return te({displayValue:null==n?void 0:n.label,disabled:t,readonly:a,value:l.path,label:"field",list:s.map((l=>e(e({},l),{},{value:l.path}))),type:"text",id:"path",t:o,onChange:e=>i({operator:null,value:"",path:e})})}let de,ue=e=>e;let ce,ve,pe=e=>e;function be(l){var a,s;const{parsedValue:i,isFullSize:r,isNested:u,readonly:c,disabled:v,options:p,t:b,onConvert:g,onDelete:C,onChange:x}=l,V=null!==(a=p.find((e=>e.path===i.path)))&&void 0!==a?a:null,H=null!==(s=null==V?void 0:V.type)&&void 0!==s?s:f.Any,M=i.operator,N={parsedValue:i,disabled:v,readonly:c,options:p,option:V,t:b,onChange:x},j={[f.Attribute]:B,[f.Boolean]:_,[f.Number]:S,[f.String]:z,[f.Date]:q,[f.Any]:A};return t(ce||(ce=pe` <div class="flex items-center space-x-s" aria-label="${0}"> <div class="${0}"> <div class="bg-contrast-10"> <div class="grid gap-1px grid-vertical sm-grid-horizontal"> <div class="bg-base" title="${0}"> <div class="${0}" aria-hidden="true"> ${0} </div> </div> <div class="bg-base"> ${0} </div> <div class="bg-base">${0}</div> <div class="bg-base"> ${0} </div> </div> </div> </div> <div class="${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:remove-circle-outline"> </iron-icon> </button> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:add-circle-outline"> </iron-icon> </button> </div> </div> `),b("query_builder_rule"),o({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!u&&!c,"border-contrast-50":!!u||c,"border-dashed":c,"border-solid":!c}),b(`type_${H}`),o({"w-m h-m":!0,"text-tertiary":!c&&!v,"text-disabled":c||v}),V?j[H]:A,i.path&&(H===f.Attribute||i.name)?t(ve||(ve=pe` <div class="bg-contrast-10 grid gap-1px grid-cols-1 sm-grid-cols-2"> <div class="bg-base">${0}</div> <div class="bg-base">${0}</div> </div> `),re(N),function(l){var t;return te({disabled:l.disabled,readonly:l.readonly,value:null!==(t=l.parsedValue.name)&&void 0!==t?t:"",label:"name",type:"text",t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{name:t}))})}(N)):re(N),function(l){const a=l.parsedValue.operator,s={[h.GreaterThan]:y,[h.GreaterThanOrEqual]:n,[h.In]:w,[h.IsDefined]:$,[h.LessThan]:L,[h.LessThanOrEqual]:Z,[h.Not]:I},i={[f.Attribute]:[h.In,h.Not,h.IsDefined],[f.Boolean]:[],[f.String]:[h.In,h.Not],[f.Number]:[h.In,h.Not,h.GreaterThan,h.LessThan,h.GreaterThanOrEqual,h.LessThanOrEqual],[f.Date]:[h.In,h.Not],[f.Any]:Object.values(h)},r=l.option?i[l.option.type]:l.parsedValue.name?Object.values(h):Object.values(h).filter((e=>e!==h.IsDefined)),d=l.disabled||l.readonly||0===r.length||!l.parsedValue.path;return t(oe||(oe=ie` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),l.t(`operator_${null!=a?a:"equal"}`),o({"flex items-center justify-center w-m h-m transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-disabled cursor-default":d,"hover-bg-contrast-5":!d}),d,(()=>{var t;const s=a?r.indexOf(a):-1,n=null!==(t=r[s+1])&&void 0!==t?t:null;l.onChange(e(e({},l.parsedValue),{},{operator:n,value:l.parsedValue.value}))}),a?s[a]:m)}(N),M===h.In?function(l){var a,s,n,o;const i=(null===(a=l.option)||void 0===a?void 0:a.list)?J:te,r=l.parsedValue.value.split(","),u=null!==(n=null===(s=l.option)||void 0===s?void 0:s.type)&&void 0!==n?n:f.Any,c=u===f.Number?"number":u===f.Date?"date":"text",v=null===(o=l.option)||void 0===o?void 0:o.list,p=[...r.filter((e=>!!e))];return l.readonly||p.push(null),t(ae||(ae=ne` <div class="bg-contrast-10 grid grid-cols-1 gap-1px"> ${0} </div> `),d(p,((e,l)=>l),((a,s)=>{var n;return t(se||(se=ne` <div class="bg-base"> ${0} </div> `),i({type:c,list:v,t:l.t,value:null!=a?a:"",label:a?String(s+1):"add_value",disabled:l.disabled,readonly:l.readonly,clearable:!0,displayValue:null===(n=null==v?void 0:v.find((e=>e.value===a)))||void 0===n?void 0:n.label,onChange:t=>{t?r[s]=t:r.splice(s,1),l.onChange(e(e({},l.parsedValue),{},{value:r.join(",")}))}}))})))}(N):M===h.IsDefined?function(l){return J({readonly:l.readonly,disabled:l.disabled,value:l.parsedValue.value,label:"value",list:[{label:"is_defined_true",value:"true"},{label:"is_defined_false",value:"false"}],t:l.t,onChange:t=>l.onChange(e(e({},l.parsedValue),{},{value:t}))})}(N):H===f.Boolean?function(l){var t,a,s,n,o,i;const{parsedValue:r,option:d,readonly:u,disabled:c,t:v,onChange:p}=l,b=null!==(s=null===(a=null===(t=null==d?void 0:d.list)||void 0===t?void 0:t.find((e=>"false"===e.value)))||void 0===a?void 0:a.label)&&void 0!==s?s:"false",f=[{label:null!==(i=null===(o=null===(n=null==d?void 0:d.list)||void 0===n?void 0:n.find((e=>"true"===e.value)))||void 0===o?void 0:o.label)&&void 0!==i?i:"true",value:"true"},{label:b,value:"false"}];return J({disabled:c,readonly:u,value:r.value,label:"value",list:f,t:v,onChange:l=>p(e(e({},r),{},{value:l}))})}(N):null===M&&[f.Number,f.Date].includes(H)?function(l){var a,s,n;const{t:o,parsedValue:i,option:r,readonly:d,disabled:u,onChange:c}=l,v=i.value.split(".."),p=v.length>=1?v[0]:"",b=v.length>=2?v[1]:"",h=(null==r?void 0:r.list)?J:te,g=null!==(a=null==r?void 0:r.type)&&void 0!==a?a:f.Any,m=g===f.Number?"number":g===f.Date?"date":"text",C=null==r?void 0:r.list;return t(de||(de=ue` <div class="grid bg-contrast-10 gap-1px grid-cols-1 grid-rows-2 sm-grid-cols-2 sm-grid-rows-1"> <div class="bg-base"> ${0} </div> <div class="bg-base"> ${0} </div> </div> `),h({displayValue:null===(s=null==C?void 0:C.find((e=>e.value===p)))||void 0===s?void 0:s.label,readonly:d,disabled:u,value:p,label:"range_from",type:m,list:C,t:o,onChange:l=>c(e(e({},i),{},{value:`${l}..${b}`}))}),h({displayValue:null===(n=null==C?void 0:C.find((e=>e.value===b)))||void 0===n?void 0:n.label,readonly:d,disabled:u,label:"range_to",value:b,type:m,list:C,t:o,onChange:l=>c(e(e({},i),{},{value:`${p}..${l}`}))}))}(N):function(l){var t,a,s,n;const{t:o,option:i,parsedValue:r,readonly:d,disabled:u,onChange:c}=l,v=(null==i?void 0:i.list)?J:te,p=null!==(t=null==i?void 0:i.type)&&void 0!==t?t:f.Any;return v({displayValue:null===(s=null===(a=null==i?void 0:i.list)||void 0===a?void 0:a.find((e=>e.value===r.value)))||void 0===s?void 0:s.label,readonly:d,disabled:u||!r.path,value:null!==(n=r.value)&&void 0!==n?n:"",label:"value",type:p===f.Number?"number":p===f.Date?"date":"text",list:null==i?void 0:i.list,t:o,onChange:l=>c(e(e({},r),{},{value:l}))})}(N),o({"-mr-s self-start flex-col sm-flex-row flex-shrink-0 items-center":!0,"border-t border-b border-transparent divide-y divide-transparent":!0,hidden:!!r||c,flex:!r}),b("delete"),o({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-secondary hover-bg-contrast-5 hover-text-error":!v,"cursor-default text-disabled":v,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!i.path}),v||c||!i.path,C,b("add_or_clause"),o({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-success hover-bg-contrast-5":!v,"cursor-default text-disabled":v,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!i.path||!!u}),v||c||!i.path,g)}let fe,he,ge,me,Ce=e=>e;function ye(l){const a=t(fe||(fe=Ce`<div class="h-xs"></div>`)),s=t(he||(he=Ce` <div class="flex items-center h-s"> <div class="w-m text-center leading-none uppercase font-medium text-xs text-contrast-30"> ${0} </div> <div class="flex-1 border-t border-contrast-20"></div> <div class="w-m ml-s flex-shrink-0"></div> <div class="hidden sm-block w-m flex-shrink-0"></div> </div> `),l.t("or"));return t(ge||(ge=Ce` <div aria-label="${0}"> ${0} </div> `),l.t("query_builder_group"),d([...l.parsedValues,null],((e,l)=>String(l)),((n,o)=>{const i=o>0?l.isNested?s:a:"";return null===n?[i,be({isFullSize:!l.isNested&&0===l.parsedValues.length,isNested:l.isNested,disabled:l.disabled,readonly:l.readonly,options:l.options,parsedValue:{path:"",operator:null,value:""},t:l.t,onChange:e=>l.onChange([...l.parsedValues,e])})]:Array.isArray(n)?[i,t(me||(me=Ce` <div class="bg-contrast-10 rounded-t-l rounded-b-l p-s -m-s"> ${0} </div> `),ye({parsedValues:n,isNested:!0,disabled:l.disabled,readonly:l.readonly,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues],a=e;t[o]=e.length>1?a:a[0],l.onChange(t)}}))]:[i,be({parsedValue:n,isNested:l.isNested,disabled:l.disabled,readonly:l.readonly,options:l.options,t:l.t,onChange:e=>{const t=[...l.parsedValues];t[o]=e,l.onChange(t)},onDelete:()=>{const e=l.parsedValues.filter(((e,l)=>l!==o));l.onChange(e)},onConvert:()=>{const t=[...l.parsedValues];t[o]=[n,e(e({},n),{},{operator:null,value:""})],l.onChange(t)}})]})))}function xe(e){var l;const[t,a]=e.split("=").map(decodeURIComponent),s=null!==(l=Object.values(h).find((e=>t.endsWith(`:${e}`))))&&void 0!==l?l:null;let n,o=t.substring(0,s?t.lastIndexOf(":"):void 0);const i=t.lastIndexOf("[");return o.endsWith("]")&&-1!==i&&(n=o.substring(i+1,o.length-1),o=o.substring(0,i),o.endsWith(":name")&&(o=o.substring(0,o.length-5))),{name:n,path:o,value:a,operator:s}}function we(e){let l=e.path;return e.name&&(l+=`:name[${e.name}]`),e.operator&&(l+=`:${e.operator}`),l=`${encodeURIComponent(l)}=${encodeURIComponent(e.value)}`,"="===l?"":l}function Ve(e){const l=e.reduce(((e,l)=>{if(Array.isArray(l)){const t=[l[0].value,l.slice(1).map((e=>we(e)))].join("|");e.push(`${l[0].path}=${encodeURIComponent(t)}`)}else"zoom"!==l.path&&e.push(we(l));return e}),[]),t=$e(e).join(",");return t&&l.push(`zoom=${encodeURIComponent(t)}`),l.join("&")}function $e(e){return e.map((e=>{if(Array.isArray(e))return $e(e);if(e.name)return[e.path];const l=e.path.split(":");return l.slice(0,l.length-1)})).flat().sort(((e,l)=>l.length-e.length)).filter(((e,l,t)=>t.every(((t,a)=>(a>=l||t!==e)&&!t.startsWith(`${e}:`)))))}let He;const Le=a(He||(He=(e=>e)`.gap-1px{gap:1px}.grid-vertical{grid-template:auto/var(--lumo-size-m) 1fr}:host([sm]) .sm-grid-horizontal{grid-template:auto/var(--lumo-size-m) 1fr var(--lumo-size-m) 1fr}`)),Me=b(u(c(v(p(s),"query-builder"))));class Ze extends Me{constructor(){super(...arguments),this.options=null,this.value=null}static get properties(){return e(e({},super.properties),{},{options:{type:Array},value:{type:String}})}static get styles(){return[super.styles,Le]}render(){var e,l;const t=new Set(["zoom","limit","offset","order","fields"]),a=[],s=[];var n;return(n=null!==(e=this.value)&&void 0!==e?e:"",n.split("&").filter((e=>!!e)).map((e=>{const[l,t]=e.split("=").map(decodeURIComponent);return(null==t?void 0:t.includes("|"))?`${encodeURIComponent(l)}=${t}`.split("|").map((e=>xe(e))):xe(e)}))).forEach((e=>{Array.isArray(e)||!t.has(e.path)?s.push(e):a.push(e)})),ye({parsedValues:s,disabled:this.disabled,readonly:this.readonly,options:null!==(l=this.options)&&void 0!==l?l:[],t:this.t.bind(this),onChange:e=>{this.value=Ve([...e,...a]),this.dispatchEvent(new Ze.ChangeEvent("change"))}})}}Ze.ChangeEvent=class extends CustomEvent{},Ze.Operator=h,Ze.Type=f,customElements.define("foxy-query-builder",Ze);export{Ze as Q,f as T};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3f04e4cc.js";import"./shared-eb8a0fdf.js";import{h as A}from"./shared-e5239bec.js";import{T as e}from"./shared-7abbc95c.js";import{D as t}from"./shared-3b709ddc.js";const s=A`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
[part="reveal-button"]::before {
|
|
@@ -52,4 +52,4 @@ const i=A`<custom-style>
|
|
|
52
52
|
</div>
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
|
-
</dom-module>`;let o;document.head.appendChild(i.content);class a extends e{static get is(){return"vaadin-password-field"}static get version(){return"2.
|
|
55
|
+
</dom-module>`;let o;document.head.appendChild(i.content);class a extends e{static get is(){return"vaadin-password-field"}static get version(){return"2.10.0"}static get properties(){return{revealButtonHidden:{type:Boolean,value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChange",readOnly:!0}}}static get template(){if(!o){o=super.template.cloneNode(!0);const A=t.import(this.is+"-template","template"),e=A.content.querySelector('[part="reveal-button"]'),s=A.content.querySelector("style");o.content.querySelector('[part="input-field"]').appendChild(e),o.content.appendChild(s)}return o}ready(){super.ready(),this.inputElement.type="password",this.inputElement.autocapitalize="off",this.addEventListener("focusout",(()=>{this._passwordVisibilityChanging||(this._setPasswordVisible(!1),this._cachedChangeEvent&&this._onChange(this._cachedChangeEvent))}))}_onChange(A){this.querySelector(`${this._slottedTagName}[slot="${this._slottedTagName}"]`)&&A.stopPropagation(),this._passwordVisibilityChanging?this._cachedChangeEvent=A:(this._cachedChangeEvent=null,super._onChange(A))}_revealButtonMouseDown(A){this.hasAttribute("focused")&&A.preventDefault()}_togglePasswordVisibilityTouchend(A){A.preventDefault(),this._togglePasswordVisibility(),this.inputElement.focus()}_togglePasswordVisibility(){this._passwordVisibilityChanging=!0,this.inputElement.blur(),this._setPasswordVisible(!this.passwordVisible),this.inputElement.focus(),this._passwordVisibilityChanging=!1}_passwordVisibleChange(A){this.inputElement.type=A?"text":"password"}}customElements.define(a.is,a);export{a as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as t,aj as e,ak as s}from"./shared-4c2e9064.js";var n=function(t,e,s,n){return new(s||(s=Promise))((function(i,o){function r(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(r,a)}c((n=n.apply(t,e||[])).next())}))};class i extends t{constructor(t){super(Object.assign(Object.assign({},t),{fetch:(...t)=>this.__fetch(...t)}))}signIn(e){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(e);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(e),method:"POST"});if(!s.ok){const e=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new t.AuthError({code:e})}{const t=yield s.json(),e=Object.assign(Object.assign({},t),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}}))}signUp(e){return n(this,void 0,void 0,(function*(){i.v8n.signUpParams.check(e);const s=new URL("./sign_up",this.base),n=yield this.fetch(s.toString(),{method:"POST",body:JSON.stringify(e)});if(!n.ok){if(400===n.status)throw new t.AuthError({code:"INVALID_FORM"});if(401===n.status)throw new t.AuthError({code:"UNAUTHORIZED"});if(403===n.status)throw new t.AuthError({code:"UNAVAILABLE"});throw new t.AuthError({code:"UNKNOWN"})}}))}sendPasswordResetEmail(e){return n(this,void 0,void 0,(function*(){i.v8n.email.check(e.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(e),method:"POST"})).ok)throw new t.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new t.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(t,e){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(t,e);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const t=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},t.v8n,{signUpParams:e().schema({verification:e().schema({token:e().string(),type:e().passesAnyOf(e().exact("hcaptcha"))}),first_name:e().optional(e().string().maxLength(50)),last_name:e().optional(e().string().maxLength(50)),password:e().string().maxLength(50),email:e().string().maxLength(100)}),credentials:e().schema({email:e().string(),newPassword:e().optional(e().string()),password:e().string()}),email:e().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(t="",e="ms"){var s=null;return(t=t.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(t,e,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(e,10)*n)})),s&&s/r[e]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./shared-9048eeb2.js";import"./shared-2edcd981.js";import{I as e}from"./shared-ba93be6b.js";import{h as t,c as r}from"./shared-7f33a83a.js";import{_ as i,Y as s}from"./shared-4c2e9064.js";import"./shared-799dc083.js";import"./foxy-spinner.js";import{C as n}from"./shared-5cf7b194.js";import{T as a}from"./shared-3b709ddc.js";import{N as o}from"./shared-9b12aeac.js";import{c as l}from"./shared-4e709717.js";let d,c=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="error"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(d||(d=c` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let u,p=e=>e;customElements.define("foxy-internal-create-control",class extends e{constructor(){super(...arguments),this.theme="primary success"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(u||(u=p` <vaadin-button class="w-full" theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="create"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let f,m,y=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{static get styles(){return[super.styles,r(f||(f=y`.max-w-0{max-width:0}`))]}renderControl(){return t(m||(m=y` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_created"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_modified"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> </tbody> </table> `),JSON.stringify({value:s(this,"nucleon.form.date_created")}),JSON.stringify({value:s(this,"nucleon.form.date_modified")}))}});let h,x,v,_,b,g=e=>e;const $=n(a(o));class I extends ${constructor(){super(...arguments),this.status=null}static get properties(){return i(i({},super.properties),{},{status:{type:Object}})}renderBody(){return this.data?t(h||(h=g` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):t(x||(x=g`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(v||(v=g` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),l({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),l({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return t(_||(_=g` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:r}){return t(b||(b=g` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,r,(()=>this.status=null))}}I.generalErrorPrefix="error:",customElements.define("foxy-internal-form",I);export{I};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-3b709ddc.js";
|
|
2
|
+
/**
|
|
3
|
+
@license
|
|
4
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
5
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
6
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
7
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
8
|
+
Code distributed by Google as part of the polymer project is also
|
|
9
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10
|
+
*/const g=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class P{constructor(t,e){v(t,e);const n=e.reduce(((e,n,r)=>e+b(n)+t[r+1]),t[0]);this.value=n.toString()}toString(){return this.value}}function b(t){if(t instanceof P)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const w=function(t,...e){v(t,e);const n=document.createElement("template");let r=e.reduce(((e,n,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof P)return b(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(n)+t[r+1]),t[0]);return g&&(r=g.createHTML(r)),n.innerHTML=r,n},v=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")};
|
|
11
|
+
/**
|
|
12
|
+
@license
|
|
13
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
14
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
15
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
16
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
17
|
+
Code distributed by Google as part of the polymer project is also
|
|
18
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
19
|
+
*/
|
|
20
|
+
let C,S=null,E=window.HTMLImports&&window.HTMLImports.whenReady||null;function T(t){requestAnimationFrame((function(){E?E(t):(S||(S=new Promise((t=>{C=t})),"complete"===document.readyState?C():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&C()}))),S.then((function(){t&&t()})))}))}
|
|
21
|
+
/**
|
|
22
|
+
@license
|
|
23
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
24
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
25
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
26
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
27
|
+
Code distributed by Google as part of the polymer project is also
|
|
28
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
29
|
+
*/const O="__seenByShadyCSS",A="__shadyCSSCachedStyle";let N=null,x=null;class I{constructor(){this.customStyles=[],this.enqueued=!1,T((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&x&&(this.enqueued=!0,T(x))}addCustomStyle(t){t[O]||(t[O]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[A])return t[A];let e;return e=t.getStyle?t.getStyle():t,e}processStyles(){const t=this.customStyles;for(let e=0;e<t.length;e++){const n=t[e];if(n[A])continue;const r=this.getStyleForCustomStyle(n);if(r){const t=r.__appliedElement||r;N&&N(t),n[A]=t}}return t}}I.prototype.addCustomStyle=I.prototype.addCustomStyle,I.prototype.getStyleForCustomStyle=I.prototype.getStyleForCustomStyle,I.prototype.processStyles=I.prototype.processStyles,Object.defineProperties(I.prototype,{transformCallback:{get:()=>N,set(t){N=t}},validateCallback:{get:()=>x,set(t){let e=!1;x||(e=!0),x=t,e&&this.enqueueDocumentValidation()}}});
|
|
30
|
+
/**
|
|
31
|
+
@license
|
|
32
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
33
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
34
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
35
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
36
|
+
Code distributed by Google as part of the polymer project is also
|
|
37
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
38
|
+
*/
|
|
39
|
+
const L=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,M=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,R=/@media\s(.*)/;
|
|
40
|
+
/**
|
|
41
|
+
@license
|
|
42
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
43
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
44
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
45
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
46
|
+
Code distributed by Google as part of the polymer project is also
|
|
47
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
48
|
+
*/
|
|
49
|
+
function k(t,e){for(let n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n])}function D(t,e){const n=window.getComputedStyle(t).getPropertyValue(e);return n?n.trim():""}function F(t){const e=M.test(t)||L.test(t);return M.lastIndex=0,L.lastIndex=0,e}
|
|
50
|
+
/**
|
|
51
|
+
@license
|
|
52
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
53
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
54
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
55
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
56
|
+
Code distributed by Google as part of the polymer project is also
|
|
57
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
58
|
+
*/const z=!(window.ShadyDOM&&window.ShadyDOM.inUse);let H,B;function j(t){H=(!t||!t.shimcssproperties)&&(z||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(B=window.ShadyCSS.cssBuild);const Y=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?H=window.ShadyCSS.nativeCss:window.ShadyCSS?(j(window.ShadyCSS),window.ShadyCSS=void 0):j(window.WebComponents&&window.WebComponents.flags);const q=H,J=new I;
|
|
59
|
+
/**
|
|
60
|
+
@license
|
|
61
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
62
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
63
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
64
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
65
|
+
Code distributed by Google as part of the polymer project is also
|
|
66
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
67
|
+
*/window.ShadyCSS||(window.ShadyCSS={prepareTemplate(t,e,n){},prepareTemplateDom(t,e){},prepareTemplateStyles(t,e,n){},styleSubtree(t,e){J.processStyles(),k(t,e)},styleElement(t){J.processStyles()},styleDocument(t){J.processStyles(),k(document.body,t)},getComputedStyleValue:(t,e)=>D(t,e),flushCustomStyles(){},nativeCss:q,nativeShadow:z,cssBuild:B,disableRuntime:Y}),window.ShadyCSS.CustomStyleInterface=J;
|
|
68
|
+
/**
|
|
69
|
+
@license
|
|
70
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
71
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
72
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
73
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
74
|
+
Code distributed by Google as part of the polymer project is also
|
|
75
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
76
|
+
*/
|
|
77
|
+
const $="link[rel=import][type~=css]",U="include",V="shady-unscoped";function X(e){return t.import(e)}function W(t){let n=t.body?t.body:t;const r=e(n.textContent,t.baseURI),i=document.createElement("style");return i.textContent=r,i}function G(t){const e=t.trim().split(/\s+/),n=[];for(let t=0;t<e.length;t++)n.push(...Z(e[t]));return n}function Z(t){const e=X(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Q(e));const n=e.querySelector("template");n&&t.push(...K(n,e.assetpath)),e._styles=t}return e._styles}function K(t,n){if(!t._styles){const r=[],i=t.content.querySelectorAll("style");for(let t=0;t<i.length;t++){let s=i[t],o=s.getAttribute(U);o&&r.push(...G(o).filter((function(t,e,n){return n.indexOf(t)===e}))),n&&(s.textContent=e(s.textContent,n)),r.push(s)}t._styles=r}return t._styles}function Q(t){const e=[],n=t.querySelectorAll($);for(let t=0;t<n.length;t++){let r=n[t];if(r.import){const t=r.import,n=r.hasAttribute(V);if(n&&!t._unscopedStyle){const e=W(t);e.setAttribute(V,""),t._unscopedStyle=e}else t._style||(t._style=W(t));e.push(n?t._unscopedStyle:t._style)}}return e}function tt(t){let e=X(t);if(e&&void 0===e._cssText){let t=function(t){let e="",n=Q(t);for(let t=0;t<n.length;t++)e+=n[t].textContent;return e}
|
|
78
|
+
/**
|
|
79
|
+
@license
|
|
80
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
81
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
82
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
83
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
84
|
+
Code distributed by Google as part of the polymer project is also
|
|
85
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
86
|
+
*/(e),n=e.querySelector("template");n&&(t+=function(t,e){let n="";const r=K(t,e);for(let t=0;t<r.length;t++){let e=r[t];e.parentNode&&e.parentNode.removeChild(e),n+=e.textContent}return n}(n,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}const et="include",nt=window.ShadyCSS.CustomStyleInterface;class rt extends HTMLElement{constructor(){super(),this._style=null,nt.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute(et);return e&&(t.removeAttribute(et),t.textContent=function(t){let e=t.trim().split(/\s+/),n="";for(let t=0;t<e.length;t++)n+=tt(e[t]);return n}(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}window.customElements.define("custom-style",rt);
|
|
87
|
+
/**
|
|
88
|
+
@license
|
|
89
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
90
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
91
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
92
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
93
|
+
Code distributed by Google as part of the polymer project is also
|
|
94
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
95
|
+
*/
|
|
96
|
+
let it=0;const st=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let n=it++;return function(r){let i=r.__mixinSet;if(i&&i[n])return r;let s=e,o=s.get(r);if(!o){o=t(r),s.set(r,o);let e=Object.create(o.__mixinSet||i||null);e[n]=!0,o.__mixinSet=e}return o}},ot=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
97
|
+
/**
|
|
98
|
+
@license
|
|
99
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
100
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
101
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
102
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
103
|
+
Code distributed by Google as part of the polymer project is also
|
|
104
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
105
|
+
*/
|
|
106
|
+
/**
|
|
107
|
+
@license
|
|
108
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
109
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
110
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
111
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
112
|
+
Code distributed by Google as part of the polymer project is also
|
|
113
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
114
|
+
*/
|
|
115
|
+
function at(t){return t.indexOf(".")>=0}function lt(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function ct(t,e){return 0===t.indexOf(e+".")}function dt(t,e){return 0===e.indexOf(t+".")}function ht(t,e,n){return e+n.slice(t.length)}function ut(t,e){return t===e||ct(t,e)||dt(t,e)}function pt(t){if(Array.isArray(t)){let e=[];for(let n=0;n<t.length;n++){let r=t[n].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function _t(t){return Array.isArray(t)?pt(t).split("."):t.toString().split(".")}function ft(t,e,n){let r=t,i=_t(e);for(let t=0;t<i.length;t++){if(!r)return;r=r[i[t]]}return n&&(n.path=i.join(".")),r}function mt(t,e,n){let r=t,i=_t(e),s=i[i.length-1];if(i.length>1){for(let t=0;t<i.length-1;t++){if(r=r[i[t]],!r)return}r[s]=n}else r[e]=n;return i.join(".")}
|
|
116
|
+
/**
|
|
117
|
+
@license
|
|
118
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
119
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
120
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
121
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
122
|
+
Code distributed by Google as part of the polymer project is also
|
|
123
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
124
|
+
*/const yt={},gt=/-[a-z]/g,Pt=/([A-Z])/g;function bt(t){return yt[t]||(yt[t]=t.indexOf("-")<0?t:t.replace(gt,(t=>t[1].toUpperCase())))}function wt(t){return yt[t]||(yt[t]=t.replace(Pt,"-$1").toLowerCase())}
|
|
125
|
+
/**
|
|
126
|
+
@license
|
|
127
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
128
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
129
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
130
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
131
|
+
Code distributed by Google as part of the polymer project is also
|
|
132
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
133
|
+
*/let vt=0,Ct=0,St=[],Et=0,Tt=!1,Ot=document.createTextNode("");new window.MutationObserver((function(){Tt=!1;const t=St.length;for(let e=0;e<t;e++){let t=St[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}St.splice(0,t),Ct+=t})).observe(Ot,{characterData:!0});const At={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Nt={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},xt={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},It={run:t=>(Tt||(Tt=!0,Ot.textContent=Et++),St.push(t),vt++),cancel(t){const e=t-Ct;if(e>=0){if(!St[e])throw new Error("invalid async handle: "+t);St[e]=null}}},Lt=It,Mt=st((t=>class extends t{static createProperties(t){const e=this.prototype;for(let n in t)n in e||e._createPropertyAccessor(n)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,n){let r=this.__data[t],i=this._shouldPropertyChange(t,e,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),i}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Lt.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(t,e,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,n)),this.__dataCounter--}_shouldPropertiesChange(t,e,n){return Boolean(e)}_propertiesChanged(t,e,n){}_shouldPropertyChange(t,e,n){return n!==e&&(n==n||e==e)}attributeChangedCallback(t,e,n,r){e!==n&&this._attributeToProperty(t,n),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,n,r)}_attributeToProperty(t,e,n){if(!this.__serializing){const r=this.__dataAttributes,i=r&&r[t]||t;this[i]=this._deserializeValue(e,n||this.constructor.typeForProperty(i))}}_propertyToAttribute(t,e,n){this.__serializing=!0,n=arguments.length<3?this[t]:n,this._valueToNodeAttribute(this,n,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,n){const r=this._serializeValue(e);"class"!==n&&"name"!==n&&"slot"!==n||(t=ot(t)),void 0===r?t.removeAttribute(n):t.setAttribute(n,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Rt={};let kt=HTMLElement.prototype;for(;kt;){let t=Object.getOwnPropertyNames(kt);for(let e=0;e<t.length;e++)Rt[t[e]]=!0;kt=Object.getPrototypeOf(kt)}const Dt=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const Ft=st((t=>{const e=Mt(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(bt(t[e]))}static attributeNameForProperty(t){return wt(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){const n=this;n.hasAttribute(t)||this._valueToNodeAttribute(n,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Dt(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let n;switch(e){case Object:try{n=JSON.parse(t)}catch(e){n=t}break;case Array:try{n=JSON.parse(t)}catch(e){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:n=isNaN(t)?String(t):Number(t),n=new Date(n);break;default:n=super._deserializeValue(t,e)}return n}_definePropertyAccessor(t,e){!function(t,e){if(!Rt[e]){let n=t[e];void 0!==n&&(t.__data?t._setPendingProperty(e,n):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=n))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),zt={"dom-if":!0,"dom-repeat":!0};
|
|
134
|
+
/**
|
|
135
|
+
@license
|
|
136
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
137
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
138
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
139
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
140
|
+
Code distributed by Google as part of the polymer project is also
|
|
141
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
142
|
+
*/let Ht=!1,Bt=!1;function jt(t){(function(){if(!Ht){Ht=!0;const t=document.createElement("textarea");t.placeholder="a",Bt=t.placeholder===t.textContent}return Bt})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}const Yt=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,n,r)=>{const i=n.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(i,r)):e.setAttribute(r,i)}})();function qt(t){let e=t.getAttribute("is");if(e&&zt[e]){let n=t;for(n.removeAttribute("is"),t=n.ownerDocument.createElement(e),n.parentNode.replaceChild(t,n),t.appendChild(n);n.attributes.length;){const{name:e}=n.attributes[0];Yt(t,n,e),n.removeAttribute(e)}}return t}function Jt(t,e){let n=e.parentInfo&&Jt(t,e.parentInfo);if(!n)return t;for(let t=n.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function $t(t,e,n,r){r.id&&(e[r.id]=n)}function Ut(t,e,n){if(n.events&&n.events.length)for(let r,i=0,s=n.events;i<s.length&&(r=s[i]);i++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function Vt(t,e,n,r){n.templateInfo&&(e._templateInfo=n.templateInfo,e._parentTemplateInfo=r)}const Xt=st((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let n=t._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(e),n.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,n,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,n){return this._parseTemplateNode(t.content,e,n)}static _parseTemplateNode(t,e,n){let r=!1,i=t;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,e,n)||r,jt(i),i.firstChild&&this._parseTemplateChildNodes(i,e,n),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,e,n)||r),r||n.noted}static _parseTemplateChildNodes(t,e,n){if("script"!==t.localName&&"style"!==t.localName)for(let r,i=t.firstChild,s=0;i;i=r){if("template"==i.localName&&(i=qt(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){let n=r;for(;n&&n.nodeType===Node.TEXT_NODE;)i.textContent+=n.textContent,r=n.nextSibling,t.removeChild(n),n=r;if(e.stripWhiteSpace&&!i.textContent.trim()){t.removeChild(i);continue}}let o={parentIndex:s,parentInfo:n};this._parseTemplateNode(i,e,o)&&(o.infoIndex=e.nodeInfoList.push(o)-1),i.parentNode&&s++}}static _parseTemplateNestedTemplate(t,e,n){let r=t,i=this._parseTemplate(r,e);return(i.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),n.templateInfo=i,!0}static _parseTemplateNodeAttributes(t,e,n){let r=!1,i=Array.from(t.attributes);for(let s,o=i.length-1;s=i[o];o--)r=this._parseTemplateNodeAttribute(t,e,n,s.name,s.value)||r;return r}static _parseTemplateNodeAttribute(t,e,n,r,i){return"on-"===r.slice(0,3)?(t.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(n.id=i,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let n=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,i=document.importNode(r,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let s=i.nodeList=new Array(n.length);i.$={};for(let t,r=0,o=n.length;r<o&&(t=n[r]);r++){let n=s[r]=Jt(i,t);$t(0,i.$,n,t),Vt(0,n,t,e),Ut(this,n,t)}return i}_addMethodEventListenerToNode(t,e,n,r){let i=function(t,e,n){return t=t._methodHost||t,function(e){t[n]?t[n](e,e.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||t,0,n);return this._addEventListenerToNode(t,e,i),i}_addEventListenerToNode(t,e,n){t.addEventListener(e,n)}_removeEventListenerFromNode(t,e,n){t.removeEventListener(e,n)}}));
|
|
143
|
+
/**
|
|
144
|
+
* @fileoverview
|
|
145
|
+
* @suppress {checkPrototypalTypes}
|
|
146
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
147
|
+
* This code may only be used under the BSD style license found at
|
|
148
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
149
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
150
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
151
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
152
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
153
|
+
*/let Wt=0;const Gt=[],Zt={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Kt="__computeInfo",Qt=/[A-Z]/;function te(t,e,n){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),n))for(let t in r){let e=r[t],n=r[t]=Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]}}else r=t[e]={};return r}function ee(t,e,n,r,i,s){if(e){let o=!1;const a=Wt++;for(let l in n){let c=e[i?lt(l):l];if(c)for(let e,d=0,h=c.length;d<h&&(e=c[d]);d++)e.info&&e.info.lastRun===a||i&&!re(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,n,r,e.info,i,s),o=!0)}return o}return!1}function ne(t,e,n,r,i,s,o,a){let l=!1,c=e[o?lt(r):r];if(c)for(let e,d=0,h=c.length;d<h&&(e=c[d]);d++)e.info&&e.info.lastRun===n||o&&!re(r,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,r,i,s,e.info,o,a),l=!0);return l}function re(t,e){if(e){let n=e.name;return n==t||!(!e.structured||!ct(n,t))||!(!e.wildcard||!dt(n,t))}return!0}function ie(t,e,n,r,i){let s="string"==typeof i.method?t[i.method]:i.method,o=i.property;s?s.call(t,t.__data[o],r[o]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function se(t,e,n){let r=lt(e);if(r!==e){return oe(t,wt(r)+"-changed",n[e],e),!0}return!1}function oe(t,e,n,r){let i={value:n,queueProperty:!0};r&&(i.path=r),ot(t).dispatchEvent(new CustomEvent(e,{detail:i}))}function ae(t,e,n,r,i,s){let o=(s?lt(e):e)!=e?e:null,a=o?ft(t,o):t.__data[e];o&&void 0===a&&(a=n[e]),oe(t,i.eventName,a,o)}function le(t,e,n,r,i){let o=t.__data[e];s&&(o=s(o,i.attrName,"attribute",t)),t._propertyToAttribute(e,i.attrName,o)}function ce(t,e,n,r){let i=t[Zt.COMPUTE];if(i)if(o){Wt++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const n=t[Zt.COMPUTE];let r,{counts:i,ready:s,total:o}=function(t){const e=t[Kt],n={},r=t[Zt.COMPUTE],i=[];let s=0;for(let t in e){const r=e[t];s+=n[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||i.push(t);return{counts:n,ready:i,total:s}}(t);for(;r=s.shift();){e.set(r,e.size);const t=n[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--o,0==--i[e]&&s.push(e)}))}if(0!==o){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),o=[];for(let t in e)he(t,i,o,s,r);let a;for(;a=o.shift();)ue(t,"",e,n,a)&&he(a.methodInfo,i,o,s,r);Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let s=e;for(;ee(t,i,s,n,r);)Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),s=t.__dataPending,t.__dataPending=null}}const de=(t,e,n)=>{let r=0,i=e.length-1,s=-1;for(;r<=i;){const o=r+i>>1,a=n.get(e[o].methodInfo)-n.get(t.methodInfo);if(a<0)r=o+1;else{if(!(a>0)){s=o;break}i=o-1}}s<0&&(s=i+1),e.splice(s,0,t)},he=(t,e,n,r,i)=>{const s=e[i?lt(t):t];if(s)for(let e=0;e<s.length;e++){const o=s[e];o.info.lastRun===Wt||i&&!re(t,o.trigger)||(o.info.lastRun=Wt,de(o.info,n,r))}};function ue(t,e,n,r,i){let s=Pe(t,e,n,r,i);if(s===Gt)return!1;let o=i.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,s,!0):(t[o]=s,!1)}function pe(t,e,n,r,i,s,o){n.bindings=n.bindings||[];let a={kind:r,target:i,parts:s,literal:o,isCompound:1!==s.length};if(n.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||wt(i)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let n=0;n<a.parts.length;n++){let r=a.parts[n];r.compoundIndex=n,_e(t,e,a,r,l)}}function _e(t,e,n,r,i){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let s=r.dependencies,o={index:i,binding:n,part:r,evaluator:t};for(let n=0;n<s.length;n++){let r=s[n];"string"==typeof r&&(r=Te(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:fe,info:o,trigger:r})}}}function fe(t,e,n,r,i,o,a){let l=a[i.index],c=i.binding,d=i.part;if(o&&d.source&&e.length>d.source.length&&"property"==c.kind&&!c.isCompound&&l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[c.target]){let r=n[e];e=ht(d.source,c.target,e),l._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(l)}else{let a=i.evaluator._evaluateBinding(t,d,e,n,r,o);a!==Gt&&function(t,e,n,r,i){i=function(t,e,n,r){if(n.isCompound){let i=t.__dataCompoundStorage[n.target];i[r.compoundIndex]=e,e=i.join("")}"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,i,n,r),s&&(i=s(i,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,i,n.target);else{let r=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[Zt.READ_ONLY]&&e[Zt.READ_ONLY][r]||e._setPendingProperty(r,i)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,i)}}(t,l,c,d,a)}}function me(t,e){if(e.isCompound){let n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,i=new Array(r.length);for(let t=0;t<r.length;t++)i[t]=r[t].literal;let s=e.target;n[s]=i,e.literal&&"property"==e.kind&&("className"===s&&(t=ot(t)),t[s]=e.literal)}}function ye(t,e,n){if(n.listenerEvent){let r=n.parts[0];t.addEventListener(n.listenerEvent,(function(t){!function(t,e,n,r,i){let s,o=t.detail,a=o&&o.path;a?(r=ht(n,r,a),s=o&&o.value):s=t.currentTarget[n],s=i?!s:s,e[Zt.READ_ONLY]&&e[Zt.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,s,!0,Boolean(a))||o&&o.queueProperty||e._invalidateProperties()}(t,e,n.target,r.source,r.negate)}))}}function ge(t,e,n,r,i,s){s=e.static||s&&("object"!=typeof s||s[e.methodName]);let o={methodName:e.methodName,args:e.args,methodInfo:i,dynamicFn:s};for(let i,s=0;s<e.args.length&&(i=e.args[s]);s++)i.literal||t._addPropertyEffect(i.rootProperty,n,{fn:r,info:o,trigger:i});return s&&t._addPropertyEffect(e.methodName,n,{fn:r,info:o}),o}function Pe(t,e,n,r,i){let s=t._methodHost||t,o=s[i.methodName];if(o){let r=t._marshalArgs(i.args,e,n);return r===Gt?Gt:o.apply(s,r)}i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}const be=[],we="(?:[a-zA-Z_$][\\w.:$\\-*]*)",ve="(?:("+we+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ce=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?"+("("+we+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+ve+"(?:,\\s*"+ve+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function Se(t){let e="";for(let n=0;n<t.length;n++){e+=t[n].literal||""}return e}function Ee(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:be};if(e[2].trim()){return function(t,e){return e.args=t.map((function(t){let n=Te(t);return n.literal||(e.static=!1),n}),this),e}(e[2].replace(/\\,/g,",").split(","),t)}return t}return null}function Te(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),n={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=lt(e),n.structured=at(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function Oe(t,e,n){let r=ft(t,n);return void 0===r&&(r=e[n]),r}function Ae(t,e,r,i){const s={indexSplices:i};n&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(r+".splices",s),t.notifyPath(r+".length",e.length),n&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Ne(t,e,n,r,i,s){Ae(t,e,n,[{index:r,addedCount:i,removed:s,object:e,type:"splice"}])}const xe=st((t=>{const e=Xt(Ft(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Zt}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Ie.length){let t=Ie[Ie.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Zt.READ_ONLY];for(let n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}_addPropertyEffect(t,e,n){this._createPropertyAccessor(t,e==Zt.READ_ONLY);let r=te(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(n)}_removePropertyEffect(t,e,n){let r=te(this,e,!0)[t],i=r.indexOf(n);i>=0&&r.splice(i,1)}_hasPropertyEffect(t,e){let n=this[e];return Boolean(n&&n[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Zt.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Zt.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Zt.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Zt.COMPUTE)}_setPendingPropertyOrPath(t,e,n,r){if(r||lt(Array.isArray(t)?t[0]:t)!==t){if(!r){let n=ft(this,t);if(!(t=mt(this,t,e))||!super._shouldPropertyChange(t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,n))return function(t,e,n){let r=t.__dataLinkedPaths;if(r){let i;for(let s in r){let o=r[s];dt(s,e)?(i=ht(s,o,e),t._setPendingPropertyOrPath(i,n,!0,!0)):dt(o,e)&&(i=ht(o,s,e),t._setPendingPropertyOrPath(i,n,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,n);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,n){n===t[e]&&"object"!=typeof n||("className"===e&&(t=ot(t)),t[e]=n)}_setPendingProperty(t,e,n){let r=this.__dataHasPaths&&at(t),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,i[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[Zt.NOTIFY]&&this[Zt.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let n=t[e];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let n in t)!e&&this[Zt.READ_ONLY]&&this[Zt.READ_ONLY][n]||this._setPendingPropertyOrPath(n,t[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,n){let r,i=this.__dataHasPaths;this.__dataHasPaths=!1,ce(this,e,n,i),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,n,i),this._flushClients(),ee(this,this[Zt.REFLECT],e,n,i),ee(this,this[Zt.OBSERVE],e,n,i),r&&function(t,e,n,r,i){let s,o,a=t[Zt.NOTIFY],l=Wt++;for(let o in e)e[o]&&(a&&ne(t,a,l,o,n,r,i)||i&&se(t,o,n))&&(s=!0);s&&(o=t.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}(this,r,e,n,i),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,n){this[Zt.PROPAGATE]&&ee(this,this[Zt.PROPAGATE],t,e,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,n)}_runEffectsForTemplate(t,e,n,r){const i=(e,r)=>{ee(this,t.propertyEffects,e,n,r,t.nodeList);for(let i=t.firstChild;i;i=i.nextSibling)this._runEffectsForTemplate(i,e,n,r)};t.runEffects?t.runEffects(i,e,r):i(e,r)}linkPaths(t,e){t=pt(t),e=pt(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=pt(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let n={path:""};Ae(this,ft(this,t,n),n.path,e)}get(t,e){return ft(e||this,t)}set(t,e,n){n?mt(n,t,e):this[Zt.READ_ONLY]&&this[Zt.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let n={path:""},r=ft(this,t,n),i=r.length,s=r.push(...e);return e.length&&Ne(this,r,n.path,i,e.length,[]),s}pop(t){let e={path:""},n=ft(this,t,e),r=Boolean(n.length),i=n.pop();return r&&Ne(this,n,e.path,n.length,0,[i]),i}splice(t,e,n,...r){let i,s={path:""},o=ft(this,t,s);return e<0?e=o.length-Math.floor(-e):e&&(e=Math.floor(e)),i=2===arguments.length?o.splice(e):o.splice(e,n,...r),(r.length||i.length)&&Ne(this,o,s.path,e,r.length,i),i}shift(t){let e={path:""},n=ft(this,t,e),r=Boolean(n.length),i=n.shift();return r&&Ne(this,n,e.path,0,0,[i]),i}unshift(t,...e){let n={path:""},r=ft(this,t,n),i=r.unshift(...e);return e.length&&Ne(this,r,n.path,0,e.length,[]),i}notifyPath(t,e){let n;if(1==arguments.length){let r={path:""};e=ft(this,t,r),n=r.path}else n=Array.isArray(t)?pt(t):t;this._setPendingPropertyOrPath(n,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var n;this._addPropertyEffect(t,Zt.READ_ONLY),e&&(this["_set"+(n=t,n[0].toUpperCase()+n.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,n){let r={property:t,method:e,dynamicFn:Boolean(n)};this._addPropertyEffect(t,Zt.OBSERVE,{fn:ie,info:r,trigger:{name:t}}),n&&this._addPropertyEffect(e,Zt.OBSERVE,{fn:ie,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let n=Ee(t);if(!n)throw new Error("Malformed observer expression '"+t+"'");ge(this,n,Zt.OBSERVE,Pe,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Zt.NOTIFY,{fn:ae,info:{eventName:wt(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Zt.REFLECT,{fn:le,info:{attrName:e}})}_createComputedProperty(t,e,n){let r=Ee(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const i=ge(this,r,Zt.COMPUTE,ue,t,n);te(this,Kt)[t]=i}_marshalArgs(t,e,r){const i=this.__data,s=[];for(let o=0,a=t.length;o<a;o++){let{name:a,structured:l,wildcard:c,value:d,literal:h}=t[o];if(!h)if(c){const t=dt(a,e),n=Oe(i,r,t?e:a);d={path:t?e:a,value:n,base:t?ft(i,a):n}}else d=l?Oe(i,r,a):i[a];if(n&&!this._overrideLegacyUndefined&&void 0===d&&t.length>1)return Gt;s[o]=d}return s}static addPropertyEffect(t,e,n){this.prototype._addPropertyEffect(t,e,n)}static createPropertyObserver(t,e,n){this.prototype._createPropertyObserver(t,e,n)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,n){this.prototype._createComputedProperty(t,e,n)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let n=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==n;if(!r)for(let t in n.propertyEffects)this._createPropertyAccessor(t);if(e)if(n=Object.create(n),n.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;n.parent=e,e.lastChild=n,n.previousSibling=r,r?r.nextSibling=n:e.firstChild=n}else this.__templateInfo=n;else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(t,e,n){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(n)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ie.push(this);let n=super._stampTemplate(t,e);if(Ie.pop(),e.nodeList=n.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=n.firstChild;e;e=e.nextSibling)t.push(e)}return n.templateInfo=e,function(t,e){let{nodeList:n,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let i=r[e],s=n[e],o=i.bindings;if(o)for(let e=0;e<o.length;e++){let n=o[e];me(s,n),ye(s,t,n)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:n,nextSibling:r,parent:i}=e;n?n.nextSibling=r:i&&(i.firstChild=r),r?r.previousSibling=n:i&&(i.lastChild=n),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];ot(ot(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,n,r){let i=e._parseTemplateNode.call(this,t,n,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,n);e&&(t.textContent=Se(e)||" ",pe(this,n,r,"text","textContent",e),i=!0)}return i}static _parseTemplateNodeAttribute(t,n,r,i,s){let o=this._parseBindings(s,n);if(o){let e=i,s="property";Qt.test(i)?s="attribute":"$"==i[i.length-1]&&(i=i.slice(0,-1),s="attribute");let a=Se(o);return a&&"attribute"==s&&("class"==i&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(i)),t.setAttribute(i,a)),"attribute"==s&&"disable-upgrade$"==e&&t.setAttribute(i,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===s&&(i=bt(i)),pe(this,n,r,s,i,o,a),!0}return e._parseTemplateNodeAttribute.call(this,t,n,r,i,s)}static _parseTemplateNestedTemplate(t,n,s){let o=e._parseTemplateNestedTemplate.call(this,t,n,s);const a=t.parentNode,l=s.templateInfo,c="dom-if"===a.localName,d="dom-repeat"===a.localName;r&&(c||d)&&(a.removeChild(t),(s=s.parentInfo).templateInfo=l,s.noted=!0,o=!1);let h=l.hostProps;if(i&&c)h&&(n.hostProps=Object.assign(n.hostProps||{},h),r||(s.parentInfo.noted=!0));else{let t="{";for(let e in h){pe(this,n,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}}return o}static _parseBindings(t,e){let n,r=[],i=0;for(;null!==(n=Ce.exec(t));){n.index>i&&r.push({literal:t.slice(i,n.index)});let s=n[1][0],o=Boolean(n[2]),a=n[3].trim(),l=!1,c="",d=-1;"{"==s&&(d=a.indexOf("::"))>0&&(c=a.substring(d+2),a=a.substring(0,d),l=!0);let h=Ee(a),u=[];if(h){let{args:t,methodName:n}=h;for(let e=0;e<t.length;e++){let n=t[e];n.literal||u.push(n)}let r=e.dynamicFns;(r&&r[n]||h.static)&&(u.push(n),h.dynamicFn=!0)}else u.push(a);r.push({source:a,mode:s,negate:o,customEvent:l,signature:h,dependencies:u,event:c}),i=Ce.lastIndex}if(i&&i<t.length){let e=t.substring(i);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,n,r,i,s){let o;return o=e.signature?Pe(t,n,r,0,e.signature):n!=e.source?ft(t,e.source):s&&at(n)?ft(t,n):t.__data[n],e.negate&&(o=!o),o}}})),Ie=[];
|
|
154
|
+
/**
|
|
155
|
+
@license
|
|
156
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
157
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
158
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
159
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
160
|
+
Code distributed by Google as part of the polymer project is also
|
|
161
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
162
|
+
*/
|
|
163
|
+
function Le(t){}
|
|
164
|
+
/**
|
|
165
|
+
@license
|
|
166
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
167
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
168
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
169
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
170
|
+
Code distributed by Google as part of the polymer project is also
|
|
171
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
172
|
+
*/const Me=st((t=>{const e=Mt(t);function n(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof i?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const n=t.properties;n&&(e=function(t){const e={};for(let n in t){const r=t[n];e[n]="function"==typeof r?{type:r}:r}return e}(n))}t.__ownProperties=e}return t.__ownProperties}class i extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=n(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=n(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i})),Re=window.ShadyCSS&&window.ShadyCSS.cssBuild,ke=st((n=>{const r=Me(xe(n));function i(t,e,n,r){n.computed&&(n.readOnly=!0),n.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,n.computed,r)),n.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!n.computed):!1===n.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),n.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===n.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),n.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===n.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),n.observer&&t._createPropertyObserver(e,n.observer,r[n.observer]),t._addPropertyToAttributeMap(e)}function s(t,e,n,r){if(!Re){const i=e.content.querySelectorAll("style"),s=K(e),o=function(t){let e=X(t);return e?Q(e):[]}(n),a=e.content.firstElementChild;for(let n=0;n<o.length;n++){let i=o[n];i.textContent=t._processStyleText(i.textContent,r),e.content.insertBefore(i,a)}let l=0;for(let e=0;e<s.length;e++){let n=s[e],o=i[l];o!==n?(n=n.cloneNode(!0),o.parentNode.insertBefore(n,o)):l++,n.textContent=t._processStyleText(n.textContent,r)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,n),p&&Re&&_){const n=e.content.querySelectorAll("style");if(n){let e="";Array.from(n).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}return class extends r{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){r._finalizeClass.call(this);const t=((e=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",e))||(e.__ownObservers=e.hasOwnProperty(JSCompiler_renameProperty("observers",e))?e.observers:null),e.__ownObservers);var e;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):a||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const n=this.prototype;for(let r=0;r<t.length;r++)n._createMethodObserver(t[r],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let e=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof e&&(e=e()),this._template=void 0!==e?e:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(e){let n=null;if(e&&(!f||m)&&(n=t.import(e,"template"),f&&!n))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${e}`);return n}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const e=this.importMeta;if(e)this._importPath=l(e.url);else{const e=t.import(this.is);this._importPath=e&&e.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=c,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let n in e){let r=e[n];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[n]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let n=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,n){return e(t,n)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const n=this.importPath;s(this,e,t,n?d(n):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ot(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),h&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=d(this.importPath)),d(t,e)}static _parseTemplateContent(t,e,n){return e.dynamicFns=e.dynamicFns||this._properties,r._parseTemplateContent.call(this,t,e,n)}static _addTemplatePropertyEffect(t,e,n){return!u||e in this._properties||n.info.part.signature&&n.info.part.signature.static||n.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${e}' used in template but not declared in 'properties'; attribute will not be observed.`),r._addTemplatePropertyEffect.call(this,t,e,n)}}})),De=ke(HTMLElement);
|
|
173
|
+
/**
|
|
174
|
+
* @fileoverview
|
|
175
|
+
* @suppress {checkPrototypalTypes}
|
|
176
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
177
|
+
* This code may only be used under the BSD style license found at
|
|
178
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
179
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
180
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
181
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
182
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
@license
|
|
186
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
187
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
188
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
189
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
190
|
+
Code distributed by Google as part of the polymer project is also
|
|
191
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
192
|
+
*/
|
|
193
|
+
class Fe{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,ze.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ze.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,n){return t instanceof Fe?t._cancelAsync():t=new Fe,t.setConfig(e,n),t}}let ze=new Set;const He=function(t){ze.add(t)},Be=function(){const t=Boolean(ze.size);return ze.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
|
|
194
|
+
/**
|
|
195
|
+
@license
|
|
196
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
197
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
198
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
199
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
200
|
+
Code distributed by Google as part of the polymer project is also
|
|
201
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
202
|
+
*/
|
|
203
|
+
let je="string"==typeof document.head.style.touchAction,Ye="__polymerGestures",qe="__polymerGesturesHandled",Je="__polymerGesturesTouchAction",$e=["mousedown","mousemove","mouseup","click"],Ue=[0,1,4,2],Ve=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Xe(t){return $e.indexOf(t)>-1}let We=!1;function Ge(t){if(!Xe(t)&&"touchend"!==t)return je&&We&&y?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){We=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let Ze=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const Ke=[],Qe={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},tn={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function en(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];try{let n=t.getRootNode();if(t.id){let r=n.querySelectorAll(`label[for = '${t.id}']`);for(let t=0;t<r.length;t++)e.push(r[t])}}catch(t){}}return e}let nn=function(t){let e=t.sourceCapabilities;var n;if((!e||e.firesTouchEvents)&&(t[qe]={skip:!0},"click"===t.type)){let e=!1,r=cn(t);for(let t=0;t<r.length;t++){if(r[t].nodeType===Node.ELEMENT_NODE)if("label"===r[t].localName)Ke.push(r[t]);else if(n=r[t],Qe[n.localName]){let n=en(r[t]);for(let t=0;t<n.length;t++)e=e||Ke.indexOf(n[t])>-1}if(r[t]===on.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function rn(t){let e=Ze?["click"]:$e;for(let n,r=0;r<e.length;r++)n=e[r],t?(Ke.length=0,document.addEventListener(n,nn,!0)):document.removeEventListener(n,nn,!0)}function sn(t){let e=t.type;if(!Xe(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ve&&(e=Ue[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let on={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function an(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function ln(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}document.addEventListener("touchend",(function(t){on.mouse.mouseIgnoreJob||rn(!0),on.mouse.target=cn(t)[0],on.mouse.mouseIgnoreJob=Fe.debounce(on.mouse.mouseIgnoreJob,At.after(2500),(function(){rn(),on.mouse.target=null,on.mouse.mouseIgnoreJob=null}))}),!!We&&{passive:!0});const cn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],dn={},hn=[];function un(t){const e=cn(t);return e.length>0?e[0]:t.target}function pn(t){let e,n=t.type,r=t.currentTarget[Ye];if(!r)return;let i=r[n];if(i){if(!t[qe]&&(t[qe]={},"touch"===n.slice(0,5))){let e=t.changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(on.touch.id=e.identifier),on.touch.id!==e.identifier)return;je||"touchstart"!==n&&"touchmove"!==n||function(t){let e=t.changedTouches[0],n=t.type;if("touchstart"===n)on.touch.x=e.clientX,on.touch.y=e.clientY,on.touch.scrollDecided=!1;else if("touchmove"===n){if(on.touch.scrollDecided)return;on.touch.scrollDecided=!0;let n=function(t){let e="auto",n=cn(t);for(let t,r=0;r<n.length;r++)if(t=n[r],t[Je]){e=t[Je];break}return e}(t),r=!1,i=Math.abs(on.touch.x-e.clientX),s=Math.abs(on.touch.y-e.clientY);t.cancelable&&("none"===n?r=!0:"pan-x"===n?r=s>i:"pan-y"===n&&(r=i>s)),r?t.preventDefault():Pn("track")}}(t)}if(e=t[qe],!e.skip){for(let n,r=0;r<hn.length;r++)n=hn[r],i[n.name]&&!e[n.name]&&n.flow&&n.flow.start.indexOf(t.type)>-1&&n.reset&&n.reset();for(let r,s=0;s<hn.length;s++)r=hn[s],i[r.name]&&!e[r.name]&&(e[r.name]=!0,r[n](t))}}}function _n(t,e,n){return!!dn[e]&&(function(t,e,n){let r=dn[e],i=r.deps,s=r.name,o=t[Ye];o||(t[Ye]=o={});for(let e,n,r=0;r<i.length;r++)e=i[r],Ze&&Xe(e)&&"click"!==e||(n=o[e],n||(o[e]=n={_count:0}),0===n._count&&t.addEventListener(e,pn,Ge(e)),n[s]=(n[s]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),r.touchAction&&yn(t,r.touchAction)}(t,e,n),!0)}function fn(t,e,n){return!!dn[e]&&(function(t,e,n){let r=dn[e],i=r.deps,s=r.name,o=t[Ye];if(o)for(let e,n,r=0;r<i.length;r++)e=i[r],n=o[e],n&&n[s]&&(n[s]=(n[s]||1)-1,n._count=(n._count||1)-1,0===n._count&&t.removeEventListener(e,pn,Ge(e)));t.removeEventListener(e,n)}(t,e,n),!0)}function mn(t){hn.push(t);for(let e=0;e<t.emits.length;e++)dn[t.emits[e]]=t}function yn(t,e){je&&t instanceof HTMLElement&&It.run((()=>{t.style.touchAction=e})),t[Je]=e}function gn(t,e,n){let r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,ot(t).dispatchEvent(r),r.defaultPrevented){let t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Pn(t){let e=function(t){for(let e,n=0;n<hn.length;n++){e=hn[n];for(let n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function bn(){on.mouse.mouseIgnoreJob&&on.mouse.mouseIgnoreJob.flush()}function wn(t,e,n,r){e&&gn(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(t){return Pn(t)}})}function vn(t,e,n){if(t.prevent)return!1;if(t.started)return!0;let r=Math.abs(t.x-e),i=Math.abs(t.y-n);return r>=5||i>=5}function Cn(t,e,n){if(!e)return;let r,i=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1],o=s.x-t.x,a=s.y-t.y,l=0;i&&(r=s.x-i.x,l=s.y-i.y),gn(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:o,dy:a,ddx:r,ddy:l,sourceEvent:n,hover:function(){return function(t,e){let n=document.elementFromPoint(t,e),r=n;for(;r&&r.shadowRoot&&!window.ShadyDOM;){let i=r;if(r=r.shadowRoot.elementFromPoint(t,e),i===r)break;r&&(n=r)}return n}(n.clientX,n.clientY)}})}function Sn(t,e,n){let r=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y),s=un(n||e);!s||tn[s.localName]&&s.hasAttribute("disabled")||(isNaN(r)||isNaN(i)||r<=25&&i<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=un(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let n=e.getBoundingClientRect(),r=t.pageX,i=t.pageY;return!(r>=n.left&&r<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(t.prevent||gn(s,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}
|
|
204
|
+
/**
|
|
205
|
+
@license
|
|
206
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
207
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
208
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
209
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
210
|
+
Code distributed by Google as part of the polymer project is also
|
|
211
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
212
|
+
*/mn({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){ln(this.info)},mousedown:function(t){if(!sn(t))return;let e=un(t),n=this;an(this.info,(function(t){sn(t)||(wn("up",e,t),ln(n.info))}),(function(t){sn(t)&&wn("up",e,t),ln(n.info)})),wn("down",e,t)},touchstart:function(t){wn("down",un(t),t.changedTouches[0],t)},touchend:function(t){wn("up",un(t),t.changedTouches[0],t)}}),mn({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,ln(this.info)},mousedown:function(t){if(!sn(t))return;let e=un(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;vn(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&Pn("tap"),n.info.addMove({x:r,y:i}),sn(t)||(n.info.state="end",ln(n.info)),e&&Cn(n.info,e,t),n.info.started=!0)};an(this.info,r,(function(t){n.info.started&&r(t),ln(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=un(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;vn(this.info,r,i)&&("start"===this.info.state&&Pn("tap"),this.info.addMove({x:r,y:i}),Cn(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=un(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),Cn(this.info,e,n))}}),mn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){sn(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){sn(t)&&Sn(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Sn(this.info,t.changedTouches[0],t)}});const En=st((t=>class extends t{_addEventListenerToNode(t,e,n){_n(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){fn(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}));export{lt as A,bn as B,bt as C,Fe as D,ke as E,En as G,R as M,De as P,L as V,Nt as a,_n as b,z as c,B as d,He as e,Be as f,F as g,w as h,xt as i,M as j,D as k,Y as l,st as m,q as n,Ft as o,It as p,Re as q,Le as r,yn as s,At as t,k as u,ft as v,ot as w,xe as x,ut as y,ht as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,h as e,j as n,k as i,l as r,p as s,n as o,o as a,q as h,s as c,u,v as d,w as l,x as f,y as p,z as v,C as y,D as w,E as x,F as b,G as m,H as g,I as E,J as S,K as T,L,M as _,N as O,S as k,O as C,P as N,Q as M,T as z,U as D,V as P,W as I,X as R}from"./shared-4c2e9064.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),j=new Map,F=0,U=function(){return"x:"+F++},X=function(t,e){return j.set(t,e),t},A=function(t){return j.get(t)},V=function(t){j.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,u=void 0!==h?h:e.id;this.id=u,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=U()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,u,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],u=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var d=e(t),l=d.next();!l.done;l=d.next()){u(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(u)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(u)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||d(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===v.Invoke){var E=y(u.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case f:this.stopChild(t.activity.id);break;case l:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,ar as r,an as e,as as n,at as o,au as a,r as c,av as u,aw as s,ax as i,ay as f,az as b,aA as j,aB as y,aC as v,aD as p,aE as l,aF as d,aG as A,aH as w,aI as g}from"./shared-4c2e9064.js";import{b as h,a as m}from"./shared-3bcc07cd.js";var O=Object.create,x=function(){function r(){}return function(e){if(!t(e))return{};if(O)return O(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}();function I(t,r,e,n){var o=!e;e||(e={});for(var a=-1,c=r.length;++a<c;){var u=r[a],s=n?n(e[u],t[u],u,e,t):void 0;void 0===s&&(s=t[u]),o?h(e,u,s):m(e,u,s)}return e}var S=Object.prototype.hasOwnProperty;function U(e){if(!t(e))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(e);var n=r(e),o=[];for(var a in e)("constructor"!=a||!n&&S.call(e,a))&&o.push(a);return o}function F(t){return e(t)?n(t,!0):U(t)}var B=o(Object.getPrototypeOf,Object);var E="object"==typeof exports&&exports&&!exports.nodeType&&exports,D=E&&"object"==typeof module&&module&&!module.nodeType&&module,M=D&&D.exports===E?c.Buffer:void 0,P=M?M.allocUnsafe:void 0;var C=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)i(r,u(t)),t=B(t);return r}:s;function G(t){return f(t,F,C)}var L=Object.prototype.hasOwnProperty;function N(t){var r=new t.constructor(t.byteLength);return new b(r).set(new b(t)),r}var R=/\w*$/;var T=j?j.prototype:void 0,V=T?T.valueOf:void 0;var k="[object Boolean]",z="[object Date]",H="[object Map]",W="[object Number]",$="[object RegExp]",q="[object Set]",J="[object String]",K="[object Symbol]",Q="[object ArrayBuffer]",X="[object DataView]",Y="[object Float32Array]",Z="[object Float64Array]",_="[object Int8Array]",tt="[object Int16Array]",rt="[object Int32Array]",et="[object Uint8Array]",nt="[object Uint8ClampedArray]",ot="[object Uint16Array]",at="[object Uint32Array]";function ct(t,r,e){var n,o,a,c=t.constructor;switch(r){case Q:return N(t);case k:case z:return new c(+t);case X:return function(t,r){var e=r?N(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case Y:case Z:case _:case tt:case rt:case et:case nt:case ot:case at:return function(t,r){var e=r?N(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,e);case H:return new c;case W:case J:return new c(t);case $:return(a=new(o=t).constructor(o.source,R.exec(o))).lastIndex=o.lastIndex,a;case q:return new c;case K:return n=t,V?Object(V.call(n)):{}}}var ut=p&&p.isMap,st=ut?l(ut):function(t){return y(t)&&"[object Map]"==v(t)};var it=p&&p.isSet,ft=it?l(it):function(t){return y(t)&&"[object Set]"==v(t)},bt=1,jt=2,yt=4,vt="[object Arguments]",pt="[object Function]",lt="[object GeneratorFunction]",dt="[object Object]",At={};function wt(e,n,o,c,s,i){var f,b=n&bt,j=n&jt,y=n&yt;if(o&&(f=s?o(e,c,s,i):o(e)),void 0!==f)return f;if(!t(e))return e;var p=d(e);if(p){if(f=function(t){var r=t.length,e=new t.constructor(r);return r&&"string"==typeof t[0]&&L.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(e),!b)return function(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}(e,f)}else{var l=v(e),h=l==pt||l==lt;if(A(e))return function(t,r){if(r)return t.slice();var e=t.length,n=P?P(e):new t.constructor(e);return t.copy(n),n}(e,b);if(l==dt||l==vt||h&&!s){if(f=j||h?{}:function(t){return"function"!=typeof t.constructor||r(t)?{}:x(B(t))}(e),!b)return j?function(t,r){return I(t,C(t),r)}(e,function(t,r){return t&&I(r,F(r),t)}(f,e)):function(t,r){return I(t,u(t),r)}(e,function(t,r){return t&&I(r,a(r),t)}(f,e))}else{if(!At[l])return s?e:{};f=ct(e,l,b)}}i||(i=new w);var O=i.get(e);if(O)return O;i.set(e,f),ft(e)?e.forEach((function(t){f.add(wt(t,n,o,t,e,i))})):st(e)&&e.forEach((function(t,r){f.set(r,wt(t,n,o,r,e,i))}));var S=p?void 0:(y?j?G:g:j?F:a)(e);return function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n&&!1!==r(t[e],e,t););}(S||e,(function(t,r){S&&(t=e[r=t]),m(f,r,wt(t,n,o,r,e,i))})),f}At[vt]=At["[object Array]"]=At["[object ArrayBuffer]"]=At["[object DataView]"]=At["[object Boolean]"]=At["[object Date]"]=At["[object Float32Array]"]=At["[object Float64Array]"]=At["[object Int8Array]"]=At["[object Int16Array]"]=At["[object Int32Array]"]=At["[object Map]"]=At["[object Number]"]=At[dt]=At["[object RegExp]"]=At["[object Set]"]=At["[object String]"]=At["[object Symbol]"]=At["[object Uint8Array]"]=At["[object Uint8ClampedArray]"]=At["[object Uint16Array]"]=At["[object Uint32Array]"]=!0,At["[object Error]"]=At[pt]=At["[object WeakMap]"]=!1;function gt(t){return wt(t,5)}export{gt as c};
|