@foxy.io/elements 1.24.0-beta.5 → 1.24.0
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 +1 -1
- 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 +3 -3
- 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-a96a2154.js → shared-099c1f57.js} +1 -1
- package/dist/cdn/{shared-8465a37a.js → shared-0c0ee663.js} +1 -1
- package/dist/cdn/shared-1196b6a7.js +1 -0
- package/dist/cdn/{shared-7680d300.js → shared-13fbea95.js} +1 -1
- package/dist/cdn/{shared-7ead930c.js → shared-27d21f4a.js} +1 -1
- package/dist/cdn/shared-2edcd981.js +1 -0
- package/dist/cdn/{shared-421e46e9.js → shared-31d8e3b8.js} +1 -1
- package/dist/cdn/shared-35728235.js +1 -0
- package/dist/cdn/{shared-a88c5cf1.js → shared-3b709ddc.js} +2 -2
- package/dist/cdn/shared-3bcc07cd.js +1 -0
- package/dist/cdn/{shared-13cc4ed4.js → shared-3c2414d4.js} +1 -1
- package/dist/cdn/{shared-2fa6a5a0.js → shared-3f04e4cc.js} +1 -1
- package/dist/cdn/{shared-6273b7e1.js → shared-406ce9ad.js} +1 -1
- package/dist/cdn/{shared-6b3be508.js → shared-4b20fc75.js} +1 -1
- package/dist/cdn/{shared-0dabe195.js → shared-4c2e9064.js} +1 -1
- package/dist/cdn/{shared-9765be8f.js → shared-5103c1b4.js} +1 -1
- package/dist/cdn/{shared-c97f7178.js → shared-5784c088.js} +1 -1
- package/dist/cdn/shared-584174ff.js +1 -0
- package/dist/cdn/{shared-125d1a00.js → shared-59fc6288.js} +1 -1
- package/dist/cdn/{shared-527abf31.js → shared-5a889c45.js} +1 -1
- package/dist/cdn/{shared-1fd59009.js → shared-5cf7b194.js} +1 -1
- package/dist/cdn/{shared-5616a12f.js → shared-5db85492.js} +1 -1
- package/dist/cdn/{shared-619bcf83.js → shared-601f27b1.js} +1 -1
- package/dist/cdn/{shared-c758220c.js → shared-621b3283.js} +1 -1
- package/dist/cdn/shared-630a0ff2.js +1 -0
- package/dist/cdn/{shared-8134d8a7.js → shared-6daeb197.js} +1 -1
- package/dist/cdn/{shared-72a13fda.js → shared-7723f756.js} +1 -1
- package/dist/cdn/{shared-90be9ac7.js → shared-773e7177.js} +1 -1
- package/dist/cdn/{shared-8128b5e3.js → shared-799dc083.js} +1 -1
- package/dist/cdn/{shared-4966b3e4.js → shared-7a455b15.js} +1 -1
- package/dist/cdn/{shared-0689b25a.js → shared-7abbc95c.js} +4 -4
- package/dist/cdn/{shared-7d4e0011.js → shared-7fab31ac.js} +1 -1
- package/dist/cdn/{shared-e640e9fa.js → shared-800ee6c0.js} +1 -1
- package/dist/cdn/shared-8a9c64b2.js +1 -0
- package/dist/cdn/{shared-fa5f0117.js → shared-8f922de8.js} +1 -1
- package/dist/cdn/{shared-9bdd5400.js → shared-9048eeb2.js} +1 -1
- package/dist/cdn/{shared-31a891e8.js → shared-9954ee26.js} +3 -3
- package/dist/cdn/{shared-8fbab85c.js → shared-9aa72495.js} +1 -1
- package/dist/cdn/shared-9b12aeac.js +1 -0
- package/dist/cdn/{shared-7bf6e728.js → shared-9b486845.js} +1 -1
- package/dist/cdn/{shared-403af08d.js → shared-ad80244a.js} +1 -1
- package/dist/cdn/{shared-6dffe67d.js → shared-b446c140.js} +1 -1
- package/dist/cdn/{shared-fc77174e.js → shared-b7556b77.js} +1 -1
- package/dist/cdn/{shared-eb232194.js → shared-b87d1af0.js} +1 -1
- package/dist/cdn/{shared-91eb066c.js → shared-ba93be6b.js} +1 -1
- package/dist/cdn/{shared-017ab35f.js → shared-baeef007.js} +1 -1
- package/dist/cdn/{shared-db06114b.js → shared-bee111d6.js} +1 -1
- package/dist/cdn/{shared-aa569a99.js → shared-c76ef8d8.js} +1 -1
- package/dist/cdn/{shared-3164d0c3.js → shared-c839e147.js} +1 -1
- package/dist/cdn/{shared-639dda4b.js → shared-d1f5de89.js} +1 -1
- package/dist/cdn/{shared-897ab5e6.js → shared-d90dbae7.js} +1 -1
- package/dist/cdn/{shared-42adf053.js → shared-ddac7722.js} +2 -2
- package/dist/cdn/{shared-ad0256d0.js → shared-de3dae6c.js} +1 -1
- package/dist/cdn/shared-e006e82c.js +1 -0
- package/dist/cdn/shared-e2e2ca6a.js +1 -0
- package/dist/cdn/{shared-a7475f62.js → shared-e5239bec.js} +1 -1
- package/dist/cdn/{shared-8528906b.js → shared-e8a51c60.js} +1 -1
- package/dist/cdn/{shared-aa22ee61.js → shared-e8a85228.js} +1 -1
- package/dist/cdn/{shared-4bd1efd7.js → shared-eb8a0fdf.js} +1 -1
- package/dist/cdn/{shared-c541c9e9.js → shared-ef7f2d07.js} +1 -1
- package/dist/cdn/{shared-e5786b8b.js → shared-efaf8d49.js} +1 -1
- package/dist/cdn/{shared-15fe0f50.js → shared-f0a9f3c2.js} +1 -1
- package/dist/cdn/{shared-19c9fe00.js → shared-f21e5761.js} +1 -1
- package/dist/cdn/shared-f241722a.js +1 -0
- package/dist/cdn/{shared-4a0298cb.js → shared-f29acc38.js} +1 -1
- package/dist/cdn/{shared-848813a4.js → shared-f29d410a.js} +1 -1
- package/dist/cdn/{shared-f4822b9e.js → shared-f5bbb1e0.js} +1 -1
- package/dist/cdn/{shared-57922341.js → shared-fcfbfbdb.js} +1 -1
- package/dist/cdn/{shared-bf2113a4.js → shared-fd40a40c.js} +1 -1
- package/dist/cdn/{shared-763a6797.js → shared-fd96bcd1.js} +1 -1
- package/dist/cdn/{shared-a134d313.js → shared-ff7fd5fa.js} +1 -1
- package/dist/cdn/{shared-6b0498b2.js → shared-fff03a45.js} +3 -3
- package/dist/cdn/translations/customer/en.json +76 -15
- package/dist/cdn/translations/customer-form/en.json +84 -15
- package/dist/cdn/translations/customer-portal/en.json +115 -31
- 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/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 +4 -2
- package/dist/cdn/shared-1b2e0709.js +0 -1
- package/dist/cdn/shared-1e43b4db.js +0 -1
- package/dist/cdn/shared-46f3f71c.js +0 -1
- package/dist/cdn/shared-53532131.js +0 -1
- package/dist/cdn/shared-79d01877.js +0 -1
- package/dist/cdn/shared-7e887e5b.js +0 -1
- package/dist/cdn/shared-a6517170.js +0 -1
- package/dist/cdn/shared-b334c8b6.js +0 -1
- package/dist/cdn/shared-bbbb8894.js +0 -1
- package/dist/cdn/shared-d2222c8d.js +0 -1
- package/dist/cdn/shared-fec6fd04.js +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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t}from"./shared-0dabe195.js";import"./shared-9bdd5400.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-46f3f71c.js";import"./shared-c97f7178.js";import"./shared-4bd1efd7.js";import"./shared-a96a2154.js";import{w as a,S as n,x as o}from"./shared-a88c5cf1.js";import"./shared-619bcf83.js";import"./shared-c758220c.js";import{I as c,D as l}from"./shared-19c9fe00.js";import{E as h}from"./shared-5616a12f.js";import"./shared-7680d300.js";import"./shared-0689b25a.js";import"./shared-13cc4ed4.js";import"./shared-db06114b.js";import"./shared-c541c9e9.js";import"./shared-2fa6a5a0.js";import"./shared-6dffe67d.js";import{s as d}from"./shared-11c2efc8.js";import"./shared-a7475f62.js";import"./shared-343d1fd7.js";import"./shared-763a6797.js";import"./shared-8134d8a7.js";import"./shared-8528906b.js";import"./shared-bbbb8894.js";import"./shared-1fd59009.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-f4822b9e.js";import"./shared-6b0498b2.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var f;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(f||(f={}));class y extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(f.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(f.Default);this.quantity>1&&this.__insertImage(f.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,f.Previous),e&&(this.__setImageState(e,f.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(f.BeforeEnter),f.Default)):t&&this.__setImageState(t,f.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,f.Default),i=t):(t&&this.__setImageState(t,f.Excluded),i=e),i&&(this.__setImageState(i,f.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(f.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,f.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=y.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}y.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,E,I,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,c,l,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,c?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,l?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,e,t>102?s(E||(E=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(I||(I=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,j=t=>t;class L extends S{static get scopedElements(){return{"x-pic":y}}}class A extends S{static get scopedElements(){return{"x-pic":L}}}class N extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":y,"x-bundle-grid":A}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=j`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=j`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class P extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends P{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":N,"x-i18n":c}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends P{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":l,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{R as Item,K as ItemsForm};
|
|
1
|
+
import{_ as t}from"./shared-4c2e9064.js";import"./shared-9048eeb2.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-2edcd981.js";import"./shared-5784c088.js";import"./shared-eb8a0fdf.js";import"./shared-099c1f57.js";import{w as a,S as n,x as o}from"./shared-3b709ddc.js";import"./shared-601f27b1.js";import"./shared-621b3283.js";import{I as c,D as l}from"./shared-f21e5761.js";import{E as h}from"./shared-5db85492.js";import"./shared-13fbea95.js";import"./shared-7abbc95c.js";import"./shared-3c2414d4.js";import"./shared-bee111d6.js";import"./shared-ef7f2d07.js";import"./shared-3f04e4cc.js";import"./shared-b446c140.js";import{s as d}from"./shared-11c2efc8.js";import"./shared-e5239bec.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-6daeb197.js";import"./shared-e8a51c60.js";import"./shared-35728235.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-4e709717.js";import"./shared-f5bbb1e0.js";import"./shared-fff03a45.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var f;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(f||(f={}));class y extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(f.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(f.Default);this.quantity>1&&this.__insertImage(f.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,f.Previous),e&&(this.__setImageState(e,f.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(f.BeforeEnter),f.Default)):t&&this.__setImageState(t,f.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,f.Default),i=t):(t&&this.__setImageState(t,f.Excluded),i=e),i&&(this.__setImageState(i,f.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(f.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,f.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=y.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}y.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,E,I,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,c,l,h]=this.data;return s(b||(b=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,c?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,l?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,e,t>102?s(E||(E=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(I||(I=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,j=t=>t;class L extends S{static get scopedElements(){return{"x-pic":y}}}class A extends S{static get scopedElements(){return{"x-pic":L}}}class N extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":y,"x-bundle-grid":A}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=j`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(k||(k=j`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class P extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends P{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":N,"x-i18n":c}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends P{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":l,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{R as Item,K as ItemsForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as
|
|
1
|
+
import{N as e}from"./shared-9b12aeac.js";export{N as NucleonElement}from"./shared-9b12aeac.js";import"./shared-4c2e9064.js";import"./shared-7f33a83a.js";import"./shared-35728235.js";import"./shared-343d1fd7.js";import"./shared-3ab0306f.js";import"./shared-fd96bcd1.js";import"./shared-e8a51c60.js";customElements.define("foxy-nucleon",e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-b446c140.js";import"./shared-5784c088.js";import"./shared-9048eeb2.js";import"./shared-2edcd981.js";import{_ as e,Y as t}from"./shared-4c2e9064.js";import{h as s,L as i}from"./shared-7f33a83a.js";import{C as n}from"./shared-5cf7b194.js";import{N as a}from"./shared-9b12aeac.js";import{R as r,T as o,a as c}from"./shared-3b709ddc.js";import{c as l}from"./shared-4e709717.js";import{I as d}from"./shared-fd96bcd1.js";import"./shared-e5239bec.js";import"./shared-eb8a0fdf.js";import"./shared-343d1fd7.js";import"./shared-d3bf9ac0.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";let m,_=e=>e;const h=r(n(o(c(d(i),"pagination"))));class p extends h{constructor(){super(...arguments),this.__pageElement=null,this.__rerender=()=>this.requestUpdate(),this.__first=""}static get properties(){return e(e({},super.properties),{},{first:{type:String},__pageElement:{attribute:!1}})}get first(){return this.__first}set first(e){this.__first=e,this.__pageElement&&(this.__pageElement.href=e)}connectedCallback(){super.connectedCallback(),this.__connectPageElement()}render(){var e;const i=null===(e=this.__pageElement)||void 0===e?void 0:e.data,{disabled:n,lang:a,ns:r}=this,o=Number(t(i,"returned_items")),c=Number.isNaN(o)?0:o,d=Number(t(i,"total_items")),h=Number.isNaN(d)?0:d,p=Number(t(i,"offset")),f=Number.isNaN(p)?0:p,g=!n&&f>0,u=!n&&f+c<h,b="sr-only sm-not-sr-only";return s(m||(m=_` <slot @slotchange="${0}"></slot> <div class="grid gap-s items-center -mx-xs" style="grid-template-columns:1fr auto 1fr"> <div class="flex items-center space-x-s"> <vaadin-button data-testid="first" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-s" icon="icons:first-page"></iron-icon> <foxy-i18n class="${0}" lang="${0}" key="first" ns="${0}"></foxy-i18n> </vaadin-button> <vaadin-button data-testid="prev" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-s" icon="icons:chevron-left"></iron-icon> <foxy-i18n class="${0}" lang="${0}" key="previous" ns="${0}"></foxy-i18n> </vaadin-button> </div> <foxy-i18n options="${0}" class="${0}" lang="${0}" key="pagination" ns="${0}"> </foxy-i18n> <div class="flex items-center justify-end space-x-s"> <vaadin-button data-testid="next" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="next" ns="${0}"></foxy-i18n> <iron-icon class="icon-inline text-s" icon="icons:chevron-right"></iron-icon> </vaadin-button> <vaadin-button data-testid="last" theme="contrast tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="last" ns="${0}"></foxy-i18n> <iron-icon class="icon-inline text-s" icon="icons:last-page"></iron-icon> </vaadin-button> </div> </div> `),this.__connectPageElement,!g,(()=>this.__goTo("first")),b,a,r,!g,(()=>this.__goTo("prev")),b,a,r,JSON.stringify({total:h,from:f?f+1:0,to:f+c}),l({"flex-1 text-xs text-tertiary text-center leading-xs truncate":!0,"opacity-0":!i}),a,r,!u,(()=>this.__goTo("next")),b,a,r,!u,(()=>this.__goTo("last")),b,a,r)}disconnectedCallback(){super.disconnectedCallback(),this.__disconnectPageElement()}__goTo(e){var s;this.__pageElement.href=String(t(null===(s=this.__pageElement)||void 0===s?void 0:s.data,`_links.${e}.href`))}__disconnectPageElement(){var e;null===(e=this.__pageElement)||void 0===e||e.removeEventListener("update",this.__rerender),this.__pageElement=null}__connectPageElement(){var e;this.__disconnectPageElement();const t=this.renderRoot.querySelector("slot"),s=(null!==(e=null==t?void 0:t.assignedElements())&&void 0!==e?e:[]).find((e=>e instanceof a));s&&(this.__pageElement=s,this.__pageElement.addEventListener("update",this.__rerender),this.__pageElement.href=this.first)}}customElements.define("foxy-pagination",p);export{p as Pagination};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-584174ff.js";import{a as e}from"./shared-3b709ddc.js";import{T as r}from"./shared-f0a9f3c2.js";import{h as n}from"./shared-7f33a83a.js";import{c as a,a as i}from"./shared-4c2e9064.js";import"./foxy-spinner.js";import"./shared-5784c088.js";import"./shared-e5239bec.js";import"./shared-b446c140.js";import"./shared-2edcd981.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-31d8e3b8.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";var t=a((function(e,r){!function(e){function r(e,r){this.browser=e,this.os=r}function n(e,r){function n(e){if(e.length>0){var n=e.split("/"),a=n.length>1?n[1]:"";r(n[0],a)}}for(var a="",i=0;i<e.length;++i){var t=e[i];if(" "===t){for(n(a),a="";" "===e[i];)++i;t=e[i]}if("("===t){n(a),a="";var s="";for(++i;i<e.length&&")"!==(t=e[i]);++i)s+=t;for(var o=s.split(";"),m=0;m<o.length;++m)r(o[m].trim());++i}else" "!==t&&"("!==t&&(a+=t)}n(a)}function a(e){var r={"Windows NT 10.0":"10","Windows NT 6.3":"8.1","Windows NT 6.2":"8","Windows NT 6.1":"7","Windows NT 6.0":"Vista","Windows NT 5.2":"XP","Windows NT 5.1":"XP","Windows NT 5.0":"2000",10.4:"Tiger",10.5:"Leopard",10.6:"Snow Leopard",10.7:"Lion",10.8:"Mountain Lion",10.9:"Mavericks","10.10":"Yosemite",10.11:"El Capitan",10.12:"Sierra",10.13:"High Sierra",10.14:"Mojave"};function n(e){var n=r[e];return n||null}function a(e){var n=e.substr(e.indexOf("OS X")+5),a=n.indexOf("_")>1?n.split("_"):n.split(".");return a=a.length>=2?a.slice(0,2):a.concat([0]),r[a.join(".")]?a.join(".")+" ("+r[a.join(".")]+")":a.join(".")}function i(e){return e.substr(8).split(".").slice(0,2).join(".")}function t(e){return e.substr(e.indexOf(" OS ")+4).replace(" like Mac OS X","").split("_").slice(0,2).join(".")}var s=[{tag:"Windows NT",name:"Windows",fn:n},{tag:"Intel Mac OS",name:"macOS",fn:a},{tag:"PPC Mac OS",name:"macOS",fn:a},{tag:"Android",name:"Android",fn:i},{tag:"CPU iPhone OS",name:"iOS",fn:t},{tag:"CPU OS",name:"iOS",fn:t},{tag:"Linux"},{tag:"FreeBSD"},{tag:"OpenBSD"},{tag:"NetBSD"},{tag:"SunOS"},{tag:"CrOS",name:"ChromeOS"}],o={name:null,version:null},m=e.reduce((function(e,r){var n=s.find((function(e){return e.tag===r.substr(0,e.tag.length)}));if(n){var a=n.name?n.name:n.tag;e.name=a.split(" ").shift(),e.version=n.fn?n.fn(r):null}return e}),o);return"macOS"===m.name&&(m.name=parseInt(m.version.replace("10.",""),10)<=11?"OS X":"macOS"),m}function i(e,r){function n(e,r){return e|="Chrome"===r,e="EdgiOS"!==r&&"Edge"!==r&&e}var a=null;if(e.reduce(n,!1)){var i=r.Chrome;a={version:parseInt(i,10),fullVersion:i}}return a}function t(e,r){var n=[{seq:["Gecko","Firefox"],name:"Firefox"},{seq:["AppleWebKit","KHTML, like Gecko","Version","Safari"],name:"Safari",ver:"Version"},{seq:["AppleWebKit","CriOS","Mobile","Safari"],name:"Chrome",ver:"CriOS"},{seq:["AppleWebKit","Mobile","Safari","EdgiOS"],name:"Edge",ver:"EdgiOS"},{seq:["AppleWebKit","Chrome","Safari"],name:"Chrome"},{seq:["AppleWebKit","Version","Chrome","Safari"],name:"Chrome"},{seq:["Chrome","Safari","Edge"],name:"Edge"},{seq:["MSIE 6.0"],name:"Internet Explorer",at:"6.0"},{seq:["MSIE 7.0"],name:"Internet Explorer",at:"7.0"},{seq:["Trident/4.0"],name:"Internet Explorer",at:"8.0"},{seq:["Trident/5.0"],name:"Internet Explorer",at:"9.0"},{seq:["Trident/6.0"],name:"Internet Explorer",at:"10.0"},{seq:["Trident/7.0"],name:"Internet Explorer",at:"11.0"},{seq:["AppleWebKit","Silk","Chrome","Safari"],name:"Silk"},{seq:["Chrome","Safari","Vivaldi"],name:"Vivaldi"},{seq:["Chrome","Safari","OPR"],name:"Opera",ver:"OPR"},{seq:["AppleWebKit","Chrome","Safari","EdgA"],name:"Edge",ver:"EdgA"},{seq:["AppleWebKit","SamsungBrowser","Chrome","Safari"],name:"Samsung Browser",ver:"SamsungBrowser"},{seq:["Chrome","UCBrowser","Safari"],name:"UCBrowser"}],a={name:"Unknown",version:null,fullVersion:null,chromeFamily:null},t=r.Mozilla;if("4.0"===t||"5.0"===t){(a=n.reduce((function(n,a){function i(e,r){return e.push(r-e.pop()),e.push(r),e}function t(e){return e>0}if(a.seq.map((function(r){return e.indexOf(r)})).reduce(i,[0]).every(t)){var s=a.ver?a.ver:a.name,o=a.at?a.at:r[s];n.name=a.name,n.version="Edge"===n.name?parseInt(o,10):parseFloat(o),n.fullVersion=o}return n}),a)).chromeFamily=i(e,r);var s=e.find((function(e){return"Tizen"===e.substr(0,5)}));a.name=s?"Tizen":a.name}return a}function s(e){var r=[];return n(e,(function(e,n){r.push({name:e,version:n})})),r}function o(e){var i=[],s={};return n(e,(function(e,r){i.push(e),"string"==typeof r&&(s[e]=r)})),new r(t(i,s),a(i))}r.prototype.toString=function(){var e=this.browser.name;return this.browser.version&&(e+=" "+this.browser.version),this.os.name&&(e+=" on "+this.os.name),this.os.version&&(e+=" "+this.os.version),e},e.analyze=o,e.scan=s,e.version="0.5.0"}(r)}));let s,o,m=e=>e;const l=e(r,"passkey-card");class f extends l{renderBody(){return super.renderBody({title:e=>n(s||(s=m`${0}`),e.credential_id),subtitle:e=>{let r,a;return e.last_login_date&&e.last_login_ua?(r={last_login_date:new Date(e.last_login_date),last_login_ua:t.analyze(e.last_login_ua).toString()},a="subtitle"):(r={},a="subtitle_no_data"),n(o||(o=m`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),a,r)}})}}customElements.define("foxy-passkey-card",f);export{f as PasskeyCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-fcfbfbdb.js";import"./shared-d90dbae7.js";import{I as e}from"./shared-e2e2ca6a.js";import"./foxy-spinner.js";import{R as r,a as s}from"./shared-3b709ddc.js";import{h as t}from"./shared-7f33a83a.js";import{B as a}from"./shared-4c2e9064.js";import"./shared-6daeb197.js";import"./shared-eb8a0fdf.js";import"./shared-e5239bec.js";import"./shared-7abbc95c.js";import"./shared-3f04e4cc.js";import"./shared-ff7fd5fa.js";import"./shared-ba93be6b.js";import"./shared-f9180815.js";import"./shared-2edcd981.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-9048eeb2.js";import"./shared-799dc083.js";import"./shared-621b3283.js";import"./shared-4e709717.js";import"./shared-5784c088.js";import"./shared-b446c140.js";let o,d,i=e=>e;const n=r(s(e,"passkey-form"));class p extends n{get readonlySelector(){return new a(`credential-id last-login-date last-login-ua ${super.readonlySelector.toString()}`)}renderBody(){return this.data?t(d||(d=i` <foxy-internal-text-control infer="credential-id"></foxy-internal-text-control> <foxy-internal-text-control infer="last-login-date"></foxy-internal-text-control> <foxy-internal-text-area-control infer="last-login-ua"></foxy-internal-text-area-control> ${0} `),super.renderBody()):t(o||(o=i` <div class="p-xl flex items-center justify-center"> <foxy-spinner infer="spinner" state="empty" layout="vertical"></foxy-spinner> </div> `))}}customElements.define("foxy-passkey-form",p);export{p as PasskeyForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-f9180815.js";import"./shared-
|
|
1
|
+
import"./shared-f9180815.js";import"./shared-2edcd981.js";import"./foxy-spinner.js";import{l as e,u as t}from"./shared-d7be11de.js";import{h as s}from"./shared-7f33a83a.js";import{C as r}from"./shared-5cf7b194.js";import{N as i}from"./shared-9b12aeac.js";import{T as a,a as n}from"./shared-3b709ddc.js";import{c as o}from"./shared-4e709717.js";import"./shared-4c2e9064.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-5784c088.js";import"./shared-e5239bec.js";import"./shared-b446c140.js";import"./shared-d3bf9ac0.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";let d,l,c,u,p,h,f,m=e=>e;const v=a(r(n(i,"payment-card")));class _ extends v{constructor(){super(...arguments),this.templates={},this.__currencyDisplay="",this.__currency=""}render(){var e,t;const r=this.hiddenSelector,i=r.matches("card-info",!0),a=r.matches("fraud-risk",!0);return s(d||(d=m` <div aria-busy="${0}" aria-live="polite" class="relative text-body text-m font-lumo leading-m focus-outline-none"> <div class="${0}"> ${0} ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),o({"relative transition duration-250 ease-in-out":!0,"opacity-0 pointer-events-none":!this.data}),r.matches("title",!0)?"":this.__renderTitle(),r.matches("subtitle",!0)?"":this.__renderSubtitle(),i&&a?"":s(l||(l=m` <div class="my-s flex space-x-s overflow-auto"> ${0} ${0} </div> `),i?"":this.__renderCardInfo(),a?"":this.__renderFraudRisk()),r.matches("processor-response",!0)?"":this.__renderProcessorResponse(),o({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}async _sendGet(){const e=await super._sendGet(),[t,s]=await Promise.all([super._fetch(e._links["fx:transaction"].href),super._fetch(e._links["fx:store"].href)]);return this.__currency=t.currency_code,this.__currencyDisplay=s.use_international_currency_symbol?"code":"symbol",e}__renderTitle(){const e=this.data?`gateways.${this.data.gateway_type}`:"",t=`${this.ns} gateways`;return s(c||(c=m` <div class="text-m flex text-secondary" data-testid="title"> ${0} <foxy-i18n lang="${0}" key="${0}" ns="${0}"></foxy-i18n>​ ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.lang,e,t,this.renderTemplateOrSlot("title:after"))}__renderSubtitle(){var e,t,r,i;const a=`${null!==(t=null===(e=this.data)||void 0===e?void 0:e.amount)&&void 0!==t?t:""} ${this.__currency}`,n=JSON.stringify({amount:a,currencyDisplay:this.__currencyDisplay}),o=null!==(i=null===(r=this.data)||void 0===r?void 0:r.date_created)&&void 0!==i?i:"",d=JSON.stringify({value:o}),l=this.lang,c=this.ns;return s(u||(u=m` <div class="flex font-medium text-m" data-testid="subtitle"> ${0} <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"></foxy-i18n> <span> • </span> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"></foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),n,l,c,d,l,c,this.renderTemplateOrSlot("subtitle:after"))}__renderCardInfo(){var r,i,a,n;const o=this.data,d=(null!==(r=null==o?void 0:o.cc_type)&&void 0!==r?r:"unknown").toLowerCase(),l=null===(i=null==o?void 0:o.cc_exp_year)||void 0===i?void 0:i.substring(2),c=null==o?void 0:o.cc_exp_month,u=null===(a=null==o?void 0:o.cc_number_masked)||void 0===a?void 0:a.replace(/x/gi,"");if(c&&l&&u)return s(p||(p=m` <div class="flex" data-testid="card-info"> ${0} <div class="truncate flex items-center h-s rounded overflow-hidden bg-contrast-5"> <div class="h-s">${0}</div> <div class="text-m font-medium px-s">•••• ${0} ${0}/${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("card-info:before"),null!==(n=e[d])&&void 0!==n?n:t,u,c,l,this.renderTemplateOrSlot("card-info:after"))}__renderFraudRisk(){var e,t;const r=null!==(t=null===(e=this.data)||void 0===e?void 0:e.fraud_protection_score)&&void 0!==t?t:0,i=r>0?"text-error":"text-success",a=r>0?"bg-error-10":"bg-success-10";return s(h||(h=m` <div class="flex" data-testid="fraud-risk"> ${0} <foxy-i18n options="${0}" class="truncate flex font-medium h-s items-center px-s rounded text-m ${0} ${0}" lang="${0}" key="fraud_risk" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("fraud-risk:before"),JSON.stringify({score:r}),i,a,this.lang,this.ns,this.renderTemplateOrSlot("fraud-risk:after"))}__renderProcessorResponse(){var e;return s(f||(f=m` <div class="text-m text-tertiary" data-testid="processor-response"> ${0} ${0}​ ${0} </div> `),this.renderTemplateOrSlot("processor-response:before"),null===(e=this.data)||void 0===e?void 0:e.processor_response,this.renderTemplateOrSlot("processor-response:after"))}}customElements.define("foxy-payment-card",_);export{_ as PaymentCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-5784c088.js";import"./shared-b446c140.js";import"./shared-9048eeb2.js";import"./shared-799dc083.js";import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-2edcd981.js";import{l as e,u as t}from"./shared-d7be11de.js";import{u as s,h as i,c as a}from"./shared-7f33a83a.js";import{B as r}from"./shared-4c2e9064.js";import{C as n}from"./shared-5cf7b194.js";import"./foxy-nucleon-element.js";import{T as d,a as o}from"./shared-3b709ddc.js";import{c as l}from"./shared-4e709717.js";import{N as c}from"./shared-9b12aeac.js";import"./shared-e5239bec.js";import"./shared-eb8a0fdf.js";import"./shared-621b3283.js";import"./shared-35728235.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-d3bf9ac0.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";const m=s("\n repeating-radial-gradient(\n circle at -100% 500%,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.05) 4px\n )\n"),h=s(Object.entries({unknown:"#797c85",amex:"#2557d6",diners:"#0079be",discover:"#4d4d4d",jcb:"#0e4c96",maestro:"#181818",mastercard:"#16366f",unionpay:"#0dadb5",visa:"#0e4595"}).map((([e,t])=>`.bg-${e} { background: ${t} ${m} }`)).join(" "));let p,f,u,b,v,y,_,g=e=>e;const j=d(n(o(c,"payment-method-card")));class $ extends j{constructor(){super(...arguments),this.templates={},this.__renderActionsDelete=()=>i(p||(p=g` <div class="flex"> ${0} <vaadin-button class="px-xs rounded" theme="icon" style="--lumo-primary-text-color:#fff;--lumo-primary-color-50pct:rgba(255, 255, 255, 0.5);--lumo-contrast-5pct:rgba(255, 255, 255, 0.05)" aria-label="${0}" data-testid="actions:delete" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:delete"></iron-icon> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("actions:delete:before"),this.t("delete").toString(),this.disabledSelector.matches("actions:delete",!0),this.__handleDelete,this.renderTemplateOrSlot("actions:delete:after")),this.__renderActions=()=>i(f||(f=g` <div class="flex" data-testid="actions"> ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("actions:before"),this.hiddenSelector.matches("actions:delete",!0)?"":this.__renderActionsDelete(),this.renderTemplateOrSlot("actions:after"))}static get styles(){return[super.styles,h,a(u||(u=g`.ratio-card{padding-top:63%;position:relative;height:0}.ratio-card>*{position:absolute;top:0;right:0;bottom:0;left:0}`))]}render(){var s,a,n,d,o,c;const{data:m,lang:h,ns:p}=this;if(this.in({idle:"template"})||!(null==m?void 0:m.save_cc)||!this.in("idle")){const e=this.in("fail")?"error":this.in("busy")?"busy":"empty";return i(b||(b=g` <div class="ratio-card" aria-live="polite" aria-busy="${0}" data-testid="wrapper"> <div class="h-full bg-contrast-5"></div> <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),e,this.lang,p,null!==(a=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==a?a:"")}const f=null!==(d=null===(n=m.cc_type)||void 0===n?void 0:n.toLowerCase())&&void 0!==d?d:"unknown",u=null!==(o=e[f])&&void 0!==o?o:t,j=null===(c=m.cc_number_masked)||void 0===c?void 0:c.substring(m.cc_number_masked.length-4);return i(v||(v=g` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div class="ratio-card" data-testid="wrapper" aria-busy="${0}" aria-live="polite"> <div class="flex flex-col justify-between text-base text-m leading-m font-lumo p-m bg-unknown bg-${0}"> <div class="${0}"> ${0} <div class="ml-auto rounded h-m">${0}</div> </div> <div class="font-tnum leading-none flex justify-between"> <div data-testid="expiry"> ${0} </div> <div data-testid="number"> ${0} </div> </div> </div> </div> `),h,p,this.__handleConfirmHide,this.in("busy"),f,l({"flex items-start":!0,"justify-between":this.readonlyControls===r.False,"justify-end":this.readonlyControls===r.True}),this.hiddenSelector.matches("actions",!0)?"":this.__renderActions(),u,m.cc_exp_month&&m.cc_exp_year?i(y||(y=g` <span class="sr-only">${0} </span> <span>${0} / ${0}</span> `),this.t("expires").toString(),m.cc_exp_month,m.cc_exp_year):"",j?i(_||(_=g` <span class="sr-only">${0} </span> <span aria-hidden="true">••••</span> <span>${0}</span> `),this.t("last_4_digits").toString(),j):"")}async _sendDelete(){const e=JSON.stringify({save_cc:!1});await this._fetch(this.href,{method:"PATCH",body:e});return c.Rumour(this.group).share({data:null,source:this.href,related:[this.parent]}),null}__handleDelete(e){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}__handleConfirmHide(e){e.detail.cancelled||this.delete()}}customElements.define("foxy-payment-method-card",$);export{$ as PaymentMethodCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-2edcd981.js";import{_ as r}from"./shared-4c2e9064.js";import{a as e}from"./shared-3b709ddc.js";import{T as s}from"./shared-f0a9f3c2.js";import{h as t}from"./shared-7f33a83a.js";import"./shared-5784c088.js";import"./shared-e5239bec.js";import"./shared-b446c140.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-31d8e3b8.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";let a,i,o,d=r=>r;const m=e(s,"payments-api-fraud-protection-card");class l extends m{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return r(r({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var r,e;const s=super.renderBody({title:r=>t(a||(a=d`${0}`),r.helper.name),subtitle:r=>t(i||(i=d`${0}`),r.description)});if(!this.in({idle:"snapshot"}))return s;const m=l.defaultImageSrc,c=this.data;return t(o||(o=d` <figure class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1">${0}</figcaption> </figure> `),null!==(e=c?null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,c.type):null)&&void 0!==e?e:m,this.t("image_alt"),(r=>r.currentTarget.src=m),s)}}customElements.define("foxy-payments-api-fraud-protection-card",l);export{l as PaymentsApiFraudProtectionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-9048eeb2.js";import"./shared-8f922de8.js";import"./shared-5a889c45.js";import"./shared-0c0ee663.js";import"./shared-d90dbae7.js";import{I as e}from"./shared-e2e2ca6a.js";import"./foxy-nucleon-element.js";import"./shared-2edcd981.js";import{_ as t,aJ as r,Y as o}from"./shared-4c2e9064.js";import{a}from"./shared-3b709ddc.js";import{i}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";import{s as l}from"./shared-8a9c64b2.js";import{h as n}from"./shared-b7556b77.js";import"./shared-eb8a0fdf.js";import"./shared-e5239bec.js";import"./shared-ad80244a.js";import"./shared-7abbc95c.js";import"./shared-3f04e4cc.js";import"./shared-5784c088.js";import"./shared-ff7fd5fa.js";import"./shared-ba93be6b.js";import"./shared-f9180815.js";import"./shared-5cf7b194.js";import"./shared-fd96bcd1.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-343d1fd7.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-13fbea95.js";import"./shared-3c2414d4.js";import"./shared-ef7f2d07.js";import"./shared-fff03a45.js";import"./shared-799dc083.js";import"./shared-621b3283.js";import"./shared-4e709717.js";import"./foxy-spinner.js";import"./shared-b446c140.js";import"./shared-3bcc07cd.js";let d,c,h,p,f,u,m,v,b,_,g=e=>e;const j=a(e,"payments-api-fraud-protection-form");class x extends j{constructor(){super(...arguments),this.getImageSrc=null,this.templates={},this.__availableFraudProtectionsLoaderId="availableFraudProtections"}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",({score_threshold_reject:e})=>"number"!=typeof e||(e<=100&&e>=0||"score-threshold-reject:v8n_out_of_range"),e=>{var t,r,o,a;const i=null!==(o=null===(r=null===(t=e.helper)||void 0===t?void 0:t.json)||void 0===r?void 0:r.blocks)&&void 0!==o?o:[];let s;try{s=JSON.parse(null!==(a=e.json)&&void 0!==a?a:"{}")}catch(e){s={}}for(const e of i)for(const t of e.fields)if("optional"in t&&!t.optional){const r=[e.parent_id,e.id,t.id].filter((e=>!!e));if(!n(s,r)&&"checkbox"!==t.type)return"json:v8n_invalid"}return!0}]}renderBody(){return this.form.type?this.__renderFraudProtectionConfig(this.form.type):this.__renderFraudProtectionSelector()}get __availableFraudProtectionsLoader(){return this.renderRoot.querySelector(`#${this.__availableFraudProtectionsLoaderId}`)}get __availableFraudProtectionsHref(){try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}),t=new URL(this.href||this.parent).pathname,o=e.exec(t).groups.presetId;return new URL(`/payment_presets/${o}/available_fraud_protections`,this.href||this.parent).toString()}catch(e){}}get __availableFraudProtections(){var e,t;return null===(t=null===(e=this.__availableFraudProtectionsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}__renderFraudProtectionSelector(){var e;const t=x.defaultImageSrc;return s(d||(d=g` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-i18n class="block text-xxl font-medium border-b border-contrast-10 pb-m" infer="" key="select_protection_title"> </foxy-i18n> <div data-testid="select-protection-list"> <ul class="-my-s grid grid-cols-1"> ${0} </ul> </div> `),i(this.__availableFraudProtectionsHref),this.__availableFraudProtectionsLoaderId,(()=>this.requestUpdate()),Object.entries(null!==(e=this.__availableFraudProtections)&&void 0!==e?e:{}).map((([e,r])=>{var o,a;return s(c||(c=g` <li class="-mx-s"> <button class="w-full block text-left hover-bg-contrast-5 p-s rounded" @click="${0}"> <figure class="flex items-center gap-m h-m"> <img class="relative h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="min-w-0 flex-1 truncate leading-s font-medium"> ${0}​ </figcaption> </figure> </button> </li> `),(()=>this.edit({type:e,helper:r})),null!==(a=null===(o=this.getImageSrc)||void 0===o?void 0:o.call(this,e))&&void 0!==a?a:t,(e=>{e.currentTarget.src=t}),r.name)})))}__renderFraudProtectionConfig(e){var t,r,o,a,i,l,n,d;const c=x.defaultImageSrc;return s(h||(h=g` <figure data-testid="logo" class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-medium text-xl text-center"> ${0}​ </figcaption> </figure> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} ${0} ${0} `),null!==(r=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,e))&&void 0!==r?r:c,(e=>e.currentTarget.src=c),null!==(a=null===(o=this.form.helper)||void 0===o?void 0:o.name)&&void 0!==a?a:this.form.type,(null===(i=this.form.helper)||void 0===i?void 0:i.uses_rejection_threshold)?s(p||(p=g` <foxy-internal-integer-control infer="score-threshold-reject"> </foxy-internal-integer-control> `)):"",null===(n=null===(l=this.form.helper)||void 0===l?void 0:l.json)||void 0===n?void 0:n.blocks.map((e=>this.__renderBlock(e))),(null===(d=this.data)||void 0===d?void 0:d.type)?"":s(f||(f=g` <vaadin-button data-testid="select-another-button" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),super.renderBody())}__renderBlock(e){return s(u||(u=g`${0}`),e.fields.map((t=>{var r,a,i,n,d,c;const h=()=>{var r,a;let i;try{i=JSON.parse(null!==(r=this.form.json)&&void 0!==r?r:"")}catch(e){i={}}const s=[e.parent_id,e.id,t.id].filter((e=>!!e));return null!==(a=o(i,s))&&void 0!==a?a:i.default_value},p=r=>{var o;let a;try{a=JSON.parse(null!==(o=this.form.json)&&void 0!==o?o:"")}catch(e){a={}}const i=[e.parent_id,e.id,t.id].filter((e=>!!e));this.edit({json:JSON.stringify(l(a,i,r))})},f=t.options,u=["json",...[e.parent_id,e.id,t.id].filter((e=>!!e))].join("-").replace(/_/g,"-");return s(m||(m=g` ${0} `),"checkbox"===t.type?s(v||(v=g` <foxy-internal-checkbox-group-control helper-text="${0}" label="" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(r=t.description)&&void 0!==r?r:"",u,[{label:t.name,value:"checked"}],(()=>h()?["checked"]:[]),(e=>p(e.includes("checked")))):"select"===t.type?s(b||(b=g` <foxy-internal-select-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(a=t.description)&&void 0!==a?a:"",null!==(d=null===(n=null===(i=t.options)||void 0===i?void 0:i.find((e=>e.value===t.default_value)))||void 0===n?void 0:n.name)&&void 0!==d?d:this.t("default_additional_field_placeholder"),t.name,u,f.map((({name:e,value:t})=>({label:e,value:t}))),h,p):s(_||(_=g` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(c=t.description)&&void 0!==c?c:"",t.default_value||this.t("default_additional_field_placeholder"),t.name,u,h,p))})))}}customElements.define("foxy-payments-api-fraud-protection-form",x);export{x as PaymentsApiFraudProtectionForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-2edcd981.js";import{_ as e}from"./shared-4c2e9064.js";import{a as r}from"./shared-3b709ddc.js";import{T as s}from"./shared-f0a9f3c2.js";import{h as t}from"./shared-7f33a83a.js";import"./shared-5784c088.js";import"./shared-e5239bec.js";import"./shared-b446c140.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-31d8e3b8.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-4e709717.js";let a,i,o,d=e=>e;const m=r(s,"payments-api-payment-method-card");class l extends m{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return e(e({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var e,r;const s=super.renderBody({title:e=>t(a||(a=d`${0}`),e.helper.name),subtitle:e=>t(i||(i=d`${0}`),e.description)});if(!this.in({idle:"snapshot"}))return s;const m=l.defaultImageSrc,p=this.data;return t(o||(o=d` <figure class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1">${0}</figcaption> </figure> `),null!==(r=p?null===(e=this.getImageSrc)||void 0===e?void 0:e.call(this,p.type):null)&&void 0!==r?r:m,this.t("image_alt"),(e=>e.currentTarget.src=m),s)}}customElements.define("foxy-payments-api-payment-method-card",l);export{l as PaymentsApiPaymentMethodCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-9bdd5400.js";import"./shared-bf2113a4.js";import"./shared-3164d0c3.js";import"./shared-fa5f0117.js";import"./shared-eb232194.js";import"./shared-8465a37a.js";import"./shared-897ab5e6.js";import{I as e}from"./shared-b334c8b6.js";import"./foxy-nucleon-element.js";import"./shared-46f3f71c.js";import{_ as t,aJ as r,Y as i}from"./shared-0dabe195.js";import{a as o}from"./shared-a88c5cf1.js";import{i as a}from"./shared-d3bf9ac0.js";import{c as l}from"./shared-4e709717.js";import{h as s}from"./shared-7f33a83a.js";import{h as n}from"./shared-fc77174e.js";import{s as d}from"./shared-1b2e0709.js";import"./shared-4bd1efd7.js";import"./shared-a7475f62.js";import"./shared-2fa6a5a0.js";import"./shared-f4822b9e.js";import"./shared-c97f7178.js";import"./shared-6b0498b2.js";import"./shared-c541c9e9.js";import"./shared-0689b25a.js";import"./shared-a134d313.js";import"./shared-91eb066c.js";import"./shared-f9180815.js";import"./shared-1fd59009.js";import"./shared-763a6797.js";import"./shared-a6517170.js";import"./shared-bbbb8894.js";import"./shared-343d1fd7.js";import"./shared-3ab0306f.js";import"./shared-8528906b.js";import"./shared-403af08d.js";import"./shared-8128b5e3.js";import"./shared-c758220c.js";import"./foxy-spinner.js";import"./shared-6dffe67d.js";import"./shared-53532131.js";let c,h,p,f,u,m,_,v,y,b,g,x,$,j,k,S,V,M,w=e=>e;const L=o(e,"payments-api-payment-method-form");class P extends L{constructor(){super(...arguments),this.getImageSrc=null,this.templates={},this.__availablePaymentMethodsLoaderId="availablePaymentMethodsLoader",this.__threeDSecureResponseGetValue=()=>{var e;return(null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response"))?["valid_only"]:[]},this.__threeDSecureResponseSetValue=e=>{const t=e.includes("valid_only")?"_require_valid_response":"",r=this.form.config_3d_secure,i=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${i}${t}`})},this.__threeDSecureResponseOptions=[{value:"valid_only",label:"option_valid_only"}],this.__threeDSecureToggleGetValue=()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"},this.__threeDSecureToggleSetValue=e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})},this.__threeDSecureToggleOptions=[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.__tab=0}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{__tab:{attribute:!1},getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,i,o;const a=null!==(i=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==i?i:[];let l;try{l=JSON.parse(null!==(o=e.additional_fields)&&void 0!==o?o:"{}")}catch(e){l={}}for(const e of a)for(const t of e.fields)if("optional"in t&&!t.optional){const r=[e.parent_id,e.id,t.id].filter((e=>!!e));if(!n(l,r)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid"}return!0}]}renderBody(){return this.form.type?this.__renderPaymentMethodConfig(this.form.type):this.__renderPaymentMethodSelector()}get __groupedAvailablePaymentMethods(){var e;return Object.entries(null!==(e=this.__availablePaymentMethods)&&void 0!==e?e:{}).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{const i=t.charAt(0).toUpperCase(),o=!/\w/.test(i)?"#":i,a=e.find((e=>e.name===o));return a?a.items.push({type:t,helper:r}):e.push({name:o,items:[{type:t,helper:r}]}),e}),[])}get __availablePaymentMethodsLoader(){return this.renderRoot.querySelector(`#${this.__availablePaymentMethodsLoaderId}`)}get __availablePaymentMethodsHref(){try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}),t=new URL(this.href||this.parent).pathname,i=e.exec(t).groups.presetId;return new URL(`/payment_presets/${i}/available_payment_methods`,this.href||this.parent).toString()}catch(e){}}get __availablePaymentMethods(){var e,t;return null===(t=null===(e=this.__availablePaymentMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderPaymentMethodSelector(){return s(c||(c=w` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-i18n class="block text-xxl font-medium border-b border-contrast-10 pb-m" infer="" key="select_method_title"> </foxy-i18n> <section data-testid="select-method-list"> <div class="-my-s"> ${0} </div> </section> `),a(this.__availablePaymentMethodsHref),this.__availablePaymentMethodsLoaderId,(()=>this.requestUpdate()),this.__groupedAvailablePaymentMethods.map((({name:e,items:t})=>s(h||(h=w` <p class="w-m text-center font-medium text-tertiary py-s">${0}</p> <ul class="grid grid-cols-1"> ${0} </ul> `),e,t.map((e=>s(p||(p=w`<li>${0}</li>`),this.__renderPaymentMethodButton(e))))))))}__renderPaymentMethodConfig(e){var t,r,i,o,a,n;const d=P.defaultImageSrc;return s(f||(f=w` <figure data-testid="logo" class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-medium text-xl text-center"> ${0}​ </figcaption> </figure> <div class="rounded border border-contrast-10"> <vaadin-tabs selected="${0}" theme="centered" @selected-changed="${0}"> <vaadin-tab><foxy-i18n infer="" key="tab_live"></foxy-i18n></vaadin-tab> <vaadin-tab><foxy-i18n infer="" key="tab_test"></foxy-i18n></vaadin-tab> </vaadin-tabs> <div class="overflow-hidden" style="--lumo-border-radius:var(--lumo-border-radius-s)"> <div data-testid="tab-content" class="grid grid-cols-2 gap-m transition-transform transform duration-300" style="${0}"> ${0} </div> </div> </div> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} ${0} `),null!==(r=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,e))&&void 0!==r?r:d,(e=>e.currentTarget.src=d),null!==(o=null===(i=this.form.helper)||void 0===i?void 0:i.name)&&void 0!==o?o:this.form.type,this.__tab,(e=>{var t;const r=e.currentTarget;this.__tab=null!==(t=r.selected)&&void 0!==t?t:0}),l({"width: calc(200% + var(--lumo-space-m));":!0,"--tw-translate-x: 0;":0===this.__tab,"--tw-translate-x: calc(-50% - (var(--lumo-space-m) / 2));":0!==this.__tab}),["live","test"].map(((e,t)=>{var r,i,o;const a=0===t?"":`-${e}`,n=0===t?this.__liveBlocks:this.__testBlocks;return s(u||(u=w` <div class="${0}"> ${0} ${0} ${0} ${0} </div> `),l({"grid grid-cols-1 gap-m p-m transition-opacity duration-300":!0,"opacity-100":this.__tab===t,"opacity-0":this.__tab!==t}),(null===(r=this.form.helper)||void 0===r?void 0:r.id_description)?s(m||(m=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description,a):"",(null===(i=this.form.helper)||void 0===i?void 0:i.third_party_key_description)?s(_||(_=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}third-party-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description,a):"",(null===(o=this.form.helper)||void 0===o?void 0:o.key_description)?s(v||(v=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description,a):"",n.map((e=>this.__renderBlock(e))))})),(null===(a=this.form.helper)||void 0===a?void 0:a.supports_3d_secure)?s(y||(y=w` <foxy-internal-radio-group-control infer="three-d-secure-toggle" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> ${0} `),this.__threeDSecureToggleGetValue,this.__threeDSecureToggleSetValue,this.__threeDSecureToggleOptions,this.form.config_3d_secure?s(b||(b=w` <foxy-internal-checkbox-group-control infer="three-d-secure-response" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__threeDSecureResponseGetValue,this.__threeDSecureResponseSetValue,this.__threeDSecureResponseOptions):""):"",(null===(n=this.data)||void 0===n?void 0:n.type)?"":s(g||(g=w` <vaadin-button data-testid="select-another-button" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),super.renderBody())}__renderPaymentMethodButton({type:e,helper:t}){var r,i;const o=P.defaultImageSrc;return s(x||(x=w` <button class="${0}" ?disabled="${0}" @click="${0}"> <figure class="flex items-center gap-m h-m"> <img class="relative h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="${0}"> <div class="font-medium">${0}​</div> ${0} </figcaption> </figure> </button> `),l({"w-full block text-left p-s rounded -mx-s":!0,"transition-colors hover-bg-contrast-5":!t.conflict,"cursor-default":!!t.conflict}),!!t.conflict,(()=>this.edit({type:e,helper:t})),null!==(i=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==i?i:o,(e=>e.currentTarget.src=o),l({"min-w-0 flex-1 truncate leading-s":!0,"text-tertiary":!!t.conflict}),t.name,t.conflict?s($||($=w` <foxy-i18n class="block text-tertiary text-xs" infer="" key="conflict_message" .options="${0}"> </foxy-i18n> `),t.conflict):"")}__renderBlock(e){return s(j||(j=w`${0}`),e.fields.map((t=>{var r,o,a;const l=[e.parent_id,e.id,t.id].filter((e=>!!e)),n=["additional-fields",...l].join("-").replace(/_/g,"-"),c=()=>{var e,r;try{const t=JSON.parse(null!==(e=this.form.additional_fields)&&void 0!==e?e:"{}");return null!==(r=i(t,l))&&void 0!==r?r:t.default_value}catch(e){return t.default_value}},h=e=>{var t;try{const r=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");this.edit({additional_fields:JSON.stringify(d(r,l,e))})}catch(e){return""}},p=t.options;return s(k||(k=w` ${0} `),"checkbox"===t.type?s(S||(S=w` <foxy-internal-checkbox-group-control helper-text="${0}" label="" class="-mb-s" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(r=t.description)&&void 0!==r?r:"",n,[{label:t.name,value:"checked"}],(()=>c()?["checked"]:[]),(e=>{h(e.includes("checked"))})):"select"===t.type?s(V||(V=w` <foxy-internal-select-control helper-text="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(o=t.description)&&void 0!==o?o:"",t.name,n,p.map((({name:e,value:t})=>({label:e,value:t}))),c,h):s(M||(M=w` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(a=t.description)&&void 0!==a?a:"",t.default_value||this.t("default_additional_field_placeholder"),t.name,n,c,h))})))}}customElements.define("foxy-payments-api-payment-method-form",P);export{P as PaymentsApiPaymentMethodForm};
|
|
1
|
+
import"./shared-9048eeb2.js";import"./shared-fd40a40c.js";import"./shared-c839e147.js";import"./shared-8f922de8.js";import"./shared-b87d1af0.js";import"./shared-0c0ee663.js";import"./shared-d90dbae7.js";import{I as e}from"./shared-e2e2ca6a.js";import"./foxy-nucleon-element.js";import"./shared-2edcd981.js";import{_ as t,aJ as r,Y as i}from"./shared-4c2e9064.js";import{a as o}from"./shared-3b709ddc.js";import{i as a}from"./shared-d3bf9ac0.js";import{c as l}from"./shared-4e709717.js";import{h as s}from"./shared-7f33a83a.js";import{h as n}from"./shared-b7556b77.js";import{s as d}from"./shared-8a9c64b2.js";import"./shared-eb8a0fdf.js";import"./shared-e5239bec.js";import"./shared-3f04e4cc.js";import"./shared-f5bbb1e0.js";import"./shared-5784c088.js";import"./shared-fff03a45.js";import"./shared-ef7f2d07.js";import"./shared-7abbc95c.js";import"./shared-ff7fd5fa.js";import"./shared-ba93be6b.js";import"./shared-f9180815.js";import"./shared-5cf7b194.js";import"./shared-fd96bcd1.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-343d1fd7.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-ad80244a.js";import"./shared-799dc083.js";import"./shared-621b3283.js";import"./foxy-spinner.js";import"./shared-b446c140.js";import"./shared-3bcc07cd.js";let c,h,p,f,u,m,_,v,y,b,g,x,$,j,k,S,V,M,w=e=>e;const L=o(e,"payments-api-payment-method-form");class P extends L{constructor(){super(...arguments),this.getImageSrc=null,this.templates={},this.__availablePaymentMethodsLoaderId="availablePaymentMethodsLoader",this.__threeDSecureResponseGetValue=()=>{var e;return(null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response"))?["valid_only"]:[]},this.__threeDSecureResponseSetValue=e=>{const t=e.includes("valid_only")?"_require_valid_response":"",r=this.form.config_3d_secure,i=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${i}${t}`})},this.__threeDSecureResponseOptions=[{value:"valid_only",label:"option_valid_only"}],this.__threeDSecureToggleGetValue=()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"},this.__threeDSecureToggleSetValue=e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})},this.__threeDSecureToggleOptions=[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.__tab=0}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{__tab:{attribute:!1},getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,i,o;const a=null!==(i=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==i?i:[];let l;try{l=JSON.parse(null!==(o=e.additional_fields)&&void 0!==o?o:"{}")}catch(e){l={}}for(const e of a)for(const t of e.fields)if("optional"in t&&!t.optional){const r=[e.parent_id,e.id,t.id].filter((e=>!!e));if(!n(l,r)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid"}return!0}]}renderBody(){return this.form.type?this.__renderPaymentMethodConfig(this.form.type):this.__renderPaymentMethodSelector()}get __groupedAvailablePaymentMethods(){var e;return Object.entries(null!==(e=this.__availablePaymentMethods)&&void 0!==e?e:{}).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{const i=t.charAt(0).toUpperCase(),o=!/\w/.test(i)?"#":i,a=e.find((e=>e.name===o));return a?a.items.push({type:t,helper:r}):e.push({name:o,items:[{type:t,helper:r}]}),e}),[])}get __availablePaymentMethodsLoader(){return this.renderRoot.querySelector(`#${this.__availablePaymentMethodsLoaderId}`)}get __availablePaymentMethodsHref(){try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}),t=new URL(this.href||this.parent).pathname,i=e.exec(t).groups.presetId;return new URL(`/payment_presets/${i}/available_payment_methods`,this.href||this.parent).toString()}catch(e){}}get __availablePaymentMethods(){var e,t;return null===(t=null===(e=this.__availablePaymentMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderPaymentMethodSelector(){return s(c||(c=w` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-i18n class="block text-xxl font-medium border-b border-contrast-10 pb-m" infer="" key="select_method_title"> </foxy-i18n> <section data-testid="select-method-list"> <div class="-my-s"> ${0} </div> </section> `),a(this.__availablePaymentMethodsHref),this.__availablePaymentMethodsLoaderId,(()=>this.requestUpdate()),this.__groupedAvailablePaymentMethods.map((({name:e,items:t})=>s(h||(h=w` <p class="w-m text-center font-medium text-tertiary py-s">${0}</p> <ul class="grid grid-cols-1"> ${0} </ul> `),e,t.map((e=>s(p||(p=w`<li>${0}</li>`),this.__renderPaymentMethodButton(e))))))))}__renderPaymentMethodConfig(e){var t,r,i,o,a,n;const d=P.defaultImageSrc;return s(f||(f=w` <figure data-testid="logo" class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-medium text-xl text-center"> ${0}​ </figcaption> </figure> <div class="rounded border border-contrast-10"> <vaadin-tabs selected="${0}" theme="centered" @selected-changed="${0}"> <vaadin-tab><foxy-i18n infer="" key="tab_live"></foxy-i18n></vaadin-tab> <vaadin-tab><foxy-i18n infer="" key="tab_test"></foxy-i18n></vaadin-tab> </vaadin-tabs> <div class="overflow-hidden" style="--lumo-border-radius:var(--lumo-border-radius-s)"> <div data-testid="tab-content" class="grid grid-cols-2 gap-m transition-transform transform duration-300" style="${0}"> ${0} </div> </div> </div> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} ${0} `),null!==(r=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,e))&&void 0!==r?r:d,(e=>e.currentTarget.src=d),null!==(o=null===(i=this.form.helper)||void 0===i?void 0:i.name)&&void 0!==o?o:this.form.type,this.__tab,(e=>{var t;const r=e.currentTarget;this.__tab=null!==(t=r.selected)&&void 0!==t?t:0}),l({"width: calc(200% + var(--lumo-space-m));":!0,"--tw-translate-x: 0;":0===this.__tab,"--tw-translate-x: calc(-50% - (var(--lumo-space-m) / 2));":0!==this.__tab}),["live","test"].map(((e,t)=>{var r,i,o;const a=0===t?"":`-${e}`,n=0===t?this.__liveBlocks:this.__testBlocks;return s(u||(u=w` <div class="${0}"> ${0} ${0} ${0} ${0} </div> `),l({"grid grid-cols-1 gap-m p-m transition-opacity duration-300":!0,"opacity-100":this.__tab===t,"opacity-0":this.__tab!==t}),(null===(r=this.form.helper)||void 0===r?void 0:r.id_description)?s(m||(m=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description,a):"",(null===(i=this.form.helper)||void 0===i?void 0:i.third_party_key_description)?s(_||(_=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}third-party-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description,a):"",(null===(o=this.form.helper)||void 0===o?void 0:o.key_description)?s(v||(v=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description,a):"",n.map((e=>this.__renderBlock(e))))})),(null===(a=this.form.helper)||void 0===a?void 0:a.supports_3d_secure)?s(y||(y=w` <foxy-internal-radio-group-control infer="three-d-secure-toggle" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> ${0} `),this.__threeDSecureToggleGetValue,this.__threeDSecureToggleSetValue,this.__threeDSecureToggleOptions,this.form.config_3d_secure?s(b||(b=w` <foxy-internal-checkbox-group-control infer="three-d-secure-response" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__threeDSecureResponseGetValue,this.__threeDSecureResponseSetValue,this.__threeDSecureResponseOptions):""):"",(null===(n=this.data)||void 0===n?void 0:n.type)?"":s(g||(g=w` <vaadin-button data-testid="select-another-button" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),super.renderBody())}__renderPaymentMethodButton({type:e,helper:t}){var r,i;const o=P.defaultImageSrc;return s(x||(x=w` <button class="${0}" ?disabled="${0}" @click="${0}"> <figure class="flex items-center gap-m h-m"> <img class="relative h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="${0}"> <div class="font-medium">${0}​</div> ${0} </figcaption> </figure> </button> `),l({"w-full block text-left p-s rounded -mx-s":!0,"transition-colors hover-bg-contrast-5":!t.conflict,"cursor-default":!!t.conflict}),!!t.conflict,(()=>this.edit({type:e,helper:t})),null!==(i=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==i?i:o,(e=>e.currentTarget.src=o),l({"min-w-0 flex-1 truncate leading-s":!0,"text-tertiary":!!t.conflict}),t.name,t.conflict?s($||($=w` <foxy-i18n class="block text-tertiary text-xs" infer="" key="conflict_message" .options="${0}"> </foxy-i18n> `),t.conflict):"")}__renderBlock(e){return s(j||(j=w`${0}`),e.fields.map((t=>{var r,o,a;const l=[e.parent_id,e.id,t.id].filter((e=>!!e)),n=["additional-fields",...l].join("-").replace(/_/g,"-"),c=()=>{var e,r;try{const t=JSON.parse(null!==(e=this.form.additional_fields)&&void 0!==e?e:"{}");return null!==(r=i(t,l))&&void 0!==r?r:t.default_value}catch(e){return t.default_value}},h=e=>{var t;try{const r=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");this.edit({additional_fields:JSON.stringify(d(r,l,e))})}catch(e){return""}},p=t.options;return s(k||(k=w` ${0} `),"checkbox"===t.type?s(S||(S=w` <foxy-internal-checkbox-group-control helper-text="${0}" label="" class="-mb-s" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(r=t.description)&&void 0!==r?r:"",n,[{label:t.name,value:"checked"}],(()=>c()?["checked"]:[]),(e=>{h(e.includes("checked"))})):"select"===t.type?s(V||(V=w` <foxy-internal-select-control helper-text="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(o=t.description)&&void 0!==o?o:"",t.name,n,p.map((({name:e,value:t})=>({label:e,value:t}))),c,h):s(M||(M=w` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(a=t.description)&&void 0!==a?a:"",t.default_value||this.t("default_additional_field_placeholder"),t.name,n,c,h))})))}}customElements.define("foxy-payments-api-payment-method-form",P);export{P as PaymentsApiPaymentMethodForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-f9180815.js";import"./foxy-spinner.js";import"./shared-2edcd981.js";import{a as s}from"./shared-3b709ddc.js";import{T as e}from"./shared-f0a9f3c2.js";import{c as r}from"./shared-4e709717.js";import{h as t}from"./shared-7f33a83a.js";import"./shared-5784c088.js";import"./shared-e5239bec.js";import"./shared-b446c140.js";import"./shared-4c2e9064.js";import"./shared-fd96bcd1.js";import"./shared-343d1fd7.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-31d8e3b8.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";let a,d,i=s=>s;const o=s(e,"payments-api-payment-preset-card");class p extends o{renderBody(){return super.renderBody({title:s=>t(a||(a=i`${0}`),s.description),subtitle:({is_live:s})=>t(d||(d=i` <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> `),r({"text-success":s}),s?"live":"test")})}}customElements.define("foxy-payments-api-payment-preset-card",p);export{p as PaymentsApiPaymentPresetCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-8f922de8.js";import"./shared-5103c1b4.js";import"./shared-d90dbae7.js";import{I as e}from"./shared-e2e2ca6a.js";import"./foxy-payments-api-fraud-protection-card.js";import"./foxy-payments-api-fraud-protection-form.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import{_ as t}from"./shared-4c2e9064.js";import{a as r}from"./shared-3b709ddc.js";import{h as a}from"./shared-7f33a83a.js";import"./shared-ad80244a.js";import"./shared-eb8a0fdf.js";import"./shared-e5239bec.js";import"./shared-7abbc95c.js";import"./shared-3f04e4cc.js";import"./shared-5784c088.js";import"./shared-ff7fd5fa.js";import"./shared-ba93be6b.js";import"./shared-f9180815.js";import"./shared-2edcd981.js";import"./shared-343d1fd7.js";import"./shared-fd96bcd1.js";import"./shared-5cf7b194.js";import"./shared-d3bf9ac0.js";import"./shared-9b12aeac.js";import"./shared-35728235.js";import"./shared-3ab0306f.js";import"./shared-e8a51c60.js";import"./shared-9048eeb2.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-b446c140.js";import"./shared-d519a301.js";import"./shared-11c2efc8.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-799dc083.js";import"./shared-621b3283.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-f0a9f3c2.js";import"./shared-31d8e3b8.js";import"./shared-5a889c45.js";import"./shared-13fbea95.js";import"./shared-3c2414d4.js";import"./shared-0c0ee663.js";import"./shared-ef7f2d07.js";import"./shared-fff03a45.js";import"./foxy-nucleon-element.js";import"./shared-8a9c64b2.js";import"./shared-3bcc07cd.js";import"./shared-b7556b77.js";import"./shared-fd40a40c.js";import"./shared-f5bbb1e0.js";import"./shared-c839e147.js";import"./shared-b87d1af0.js";let s,o,i,p,n,d,m=e=>e;const c=r(e,"payments-api-payment-preset-form");class f extends c{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.templates={},this.__getIsPOEnabledValue=()=>this.form.is_purchase_order_enabled?["true"]:[],this.__setIsPOEnabledValue=e=>{this.edit({is_purchase_order_enabled:e.includes("true")})},this.__getIsLiveValue=()=>this.form.is_live?["live"]:["test"],this.__setIsLiveValue=e=>{this.edit({is_live:e.includes("live")})}}static get properties(){return t(t({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>e&&e.length<=100||"description:v8n_too_long"]}renderBody(){const e=this.constructor;return a(s||(s=m` <foxy-internal-text-control infer="description"></foxy-internal-text-control> <div class="-mb-s"> <foxy-internal-checkbox-group-control infer="is-live" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="is-purchase-order-enabled" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} ${0} `),this.__getIsLiveValue,this.__setIsLiveValue,e.__isLiveOptions,this.__getIsPOEnabledValue,this.__setIsPOEnabledValue,e.__isPOEnabledOptions,this.data?a(o||(o=m` <foxy-internal-async-list-control infer="payment-methods" first="${0}" limit="5" .item="${0}" .form="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="fraud-protections" first="${0}" limit="5" .item="${0}" .form="${0}"> </foxy-internal-async-list-control> `),this.data._links["fx:payment_methods"].href,(e=>a(i||(i=m` <foxy-payments-api-payment-method-card parent="${0}" infer="payments-api-payment-method-card" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-payment-method-card> `),e.parent,e.href,this.getPaymentMethodImageSrc)),(e=>a(p||(p=m` <foxy-payments-api-payment-method-form parent="${0}" infer="payments-api-payment-method-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-payment-method-form> `),e.dialog.parent,e.dialog.href,this.getPaymentMethodImageSrc,e.handleFetch,e.handleUpdate)),this.data._links["fx:fraud_protections"].href,(e=>a(n||(n=m` <foxy-payments-api-fraud-protection-card parent="${0}" infer="payments-api-fraud-protection-card" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-fraud-protection-card> `),e.parent,e.href,this.getFraudProtectionImageSrc)),(e=>a(d||(d=m` <foxy-payments-api-fraud-protection-form parent="${0}" infer="payments-api-fraud-protection-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-fraud-protection-form> `),e.dialog.parent,e.dialog.href,this.getFraudProtectionImageSrc,e.handleFetch,e.handleUpdate))):"",super.renderBody())}}f.__isPOEnabledOptions=[{label:"option_true",value:"true"}],f.__isLiveOptions=[{label:"option_live",value:"live"}],customElements.define("foxy-payments-api-payment-preset-form",f);export{f as PaymentsApiPaymentPresetForm};
|