@foxy.io/elements 1.42.0-beta.2 → 1.42.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 (58) hide show
  1. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  2. package/dist/cdn/foxy-api-browser.js +1 -1
  3. package/dist/cdn/foxy-cart-form.js +1 -1
  4. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  5. package/dist/cdn/foxy-coupon-form.js +1 -1
  6. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  7. package/dist/cdn/foxy-customer-portal.js +2 -2
  8. package/dist/cdn/foxy-customer.js +1 -1
  9. package/dist/cdn/foxy-email-template-form.js +1 -1
  10. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  11. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  12. package/dist/cdn/foxy-gift-card-form.js +1 -1
  13. package/dist/cdn/foxy-item-category-form.js +1 -1
  14. package/dist/cdn/foxy-item-form.js +1 -1
  15. package/dist/cdn/foxy-item-option-form.js +1 -1
  16. package/dist/cdn/foxy-native-integration-form.js +1 -1
  17. package/dist/cdn/foxy-pagination.js +1 -1
  18. package/dist/cdn/foxy-payment-method-card.js +1 -1
  19. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  20. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  21. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  22. package/dist/cdn/foxy-store-form.js +1 -1
  23. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  24. package/dist/cdn/foxy-subscription-form.js +1 -1
  25. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  26. package/dist/cdn/foxy-tax-form.js +1 -1
  27. package/dist/cdn/foxy-template-config-form.js +1 -1
  28. package/dist/cdn/foxy-template-form.js +1 -1
  29. package/dist/cdn/foxy-template-set-form.js +1 -1
  30. package/dist/cdn/foxy-transaction-card.js +1 -1
  31. package/dist/cdn/foxy-transaction.js +1 -1
  32. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  33. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  34. package/dist/cdn/foxy-webhook-form.js +1 -1
  35. package/dist/cdn/{shared-182a87a3.js → shared-303dc2a6.js} +1 -1
  36. package/dist/cdn/{shared-aa1dfc6b.js → shared-9f4f8e95.js} +1 -1
  37. package/dist/cdn/{shared-3691287b.js → shared-bfdbe217.js} +1 -1
  38. package/dist/cdn/{shared-ba4f2bca.js → shared-ef98e595.js} +1 -1
  39. package/dist/cdn/translations/payments-api-payment-method-form/en.json +40 -0
  40. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +40 -0
  41. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +3 -2
  42. package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
  43. package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js +3 -6
  44. package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js.map +1 -1
  45. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +2 -2
  46. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
  47. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +1 -0
  48. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
  49. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +1 -0
  50. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +50 -1
  51. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  52. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +1 -0
  53. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +1 -0
  54. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -1
  55. package/dist/elements/public/TransactionCard/TransactionCard.js +2 -1
  56. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  57. package/package.json +1 -1
  58. /package/dist/cdn/{shared-d62dcad6.js → shared-dd2a66a5.js} +0 -0
