@foxy.io/elements 1.36.0-beta.2 → 1.36.0-beta.4

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.
Files changed (59) hide show
  1. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  2. package/dist/cdn/foxy-cart-form.js +1 -1
  3. package/dist/cdn/foxy-customer-api.js +1 -1
  4. package/dist/cdn/foxy-customer-form.js +1 -1
  5. package/dist/cdn/foxy-customer-portal.js +27 -13
  6. package/dist/cdn/foxy-customer.js +1 -1
  7. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  8. package/dist/cdn/foxy-payment-method-card.js +1 -1
  9. package/dist/cdn/foxy-payments-api.js +1 -1
  10. package/dist/cdn/foxy-subscription-form.js +1 -1
  11. package/dist/cdn/foxy-transaction.js +1 -1
  12. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  13. package/dist/cdn/shared-231687fd.js +1 -0
  14. package/dist/cdn/{shared-5a9e9e89.js → shared-82e82908.js} +1 -1
  15. package/dist/cdn/shared-9ca85d1e.js +1 -0
  16. package/dist/cdn/translations/customer-portal/de.json +18 -0
  17. package/dist/cdn/translations/customer-portal/en.json +18 -0
  18. package/dist/cdn/translations/customer-portal/es.json +18 -0
  19. package/dist/cdn/translations/customer-portal/fr.json +18 -0
  20. package/dist/cdn/translations/customer-portal/nl.json +18 -0
  21. package/dist/cdn/translations/customer-portal/pl.json +18 -0
  22. package/dist/cdn/translations/customer-portal/sv.json +18 -0
  23. package/dist/cdn/translations/customer-portal/zh-hk.json +18 -0
  24. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +3 -7
  25. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  26. package/dist/elements/public/CartForm/types.d.ts +1 -9
  27. package/dist/elements/public/CartForm/types.js.map +1 -1
  28. package/dist/elements/public/CustomerPortal/CustomerPortal.d.ts +4 -0
  29. package/dist/elements/public/CustomerPortal/CustomerPortal.js +48 -13
  30. package/dist/elements/public/CustomerPortal/CustomerPortal.js.map +1 -1
  31. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +7 -1
  32. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
  33. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.d.ts +25 -0
  34. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js +72 -0
  35. package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js.map +1 -0
  36. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +1 -1
  37. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  38. package/dist/elements/public/CustomerPortal/index.d.ts +2 -0
  39. package/dist/elements/public/CustomerPortal/index.js +4 -0
  40. package/dist/elements/public/CustomerPortal/index.js.map +1 -1
  41. package/dist/elements/public/EmailTemplateForm/types.d.ts +1 -3
  42. package/dist/elements/public/EmailTemplateForm/types.js.map +1 -1
  43. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js +7 -7
  44. package/dist/elements/public/PaymentsApi/api/composers/available_fraud_protections.js.map +1 -1
  45. package/dist/elements/public/StoreForm/types.d.ts +4 -38
  46. package/dist/elements/public/StoreForm/types.js.map +1 -1
  47. package/dist/elements/public/SubscriptionSettingsForm/types.d.ts +1 -3
  48. package/dist/elements/public/SubscriptionSettingsForm/types.js.map +1 -1
  49. package/dist/elements/public/Transaction/Transaction.js +13 -17
  50. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  51. package/dist/elements/public/UserCard/UserCard.js +0 -2
  52. package/dist/elements/public/UserCard/UserCard.js.map +1 -1
  53. package/dist/elements/public/UserInvitationCard/types.d.ts +3 -1
  54. package/dist/elements/public/UserInvitationCard/types.js +1 -1
  55. package/dist/elements/public/UserInvitationCard/types.js.map +1 -1
  56. package/dist/elements/public/UserInvitationForm/types.d.ts +2 -41
  57. package/dist/elements/public/UserInvitationForm/types.js.map +1 -1
  58. package/package.json +3 -3
  59. package/dist/cdn/shared-0e156ee7.js +0 -1