@@ -1 +1 @@
1
- import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-70380f94.js";import"./shared-68a5368a.js";import{a as e}from"./shared-cc5e4c06.js";import"./foxy-spinner.js";import{_ as t,B as i}from"./shared-cb58dfcd.js";import{h as o,s}from"./shared-ba5c42c7.js";import{D as r}from"./shared-a4ca1c5d.js";import{A as n}from"./shared-5592ec6e.js";import{i as a}from"./shared-53e42a77.js";import"./shared-3691287b.js";import"./shared-ba4f2bca.js";import"./shared-bf5b2106.js";import{I as d}from"./shared-0643656a.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import{g as l}from"./shared-bab2ea2c.js";import{c}from"./shared-4e709717.js";import{R as u,a as f}from"./shared-1ce5b073.js";import"./shared-7a4ca3f1.js";import"./shared-253e51f7.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-75e7361d.js";import"./shared-0995ae7c.js";import"./shared-a3a4c368.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-91bf0fa2.js";import"./shared-7b3aac7e.js";import"./shared-500b7eb7.js";import"./shared-92153a7f.js";import"./shared-63b647a8.js";import"./shared-5fd5805c.js";import"./shared-93c8789e.js";import"./shared-42c91940.js";import"./shared-49337d35.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-eb963ba3.js";import"./shared-cf613436.js";import"./shared-38eb8858.js";import"./shared-4e309d01.js";import"./shared-76cbea00.js";import"./shared-4ded48ee.js";import"./shared-d2304d50.js";import"./shared-c92d72ba.js";import"./shared-5c057c26.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-f15af5d1.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./shared-1f6366c0.js";import"./shared-8b891950.js";import"./shared-182a87a3.js";import"./foxy-form-dialog.js";import"./shared-53e476fd.js";import"./shared-aa1dfc6b.js";import"./shared-6b3b8c63.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-6286efb1.js";import"./shared-79a6aa1a.js";import"./shared-e4768909.js";import"./shared-25167d28.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-collection-page.js";import"./foxy-pagination.js";let h,p,m,v,_,y,x,b=e=>e;let g,j=e=>e;customElements.define("foxy-internal-post-action-control",class extends e{constructor(){super(...arguments),this.messageOptions={},this.theme=null,this.href=null}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},theme:{},href:{}})}renderControl(){var e,t;return o(g||(g=j` <foxy-internal-post-action-control-dialog message-options="${0}" infer="" href="${0}" @hide="${0}"> </foxy-internal-post-action-control-dialog> <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button"></foxy-i18n> </vaadin-button> `),JSON.stringify(this.messageOptions),a(null!==(e=this.href)&&void 0!==e?e:void 0),(e=>{e.detail.cancelled||this.dispatchEvent(new CustomEvent("success"))}),a(null!==(t=this.theme)&&void 0!==t?t:void 0),this.disabled||this.readonly,(e=>{const t=e.currentTarget,i=this.renderRoot.querySelector("foxy-internal-post-action-control-dialog");null==i||i.show(t)}))}}),customElements.define("foxy-internal-post-action-control-dialog",class extends r{constructor(){super(...arguments),this.messageOptions={},this.closable=!0,this.header="header",this.alert=!0,this.href=null,this.__api=new n(this),this.__state="idle"}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},href:{},__state:{attribute:!1}})}get hiddenSelector(){const e=["close-button",super.hiddenSelector.toString()];return new i(e.join(" ").trim())}render(){var e=this;return super.render((()=>o(h||(h=b` <div class="relative"> <div class="mb-m mt-xs flex justify-center"> ${0} </div> <foxy-i18n class="block font-lumo text-m text-body text-center mb-l" infer="" key="message_${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> ${0} </div> ${0} </div> `),"done"===this.__state?s(p||(p=b`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>`)):"fail"===this.__state?s(m||(m=b`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" /></svg>`)):s(v||(v=b`<svg class="text-primary" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),"busy"===this.__state?"idle":this.__state,this.messageOptions,"done"===this.__state||"fail"===this.__state?o(_||(_=b` <vaadin-button class="col-span-2" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="button_close"></foxy-i18n> </vaadin-button> `),(()=>this.hide())):o(y||(y=b` <vaadin-button ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_cancel"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_confirm"></foxy-i18n> </vaadin-button> `),this.disabled||this.readonly,(()=>this.hide()),this.disabled||this.readonly,(async function(){if(e.href&&"idle"===e.__state){e.__state="busy",e.closable=!1;const t=await e.__api.fetch(e.href,{method:"POST"});e.__state=t.ok?"done":"fail",e.closable=!0}})),"busy"===this.__state?o(x||(x=b` <div class="bg-base absolute inset-0 flex items-center justify-center"> <foxy-spinner layout="vertical" infer=""></foxy-spinner> </div> `)):"")))}async hide(){await super.hide("done"!==this.__state),this.__state="idle"}});let w,k,$,S,P=e=>e;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return t(t({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var e,t,i,r;const n=this.nucleon,d=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e._links["fx:customer"].href,u=d?null===(t=null==n?void 0:n.getCustomerPageHref)||void 0===t?void 0:t.call(n,d):void 0;return o(w||(w=P` <foxy-i18n infer="" class="block text-l font-medium leading-xs mb-s" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),c({"block ring-inset rounded transition-colors bg-contrast-5":!0,"cursor-pointer hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),a(u),a(d),this.__renderCopyAction(s(k||(k=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",d?String(l(d)):""),this.__renderCopyAction(s($||($=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(r=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.customer_email)&&void 0!==r?r:""))}__renderCopyAction(e,t,i,s){const r=this[i],n="fail"===r?"error":"done"===r?"end":"busy";return o(S||(S=P` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==r,(()=>"idle"===r&&this.__copy(s,i)),(e=>"idle"!==r&&e.stopPropagation()),(e=>"idle"!==r&&e.stopPropagation()),c({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==r}),e,t,c({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===r}),n)}async __copy(e,t){this[t]="busy";try{await navigator.clipboard.writeText(e),this[t]="done"}catch(e){this[t]="fail"}setTimeout((()=>this[t]="idle"),3e3)}});let C,A,H,L,E,O,B,R=e=>e;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var e,t,i,s,r,n,a,d,l,c,u,f;const h=this.nucleon;return o(C||(C=R` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} ${0} <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="archive" key="caption_${0}"> </foxy-i18n> </vaadin-button> </div> `),(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"])?this.__renderCaptureAction():"",(null===(s=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===s?void 0:s._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"",(null===(f=null===(u=this.nucleon)||void 0===u?void 0:u.data)||void 0===f?void 0:f._links["fx:receipt"])?this.__renderReceiptAction():"",this.disabledSelector.matches("archive",!0),(()=>{null==h||h.edit({hide_transaction:!(null==h?void 0:h.form.hide_transaction)}),null==h||h.submit()}),(null==h?void 0:h.form.hide_transaction)?"unarchive":"archive")}__renderSendEmailsAction(){var e,t;return o(A||(A=R` <foxy-internal-post-action-control infer="send-emails" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:send_emails"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderCaptureAction(){var e,t;return o(H||(H=R` <foxy-internal-post-action-control theme="tertiary-inline success" infer="capture" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderVoidAction(){var e,t,i;return o(L||(L=R` <foxy-internal-post-action-control theme="tertiary-inline error" infer="void" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderRefundAction(){var e,t,i;return o(E||(E=R` <foxy-internal-post-action-control infer="refund" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderSubscriptionAction(){var e,t,i;const s=this.nucleon,r=null===(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._links["fx:subscription"])||void 0===t?void 0:t.href,n=r?null===(i=null==s?void 0:s.getSubscriptionPageHref)||void 0===i?void 0:i.call(s,r):void 0;return o(O||(O=R` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),a(n))}__renderReceiptAction(){var e,t;const i=this.nucleon;return o(B||(B=R` <a target="_blank" class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="receipt" key="caption"></foxy-i18n> </a> `),a(null===(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e._links["fx:receipt"])||void 0===t?void 0:t.href))}});let Z,I,M,q,G,T,U,W,z,D,V,J=e=>e;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var e,t,i,s,r,n,d,l,c;const u=null===(e=this.nucleon)||void 0===e?void 0:e.data;if(!u)return o(Z||(Z=J``));const f=null!==(i=null===(t=null==u?void 0:u._embedded)||void 0===t?void 0:t["fx:applied_taxes"])&&void 0!==i?i:[],h=null!==(r=null===(s=u._embedded)||void 0===s?void 0:s["fx:shipments"])&&void 0!==r?r:[];return o(I||(I=J` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===h.length||0===u.total_shipping?o(M||(M=J` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):h.map((e=>o(q||(q=J` <span>${0}&colon;</span> <span>${0}</span> `),e.shipping_service_description,this.__renderPrice(e.total_shipping,!0)))),0===f.length||0===u.total_tax?o(G||(G=J` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):f.map((e=>o(T||(T=J` <span>${0}&colon;</span> <span>${0}</span> `),e.name,this.__renderPrice(e.amount,!0)))),null===(d=null===(n=null==u?void 0:u._embedded)||void 0===n?void 0:n["fx:gift_card_code_logs"])||void 0===d?void 0:d.map((e=>{var t,i,s,r,n;const a=null===(i=null===(t=e._embedded)||void 0===t?void 0:t["fx:gift_card"])||void 0===i?void 0:i.name,d=null===(r=null===(s=e._embedded)||void 0===s?void 0:s["fx:gift_card_code"])||void 0===r?void 0:r.code;if(a&&d)return o(U||(U=J` <span data-testclass="gift-card-code">${0} &bull; ${0}&colon;</span> <span>${0}</span> `),a,d,this.__renderPrice(null!==(n=e.balance_adjustment)&&void 0!==n?n:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((({name:e,code:t,amount:i})=>o(W||(W=J` <span data-testclass="discount">${0}${0}&colon;</span> <span>${0}</span> `),e,t?o(z||(z=J` &bull; ${0}`),t):"",this.__renderPrice(i,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var e,t,i;return null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}__renderPrice(e,t=!1){var i,s,r;const n=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r.currency_code;return o(D||(D=J` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),t&&0!==e?e>0?"text-success":"text-error":"",{currencyDisplay:n,signDisplay:t?"exceptZero":"auto",amount:`${e} ${a}`})}__renderStatus(){var e,t;const i=(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t.status)||"completed";let s="";return s=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",o(V||(V=J` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),s,i)}});let N,F,K,Q=e=>e;const X=u(f(d,"transaction"));class Y extends X{constructor(){var e;super(...arguments),e=this,this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.localeCodes=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null,this.__webhooksBulkActions=[{name:"refeed",onClick:async function(t){if(!e.data)return;const i=e.data._links["fx:send_webhooks"].href,o=new Y.API(e),s=await o.fetch(i,{method:"POST",body:JSON.stringify({refeed_hooks:t.map((e=>l(e._links.self.href))),event:"refeed"})});if(t.forEach((e=>{Y.Rumour("").share({related:[...t.map((e=>e._links["fx:logs"].href)),...t.map((e=>e._links["fx:statuses"].href))],source:e._links.self.href,data:e})})),!s.ok)throw new Error(await s.text())}}]}static get properties(){return t(t({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1},localeCodes:{attribute:"locale-codes"}})}get readonlySelector(){var e,t,o;const s=["billing-addresses","datafeed:data-is-fed","webhooks:dialog:url",super.readonlySelector];return Boolean(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:void"])&&void 0!==t?t:null===(o=this.data)||void 0===o?void 0:o._links["fx:refund"])||s.push("items","attributes","custom-fields"),new i(s.join(" ").trim())}get hiddenSelector(){var e,t,o,s;const r=["billing-addresses:dialog:delete","billing-addresses:dialog:timestamps","webhooks:dialog:header:copy-json","webhooks:dialog:header:copy-id","webhooks:dialog:timestamps","webhooks:dialog:name","webhooks:dialog:query","webhooks:dialog:encryption-key","webhooks:dialog:delete",super.readonlySelector],n=null===(e=this.data)||void 0===e?void 0:e.type;return(null===(t=this.data)||void 0===t?void 0:t._links["fx:subscription"])||r.unshift("subscription"),"subscription_modification"===n&&r.unshift("actions"),"updateinfo"===n&&r.unshift("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===n&&r.unshift("not=customer,subscription,custom-fields,attributes"),(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s.use_webhook)||r.unshift("datafeed"),new i(r.join(" ").trim())}get headerSubtitleOptions(){var e,t,i,o,s;const r=null===(e=this.data)||void 0===e?void 0:e.source,n=null===(t=this.data)||void 0===t?void 0:t.type;let a="";return"updateinfo"===n?a=!r||(null==r?void 0:r.startsWith("cit_"))?"customer_changed_payment_method":"mit_uoe"===r?"admin_changed_payment_method_with_uoe":"mit_api"===r?"integration_changed_payment_method":"admin_changed_payment_method":"subscription_modification"===n?a=!r||(null==r?void 0:r.startsWith("cit_"))?"customer_changed_subscription":"mit_uoe"===r?"admin_changed_subscription_with_uoe":"mit_api"===r?"integration_changed_subscription":"admin_changed_subscription":"subscription_renewal"===n?"mit_recurring"===r?a="subscription_renewal_attempt":"mit_recurring_reattempt_automated"===r?a="subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===r&&(a="subscription_renewal_manual_reattempt"):"subscription_cancellation"===n?"cit_recurring_cancellation"===r?a="customer_canceled_subscription":"mit_recurring_cancellation"===r&&(a="admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==r?void 0:r.startsWith("cit_"))?a="customer_subscribed":"mit_uoe"===r?a="admin_subscribed_with_uoe":"mit_api"===r&&(a="integration_subscribed"):(null==r?void 0:r.startsWith("cit_"))?a="customer_placed_order":"mit_uoe"===r?a="admin_placed_order_with_uoe":"mit_api"===r&&(a="integration_placed_order"),{transaction_date:null===(o=this.data)||void 0===o?void 0:o.transaction_date,ip_country:null===(s=this.data)||void 0===s?void 0:s.ip_country,context:a}}get headerSubtitleBadges(){var e,t;const i=super.headerSubtitleBadges;return(null===(e=this.data)||void 0===e?void 0:e.is_test)&&i.push({key:"test"}),(null===(t=this.data)||void 0===t?void 0:t.hide_transaction)&&i.push({key:"archived"}),i}get headerCopyIdValue(){var e,t,i;return null!==(i=null===(t=null===(e=this.data)||void 0===e?void 0:e.display_id)||void 0===t?void 0:t.toString())&&void 0!==i?i:""}renderHeaderActions(){return o(N||(N=Q` <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> `))}renderBody(){var e,t,i,s,r,n,d,l,c,u,f,h,p,m,v,_;let y,x,b;const g=this.hiddenSelector;if(this.data)try{const o=new URL(this.data._links["fx:shipments"].href),s=new URL(null!==(i=null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:webhooks"].href)&&void 0!==i?i:""),r=new URL(this.data._links["fx:items"].href);o.searchParams.set("zoom","items:item_category"),s.searchParams.set("event_resource","transaction"),r.searchParams.set("zoom","item_options"),y=o.toString(),x=s.toString(),b=r.toString()}catch(e){}return o(F||(F=Q` ${0} ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert wide .related="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="webhooks" first="${0}" item="foxy-webhook-card" form="foxy-webhook-form" hide-create-button hide-delete-button alert .bulkActions="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="datafeed"> <foxy-internal-switch-control infer="data-is-fed"></foxy-internal-switch-control> <foxy-internal-post-action-control infer="process-webhook" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> </foxy-internal-summary-control> <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),["problem","pending_fraud_review","rejected","declined"].includes(null!==(r=null===(s=this.data)||void 0===s?void 0:s.status)&&void 0!==r?r:"")?o(K||(K=Q` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(n=this.data)||void 0===n?void 0:n.status):"",g.matches("items",!0)&&g.matches("summary",!0),a(b),[this.href],{"locale-codes":this.localeCodes},{"item-categories":null===(l=null===(d=this.__storeLoader)||void 0===d?void 0:d.data)||void 0===l?void 0:l._links["fx:item_categories"].href,"locale-codes":this.localeCodes,store:null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href},a(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),a(null===(f=this.data)||void 0===f?void 0:f._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},a(null===(h=this.data)||void 0===h?void 0:h._links["fx:custom_fields"].href),a(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),a(y),a(x),this.__webhooksBulkActions,{"resource-uri":this.href},{"resource-uri":this.href},a(null===(v=null===(m=this.data)||void 0===m?void 0:m._links["fx:process_webhook"])||void 0===v?void 0:v.href),(()=>this.refresh()),a(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}}customElements.define("foxy-transaction",Y);export{Y as Transaction};
1
+ import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-webhook-card.js";import"./foxy-webhook-form.js";import"./foxy-address-form.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-70380f94.js";import"./shared-68a5368a.js";import{a as e}from"./shared-cc5e4c06.js";import"./foxy-spinner.js";import{_ as t,B as i}from"./shared-cb58dfcd.js";import{h as o,s}from"./shared-ba5c42c7.js";import{D as r}from"./shared-a4ca1c5d.js";import{A as n}from"./shared-5592ec6e.js";import{i as a}from"./shared-53e42a77.js";import"./shared-bfdbe217.js";import"./shared-ef98e595.js";import"./shared-bf5b2106.js";import{I as d}from"./shared-0643656a.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import{g as l}from"./shared-bab2ea2c.js";import{c}from"./shared-4e709717.js";import{R as u,a as f}from"./shared-1ce5b073.js";import"./shared-7a4ca3f1.js";import"./shared-253e51f7.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-75e7361d.js";import"./shared-0995ae7c.js";import"./shared-a3a4c368.js";import"./shared-5212ef4f.js";import"./shared-5afb584d.js";import"./shared-91bf0fa2.js";import"./shared-7b3aac7e.js";import"./shared-500b7eb7.js";import"./shared-92153a7f.js";import"./shared-63b647a8.js";import"./shared-5fd5805c.js";import"./shared-93c8789e.js";import"./shared-42c91940.js";import"./shared-49337d35.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-eb963ba3.js";import"./shared-cf613436.js";import"./shared-38eb8858.js";import"./shared-4e309d01.js";import"./shared-76cbea00.js";import"./shared-4ded48ee.js";import"./shared-d2304d50.js";import"./shared-c92d72ba.js";import"./shared-5c057c26.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-f15af5d1.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./shared-1f6366c0.js";import"./shared-8b891950.js";import"./shared-303dc2a6.js";import"./foxy-form-dialog.js";import"./shared-53e476fd.js";import"./shared-9f4f8e95.js";import"./shared-6b3b8c63.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-6286efb1.js";import"./shared-79a6aa1a.js";import"./shared-e4768909.js";import"./shared-25167d28.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-collection-page.js";import"./foxy-pagination.js";let h,p,m,v,_,y,x,b=e=>e;let g,j=e=>e;customElements.define("foxy-internal-post-action-control",class extends e{constructor(){super(...arguments),this.messageOptions={},this.theme=null,this.href=null}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},theme:{},href:{}})}renderControl(){var e,t;return o(g||(g=j` <foxy-internal-post-action-control-dialog message-options="${0}" infer="" href="${0}" @hide="${0}"> </foxy-internal-post-action-control-dialog> <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button"></foxy-i18n> </vaadin-button> `),JSON.stringify(this.messageOptions),a(null!==(e=this.href)&&void 0!==e?e:void 0),(e=>{e.detail.cancelled||this.dispatchEvent(new CustomEvent("success"))}),a(null!==(t=this.theme)&&void 0!==t?t:void 0),this.disabled||this.readonly,(e=>{const t=e.currentTarget,i=this.renderRoot.querySelector("foxy-internal-post-action-control-dialog");null==i||i.show(t)}))}}),customElements.define("foxy-internal-post-action-control-dialog",class extends r{constructor(){super(...arguments),this.messageOptions={},this.closable=!0,this.header="header",this.alert=!0,this.href=null,this.__api=new n(this),this.__state="idle"}static get properties(){return t(t({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},href:{},__state:{attribute:!1}})}get hiddenSelector(){const e=["close-button",super.hiddenSelector.toString()];return new i(e.join(" ").trim())}render(){var e=this;return super.render((()=>o(h||(h=b` <div class="relative"> <div class="mb-m mt-xs flex justify-center"> ${0} </div> <foxy-i18n class="block font-lumo text-m text-body text-center mb-l" infer="" key="message_${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> ${0} </div> ${0} </div> `),"done"===this.__state?s(p||(p=b`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>`)):"fail"===this.__state?s(m||(m=b`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" /></svg>`)):s(v||(v=b`<svg class="text-primary" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),"busy"===this.__state?"idle":this.__state,this.messageOptions,"done"===this.__state||"fail"===this.__state?o(_||(_=b` <vaadin-button class="col-span-2" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="button_close"></foxy-i18n> </vaadin-button> `),(()=>this.hide())):o(y||(y=b` <vaadin-button ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_cancel"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_confirm"></foxy-i18n> </vaadin-button> `),this.disabled||this.readonly,(()=>this.hide()),this.disabled||this.readonly,(async function(){if(e.href&&"idle"===e.__state){e.__state="busy",e.closable=!1;const t=await e.__api.fetch(e.href,{method:"POST"});e.__state=t.ok?"done":"fail",e.closable=!0}})),"busy"===this.__state?o(x||(x=b` <div class="bg-base absolute inset-0 flex items-center justify-center"> <foxy-spinner layout="vertical" infer=""></foxy-spinner> </div> `)):"")))}async hide(){await super.hide("done"!==this.__state),this.__state="idle"}});let w,k,$,S,P=e=>e;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return t(t({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var e,t,i,r;const n=this.nucleon,d=null===(e=null==n?void 0:n.data)||void 0===e?void 0:e._links["fx:customer"].href,u=d?null===(t=null==n?void 0:n.getCustomerPageHref)||void 0===t?void 0:t.call(n,d):void 0;return o(w||(w=P` <foxy-i18n infer="" class="block text-l font-medium leading-xs mb-s" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),c({"block ring-inset rounded transition-colors bg-contrast-5":!0,"cursor-pointer hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),a(u),a(d),this.__renderCopyAction(s(k||(k=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",d?String(l(d)):""),this.__renderCopyAction(s($||($=P`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(r=null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.customer_email)&&void 0!==r?r:""))}__renderCopyAction(e,t,i,s){const r=this[i],n="fail"===r?"error":"done"===r?"end":"busy";return o(S||(S=P` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==r,(()=>"idle"===r&&this.__copy(s,i)),(e=>"idle"!==r&&e.stopPropagation()),(e=>"idle"!==r&&e.stopPropagation()),c({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==r}),e,t,c({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===r}),n)}async __copy(e,t){this[t]="busy";try{await navigator.clipboard.writeText(e),this[t]="done"}catch(e){this[t]="fail"}setTimeout((()=>this[t]="idle"),3e3)}});let C,A,H,L,E,O,B,R=e=>e;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var e,t,i,s,r,n,a,d,l,c,u,f;const h=this.nucleon;return o(C||(C=R` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} ${0} <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="archive" key="caption_${0}"> </foxy-i18n> </vaadin-button> </div> `),(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"])?this.__renderCaptureAction():"",(null===(s=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===s?void 0:s._links["fx:void"])?this.__renderVoidAction():"",(null===(n=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===n?void 0:n._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"",(null===(f=null===(u=this.nucleon)||void 0===u?void 0:u.data)||void 0===f?void 0:f._links["fx:receipt"])?this.__renderReceiptAction():"",this.disabledSelector.matches("archive",!0),(()=>{null==h||h.edit({hide_transaction:!(null==h?void 0:h.form.hide_transaction)}),null==h||h.submit()}),(null==h?void 0:h.form.hide_transaction)?"unarchive":"archive")}__renderSendEmailsAction(){var e,t;return o(A||(A=R` <foxy-internal-post-action-control infer="send-emails" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:send_emails"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderCaptureAction(){var e,t;return o(H||(H=R` <foxy-internal-post-action-control theme="tertiary-inline success" infer="capture" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:capture"].href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderVoidAction(){var e,t,i;return o(L||(L=R` <foxy-internal-post-action-control theme="tertiary-inline error" infer="void" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderRefundAction(){var e,t,i;return o(E||(E=R` <foxy-internal-post-action-control infer="refund" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),a(null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.refresh()}))}__renderSubscriptionAction(){var e,t,i;const s=this.nucleon,r=null===(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._links["fx:subscription"])||void 0===t?void 0:t.href,n=r?null===(i=null==s?void 0:s.getSubscriptionPageHref)||void 0===i?void 0:i.call(s,r):void 0;return o(O||(O=R` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),a(n))}__renderReceiptAction(){var e,t;const i=this.nucleon;return o(B||(B=R` <a target="_blank" class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="receipt" key="caption"></foxy-i18n> </a> `),a(null===(t=null===(e=null==i?void 0:i.data)||void 0===e?void 0:e._links["fx:receipt"])||void 0===t?void 0:t.href))}});let Z,I,M,q,G,T,U,W,z,D,V,J=e=>e;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var e,t,i,s,r,n,d,l,c;const u=null===(e=this.nucleon)||void 0===e?void 0:e.data;if(!u)return o(Z||(Z=J``));const f=null!==(i=null===(t=null==u?void 0:u._embedded)||void 0===t?void 0:t["fx:applied_taxes"])&&void 0!==i?i:[],h=null!==(r=null===(s=u._embedded)||void 0===s?void 0:s["fx:shipments"])&&void 0!==r?r:[];return o(I||(I=J` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===h.length||0===u.total_shipping?o(M||(M=J` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):h.map((e=>o(q||(q=J` <span>${0}&colon;</span> <span>${0}</span> `),e.shipping_service_description,this.__renderPrice(e.total_shipping,!0)))),0===f.length||0===u.total_tax?o(G||(G=J` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):f.map((e=>o(T||(T=J` <span>${0}&colon;</span> <span>${0}</span> `),e.name,this.__renderPrice(e.amount,!0)))),null===(d=null===(n=null==u?void 0:u._embedded)||void 0===n?void 0:n["fx:gift_card_code_logs"])||void 0===d?void 0:d.map((e=>{var t,i,s,r,n;const a=null===(i=null===(t=e._embedded)||void 0===t?void 0:t["fx:gift_card"])||void 0===i?void 0:i.name,d=null===(r=null===(s=e._embedded)||void 0===s?void 0:s["fx:gift_card_code"])||void 0===r?void 0:r.code;if(a&&d)return o(U||(U=J` <span data-testclass="gift-card-code">${0} &bull; ${0}&colon;</span> <span>${0}</span> `),a,d,this.__renderPrice(null!==(n=e.balance_adjustment)&&void 0!==n?n:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((({name:e,code:t,amount:i})=>o(W||(W=J` <span data-testclass="discount">${0}${0}&colon;</span> <span>${0}</span> `),e,t?o(z||(z=J` &bull; ${0}`),t):"",this.__renderPrice(i,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var e,t,i;return null===(i=null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}__renderPrice(e,t=!1){var i,s,r;const n=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r.currency_code;return o(D||(D=J` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),t&&0!==e?e>0?"text-success":"text-error":"",{currencyDisplay:n,signDisplay:t?"exceptZero":"auto",amount:`${e} ${a}`})}__renderStatus(){var e,t;const i=(null===(t=null===(e=this.nucleon)||void 0===e?void 0:e.data)||void 0===t?void 0:t.status)||"completed";let s="";return s=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",o(V||(V=J` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),s,i)}});let N,F,K,Q=e=>e;const X=u(f(d,"transaction"));class Y extends X{constructor(){var e;super(...arguments),e=this,this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.localeCodes=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null,this.__webhooksBulkActions=[{name:"refeed",onClick:async function(t){if(!e.data)return;const i=e.data._links["fx:send_webhooks"].href,o=new Y.API(e),s=await o.fetch(i,{method:"POST",body:JSON.stringify({refeed_hooks:t.map((e=>l(e._links.self.href))),event:"refeed"})});if(t.forEach((e=>{Y.Rumour("").share({related:[...t.map((e=>e._links["fx:logs"].href)),...t.map((e=>e._links["fx:statuses"].href))],source:e._links.self.href,data:e})})),!s.ok)throw new Error(await s.text())}}]}static get properties(){return t(t({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1},localeCodes:{attribute:"locale-codes"}})}get readonlySelector(){var e,t,o;const s=["billing-addresses","datafeed:data-is-fed","webhooks:dialog:url",super.readonlySelector];return Boolean(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:void"])&&void 0!==t?t:null===(o=this.data)||void 0===o?void 0:o._links["fx:refund"])||s.push("items","attributes","custom-fields"),new i(s.join(" ").trim())}get hiddenSelector(){var e,t,o,s;const r=["billing-addresses:dialog:delete","billing-addresses:dialog:timestamps","webhooks:dialog:header:copy-json","webhooks:dialog:header:copy-id","webhooks:dialog:timestamps","webhooks:dialog:name","webhooks:dialog:query","webhooks:dialog:encryption-key","webhooks:dialog:delete",super.readonlySelector],n=null===(e=this.data)||void 0===e?void 0:e.type;return(null===(t=this.data)||void 0===t?void 0:t._links["fx:subscription"])||r.unshift("subscription"),"subscription_modification"===n&&r.unshift("actions"),"updateinfo"===n&&r.unshift("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===n&&r.unshift("not=customer,subscription,custom-fields,attributes"),(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s.use_webhook)||r.unshift("datafeed"),new i(r.join(" ").trim())}get headerSubtitleOptions(){var e,t,i,o,s;const r=null===(e=this.data)||void 0===e?void 0:e.source,n=null===(t=this.data)||void 0===t?void 0:t.type;let a="";return"updateinfo"===n?a=!r||(null==r?void 0:r.startsWith("cit_"))?"customer_changed_payment_method":"mit_uoe"===r?"admin_changed_payment_method_with_uoe":"mit_api"===r?"integration_changed_payment_method":"admin_changed_payment_method":"subscription_modification"===n?a=!r||(null==r?void 0:r.startsWith("cit_"))?"customer_changed_subscription":"mit_uoe"===r?"admin_changed_subscription_with_uoe":"mit_api"===r?"integration_changed_subscription":"admin_changed_subscription":"subscription_renewal"===n?"mit_recurring"===r?a="subscription_renewal_attempt":"mit_recurring_reattempt_automated"===r?a="subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===r&&(a="subscription_renewal_manual_reattempt"):"subscription_cancellation"===n?"cit_recurring_cancellation"===r?a="customer_canceled_subscription":"mit_recurring_cancellation"===r&&(a="admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==r?void 0:r.startsWith("cit_"))?a="customer_subscribed":"mit_uoe"===r?a="admin_subscribed_with_uoe":"mit_api"===r&&(a="integration_subscribed"):(null==r?void 0:r.startsWith("cit_"))?a="customer_placed_order":"mit_uoe"===r?a="admin_placed_order_with_uoe":"mit_api"===r&&(a="integration_placed_order"),{transaction_date:null===(o=this.data)||void 0===o?void 0:o.transaction_date,ip_country:null===(s=this.data)||void 0===s?void 0:s.ip_country,context:a}}get headerSubtitleBadges(){var e,t;const i=super.headerSubtitleBadges;return(null===(e=this.data)||void 0===e?void 0:e.is_test)&&i.push({key:"test"}),(null===(t=this.data)||void 0===t?void 0:t.hide_transaction)&&i.push({key:"archived"}),i}get headerCopyIdValue(){var e,t,i;return null!==(i=null===(t=null===(e=this.data)||void 0===e?void 0:e.display_id)||void 0===t?void 0:t.toString())&&void 0!==i?i:""}renderHeaderActions(){return o(N||(N=Q` <foxy-internal-transaction-actions-control infer="actions"> </foxy-internal-transaction-actions-control> `))}renderBody(){var e,t,i,s,r,n,d,l,c,u,f,h,p,m,v,_;let y,x,b;const g=this.hiddenSelector;if(this.data)try{const o=new URL(this.data._links["fx:shipments"].href),s=new URL(null!==(i=null===(t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._links["fx:webhooks"].href)&&void 0!==i?i:""),r=new URL(this.data._links["fx:items"].href);o.searchParams.set("zoom","items:item_category"),s.searchParams.set("event_resource","transaction"),r.searchParams.set("zoom","item_options"),y=o.toString(),x=s.toString(),b=r.toString()}catch(e){}return o(F||(F=Q` ${0} ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert wide .related="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="webhooks" first="${0}" item="foxy-webhook-card" form="foxy-webhook-form" hide-create-button hide-delete-button alert .bulkActions="${0}" .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-summary-control infer="datafeed"> <foxy-internal-switch-control infer="data-is-fed"></foxy-internal-switch-control> <foxy-internal-post-action-control infer="process-webhook" theme="tertiary-inline" href="${0}" @success="${0}"> </foxy-internal-post-action-control> </foxy-internal-summary-control> <foxy-nucleon class="hidden" infer="" href="${0}" id="storeLoader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),["problem","pending_fraud_review","rejected","declined"].includes(null!==(r=null===(s=this.data)||void 0===s?void 0:s.status)&&void 0!==r?r:"")?o(K||(K=Q` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(n=this.data)||void 0===n?void 0:n.status):"",g.matches("items",!0)&&g.matches("summary",!0),a(b),[this.href],{"locale-codes":this.localeCodes},{"item-categories":null===(l=null===(d=this.__storeLoader)||void 0===d?void 0:d.data)||void 0===l?void 0:l._links["fx:item_categories"].href,"locale-codes":this.localeCodes,store:null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href},a(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),a(null===(f=this.data)||void 0===f?void 0:f._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},a(null===(h=this.data)||void 0===h?void 0:h._links["fx:custom_fields"].href),a(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),a(y),a(x),this.__webhooksBulkActions,{"resource-uri":this.href},{"resource-uri":this.href},a(null===(v=null===(m=this.data)||void 0===m?void 0:m._links["fx:process_webhook"])||void 0===v?void 0:v.href),(()=>this.refresh()),a(null===(_=this.data)||void 0===_?void 0:_._links["fx:store"].href),(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector("#storeLoader")}}customElements.define("foxy-transaction",Y);export{Y as Transaction};
@@ -1 +1 @@
1
- import"./shared-182a87a3.js";import{I as e}from"./shared-0643656a.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{a as t}from"./shared-cc5e4c06.js";import"./foxy-payment-card-embed.js";import"./shared-70380f94.js";import"./shared-68a5368a.js";import{_ as r,B as s}from"./shared-cb58dfcd.js";import{i as a}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{g as i}from"./shared-bab2ea2c.js";import{a as d}from"./shared-1ce5b073.js";import"./shared-3691287b.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-0995ae7c.js";import"./shared-500b7eb7.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-ba4f2bca.js";import"./foxy-collection-page.js";import"./shared-5afb584d.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-75e7361d.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./shared-0662adb7.js";import"./shared-864ea319.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";let n,m=e=>e;customElements.define("foxy-internal-update-payment-method-form-cc-token-control",class extends t{constructor(){super(...arguments),this.embedUrl=null}static get properties(){return r(r({},super.properties),{},{embedUrl:{attribute:"embed-url"}})}renderControl(){return o(n||(n=m` <foxy-payment-card-embed infer="payment-card-embed" url="${0}" @submit="${0}"> </foxy-payment-card-embed> <vaadin-button theme="primary" class="w-full mt-l" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="tokenize"></foxy-i18n> </vaadin-button> `),a(this.embedUrl),this.__tokenize,this.disabled,(()=>this.__tokenize()))}async __tokenize(){var e,t,r;const s=this.renderRoot.querySelector("[infer=payment-card-embed]");try{null===(e=this.nucleon)||void 0===e||e.edit({cc_token:await s.tokenize()}),null===(t=this.nucleon)||void 0===t||t.submit()}catch(e){null===(r=this.nucleon)||void 0===r||r.undo()}}});let p,l,c=e=>e;const h=d(e,"update-payment-method-form");class f extends h{constructor(){super(...arguments),this.embedUrl=null,this.__templateSetGetValue=()=>this.__templateSetOverride,this.__templateSetSetValue=e=>this.__templateSetOverride=e,this.__templateSetOverride=null}static get properties(){return r(r({},super.properties),{},{__templateSetOverride:{attribute:!1},embedUrl:{attribute:"embed-url"}})}get hiddenSelector(){var e;const t=null===(e=this.__formEmbedUrl)||void 0===e?void 0:e.searchParams,r=["header:copy-id","header:copy-json",super.hiddenSelector.toString()],a=null==t?void 0:t.has("demo");return(this.__isPreConfigured||a)&&r.unshift("template-set"),(null==t?void 0:t.has("template_set_id"))||a||r.unshift("cc-token"),new s(r.join(" ").trim())}renderBody(){var e;if(!this.href)return o(p||(p=c` <div class="flex items-center justify-center p-xl"> <foxy-spinner layout="vertical" infer="spinner" state="empty"></foxy-spinner> </div> `));const t=this.__formEmbedUrl,r=this.renderRoot.querySelector("#store-loader");return o(l||(l=c` ${0} <foxy-internal-resource-picker-control first="${0}" infer="template-set" item="foxy-template-set-card" .getValue="${0}" .setValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-update-payment-method-form-cc-token-control embed-url="${0}" infer="cc-token"> </foxy-internal-update-payment-method-form-cc-token-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="store-loader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),a(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:template_sets"].href),this.__templateSetGetValue,this.__templateSetSetValue,a(null==t?void 0:t.toString()),a(this.__storeLoaderHref),(()=>this.requestUpdate()))}updated(e){super.updated(e),(e.has("embedUrl")||e.has("href"))&&(this.__templateSetOverride=null)}async _fetch(...e){try{const t=await super._fetch(...e);return"PATCH"===new f.API.WHATWGRequest(...e).method&&(this.status={key:"cc_token_success"}),t}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw t.includes("cc_token you provided is invalid")?["error:cc_token_invalid"]:e}}get __storeLoaderHref(){const e=this.data;return e&&"fx:store"in e._links?e._links["fx:store"].href:void 0}get __isPreConfigured(){var e;try{return new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"").searchParams.has("template_set_id")}catch(e){return!1}}get __formEmbedUrl(){var e;try{const t=new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"");if(this.__templateSetOverride){const e=i(this.__templateSetOverride);null!==e&&t.searchParams.set("template_set_id",String(e))}return t}catch(e){}}}customElements.define("foxy-update-payment-method-form",f);export{f as UpdatePaymentMethodForm};
1
+ import"./shared-303dc2a6.js";import{I as e}from"./shared-0643656a.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{a as t}from"./shared-cc5e4c06.js";import"./foxy-payment-card-embed.js";import"./shared-70380f94.js";import"./shared-68a5368a.js";import{_ as r,B as s}from"./shared-cb58dfcd.js";import{i as o}from"./shared-53e42a77.js";import{h as a}from"./shared-ba5c42c7.js";import{g as i}from"./shared-bab2ea2c.js";import{a as d}from"./shared-1ce5b073.js";import"./shared-bfdbe217.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-0995ae7c.js";import"./shared-500b7eb7.js";import"./shared-42c91940.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./shared-ef98e595.js";import"./foxy-collection-page.js";import"./shared-5afb584d.js";import"./shared-343d1fd7.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-2aa23b5f.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-75e7361d.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-49337d35.js";import"./shared-253e51f7.js";import"./shared-0662adb7.js";import"./shared-864ea319.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";let n,m=e=>e;customElements.define("foxy-internal-update-payment-method-form-cc-token-control",class extends t{constructor(){super(...arguments),this.embedUrl=null}static get properties(){return r(r({},super.properties),{},{embedUrl:{attribute:"embed-url"}})}renderControl(){return a(n||(n=m` <foxy-payment-card-embed infer="payment-card-embed" url="${0}" @submit="${0}"> </foxy-payment-card-embed> <vaadin-button theme="primary" class="w-full mt-l" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="tokenize"></foxy-i18n> </vaadin-button> `),o(this.embedUrl),this.__tokenize,this.disabled,(()=>this.__tokenize()))}async __tokenize(){var e,t,r;const s=this.renderRoot.querySelector("[infer=payment-card-embed]");try{null===(e=this.nucleon)||void 0===e||e.edit({cc_token:await s.tokenize()}),null===(t=this.nucleon)||void 0===t||t.submit()}catch(e){null===(r=this.nucleon)||void 0===r||r.undo()}}});let p,l,c=e=>e;const h=d(e,"update-payment-method-form");class f extends h{constructor(){super(...arguments),this.embedUrl=null,this.__templateSetGetValue=()=>this.__templateSetOverride,this.__templateSetSetValue=e=>this.__templateSetOverride=e,this.__templateSetOverride=null}static get properties(){return r(r({},super.properties),{},{__templateSetOverride:{attribute:!1},embedUrl:{attribute:"embed-url"}})}get hiddenSelector(){var e;const t=null===(e=this.__formEmbedUrl)||void 0===e?void 0:e.searchParams,r=["header:copy-id","header:copy-json",super.hiddenSelector.toString()],o=null==t?void 0:t.has("demo");return(this.__isPreConfigured||o)&&r.unshift("template-set"),(null==t?void 0:t.has("template_set_id"))||o||r.unshift("cc-token"),new s(r.join(" ").trim())}renderBody(){var e;if(!this.href)return a(p||(p=c` <div class="flex items-center justify-center p-xl"> <foxy-spinner layout="vertical" infer="spinner" state="empty"></foxy-spinner> </div> `));const t=this.__formEmbedUrl,r=this.renderRoot.querySelector("#store-loader");return a(l||(l=c` ${0} <foxy-internal-resource-picker-control first="${0}" infer="template-set" item="foxy-template-set-card" .getValue="${0}" .setValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-update-payment-method-form-cc-token-control embed-url="${0}" infer="cc-token"> </foxy-internal-update-payment-method-form-cc-token-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="store-loader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),o(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:template_sets"].href),this.__templateSetGetValue,this.__templateSetSetValue,o(null==t?void 0:t.toString()),o(this.__storeLoaderHref),(()=>this.requestUpdate()))}updated(e){super.updated(e),(e.has("embedUrl")||e.has("href"))&&(this.__templateSetOverride=null)}async _fetch(...e){try{const t=await super._fetch(...e);return"PATCH"===new f.API.WHATWGRequest(...e).method&&(this.status={key:"cc_token_success"}),t}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw t.includes("cc_token you provided is invalid")?["error:cc_token_invalid"]:e}}get __storeLoaderHref(){const e=this.data;return e&&"fx:store"in e._links?e._links["fx:store"].href:void 0}get __isPreConfigured(){var e;try{return new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"").searchParams.has("template_set_id")}catch(e){return!1}}get __formEmbedUrl(){var e;try{const t=new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"");if(this.__templateSetOverride){const e=i(this.__templateSetOverride);null!==e&&t.searchParams.set("template_set_id",String(e))}return t}catch(e){}}}customElements.define("foxy-update-payment-method-form",f);export{f as UpdatePaymentMethodForm};
@@ -1 +1 @@
1
- import"./shared-ba4f2bca.js";import{I as e}from"./shared-0643656a.js";import"./shared-f15af5d1.js";import"./shared-68a5368a.js";import{a as t}from"./shared-cc5e4c06.js";import"./shared-70380f94.js";import{_ as a,B as r,aS as i,aT as s}from"./shared-cb58dfcd.js";import{N as l}from"./shared-f83207fb.js";import{i as o}from"./shared-53e42a77.js";import{h as n,c as d,s as c}from"./shared-ba5c42c7.js";import{a as m}from"./shared-1ce5b073.js";import{a as h,g as f}from"./shared-37bdd118.js";import{c as v}from"./shared-4e709717.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-7b3aac7e.js";import"./shared-0995ae7c.js";import"./shared-16ae74b2.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";let u,p=e=>e;customElements.define("foxy-internal-user-invitation-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return a(a({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"idle"===e?this.theme:"";return n(u||(u=p` <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),o(null!=t?t:void 0),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e,t;if("busy"!==this.__state)try{this.__state="busy";const a=new l.API(this);(await a.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"})).ok?(await new Promise((e=>setTimeout(e,1e3))),null===(t=this.nucleon)||void 0===t||t.refresh(),this.__state="idle"):this.__state="fail"}catch(e){this.__state="fail"}}});let y,x,g,_,Z,b,j,w,S,$,k,M,C,L,B=e=>e;const H=m(e,"user-invitation-form");class P extends H{constructor(){super(...arguments),this.getStorePageHref=null,this.defaultDomain=null,this.layout=null,this.__storeDomainGetValue=()=>{var e;const t=this.defaultDomain,a=null===(e=this.data)||void 0===e?void 0:e.store_domain;return(null==a?void 0:a.includes("."))||!t?a:`${a}.${t}`}}static get properties(){return a(a({},super.properties),{},{getStorePageHref:{attribute:!1},defaultDomain:{attribute:"default-domain"},layout:{}})}static get styles(){return[...super.styles,d(y||(y=B`.inner-curve{--r:var(--lumo-border-radius-l);--s:3rem;--a:12deg;--m:0/calc(2 * var(--r)) var(--r) no-repeat radial-gradient(50% 100% at bottom, #000 calc(100% - 1px), #0000);--d:(var(--s) + var(--r)) * cos(var(--a));border-radius:var(--r);width:100%;mask:calc(50% + var(--d)) var(--m),calc(50% - var(--d)) var(--m),radial-gradient(var(--s) at 50% calc(-1 * sin(var(--a)) * var(--s)),#0000 100%,#000 calc(100% + 1px)) 0 calc(var(--r) * (1 - sin(var(--a)))) no-repeat,linear-gradient(90deg,#000 calc(50% - var(--d)),#0000 0 calc(50% + var(--d)),#000 0)}`))]}static get v8n(){return[({email:e})=>!!e||"email:v8n_required"]}get readonlySelector(){const e=["store",super.readonlySelector.toString()];return new r(e.join(" ").trim())}get hiddenSelector(){var e,t;const a=["timestamps","submit","undo",super.hiddenSelector.toString()],i=null===(e=this.data)||void 0===e?void 0:e.status,s=null!==(t=this.layout)&&void 0!==t?t:"user";return"accepted"!==i&&"sent"!==i&&a.unshift("revoke"),"accepted"!==i&&a.unshift("leave"),"sent"!==i&&a.unshift("accept","reject"),"rejected"===i&&"user"===s||"expired"===i&&"admin"===s||"revoked"===i&&"admin"===s||a.unshift("delete"),"sent"===i&&"admin"===s||a.unshift("resend"),new r(a.join(" ").trim())}renderBody(){const{layout:e,data:t}=this;return"admin"===e?t?this.__renderAdminSnapshotState(t):this.__renderAdminTemplateState():t?this.__renderUserSnapshotState(t):this.__renderUserTemplateState()}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 t.includes("already been created for this email and store")?["error:invitation_exists"]:t.includes("already has access to this store")?["error:already_has_access"]:e}}__getGravatar(e){return i((function*(){yield n(x||(x=B` <div style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5"></div> `)),e&&(yield n(g||(g=B` <img data-testid="gravatar" style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield s(f(e))))}))()}__renderAdminTemplateState(){return n(_||(_=B` ${0} <foxy-internal-text-control infer="email"></foxy-internal-text-control> ${0} `),this.renderHeader(),super.renderBody())}__renderUserTemplateState(){return n(Z||(Z=B` <div class="p-xl flex items-center justify-center"> <foxy-spinner layout="vertical" infer="unavailable" state="empty"></foxy-spinner> </div> `))}__renderAdminSnapshotState({first_name:e,last_name:t}){var a,r,i,s,l,d,m;const f=(null==e?void 0:e.trim())||(null==t?void 0:t.trim()),u={first_name:e,last_name:t,context:f?"":"empty"},p=null===(a=this.data)||void 0===a?void 0:a.status,y=this.hiddenSelector;return n(b||(b=B` <div style="padding-top:3.5rem"> <div class="relative"> <div class="inner-curve bg-contrast-5 absolute inset-0"></div> ${0} <div class="relative pb-m px-m leading-xs grid gap-m" style="padding-top:calc(2.5rem + var(--lumo-space-m))"> <div> <foxy-i18n class="block text-xl font-medium text-center" infer="" key="full_name" .options="${0}"> </foxy-i18n> <div class="text-m text-center text-secondary">${0}</div> </div> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" class="${0}"> <p class="font-medium flex items-center gap-s"> ${0} <foxy-i18n infer="" key="admin_status_title" .options="${0}"> </foxy-i18n> </p> <p class="text-body" style="padding-left:calc((1.25 * var(--lumo-font-size-m)) + var(--lumo-space-s))"> <foxy-i18n infer="" key="admin_status_text" .options="${0}"> </foxy-i18n> </p> </div> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action infer="revoke" class="flex-1" theme="error" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action infer="resend" class="flex-1" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-delete-control infer="delete" class="flex-1"> </foxy-internal-delete-control> </div> </div> </div> </div> `),h(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),u,null===(i=this.data)||void 0===i?void 0:i.email,v({"border rounded":!0,"border-contrast text-contrast":"revoked"===p||"expired"===p,"border-success text-success":"accepted"===p,"border-primary text-primary":"sent"===p,"border-error text-error":"rejected"===p}),"revoked"===p?c(j||(j=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z" clip-rule="evenodd" /></svg>`)):"sent"===p?c(w||(w=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z" clip-rule="evenodd" /></svg>`)):"rejected"===p?c(S||(S=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z" clip-rule="evenodd" /></svg>`)):"accepted"===p?c($||($=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" /></svg>`)):"expired"===p?c(k||(k=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" /><path fill-rule="evenodd" d="m3.087 9 .54 9.176A3 3 0 0 0 6.62 21h10.757a3 3 0 0 0 2.995-2.824L20.913 9H3.087Zm6.133 2.845a.75.75 0 0 1 1.06 0l1.72 1.72 1.72-1.72a.75.75 0 1 1 1.06 1.06l-1.72 1.72 1.72 1.72a.75.75 0 1 1-1.06 1.06L12 15.685l-1.72 1.72a.75.75 0 1 1-1.06-1.06l1.72-1.72-1.72-1.72a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)):"",{context:p},{context:p},y.matches("revoke",!0)&&y.matches("resend",!0)&&y.matches("delete",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:revoke"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:resend"])||void 0===m?void 0:m.href))}__renderUserSnapshotState({status:e,store_name:t}){var r,i,s,l,d,m;const h=this.hiddenSelector,f={"text-primary":"sent"===e,"text-success":"accepted"===e,"text-error":"rejected"===e};return n(M||(M=B` <div class="${0}"> <div class="border-t flex-1"></div> ${0} <div class="border-t flex-1"></div> </div> <foxy-i18n infer="" class="${0}" key="user_status_title" .options="${0}"> </foxy-i18n> <foxy-internal-summary-control infer="store"> <foxy-internal-text-control layout="summary-item" infer="store-domain" .getValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-url"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-email"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-i18n class="block text-secondary text-center" infer="" key="user_status_text" .options="${0}"> </foxy-i18n> <foxy-internal-user-invitation-form-async-action theme="error" class="flex-1" infer="leave" href="${0}"> </foxy-internal-user-invitation-form-async-action> <div class="grid grid-cols-2 gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action theme="error primary" infer="reject" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action theme="success primary" infer="accept" href="${0}"> </foxy-internal-user-invitation-form-async-action> </div> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),v(a({"flex items-center gap-m":!0},f)),c(C||(C=B`<svg style="height: 5rem; width: 5rem" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><path fill="currentColor" fill-rule="evenodd" d="M128 250c67.38 0 122-54.62 122-122S195.38 6 128 6 6 60.62 6 128s54.62 122 122 122Zm0 6c70.7 0 128-57.3 128-128S198.7 0 128 0 0 57.3 0 128s57.3 128 128 128Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M128.5 218a89.5 89.5 0 1 0 0-179 89.5 89.5 0 0 0 0 179Zm23.8-46.25-5.13-3.08-54.48-32.91a3.6 3.6 0 0 1-1.69-3.12V78l5.07 3.02c1.06.6 1.78 1.8 1.78 3.15v46.4l52.75 31.87a3.63 3.63 0 0 1 1.72 3.17l-.01 6.14ZM166 180l-5.17-3.11a3.62 3.62 0 0 1-1.7-3.1v-46.47l-47.64-28.8v25.92l-.02 6.14-5.09-3.09a3.5 3.5 0 0 1-1.71-3.05V92.38a3.6 3.6 0 0 1 1.71-3.09 3.3 3.3 0 0 1 3.44.01l54.47 32.9a3.62 3.62 0 0 1 1.7 3.11v48.47L166 180Zm-46.1-44.34c.53.34 5.2 3.17 5.2 3.17s.04-4.24.04-6.22v-15.57c0-1.32-.68-2.48-1.7-3.1-.5-.31-5.14-3.06-5.14-3.06v21.73c0 1.29.64 2.41 1.6 3.05Zm18.86 11.42-5.17-3.14a3.62 3.62 0 0 1-1.66-3.08v-21.77l5.1 3.07a3.62 3.62 0 0 1 1.75 3.13v15.57l-.02 6.22Zm8.46 5.1 5.15 3.12v-21.78a3.6 3.6 0 0 0-1.8-3.16c-.48-.28-5.06-3.08-5.06-3.08v21.8c0 1.33.7 2.48 1.71 3.1Z" clip-rule="evenodd"/><path fill="currentColor" d="M132.57 222a2.96 2.96 0 0 1 2.96 2.96v15.86a3 3 0 0 1-3 3h-9.95a2.39 2.39 0 1 1 0-4.78h5.15a1.88 1.88 0 0 0 0-3.75h-4.22a2.39 2.39 0 1 1 0-4.77h3.1a3 3 0 0 0 3-3v-2.56a2.96 2.96 0 0 1 2.96-2.96Zm-37.07 6.3c.5-2.37 1.39-4.28 2.66-5.71a9.51 9.51 0 0 1 4.52-2.9c1.75-.5 3.59-.55 5.52-.14a11.1 11.1 0 0 1 5 2.38 9.6 9.6 0 0 1 2.95 4.5c.57 1.83.6 3.93.1 6.29a12.33 12.33 0 0 1-2.65 5.7 9.44 9.44 0 0 1-4.52 2.91c-1.75.51-3.6.56-5.54.14a11.2 11.2 0 0 1-4.98-2.37 9.42 9.42 0 0 1-2.96-4.5 12.25 12.25 0 0 1-.1-6.3Zm5.95 1.27a9.13 9.13 0 0 0-.17 3.34c.14.95.5 1.73 1.06 2.32.56.6 1.31 1 2.27 1.2.96.2 1.82.15 2.58-.17a4.27 4.27 0 0 0 1.91-1.69 9.2 9.2 0 0 0 1.19-3.12c.27-1.28.33-2.4.19-3.35a4.33 4.33 0 0 0-1.07-2.31 4.28 4.28 0 0 0-2.28-1.2 4.24 4.24 0 0 0-2.56.17c-.76.31-1.4.88-1.92 1.68a9.23 9.23 0 0 0-1.2 3.13Zm-15.5 6.41a2.84 2.84 0 0 1-1.67-2.33l-.52-5.52c0-.05-.04-.1-.09-.12a.14.14 0 0 0-.15.02l-4.5 3.3a2.82 2.82 0 1 1-3.29-4.57l4.84-3.4a3 3 0 0 0 1.24-2.87l-.8-5.83a2.85 2.85 0 1 1 5.65-.68l.58 5.7c0 .05.04.1.09.12.05.02.1.01.14-.02l4.63-3.38a2.85 2.85 0 1 1 3.29 4.64l-4.87 3.34a3 3 0 0 0-1.28 2.83l.69 5.84a2.84 2.84 0 0 1-3.98 2.93Zm-16.33-12.59a2.87 2.87 0 1 1-5.67-.91l1.42-7.81a.14.14 0 0 0-.2-.15l-6.99 3.77a2.87 2.87 0 1 1-2.61-5.11l10.27-4.98a3 3 0 0 0 1.12-.94l1.86-2.56a2.94 2.94 0 1 1 4.76 3.46l-1.86 2.56a3 3 0 0 0-.55 1.36l-1.55 11.3Zm-11.39-33.1a2.93 2.93 0 0 1-.22 4.21c-.6.55-1.3.8-2.12.75a2.93 2.93 0 0 1-2.06-1 2.89 2.89 0 0 1-.74-2.11 2.8 2.8 0 0 1 2.35-2.76 3.2 3.2 0 0 1 1.52.09c.5.16.92.43 1.27.82ZM34.2 187.3a2.39 2.39 0 1 1-4.14 2.39l-4.37-7.57a2.39 2.39 0 1 1 4.13-2.38l4.37 7.56Zm14.75-8.52a2.39 2.39 0 0 1-4.13 2.38l-4.37-7.56a2.39 2.39 0 1 1 4.13-2.39l4.37 7.57Zm-21.08 7.13a2.96 2.96 0 0 1 1.09-4.05l13.76-7.95a2.96 2.96 0 0 1 2.96 5.13L31.92 187a2.96 2.96 0 0 1-4.05-1.09Zm-2.9-36.06c2.3-.75 4.4-.94 6.28-.56a9.51 9.51 0 0 1 4.78 2.47 11.27 11.27 0 0 1 2.88 4.71c.61 1.9.76 3.74.44 5.53a9.6 9.6 0 0 1-2.43 4.8c-1.3 1.4-3.1 2.48-5.4 3.23-2.3.75-4.4.94-6.26.56a9.44 9.44 0 0 1-4.78-2.46 11.24 11.24 0 0 1-2.9-4.73 11.2 11.2 0 0 1-.43-5.5 9.42 9.42 0 0 1 2.42-4.81 12.26 12.26 0 0 1 5.4-3.24Zm1.88 5.8c-1.24.4-2.23.9-2.98 1.5a4.2 4.2 0 0 0-1.47 2.09 4.2 4.2 0 0 0 .1 2.57c.3.93.77 1.64 1.43 2.14.64.5 1.45.77 2.41.82.96.05 2.06-.13 3.3-.54 1.25-.4 2.24-.9 3-1.5a4.34 4.34 0 0 0 1.47-2.09 4.3 4.3 0 0 0-.1-2.57 4.24 4.24 0 0 0-1.43-2.14 4.24 4.24 0 0 0-2.42-.82 9.24 9.24 0 0 0-3.3.53Zm3.91-38.41a4.55 4.55 0 0 1-.87 2.28 4.9 4.9 0 0 1-1.87 1.52c-.75.34-1.55.46-2.4.37a4.52 4.52 0 0 1-2.28-.87 4.81 4.81 0 0 1-1.9-4.28 4.72 4.72 0 0 1 5.15-4.17 4.8 4.8 0 0 1 3.8 2.74c.34.75.46 1.55.37 2.41ZM44.58 84.8a2.96 2.96 0 0 1-4.05 1.09L26.8 77.96a3 3 0 0 1-1.1-4.1l4.98-8.62a2.39 2.39 0 1 1 4.13 2.39l-2.58 4.46a1.88 1.88 0 0 0 3.25 1.88l2.1-3.66a2.39 2.39 0 1 1 4.14 2.39l-1.54 2.68a3 3 0 0 0 1.1 4.1l2.21 1.28a2.96 2.96 0 0 1 1.09 4.04Zm13.07-35.26a12.31 12.31 0 0 1 3.62 5.17c.6 1.81.69 3.6.25 5.37a11.27 11.27 0 0 1-2.64 4.85 11.24 11.24 0 0 1-4.56 3.14c-1.72.6-3.5.7-5.37.3a12.34 12.34 0 0 1-5.5-3.06 12.33 12.33 0 0 1-3.62-5.15 9.46 9.46 0 0 1-.25-5.36c.43-1.77 1.31-3.4 2.64-4.87a11.2 11.2 0 0 1 4.56-3.13 9.4 9.4 0 0 1 5.37-.31c1.86.4 3.7 1.43 5.5 3.05Zm-4.07 4.53a9.15 9.15 0 0 0-2.8-1.82 4.18 4.18 0 0 0-2.55-.24 4.2 4.2 0 0 0-2.17 1.37 4.24 4.24 0 0 0-1.14 2.31c-.1.8.06 1.64.5 2.5a9.33 9.33 0 0 0 2.11 2.6c.97.87 1.9 1.48 2.8 1.83.9.34 1.75.42 2.54.24a4.3 4.3 0 0 0 2.18-1.38 4.24 4.24 0 0 0 1.14-2.3c.1-.82-.06-1.65-.5-2.5a9.24 9.24 0 0 0-2.11-2.61Zm2.2-16.63c.83-.6 1.92-.7 2.85-.28l5.04 2.3a.15.15 0 0 0 .2-.15l-.6-5.55a2.82 2.82 0 1 1 5.6-.56l.53 5.89a3 3 0 0 0 1.86 2.5l5.45 2.23a2.85 2.85 0 1 1-2.24 5.24l-5.22-2.35a.15.15 0 0 0-.2.15l.61 5.7a2.85 2.85 0 1 1-5.66.52l-.46-5.88a3 3 0 0 0-1.8-2.52l-5.42-2.33a2.84 2.84 0 0 1-.54-4.9Zm19.07-7.84a2.87 2.87 0 1 1 3.62-4.47l6.06 5.14a.14.14 0 0 0 .22-.1l.23-7.93a2.87 2.87 0 1 1 5.74.29l-.83 11.38a3 3 0 0 0 .25 1.44l1.29 2.9a2.94 2.94 0 1 1-5.37 2.39l-1.3-2.9a3 3 0 0 0-.9-1.14l-9.01-7Zm34.35 6.68a2.93 2.93 0 0 1-3.53-2.3 2.78 2.78 0 0 1 .41-2.2 2.93 2.93 0 0 1 1.9-1.3 2.9 2.9 0 0 1 2.2.42 2.8 2.8 0 0 1 1.21 3.41c-.18.5-.46.93-.84 1.28-.38.35-.83.58-1.34.7Zm14.61-19.33a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm0 17.05a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm4.37-21.82a2.96 2.96 0 0 1 2.97 2.96v15.9a2.96 2.96 0 0 1-5.93 0v-15.9a2.96 2.96 0 0 1 2.96-2.96Zm32.68 15.52a12.24 12.24 0 0 1-2.66 5.71 9.5 9.5 0 0 1-4.53 2.9c-1.74.5-3.58.55-5.52.14a11.24 11.24 0 0 1-5-2.38 9.6 9.6 0 0 1-2.94-4.5 12.4 12.4 0 0 1-.1-6.29c.5-2.37 1.38-4.28 2.65-5.7a9.44 9.44 0 0 1 4.51-2.91c1.75-.51 3.6-.56 5.54-.14 1.94.4 3.6 1.2 4.99 2.37a9.42 9.42 0 0 1 2.95 4.5c.58 1.82.62 3.92.11 6.3Zm-5.96-1.27c.27-1.28.33-2.4.18-3.34a4.18 4.18 0 0 0-1.07-2.32 4.2 4.2 0 0 0-2.27-1.2 4.24 4.24 0 0 0-2.57.17c-.75.31-1.39.88-1.92 1.69a9.2 9.2 0 0 0-1.18 3.12 9.4 9.4 0 0 0-.2 3.35 4.4 4.4 0 0 0 1.07 2.31c.57.6 1.33 1 2.29 1.2.96.2 1.8.15 2.56-.17.75-.31 1.4-.88 1.91-1.68.53-.81.93-1.85 1.2-3.13Zm31.3 22.59a4.54 4.54 0 0 1-1.53-1.9 4.9 4.9 0 0 1-.38-2.38 4.5 4.5 0 0 1 .88-2.27c.5-.7 1.14-1.21 1.89-1.54a4.81 4.81 0 0 1 4.65.5 4.72 4.72 0 0 1 1.04 6.55 4.8 4.8 0 0 1-4.27 1.91 4.51 4.51 0 0 1-2.28-.87Zm21.19 28.18a2.96 2.96 0 0 1 1.08-4.05l13.73-7.93a3 3 0 0 1 4.1 1.1l4.98 8.62a2.39 2.39 0 0 1-4.13 2.39l-2.58-4.47a1.87 1.87 0 1 0-3.25 1.88l2.11 3.65a2.39 2.39 0 1 1-4.13 2.39l-1.55-2.68a3 3 0 0 0-4.1-1.1l-2.22 1.28a2.96 2.96 0 0 1-4.04-1.08Zm24 28.95c-2.31.75-4.4.94-6.29.56a9.5 9.5 0 0 1-4.78-2.47 11.26 11.26 0 0 1-2.87-4.71c-.61-1.9-.76-3.74-.44-5.53a9.6 9.6 0 0 1 2.43-4.8 12.5 12.5 0 0 1 5.39-3.23c2.31-.75 4.4-.94 6.27-.56a9.44 9.44 0 0 1 4.78 2.46 11.23 11.23 0 0 1 2.89 4.73c.6 1.88.75 3.71.43 5.5a9.43 9.43 0 0 1-2.41 4.81 12.26 12.26 0 0 1-5.4 3.24Zm-1.89-5.8c1.25-.4 2.24-.9 2.98-1.5a4.17 4.17 0 0 0 1.48-2.09 4.2 4.2 0 0 0-.1-2.57 4.25 4.25 0 0 0-1.43-2.14 4.27 4.27 0 0 0-2.42-.82 9.32 9.32 0 0 0-3.3.54c-1.24.4-2.24.9-2.99 1.5a4.34 4.34 0 0 0-1.47 2.09 4.3 4.3 0 0 0 .1 2.57c.3.93.78 1.65 1.43 2.14.65.5 1.46.77 2.41.82.97.05 2.07-.13 3.31-.53Zm13.3 10.23a2.84 2.84 0 0 1-1.18 2.61l-4.52 3.21a.15.15 0 0 0-.06.14c.01.05.04.1.1.12l5.1 2.24a2.82 2.82 0 1 1-2.31 5.14l-5.37-2.48a3 3 0 0 0-3.1.35l-4.65 3.61a2.85 2.85 0 1 1-3.41-4.56l4.64-3.35a.15.15 0 0 0 .06-.13c0-.06-.04-.1-.08-.12l-5.25-2.31a2.84 2.84 0 1 1 2.38-5.17l5.32 2.54a3 3 0 0 0 3.1-.3l4.71-3.52a2.84 2.84 0 0 1 4.52 1.98Zm-2.74 20.44a2.87 2.87 0 1 1 2.06 5.36l-7.48 2.68a.13.13 0 0 0-.1.11c0 .06.03.1.07.13l6.76 4.17a2.87 2.87 0 1 1-3.12 4.83l-9.45-6.42a3 3 0 0 0-1.37-.5l-3.15-.33a2.94 2.94 0 0 1 .62-5.85l3.14.33a3 3 0 0 0 1.45-.2l10.57-4.31Zm-22.96 26.41a2.93 2.93 0 0 1 3.75-1.92 2.8 2.8 0 0 1 1.71 1.47c.37.74.42 1.5.17 2.28-.24.74-.73 1.3-1.46 1.7a2.8 2.8 0 0 1-3.56-.66c-.34-.4-.57-.85-.7-1.36-.1-.5-.08-1.01.09-1.51Zm9.43 22.32a2.39 2.39 0 1 1 4.13 2.38l-4.37 7.57a2.39 2.39 0 1 1-4.13-2.39l4.37-7.56Zm-14.77-8.53a2.39 2.39 0 1 1 4.14 2.39l-4.37 7.56a2.39 2.39 0 0 1-4.13-2.38l4.36-7.57Zm16.72 14.7a2.96 2.96 0 0 1-4.05 1.08l-13.76-7.95a2.96 2.96 0 1 1 2.96-5.13l13.76 7.95a2.96 2.96 0 0 1 1.09 4.04Zm-29.78 20.54a12.3 12.3 0 0 1-3.62-5.17 9.5 9.5 0 0 1-.25-5.37 11.27 11.27 0 0 1 2.64-4.85 11.25 11.25 0 0 1 4.57-3.14 9.6 9.6 0 0 1 5.37-.3c1.87.43 3.7 1.44 5.5 3.06a12.33 12.33 0 0 1 3.61 5.15c.61 1.82.7 3.6.26 5.36a11.24 11.24 0 0 1-2.65 4.87 11.2 11.2 0 0 1-4.55 3.13 9.4 9.4 0 0 1-5.37.31 12.26 12.26 0 0 1-5.5-3.05Zm4.08-4.53c.97.88 1.9 1.48 2.8 1.82.9.35 1.75.43 2.54.24a4.2 4.2 0 0 0 2.18-1.37 4.24 4.24 0 0 0 1.14-2.31c.1-.8-.07-1.64-.5-2.5a9.33 9.33 0 0 0-2.12-2.6 9.4 9.4 0 0 0-2.8-1.83 4.34 4.34 0 0 0-2.54-.24c-.8.2-1.52.66-2.17 1.39a4.24 4.24 0 0 0-1.14 2.3c-.1.81.06 1.64.5 2.5a9.21 9.21 0 0 0 2.11 2.6Zm-35.21 15.81a4.54 4.54 0 0 1 2.4-.38c.83.1 1.58.39 2.25.86a4.55 4.55 0 0 1 1.54 1.9c.35.79.48 1.6.38 2.4a4.81 4.81 0 0 1-2.76 3.79 4.73 4.73 0 0 1-6.19-2.38 4.81 4.81 0 0 1 .48-4.66 4.51 4.51 0 0 1 1.9-1.53Z"/></svg>`)),v(a({"block text-center text-xl font-medium":!0},f)),{context:e,store_name:t},this.__storeDomainGetValue,"accepted"===e&&this.getStorePageHref&&this.data?n(L||(L=B` <div ?hidden="${0}"> <a class="text-primary font-medium cursor-pointer rounded transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="store_link"></foxy-i18n> </a> </div> `),"accepted"!==e||!this.getStorePageHref,this.getStorePageHref(this.data._links["fx:store"].href)):"",{context:e,store_name:t},o(null===(i=null===(r=this.data)||void 0===r?void 0:r._links["fx:revoke"])||void 0===i?void 0:i.href),h.matches("reject",!0)&&h.matches("accept",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:reject"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:accept"])||void 0===m?void 0:m.href))}}customElements.define("foxy-user-invitation-form",P);export{P as UserInvitationForm};
1
+ import"./shared-ef98e595.js";import{I as e}from"./shared-0643656a.js";import"./shared-f15af5d1.js";import"./shared-68a5368a.js";import{a as t}from"./shared-cc5e4c06.js";import"./shared-70380f94.js";import{_ as a,B as r,aS as i,aT as s}from"./shared-cb58dfcd.js";import{N as l}from"./shared-f83207fb.js";import{i as o}from"./shared-53e42a77.js";import{h as n,c as d,s as c}from"./shared-ba5c42c7.js";import{a as m}from"./shared-1ce5b073.js";import{a as h,g as f}from"./shared-37bdd118.js";import{c as v}from"./shared-4e709717.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-5592ec6e.js";import"./shared-343d1fd7.js";import"./shared-5afb584d.js";import"./shared-2aa23b5f.js";import"./foxy-copy-to-clipboard.js";import"./shared-127ec8a7.js";import"./shared-a3a4c368.js";import"./shared-500b7eb7.js";import"./shared-7b3aac7e.js";import"./shared-0995ae7c.js";import"./shared-16ae74b2.js";import"./shared-75e7361d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-0aedd809.js";import"./shared-7594e563.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-5ef40e86.js";let u,p=e=>e;customElements.define("foxy-internal-user-invitation-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return a(a({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"idle"===e?this.theme:"";return n(u||(u=p` <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),o(null!=t?t:void 0),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e,t;if("busy"!==this.__state)try{this.__state="busy";const a=new l.API(this);(await a.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"})).ok?(await new Promise((e=>setTimeout(e,1e3))),null===(t=this.nucleon)||void 0===t||t.refresh(),this.__state="idle"):this.__state="fail"}catch(e){this.__state="fail"}}});let y,x,g,_,Z,b,j,w,S,$,k,M,C,L,B=e=>e;const H=m(e,"user-invitation-form");class P extends H{constructor(){super(...arguments),this.getStorePageHref=null,this.defaultDomain=null,this.layout=null,this.__storeDomainGetValue=()=>{var e;const t=this.defaultDomain,a=null===(e=this.data)||void 0===e?void 0:e.store_domain;return(null==a?void 0:a.includes("."))||!t?a:`${a}.${t}`}}static get properties(){return a(a({},super.properties),{},{getStorePageHref:{attribute:!1},defaultDomain:{attribute:"default-domain"},layout:{}})}static get styles(){return[...super.styles,d(y||(y=B`.inner-curve{--r:var(--lumo-border-radius-l);--s:3rem;--a:12deg;--m:0/calc(2 * var(--r)) var(--r) no-repeat radial-gradient(50% 100% at bottom, #000 calc(100% - 1px), #0000);--d:(var(--s) + var(--r)) * cos(var(--a));border-radius:var(--r);width:100%;mask:calc(50% + var(--d)) var(--m),calc(50% - var(--d)) var(--m),radial-gradient(var(--s) at 50% calc(-1 * sin(var(--a)) * var(--s)),#0000 100%,#000 calc(100% + 1px)) 0 calc(var(--r) * (1 - sin(var(--a)))) no-repeat,linear-gradient(90deg,#000 calc(50% - var(--d)),#0000 0 calc(50% + var(--d)),#000 0)}`))]}static get v8n(){return[({email:e})=>!!e||"email:v8n_required"]}get readonlySelector(){const e=["store",super.readonlySelector.toString()];return new r(e.join(" ").trim())}get hiddenSelector(){var e,t;const a=["timestamps","submit","undo",super.hiddenSelector.toString()],i=null===(e=this.data)||void 0===e?void 0:e.status,s=null!==(t=this.layout)&&void 0!==t?t:"user";return"accepted"!==i&&"sent"!==i&&a.unshift("revoke"),"accepted"!==i&&a.unshift("leave"),"sent"!==i&&a.unshift("accept","reject"),"rejected"===i&&"user"===s||"expired"===i&&"admin"===s||"revoked"===i&&"admin"===s||a.unshift("delete"),"sent"===i&&"admin"===s||a.unshift("resend"),new r(a.join(" ").trim())}renderBody(){const{layout:e,data:t}=this;return"admin"===e?t?this.__renderAdminSnapshotState(t):this.__renderAdminTemplateState():t?this.__renderUserSnapshotState(t):this.__renderUserTemplateState()}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 t.includes("already been created for this email and store")?["error:invitation_exists"]:t.includes("already has access to this store")?["error:already_has_access"]:e}}__getGravatar(e){return i((function*(){yield n(x||(x=B` <div style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5"></div> `)),e&&(yield n(g||(g=B` <img data-testid="gravatar" style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield s(f(e))))}))()}__renderAdminTemplateState(){return n(_||(_=B` ${0} <foxy-internal-text-control infer="email"></foxy-internal-text-control> ${0} `),this.renderHeader(),super.renderBody())}__renderUserTemplateState(){return n(Z||(Z=B` <div class="p-xl flex items-center justify-center"> <foxy-spinner layout="vertical" infer="unavailable" state="empty"></foxy-spinner> </div> `))}__renderAdminSnapshotState({first_name:e,last_name:t}){var a,r,i,s,l,d,m;const f=(null==e?void 0:e.trim())||(null==t?void 0:t.trim()),u={first_name:e,last_name:t,context:f?"":"empty"},p=null===(a=this.data)||void 0===a?void 0:a.status,y=this.hiddenSelector;return n(b||(b=B` <div style="padding-top:3.5rem"> <div class="relative"> <div class="inner-curve bg-contrast-5 absolute inset-0"></div> ${0} <div class="relative pb-m px-m leading-xs grid gap-m" style="padding-top:calc(2.5rem + var(--lumo-space-m))"> <div> <foxy-i18n class="block text-xl font-medium text-center" infer="" key="full_name" .options="${0}"> </foxy-i18n> <div class="text-m text-center text-secondary">${0}</div> </div> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" class="${0}"> <p class="font-medium flex items-center gap-s"> ${0} <foxy-i18n infer="" key="admin_status_title" .options="${0}"> </foxy-i18n> </p> <p class="text-body" style="padding-left:calc((1.25 * var(--lumo-font-size-m)) + var(--lumo-space-s))"> <foxy-i18n infer="" key="admin_status_text" .options="${0}"> </foxy-i18n> </p> </div> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action infer="revoke" class="flex-1" theme="error" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action infer="resend" class="flex-1" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-delete-control infer="delete" class="flex-1"> </foxy-internal-delete-control> </div> </div> </div> </div> `),h(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),u,null===(i=this.data)||void 0===i?void 0:i.email,v({"border rounded":!0,"border-contrast text-contrast":"revoked"===p||"expired"===p,"border-success text-success":"accepted"===p,"border-primary text-primary":"sent"===p,"border-error text-error":"rejected"===p}),"revoked"===p?c(j||(j=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z" clip-rule="evenodd" /></svg>`)):"sent"===p?c(w||(w=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z" clip-rule="evenodd" /></svg>`)):"rejected"===p?c(S||(S=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z" clip-rule="evenodd" /></svg>`)):"accepted"===p?c($||($=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" /></svg>`)):"expired"===p?c(k||(k=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" /><path fill-rule="evenodd" d="m3.087 9 .54 9.176A3 3 0 0 0 6.62 21h10.757a3 3 0 0 0 2.995-2.824L20.913 9H3.087Zm6.133 2.845a.75.75 0 0 1 1.06 0l1.72 1.72 1.72-1.72a.75.75 0 1 1 1.06 1.06l-1.72 1.72 1.72 1.72a.75.75 0 1 1-1.06 1.06L12 15.685l-1.72 1.72a.75.75 0 1 1-1.06-1.06l1.72-1.72-1.72-1.72a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)):"",{context:p},{context:p},y.matches("revoke",!0)&&y.matches("resend",!0)&&y.matches("delete",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:revoke"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:resend"])||void 0===m?void 0:m.href))}__renderUserSnapshotState({status:e,store_name:t}){var r,i,s,l,d,m;const h=this.hiddenSelector,f={"text-primary":"sent"===e,"text-success":"accepted"===e,"text-error":"rejected"===e};return n(M||(M=B` <div class="${0}"> <div class="border-t flex-1"></div> ${0} <div class="border-t flex-1"></div> </div> <foxy-i18n infer="" class="${0}" key="user_status_title" .options="${0}"> </foxy-i18n> <foxy-internal-summary-control infer="store"> <foxy-internal-text-control layout="summary-item" infer="store-domain" .getValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-url"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-email"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-i18n class="block text-secondary text-center" infer="" key="user_status_text" .options="${0}"> </foxy-i18n> <foxy-internal-user-invitation-form-async-action theme="error" class="flex-1" infer="leave" href="${0}"> </foxy-internal-user-invitation-form-async-action> <div class="grid grid-cols-2 gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action theme="error primary" infer="reject" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action theme="success primary" infer="accept" href="${0}"> </foxy-internal-user-invitation-form-async-action> </div> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),v(a({"flex items-center gap-m":!0},f)),c(C||(C=B`<svg style="height: 5rem; width: 5rem" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><path fill="currentColor" fill-rule="evenodd" d="M128 250c67.38 0 122-54.62 122-122S195.38 6 128 6 6 60.62 6 128s54.62 122 122 122Zm0 6c70.7 0 128-57.3 128-128S198.7 0 128 0 0 57.3 0 128s57.3 128 128 128Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M128.5 218a89.5 89.5 0 1 0 0-179 89.5 89.5 0 0 0 0 179Zm23.8-46.25-5.13-3.08-54.48-32.91a3.6 3.6 0 0 1-1.69-3.12V78l5.07 3.02c1.06.6 1.78 1.8 1.78 3.15v46.4l52.75 31.87a3.63 3.63 0 0 1 1.72 3.17l-.01 6.14ZM166 180l-5.17-3.11a3.62 3.62 0 0 1-1.7-3.1v-46.47l-47.64-28.8v25.92l-.02 6.14-5.09-3.09a3.5 3.5 0 0 1-1.71-3.05V92.38a3.6 3.6 0 0 1 1.71-3.09 3.3 3.3 0 0 1 3.44.01l54.47 32.9a3.62 3.62 0 0 1 1.7 3.11v48.47L166 180Zm-46.1-44.34c.53.34 5.2 3.17 5.2 3.17s.04-4.24.04-6.22v-15.57c0-1.32-.68-2.48-1.7-3.1-.5-.31-5.14-3.06-5.14-3.06v21.73c0 1.29.64 2.41 1.6 3.05Zm18.86 11.42-5.17-3.14a3.62 3.62 0 0 1-1.66-3.08v-21.77l5.1 3.07a3.62 3.62 0 0 1 1.75 3.13v15.57l-.02 6.22Zm8.46 5.1 5.15 3.12v-21.78a3.6 3.6 0 0 0-1.8-3.16c-.48-.28-5.06-3.08-5.06-3.08v21.8c0 1.33.7 2.48 1.71 3.1Z" clip-rule="evenodd"/><path fill="currentColor" d="M132.57 222a2.96 2.96 0 0 1 2.96 2.96v15.86a3 3 0 0 1-3 3h-9.95a2.39 2.39 0 1 1 0-4.78h5.15a1.88 1.88 0 0 0 0-3.75h-4.22a2.39 2.39 0 1 1 0-4.77h3.1a3 3 0 0 0 3-3v-2.56a2.96 2.96 0 0 1 2.96-2.96Zm-37.07 6.3c.5-2.37 1.39-4.28 2.66-5.71a9.51 9.51 0 0 1 4.52-2.9c1.75-.5 3.59-.55 5.52-.14a11.1 11.1 0 0 1 5 2.38 9.6 9.6 0 0 1 2.95 4.5c.57 1.83.6 3.93.1 6.29a12.33 12.33 0 0 1-2.65 5.7 9.44 9.44 0 0 1-4.52 2.91c-1.75.51-3.6.56-5.54.14a11.2 11.2 0 0 1-4.98-2.37 9.42 9.42 0 0 1-2.96-4.5 12.25 12.25 0 0 1-.1-6.3Zm5.95 1.27a9.13 9.13 0 0 0-.17 3.34c.14.95.5 1.73 1.06 2.32.56.6 1.31 1 2.27 1.2.96.2 1.82.15 2.58-.17a4.27 4.27 0 0 0 1.91-1.69 9.2 9.2 0 0 0 1.19-3.12c.27-1.28.33-2.4.19-3.35a4.33 4.33 0 0 0-1.07-2.31 4.28 4.28 0 0 0-2.28-1.2 4.24 4.24 0 0 0-2.56.17c-.76.31-1.4.88-1.92 1.68a9.23 9.23 0 0 0-1.2 3.13Zm-15.5 6.41a2.84 2.84 0 0 1-1.67-2.33l-.52-5.52c0-.05-.04-.1-.09-.12a.14.14 0 0 0-.15.02l-4.5 3.3a2.82 2.82 0 1 1-3.29-4.57l4.84-3.4a3 3 0 0 0 1.24-2.87l-.8-5.83a2.85 2.85 0 1 1 5.65-.68l.58 5.7c0 .05.04.1.09.12.05.02.1.01.14-.02l4.63-3.38a2.85 2.85 0 1 1 3.29 4.64l-4.87 3.34a3 3 0 0 0-1.28 2.83l.69 5.84a2.84 2.84 0 0 1-3.98 2.93Zm-16.33-12.59a2.87 2.87 0 1 1-5.67-.91l1.42-7.81a.14.14 0 0 0-.2-.15l-6.99 3.77a2.87 2.87 0 1 1-2.61-5.11l10.27-4.98a3 3 0 0 0 1.12-.94l1.86-2.56a2.94 2.94 0 1 1 4.76 3.46l-1.86 2.56a3 3 0 0 0-.55 1.36l-1.55 11.3Zm-11.39-33.1a2.93 2.93 0 0 1-.22 4.21c-.6.55-1.3.8-2.12.75a2.93 2.93 0 0 1-2.06-1 2.89 2.89 0 0 1-.74-2.11 2.8 2.8 0 0 1 2.35-2.76 3.2 3.2 0 0 1 1.52.09c.5.16.92.43 1.27.82ZM34.2 187.3a2.39 2.39 0 1 1-4.14 2.39l-4.37-7.57a2.39 2.39 0 1 1 4.13-2.38l4.37 7.56Zm14.75-8.52a2.39 2.39 0 0 1-4.13 2.38l-4.37-7.56a2.39 2.39 0 1 1 4.13-2.39l4.37 7.57Zm-21.08 7.13a2.96 2.96 0 0 1 1.09-4.05l13.76-7.95a2.96 2.96 0 0 1 2.96 5.13L31.92 187a2.96 2.96 0 0 1-4.05-1.09Zm-2.9-36.06c2.3-.75 4.4-.94 6.28-.56a9.51 9.51 0 0 1 4.78 2.47 11.27 11.27 0 0 1 2.88 4.71c.61 1.9.76 3.74.44 5.53a9.6 9.6 0 0 1-2.43 4.8c-1.3 1.4-3.1 2.48-5.4 3.23-2.3.75-4.4.94-6.26.56a9.44 9.44 0 0 1-4.78-2.46 11.24 11.24 0 0 1-2.9-4.73 11.2 11.2 0 0 1-.43-5.5 9.42 9.42 0 0 1 2.42-4.81 12.26 12.26 0 0 1 5.4-3.24Zm1.88 5.8c-1.24.4-2.23.9-2.98 1.5a4.2 4.2 0 0 0-1.47 2.09 4.2 4.2 0 0 0 .1 2.57c.3.93.77 1.64 1.43 2.14.64.5 1.45.77 2.41.82.96.05 2.06-.13 3.3-.54 1.25-.4 2.24-.9 3-1.5a4.34 4.34 0 0 0 1.47-2.09 4.3 4.3 0 0 0-.1-2.57 4.24 4.24 0 0 0-1.43-2.14 4.24 4.24 0 0 0-2.42-.82 9.24 9.24 0 0 0-3.3.53Zm3.91-38.41a4.55 4.55 0 0 1-.87 2.28 4.9 4.9 0 0 1-1.87 1.52c-.75.34-1.55.46-2.4.37a4.52 4.52 0 0 1-2.28-.87 4.81 4.81 0 0 1-1.9-4.28 4.72 4.72 0 0 1 5.15-4.17 4.8 4.8 0 0 1 3.8 2.74c.34.75.46 1.55.37 2.41ZM44.58 84.8a2.96 2.96 0 0 1-4.05 1.09L26.8 77.96a3 3 0 0 1-1.1-4.1l4.98-8.62a2.39 2.39 0 1 1 4.13 2.39l-2.58 4.46a1.88 1.88 0 0 0 3.25 1.88l2.1-3.66a2.39 2.39 0 1 1 4.14 2.39l-1.54 2.68a3 3 0 0 0 1.1 4.1l2.21 1.28a2.96 2.96 0 0 1 1.09 4.04Zm13.07-35.26a12.31 12.31 0 0 1 3.62 5.17c.6 1.81.69 3.6.25 5.37a11.27 11.27 0 0 1-2.64 4.85 11.24 11.24 0 0 1-4.56 3.14c-1.72.6-3.5.7-5.37.3a12.34 12.34 0 0 1-5.5-3.06 12.33 12.33 0 0 1-3.62-5.15 9.46 9.46 0 0 1-.25-5.36c.43-1.77 1.31-3.4 2.64-4.87a11.2 11.2 0 0 1 4.56-3.13 9.4 9.4 0 0 1 5.37-.31c1.86.4 3.7 1.43 5.5 3.05Zm-4.07 4.53a9.15 9.15 0 0 0-2.8-1.82 4.18 4.18 0 0 0-2.55-.24 4.2 4.2 0 0 0-2.17 1.37 4.24 4.24 0 0 0-1.14 2.31c-.1.8.06 1.64.5 2.5a9.33 9.33 0 0 0 2.11 2.6c.97.87 1.9 1.48 2.8 1.83.9.34 1.75.42 2.54.24a4.3 4.3 0 0 0 2.18-1.38 4.24 4.24 0 0 0 1.14-2.3c.1-.82-.06-1.65-.5-2.5a9.24 9.24 0 0 0-2.11-2.61Zm2.2-16.63c.83-.6 1.92-.7 2.85-.28l5.04 2.3a.15.15 0 0 0 .2-.15l-.6-5.55a2.82 2.82 0 1 1 5.6-.56l.53 5.89a3 3 0 0 0 1.86 2.5l5.45 2.23a2.85 2.85 0 1 1-2.24 5.24l-5.22-2.35a.15.15 0 0 0-.2.15l.61 5.7a2.85 2.85 0 1 1-5.66.52l-.46-5.88a3 3 0 0 0-1.8-2.52l-5.42-2.33a2.84 2.84 0 0 1-.54-4.9Zm19.07-7.84a2.87 2.87 0 1 1 3.62-4.47l6.06 5.14a.14.14 0 0 0 .22-.1l.23-7.93a2.87 2.87 0 1 1 5.74.29l-.83 11.38a3 3 0 0 0 .25 1.44l1.29 2.9a2.94 2.94 0 1 1-5.37 2.39l-1.3-2.9a3 3 0 0 0-.9-1.14l-9.01-7Zm34.35 6.68a2.93 2.93 0 0 1-3.53-2.3 2.78 2.78 0 0 1 .41-2.2 2.93 2.93 0 0 1 1.9-1.3 2.9 2.9 0 0 1 2.2.42 2.8 2.8 0 0 1 1.21 3.41c-.18.5-.46.93-.84 1.28-.38.35-.83.58-1.34.7Zm14.61-19.33a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm0 17.05a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm4.37-21.82a2.96 2.96 0 0 1 2.97 2.96v15.9a2.96 2.96 0 0 1-5.93 0v-15.9a2.96 2.96 0 0 1 2.96-2.96Zm32.68 15.52a12.24 12.24 0 0 1-2.66 5.71 9.5 9.5 0 0 1-4.53 2.9c-1.74.5-3.58.55-5.52.14a11.24 11.24 0 0 1-5-2.38 9.6 9.6 0 0 1-2.94-4.5 12.4 12.4 0 0 1-.1-6.29c.5-2.37 1.38-4.28 2.65-5.7a9.44 9.44 0 0 1 4.51-2.91c1.75-.51 3.6-.56 5.54-.14 1.94.4 3.6 1.2 4.99 2.37a9.42 9.42 0 0 1 2.95 4.5c.58 1.82.62 3.92.11 6.3Zm-5.96-1.27c.27-1.28.33-2.4.18-3.34a4.18 4.18 0 0 0-1.07-2.32 4.2 4.2 0 0 0-2.27-1.2 4.24 4.24 0 0 0-2.57.17c-.75.31-1.39.88-1.92 1.69a9.2 9.2 0 0 0-1.18 3.12 9.4 9.4 0 0 0-.2 3.35 4.4 4.4 0 0 0 1.07 2.31c.57.6 1.33 1 2.29 1.2.96.2 1.8.15 2.56-.17.75-.31 1.4-.88 1.91-1.68.53-.81.93-1.85 1.2-3.13Zm31.3 22.59a4.54 4.54 0 0 1-1.53-1.9 4.9 4.9 0 0 1-.38-2.38 4.5 4.5 0 0 1 .88-2.27c.5-.7 1.14-1.21 1.89-1.54a4.81 4.81 0 0 1 4.65.5 4.72 4.72 0 0 1 1.04 6.55 4.8 4.8 0 0 1-4.27 1.91 4.51 4.51 0 0 1-2.28-.87Zm21.19 28.18a2.96 2.96 0 0 1 1.08-4.05l13.73-7.93a3 3 0 0 1 4.1 1.1l4.98 8.62a2.39 2.39 0 0 1-4.13 2.39l-2.58-4.47a1.87 1.87 0 1 0-3.25 1.88l2.11 3.65a2.39 2.39 0 1 1-4.13 2.39l-1.55-2.68a3 3 0 0 0-4.1-1.1l-2.22 1.28a2.96 2.96 0 0 1-4.04-1.08Zm24 28.95c-2.31.75-4.4.94-6.29.56a9.5 9.5 0 0 1-4.78-2.47 11.26 11.26 0 0 1-2.87-4.71c-.61-1.9-.76-3.74-.44-5.53a9.6 9.6 0 0 1 2.43-4.8 12.5 12.5 0 0 1 5.39-3.23c2.31-.75 4.4-.94 6.27-.56a9.44 9.44 0 0 1 4.78 2.46 11.23 11.23 0 0 1 2.89 4.73c.6 1.88.75 3.71.43 5.5a9.43 9.43 0 0 1-2.41 4.81 12.26 12.26 0 0 1-5.4 3.24Zm-1.89-5.8c1.25-.4 2.24-.9 2.98-1.5a4.17 4.17 0 0 0 1.48-2.09 4.2 4.2 0 0 0-.1-2.57 4.25 4.25 0 0 0-1.43-2.14 4.27 4.27 0 0 0-2.42-.82 9.32 9.32 0 0 0-3.3.54c-1.24.4-2.24.9-2.99 1.5a4.34 4.34 0 0 0-1.47 2.09 4.3 4.3 0 0 0 .1 2.57c.3.93.78 1.65 1.43 2.14.65.5 1.46.77 2.41.82.97.05 2.07-.13 3.31-.53Zm13.3 10.23a2.84 2.84 0 0 1-1.18 2.61l-4.52 3.21a.15.15 0 0 0-.06.14c.01.05.04.1.1.12l5.1 2.24a2.82 2.82 0 1 1-2.31 5.14l-5.37-2.48a3 3 0 0 0-3.1.35l-4.65 3.61a2.85 2.85 0 1 1-3.41-4.56l4.64-3.35a.15.15 0 0 0 .06-.13c0-.06-.04-.1-.08-.12l-5.25-2.31a2.84 2.84 0 1 1 2.38-5.17l5.32 2.54a3 3 0 0 0 3.1-.3l4.71-3.52a2.84 2.84 0 0 1 4.52 1.98Zm-2.74 20.44a2.87 2.87 0 1 1 2.06 5.36l-7.48 2.68a.13.13 0 0 0-.1.11c0 .06.03.1.07.13l6.76 4.17a2.87 2.87 0 1 1-3.12 4.83l-9.45-6.42a3 3 0 0 0-1.37-.5l-3.15-.33a2.94 2.94 0 0 1 .62-5.85l3.14.33a3 3 0 0 0 1.45-.2l10.57-4.31Zm-22.96 26.41a2.93 2.93 0 0 1 3.75-1.92 2.8 2.8 0 0 1 1.71 1.47c.37.74.42 1.5.17 2.28-.24.74-.73 1.3-1.46 1.7a2.8 2.8 0 0 1-3.56-.66c-.34-.4-.57-.85-.7-1.36-.1-.5-.08-1.01.09-1.51Zm9.43 22.32a2.39 2.39 0 1 1 4.13 2.38l-4.37 7.57a2.39 2.39 0 1 1-4.13-2.39l4.37-7.56Zm-14.77-8.53a2.39 2.39 0 1 1 4.14 2.39l-4.37 7.56a2.39 2.39 0 0 1-4.13-2.38l4.36-7.57Zm16.72 14.7a2.96 2.96 0 0 1-4.05 1.08l-13.76-7.95a2.96 2.96 0 1 1 2.96-5.13l13.76 7.95a2.96 2.96 0 0 1 1.09 4.04Zm-29.78 20.54a12.3 12.3 0 0 1-3.62-5.17 9.5 9.5 0 0 1-.25-5.37 11.27 11.27 0 0 1 2.64-4.85 11.25 11.25 0 0 1 4.57-3.14 9.6 9.6 0 0 1 5.37-.3c1.87.43 3.7 1.44 5.5 3.06a12.33 12.33 0 0 1 3.61 5.15c.61 1.82.7 3.6.26 5.36a11.24 11.24 0 0 1-2.65 4.87 11.2 11.2 0 0 1-4.55 3.13 9.4 9.4 0 0 1-5.37.31 12.26 12.26 0 0 1-5.5-3.05Zm4.08-4.53c.97.88 1.9 1.48 2.8 1.82.9.35 1.75.43 2.54.24a4.2 4.2 0 0 0 2.18-1.37 4.24 4.24 0 0 0 1.14-2.31c.1-.8-.07-1.64-.5-2.5a9.33 9.33 0 0 0-2.12-2.6 9.4 9.4 0 0 0-2.8-1.83 4.34 4.34 0 0 0-2.54-.24c-.8.2-1.52.66-2.17 1.39a4.24 4.24 0 0 0-1.14 2.3c-.1.81.06 1.64.5 2.5a9.21 9.21 0 0 0 2.11 2.6Zm-35.21 15.81a4.54 4.54 0 0 1 2.4-.38c.83.1 1.58.39 2.25.86a4.55 4.55 0 0 1 1.54 1.9c.35.79.48 1.6.38 2.4a4.81 4.81 0 0 1-2.76 3.79 4.73 4.73 0 0 1-6.19-2.38 4.81 4.81 0 0 1 .48-4.66 4.51 4.51 0 0 1 1.9-1.53Z"/></svg>`)),v(a({"block text-center text-xl font-medium":!0},f)),{context:e,store_name:t},this.__storeDomainGetValue,"accepted"===e&&this.getStorePageHref&&this.data?n(L||(L=B` <div ?hidden="${0}"> <a class="text-primary font-medium cursor-pointer rounded transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="store_link"></foxy-i18n> </a> </div> `),"accepted"!==e||!this.getStorePageHref,this.getStorePageHref(this.data._links["fx:store"].href)):"",{context:e,store_name:t},o(null===(i=null===(r=this.data)||void 0===r?void 0:r._links["fx:revoke"])||void 0===i?void 0:i.href),h.matches("reject",!0)&&h.matches("accept",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:reject"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:accept"])||void 0===m?void 0:m.href))}}customElements.define("foxy-user-invitation-form",P);export{P as UserInvitationForm};
@@ -1 +1 @@
1
- import"./shared-3691287b.js";import"./shared-38eb8858.js";import"./shared-ba4f2bca.js";import"./shared-c92d72ba.js";import"./shared-bf5b2106.js";import"./shared-f15af5d1.js";import{I as e}from"./shared-0643656a.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-1ce5b073.js";import{i as a}from"./shared-53e42a77.js";import{h as i}from"./shared-ba5c42c7.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-0995ae7c.js";import"./shared-500b7eb7.js";import"./shared-42c91940.js";import"./shared-68a5368a.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-75e7361d.js";import"./shared-70380f94.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-cc5e4c06.js";import"./shared-5212ef4f.js";import"./shared-4e309d01.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-d0aed1c1.js";import"./foxy-copy-to-clipboard.js";import"./shared-7a4ca3f1.js";import"./shared-253e51f7.js";let n,d=e=>e;class c extends(s(e,"webhook-form")){constructor(){super(...arguments),this.getStatusPageHref=null,this.getLogPageHref=null,this.resourceUri=null,this.__encryptionKeyGeneratorOptions={separator:"",length:512},this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get properties(){return r(r({},super.properties),{},{getStatusPageHref:{attribute:!1},getLogPageHref:{attribute:!1},resourceUri:{attribute:"resource-uri"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!!e||"encryption-key:v8n_required",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data?e.unshift("group-two:event-resource"):e.unshift("logs","statuses"),new t(e.join(" ").trim())}get headerSubtitleOptions(){var e,r;const t=null===(e=this.data)||void 0===e?void 0:e.format;return{context:"json"===t?null===(r=this.data)||void 0===r?void 0:r.event_resource:t}}edit(e){super.edit(e),this.form.format||super.edit({format:"json"}),this.form.version||super.edit({version:2})}renderBody(){var e,r,t,s;const c=this.resourceUri?o(this.resourceUri):null;let m,l;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:statuses"].href)&&void 0!==r?r:"");null!==c&&t.searchParams.set("resource_id",String(c)),t.searchParams.set("order","date_created desc"),m=t.toString()}catch(e){m=void 0}try{const e=new URL(null!==(s=null===(t=this.data)||void 0===t?void 0:t._links["fx:logs"].href)&&void 0!==s?s:"");null!==c&&e.searchParams.set("resource_id",String(c)),e.searchParams.set("order","date_created desc"),l=e.toString()}catch(e){l=void 0}return i(n||(n=d` ${0} <foxy-internal-summary-control infer="group-one"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="group-two"> <foxy-internal-select-control layout="summary-item" infer="event-resource" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control layout="summary-item" infer="query"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="url"></foxy-internal-text-control> <foxy-internal-password-control layout="summary-item" infer="encryption-key" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="group-three"> <foxy-internal-switch-control infer="is-active"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card" hide-delete-button .getPageHref="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="${0}" infer="logs" limit="10" item="foxy-webhook-log-card" hide-delete-button .getPageHref="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),this.__eventResources,this.__encryptionKeyGeneratorOptions,a(m),this.getStatusPageHref,this.resourceUri?{layout:"resource"}:{},a(l),this.getLogPageHref,this.resourceUri?{layout:"resource"}:{},super.renderBody())}}customElements.define("foxy-webhook-form",c);export{c as WebhookForm};
1
+ import"./shared-bfdbe217.js";import"./shared-38eb8858.js";import"./shared-ef98e595.js";import"./shared-c92d72ba.js";import"./shared-bf5b2106.js";import"./shared-f15af5d1.js";import{I as e}from"./shared-0643656a.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{_ as r,B as t}from"./shared-cb58dfcd.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-1ce5b073.js";import{i as a}from"./shared-53e42a77.js";import{h as i}from"./shared-ba5c42c7.js";import"./shared-7b3aac7e.js";import"./shared-a3a4c368.js";import"./shared-0995ae7c.js";import"./shared-500b7eb7.js";import"./shared-42c91940.js";import"./shared-68a5368a.js";import"./shared-20fb2969.js";import"./shared-986d0f7f.js";import"./shared-292dcee0.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-75e7361d.js";import"./shared-70380f94.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";import"./shared-5afb584d.js";import"./shared-f83207fb.js";import"./shared-5592ec6e.js";import"./shared-cd96ff03.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1f6366c0.js";import"./shared-a4ca1c5d.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-6286efb1.js";import"./shared-6b3b8c63.js";import"./shared-76cbea00.js";import"./shared-d2304d50.js";import"./shared-4ded48ee.js";import"./shared-92153a7f.js";import"./shared-cc5e4c06.js";import"./shared-5212ef4f.js";import"./shared-4e309d01.js";import"./shared-5c057c26.js";import"./shared-0662adb7.js";import"./shared-651c44fa.js";import"./shared-c365c1ae.js";import"./shared-f28e46bf.js";import"./shared-127ec8a7.js";import"./shared-16ae74b2.js";import"./shared-d0aed1c1.js";import"./foxy-copy-to-clipboard.js";import"./shared-7a4ca3f1.js";import"./shared-253e51f7.js";let n,d=e=>e;class c extends(s(e,"webhook-form")){constructor(){super(...arguments),this.getStatusPageHref=null,this.getLogPageHref=null,this.resourceUri=null,this.__encryptionKeyGeneratorOptions={separator:"",length:512},this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get properties(){return r(r({},super.properties),{},{getStatusPageHref:{attribute:!1},getLogPageHref:{attribute:!1},resourceUri:{attribute:"resource-uri"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!!e||"encryption-key:v8n_required",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data?e.unshift("group-two:event-resource"):e.unshift("logs","statuses"),new t(e.join(" ").trim())}get headerSubtitleOptions(){var e,r;const t=null===(e=this.data)||void 0===e?void 0:e.format;return{context:"json"===t?null===(r=this.data)||void 0===r?void 0:r.event_resource:t}}edit(e){super.edit(e),this.form.format||super.edit({format:"json"}),this.form.version||super.edit({version:2})}renderBody(){var e,r,t,s;const c=this.resourceUri?o(this.resourceUri):null;let m,l;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:statuses"].href)&&void 0!==r?r:"");null!==c&&t.searchParams.set("resource_id",String(c)),t.searchParams.set("order","date_created desc"),m=t.toString()}catch(e){m=void 0}try{const e=new URL(null!==(s=null===(t=this.data)||void 0===t?void 0:t._links["fx:logs"].href)&&void 0!==s?s:"");null!==c&&e.searchParams.set("resource_id",String(c)),e.searchParams.set("order","date_created desc"),l=e.toString()}catch(e){l=void 0}return i(n||(n=d` ${0} <foxy-internal-summary-control infer="group-one"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="group-two"> <foxy-internal-select-control layout="summary-item" infer="event-resource" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control layout="summary-item" infer="query"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="url"></foxy-internal-text-control> <foxy-internal-password-control layout="summary-item" infer="encryption-key" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="group-three"> <foxy-internal-switch-control infer="is-active"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card" hide-delete-button .getPageHref="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="${0}" infer="logs" limit="10" item="foxy-webhook-log-card" hide-delete-button .getPageHref="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),this.__eventResources,this.__encryptionKeyGeneratorOptions,a(m),this.getStatusPageHref,this.resourceUri?{layout:"resource"}:{},a(l),this.getLogPageHref,this.resourceUri?{layout:"resource"}:{},super.renderBody())}}customElements.define("foxy-webhook-form",c);export{c as WebhookForm};
@@ -1 +1 @@
1
- import"./shared-68a5368a.js";import"./shared-3691287b.js";import{I as e}from"./shared-cc5e4c06.js";import{I as t}from"./shared-0643656a.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-70380f94.js";import{_ as s,m as i}from"./shared-cb58dfcd.js";import{h as r,s as o}from"./shared-ba5c42c7.js";import{s as l}from"./shared-53e476fd.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{u as c}from"./shared-f83207fb.js";let u,f=e=>e;let p,y,m,v,x,b,g,$,_=e=>e;customElements.define("foxy-internal-resource-picker-control-form",class extends t{constructor(){super(...arguments),this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{selectionProps:{attribute:!1}})}renderBody(){return r(u||(u=f` <foxy-internal-async-list-control infer="selection" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends e{constructor(){super(...arguments),this.getDisplayValueOptions=e=>({resource:e}),this.showCopyIdButton=!1,this.virtualHost=c("internal-resource-picker-control-"),this.getItemUrl=null,this.formProps={},this.filters=[],this.layout=null,this.first=null,this.item=null,this.form=null,this.__getItemRenderer=i((e=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer="card"\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)))}static get properties(){return s(s({},super.properties),{},{getDisplayValueOptions:{attribute:!1},showCopyIdButton:{type:Boolean,attribute:"show-copy-id-button"},virtualHost:{},getItemUrl:{attribute:!1},formProps:{type:Object},filters:{type:Array},layout:{},first:{},item:{},form:{}})}renderControl(){var e;const t=s(s({},this.formProps),{},{".selectionProps":{".filters":this.filters,".first":this.first,".item":this.item}});return r(p||(p=_` <foxy-form-dialog parent="foxy://${0}/select" header="header" infer="dialog" alert .props="${0}" .form="${0}" @fetch="${0}"> </foxy-form-dialog> ${0} `),this.virtualHost,t,null!==(e=this.form)&&void 0!==e?e:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(e){var t,s;super.updated(e),e.has("item")&&(null===(s=(t=this.__getItemRenderer.cache).clear)||void 0===s||s.call(t))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const e=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="leading-xs"> <div class="flex items-center gap-xs"> <div class="text-m text-body whitespace-nowrap flex-1">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div class="truncate min-w-0"> ${0} </div> </button> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <div class="text-xs text-secondary">${0}</div> <div class="text-xs text-error" ?hidden="${0}"> ${0} </div> </div> </div> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.t("select"),h({"text-right min-w-0 transition-colors transition-opacity":!0,"rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"cursor-pointer text-body hover-opacity-80":!this.disabled&&!this.readonly,"font-medium":!this.readonly}),this.disabled||this.readonly,(e=>{if(this.disabled||this.readonly)return;const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==e?void 0:e.data)?this.getDisplayValueOptions(e.data):{context:(null==e?void 0:e.in("fail"))?"fail":"busy"}):this.placeholder,this.t("clear"),h({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,this.__clear,o(v||(v=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,this.disabled||this.readonly,this._errorMessage,d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var e,t,s,i,o;const n=this.__valueLoader,c="string"==typeof this._value?a(this._value):void 0,u="string"==typeof this._value?null===(e=this.getItemUrl)||void 0===e?void 0:e.call(this,this._value,null!==(t=null==n?void 0:n.data)&&void 0!==t?t:null):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto text-l">${0}</span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> <button class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?disabled="${0}" @click="${0}"> <div class="${0}"> <foxy-nucleon class="block" infer="" href="${0}" id="valueLoader" @update="${0}"> ${0} </foxy-nucleon> </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-s transition-colors font-medium":!0,"text-disabled":this.disabled}),this.label,u?r(b||(b=_` <a class="text-body rounded transition-opacity hover-opacity-90 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="view"></foxy-i18n> </a> `),u):"",this.showCopyIdButton&&null!==c?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),c):"",this.readonly||!this._value?"":r($||($=_` <vaadin-button theme="error tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="clear"></foxy-i18n> </vaadin-button> `),this.disabled,this.__clear),!this.helperText,this.helperText,h({"block w-full bg-contrast-5 rounded text-left transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer hover-bg-contrast-10":!this.disabled&&!this.readonly,"cursor-default":this.disabled||this.readonly,"mt-s":!!this.label||!!this.helperText}),this.disabled||this.readonly,(e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),d(this._value||void 0),(()=>this.requestUpdate()),this.__getItemRenderer(this.item)({html:r,data:null!==(s=null==n?void 0:n.data)&&void 0!==s?s:null,href:this._value||"",related:[],parent:"",props:{},spread:l,simplifyNsLoading:this.simplifyNsLoading,disabled:this.disabled,disabledControls:this.disabledControls,readonly:this.readonly,readonlyControls:this.readonlyControls,hidden:this.hidden,hiddenControls:this.hiddenControls,templates:this.templates,previous:null,next:null,group:null!==(o=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==o?o:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(e){if(!(e instanceof n))return;if(e.defaultPrevented)return;const{url:t,method:s}=e.request;return t===`foxy://${this.virtualHost}/select`&&"POST"===s?e.respondWith(this.__handleSelect(e.request)):t===`foxy://${this.virtualHost}/empty`&&"GET"===s?e.respondWith(this.__handleEmpty()):void 0}async __handleSelect(e){const t=await e.clone().json();return this._value=t.selection,new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}async __handleEmpty(){return new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}get __valueLoader(){return this.renderRoot.querySelector("#valueLoader")}});
1
+ import"./shared-68a5368a.js";import"./shared-bfdbe217.js";import{I as e}from"./shared-cc5e4c06.js";import{I as t}from"./shared-0643656a.js";import"./foxy-copy-to-clipboard.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-70380f94.js";import{_ as s,m as i}from"./shared-cb58dfcd.js";import{h as r,s as o}from"./shared-ba5c42c7.js";import{s as l}from"./shared-53e476fd.js";import{g as a}from"./shared-bab2ea2c.js";import{F as n}from"./shared-343d1fd7.js";import{i as d}from"./shared-53e42a77.js";import{c as h}from"./shared-4e709717.js";import{u as c}from"./shared-f83207fb.js";let u,f=e=>e;let p,y,m,v,x,b,g,$,_=e=>e;customElements.define("foxy-internal-resource-picker-control-form",class extends t{constructor(){super(...arguments),this.selectionProps={}}static get properties(){return s(s({},super.properties),{},{selectionProps:{attribute:!1}})}renderBody(){return r(u||(u=f` <foxy-internal-async-list-control infer="selection" form="foxy-null" hide-delete-button hide-create-button @itemclick="${0}" ...="${0}"> </foxy-internal-async-list-control> `),(e=>{e.preventDefault(),this.edit({selection:e.detail}),this.submit()}),l(this.selectionProps))}}),customElements.define("foxy-internal-resource-picker-control",class extends e{constructor(){super(...arguments),this.getDisplayValueOptions=e=>({resource:e}),this.showCopyIdButton=!1,this.virtualHost=c("internal-resource-picker-control-"),this.getItemUrl=null,this.formProps={},this.filters=[],this.layout=null,this.first=null,this.item=null,this.form=null,this.__getItemRenderer=i((e=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer="card"\n href=\${ctx.href}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)))}static get properties(){return s(s({},super.properties),{},{getDisplayValueOptions:{attribute:!1},showCopyIdButton:{type:Boolean,attribute:"show-copy-id-button"},virtualHost:{},getItemUrl:{attribute:!1},formProps:{type:Object},filters:{type:Array},layout:{},first:{},item:{},form:{}})}renderControl(){var e;const t=s(s({},this.formProps),{},{".selectionProps":{".filters":this.filters,".first":this.first,".item":this.item}});return r(p||(p=_` <foxy-form-dialog parent="foxy://${0}/select" header="header" infer="dialog" alert .props="${0}" .form="${0}" @fetch="${0}"> </foxy-form-dialog> ${0} `),this.virtualHost,t,null!==(e=this.form)&&void 0!==e?e:"foxy-internal-resource-picker-control-form",this.__handleFetchEvent,"summary-item"===this.layout?this.__renderSummaryItemLayout():this.__renderStandaloneLayout())}updated(e){var t,s;super.updated(e),e.has("item")&&(null===(s=(t=this.__getItemRenderer.cache).clear)||void 0===s||s.call(t))}__clear(){this._value="",this.dispatchEvent(new CustomEvent("clear"))}__renderSummaryItemLayout(){const e=this.renderRoot.querySelector("#value");return r(y||(y=_` <div class="leading-xs"> <div class="flex items-center gap-xs"> <div class="text-m text-body whitespace-nowrap flex-1">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div class="truncate min-w-0"> ${0} </div> </button> <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> <div style="max-width:32rem"> <div class="text-xs text-secondary">${0}</div> <div class="text-xs text-error" ?hidden="${0}"> ${0} </div> </div> </div> <foxy-nucleon infer="" href="${0}" id="value" @update="${0}"> </foxy-nucleon> `),this.label,this.t("select"),h({"text-right min-w-0 transition-colors transition-opacity":!0,"rounded-s focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"cursor-pointer text-body hover-opacity-80":!this.disabled&&!this.readonly,"font-medium":!this.readonly}),this.disabled||this.readonly,(e=>{if(this.disabled||this.readonly)return;const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),this._value?r(m||(m=_` <foxy-i18n infer="" key="value" .options="${0}"> </foxy-i18n> `),(null==e?void 0:e.data)?this.getDisplayValueOptions(e.data):{context:(null==e?void 0:e.in("fail"))?"fail":"busy"}):this.placeholder,this.t("clear"),h({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,this.__clear,o(v||(v=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)),this.helperText,this.disabled||this.readonly,this._errorMessage,d(this._value||void 0),(()=>this.requestUpdate()))}__renderStandaloneLayout(){var e,t,s,i,o;const n=this.__valueLoader,c="string"==typeof this._value?a(this._value):void 0,u="string"==typeof this._value?null===(e=this.getItemUrl)||void 0===e?void 0:e.call(this,this._value,null!==(t=null==n?void 0:n.data)&&void 0!==t?t:null):void 0;return r(x||(x=_` <div class="block group"> <div class="${0}"> <span class="mr-auto text-l">${0}</span> ${0} ${0} ${0} </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> <button class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?disabled="${0}" @click="${0}"> <div class="${0}"> <foxy-nucleon class="block" infer="" href="${0}" id="valueLoader" @update="${0}"> ${0} </foxy-nucleon> </div> </button> <div class="mt-xs text-xs leading-xs text-error" ?hidden="${0}"> ${0} </div> </div> `),h({"flex items-center gap-s transition-colors font-medium":!0,"text-disabled":this.disabled}),this.label,u?r(b||(b=_` <a class="text-body rounded transition-opacity hover-opacity-90 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="view"></foxy-i18n> </a> `),u):"",this.showCopyIdButton&&null!==c?r(g||(g=_` <foxy-copy-to-clipboard layout="text" theme="contrast tertiary-inline" infer="copy-id" text="${0}"> </foxy-copy-to-clipboard> `),c):"",this.readonly||!this._value?"":r($||($=_` <vaadin-button theme="error tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="clear"></foxy-i18n> </vaadin-button> `),this.disabled,this.__clear),!this.helperText,this.helperText,h({"block w-full bg-contrast-5 rounded text-left transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer hover-bg-contrast-10":!this.disabled&&!this.readonly,"cursor-default":this.disabled||this.readonly,"mt-s":!!this.label||!!this.helperText}),this.disabled||this.readonly,(e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("foxy-form-dialog");s.href="",s.show(t)}),h({"transition-opacity":!0,"opacity-50":this.disabled}),d(this._value||void 0),(()=>this.requestUpdate()),this.__getItemRenderer(this.item)({html:r,data:null!==(s=null==n?void 0:n.data)&&void 0!==s?s:null,href:this._value||"",related:[],parent:"",props:{},spread:l,simplifyNsLoading:this.simplifyNsLoading,disabled:this.disabled,disabledControls:this.disabledControls,readonly:this.readonly,readonlyControls:this.readonlyControls,hidden:this.hidden,hiddenControls:this.hiddenControls,templates:this.templates,previous:null,next:null,group:null!==(o=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==o?o:"",lang:this.lang,ns:this.ns}),!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}__handleFetchEvent(e){if(!(e instanceof n))return;if(e.defaultPrevented)return;const{url:t,method:s}=e.request;return t===`foxy://${this.virtualHost}/select`&&"POST"===s?e.respondWith(this.__handleSelect(e.request)):t===`foxy://${this.virtualHost}/empty`&&"GET"===s?e.respondWith(this.__handleEmpty()):void 0}async __handleSelect(e){const t=await e.clone().json();return this._value=t.selection,new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}async __handleEmpty(){return new Response(JSON.stringify({_links:{self:{href:`foxy://${this.virtualHost}/empty`}},message:"Resource selected."}))}get __valueLoader(){return this.renderRoot.querySelector("#valueLoader")}});
@@ -1 +1 @@
1
- import"./shared-6b3b8c63.js";import"./shared-4ded48ee.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-5c057c26.js";import{I as e}from"./shared-cc5e4c06.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))),this.helperText,this.disabled||this.readonly,this._errorMessage)}});
1
+ import"./shared-6b3b8c63.js";import"./shared-4ded48ee.js";import"./shared-7a2aaafa.js";import"./shared-f9f64dee.js";import"./shared-5c057c26.js";import{I as e}from"./shared-cc5e4c06.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget,i=r||this.options[0].value;this._value=this.__i18n.formatValue([t.value,i])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m||1,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))),this.helperText,this.disabled||this.readonly,this._errorMessage)}});
@@ -1,4 +1,4 @@
1
- import"./shared-7b3aac7e.js";import{h as t,P as e}from"./shared-a3a4c368.js";import{F as i,t as o}from"./shared-0995ae7c.js";import{T as n,a,E as s}from"./shared-500b7eb7.js";import"./shared-42c91940.js";import{O as r}from"./shared-20fb2969.js";import"./shared-68a5368a.js";import"./shared-ba4f2bca.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-70380f94.js";import{I as l}from"./shared-cc5e4c06.js";import"./shared-1f6366c0.js";import{x as d}from"./shared-1ce5b073.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-cb58dfcd.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
1
+ import"./shared-7b3aac7e.js";import{h as t,P as e}from"./shared-a3a4c368.js";import{F as i,t as o}from"./shared-0995ae7c.js";import{T as n,a,E as s}from"./shared-500b7eb7.js";import"./shared-42c91940.js";import{O as r}from"./shared-20fb2969.js";import"./shared-68a5368a.js";import"./shared-ef98e595.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-70380f94.js";import{I as l}from"./shared-cc5e4c06.js";import"./shared-1f6366c0.js";import{x as d}from"./shared-1ce5b073.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-cb58dfcd.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -12,4 +12,4 @@ import{I as e}from"./shared-cc5e4c06.js";import"./shared-70380f94.js";import{_ a
12
12
  * subject to an additional IP rights grant found at
13
13
  * http://polymer.github.io/PATENTS.txt
14
14
  */
15
- const l=new WeakMap,d=s((e=>t=>{if(!(t instanceof r))throw new Error("unsafeHTML can only be used in text bindings");const s=l.get(t);if(void 0!==s&&o(e)&&e===s.value&&t.value===s.fragment)return;const a=document.createElement("template");a.innerHTML=e;const i=document.importNode(a.content,!0);t.setValue(i),l.set(t,{value:e,fragment:i})}));let u,p,c,h,m=e=>e;customElements.define("foxy-internal-summary-control",class extends e{constructor(){super(...arguments),this.unsafeHelperText=!1,this.layout=null,this.count=null,this.open=!1}static get properties(){return t(t({},super.properties),{},{unsafeHelperText:{type:Boolean,attribute:"unsafe-helper-text"},layout:{},count:{type:Number},open:{type:Boolean}})}static get styles(){return[...super.styles,a(u||(u=m`::slotted(*){min-width:100%}:host(:not([layout=section])) slot::slotted(*){background-color:var(--lumo-contrast-5pct);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)}details summary>div{border-radius:var(--lumo-border-radius)}details[open] summary>div{border-radius:var(--lumo-border-radius) var(--lumo-border-radius) 0 0}.with-unsafe a{text-decoration:underline;transition:color .1s ease-in-out}.with-unsafe a:hover{color:var(--lumo-primary-text-color)}.with-unsafe a:focus{outline:0;box-shadow:0 0 0 2px var(--lumo-primary-color-50pct);border-radius:var(--lumo-border-radius-s)}`))]}renderLightDom(){}renderControl(){return"details"===this.layout?i(p||(p=m` <details class="rounded overflow-hidden" ?open="${0}" @toggle="${0}"> <summary class="select-none cursor-pointer focus-outline-none group"> <div class="leading-s bg-contrast-5 group-focus-ring-2 group-focus-ring-inset group-focus-ring-primary-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?hidden="${0}"> <p class="font-medium uppercase text-s tracking-wider flex items-center justify-between gap-s" ?hidden="${0}"> <span> ${0}${0} </span> <span class="flex items-center justify-center transition-colors text-tertiary group-hover-text-body" style="transform:scale(1.35)"> ${0} </span> </p> <p class="text-s text-secondary with-unsafe" ?hidden="${0}"> ${0} </p> </div> </summary> <div class="overflow-hidden grid" style="gap:1px"> <slot></slot> </div> </details> `),this.open,(e=>{const t=e.currentTarget;this.open=t.open,e.composed||e.bubbles||this.dispatchEvent(new CustomEvent("toggle"))}),!this.label&&!this.helperText,!this.label,this.label,"number"==typeof this.count?` (${this.count})`:"",n(c||(c=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2em; height: 1.2em"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)),!this.helperText,this.unsafeHelperText?d(this.helperText):this.helperText):i(h||(h=m` <div class="leading-s mb-s" ?hidden="${0}"> <p class="font-medium text-body text-l" ?hidden="${0}">${0}</p> <p class="text-s text-secondary with-unsafe" ?hidden="${0}"> ${0} </p> </div> <div class="rounded overflow-hidden grid" style="gap:1px"> <slot></slot> </div> `),!this.label&&!this.helperText,!this.label,this.label,!this.helperText,this.unsafeHelperText?d(this.helperText):this.helperText)}});export{d as u};
15
+ const l=new WeakMap,d=s((e=>t=>{if(!(t instanceof r))throw new Error("unsafeHTML can only be used in text bindings");const s=l.get(t);if(void 0!==s&&o(e)&&e===s.value&&t.value===s.fragment)return;const a=document.createElement("template");a.innerHTML=e;const i=document.importNode(a.content,!0);t.setValue(i),l.set(t,{value:e,fragment:i})}));let u,p,c,h,m=e=>e;customElements.define("foxy-internal-summary-control",class extends e{constructor(){super(...arguments),this.unsafeHelperText=!1,this.layout=null,this.count=null,this.open=!1}static get properties(){return t(t({},super.properties),{},{unsafeHelperText:{type:Boolean,attribute:"unsafe-helper-text"},layout:{},count:{type:Number},open:{type:Boolean}})}static get styles(){return[...super.styles,a(u||(u=m`::slotted(*){min-width:100%}:host(:not([layout=section])) slot::slotted(*){background-color:var(--lumo-contrast-5pct);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)}details summary>div{border-radius:var(--lumo-border-radius)}details[open] summary>div{border-radius:var(--lumo-border-radius) var(--lumo-border-radius) 0 0}.with-unsafe a{text-decoration:underline;transition:color .1s ease-in-out}.with-unsafe a:hover{color:var(--lumo-primary-text-color)}.with-unsafe a:focus{outline:0;box-shadow:0 0 0 2px var(--lumo-primary-color-50pct);border-radius:var(--lumo-border-radius-s)}`))]}renderLightDom(){}renderControl(){return"details"===this.layout?i(p||(p=m` <details class="rounded overflow-hidden" ?open="${0}" @toggle="${0}"> <summary class="select-none cursor-pointer focus-outline-none group"> <div class="leading-xs bg-contrast-5 group-focus-ring-2 group-focus-ring-inset group-focus-ring-primary-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" ?hidden="${0}"> <p class="flex items-center justify-between gap-s" ?hidden="${0}"> <span> ${0}${0} </span> <span class="flex items-center justify-center transition-colors text-tertiary group-hover-text-body" style="transform:scale(1.35)"> ${0} </span> </p> <p class="text-xs text-secondary with-unsafe" ?hidden="${0}"> ${0} </p> </div> </summary> <div class="overflow-hidden grid" style="gap:1px"> <slot></slot> </div> </details> `),this.open,(e=>{const t=e.currentTarget;this.open=t.open,e.composed||e.bubbles||this.dispatchEvent(new CustomEvent("toggle"))}),!this.label&&!this.helperText,!this.label,this.label,"number"==typeof this.count?` (${this.count})`:"",n(c||(c=m`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2em; height: 1.2em"><path fill-rule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)),!this.helperText,this.unsafeHelperText?d(this.helperText):this.helperText):i(h||(h=m` <div class="leading-s mb-s" ?hidden="${0}"> <p class="font-medium text-body text-l" ?hidden="${0}">${0}</p> <p class="text-s text-secondary with-unsafe" ?hidden="${0}"> ${0} </p> </div> <div class="rounded overflow-hidden grid" style="gap:1px"> <slot></slot> </div> `),!this.label&&!this.helperText,!this.label,this.label,!this.helperText,this.unsafeHelperText?d(this.helperText):this.helperText)}});export{d as u};
@@ -21,6 +21,35 @@
21
21
  "default_additional_field_select_placeholder": "Select",
22
22
  "conflict_message": "Remove {{ name }} to use this method",
23
23
  "no_oauth_support_message": "Adding this gateway is currently restricted from this admin. Please utilise our legacy administration to connect this gateway to your payment set.",
24
+ "card-verification-config-verification-amounts": {
25
+ "label": "Card verification amounts",
26
+ "helper_text": "",
27
+ "card-verification-config-verification-amounts-visa": {
28
+ "label": "Visa",
29
+ "placeholder": "1",
30
+ "helper_text": ""
31
+ },
32
+ "card-verification-config-verification-amounts-mastercard": {
33
+ "label": "Mastercard",
34
+ "placeholder": "1",
35
+ "helper_text": ""
36
+ },
37
+ "card-verification-config-verification-amounts-american-express": {
38
+ "label": "American Express",
39
+ "placeholder": "1",
40
+ "helper_text": ""
41
+ },
42
+ "card-verification-config-verification-amounts-discover": {
43
+ "label": "Discover",
44
+ "placeholder": "1",
45
+ "helper_text": ""
46
+ },
47
+ "card-verification-config-verification-amounts-default": {
48
+ "label": "Default",
49
+ "placeholder": "1",
50
+ "helper_text": ""
51
+ }
52
+ },
24
53
  "test-group": {
25
54
  "label": "Test setup",
26
55
  "label_inactive": "Test setup (inactive)",
@@ -37,6 +66,17 @@
37
66
  "general": {
38
67
  "label": "",
39
68
  "helper_text": "",
69
+ "card-verification": {
70
+ "label": "Card verification",
71
+ "placeholder": "Select",
72
+ "helper_text": "",
73
+ "helper_text_disabled": "Will never verify payment methods. Not recommended.",
74
+ "helper_text_enabled_automatically": "Will perform a verification on zero-amount transactions when a payment method is required (such as future subscriptions). Greater than zero-amount transactions will be authorized or auth+captured at the full amount.",
75
+ "helper_text_enabled_override": "For all transactions where a payment method is required (both zero-amount and greater than zero-amount), the payment method will be verified. Payment will not be collected without additional action. Only recommended in specific situations.",
76
+ "option_disabled": "Off",
77
+ "option_enabled_automatically": "Enabled (auto)",
78
+ "option_enabled_override": "Enabled (override)"
79
+ },
40
80
  "three-d-secure-toggle": {
41
81
  "label": "3D Secure",
42
82
  "placeholder": "Select",
@@ -74,6 +74,35 @@
74
74
  "default_additional_field_select_placeholder": "Select",
75
75
  "conflict_message": "Remove {{ name }} to use this method",
76
76
  "no_oauth_support_message": "Adding this gateway is currently restricted from this admin. Please utilise our legacy administration to connect this gateway to your payment set.",
77
+ "card-verification-config-verification-amounts": {
78
+ "label": "Card verification amounts",
79
+ "helper_text": "",
80
+ "card-verification-config-verification-amounts-visa": {
81
+ "label": "Visa",
82
+ "placeholder": "1",
83
+ "helper_text": ""
84
+ },
85
+ "card-verification-config-verification-amounts-mastercard": {
86
+ "label": "Mastercard",
87
+ "placeholder": "1",
88
+ "helper_text": ""
89
+ },
90
+ "card-verification-config-verification-amounts-american-express": {
91
+ "label": "American Express",
92
+ "placeholder": "1",
93
+ "helper_text": ""
94
+ },
95
+ "card-verification-config-verification-amounts-discover": {
96
+ "label": "Discover",
97
+ "placeholder": "1",
98
+ "helper_text": ""
99
+ },
100
+ "card-verification-config-verification-amounts-default": {
101
+ "label": "Default",
102
+ "placeholder": "1",
103
+ "helper_text": ""
104
+ }
105
+ },
77
106
  "test-group": {
78
107
  "label": "Test setup",
79
108
  "label_inactive": "Test setup (inactive)",
@@ -90,6 +119,17 @@
90
119
  "general": {
91
120
  "label": "",
92
121
  "helper_text": "",
122
+ "card-verification": {
123
+ "label": "Card verification",
124
+ "placeholder": "Select",
125
+ "helper_text": "",
126
+ "helper_text_disabled": "Will never verify payment methods. Not recommended.",
127
+ "helper_text_enabled_automatically": "Will perform a verification on zero-amount transactions when a payment method is required (such as future subscriptions). Greater than zero-amount transactions will be authorized or auth+captured at the full amount.",
128
+ "helper_text_enabled_override": "For all transactions where a payment method is required (both zero-amount and greater than zero-amount), the payment method will be verified. Payment will not be collected without additional action. Only recommended in specific situations.",
129
+ "option_disabled": "Off",
130
+ "option_enabled_automatically": "Enabled (auto)",
131
+ "option_enabled_override": "Enabled (override)"
132
+ },
93
133
  "three-d-secure-toggle": {
94
134
  "label": "3D Secure",
95
135
  "placeholder": "Select",