@@ -1 +1 @@
1
- import"./shared-7ce74b42.js";import"./shared-43e551f2.js";import"./shared-528b3bdb.js";import"./shared-22dd6cbe.js";import{b as r,I as o}from"./shared-d784b79a.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-transaction.js";import"./shared-4e8a5b95.js";import{_ as t,B as e}from"./shared-d1195c27.js";import{i as s}from"./shared-53e42a77.js";import{h as a,s as i}from"./shared-ba5c42c7.js";import{a as n}from"./shared-f72d82a9.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-01bb183b.js";import"./shared-c1ade7a9.js";import"./shared-0b00883f.js";import"./shared-0b1b1c14.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5f43aa36.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-d279baa5.js";import"./shared-fea2714e.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-e0d1856d.js";import"./shared-4cf87721.js";import"./shared-10b54c49.js";import"./shared-6d11190a.js";import"./shared-651c44fa.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-e622d8cf.js";import"./shared-60150977.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-bab2ea2c.js";import"./shared-1c07cd7f.js";import"./shared-93774efe.js";import"./shared-c5cf889e.js";import"./shared-8676e5c0.js";import"./foxy-billing-address-card.js";import"./foxy-custom-field-form.js";import"./shared-0053cf93.js";import"./foxy-custom-field-card.js";import"./shared-25893d83.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-641786b2.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./shared-901b41cf.js";import"./shared-f20eefdd.js";import"./shared-42bb9e8e.js";import"./shared-cf28d2c8.js";import"./shared-133fc37b.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./shared-9d7ae4aa.js";import"./foxy-item-form.js";import"./shared-2d11750b.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./shared-8521017c.js";import"./foxy-customer-card.js";let d,m=r=>r;customElements.define("foxy-internal-admin-subscription-form-load-in-cart-action",class extends r{constructor(){super(...arguments),this.action=null}static get properties(){return t(t({},super.properties),{},{action:{}})}renderControl(){var r,o;const t=this.nucleon;let e;try{const s=new URL(null!==(o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r._links["fx:sub_token_url"].href)&&void 0!==o?o:"");"cancel"===this.action&&s.searchParams.set("sub_cancel","true"),e=s.toString()}catch(r){e=void 0}return a(d||(d=m` <a target="_blank" class="rounded font-medium text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="caption"> </foxy-i18n> </a> `),s(e))}});let c,f,l=r=>r;customElements.define("foxy-internal-admin-subscription-form-error",class extends r{renderControl(){var r,o;return a(c||(c=l` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),i(f||(f=l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(o=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===o?void 0:o.error_message)}});let p,h,u=r=>r;const j=n(o,"admin-subscription-form");class y extends j{get hiddenSelector(){var r,o;const t=["delete",super.hiddenSelector.toString()];return(null===(r=this.data)||void 0===r?void 0:r.error_message)||t.unshift("error-message"),(null===(o=this.data)||void 0===o?void 0:o.is_active)||t.unshift("view-action","cancel-action"),new e(t.join(" ").trim())}get headerSubtitleOptions(){var r;return{context:(null===(r=this.data)||void 0===r?void 0:r.is_active)?"active":"inactive"}}renderHeaderActions(r){return a(p||(p=u` <foxy-internal-admin-subscription-form-load-in-cart-action infer="view-action"> </foxy-internal-admin-subscription-form-load-in-cart-action> <foxy-internal-admin-subscription-form-load-in-cart-action action="cancel" infer="cancel-action"> </foxy-internal-admin-subscription-form-load-in-cart-action> `))}renderBody(){var r,o,t,e,i;let n;try{const t=new URL(null!==(o=null===(r=this.data)||void 0===r?void 0:r._links["fx:transactions"].href)&&void 0!==o?o:"");t.searchParams.set("zoom","items"),n=t.toString()}catch(r){n=void 0}return a(h||(h=u` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" format="iso-long" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),s(null===(t=this.data)||void 0===t?void 0:t._embedded["fx:transaction_template"].currency_code),this.renderTemplateOrSlot(),s(null===(i=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===i?void 0:i["fx:attributes"].href),s(n),super.renderBody())}}customElements.define("foxy-admin-subscription-form",y);export{y as AdminSubscriptionForm};
1
+ import"./shared-7ce74b42.js";import"./shared-43e551f2.js";import"./shared-528b3bdb.js";import"./shared-22dd6cbe.js";import{b as r,I as o}from"./shared-d784b79a.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-transaction.js";import"./shared-4e8a5b95.js";import{_ as t,B as e}from"./shared-d1195c27.js";import{i as s}from"./shared-53e42a77.js";import{h as a,s as i}from"./shared-ba5c42c7.js";import{a as n}from"./shared-f72d82a9.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-01bb183b.js";import"./shared-c1ade7a9.js";import"./shared-0b00883f.js";import"./shared-0b1b1c14.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5f43aa36.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-d279baa5.js";import"./shared-fea2714e.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-e0d1856d.js";import"./shared-4cf87721.js";import"./shared-10b54c49.js";import"./shared-6d11190a.js";import"./shared-651c44fa.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-e622d8cf.js";import"./shared-60150977.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-bab2ea2c.js";import"./shared-1c07cd7f.js";import"./shared-93774efe.js";import"./shared-c5cf889e.js";import"./shared-8676e5c0.js";import"./foxy-billing-address-card.js";import"./foxy-custom-field-form.js";import"./shared-0053cf93.js";import"./foxy-custom-field-card.js";import"./shared-25893d83.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-641786b2.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./shared-901b41cf.js";import"./shared-f20eefdd.js";import"./shared-42bb9e8e.js";import"./shared-cf28d2c8.js";import"./shared-133fc37b.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./shared-9d7ae4aa.js";import"./foxy-item-form.js";import"./shared-2d11750b.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./shared-8521017c.js";import"./foxy-customer-card.js";let d,m=r=>r;customElements.define("foxy-internal-admin-subscription-form-load-in-cart-action",class extends r{constructor(){super(...arguments),this.action=null}static get properties(){return t(t({},super.properties),{},{action:{}})}renderControl(){var r,o;const t=this.nucleon;let e;try{const s=new URL(null!==(o=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r._links["fx:sub_token_url"].href)&&void 0!==o?o:"");"cancel"===this.action&&s.searchParams.set("sub_cancel","true"),e=s.toString()}catch(r){e=void 0}return a(d||(d=m` <a target="_blank" class="rounded font-medium text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n class="transition-opacity group-hover-opacity-80" infer="" key="caption"> </foxy-i18n> </a> `),s(e))}});let c,f,l=r=>r;customElements.define("foxy-internal-admin-subscription-form-error",class extends r{renderControl(){var r,o;return a(c||(c=l` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),i(f||(f=l`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(o=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===o?void 0:o.error_message)}});let p,h,u=r=>r;const j=n(o,"admin-subscription-form");class y extends j{get hiddenSelector(){var r,o;const t=["delete",super.hiddenSelector.toString()];return(null===(r=this.data)||void 0===r?void 0:r.error_message)||t.unshift("error-message"),(null===(o=this.data)||void 0===o?void 0:o.is_active)||t.unshift("view-action","cancel-action"),new e(t.join(" ").trim())}get headerSubtitleOptions(){var r;return{context:(null===(r=this.data)||void 0===r?void 0:r.is_active)?"active":"inactive"}}renderHeaderActions(r){return a(p||(p=u` <foxy-internal-admin-subscription-form-load-in-cart-action infer="view-action"> </foxy-internal-admin-subscription-form-load-in-cart-action> <foxy-internal-admin-subscription-form-load-in-cart-action action="cancel" infer="cancel-action"> </foxy-internal-admin-subscription-form-load-in-cart-action> `))}renderBody(){var r,o,t,e,i;let n;try{const t=new URL(null!==(o=null===(r=this.data)||void 0===r?void 0:r._links["fx:transactions"].href)&&void 0!==o?o:"");t.searchParams.set("zoom","items"),n=t.toString()}catch(r){n=void 0}return a(h||(h=u` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),s(null===(t=this.data)||void 0===t?void 0:t._embedded["fx:transaction_template"].currency_code),this.renderTemplateOrSlot(),s(null===(i=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===i?void 0:i["fx:attributes"].href),s(n),super.renderBody())}}customElements.define("foxy-admin-subscription-form",y);export{y as AdminSubscriptionForm};
@@ -1,4 +1,4 @@
1
- import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-42bb9e8e.js";import"./shared-8521017c.js";import"./shared-cf28d2c8.js";import"./shared-133fc37b.js";import{b as e,a as t,I as r}from"./shared-d784b79a.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-4e8a5b95.js";import{_ as i,B as o}from"./shared-d1195c27.js";import{c as s}from"./shared-4e709717.js";import{h as n,c as a}from"./shared-ba5c42c7.js";import"./shared-0b1b1c14.js";import{R as l,a as d}from"./shared-f72d82a9.js";import{i as c}from"./shared-53e42a77.js";import"./foxy-update-payment-method-form.js";import{U as u}from"./shared-cd96ff03.js";import{s as m}from"./shared-53e476fd.js";import"./shared-1c07cd7f.js";import{g as p}from"./shared-bab2ea2c.js";import{T as _}from"./shared-25893d83.js";import{T as h}from"./shared-8874ec69.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-1482d5dd.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-7e9fdf64.js";import"./shared-d1dfac4d.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-10b54c49.js";import"./shared-6d11190a.js";import"./shared-fea2714e.js";import"./shared-651c44fa.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-93774efe.js";import"./shared-0053cf93.js";import"./shared-8676e5c0.js";import"./shared-c5cf889e.js";import"./shared-9d7ae4aa.js";import"./shared-641786b2.js";import"./shared-43e551f2.js";import"./shared-d279baa5.js";import"./shared-e0d1856d.js";import"./shared-4cf87721.js";import"./shared-528b3bdb.js";import"./shared-22dd6cbe.js";import"./shared-e622d8cf.js";import"./shared-60150977.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-payment-card-embed.js";import"./shared-cc76a917.js";import"./shared-0e156ee7.js";import"./shared-c2efc54e.js";let f,y,v=e=>e;customElements.define("foxy-internal-cart-form-create-session-action",class extends e{constructor(){super(...arguments),this.__loader=null}static get properties(){return i(i({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const r=null===(e=this.__loader)||void 0===e?void 0:e.state,i=null===(t=this.__loader)||void 0===t?void 0:t.result;return i?n(f||(f=v` <a target="_blank" class="rounded font-medium transition-colors text-body focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),i):n(y||(y=v` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),s({"transition-colors font-medium rounded":!0,"text-tertiary":"fail"!==r,"text-error":"fail"===r}),"fail"===r?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const r=this.nucleon,i=null==r?void 0:r.data,o=null!==(t=null==i?void 0:i._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(o)}async __reloadSessionHref(e){var t;if((null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const r=this.nucleon;if(r)if(e){const t={result:null,state:"busy",href:e},i=new r.constructor.API(this);this.__loader=t;try{const r=await i.fetch(e,{method:"POST"});if(!r.ok)throw new Error;t.result=(await r.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let g;const x=a(g||(g=(e=>e)`
1
+ import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-42bb9e8e.js";import"./shared-8521017c.js";import"./shared-cf28d2c8.js";import"./shared-133fc37b.js";import{b as e,a as t,I as r}from"./shared-d784b79a.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-4e8a5b95.js";import{_ as i,B as o}from"./shared-d1195c27.js";import{c as s}from"./shared-4e709717.js";import{h as n,c as a}from"./shared-ba5c42c7.js";import"./shared-0b1b1c14.js";import{R as l,a as d}from"./shared-f72d82a9.js";import{i as c}from"./shared-53e42a77.js";import"./foxy-update-payment-method-form.js";import{U as u}from"./shared-cd96ff03.js";import{s as m}from"./shared-53e476fd.js";import"./shared-1c07cd7f.js";import{g as p}from"./shared-bab2ea2c.js";import{T as _}from"./shared-25893d83.js";import{T as h}from"./shared-8874ec69.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-1482d5dd.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./foxy-form-dialog.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./shared-7e9fdf64.js";import"./shared-d1dfac4d.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-10b54c49.js";import"./shared-6d11190a.js";import"./shared-fea2714e.js";import"./shared-651c44fa.js";import"./shared-cd652fd0.js";import"./shared-2e8361e1.js";import"./shared-6b76afc2.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-93774efe.js";import"./shared-0053cf93.js";import"./shared-8676e5c0.js";import"./shared-c5cf889e.js";import"./shared-9d7ae4aa.js";import"./shared-641786b2.js";import"./shared-43e551f2.js";import"./shared-d279baa5.js";import"./shared-e0d1856d.js";import"./shared-4cf87721.js";import"./shared-528b3bdb.js";import"./shared-22dd6cbe.js";import"./shared-e622d8cf.js";import"./shared-60150977.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-payment-card-embed.js";import"./shared-cc76a917.js";import"./shared-9ca85d1e.js";import"./shared-c2efc54e.js";let f,y,v=e=>e;customElements.define("foxy-internal-cart-form-create-session-action",class extends e{constructor(){super(...arguments),this.__loader=null}static get properties(){return i(i({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const r=null===(e=this.__loader)||void 0===e?void 0:e.state,i=null===(t=this.__loader)||void 0===t?void 0:t.result;return i?n(f||(f=v` <a target="_blank" class="rounded font-medium transition-colors text-body focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),i):n(y||(y=v` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),s({"transition-colors font-medium rounded":!0,"text-tertiary":"fail"!==r,"text-error":"fail"===r}),"fail"===r?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const r=this.nucleon,i=null==r?void 0:r.data,o=null!==(t=null==i?void 0:i._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(o)}async __reloadSessionHref(e){var t;if((null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const r=this.nucleon;if(r)if(e){const t={result:null,state:"busy",href:e},i=new r.constructor.API(this);this.__loader=t;try{const r=await i.fetch(e,{method:"POST"});if(!r.ok)throw new Error;t.result=(await r.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let g;const x=a(g||(g=(e=>e)`
2
2
  #dialog{
3
3
  width:100dvw;
4
4
  max-height:calc(100dvh - var(--lumo-space-m));
@@ -1 +1 @@
1
- import{C as e}from"./shared-5a9e9e89.js";export{C as CustomerApi}from"./shared-5a9e9e89.js";import"./shared-d1195c27.js";import"./shared-ba5c42c7.js";import"./shared-0e156ee7.js";import"./shared-c2efc54e.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";customElements.define("foxy-customer-api",e);
1
+ import{C as s}from"./shared-82e82908.js";export{C as CustomerApi}from"./shared-82e82908.js";import"./shared-d1195c27.js";import"./shared-ba5c42c7.js";import"./shared-9ca85d1e.js";import"./shared-c2efc54e.js";import"./shared-eeb2bd18.js";import"./shared-53e42a77.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";customElements.define("foxy-customer-api",s);
@@ -1 +1 @@
1
- import"./shared-a6b2bd14.js";import"./shared-c5cf889e.js";import"./shared-901b41cf.js";import"./shared-133fc37b.js";import{b as e,I as t}from"./shared-d784b79a.js";import"./shared-4e8a5b95.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as i,B as n}from"./shared-d1195c27.js";import{S as a,a as l}from"./shared-f72d82a9.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-c1ade7a9.js";import"./shared-0b1b1c14.js";import"./shared-6b76afc2.js";import"./shared-01bb183b.js";import"./shared-f20eefdd.js";import"./shared-fea2714e.js";import"./shared-2e8361e1.js";import"./shared-cd652fd0.js";import"./shared-d0aed1c1.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-17a61265.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let p,h=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends e{renderControl(){var e,t;const r=this.nucleon;return o(p||(p=h` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var m=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const i=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&i.push({regex:`[${o}]`,message:"symbol"});let n={};n.contains=i.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),n.length=r.length;let a=s.filter((e=>n.contains.length>=e.minDiversity)).filter((e=>n.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(n,a[0]),n};e.exports={passwordStrength:s,defaultOptions:t}}()}));let u,f,_=e=>e;const g=a(l(t,"customer-form")),x=m.passwordStrength;class y extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return i(i({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new n(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:i(i({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return i(i({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const i=this.hiddenSelector.matches("first-name",!0),n=this.hiddenSelector.matches("last-name",!0);return o(u||(u=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!i&&!n,hidden:i&&n,"gap-m":!0,grid:!i||!n}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",y);export{y as CustomerForm};
1
+ import"./shared-a6b2bd14.js";import"./shared-c5cf889e.js";import"./shared-901b41cf.js";import"./shared-133fc37b.js";import"./shared-d784b79a.js";export{C as CustomerForm}from"./shared-231687fd.js";import"./shared-1482d5dd.js";import"./shared-c52295d5.js";import"./shared-f72d82a9.js";import"./shared-d1195c27.js";import"./shared-ba5c42c7.js";import"./shared-c1ade7a9.js";import"./shared-0b1b1c14.js";import"./shared-6b76afc2.js";import"./shared-01bb183b.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-53e42a77.js";import"./shared-4e709717.js";import"./shared-f20eefdd.js";import"./shared-fea2714e.js";import"./shared-2e8361e1.js";import"./shared-cd652fd0.js";import"./shared-d0aed1c1.js";import"./shared-1aff7995.js";import"./shared-019348d7.js";import"./shared-5212ef4f.js";import"./shared-eeb2bd18.js";import"./shared-d1dfac4d.js";import"./shared-7e9fdf64.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-5f43aa36.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-b738ee96.js";
@@ -1,4 +1,18 @@
1
- import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36.js";import"./shared-01bb183b.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-d784b79a.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-customer-form.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import{_ as r,B as s,aH as o}from"./shared-d1195c27.js";import{h as i,L as n,c as a}from"./shared-ba5c42c7.js";import{A as d}from"./shared-0e156ee7.js";import"./shared-c2efc54e.js";import{C as l}from"./shared-5a9e9e89.js";import{a as c,T as m}from"./shared-f72d82a9.js";import{i as u}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{A as p}from"./shared-7e9fdf64.js";import{C as f}from"./shared-eeb2bd18.js";import{I as g}from"./shared-17a61265.js";import"./shared-c52295d5.js";import"./foxy-update-payment-method-form.js";import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-1482d5dd.js";import"./shared-c1ade7a9.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-4e8a5b95.js";import"./shared-343d1fd7.js";import"./shared-d1dfac4d.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./foxy-payment-card-embed.js";import"./shared-cd652fd0.js";import"./shared-fea2714e.js";import"./shared-6d11190a.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-c5cf889e.js";import"./shared-8676e5c0.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-0053cf93.js";import"./shared-cf28d2c8.js";import"./shared-10b54c49.js";import"./shared-651c44fa.js";import"./shared-2e8361e1.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-133fc37b.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-03355bd1.js";import"./shared-cbd1fab7.js";import"./shared-d279baa5.js";import"./shared-e0d1856d.js";import"./shared-86aa139c.js";import"./shared-4cf87721.js";import"./shared-f92b9842.js";import"./shared-60150977.js";import"./shared-61ef8001.js";import"./shared-4666b6aa.js";import"./shared-9d7ae4aa.js";import"./shared-cf613436.js";import"./shared-528b3bdb.js";import"./shared-0d8e7067.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-1c07cd7f.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-641786b2.js";import"./shared-a6b2bd14.js";import"./shared-901b41cf.js";import"./shared-f20eefdd.js";import"./shared-b738ee96.js";import"./shared-b927be75.js";let $,y,b=e=>e;class v extends(c(m(l),"customer-portal")){constructor(){super(...arguments),this.transactionsTableColumns=[t.priceColumn,t.summaryColumn,t.statusColumn,t.idColumn,t.dateColumn,t.receiptColumn],this.embedUrl=null,this.group=""}static get properties(){return r(r({},super.properties),{},{transactionsTableColumns:{attribute:!1},embedUrl:{attribute:"embed-url"},group:{type:String}})}render(){var e;let t;try{t=new URL("./customer_portal_settings",this.base)}catch(e){t=void 0}return this.api.storage.getItem(d.SESSION)?i($||($=b` <foxy-internal-customer-portal-logged-in-view embed-url="${0}" customer="${0}" class="h-full" infer="" href="${0}" .transactionsTableColumns="${0}"> </foxy-internal-customer-portal-logged-in-view> `),u(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.base,u(null==t?void 0:t.toString()),this.transactionsTableColumns):i(y||(y=b` <foxy-internal-customer-portal-logged-out-view class="h-full" infer="" href="${0}"> </foxy-internal-customer-portal-logged-out-view> `),u(null==t?void 0:t.toString()))}}let S,x,_,j,T=e=>e;class O extends(m(n)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return r(r({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=h({"flex-auto font-medium tracking-wide text-s rounded-s transition-colors":!0,"hover-text-primary hover-cursor-pointer":!this.disabled,"focus-outline-none focus-ring-2 ring-primary-50 ring-offset-2":!this.disabled,"text-disabled cursor-default":this.disabled}),t=i(S||(S=T` ${0} <slot></slot> `),this.icon?i(x||(x=T`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?i(_||(_=T`<button class="${0}" disabled="disabled">${0}</button>`),e,t):i(j||(j=T` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let k,w,z,R,U,E,N,A,C=e=>e;const H=c(e);let I,F,L,q,P,B,D,G,J,K,M,Q,V,W,X,Y=e=>e;const Z=c(e);const ee=["html"],te=["html"];let re,se,oe,ie,ne,ae,de,le,ce,me,ue,he,pe=e=>e;const fe=c(f(m(g(n))));let ge,$e,ye,be=e=>e;const ve=f(m(c(g(n),"customer-portal")));customElements.define("foxy-internal-customer-portal-logged-in-view",class extends H{constructor(){var e;super(...arguments),e=this,this.customer="",this.embedUrl=null,this.loggingOutState="idle",this.transactionsTableColumns=[],this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,r,s,o,n;const a="customer:header:actions:sign-out",d=this.loggingOutState,l=this.disabledSelector.matches(a)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==d,c={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:l?"default":"pointer"};return i(k||(k=C` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${a}:before`),this.t("sign_out").toString(),Object.entries(c).reduce(((e,[t,r])=>`${e}${t}:${r};`),""),l,(async function(){try{e.loggingOutState="busy",await new p(e).fetch("foxy://customer-api/session",{method:"DELETE"}),e.loggingOutState="idle"}catch(t){e.loggingOutState="fail",e.loggingOutStateResetTimeout=setTimeout((()=>{e.loggingOutState="idle",e.loggingOutStateResetTimeout=null}),1e3)}}),"idle"===d?i(w||(w=C`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):i(z||(z=C` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===d?"error":"busy",this.lang,[this.ns,null!==(s=null===(r=customElements.get("foxy-customer"))||void 0===r?void 0:r.defaultNS)&&void 0!==s?s:"",null!==(n=null===(o=customElements.get("foxy-spinner"))||void 0===o?void 0:o.defaultNS)&&void 0!==n?n:""].join(" ")),this.renderTemplateOrSlot(`${a}:after`))},this.__renderSubscriptions=(e,t)=>{const r="customer:subscriptions";return e(R||(R=C`
1
+ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36.js";import"./shared-01bb183b.js";import"./shared-901b41cf.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-d784b79a.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import{u as s}from"./shared-231687fd.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{_ as r,B as o,aH as i}from"./shared-d1195c27.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-9ca85d1e.js";import"./shared-c2efc54e.js";import{C as c}from"./shared-82e82908.js";import{a as m,T as u}from"./shared-f72d82a9.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-7e9fdf64.js";import{C as y}from"./shared-eeb2bd18.js";import{I as $}from"./shared-17a61265.js";import"./shared-c52295d5.js";import"./foxy-update-payment-method-form.js";import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-1482d5dd.js";import"./shared-c1ade7a9.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-d1dfac4d.js";import"./shared-343d1fd7.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4c90701b.js";import"./shared-1a49f70b.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./foxy-payment-card-embed.js";import"./shared-cd652fd0.js";import"./shared-fea2714e.js";import"./shared-6d11190a.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-c5cf889e.js";import"./shared-8676e5c0.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-0053cf93.js";import"./shared-cf28d2c8.js";import"./shared-10b54c49.js";import"./shared-651c44fa.js";import"./shared-2e8361e1.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-133fc37b.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-03355bd1.js";import"./shared-cbd1fab7.js";import"./shared-d279baa5.js";import"./shared-e0d1856d.js";import"./shared-86aa139c.js";import"./shared-4cf87721.js";import"./shared-f92b9842.js";import"./shared-60150977.js";import"./shared-61ef8001.js";import"./shared-4666b6aa.js";import"./shared-9d7ae4aa.js";import"./shared-cf613436.js";import"./shared-528b3bdb.js";import"./shared-0d8e7067.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-1c07cd7f.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-641786b2.js";import"./shared-a6b2bd14.js";import"./shared-f20eefdd.js";import"./shared-b738ee96.js";import"./shared-b927be75.js";
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */function v(e,t,s){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,s),s}let b,x,S,_=e=>e;var j;class w extends(m(u(c),"customer-portal")){constructor(){super(...arguments),this.transactionsTableColumns=[t.priceColumn,t.summaryColumn,t.statusColumn,t.idColumn,t.dateColumn,t.receiptColumn],j.set(this,null),this.skipPasswordReset=!1,this.embedUrl=null,this.group=""}static get properties(){return r(r({},super.properties),{},{transactionsTableColumns:{attribute:!1},skipPasswordReset:{type:Boolean,attribute:"skip-password-reset"},embedUrl:{attribute:"embed-url"},group:{type:String}})}render(){var e,t;let s;try{s=new URL("./customer_portal_settings",this.base)}catch(e){s=void 0}return this.api.storage.getItem(l.SESSION)?!this.skipPasswordReset&&this.api.usesTemporaryPassword?a(b||(b=_` <foxy-internal-customer-portal-password-reset-view password-old="${0}" infer="password-reset" href="${0}" @update="${0}"> </foxy-internal-customer-portal-password-reset-view> `),h(null!==(e=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(this,j))&&void 0!==e?e:void 0),this.base,(e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.result)===p.UpdateResult.ResourceUpdated&&(this.api.usesTemporaryPassword=!1,v(this,j,null),this.requestUpdate())})):a(x||(x=_` <foxy-internal-customer-portal-logged-in-view embed-url="${0}" customer="${0}" class="h-full" infer="" href="${0}" .transactionsTableColumns="${0}"> </foxy-internal-customer-portal-logged-in-view> `),h(null!==(t=this.embedUrl)&&void 0!==t?t:void 0),this.base,h(null==s?void 0:s.toString()),this.transactionsTableColumns):a(S||(S=_` <foxy-internal-customer-portal-logged-out-view class="h-full" infer="" href="${0}" @password="${0}"> </foxy-internal-customer-portal-logged-out-view> `),h(null==s?void 0:s.toString()),(e=>{v(this,j,e.detail)}))}updated(e){super.updated(e);!(null!==this.api.storage.getItem(l.SESSION))||!this.skipPasswordReset&&this.api.usesTemporaryPassword||v(this,j,null)}}j=new WeakMap;let T,k,O,R,U=e=>e;class z extends(u(n)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return r(r({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=f({"flex-auto font-medium tracking-wide text-s rounded-s transition-colors":!0,"hover-text-primary hover-cursor-pointer":!this.disabled,"focus-outline-none focus-ring-2 ring-primary-50 ring-offset-2":!this.disabled,"text-disabled cursor-default":this.disabled}),t=a(T||(T=U` ${0} <slot></slot> `),this.icon?a(k||(k=U`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?a(O||(O=U`<button class="${0}" disabled="disabled">${0}</button>`),e,t):a(R||(R=U` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let E,N,A,C,I,H,F,P,q=e=>e;const L=m(e);let B,D,G,J,M,W,K,Q,V,X,Y,Z,ee,te,se,re=e=>e;const oe=m(e);const ie=["html"],ae=["html"];let ne,de,le,ce,me,ue,pe,he,fe,ge,ye,$e,ve=e=>e;const be=m(y(u($(n))));let xe,Se,_e,je=e=>e;const we=y(u(m($(n),"customer-portal")));let Te,ke,Oe=e=>e;const Re=s.passwordStrength;class Ue extends(m(e)){constructor(){super(...arguments),this.passwordOld=null,this.__generatorOptions={checkStrength:e=>Re(e).id>=2}}static get properties(){return r(r({},super.properties),{},{passwordOld:{attribute:"password-old"}})}static get styles(){return[super.styles,d(Te||(Te=Oe`.max-w-25rem{max-width:25rem}`))]}static get v8n(){return[({password:e})=>!!e||"password:v8n_required",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({password:e})=>!e||Re(e).id>=2||"password:v8n_too_weak"]}renderBody(){return a(ke||(ke=Oe` <div class="m-auto max-w-25rem leading-s"> <p class="text-xxl font-medium ${0}"> <foxy-i18n infer="" key="title"></foxy-i18n> </p> <p class="text-l ${0}"> <foxy-i18n infer="" key="subtitle"></foxy-i18n> </p> <foxy-internal-password-control infer="password" class="mt-m" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <vaadin-button class="w-full mt-l" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="submit"></foxy-i18n> </vaadin-button> </div> `),this.in("busy")?"text-disabled":"text-body",this.in("busy")?"text-disabled":"text-secondary",this.__generatorOptions,this.disabled||!this.in("idle"),(()=>this.submit()))}submit(){var e;this.edit({password_old:null!==(e=this.passwordOld)&&void 0!==e?e:""}),super.submit()}}customElements.define("foxy-internal-customer-portal-logged-in-view",class extends L{constructor(){var e;super(...arguments),e=this,this.customer="",this.embedUrl=null,this.loggingOutState="idle",this.transactionsTableColumns=[],this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,s,r,o,i;const n="customer:header:actions:sign-out",d=this.loggingOutState,l=this.disabledSelector.matches(n)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==d,c={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:l?"default":"pointer"};return a(E||(E=q` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${n}:before`),this.t("sign_out").toString(),Object.entries(c).reduce(((e,[t,s])=>`${e}${t}:${s};`),""),l,(async function(){try{e.loggingOutState="busy",await new g(e).fetch("foxy://customer-api/session",{method:"DELETE"}),e.loggingOutState="idle"}catch(t){e.loggingOutState="fail",e.loggingOutStateResetTimeout=setTimeout((()=>{e.loggingOutState="idle",e.loggingOutStateResetTimeout=null}),1e3)}}),"idle"===d?a(N||(N=q`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):a(A||(A=q` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===d?"error":"busy",this.lang,[this.ns,null!==(r=null===(s=customElements.get("foxy-customer"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",null!==(i=null===(o=customElements.get("foxy-spinner"))||void 0===o?void 0:o.defaultNS)&&void 0!==i?i:""].join(" ")),this.renderTemplateOrSlot(`${n}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(C||(C=q`
2
16
  ${0}
3
17
 
4
18
  <foxy-internal-customer-portal-subscriptions
@@ -15,7 +29,7 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
15
29
  </foxy-internal-customer-portal-subscriptions>
16
30
 
17
31
  ${0}
18
- `),this.renderTemplateOrSlot(`${r}:before`),this.readonlySelector.zoom(r).toString(),this.disabledSelector.zoom(r).toString(),this.hiddenSelector.zoom(r).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(r),this.data,t.data,this.renderTemplateOrSlot(`${r}:after`))},this.__renderTransactions=(e,t)=>{const r="customer:transactions";return e(U||(U=C`
32
+ `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),this.data,t.data,this.renderTemplateOrSlot(`${s}:after`))},this.__renderTransactions=(e,t)=>{const s="customer:transactions";return e(I||(I=q`
19
33
  ${0}
20
34
 
21
35
  <foxy-internal-customer-portal-transactions
@@ -32,12 +46,12 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
32
46
  </foxy-internal-customer-portal-transactions>
33
47
 
34
48
  ${0}
35
- `),this.renderTemplateOrSlot(`${r}:before`),this.readonlySelector.zoom(r).toString(),this.disabledSelector.zoom(r).toString(),this.hiddenSelector.zoom(r).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(r),t.data,this.transactionsTableColumns,this.renderTemplateOrSlot(`${r}:after`))}}static get properties(){return r(r({},super.properties),{},{customer:{type:String},embedUrl:{attribute:"embed-url"},loggingOutState:{attribute:!1},transactionsTableColumns:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}renderBody(){var e,t,r;const o=this.hiddenSelector.zoom("customer"),n=new s(["attributes","transactions","subscriptions","addresses:actions:create","addresses:list:form:header","addresses:list:form:ignore-address-restrictions","payment-methods:list:card:actions:update:form:template-set","header:actions:edit:form:header","header:actions:edit:form:is-anonymous","header:actions:edit:form:forgot-password","header:actions:edit:form:create","header:actions:edit:form:delete",o.toString()].join(" ")).toString(),a=this.getNestedTemplates("customer"),d=a["header:actions:after"],l=a.default;return a["header:actions:after"]=(e,t)=>{const r=o.matches("header:actions:sign-out",!0);return e(E||(E=C`
49
+ `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),t.data,this.transactionsTableColumns,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return r(r({},super.properties),{},{customer:{type:String},embedUrl:{attribute:"embed-url"},loggingOutState:{attribute:!1},transactionsTableColumns:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}renderBody(){var e,t,s;const r=this.hiddenSelector.zoom("customer"),i=new o(["attributes","transactions","subscriptions","addresses:actions:create","addresses:list:form:header","addresses:list:form:ignore-address-restrictions","payment-methods:list:card:actions:update:form:template-set","header:actions:edit:form:header","header:actions:edit:form:is-anonymous","header:actions:edit:form:forgot-password","header:actions:edit:form:create","header:actions:edit:form:delete",r.toString()].join(" ")).toString(),n=this.getNestedTemplates("customer"),d=n["header:actions:after"],l=n.default;return n["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(H||(H=q`
36
50
  <div style="display:flex">
37
51
  ${0}
38
52
  ${0}
39
53
  </div>
40
- `),r?"":this.__renderHeaderActionsSignOut(),null==d?void 0:d(e,t))},a.default=(e,t)=>{const r=this.__renderSubscriptions,s=this.__renderTransactions;return e(N||(N=C`
54
+ `),s?"":this.__renderHeaderActionsSignOut(),null==d?void 0:d(e,t))},n.default=(e,t)=>{const s=this.__renderSubscriptions,o=this.__renderTransactions;return e(F||(F=q`
41
55
  <style>
42
56
  .space-y-m > :not([hidden]) ~ :not([hidden]) {
43
57
  --tw-space-y-reverse: 0;
@@ -52,7 +66,7 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
52
66
  ${0}
53
67
  ${0}
54
68
  </div>
55
- `),o.matches("default",!0)?"":null==l?void 0:l(e,t),o.matches("subscriptions",!0)?"":r(e,t),o.matches("transactions",!0)?"":s(e,t))},i(A||(A=C` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" embed-url="${0}" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),n,u(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.group,this.customer,this.lang,this.ns,null!==(r=null===(t=customElements.get("foxy-customer"))||void 0===t?void 0:t.defaultNS)&&void 0!==r?r:"",a,this.data,(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.loggingOutStateResetTimeout&&clearTimeout(this.loggingOutStateResetTimeout)}get __customerElement(){return this.renderRoot.querySelector("#customer")}}),customElements.define("foxy-internal-customer-portal-logged-out-view",class extends Z{constructor(){super(...arguments),this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{var e,t,r,s;const{lang:o,ns:n}=this,a=this.renderRoot.querySelector("#access-recovery-form"),d=!!(null==a?void 0:a.in("busy"));return i(I||(I=Y` <div class="flex flex-col leading-s font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),d?"text-disabled":"text-body",o,n,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,n,null!==(s=null===(r=customElements.get("foxy-access-recovery-form"))||void 0===r?void 0:r.defaultNS)&&void 0!==s?s:"",this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{var e,t;const r=this.renderRoot.querySelector("#access-recovery-form"),s=this.disabledSelector.zoom("access-recovery");return i(F||(F=Y` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="back" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==r?void 0:r.in("busy"))||s.matches("back",!0),(()=>this.page="sign-in"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,t;const r="access-recovery:form",s=this.hiddenSelector.zoom(r);return i(L||(L=Y` <div> ${0} <foxy-access-recovery-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="access-recovery:form" parent="foxy://customer-api/recover" group="${0}" lang="${0}" ns="${0} ${0}" id="access-recovery-form" .templates="${0}" @update="${0}"> </foxy-access-recovery-form> ${0} </div> `),this.renderTemplateOrSlot(`${r}:before`),this.readonlySelector.zoom(r).toString(),this.disabledSelector.zoom(r).toString(),s.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates(r),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${r}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",t=this.hiddenSelector.zoom(e);return i(q||(q=Y` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),t.matches("form",!0)?"":this.__renderAccessRecoveryForm(),t.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{var e,t,r,s;const{lang:o,ns:n}=this,a=this.renderRoot.querySelector("#sign-in-form"),d=!!(null==a?void 0:a.in("busy"));return i(P||(P=Y` <div class="flex flex-col leading-s font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_in" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),d?"text-disabled":"text-body",o,n,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,n,null!==(s=null===(r=customElements.get("foxy-sign-in-form"))||void 0===r?void 0:r.defaultNS)&&void 0!==s?s:"",this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{var e,t;const r=this.renderRoot.querySelector("#sign-in-form"),s=this.disabledSelector.zoom("sign-in");return i(B||(B=Y` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==r?void 0:r.in("busy"))||s.matches("recover",!0),(()=>this.page="access-recovery"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInSignUp=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),t=this.disabledSelector.zoom("sign-in");return i(D||(D=Y` <div> ${0} <vaadin-button data-testid="sign-in:signup" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="sign_up" ns="${0} sign-in-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:signup:before"),!!(null==e?void 0:e.in("busy"))||t.matches("signup",!0),(()=>this.page="sign-up"),this.lang,this.ns,this.renderTemplateOrSlot("sign-in:signup:after"))},this.__renderSignInForm=()=>{var e,t;const r="sign-in:form",s=this.hiddenSelector.zoom(r);return i(G||(G=Y` <div> ${0} <foxy-sign-in-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-in:form" parent="foxy://customer-api/session" group="${0}" lang="${0}" id="sign-in-form" ns="${0} ${0}" .templates="${0}" @update="${0}"> </foxy-sign-in-form> ${0} </div> `),this.renderTemplateOrSlot(`${r}:before`),this.readonlySelector.zoom(r).toString(),this.disabledSelector.zoom(r).toString(),s.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates("sign-in:form"),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${r}:after`))},this.__renderSignIn=()=>{var e,t;const r="sign-in",s=this.hiddenSelector.zoom(r),o=!0===(null===(t=null===(e=this.data)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled),n=s.matches("signup",!0)||!o;return i(J||(J=Y` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} <div class="flex justify-center gap-s"> ${0} ${0} </div> </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${r}:before`),s.matches("header",!0)?"":this.__renderSignInHeader(),s.matches("form",!0)?"":this.__renderSignInForm(),n?"":this.__renderSignInSignUp(),s.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot(`${r}:after`))},this.__renderSignUpHeader=()=>{const{lang:e,ns:t}=this,r=this.renderRoot.querySelector("#sign-up-form"),s=!!(null==r?void 0:r.in("busy"));return i(K||(K=Y` <div class="flex flex-col leading-s font-lumo" data-testid="sign-up:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_up" ns="${0} sign-up-form"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_up_hint" ns="${0} sign-up-form"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-up:header:before"),s?"text-disabled":"text-body",e,t,s?"text-disabled":"text-secondary",e,t,this.renderTemplateOrSlot("sign-up:header:after"))},this.__renderSignUpGoBack=()=>{const e=this.renderRoot.querySelector("#sign-up-form"),t=this.disabledSelector.zoom("sign-up");return i(M||(M=Y` <div> ${0} <vaadin-button data-testid="sign-up:go-back" class="w-full" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="go_back" ns="${0} sign-up-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-up:go-back:before"),!!(null==e?void 0:e.in("busy"))||t.matches("go-back",!0),(()=>this.page="sign-in"),this.lang,this.ns,this.renderTemplateOrSlot("sign-up:go-back:after"))},this.__renderSignUpForm=()=>{const e="sign-up:form",t=["header","tax-id","is-anonymous","password-old","forgot-password","timestamps","delete",this.hiddenSelector.zoom(e).toString()];return i(Q||(Q=Y` <div> ${0} <foxy-customer-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-up:form" parent="foxy://customer-api/signup" group="${0}" lang="${0}" id="sign-up-form" ns="${0} sign-up-form" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer-form> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),this.readonlySelector.zoom(e).toString(),this.disabledSelector.zoom(e).toString(),new s(t.join(" ").trim()),this.group,this.lang,this.ns,this.getNestedTemplates("sign-up:form"),this.data,(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignUp=()=>{const e="sign-up",t=this.hiddenSelector.zoom(e);return i(V||(V=Y` <div class="h-full flex" data-testid="sign-up"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} ${0} ${0} </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderSignUpHeader(),t.matches("form",!0)?"":this.__renderSignUpForm(),t.matches("go-back",!0)?"":this.__renderSignUpGoBack(),this.renderTemplateOrSlot(`${e}:after`))}}static get properties(){return r(r({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,a(W||(W=Y`.max-w-25rem{max-width:25rem}`))]}renderBody(){const{page:e,hiddenSelector:t}=this;return"access-recovery"!==e||t.matches("access-recovery",!0)?"sign-in"!==e||t.matches("sign-in",!0)?"sign-up"!==e||t.matches("sign-up",!0)?i(X||(X=Y``)):this.__renderSignUp():this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-subscriptions",class extends fe{constructor(){super(...arguments),this.settings=null,this.customer=null,this.group="",this.__renderFormHeaderActionsUpdate=(e,t)=>{var r;const s=!!(null===(r=t.data)||void 0===r?void 0:r.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();let o="";if(!s&&t.in({idle:"snapshot"})){const e=t.data._links["fx:sub_token_url"].href,r=new URL(e);r.searchParams.set("cart","checkout"),r.searchParams.set("sub_restart","auto"),o=r.toString()}return e(re||(re=pe`
69
+ `),r.matches("default",!0)?"":null==l?void 0:l(e,t),r.matches("subscriptions",!0)?"":s(e,t),r.matches("transactions",!0)?"":o(e,t))},a(P||(P=q` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" embed-url="${0}" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),i,h(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.group,this.customer,this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-customer"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",n,this.data,(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.loggingOutStateResetTimeout&&clearTimeout(this.loggingOutStateResetTimeout)}get __customerElement(){return this.renderRoot.querySelector("#customer")}}),customElements.define("foxy-internal-customer-portal-logged-out-view",class extends oe{constructor(){super(...arguments),this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#access-recovery-form"),d=!!(null==n?void 0:n.in("busy"));return a(B||(B=re` <div class="flex flex-col leading-s font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-access-recovery-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{var e,t;const s=this.renderRoot.querySelector("#access-recovery-form"),r=this.disabledSelector.zoom("access-recovery");return a(D||(D=re` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="back" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==s?void 0:s.in("busy"))||r.matches("back",!0),(()=>this.page="sign-in"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,t;const s="access-recovery:form",r=this.hiddenSelector.zoom(s);return a(G||(G=re` <div> ${0} <foxy-access-recovery-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="access-recovery:form" parent="foxy://customer-api/recover" group="${0}" lang="${0}" ns="${0} ${0}" id="access-recovery-form" .templates="${0}" @update="${0}"> </foxy-access-recovery-form> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates(s),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${s}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",t=this.hiddenSelector.zoom(e);return a(J||(J=re` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),t.matches("form",!0)?"":this.__renderAccessRecoveryForm(),t.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#sign-in-form"),d=!!(null==n?void 0:n.in("busy"));return a(M||(M=re` <div class="flex flex-col leading-s font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_in" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-sign-in-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{var e,t;const s=this.renderRoot.querySelector("#sign-in-form"),r=this.disabledSelector.zoom("sign-in");return a(W||(W=re` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==s?void 0:s.in("busy"))||r.matches("recover",!0),(()=>this.page="access-recovery"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInSignUp=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),t=this.disabledSelector.zoom("sign-in");return a(K||(K=re` <div> ${0} <vaadin-button data-testid="sign-in:signup" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="sign_up" ns="${0} sign-in-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:signup:before"),!!(null==e?void 0:e.in("busy"))||t.matches("signup",!0),(()=>this.page="sign-up"),this.lang,this.ns,this.renderTemplateOrSlot("sign-in:signup:after"))},this.__renderSignInForm=()=>{var e,t;const s="sign-in:form",r=this.hiddenSelector.zoom(s);return a(Q||(Q=re` <div> ${0} <foxy-sign-in-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-in:form" parent="foxy://customer-api/session" group="${0}" lang="${0}" id="sign-in-form" ns="${0} ${0}" .templates="${0}" @update="${0}"> </foxy-sign-in-form> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates("sign-in:form"),(e=>{var t,s;const r=null!==(s=null===(t=e.currentTarget.form.credential)||void 0===t?void 0:t.password)&&void 0!==s?s:null;this.dispatchEvent(new CustomEvent("password",{detail:r})),this.requestUpdate()}),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignIn=()=>{var e,t;const s="sign-in",r=this.hiddenSelector.zoom(s),o=!0===(null===(t=null===(e=this.data)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled),i=r.matches("signup",!0)||!o;return a(V||(V=re` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} <div class="flex justify-center gap-s"> ${0} ${0} </div> </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${s}:before`),r.matches("header",!0)?"":this.__renderSignInHeader(),r.matches("form",!0)?"":this.__renderSignInForm(),i?"":this.__renderSignInSignUp(),r.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignUpHeader=()=>{const{lang:e,ns:t}=this,s=this.renderRoot.querySelector("#sign-up-form"),r=!!(null==s?void 0:s.in("busy"));return a(X||(X=re` <div class="flex flex-col leading-s font-lumo" data-testid="sign-up:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_up" ns="${0} sign-up-form"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_up_hint" ns="${0} sign-up-form"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-up:header:before"),r?"text-disabled":"text-body",e,t,r?"text-disabled":"text-secondary",e,t,this.renderTemplateOrSlot("sign-up:header:after"))},this.__renderSignUpGoBack=()=>{const e=this.renderRoot.querySelector("#sign-up-form"),t=this.disabledSelector.zoom("sign-up");return a(Y||(Y=re` <div> ${0} <vaadin-button data-testid="sign-up:go-back" class="w-full" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="go_back" ns="${0} sign-up-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-up:go-back:before"),!!(null==e?void 0:e.in("busy"))||t.matches("go-back",!0),(()=>this.page="sign-in"),this.lang,this.ns,this.renderTemplateOrSlot("sign-up:go-back:after"))},this.__renderSignUpForm=()=>{const e="sign-up:form",t=["header","tax-id","is-anonymous","password-old","forgot-password","timestamps","delete",this.hiddenSelector.zoom(e).toString()];return a(Z||(Z=re` <div> ${0} <foxy-customer-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-up:form" parent="foxy://customer-api/signup" group="${0}" lang="${0}" id="sign-up-form" ns="${0} sign-up-form" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer-form> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),this.readonlySelector.zoom(e).toString(),this.disabledSelector.zoom(e).toString(),new o(t.join(" ").trim()),this.group,this.lang,this.ns,this.getNestedTemplates("sign-up:form"),this.data,(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignUp=()=>{const e="sign-up",t=this.hiddenSelector.zoom(e);return a(ee||(ee=re` <div class="h-full flex" data-testid="sign-up"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} ${0} ${0} </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderSignUpHeader(),t.matches("form",!0)?"":this.__renderSignUpForm(),t.matches("go-back",!0)?"":this.__renderSignUpGoBack(),this.renderTemplateOrSlot(`${e}:after`))}}static get properties(){return r(r({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,d(te||(te=re`.max-w-25rem{max-width:25rem}`))]}renderBody(){const{page:e,hiddenSelector:t}=this;return"access-recovery"!==e||t.matches("access-recovery",!0)?"sign-in"!==e||t.matches("sign-in",!0)?"sign-up"!==e||t.matches("sign-up",!0)?a(se||(se=re``)):this.__renderSignUp():this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-password-reset-view",Ue),customElements.define("foxy-internal-customer-portal-subscriptions",class extends be{constructor(){super(...arguments),this.settings=null,this.customer=null,this.group="",this.__renderFormHeaderActionsUpdate=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();let o="";if(!r&&t.in({idle:"snapshot"})){const e=t.data._links["fx:sub_token_url"].href,s=new URL(e);s.searchParams.set("cart","checkout"),s.searchParams.set("sub_restart","auto"),o=s.toString()}return e(ne||(ne=ve`
56
70
  ${0}
57
71
 
58
72
  <foxy-internal-customer-portal-link
@@ -65,7 +79,7 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
65
79
  </foxy-internal-customer-portal-link>
66
80
 
67
81
  ${0}
68
- `),t.renderTemplateOrSlot("header:actions:update:before"),o,s||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:update:after"))},this.__renderFormHeaderActionsEnd=(e,t)=>{var r;const s=!!(null===(r=t.data)||void 0===r?void 0:r.end_date);let o="";if(!s&&t.in({idle:"snapshot"})){const e=new URL(t.data._links["fx:sub_token_url"].href);e.searchParams.set("sub_cancel","true"),o=e.toString()}return e(se||(se=pe`
82
+ `),t.renderTemplateOrSlot("header:actions:update:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:update:after"))},this.__renderFormHeaderActionsEnd=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&"0000-00-00"!==t.data.end_date;let o="";if(!r&&t.in({idle:"snapshot"})){const e=new URL(t.data._links["fx:sub_token_url"].href);e.searchParams.set("sub_cancel","true"),o=e.toString()}return e(de||(de=ve`
69
83
  ${0}
70
84
 
71
85
  <foxy-internal-customer-portal-link
@@ -78,7 +92,7 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
78
92
  </foxy-internal-customer-portal-link>
79
93
 
80
94
  ${0}
81
- `),t.renderTemplateOrSlot("header:actions:end:before"),o,s||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:end:after"))},this.__renderFormHeaderActions=(e,t)=>{const r=t.hiddenSelector.matches("header:actions:update"),s=t.hiddenSelector.matches("header:actions:end");return e(oe||(oe=pe`
95
+ `),t.renderTemplateOrSlot("header:actions:end:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:end:after"))},this.__renderFormHeaderActions=(e,t)=>{const s=t.hiddenSelector.matches("header:actions:update"),r=t.hiddenSelector.matches("header:actions:end");return e(le||(le=ve`
82
96
  <style>
83
97
  main {
84
98
  display: flex;
@@ -98,7 +112,7 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
98
112
  </main>
99
113
 
100
114
  ${0}
101
- `),t.renderTemplateOrSlot("header:actions:before"),r?"":this.__renderFormHeaderActionsUpdate(e,t),s?"":this.__renderFormHeaderActionsEnd(e,t),t.renderTemplateOrSlot("header:actions:after"))},this.__renderFormItemsActionsUpdate=(e,t)=>{var r,s,o,i;const n=null!==(o=null===(s=null===(r=t.data)||void 0===r?void 0:r._links["fx:sub_modification_url"])||void 0===s?void 0:s.href)&&void 0!==o?o:"",a=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(ie||(ie=pe`
115
+ `),t.renderTemplateOrSlot("header:actions:before"),s?"":this.__renderFormHeaderActionsUpdate(e,t),r?"":this.__renderFormHeaderActionsEnd(e,t),t.renderTemplateOrSlot("header:actions:after"))},this.__renderFormItemsActionsUpdate=(e,t)=>{var s,r,o,i;const a=null!==(o=null===(r=null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"])||void 0===r?void 0:r.href)&&void 0!==o?o:"",n=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(ce||(ce=ve`
102
116
  ${0}
103
117
 
104
118
  <foxy-internal-customer-portal-link
@@ -111,13 +125,13 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
111
125
  </foxy-internal-customer-portal-link>
112
126
 
113
127
  ${0}
114
- `),t.renderTemplateOrSlot("items:actions:update:before"),n,a||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=e=>{var t,o;const n=r({},e.dialog.templates),a=n["header:after"],d=n["items:actions:after"];return n["header:after"]=(e,t)=>{const r=t.hiddenSelector.matches("header:actions",!0);return e(ne||(ne=pe`
128
+ `),t.renderTemplateOrSlot("items:actions:update:before"),a,n||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=e=>{var t,s;const i=r({},e.dialog.templates),n=i["header:after"],d=i["items:actions:after"];return i["header:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions",!0);return e(me||(me=ve`
115
129
  ${0}
116
130
  ${0}
117
- `),r?"":this.__renderFormHeaderActions(e,t),null==a?void 0:a(e,t))},n["items:actions:after"]=(e,t)=>{var r;const s=!!(null===(r=t.data)||void 0===r?void 0:r._links["fx:sub_modification_url"]),o=t.hiddenSelector.matches("items:actions:update",!0);return e(ae||(ae=pe`
131
+ `),s?"":this.__renderFormHeaderActions(e,t),null==n?void 0:n(e,t))},i["items:actions:after"]=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"]),o=t.hiddenSelector.matches("items:actions:update",!0);return e(ue||(ue=ve`
118
132
  ${0}
119
133
  ${0}
120
- `),s&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==d?void 0:d(e,t))},i(de||(de=pe` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0} ${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),e.dialog.disabledControls.toString(),e.dialog.readonlyControls.toString(),new s(`attributes timestamps start-date past-due-amount customer ${e.dialog.hiddenSelector}`),JSON.stringify(this.settings),e.dialog.parent,e.dialog.group,e.dialog.lang,e.dialog.href,e.dialog.ns,null!==(o=null===(t=customElements.get("foxy-subscription-form"))||void 0===t?void 0:t.defaultNS)&&void 0!==o?o:"",n,e.handleUpdate,e.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,r=o(e,ee);var s,i;return t(le||(le=pe`
134
+ `),r&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==d?void 0:d(e,t))},a(pe||(pe=ve` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0} ${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),e.dialog.disabledControls.toString(),e.dialog.readonlyControls.toString(),new o(`attributes timestamps start-date past-due-amount customer ${e.dialog.hiddenSelector}`),JSON.stringify(this.settings),e.dialog.parent,e.dialog.group,e.dialog.lang,e.dialog.href,e.dialog.ns,null!==(s=null===(t=customElements.get("foxy-subscription-form"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",i,e.handleUpdate,e.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,s=i(e,ie);var r,o;return t(he||(he=ve`
121
135
  <button
122
136
  class=${0}
123
137
  ?disabled=${0}
@@ -134,7 +148,7 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
134
148
  >
135
149
  </foxy-subscription-card>
136
150
  </button>
137
- `),h({"block w-full border border-contrast-10 p-m rounded-t-l rounded-b-l":!0,"focus-outline-none focus-border-primary":!0,"hover-border-contrast-30":null!==r.data}),null===r.data,(e=>{const t=new URL(r.href);t.searchParams.set("zoom","transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),r.parent,r.group,r.lang,r.href,r.ns,null!==(i=null===(s=customElements.get("foxy-subscription-card"))||void 0===s?void 0:s.defaultNS)&&void 0!==i?i:"",r.templates)},this.__renderPage=e=>{let{html:t}=e,r=o(e,te);return t(ce||(ce=pe`
151
+ `),f({"block w-full border border-contrast-10 p-m rounded-t-l rounded-b-l":!0,"focus-outline-none focus-border-primary":!0,"hover-border-contrast-30":null!==s.data}),null===s.data,(e=>{const t=new URL(s.href);t.searchParams.set("zoom","transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),s.parent,s.group,s.lang,s.href,s.ns,null!==(o=null===(r=customElements.get("foxy-subscription-card"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:"",s.templates)},this.__renderPage=e=>{let{html:t}=e,s=i(e,ae);return t(fe||(fe=ve`
138
152
  <foxy-collection-page
139
153
  ns=${0}
140
154
  href=${0}
@@ -145,4 +159,4 @@ import"./foxy-customer.js";import"./shared-0b1b1c14.js";import"./shared-5f43aa36
145
159
  .templates=${0}
146
160
  >
147
161
  </foxy-collection-page>
148
- `),r.ns,r.href,r.lang,r.group,this.__renderPageItem,r.templates)},this.__renderHeader=()=>i(me||(me=pe` ${0} <foxy-i18n class="block text-l font-medium" lang="${0}" key="subscription_plural" ns="${0}"> </foxy-i18n> ${0} `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{var e;const t=this.disabledSelector.zoom("list"),r=this.readonlySelector.zoom("list"),s=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return i(ue||(ue=pe` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" .form="${0}" .templates="${0}"> </foxy-form-dialog> <foxy-collection-pages class="block space-y-m" first="${0}" group="${0}" lang="${0}" ns="${0}" manual .page="${0}" .templates="${0}"> </foxy-collection-pages> ${0} `),this.renderTemplateOrSlot("list:before"),r.zoom("form").toString(),t.zoom("form").toString(),s.join(" ").trim(),u(null===(e=this.customer)||void 0===e?void 0:e._links["fx:subscriptions"].href),this.group,this.lang,this.ns,this.__renderForm,this.getNestedTemplates("list:form"),this.__activeSubscriptionsLink,this.group,this.lang,this.ns,this.__renderPage,this.getNestedTemplates("list:card"),this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return i(he||(he=pe` <div class="space-y-s" data-testid="subscriptions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header",!0)?"":this.__renderHeader(),this.hiddenSelector.matches("list",!0)?"":this.__renderList())}get __subscriptionDialog(){return this.renderRoot.querySelector("#subscription-dialog")}get __activeSubscriptionsLink(){try{const e=new URL(this.customer._links["fx:subscriptions"].href);return e.searchParams.set("zoom","transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends ve{constructor(){super(...arguments),this.customer=null,this.columns=[],this.group="",this.__renderHeader=()=>i(ge||(ge=be` <div> ${0} <foxy-i18n class="text-l font-medium" lang="${0}" key="transaction_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{let e="";if(this.customer){const t=new URL(this.customer._links["fx:transactions"].href);t.searchParams.set("zoom","items"),e=t.toString()}return i($e||($e=be` <div> ${0} <foxy-collection-pages spinner="foxy-spinner" group="${0}" first="${0}" class="block divide-y divide-contrast-10 px-m border border-contrast-10 rounded-t-l rounded-b-l" page="foxy-transactions-table" lang="${0}" ns="${0}" manual .templates="${0}" .props="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),{".columns":this.columns},this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{customer:{attribute:!1},columns:{attribute:!1},group:{type:String}})}render(){return i(ye||(ye=be` <div class="space-y-s" data-testid="transactions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header")?"":this.__renderHeader(),this.hiddenSelector.matches("list")?"":this.__renderList())}}),customElements.define("foxy-internal-customer-portal-link",O),customElements.define("foxy-customer-portal",v);export{v as CustomerPortal};
162
+ `),s.ns,s.href,s.lang,s.group,this.__renderPageItem,s.templates)},this.__renderHeader=()=>a(ge||(ge=ve` ${0} <foxy-i18n class="block text-l font-medium" lang="${0}" key="subscription_plural" ns="${0}"> </foxy-i18n> ${0} `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{var e;const t=this.disabledSelector.zoom("list"),s=this.readonlySelector.zoom("list"),r=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return a(ye||(ye=ve` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" .form="${0}" .templates="${0}"> </foxy-form-dialog> <foxy-collection-pages class="block space-y-m" first="${0}" group="${0}" lang="${0}" ns="${0}" manual .page="${0}" .templates="${0}"> </foxy-collection-pages> ${0} `),this.renderTemplateOrSlot("list:before"),s.zoom("form").toString(),t.zoom("form").toString(),r.join(" ").trim(),h(null===(e=this.customer)||void 0===e?void 0:e._links["fx:subscriptions"].href),this.group,this.lang,this.ns,this.__renderForm,this.getNestedTemplates("list:form"),this.__activeSubscriptionsLink,this.group,this.lang,this.ns,this.__renderPage,this.getNestedTemplates("list:card"),this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return a($e||($e=ve` <div class="space-y-s" data-testid="subscriptions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header",!0)?"":this.__renderHeader(),this.hiddenSelector.matches("list",!0)?"":this.__renderList())}get __subscriptionDialog(){return this.renderRoot.querySelector("#subscription-dialog")}get __activeSubscriptionsLink(){try{const e=new URL(this.customer._links["fx:subscriptions"].href);return e.searchParams.set("zoom","transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends we{constructor(){super(...arguments),this.customer=null,this.columns=[],this.group="",this.__renderHeader=()=>a(xe||(xe=je` <div> ${0} <foxy-i18n class="text-l font-medium" lang="${0}" key="transaction_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{let e="";if(this.customer){const t=new URL(this.customer._links["fx:transactions"].href);t.searchParams.set("zoom","items"),e=t.toString()}return a(Se||(Se=je` <div> ${0} <foxy-collection-pages spinner="foxy-spinner" group="${0}" first="${0}" class="block divide-y divide-contrast-10 px-m border border-contrast-10 rounded-t-l rounded-b-l" page="foxy-transactions-table" lang="${0}" ns="${0}" manual .templates="${0}" .props="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),{".columns":this.columns},this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{customer:{attribute:!1},columns:{attribute:!1},group:{type:String}})}render(){return a(_e||(_e=je` <div class="space-y-s" data-testid="transactions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header")?"":this.__renderHeader(),this.hiddenSelector.matches("list")?"":this.__renderList())}}),customElements.define("foxy-internal-customer-portal-link",z),customElements.define("foxy-customer-portal",w);export{w as CustomerPortal};
@@ -1,4 +1,4 @@
1
- import"./shared-01bb183b.js";import"./shared-5f43aa36.js";import{h as t}from"./shared-c52295d5.js";import"./shared-0b1b1c14.js";import"./shared-5212ef4f.js";import"./foxy-payment-method-card.js";import"./foxy-update-payment-method-form.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-form.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-4e8a5b95.js";import{aH as e,_ as s}from"./shared-d1195c27.js";import{L as r,h as a,c as o}from"./shared-ba5c42c7.js";import{C as i}from"./shared-eeb2bd18.js";import"./shared-1482d5dd.js";import"./shared-89d09114.js";import{z as h,S as d,T as n,a as l}from"./shared-f72d82a9.js";import{c as m}from"./shared-4e709717.js";import{S as c}from"./shared-cbd1fab7.js";import"./shared-1a49f70b.js";import{G as v}from"./shared-61ef8001.js";import"./shared-cd652fd0.js";import"./shared-6d11190a.js";import"./shared-d2340faa.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-fea2714e.js";import{N as p}from"./shared-d1dfac4d.js";import{S as f}from"./shared-4666b6aa.js";import{i as g}from"./shared-53e42a77.js";import"./shared-c1ade7a9.js";import"./shared-4c90701b.js";import"./shared-cf613436.js";import"./foxy-nucleon-element.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-6a45a781.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-d784b79a.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-bab2ea2c.js";import"./shared-53e476fd.js";import"./foxy-template-set-card.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./foxy-payment-card-embed.js";import"./shared-0e156ee7.js";import"./shared-c2efc54e.js";import"./shared-5fd5805c.js";import"./shared-10b54c49.js";import"./shared-651c44fa.js";import"./shared-2e8361e1.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-528b3bdb.js";import"./shared-d279baa5.js";import"./shared-0d8e7067.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-1c07cd7f.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-9d7ae4aa.js";import"./shared-641786b2.js";import"./shared-03355bd1.js";import"./shared-c5cf889e.js";import"./shared-8676e5c0.js";import"./shared-a6b2bd14.js";import"./shared-901b41cf.js";import"./shared-f20eefdd.js";import"./shared-133fc37b.js";import"./shared-d0aed1c1.js";import"./shared-b738ee96.js";import"./shared-0053cf93.js";import"./shared-cf28d2c8.js";import"./shared-e0d1856d.js";import"./shared-86aa139c.js";import"./shared-4cf87721.js";import"./shared-f92b9842.js";import"./shared-60150977.js";let z,u,b,$=t=>t;class H extends r{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return h.styles}render(){const t=[],e=[];for(let s=0;s<this.size;++s)t.push(a(z||(z=$` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),s,m({"text-l font-medium px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==s}),s,this.value===s,(()=>this.value=s),this.__handleKeyDown,s)),e.push(a(u||(u=$` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),s,s,m({hidden:this.value!==s}),this.value!==s,s));return a(b||(b=$` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
1
+ import"./shared-01bb183b.js";import"./shared-5f43aa36.js";import{h as t}from"./shared-c52295d5.js";import"./shared-0b1b1c14.js";import"./shared-5212ef4f.js";import"./foxy-payment-method-card.js";import"./foxy-update-payment-method-form.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-231687fd.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./shared-4e8a5b95.js";import{aH as e,_ as s}from"./shared-d1195c27.js";import{L as r,h as a,c as o}from"./shared-ba5c42c7.js";import{C as i}from"./shared-eeb2bd18.js";import"./shared-1482d5dd.js";import"./shared-89d09114.js";import{z as h,S as d,T as n,a as l}from"./shared-f72d82a9.js";import{c as m}from"./shared-4e709717.js";import{S as c}from"./shared-cbd1fab7.js";import"./shared-1a49f70b.js";import{G as v}from"./shared-61ef8001.js";import"./shared-cd652fd0.js";import"./shared-6d11190a.js";import"./shared-d2340faa.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-fea2714e.js";import{N as p}from"./shared-d1dfac4d.js";import{S as f}from"./shared-4666b6aa.js";import{i as g}from"./shared-53e42a77.js";import"./shared-c1ade7a9.js";import"./shared-4c90701b.js";import"./shared-cf613436.js";import"./foxy-nucleon-element.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-6a45a781.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-d784b79a.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-bab2ea2c.js";import"./shared-53e476fd.js";import"./foxy-template-set-card.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./foxy-payment-card-embed.js";import"./shared-9ca85d1e.js";import"./shared-c2efc54e.js";import"./shared-5fd5805c.js";import"./shared-10b54c49.js";import"./shared-651c44fa.js";import"./shared-2e8361e1.js";import"./shared-3aaf64e6.js";import"./shared-76dcc864.js";import"./shared-528b3bdb.js";import"./shared-d279baa5.js";import"./shared-0d8e7067.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-1c07cd7f.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-9d7ae4aa.js";import"./shared-641786b2.js";import"./shared-03355bd1.js";import"./shared-c5cf889e.js";import"./shared-8676e5c0.js";import"./shared-a6b2bd14.js";import"./shared-901b41cf.js";import"./shared-f20eefdd.js";import"./shared-133fc37b.js";import"./shared-d0aed1c1.js";import"./shared-b738ee96.js";import"./shared-0053cf93.js";import"./shared-cf28d2c8.js";import"./shared-e0d1856d.js";import"./shared-86aa139c.js";import"./shared-4cf87721.js";import"./shared-f92b9842.js";import"./shared-60150977.js";let z,u,b,$=t=>t;class H extends r{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return h.styles}render(){const t=[],e=[];for(let s=0;s<this.size;++s)t.push(a(z||(z=$` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),s,m({"text-l font-medium px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==s}),s,this.value===s,(()=>this.value=s),this.__handleKeyDown,s)),e.push(a(u||(u=$` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),s,s,m({hidden:this.value!==s}),this.value!==s,s));return a(b||(b=$` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-cd652fd0.js";import"./shared-6d11190a.js";import"./shared-d2340faa.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-1482d5dd.js";import"./shared-fea2714e.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{_ as e}from"./shared-d1195c27.js";import{a as r,T as t}from"./shared-f72d82a9.js";import{C as o}from"./shared-eeb2bd18.js";import{h as s,L as a}from"./shared-ba5c42c7.js";import{P as d}from"./shared-0e156ee7.js";import"./shared-c2efc54e.js";import{I as l}from"./shared-17a61265.js";import{c as i}from"./shared-4e709717.js";import{s as c}from"./shared-1aff7995.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-343d1fd7.js";import"./shared-53e42a77.js";import"./shared-019348d7.js";let n,u=e=>e;const m=o(r(l(t(a)),"payment-card-embed"));class p extends m{constructor(){super(...arguments),this.url=null,this.__configRefreshInterval=null,this.__embed=null,this.__ready=!1}static get properties(){return e(e({},super.properties),{},{__ready:{attribute:!1},url:{}})}disconnectedCallback(){var e;super.disconnectedCallback(),clearInterval(null!==(e=this.__configRefreshInterval)&&void 0!==e?e:void 0)}connectedCallback(){super.connectedCallback(),this.__configRefreshInterval=setInterval((()=>{var e;const r=this.__config;r&&(null===(e=this.__embed)||void 0===e||e.configure(r))}),1e3)}tokenize(){var e,r;return null!==(r=null===(e=this.__embed)||void 0===e?void 0:e.tokenize())&&void 0!==r?r:Promise.reject()}updated(e){super.updated(e),(e.has("hidden")||e.has("url"))&&this.__setupEmbed()}render(){return s(n||(n=u` <div class="relative"> <div class="${0}" id="iframe-container"></div> <div class="${0}"> <foxy-spinner infer="spinner" layout="no-label"></foxy-spinner> </div> <div class="hidden ml-m mr-s bg-contrast-5 text-contrast-10 h-m w-xs rounded-tr-m rounded-br-s font-lumo text-m leading-xs" style="border-top-color:var(--lumo-primary-color);border-bottom-color:var(--lumo-primary-text-color);border-left-color:var(--lumo-primary-color-50pct);border-right-color:var(--lumo-secondary-text-color)" id="d1"></div> <div class="hidden text-s text-disabled" style="background-color:var(--lumo-body-text-color);border-top-color:var(--lumo-error-text-color);border-bottom-color:var(--lumo-error-color-10pct);border-left-color:var(--lumo-error-color-50pct)" id="d2"></div> <div class="hidden text-contrast-50 text-xs bg-base" id="d3"></div> </div> `),i({"transition-opacity relative":!0,"opacity-0":!this.__ready}),i({"absolute inset-0 flex items-center justify-center":!0,"transition-opacity pointer-events-none":!0,"opacity-0":this.__ready}))}clear(){var e;null===(e=this.__embed)||void 0===e||e.clear()}get __config(){const e=this.renderRoot.querySelector("#d1"),r=this.renderRoot.querySelector("#d2"),t=this.renderRoot.querySelector("#d3");if(!e||!r||!t)return null;const o=getComputedStyle(e),s=getComputedStyle(r),a=getComputedStyle(t),d={"--lumo-space-m":o.marginLeft,"--lumo-space-s":o.marginRight,"--lumo-contrast-5pct":o.backgroundColor,"--lumo-contrast-10pct":o.color,"--lumo-contrast-50pct":a.color,"--lumo-size-m":o.height,"--lumo-size-xs":o.width,"--lumo-border-radius-m":o.borderTopRightRadius,"--lumo-border-radius-s":o.borderBottomRightRadius,"--lumo-font-family":o.fontFamily,"--lumo-font-size-m":o.fontSize,"--lumo-font-size-s":s.fontSize,"--lumo-font-size-xs":a.fontSize,"--lumo-primary-color":o.borderTopColor,"--lumo-primary-text-color":o.borderBottomColor,"--lumo-primary-color-50pct":o.borderLeftColor,"--lumo-secondary-text-color":o.borderRightColor,"--lumo-disabled-text-color":s.color,"--lumo-body-text-color":s.backgroundColor,"--lumo-error-text-color":s.borderTopColor,"--lumo-error-color-10pct":s.borderBottomColor,"--lumo-error-color-50pct":s.borderLeftColor,"--lumo-line-height-xs":o.lineHeight,"--lumo-base-color":a.backgroundColor},l={};return["stripe.label","stripe.status.idle","stripe.status.busy","stripe.status.fail","square.label","square.status.idle","square.status.busy","square.status.fail","default.cc-number.label","default.cc-number.placeholder","default.cc-number.v8n_required","default.cc-number.v8n_invalid","default.cc-number.v8n_unsupported","default.cc-exp.label","default.cc-exp.placeholder","default.cc-exp.v8n_required","default.cc-exp.v8n_invalid","default.cc-exp.v8n_expired","default.cc-csc.label","default.cc-csc.placeholder","default.cc-csc.v8n_required","default.cc-csc.v8n_invalid","default.status.idle","default.status.busy","default.status.fail","default.status.misconfigured"].forEach((e=>c(l,e,this.t(e)))),{translations:l,disabled:this.disabled,readonly:this.readonly,style:d,lang:this.lang}}__setupEmbed(){this.__embed&&this.__embed.unmount();const r=this.__config,t=this.renderRoot.querySelector("#iframe-container"),o=this.url;if(null!==o&&t&&r&&!this.hidden){const s=this.constructor;this.__embed=new s.PaymentCardEmbed(e({url:o},r)),this.__embed.mount(t).then((()=>this.__ready=!0)),this.__embed.onsubmit=()=>this.dispatchEvent(new CustomEvent("submit"))}else this.__ready=!1,this.__embed=null}}p.PaymentCardEmbed=d,customElements.define("foxy-payment-card-embed",p);export{p as PaymentCardEmbed};
1
+ import"./shared-cd652fd0.js";import"./shared-6d11190a.js";import"./shared-d2340faa.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-1482d5dd.js";import"./shared-fea2714e.js";import"./shared-01bb183b.js";import"./shared-89d09114.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{_ as e}from"./shared-d1195c27.js";import{a as r,T as t}from"./shared-f72d82a9.js";import{C as o}from"./shared-eeb2bd18.js";import{h as s,L as a}from"./shared-ba5c42c7.js";import{P as d}from"./shared-9ca85d1e.js";import"./shared-c2efc54e.js";import{I as l}from"./shared-17a61265.js";import{c as i}from"./shared-4e709717.js";import{s as c}from"./shared-1aff7995.js";import"./shared-c52295d5.js";import"./shared-5f43aa36.js";import"./shared-343d1fd7.js";import"./shared-53e42a77.js";import"./shared-019348d7.js";let n,u=e=>e;const m=o(r(l(t(a)),"payment-card-embed"));class p extends m{constructor(){super(...arguments),this.url=null,this.__configRefreshInterval=null,this.__embed=null,this.__ready=!1}static get properties(){return e(e({},super.properties),{},{__ready:{attribute:!1},url:{}})}disconnectedCallback(){var e;super.disconnectedCallback(),clearInterval(null!==(e=this.__configRefreshInterval)&&void 0!==e?e:void 0)}connectedCallback(){super.connectedCallback(),this.__configRefreshInterval=setInterval((()=>{var e;const r=this.__config;r&&(null===(e=this.__embed)||void 0===e||e.configure(r))}),1e3)}tokenize(){var e,r;return null!==(r=null===(e=this.__embed)||void 0===e?void 0:e.tokenize())&&void 0!==r?r:Promise.reject()}updated(e){super.updated(e),(e.has("hidden")||e.has("url"))&&this.__setupEmbed()}render(){return s(n||(n=u` <div class="relative"> <div class="${0}" id="iframe-container"></div> <div class="${0}"> <foxy-spinner infer="spinner" layout="no-label"></foxy-spinner> </div> <div class="hidden ml-m mr-s bg-contrast-5 text-contrast-10 h-m w-xs rounded-tr-m rounded-br-s font-lumo text-m leading-xs" style="border-top-color:var(--lumo-primary-color);border-bottom-color:var(--lumo-primary-text-color);border-left-color:var(--lumo-primary-color-50pct);border-right-color:var(--lumo-secondary-text-color)" id="d1"></div> <div class="hidden text-s text-disabled" style="background-color:var(--lumo-body-text-color);border-top-color:var(--lumo-error-text-color);border-bottom-color:var(--lumo-error-color-10pct);border-left-color:var(--lumo-error-color-50pct)" id="d2"></div> <div class="hidden text-contrast-50 text-xs bg-base" id="d3"></div> </div> `),i({"transition-opacity relative":!0,"opacity-0":!this.__ready}),i({"absolute inset-0 flex items-center justify-center":!0,"transition-opacity pointer-events-none":!0,"opacity-0":this.__ready}))}clear(){var e;null===(e=this.__embed)||void 0===e||e.clear()}get __config(){const e=this.renderRoot.querySelector("#d1"),r=this.renderRoot.querySelector("#d2"),t=this.renderRoot.querySelector("#d3");if(!e||!r||!t)return null;const o=getComputedStyle(e),s=getComputedStyle(r),a=getComputedStyle(t),d={"--lumo-space-m":o.marginLeft,"--lumo-space-s":o.marginRight,"--lumo-contrast-5pct":o.backgroundColor,"--lumo-contrast-10pct":o.color,"--lumo-contrast-50pct":a.color,"--lumo-size-m":o.height,"--lumo-size-xs":o.width,"--lumo-border-radius-m":o.borderTopRightRadius,"--lumo-border-radius-s":o.borderBottomRightRadius,"--lumo-font-family":o.fontFamily,"--lumo-font-size-m":o.fontSize,"--lumo-font-size-s":s.fontSize,"--lumo-font-size-xs":a.fontSize,"--lumo-primary-color":o.borderTopColor,"--lumo-primary-text-color":o.borderBottomColor,"--lumo-primary-color-50pct":o.borderLeftColor,"--lumo-secondary-text-color":o.borderRightColor,"--lumo-disabled-text-color":s.color,"--lumo-body-text-color":s.backgroundColor,"--lumo-error-text-color":s.borderTopColor,"--lumo-error-color-10pct":s.borderBottomColor,"--lumo-error-color-50pct":s.borderLeftColor,"--lumo-line-height-xs":o.lineHeight,"--lumo-base-color":a.backgroundColor},l={};return["stripe.label","stripe.status.idle","stripe.status.busy","stripe.status.fail","square.label","square.status.idle","square.status.busy","square.status.fail","default.cc-number.label","default.cc-number.placeholder","default.cc-number.v8n_required","default.cc-number.v8n_invalid","default.cc-number.v8n_unsupported","default.cc-exp.label","default.cc-exp.placeholder","default.cc-exp.v8n_required","default.cc-exp.v8n_invalid","default.cc-exp.v8n_expired","default.cc-csc.label","default.cc-csc.placeholder","default.cc-csc.v8n_required","default.cc-csc.v8n_invalid","default.status.idle","default.status.busy","default.status.fail","default.status.misconfigured"].forEach((e=>c(l,e,this.t(e)))),{translations:l,disabled:this.disabled,readonly:this.readonly,style:d,lang:this.lang}}__setupEmbed(){this.__embed&&this.__embed.unmount();const r=this.__config,t=this.renderRoot.querySelector("#iframe-container"),o=this.url;if(null!==o&&t&&r&&!this.hidden){const s=this.constructor;this.__embed=new s.PaymentCardEmbed(e({url:o},r)),this.__embed.mount(t).then((()=>this.__ready=!0)),this.__embed.onsubmit=()=>this.dispatchEvent(new CustomEvent("submit"))}else this.__ready=!1,this.__embed=null}}p.PaymentCardEmbed=d,customElements.define("foxy-payment-card-embed",p);export{p as PaymentCardEmbed};
@@ -1 +1 @@
1
- import"./shared-01bb183b.js";import"./shared-5f43aa36.js";import"./shared-0b1b1c14.js";import"./shared-4c90701b.js";import"./shared-5212ef4f.js";import"./foxy-update-payment-method-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{l as s,u as r}from"./shared-cf613436.js";import{C as a}from"./shared-eeb2bd18.js";import{T as i,a as o}from"./shared-f72d82a9.js";import"./foxy-nucleon-element.js";import{u as d,h as n,c as l}from"./shared-ba5c42c7.js";import{i as c}from"./shared-53e42a77.js";import{c as m}from"./shared-4e709717.js";import{N as p}from"./shared-d1dfac4d.js";import"./shared-c52295d5.js";import"./shared-1482d5dd.js";import"./shared-c1ade7a9.js";import"./shared-1a49f70b.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-collection-page.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-d784b79a.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./foxy-payment-card-embed.js";import"./shared-cd652fd0.js";import"./shared-fea2714e.js";import"./shared-6d11190a.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-0e156ee7.js";import"./shared-c2efc54e.js";const h=d("\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"),f=d(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} ${h} }`)).join(" "));let u,b,y,j,v,g,$,x,_,S,w=e=>e;const T=i(a(o(p,"payment-method-card")));class k extends T{constructor(){super(...arguments),this.embedUrl=null,this.__renderActionsUpdate=()=>{var e;const t=!!(null===(e=this.data)||void 0===e?void 0:e.save_cc),s=t?"--lumo-primary-text-color: #fff; --lumo-primary-color-50pct: rgba(255, 255, 255, 0.5); --lumo-contrast-5pct: rgba(255, 255, 255, 0.05)":void 0;return n(u||(u=w` <div class="flex"> ${0} <foxy-form-dialog data-testid="update-dialog" readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="status ${0}" header="${0}" group="${0}" form="foxy-update-payment-method-form" href="${0}" lang="${0}" ns="${0} dialog" alert close-on-patch .props="${0}"> </foxy-form-dialog> <vaadin-button class="${0}" theme="${0}" style="${0}" aria-label="${0}" data-testid="actions:update" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("actions:update:before"),this.readonlySelector.zoom("actions:update:form"),this.disabledSelector.zoom("actions:update:form"),this.hiddenSelector.zoom("actions:update:form"),t?"dialog_header_update":"dialog_header_add",this.group,this.href,this.lang,this.ns,{".embedUrl":this.embedUrl},c(t?"px-xs rounded":void 0),t?"icon":"contrast small",c(s),this.t(t?"update":"add"),this.disabledSelector.matches("actions:update",!0),(e=>{const t=e.currentTarget;t.previousElementSibling.show(t)}),n(t?b||(b=w`<iron-icon icon="icons:create"></iron-icon>`):y||(y=w`<foxy-i18n infer="" key="add"></foxy-i18n>`)),this.renderTemplateOrSlot("actions:update:after"))},this.__renderActionsDelete=()=>n(j||(j=w` <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=()=>{const e=this.hiddenSelector.matches("actions:update",!0)||!this.embedUrl,t=this.hiddenSelector.matches("actions:delete",!0);return n(v||(v=w` <div class="flex gap-s" data-testid="actions"> ${0} ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("actions:before"),e?"":this.__renderActionsUpdate(),t?"":this.__renderActionsDelete(),this.renderTemplateOrSlot("actions:after"))}}static get properties(){return e(e({},super.properties),{},{embedUrl:{attribute:"embed-url"}})}static get styles(){return[super.styles,f,l(g||(g=w`.ratio-card{padding-top:63%;position:relative;height:0}.ratio-card>*{position:absolute;top:0;right:0;bottom:0;left:0}`))]}render(){var e,a,i,o,d,l;const{data:c,lang:p,ns:h}=this;if(this.in({idle:"template"})||!(null==c?void 0:c.save_cc)||!this.in("idle")){const t=this.in("fail")?"error":this.in("busy")?"busy":"empty",s=this.hiddenSelector.matches("actions:update",!0)||!this.embedUrl||!this.data;return n($||($=w` <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 flex-col gap-m items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),t,this.lang,h,null!==(a=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==a?a:"",s?"":this.__renderActionsUpdate())}const f=null!==(o=null===(i=c.cc_type)||void 0===i?void 0:i.toLowerCase())&&void 0!==o?o:"unknown",u=null!==(d=s[f])&&void 0!==d?d:r,b=null===(l=c.cc_number_masked)||void 0===l?void 0:l.substring(c.cc_number_masked.length-4);return n(x||(x=w` <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}"> <div class="mr-auto rounded h-m">${0}</div> ${0} </div> <div class="font-tnum leading-none flex justify-between" style="color:#fff"> <div data-testid="expiry"> ${0} </div> <div data-testid="number"> ${0} </div> </div> </div> </div> `),p,h,this.__handleConfirmHide,this.in("busy"),f,m({"flex items-start":!0,"justify-between":this.readonlyControls===t.False,"justify-end":this.readonlyControls===t.True}),u,this.hiddenSelector.matches("actions",!0)?"":this.__renderActions(),c.cc_exp_month&&c.cc_exp_year?n(_||(_=w` <span class="sr-only">${0}&nbsp;</span> <span>${0} / ${0}</span> `),this.t("expires").toString(),c.cc_exp_month,c.cc_exp_year):"",b?n(S||(S=w` <span class="sr-only">${0}&nbsp;</span> <span aria-hidden="true">••••</span> <span>${0}</span> `),this.t("last_4_digits").toString(),b):"")}async _sendDelete(){const e=JSON.stringify({save_cc:!1});await this._fetch(this.href,{method:"PATCH",body:e});return p.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",k);export{k as PaymentMethodCard};
1
+ import"./shared-01bb183b.js";import"./shared-5f43aa36.js";import"./shared-0b1b1c14.js";import"./shared-4c90701b.js";import"./shared-5212ef4f.js";import"./foxy-update-payment-method-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4e8a5b95.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{l as s,u as r}from"./shared-cf613436.js";import{C as a}from"./shared-eeb2bd18.js";import{T as i,a as o}from"./shared-f72d82a9.js";import"./foxy-nucleon-element.js";import{u as d,h as n,c as l}from"./shared-ba5c42c7.js";import{i as c}from"./shared-53e42a77.js";import{c as m}from"./shared-4e709717.js";import{N as p}from"./shared-d1dfac4d.js";import"./shared-c52295d5.js";import"./shared-1482d5dd.js";import"./shared-c1ade7a9.js";import"./shared-1a49f70b.js";import"./shared-7e9fdf64.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-2d11750b.js";import"./shared-7ce74b42.js";import"./shared-0b00883f.js";import"./shared-2879b67f.js";import"./shared-d2340faa.js";import"./shared-6a45a781.js";import"./foxy-collection-page.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-d784b79a.js";import"./foxy-copy-to-clipboard.js";import"./shared-2503aefc.js";import"./shared-89d09114.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-25893d83.js";import"./shared-93774efe.js";import"./foxy-payment-card-embed.js";import"./shared-cd652fd0.js";import"./shared-fea2714e.js";import"./shared-6d11190a.js";import"./shared-6b76afc2.js";import"./shared-cc76a917.js";import"./shared-9ca85d1e.js";import"./shared-c2efc54e.js";const h=d("\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"),f=d(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} ${h} }`)).join(" "));let u,b,y,j,v,g,$,x,_,S,w=e=>e;const T=i(a(o(p,"payment-method-card")));class k extends T{constructor(){super(...arguments),this.embedUrl=null,this.__renderActionsUpdate=()=>{var e;const t=!!(null===(e=this.data)||void 0===e?void 0:e.save_cc),s=t?"--lumo-primary-text-color: #fff; --lumo-primary-color-50pct: rgba(255, 255, 255, 0.5); --lumo-contrast-5pct: rgba(255, 255, 255, 0.05)":void 0;return n(u||(u=w` <div class="flex"> ${0} <foxy-form-dialog data-testid="update-dialog" readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="status ${0}" header="${0}" group="${0}" form="foxy-update-payment-method-form" href="${0}" lang="${0}" ns="${0} dialog" alert close-on-patch .props="${0}"> </foxy-form-dialog> <vaadin-button class="${0}" theme="${0}" style="${0}" aria-label="${0}" data-testid="actions:update" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("actions:update:before"),this.readonlySelector.zoom("actions:update:form"),this.disabledSelector.zoom("actions:update:form"),this.hiddenSelector.zoom("actions:update:form"),t?"dialog_header_update":"dialog_header_add",this.group,this.href,this.lang,this.ns,{".embedUrl":this.embedUrl},c(t?"px-xs rounded":void 0),t?"icon":"contrast small",c(s),this.t(t?"update":"add"),this.disabledSelector.matches("actions:update",!0),(e=>{const t=e.currentTarget;t.previousElementSibling.show(t)}),n(t?b||(b=w`<iron-icon icon="icons:create"></iron-icon>`):y||(y=w`<foxy-i18n infer="" key="add"></foxy-i18n>`)),this.renderTemplateOrSlot("actions:update:after"))},this.__renderActionsDelete=()=>n(j||(j=w` <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=()=>{const e=this.hiddenSelector.matches("actions:update",!0)||!this.embedUrl,t=this.hiddenSelector.matches("actions:delete",!0);return n(v||(v=w` <div class="flex gap-s" data-testid="actions"> ${0} ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("actions:before"),e?"":this.__renderActionsUpdate(),t?"":this.__renderActionsDelete(),this.renderTemplateOrSlot("actions:after"))}}static get properties(){return e(e({},super.properties),{},{embedUrl:{attribute:"embed-url"}})}static get styles(){return[super.styles,f,l(g||(g=w`.ratio-card{padding-top:63%;position:relative;height:0}.ratio-card>*{position:absolute;top:0;right:0;bottom:0;left:0}`))]}render(){var e,a,i,o,d,l;const{data:c,lang:p,ns:h}=this;if(this.in({idle:"template"})||!(null==c?void 0:c.save_cc)||!this.in("idle")){const t=this.in("fail")?"error":this.in("busy")?"busy":"empty",s=this.hiddenSelector.matches("actions:update",!0)||!this.embedUrl||!this.data;return n($||($=w` <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 flex-col gap-m items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),t,this.lang,h,null!==(a=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==a?a:"",s?"":this.__renderActionsUpdate())}const f=null!==(o=null===(i=c.cc_type)||void 0===i?void 0:i.toLowerCase())&&void 0!==o?o:"unknown",u=null!==(d=s[f])&&void 0!==d?d:r,b=null===(l=c.cc_number_masked)||void 0===l?void 0:l.substring(c.cc_number_masked.length-4);return n(x||(x=w` <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}"> <div class="mr-auto rounded h-m">${0}</div> ${0} </div> <div class="font-tnum leading-none flex justify-between" style="color:#fff"> <div data-testid="expiry"> ${0} </div> <div data-testid="number"> ${0} </div> </div> </div> </div> `),p,h,this.__handleConfirmHide,this.in("busy"),f,m({"flex items-start":!0,"justify-between":this.readonlyControls===t.False,"justify-end":this.readonlyControls===t.True}),u,this.hiddenSelector.matches("actions",!0)?"":this.__renderActions(),c.cc_exp_month&&c.cc_exp_year?n(_||(_=w` <span class="sr-only">${0}&nbsp;</span> <span>${0} / ${0}</span> `),this.t("expires").toString(),c.cc_exp_month,c.cc_exp_year):"",b?n(S||(S=w` <span class="sr-only">${0}&nbsp;</span> <span aria-hidden="true">••••</span> <span>${0}</span> `),this.t("last_4_digits").toString(),b):"")}async _sendDelete(){const e=JSON.stringify({save_cc:!1});await this._fetch(this.href,{method:"PATCH",body:e});return p.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",k);export{k as PaymentMethodCard};