@foxy.io/elements 1.43.0-beta.5 → 1.43.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +1 -1
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-card.js +1 -1
  30. package/dist/cdn/foxy-customer-form.js +1 -1
  31. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  33. package/dist/cdn/foxy-customer-portal.js +1 -1
  34. package/dist/cdn/foxy-customer.js +1 -1
  35. package/dist/cdn/foxy-customers-table.js +1 -1
  36. package/dist/cdn/foxy-discount-builder.js +1 -1
  37. package/dist/cdn/foxy-discount-card.js +1 -1
  38. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  39. package/dist/cdn/foxy-donation.js +1 -1
  40. package/dist/cdn/foxy-downloadable-card.js +1 -1
  41. package/dist/cdn/foxy-downloadable-form.js +1 -1
  42. package/dist/cdn/foxy-email-template-card.js +1 -1
  43. package/dist/cdn/foxy-email-template-form.js +1 -1
  44. package/dist/cdn/foxy-error-entry-card.js +1 -1
  45. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  48. package/dist/cdn/foxy-form-dialog.js +1 -1
  49. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-card.js +1 -1
  51. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-form.js +1 -1
  56. package/dist/cdn/foxy-i18n-editor.js +1 -1
  57. package/dist/cdn/foxy-i18n.js +1 -1
  58. package/dist/cdn/foxy-integration-card.js +1 -1
  59. package/dist/cdn/foxy-integration-form.js +1 -1
  60. package/dist/cdn/foxy-item-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-form.js +1 -1
  63. package/dist/cdn/foxy-item-form.js +1 -1
  64. package/dist/cdn/foxy-item-option-card.js +1 -1
  65. package/dist/cdn/foxy-item-option-form.js +1 -1
  66. package/dist/cdn/foxy-items-form.js +1 -1
  67. package/dist/cdn/foxy-native-integration-card.js +1 -1
  68. package/dist/cdn/foxy-native-integration-form.js +1 -1
  69. package/dist/cdn/foxy-pagination.js +1 -1
  70. package/dist/cdn/foxy-passkey-card.js +1 -1
  71. package/dist/cdn/foxy-passkey-form.js +1 -1
  72. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  73. package/dist/cdn/foxy-payment-card.js +1 -1
  74. package/dist/cdn/foxy-payment-method-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  81. package/dist/cdn/foxy-query-builder.js +1 -1
  82. package/dist/cdn/foxy-report-form.js +1 -1
  83. package/dist/cdn/foxy-reports-table.js +1 -1
  84. package/dist/cdn/foxy-shipment-card.js +1 -1
  85. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  89. package/dist/cdn/foxy-sign-in-form.js +1 -1
  90. package/dist/cdn/foxy-spinner.js +1 -1
  91. package/dist/cdn/foxy-store-card.js +1 -1
  92. package/dist/cdn/foxy-store-form.js +1 -1
  93. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  94. package/dist/cdn/foxy-subscription-card.js +1 -1
  95. package/dist/cdn/foxy-subscription-form.js +1 -1
  96. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  97. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  98. package/dist/cdn/foxy-table.js +1 -1
  99. package/dist/cdn/foxy-tax-card.js +1 -1
  100. package/dist/cdn/foxy-tax-form.js +1 -1
  101. package/dist/cdn/foxy-template-config-form.js +1 -1
  102. package/dist/cdn/foxy-template-form.js +1 -1
  103. package/dist/cdn/foxy-template-set-card.js +1 -1
  104. package/dist/cdn/foxy-template-set-form.js +1 -1
  105. package/dist/cdn/foxy-transaction-card.js +1 -1
  106. package/dist/cdn/foxy-transaction.js +1 -1
  107. package/dist/cdn/foxy-transactions-table.js +7 -7
  108. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  109. package/dist/cdn/foxy-user-card.js +1 -1
  110. package/dist/cdn/foxy-user-form.js +1 -1
  111. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  112. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  113. package/dist/cdn/foxy-users-table.js +1 -1
  114. package/dist/cdn/foxy-webhook-card.js +1 -1
  115. package/dist/cdn/foxy-webhook-form.js +1 -1
  116. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  117. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  118. package/dist/cdn/shared-02dd05dd.js +1 -0
  119. package/dist/cdn/{shared-5492f8eb.js → shared-050780e9.js} +1 -1
  120. package/dist/cdn/{shared-f2e8070b.js → shared-090ee4eb.js} +1 -1
  121. package/dist/cdn/{shared-0fb90a71.js → shared-0d01cd66.js} +1 -1
  122. package/dist/cdn/{shared-46a20973.js → shared-0eef6fb7.js} +1 -1
  123. package/dist/cdn/{shared-7d1512e1.js → shared-15a7e329.js} +1 -1
  124. package/dist/cdn/{shared-d8b0432a.js → shared-1abfcf87.js} +1 -1
  125. package/dist/cdn/{shared-48129732.js → shared-1d03ea56.js} +1 -1
  126. package/dist/cdn/{shared-cf6122d9.js → shared-1d6ed748.js} +1 -1
  127. package/dist/cdn/{shared-b15efc37.js → shared-24998349.js} +1 -1
  128. package/dist/cdn/{shared-5a6e4a7b.js → shared-25a9d87d.js} +1 -1
  129. package/dist/cdn/{shared-160072f2.js → shared-264fb8a2.js} +1 -1
  130. package/dist/cdn/{shared-f2be9863.js → shared-297155d9.js} +1 -1
  131. package/dist/cdn/{shared-a0fbe3ef.js → shared-2d6478b0.js} +5 -5
  132. package/dist/cdn/{shared-2c7e0ed1.js → shared-302f3391.js} +1 -1
  133. package/dist/cdn/{shared-a89e8a07.js → shared-387d7254.js} +1 -1
  134. package/dist/cdn/{shared-5af5ab06.js → shared-3bc9eaf7.js} +1 -1
  135. package/dist/cdn/{shared-d3f37507.js → shared-3db3f3c3.js} +1 -1
  136. package/dist/cdn/{shared-f3590d20.js → shared-438e41ab.js} +1 -1
  137. package/dist/cdn/{shared-6313b188.js → shared-46efbc40.js} +1 -1
  138. package/dist/cdn/shared-47269bb6.js +1 -0
  139. package/dist/cdn/{shared-50a355d6.js → shared-4dba0d50.js} +1 -1
  140. package/dist/cdn/{shared-a41ccdc7.js → shared-51919259.js} +1 -1
  141. package/dist/cdn/{shared-acee789f.js → shared-5574ea83.js} +1 -1
  142. package/dist/cdn/{shared-e82550b1.js → shared-57b7386e.js} +1 -1
  143. package/dist/cdn/{shared-8530fbae.js → shared-597fffaa.js} +1 -1
  144. package/dist/cdn/{shared-e126cf44.js → shared-5b93d193.js} +1 -1
  145. package/dist/cdn/{shared-1b4a3e56.js → shared-64210e53.js} +1 -1
  146. package/dist/cdn/{shared-69c7ad04.js → shared-64c855e5.js} +1 -1
  147. package/dist/cdn/{shared-f7b4a4f6.js → shared-6c2a7d2f.js} +1 -1
  148. package/dist/cdn/{shared-88a1cb23.js → shared-73c199ae.js} +1 -1
  149. package/dist/cdn/{shared-0e605594.js → shared-7a818ad5.js} +1 -1
  150. package/dist/cdn/{shared-140c6b70.js → shared-7fa24559.js} +1 -1
  151. package/dist/cdn/{shared-107dc7d7.js → shared-8a83a6eb.js} +5 -5
  152. package/dist/cdn/{shared-ebfb86b5.js → shared-8ee6bff5.js} +1 -1
  153. package/dist/cdn/{shared-dc1fc2e6.js → shared-8f2da12b.js} +1 -1
  154. package/dist/cdn/{shared-8a743005.js → shared-9b599205.js} +1 -1
  155. package/dist/cdn/{shared-9884fb7d.js → shared-a1cfe9d5.js} +1 -1
  156. package/dist/cdn/{shared-0fa21237.js → shared-a1f181bf.js} +1 -1
  157. package/dist/cdn/{shared-d4928805.js → shared-a5580ef6.js} +1 -1
  158. package/dist/cdn/{shared-3f4549ba.js → shared-a6cf5b1f.js} +1 -1
  159. package/dist/cdn/{shared-9bfb584b.js → shared-ab9dfa48.js} +1 -1
  160. package/dist/cdn/{shared-ce0df878.js → shared-ac44a3a5.js} +1 -1
  161. package/dist/cdn/{shared-28253ef3.js → shared-af39ffd8.js} +1 -1
  162. package/dist/cdn/{shared-d3aefd9b.js → shared-b4a3d776.js} +1 -1
  163. package/dist/cdn/{shared-4388f7ea.js → shared-b56949d3.js} +1 -1
  164. package/dist/cdn/{shared-ad8d209a.js → shared-c1b71162.js} +1 -1
  165. package/dist/cdn/{shared-e02936f0.js → shared-c3d1d247.js} +4 -4
  166. package/dist/cdn/{shared-8a570d01.js → shared-c4df3a2a.js} +1 -1
  167. package/dist/cdn/{shared-fa482a7d.js → shared-caac6517.js} +1 -1
  168. package/dist/cdn/{shared-7e18a7d9.js → shared-cee1c6f1.js} +1 -1
  169. package/dist/cdn/{shared-2b328555.js → shared-d0c1664e.js} +1 -1
  170. package/dist/cdn/{shared-59c064c2.js → shared-d35ed355.js} +1 -1
  171. package/dist/cdn/{shared-c16f05d9.js → shared-d525b69b.js} +1 -1
  172. package/dist/cdn/{shared-34a7df04.js → shared-da4f539a.js} +1 -1
  173. package/dist/cdn/{shared-1f95aa71.js → shared-db758d3b.js} +1 -1
  174. package/dist/cdn/{shared-3c64ecdd.js → shared-dc357e9d.js} +1 -1
  175. package/dist/cdn/{shared-742899dc.js → shared-dda75cab.js} +1 -1
  176. package/dist/cdn/{shared-a16ef278.js → shared-e275989e.js} +1 -1
  177. package/dist/cdn/{shared-070211c0.js → shared-e6559d84.js} +1 -1
  178. package/dist/cdn/{shared-364b98a1.js → shared-e6d5f375.js} +1 -1
  179. package/dist/cdn/{shared-a4871405.js → shared-ed24a3f9.js} +1 -1
  180. package/dist/cdn/{shared-db50afd9.js → shared-f00cd094.js} +1 -1
  181. package/dist/cdn/shared-f0fa0a88.js +1 -0
  182. package/dist/cdn/translations/admin-subscription-form/en.json +61 -8
  183. package/dist/cdn/translations/payments-api-payment-method-form/en.json +1 -0
  184. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +1 -0
  185. package/dist/elements/internal/InternalDateControl/InternalDateControl.d.ts +4 -0
  186. package/dist/elements/internal/InternalDateControl/InternalDateControl.js +9 -2
  187. package/dist/elements/internal/InternalDateControl/InternalDateControl.js.map +1 -1
  188. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +1 -0
  189. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +6 -2
  190. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  191. package/dist/elements/public/AdminSubscriptionForm/index.d.ts +1 -0
  192. package/dist/elements/public/AdminSubscriptionForm/index.js +1 -0
  193. package/dist/elements/public/AdminSubscriptionForm/index.js.map +1 -1
  194. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/InternalAdminSubscriptionFormStatusAction.d.ts +7 -0
  195. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/InternalAdminSubscriptionFormStatusAction.js +65 -0
  196. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/InternalAdminSubscriptionFormStatusAction.js.map +1 -0
  197. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/index.d.ts +8 -0
  198. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/index.js +10 -0
  199. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusAction/index.js.map +1 -0
  200. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/InternalAdminSubscriptionFormStatusActionForm.d.ts +18 -0
  201. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/InternalAdminSubscriptionFormStatusActionForm.js +184 -0
  202. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/InternalAdminSubscriptionFormStatusActionForm.js.map +1 -0
  203. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/index.d.ts +8 -0
  204. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/index.js +10 -0
  205. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/index.js.map +1 -0
  206. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/types.d.ts +5 -0
  207. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/types.js +2 -0
  208. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormStatusActionForm/types.js.map +1 -0
  209. package/dist/elements/public/FormDialog/FormDialog.d.ts +2 -0
  210. package/dist/elements/public/FormDialog/FormDialog.js +4 -1
  211. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  212. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +1 -0
  213. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +38 -23
  214. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  215. package/dist/elements/public/TaxCard/TaxCard.js +1 -1
  216. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  217. package/dist/mixins/themeable.js +4 -0
  218. package/dist/mixins/themeable.js.map +1 -1
  219. package/dist/utils/parse-date.js +2 -0
  220. package/dist/utils/parse-date.js.map +1 -1
  221. package/package.json +2 -1
  222. package/dist/cdn/shared-2d3bdc6b.js +0 -1
  223. package/dist/cdn/shared-43e2c3f6.js +0 -1
  224. package/dist/cdn/shared-dfe59df6.js +0 -1
@@ -1 +1 @@
1
- import"./shared-b15efc37.js";import"./shared-28253ef3.js";import"./shared-f3590d20.js";import"./shared-8a570d01.js";import"./shared-0fa21237.js";import"./shared-8a743005.js";import"./shared-4388f7ea.js";import{I as e}from"./shared-070211c0.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{_ as t,B as r,l as i}from"./shared-7fec42f2.js";import{g as o}from"./shared-bab2ea2c.js";import{a}from"./shared-a89e8a07.js";import{i as l}from"./shared-53e42a77.js";import{h as s,s as n}from"./shared-ba5c42c7.js";import{c as d}from"./shared-4e709717.js";import{h as c}from"./shared-5905fca4.js";import{s as h}from"./shared-1da47f50.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-6313b188.js";import"./shared-48129732.js";import"./shared-1f95aa71.js";import"./shared-ce0df878.js";import"./shared-3c64ecdd.js";import"./shared-9bfb584b.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-e1e4d8f5.js";import"./shared-cf6122d9.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-a4871405.js";import"./shared-d8b0432a.js";import"./shared-59c064c2.js";import"./shared-e02936f0.js";import"./shared-acee789f.js";import"./shared-d0aed1c1.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./foxy-copy-to-clipboard.js";import"./shared-9884fb7d.js";let u,f,m,p,_,v,y,$,x,g,b,j,w,L,S,k,V,P,M,I,B,C,q,Z,H,O,D,R,W,T,z,A=e=>e;const E=a(e,"payments-api-payment-method-form");class G extends E{constructor(){super(...arguments),this.paymentPreset=null,this.getImageSrc=null,this.store=null,this.__availablePaymentMethodsLoaderId="availablePaymentMethodsLoader",this.__paymentPresetLoaderId="paymentPresetLoader",this.__storeLoaderId="storeLoader",this.__threeDSecureResponseGetValue=()=>{var e;return null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response")},this.__threeDSecureResponseSetValue=e=>{const t=e?"_require_valid_response":"",r=this.form.config_3d_secure,i=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${i}${t}`})},this.__threeDSecureToggleGetValue=()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"},this.__threeDSecureToggleSetValue=e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})},this.__threeDSecureToggleOptions=[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.__cardVerificationOptions=[{label:"option_disabled",value:"disabled"},{label:"option_enabled_automatically",value:"enabled_automatically"},{label:"option_enabled_override",value:"enabled_override"}]}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{paymentPreset:{attribute:"payment-preset"},getImageSrc:{attribute:!1},store:{}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,i,o;const a=null!==(i=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==i?i:[];let l;try{l=JSON.parse(null!==(o=e.additional_fields)&&void 0!==o?o:"{}")}catch(e){l={}}for(const e of a)for(const t of e.fields)if("optional"in t&&!t.optional&&!c(l,t.id)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid";return!0}]}get hiddenSelector(){return new r(`header:copy-json ${super.hiddenSelector}`.trimEnd())}renderHeader(...e){var t;return s(u||(u=A` <div> ${0} ${0} </div> `),super.renderHeader(...e),(null===(t=this.data)||void 0===t?void 0:t.type)||!this.form.type?s(f||(f=A``)):s(m||(m=A` <vaadin-button data-testid="select-another-button" theme="tertiary-inline" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())))}get headerTitleOptions(){var e;return{context:this.form.type?"selected":"new",name:null===(e=this.form.helper)||void 0===e?void 0:e.name}}get headerSubtitleOptions(){if(this.href){const e=o(this.href),t=this.headerCopyIdValue;return e.startsWith("R")?{context:"regular",id:t}:{context:"hosted",id:t}}return{}}get headerCopyIdValue(){if(this.href){const e=o(this.href);return e.startsWith("R")?e.slice(1):e.slice(1).split("C")[0]}return""}renderBody(){var e;const t=null===(e=this.__paymentPresetLoader)||void 0===e?void 0:e.data,r=s(p||(p=A` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),l(null==t?void 0:t._links["fx:available_payment_methods"].href),this.__availablePaymentMethodsLoaderId,(()=>this.requestUpdate()),l(this.store),this.__storeLoaderId,(()=>this.requestUpdate()),l(this.paymentPreset),this.__paymentPresetLoaderId,(()=>this.requestUpdate()));return s(_||(_=A`${0}${0}${0}`),this.renderHeader(),this.form.type?this.__renderPaymentMethodConfig():this.__renderPaymentMethodSelector(),r)}get __groupedAvailablePaymentMethods(){var e;return Object.entries(null!==(e=this.__availablePaymentMethods)&&void 0!==e?e:{}).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{if(r.is_deprecated)return e;const i=t.charAt(0).toUpperCase(),o=!/\w/.test(i)?"#":i,a=e.find((e=>e.name===o));return a?a.items.push({type:t,helper:r}):e.push({name:o,items:[{type:t,helper:r}]}),e}),[])}get __availablePaymentMethodsLoader(){return this.renderRoot.querySelector(`#${this.__availablePaymentMethodsLoaderId}`)}get __availablePaymentMethods(){var e,t;return null===(t=null===(e=this.__availablePaymentMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}get __paymentPresetLoader(){return this.renderRoot.querySelector(`#${this.__paymentPresetLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderPaymentMethodSelector(){const e=this.__availablePaymentMethodsLoader;return(null==e?void 0:e.data)?s(y||(y=A` <div> <section data-testid="select-method-list" class="-mt-m"> ${0} </section> </div> `),this.__groupedAvailablePaymentMethods.map((({name:e,items:t})=>s($||($=A` <p class="font-medium text-tertiary py-m">${0}</p> <ul class="grid grid-cols-2 gap-m"> ${0} </ul> `),e,t.map((e=>s(x||(x=A`<li>${0}</li>`),this.__renderPaymentMethodButton(e)))))))):s(v||(v=A` <foxy-spinner infer="list-spinner" state="${0}"> </foxy-spinner> `),(null==e?void 0:e.in("fail"))?"error":"busy")}__renderPaymentMethodConfig(){var e,t;return this.form.type&&["stripe_connect","square_up","quickbook_payments","amazon_mws","paypal_platform"].includes(this.form.type)?s(g||(g=A` <div class="flex items-start rounded border border-primary" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="no_oauth_support_message"></foxy-i18n> <br> <a target="_blank" class="mt-xs inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://admin.foxycart.com"> admin.foxycart.com </a> </p> </div> `),n(b||(b=A`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`))):s(j||(j=A` <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> ${0} ${0} </foxy-internal-summary-control> ${0} ${0} `),(null===(e=this.form.helper)||void 0===e?void 0:e.supports_auth_only)?s(w||(w=A` <foxy-internal-switch-control infer="use-auth-only" helper-text-as-tooltip> </foxy-internal-switch-control> `)):"",(null===(t=this.form.helper)||void 0===t?void 0:t.supports_3d_secure)?s(L||(L=A` <foxy-internal-select-control layout="summary-item" infer="three-d-secure-toggle" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-select-control> ${0} `),this.__threeDSecureToggleGetValue,this.__threeDSecureToggleSetValue,this.__threeDSecureToggleOptions,this.form.config_3d_secure?s(S||(S=A` <foxy-internal-switch-control layout="summary-item" infer="three-d-secure-response" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> `),this.__threeDSecureResponseGetValue,this.__threeDSecureResponseSetValue):""):"",["live","test"].map(((e,t)=>{var r,i,o,a,d,c,h,u,f,m,p,_,v,y,$;const x=0===t?"":`${e}_`,g=0===t?"":`${e}-`,b=0===t?this.__liveBlocks:this.__testBlocks,j=`${e}-group`;if("live"===e&&!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data))return s(k||(k=A``));if("live"===e&&!(null===(o=null===(i=this.__storeLoader)||void 0===i?void 0:i.data)||void 0===o?void 0:o.is_active))return s(V||(V=A` <foxy-internal-summary-control infer="${0}-group"> <div class="flex items-start" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p><foxy-i18n infer="" key="inactive_message"></foxy-i18n></p> </div> </foxy-internal-summary-control> `),e,n(P||(P=A`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)));const w=!0===(null===(d=null===(a=this.__storeLoader)||void 0===a?void 0:a.data)||void 0===d?void 0:d.is_active)&&("test"===e&&!0===(null===(h=null===(c=this.__paymentPresetLoader)||void 0===c?void 0:c.data)||void 0===h?void 0:h.is_live)||"live"===e&&!1===(null===(f=null===(u=this.__paymentPresetLoader)||void 0===u?void 0:u.data)||void 0===f?void 0:f.is_live));return s(M||(M=A` <foxy-internal-summary-control helper-text="${0}" layout="section" label="${0}" infer="${0}"> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} ${0} ${0} ${0} ${0} </foxy-internal-summary-control> ${0} </foxy-internal-summary-control> `),l(w?this.t(`${j}.helper_text_inactive`):void 0),l(w?this.t(`${j}.label_inactive`):void 0),j,(null===(m=this.form.helper)||void 0===m?void 0:m.id_description)?s(I||(I=A` <foxy-internal-text-control placeholder="${0}" helper-text="" layout="summary-item" label="${0}" infer="${0}account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description,g):"",(null===(p=this.form.helper)||void 0===p?void 0:p.third_party_key_description)?s(B||(B=A` <foxy-internal-password-control placeholder="${0}" helper-text="" layout="summary-item" label="${0}" infer="${0}third-party-key"> </foxy-internal-password-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description,g):"",(null===(_=this.form.helper)||void 0===_?void 0:_.key_description)?s(C||(C=A` <foxy-internal-password-control placeholder="${0}" layout="summary-item" helper-text="" label="${0}" infer="${0}account-key"> </foxy-internal-password-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description,g):"",b.map((e=>this.__renderBlock(e))),(null===(v=this.form.helper)||void 0===v?void 0:v.supports_card_verification)?s(q||(q=A` <foxy-internal-select-control helper-text="${0}" layout="summary-item" infer="${0}card-verification" .options="${0}" .getValue="${0}"> </foxy-internal-select-control> `),this.t(`${j}.${g}card-verification.helper_text_${this.form[`${x}card_verification`]||"disabled"}`),g,this.__cardVerificationOptions,(()=>this.form[`${x}card_verification`]||"disabled")):"",(null===(y=this.form.helper)||void 0===y?void 0:y.supports_card_verification)&&(null===($=this.form[`${x}card_verification`])||void 0===$?void 0:$.startsWith("enabled_"))?s(Z||(Z=A` <foxy-internal-summary-control layout="details" class="mt-s" infer="${0}card-verification-config"> ${0} </foxy-internal-summary-control> `),g,["visa","mastercard","american-express","discover","default"].map((e=>{var t;return s(H||(H=A` <foxy-internal-number-control json-template="${0}" json-path="verification_amounts.${0}" property="${0}card_verification_config" layout="summary-item" suffix="¤" infer="${0}card-verification-config-verification-amounts-${0}" step="0.01" min="0"> </foxy-internal-number-control> `),l(null===(t=this.form.helper)||void 0===t?void 0:t.card_verification_config),e.replace(/-/g,"_"),x,g,e)}))):"")})),super.renderBody())}__renderPaymentMethodButton({type:e,helper:t}){var r,i;const o=G.defaultImageSrc,a=null!==(i=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==i?i:o,l=e=>e.currentTarget.src=o;return s(O||(O=A` <button class="${0}" ?disabled="${0}" title="${0}" @click="${0}"> <img class="absolute top-0 left-0 w-1-2 h-full object-cover bg-center filter saturate-200 blur-3xl" style="transform:translate3d(0,0,0)" src="${0}" alt="" ?hidden="${0}" @error="${0}"> <figure class="relative flex flex-col gap-m"> <img class="${0}" src="${0}" alt="" @error="${0}"> <figcaption class="${0}"> <div class="font-medium">${0}&ZeroWidthSpace;</div> <div class="text-xs ${0}">${0}</div> </figcaption> </figure> </button> `),d({"relative w-full block text-left p-s rounded bg-contrast-5 overflow-hidden":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"transition-colors hover-bg-contrast-10":!t.conflict,"cursor-default":!!t.conflict}),!!t.conflict,t.conflict?this.t("conflict_message",t.conflict):"",(()=>this.edit({type:e,helper:t})),a,!!t.conflict,l,d({"h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs":!0,"filter grayscale":!!t.conflict}),a,l,d({"min-w-0 flex-1 truncate leading-s":!0,"text-disabled":!!t.conflict}),t.name,t.conflict?"":"text-secondary",e)}__renderBlock(e){return s(D||(D=A`${0}`),e.fields.map((e=>{var t,r,o;if("hidden"===e.type)return;const a=["additional-fields",e.id].join("-").replace(/_/g,"-"),l=()=>{var t,r;try{const o=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");return null!==(r=i(o,e.id))&&void 0!==r?r:o.default_value}catch(t){return e.default_value}},n=t=>{var r;let i={};try{i=JSON.parse(null!==(r=this.form.additional_fields)&&void 0!==r?r:"")}catch(e){}this.edit({additional_fields:JSON.stringify(h(i,e.id,t))})},d=e.options;return s(R||(R=A` ${0} `),"checkbox"===e.type?s(W||(W=A` <foxy-internal-switch-control helper-text="${0}" label="${0}" infer="${0}" helper-text-as-tooltip .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> `),null!==(t=e.description)&&void 0!==t?t:"",e.name,a,l,n):"select"===e.type?s(T||(T=A` <foxy-internal-select-control placeholder="${0}" helper-text="${0}" layout="summary-item" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),this.t("default_additional_field_select_placeholder"),null!==(r=e.description)&&void 0!==r?r:"",e.name,a,d.map((({name:e,value:t})=>({label:e,value:t}))),l,n):s(z||(z=A` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" layout="summary-item" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(o=e.description)&&void 0!==o?o:"",e.default_value||this.t("default_additional_field_placeholder"),e.name,a,l,n))})))}}customElements.define("foxy-payments-api-payment-method-form",G);export{G as PaymentsApiPaymentMethodForm};
1
+ import"./shared-24998349.js";import"./shared-af39ffd8.js";import"./shared-438e41ab.js";import"./shared-c4df3a2a.js";import"./shared-a1f181bf.js";import"./shared-9b599205.js";import"./shared-b56949d3.js";import{I as e}from"./shared-e6559d84.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{_ as t,B as r,l as i}from"./shared-7fec42f2.js";import{g as s}from"./shared-bab2ea2c.js";import{a as n}from"./shared-387d7254.js";import{i as o}from"./shared-53e42a77.js";import{h as a,s as l}from"./shared-ba5c42c7.js";import{c}from"./shared-4e709717.js";import{h as u}from"./shared-5905fca4.js";import{s as h}from"./shared-1da47f50.js";import"./shared-a6cf5b1f.js";import"./shared-3bc9eaf7.js";import"./shared-46efbc40.js";import"./shared-1d03ea56.js";import"./shared-db758d3b.js";import"./shared-ac44a3a5.js";import"./shared-dc357e9d.js";import"./shared-ab9dfa48.js";import"./shared-6c2a7d2f.js";import"./shared-5212ef4f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-e1e4d8f5.js";import"./shared-1d6ed748.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-ed24a3f9.js";import"./shared-1abfcf87.js";import"./shared-d35ed355.js";import"./shared-c3d1d247.js";import"./shared-5574ea83.js";import"./shared-d0aed1c1.js";import"./shared-25a9d87d.js";import"./shared-e275989e.js";import"./foxy-copy-to-clipboard.js";import"./shared-a1cfe9d5.js";function d(e){return Array.isArray?Array.isArray(e):"[object Array]"===A(e)}const f=1/0;function p(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-f?"-0":t}(e)}function m(e){return"string"==typeof e}function g(e){return"number"==typeof e}function _(e){return!0===e||!1===e||function(e){return y(e)&&null!==e}(e)&&"[object Boolean]"==A(e)}function y(e){return"object"==typeof e}function v(e){return null!=e}function x(e){return!e.trim().length}function A(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const $=e=>`Missing ${e} property in key`,C=e=>`Property 'weight' in key '${e}' must be a positive integer`,b=Object.prototype.hasOwnProperty;class M{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let r=B(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function B(e){let t=null,r=null,i=null,s=1,n=null;if(m(e)||d(e))i=e,t=D(e),r=E(e);else{if(!b.call(e,"name"))throw new Error($("name"));const o=e.name;if(i=o,b.call(e,"weight")&&(s=e.weight,s<=0))throw new Error(C(o));t=D(o),r=E(o),n=e.getFn}return{path:t,id:r,weight:s,src:i,getFn:n}}function D(e){return d(e)?e:e.split(".")}function E(e){return d(e)?e.join("."):e}var F={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(e,t){let r=[],i=!1;const s=(e,t,n)=>{if(v(e))if(t[n]){const o=e[t[n]];if(!v(o))return;if(n===t.length-1&&(m(o)||g(o)||_(o)))r.push(p(o));else if(d(o)){i=!0;for(let e=0,r=o.length;e<r;e+=1)s(o[e],t,n+1)}else t.length&&s(o,t,n+1)}else r.push(e)};return s(e,m(t)?t.split("."):t,0),i?r:r[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const L=/[^ ]+/g;class k{constructor({getFn:e=F.getFn,fieldNormWeight:t=F.fieldNormWeight}={}){this.norm=function(e=1,t=3){const r=new Map,i=Math.pow(10,t);return{get(t){const s=t.match(L).length;if(r.has(s))return r.get(s);const n=1/Math.pow(s,.5*e),o=parseFloat(Math.round(n*i)/i);return r.set(s,o),o},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,m(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();m(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!v(e)||x(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach(((t,i)=>{let s=t.getFn?t.getFn(e):this.getFn(e,t.path);if(v(s))if(d(s)){let e=[];const t=[{nestedArrIndex:-1,value:s}];for(;t.length;){const{nestedArrIndex:r,value:i}=t.pop();if(v(i))if(m(i)&&!x(i)){let t={v:i,i:r,n:this.norm.get(i)};e.push(t)}else d(i)&&i.forEach(((e,r)=>{t.push({nestedArrIndex:r,value:e})}))}r.$[i]=e}else if(m(s)&&!x(s)){let e={v:s,n:this.norm.get(s)};r.$[i]=e}})),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function S(e,t,{getFn:r=F.getFn,fieldNormWeight:i=F.fieldNormWeight}={}){const s=new k({getFn:r,fieldNormWeight:i});return s.setKeys(e.map(B)),s.setSources(t),s.create(),s}function w(e,{errors:t=0,currentLocation:r=0,expectedLocation:i=0,distance:s=F.distance,ignoreLocation:n=F.ignoreLocation}={}){const o=t/e.length;if(n)return o;const a=Math.abs(i-r);return s?o+a/s:a?1:o}const j=32;function I(e,t,r,{location:i=F.location,distance:s=F.distance,threshold:n=F.threshold,findAllMatches:o=F.findAllMatches,minMatchCharLength:a=F.minMatchCharLength,includeMatches:l=F.includeMatches,ignoreLocation:c=F.ignoreLocation}={}){if(t.length>j)throw new Error(`Pattern length exceeds max of ${j}.`);const u=t.length,h=e.length,d=Math.max(0,Math.min(i,h));let f=n,p=d;const m=a>1||l,g=m?Array(h):[];let _;for(;(_=e.indexOf(t,p))>-1;){let e=w(t,{currentLocation:_,expectedLocation:d,distance:s,ignoreLocation:c});if(f=Math.min(e,f),p=_+u,m){let e=0;for(;e<u;)g[_+e]=1,e+=1}}p=-1;let y=[],v=1,x=u+h;const A=1<<u-1;for(let i=0;i<u;i+=1){let n=0,a=x;for(;n<a;){w(t,{errors:i,currentLocation:d+a,expectedLocation:d,distance:s,ignoreLocation:c})<=f?n=a:x=a,a=Math.floor((x-n)/2+n)}x=a;let l=Math.max(1,d-a+1),_=o?h:Math.min(d+a,h)+u,$=Array(_+2);$[_+1]=(1<<i)-1;for(let n=_;n>=l;n-=1){let o=n-1,a=r[e.charAt(o)];if(m&&(g[o]=+!!a),$[n]=($[n+1]<<1|1)&a,i&&($[n]|=(y[n+1]|y[n])<<1|1|y[n+1]),$[n]&A&&(v=w(t,{errors:i,currentLocation:o,expectedLocation:d,distance:s,ignoreLocation:c}),v<=f)){if(f=v,p=o,p<=d)break;l=Math.max(1,2*d-p)}}if(w(t,{errors:i+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:c})>f)break;y=$}const $={isMatch:p>=0,score:Math.max(.001,v)};if(m){const e=function(e=[],t=F.minMatchCharLength){let r=[],i=-1,s=-1,n=0;for(let o=e.length;n<o;n+=1){let o=e[n];o&&-1===i?i=n:o||-1===i||(s=n-1,s-i+1>=t&&r.push([i,s]),i=-1)}return e[n-1]&&n-i>=t&&r.push([i,n-1]),r}(g,a);e.length?l&&($.indices=e):$.isMatch=!1}return $}function P(e){let t={};for(let r=0,i=e.length;r<i;r+=1){const s=e.charAt(r);t[s]=(t[s]||0)|1<<i-r-1}return t}const V=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):e=>e;class R{constructor(e,{location:t=F.location,threshold:r=F.threshold,distance:i=F.distance,includeMatches:s=F.includeMatches,findAllMatches:n=F.findAllMatches,minMatchCharLength:o=F.minMatchCharLength,isCaseSensitive:a=F.isCaseSensitive,ignoreDiacritics:l=F.ignoreDiacritics,ignoreLocation:c=F.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:i,includeMatches:s,findAllMatches:n,minMatchCharLength:o,isCaseSensitive:a,ignoreDiacritics:l,ignoreLocation:c},e=a?e:e.toLowerCase(),e=l?V(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(e,t)=>{this.chunks.push({pattern:e,alphabet:P(e),startIndex:t})},h=this.pattern.length;if(h>j){let e=0;const t=h%j,r=h-t;for(;e<r;)u(this.pattern.substr(e,j),e),e+=j;if(t){const e=h-j;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=r?V(e):e,this.pattern===e){let t={isMatch:!0,score:0};return i&&(t.indices=[[0,e.length-1]]),t}const{location:s,distance:n,threshold:o,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options;let u=[],h=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:r,startIndex:f})=>{const{isMatch:p,score:m,indices:g}=I(e,t,r,{location:s+f,distance:n,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});p&&(d=!0),h+=m,p&&g&&(u=[...u,...g])}));let f={isMatch:d,score:d?h/this.chunks.length:1};return d&&i&&(f.indices=u),f}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return N(e,this.multiRegex)}static isSingleMatch(e){return N(e,this.singleRegex)}search(){}}function N(e,t){const r=e.match(t);return r?r[1]:null}class W extends O{constructor(e,{location:t=F.location,threshold:r=F.threshold,distance:i=F.distance,includeMatches:s=F.includeMatches,findAllMatches:n=F.findAllMatches,minMatchCharLength:o=F.minMatchCharLength,isCaseSensitive:a=F.isCaseSensitive,ignoreDiacritics:l=F.ignoreDiacritics,ignoreLocation:c=F.ignoreLocation}={}){super(e),this._bitapSearch=new R(e,{location:t,threshold:r,distance:i,includeMatches:s,findAllMatches:n,minMatchCharLength:o,isCaseSensitive:a,ignoreDiacritics:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class q extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0;const i=[],s=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+s,i.push([t,r-1]);const n=!!i.length;return{isMatch:n,score:n?0:1,indices:i}}}const z=[class extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},q,class extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},W],Z=z.length,H=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const T=new Set([W.type,q.type]);class J{constructor(e,{isCaseSensitive:t=F.isCaseSensitive,ignoreDiacritics:r=F.ignoreDiacritics,includeMatches:i=F.includeMatches,minMatchCharLength:s=F.minMatchCharLength,ignoreLocation:n=F.ignoreLocation,findAllMatches:o=F.findAllMatches,location:a=F.location,threshold:l=F.threshold,distance:c=F.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:s,findAllMatches:o,ignoreLocation:n,location:a,threshold:l,distance:c},e=t?e:e.toLowerCase(),e=r?V(e):e,this.pattern=e,this.query=function(e,t={}){return e.split("|").map((e=>{let r=e.trim().split(H).filter((e=>e&&!!e.trim())),i=[];for(let e=0,s=r.length;e<s;e+=1){const s=r[e];let n=!1,o=-1;for(;!n&&++o<Z;){const e=z[o];let r=e.isMultiMatch(s);r&&(i.push(new e(r,t)),n=!0)}if(!n)for(o=-1;++o<Z;){const e=z[o];let r=e.isSingleMatch(s);if(r){i.push(new e(r,t));break}}}return i}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?V(e):e;let n=0,o=[],a=0;for(let i=0,s=t.length;i<s;i+=1){const s=t[i];o.length=0,n=0;for(let t=0,i=s.length;t<i;t+=1){const i=s[t],{isMatch:l,indices:c,score:u}=i.search(e);if(!l){a=0,n=0,o.length=0;break}if(n+=1,a+=u,r){const e=i.constructor.type;T.has(e)?o=[...o,...c]:o.push(c)}}if(n){let e={isMatch:!0,score:a/n};return r&&(e.indices=o),e}}return{isMatch:!1,score:1}}}const K=[];function U(e,t){for(let r=0,i=K.length;r<i;r+=1){let i=K[r];if(i.condition(e,t))return new i(e,t)}return new R(e,t)}const G="$and",Q="$or",X="$path",Y="$val",ee=e=>!(!e[G]&&!e[Q]),te=e=>({[G]:Object.keys(e).map((t=>({[t]:e[t]})))});function re(e,t,{auto:r=!0}={}){const i=e=>{let s=Object.keys(e);const n=(e=>!!e[X])(e);if(!n&&s.length>1&&!ee(e))return i(te(e));if((e=>!d(e)&&y(e)&&!ee(e))(e)){const i=n?e[X]:s[0],o=n?e[Y]:e[i];if(!m(o))throw new Error((e=>`Invalid value for key ${e}`)(i));const a={keyId:E(i),pattern:o};return r&&(a.searcher=U(o,t)),a}let o={children:[],operator:s[0]};return s.forEach((t=>{const r=e[t];d(r)&&r.forEach((e=>{o.children.push(i(e))}))})),o};return ee(e)||(e=te(e)),i(e)}function ie(e,t){const r=e.matches;t.matches=[],v(r)&&r.forEach((e=>{if(!v(e.indices)||!e.indices.length)return;const{indices:r,value:i}=e;let s={indices:r,value:i};e.key&&(s.key=e.key.src),e.idx>-1&&(s.refIndex=e.idx),t.matches.push(s)}))}function se(e,t){t.score=e.score}class ne{constructor(e,t={},r){this.options={...F,...t},this.options.useExtendedSearch,this._keyStore=new M(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof k))throw new Error("Incorrect 'index' type");this._myIndex=t||S(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){v(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let r=0,i=this._docs.length;r<i;r+=1){const s=this._docs[r];e(s,r)&&(this.removeAt(r),r-=1,i-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:s,sortFn:n,ignoreFieldNorm:o}=this.options;let a=m(e)?m(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=F.ignoreFieldNorm}){e.forEach((e=>{let r=1;e.matches.forEach((({key:e,norm:i,score:s})=>{const n=e?e.weight:null;r*=Math.pow(0===s&&n?Number.EPSILON:s,(n||1)*(t?1:i))})),e.score=r}))}(a,{ignoreFieldNorm:o}),s&&a.sort(n),g(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:r=F.includeMatches,includeScore:i=F.includeScore}={}){const s=[];return r&&s.push(ie),i&&s.push(se),e.map((e=>{const{idx:r}=e,i={item:t[r],refIndex:r};return s.length&&s.forEach((t=>{t(e,i)})),i}))}(a,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const t=U(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach((({v:e,i:r,n:s})=>{if(!v(e))return;const{isMatch:n,score:o,indices:a}=t.searchIn(e);n&&i.push({item:e,idx:r,matches:[{score:o,value:e,norm:s,indices:a}]})})),i}_searchLogical(e){const t=re(e,this.options),r=(e,t,i)=>{if(!e.children){const{keyId:r,searcher:s}=e,n=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:s});return n&&n.length?[{idx:i,item:t,matches:n}]:[]}const s=[];for(let n=0,o=e.children.length;n<o;n+=1){const o=e.children[n],a=r(o,t,i);if(a.length)s.push(...a);else if(e.operator===G)return[]}return s},i=this._myIndex.records,s={},n=[];return i.forEach((({$:e,i:i})=>{if(v(e)){let o=r(t,e,i);o.length&&(s[i]||(s[i]={idx:i,item:e,matches:[]},n.push(s[i])),o.forEach((({matches:e})=>{s[i].matches.push(...e)})))}})),n}_searchObjectList(e){const t=U(e,this.options),{keys:r,records:i}=this._myIndex,s=[];return i.forEach((({$:e,i:i})=>{if(!v(e))return;let n=[];r.forEach(((r,i)=>{n.push(...this._findMatches({key:r,value:e[i],searcher:t}))})),n.length&&s.push({idx:i,item:e,matches:n})})),s}_findMatches({key:e,value:t,searcher:r}){if(!v(t))return[];let i=[];if(d(t))t.forEach((({v:t,i:s,n:n})=>{if(!v(t))return;const{isMatch:o,score:a,indices:l}=r.searchIn(t);o&&i.push({score:a,key:e,value:t,idx:s,norm:n,indices:l})}));else{const{v:s,n:n}=t,{isMatch:o,score:a,indices:l}=r.searchIn(s);o&&i.push({score:a,key:e,value:s,norm:n,indices:l})}return i}}ne.version="7.1.0",ne.createIndex=S,ne.parseIndex=function(e,{getFn:t=F.getFn,fieldNormWeight:r=F.fieldNormWeight}={}){const{keys:i,records:s}=e,n=new k({getFn:t,fieldNormWeight:r});return n.setKeys(i),n.setIndexRecords(s),n},ne.config=F,ne.parseQuery=re,function(...e){K.push(...e)}(J);let oe,ae,le,ce,ue,he,de,fe,pe,me,ge,_e,ye,ve,xe,Ae,$e,Ce,be,Me,Be,De,Ee,Fe,Le,ke,Se,we,je,Ie,Pe,Ve=e=>e;const Re=n(e,"payments-api-payment-method-form");class Oe extends Re{constructor(){super(...arguments),this.paymentPreset=null,this.getImageSrc=null,this.store=null,this.__availablePaymentMethodsLoaderId="availablePaymentMethodsLoader",this.__paymentPresetLoaderId="paymentPresetLoader",this.__storeLoaderId="storeLoader",this.__threeDSecureResponseGetValue=()=>{var e;return null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response")},this.__threeDSecureResponseSetValue=e=>{const t=e?"_require_valid_response":"",r=this.form.config_3d_secure,i=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${i}${t}`})},this.__threeDSecureToggleGetValue=()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"},this.__threeDSecureToggleSetValue=e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})},this.__threeDSecureToggleOptions=[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.__cardVerificationOptions=[{label:"option_disabled",value:"disabled"},{label:"option_enabled_automatically",value:"enabled_automatically"},{label:"option_enabled_override",value:"enabled_override"}],this.__search=""}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{paymentPreset:{attribute:"payment-preset"},getImageSrc:{attribute:!1},store:{},__search:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,i,s;const n=null!==(i=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==i?i:[];let o;try{o=JSON.parse(null!==(s=e.additional_fields)&&void 0!==s?s:"{}")}catch(e){o={}}for(const e of n)for(const t of e.fields)if("optional"in t&&!t.optional&&!u(o,t.id)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid";return!0}]}get hiddenSelector(){return new r(`header:copy-json ${super.hiddenSelector}`.trimEnd())}renderHeader(...e){var t;return a(oe||(oe=Ve` <div> ${0} ${0} </div> `),super.renderHeader(...e),(null===(t=this.data)||void 0===t?void 0:t.type)||!this.form.type?a(ae||(ae=Ve``)):a(le||(le=Ve` <vaadin-button data-testid="select-another-button" theme="tertiary-inline" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())))}get headerTitleOptions(){var e;return{context:this.form.type?"selected":"new",name:null===(e=this.form.helper)||void 0===e?void 0:e.name}}get headerSubtitleOptions(){if(this.href){const e=s(this.href),t=this.headerCopyIdValue;return e.startsWith("R")?{context:"regular",id:t}:{context:"hosted",id:t}}return{}}get headerCopyIdValue(){if(this.href){const e=s(this.href);return e.startsWith("R")?e.slice(1):e.slice(1).split("C")[0]}return""}renderBody(){var e;const t=null===(e=this.__paymentPresetLoader)||void 0===e?void 0:e.data,r=a(ce||(ce=Ve` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),o(null==t?void 0:t._links["fx:available_payment_methods"].href),this.__availablePaymentMethodsLoaderId,(()=>this.requestUpdate()),o(this.store),this.__storeLoaderId,(()=>this.requestUpdate()),o(this.paymentPreset),this.__paymentPresetLoaderId,(()=>this.requestUpdate()));return a(ue||(ue=Ve`${0}${0}${0}`),this.renderHeader(),this.form.type?this.__renderPaymentMethodConfig():this.__renderPaymentMethodSelector(),r)}get __groupedAvailablePaymentMethods(){var e;const t=Object.entries(null!==(e=this.__availablePaymentMethods)&&void 0!==e?e:{});return(this.__search?new ne(t,{keys:["1.name"]}).search(this.__search).map((e=>e.item)):t).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{if(r.is_deprecated)return e;const i=t.charAt(0).toUpperCase(),s=!/\w/.test(i)?"#":i,n=e.find((e=>e.name===s));return n?n.items.push({type:t,helper:r}):e.push({name:s,items:[{type:t,helper:r}]}),e}),[])}get __availablePaymentMethodsLoader(){return this.renderRoot.querySelector(`#${this.__availablePaymentMethodsLoaderId}`)}get __availablePaymentMethods(){var e,t;return null===(t=null===(e=this.__availablePaymentMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}get __paymentPresetLoader(){return this.renderRoot.querySelector(`#${this.__paymentPresetLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderPaymentMethodSelector(){const e=this.__availablePaymentMethodsLoader;return(null==e?void 0:e.data)?a(de||(de=Ve` <div> <input placeholder="${0}" class="w-full leading-m font-medium bg-contrast-5 rounded text-body transition-colors hover-bg-contrast-10 focus-bg-contrast-10 focus-outline-none focus-ring-2 focus-ring-primary-50" style="padding:var(--lumo-space-xs) calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" type="search" .value="${0}" @input="${0}"> <section data-testid="select-method-list"> ${0} </section> </div> `),this.t("search_placeholder"),this.__search,(e=>{this.__search=e.currentTarget.value}),this.__groupedAvailablePaymentMethods.map((({name:e,items:t})=>a(fe||(fe=Ve` <p class="font-medium text-tertiary py-m">${0}</p> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} </foxy-internal-summary-control> `),e,t.map(((e,r)=>this.__renderPaymentMethodButton(e,r,t.length))))))):a(he||(he=Ve` <foxy-spinner infer="list-spinner" state="${0}"> </foxy-spinner> `),(null==e?void 0:e.in("fail"))?"error":"busy")}__renderPaymentMethodConfig(){var e,t;return this.form.type&&["stripe_connect","square_up","quickbook_payments","amazon_mws","paypal_platform"].includes(this.form.type)?a(pe||(pe=Ve` <div class="flex items-start rounded border border-primary" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="no_oauth_support_message"></foxy-i18n> <br> <a target="_blank" class="mt-xs inline-block rounded font-medium text-primary transition-colors cursor-pointer hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="https://admin.foxycart.com"> admin.foxycart.com </a> </p> </div> `),l(me||(me=Ve`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`))):a(ge||(ge=Ve` <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> ${0} ${0} </foxy-internal-summary-control> ${0} ${0} `),(null===(e=this.form.helper)||void 0===e?void 0:e.supports_auth_only)?a(_e||(_e=Ve` <foxy-internal-switch-control infer="use-auth-only" helper-text-as-tooltip> </foxy-internal-switch-control> `)):"",(null===(t=this.form.helper)||void 0===t?void 0:t.supports_3d_secure)?a(ye||(ye=Ve` <foxy-internal-select-control layout="summary-item" infer="three-d-secure-toggle" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-select-control> ${0} `),this.__threeDSecureToggleGetValue,this.__threeDSecureToggleSetValue,this.__threeDSecureToggleOptions,this.form.config_3d_secure?a(ve||(ve=Ve` <foxy-internal-switch-control layout="summary-item" infer="three-d-secure-response" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> `),this.__threeDSecureResponseGetValue,this.__threeDSecureResponseSetValue):""):"",["live","test"].map(((e,t)=>{var r,i,s,n,c,u,h,d,f,p,m,g,_,y,v;const x=0===t?"":`${e}_`,A=0===t?"":`${e}-`,$=0===t?this.__liveBlocks:this.__testBlocks,C=`${e}-group`;if("live"===e&&!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data))return a(xe||(xe=Ve``));if("live"===e&&!(null===(s=null===(i=this.__storeLoader)||void 0===i?void 0:i.data)||void 0===s?void 0:s.is_active))return a(Ae||(Ae=Ve` <foxy-internal-summary-control infer="${0}-group"> <div class="flex items-start" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p><foxy-i18n infer="" key="inactive_message"></foxy-i18n></p> </div> </foxy-internal-summary-control> `),e,l($e||($e=Ve`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-primary" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)));const b=!0===(null===(c=null===(n=this.__storeLoader)||void 0===n?void 0:n.data)||void 0===c?void 0:c.is_active)&&("test"===e&&!0===(null===(h=null===(u=this.__paymentPresetLoader)||void 0===u?void 0:u.data)||void 0===h?void 0:h.is_live)||"live"===e&&!1===(null===(f=null===(d=this.__paymentPresetLoader)||void 0===d?void 0:d.data)||void 0===f?void 0:f.is_live));return a(Ce||(Ce=Ve` <foxy-internal-summary-control helper-text="${0}" layout="section" label="${0}" infer="${0}"> <foxy-internal-summary-control infer="" label="" helper-text=""> ${0} ${0} ${0} ${0} ${0} </foxy-internal-summary-control> ${0} </foxy-internal-summary-control> `),o(b?this.t(`${C}.helper_text_inactive`):void 0),o(b?this.t(`${C}.label_inactive`):void 0),C,(null===(p=this.form.helper)||void 0===p?void 0:p.id_description)?a(be||(be=Ve` <foxy-internal-text-control placeholder="${0}" helper-text="" layout="summary-item" label="${0}" infer="${0}account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description,A):"",(null===(m=this.form.helper)||void 0===m?void 0:m.third_party_key_description)?a(Me||(Me=Ve` <foxy-internal-password-control placeholder="${0}" helper-text="" layout="summary-item" label="${0}" infer="${0}third-party-key"> </foxy-internal-password-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description,A):"",(null===(g=this.form.helper)||void 0===g?void 0:g.key_description)?a(Be||(Be=Ve` <foxy-internal-password-control placeholder="${0}" layout="summary-item" helper-text="" label="${0}" infer="${0}account-key"> </foxy-internal-password-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description,A):"",$.map((e=>this.__renderBlock(e))),(null===(_=this.form.helper)||void 0===_?void 0:_.supports_card_verification)?a(De||(De=Ve` <foxy-internal-select-control helper-text="${0}" layout="summary-item" infer="${0}card-verification" .options="${0}" .getValue="${0}"> </foxy-internal-select-control> `),this.t(`${C}.${A}card-verification.helper_text_${this.form[`${x}card_verification`]||"disabled"}`),A,this.__cardVerificationOptions,(()=>this.form[`${x}card_verification`]||"disabled")):"",(null===(y=this.form.helper)||void 0===y?void 0:y.supports_card_verification)&&(null===(v=this.form[`${x}card_verification`])||void 0===v?void 0:v.startsWith("enabled_"))?a(Ee||(Ee=Ve` <foxy-internal-summary-control layout="details" class="mt-s" infer="${0}card-verification-config"> ${0} </foxy-internal-summary-control> `),A,["visa","mastercard","american-express","discover","default"].map((e=>{var t;return a(Fe||(Fe=Ve` <foxy-internal-number-control json-template="${0}" json-path="verification_amounts.${0}" property="${0}card_verification_config" layout="summary-item" suffix="¤" infer="${0}card-verification-config-verification-amounts-${0}" step="0.01" min="0"> </foxy-internal-number-control> `),o(null===(t=this.form.helper)||void 0===t?void 0:t.card_verification_config),e.replace(/-/g,"_"),x,A,e)}))):"")})),super.renderBody())}__renderPaymentMethodButton({type:e,helper:t},r,i){var s,n;const o=Oe.defaultImageSrc,l=null!==(n=null===(s=this.getImageSrc)||void 0===s?void 0:s.call(this,e))&&void 0!==n?n:o;return a(Le||(Le=Ve` <button class="${0}" ?disabled="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" @click="${0}"> <figure class="relative flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="${0}" src="${0}" alt="" @error="${0}"> <figcaption class="${0}"> <span class="font-medium">${0}&ZeroWidthSpace;</span> ${0} </figcaption> </figure> </button> `),c({"relative w-full block text-left bg-contrast-5 overflow-hidden":!0,"focus-outline-none focus-ring-inset focus-ring-2 focus-ring-primary-50":!0,"transition-colors hover-bg-contrast-10":!t.conflict,"cursor-default":!!t.conflict,"rounded-t":0===r,"rounded-b":r===i-1}),!!t.conflict,(()=>this.edit({type:e,helper:t})),c({"h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs":!0,"filter grayscale":!!t.conflict}),l,(e=>e.currentTarget.src=o),c({"min-w-0 flex-1 grid leading-xs":!0,"text-disabled":!!t.conflict}),t.name,t.conflict?a(ke||(ke=Ve`<span class="text-xs"> ${0}</span>`),this.t("conflict_message",t.conflict)):"")}__renderBlock(e){return a(Se||(Se=Ve`${0}`),e.fields.map((e=>{var t,r,s;if("hidden"===e.type)return;const n=["additional-fields",e.id].join("-").replace(/_/g,"-"),o=()=>{var t,r;try{const s=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");return null!==(r=i(s,e.id))&&void 0!==r?r:s.default_value}catch(t){return e.default_value}},l=t=>{var r;let i={};try{i=JSON.parse(null!==(r=this.form.additional_fields)&&void 0!==r?r:"")}catch(e){}this.edit({additional_fields:JSON.stringify(h(i,e.id,t))})},c=e.options;return a(we||(we=Ve` ${0} `),"checkbox"===e.type?a(je||(je=Ve` <foxy-internal-switch-control helper-text="${0}" label="${0}" infer="${0}" helper-text-as-tooltip .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> `),null!==(t=e.description)&&void 0!==t?t:"",e.name,n,o,l):"select"===e.type?a(Ie||(Ie=Ve` <foxy-internal-select-control placeholder="${0}" helper-text="${0}" layout="summary-item" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),this.t("default_additional_field_select_placeholder"),null!==(r=e.description)&&void 0!==r?r:"",e.name,n,c.map((({name:e,value:t})=>({label:e,value:t}))),o,l):a(Pe||(Pe=Ve` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" layout="summary-item" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(s=e.description)&&void 0!==s?s:"",e.default_value||this.t("default_additional_field_placeholder"),e.name,n,o,l))})))}}customElements.define("foxy-payments-api-payment-method-form",Oe);export{Oe as PaymentsApiPaymentMethodForm};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{a as s}from"./shared-a89e8a07.js";import{T as e}from"./shared-7d1512e1.js";import{c as r}from"./shared-4e709717.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let t,d,i=s=>s;const o=s(e,"payments-api-payment-preset-card");class p extends o{renderBody(){return super.renderBody({title:s=>a(t||(t=i`${0}`),s.description),subtitle:({is_live:s})=>a(d||(d=i` <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> `),r({"text-success":s}),s?"live":"test")})}}customElements.define("foxy-payments-api-payment-preset-card",p);export{p as PaymentsApiPaymentPresetCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{a as s}from"./shared-387d7254.js";import{T as e}from"./shared-15a7e329.js";import{c as r}from"./shared-4e709717.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-264fb8a2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let t,d,i=s=>s;const o=s(e,"payments-api-payment-preset-card");class p extends o{renderBody(){return super.renderBody({title:s=>a(t||(t=i`${0}`),s.description),subtitle:({is_live:s})=>a(d||(d=i` <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> `),r({"text-success":s}),s?"live":"test")})}}customElements.define("foxy-payments-api-payment-preset-card",p);export{p as PaymentsApiPaymentPresetCard};
@@ -1 +1 @@
1
- import"./shared-8530fbae.js";import"./shared-f3590d20.js";import"./shared-8a570d01.js";import"./shared-4388f7ea.js";import{I as e}from"./shared-070211c0.js";import"./foxy-payments-api-fraud-protection-card.js";import"./foxy-payments-api-fraud-protection-form.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import{_ as r,B as t}from"./shared-7fec42f2.js";import{a as o}from"./shared-a89e8a07.js";import{i as s}from"./shared-53e42a77.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-d3f37507.js";import"./shared-6313b188.js";import"./shared-f2be9863.js";import"./shared-b15efc37.js";import"./shared-d8b0432a.js";import"./shared-59c064c2.js";import"./shared-1f95aa71.js";import"./shared-e02936f0.js";import"./shared-9bfb584b.js";import"./shared-ce0df878.js";import"./shared-3c64ecdd.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-9884fb7d.js";import"./shared-1b4a3e56.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-8a743005.js";import"./shared-acee789f.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-0fa21237.js";import"./shared-cf6122d9.js";import"./shared-a4871405.js";import"./shared-d0aed1c1.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-7d1512e1.js";import"./shared-160072f2.js";import"./foxy-nucleon-element.js";import"./shared-5905fca4.js";import"./shared-28253ef3.js";import"./shared-48129732.js";let i,d=e=>e;const n=o(e,"payments-api-payment-preset-form");class p extends n{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.__isPurchaseOrderEnabledGetValue=()=>{var e,r;return!!(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)&&this.form.is_purchase_order_enabled},this.__isLiveGetValue=()=>{var e,r;return!!(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)&&this.form.is_live},this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>e&&e.length<=100||"description:v8n_too_long"]}get readonlySelector(){var e,r;const o=[super.hiddenSelector.toString()];return(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)||o.unshift("general:is-live","general:is-purchase-order-enabled"),new t(o.join(" ").trim())}get hiddenSelector(){var e;const r=["header:copy-json",super.hiddenSelector.toString()],o=null===(e=this.__storeLoader)||void 0===e?void 0:e.data;return this.data||r.unshift("payment-methods","fraud-protections"),o||r.unshift("general:is-live","general:is-purchase-order-enabled"),new t(r.join(" ").trim())}renderBody(){var e,r,t,o,n,p;const m=!!(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)?"":"_inactive_store";return a(i||(i=d` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control helper-text="${0}" infer="is-live" helper-text-as-tooltip .getValue="${0}"> </foxy-internal-switch-control> <foxy-internal-switch-control helper-text="${0}" infer="is-purchase-order-enabled" helper-text-as-tooltip .getValue="${0}"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="payment-methods" first="${0}" limit="5" item="foxy-payments-api-payment-method-card" form="foxy-payments-api-payment-method-form" alert wide .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="fraud-protections" first="${0}" limit="5" item="foxy-payments-api-fraud-protection-card" form="foxy-payments-api-fraud-protection-form" alert .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.t(`general.is-live.helper_text${m}`),this.__isLiveGetValue,this.t(`general.is-purchase-order-enabled.helper_text${m}`),this.__isPurchaseOrderEnabledGetValue,s(null===(t=this.data)||void 0===t?void 0:t._links["fx:payment_methods"].href),{".getImageSrc":this.getPaymentMethodImageSrc},{".getImageSrc":this.getPaymentMethodImageSrc,"payment-preset":this.href,store:null===(o=this.data)||void 0===o?void 0:o._links["fx:store"].href},s(null===(n=this.data)||void 0===n?void 0:n._links["fx:fraud_protections"].href),{".getImageSrc":this.getFraudProtectionImageSrc},{".getImageSrc":this.getFraudProtectionImageSrc},super.renderBody(),s(null===(p=this.data)||void 0===p?void 0:p._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-payments-api-payment-preset-form",p);export{p as PaymentsApiPaymentPresetForm};
1
+ import"./shared-597fffaa.js";import"./shared-438e41ab.js";import"./shared-c4df3a2a.js";import"./shared-b56949d3.js";import{I as e}from"./shared-e6559d84.js";import"./foxy-payments-api-fraud-protection-card.js";import"./foxy-payments-api-fraud-protection-form.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import{_ as r,B as t}from"./shared-7fec42f2.js";import{a as o}from"./shared-387d7254.js";import{i as s}from"./shared-53e42a77.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-a6cf5b1f.js";import"./shared-3bc9eaf7.js";import"./shared-3db3f3c3.js";import"./shared-46efbc40.js";import"./shared-297155d9.js";import"./shared-24998349.js";import"./shared-1abfcf87.js";import"./shared-d35ed355.js";import"./shared-db758d3b.js";import"./shared-c3d1d247.js";import"./shared-ab9dfa48.js";import"./shared-ac44a3a5.js";import"./shared-dc357e9d.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-a1cfe9d5.js";import"./shared-64210e53.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-25a9d87d.js";import"./shared-e275989e.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-9b599205.js";import"./shared-5574ea83.js";import"./shared-6c2a7d2f.js";import"./shared-5212ef4f.js";import"./shared-a1f181bf.js";import"./shared-1d6ed748.js";import"./shared-ed24a3f9.js";import"./shared-d0aed1c1.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-15a7e329.js";import"./shared-264fb8a2.js";import"./foxy-nucleon-element.js";import"./shared-5905fca4.js";import"./shared-af39ffd8.js";import"./shared-1d03ea56.js";let i,d=e=>e;const n=o(e,"payments-api-payment-preset-form");class p extends n{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.__isPurchaseOrderEnabledGetValue=()=>{var e,r;return!!(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)&&this.form.is_purchase_order_enabled},this.__isLiveGetValue=()=>{var e,r;return!!(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)&&this.form.is_live},this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>e&&e.length<=100||"description:v8n_too_long"]}get readonlySelector(){var e,r;const o=[super.hiddenSelector.toString()];return(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)||o.unshift("general:is-live","general:is-purchase-order-enabled"),new t(o.join(" ").trim())}get hiddenSelector(){var e;const r=["header:copy-json",super.hiddenSelector.toString()],o=null===(e=this.__storeLoader)||void 0===e?void 0:e.data;return this.data||r.unshift("payment-methods","fraud-protections"),o||r.unshift("general:is-live","general:is-purchase-order-enabled"),new t(r.join(" ").trim())}renderBody(){var e,r,t,o,n,p;const m=!!(null===(r=null===(e=this.__storeLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.is_active)?"":"_inactive_store";return a(i||(i=d` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control helper-text="${0}" infer="is-live" helper-text-as-tooltip .getValue="${0}"> </foxy-internal-switch-control> <foxy-internal-switch-control helper-text="${0}" infer="is-purchase-order-enabled" helper-text-as-tooltip .getValue="${0}"> </foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-async-list-control infer="payment-methods" first="${0}" limit="5" item="foxy-payments-api-payment-method-card" form="foxy-payments-api-payment-method-form" alert wide .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="fraud-protections" first="${0}" limit="5" item="foxy-payments-api-fraud-protection-card" form="foxy-payments-api-fraud-protection-form" alert .itemProps="${0}" .formProps="${0}"> </foxy-internal-async-list-control> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.t(`general.is-live.helper_text${m}`),this.__isLiveGetValue,this.t(`general.is-purchase-order-enabled.helper_text${m}`),this.__isPurchaseOrderEnabledGetValue,s(null===(t=this.data)||void 0===t?void 0:t._links["fx:payment_methods"].href),{".getImageSrc":this.getPaymentMethodImageSrc},{".getImageSrc":this.getPaymentMethodImageSrc,"payment-preset":this.href,store:null===(o=this.data)||void 0===o?void 0:o._links["fx:store"].href},s(null===(n=this.data)||void 0===n?void 0:n._links["fx:fraud_protections"].href),{".getImageSrc":this.getFraudProtectionImageSrc},{".getImageSrc":this.getFraudProtectionImageSrc},super.renderBody(),s(null===(p=this.data)||void 0===p?void 0:p._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-payments-api-payment-preset-form",p);export{p as PaymentsApiPaymentPresetForm};
@@ -1 +1 @@
1
- import"./shared-9884fb7d.js";import"./shared-ad8d209a.js";import"./shared-f3590d20.js";import"./shared-1b4a3e56.js";export{Q as QueryBuilder}from"./shared-e82550b1.js";import"./shared-5af5ab06.js";import"./shared-a89e8a07.js";import"./shared-7fec42f2.js";import"./shared-ba5c42c7.js";import"./shared-d3f37507.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-8874ec69.js";import"./shared-63c32024.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-2061be9a.js";import"./shared-43e2c3f6.js";
1
+ import"./shared-a1cfe9d5.js";import"./shared-c1b71162.js";import"./shared-438e41ab.js";import"./shared-64210e53.js";export{Q as QueryBuilder}from"./shared-57b7386e.js";import"./shared-3bc9eaf7.js";import"./shared-387d7254.js";import"./shared-7fec42f2.js";import"./shared-ba5c42c7.js";import"./shared-3db3f3c3.js";import"./shared-6c2a7d2f.js";import"./shared-5212ef4f.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-8874ec69.js";import"./shared-63c32024.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-2061be9a.js";import"./shared-f0fa0a88.js";
@@ -1,4 +1,4 @@
1
- import{C as e}from"./shared-0fb90a71.js";import{D as t,a as i}from"./shared-a0fbe3ef.js";import{C as a,b as s,a as n}from"./shared-d8b0432a.js";import{h as r,C as d,P as l}from"./shared-5af5ab06.js";import{T as o,E as h}from"./shared-6313b188.js";import"./shared-9bfb584b.js";import"./shared-1f95aa71.js";import{T as m}from"./shared-ce0df878.js";import{C as _}from"./shared-b15efc37.js";import"./shared-f2be9863.js";import{C as u,c}from"./shared-364b98a1.js";import"./shared-5a6e4a7b.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{_ as p}from"./shared-7fec42f2.js";import"./shared-ad8d209a.js";import"./shared-3f4549ba.js";import"./shared-a4871405.js";import{h as g,r as v}from"./shared-ba5c42c7.js";import{z as f,S as b,R as y,T as k,a as x}from"./shared-a89e8a07.js";import{c as T}from"./shared-4e709717.js";import"./shared-a16ef278.js";import{G as $}from"./shared-46a20973.js";import"./shared-59c064c2.js";import"./shared-3c64ecdd.js";import"./shared-d4928805.js";import{C as D}from"./shared-c782b9fa.js";import{N as E}from"./shared-da95bb48.js";import{i as w}from"./shared-53e42a77.js";import{l as S}from"./shared-d0aed1c1.js";import"./shared-d3f37507.js";import"./shared-140c6b70.js";import"./shared-e02936f0.js";import"./shared-acee789f.js";import"./shared-fa482a7d.js";import"./shared-742899dc.js";import"./shared-0ea750af.js";import"./shared-53e476fd.js";import"./shared-e1e4d8f5.js";import"./shared-2c7e0ed1.js";import"./shared-9884fb7d.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";let P,C,I,M=e=>e;class V extends f{constructor(){super(...arguments),this.disabled=!1,this.items=[]}static get properties(){return p(p({},super.properties),{},{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}})}render(){return g(P||(P=M` <p class="font-lumo text-xs leading-s text-secondary"> ${0} </p> `),this.items.map((({name:e,value:t},i)=>g(C||(C=M`${0}${0} ${0}`),0===i?"":g(I||(I=M`&bull;`)),e,t))))}}
1
+ import{C as e}from"./shared-0d01cd66.js";import{D as t,a as i}from"./shared-2d6478b0.js";import{C as a,b as s,a as n}from"./shared-1abfcf87.js";import{h as r,C as d,P as l}from"./shared-3bc9eaf7.js";import{T as o,E as h}from"./shared-46efbc40.js";import"./shared-ab9dfa48.js";import"./shared-db758d3b.js";import{T as m}from"./shared-ac44a3a5.js";import{C as _}from"./shared-24998349.js";import"./shared-297155d9.js";import{C as u,c}from"./shared-e6d5f375.js";import"./shared-25a9d87d.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{_ as p}from"./shared-7fec42f2.js";import"./shared-c1b71162.js";import"./shared-a6cf5b1f.js";import"./shared-ed24a3f9.js";import{h as g,r as v}from"./shared-ba5c42c7.js";import{z as f,S as b,R as y,T as k,a as x}from"./shared-387d7254.js";import{c as T}from"./shared-4e709717.js";import"./shared-e275989e.js";import{G as $}from"./shared-0eef6fb7.js";import"./shared-d35ed355.js";import"./shared-dc357e9d.js";import"./shared-a5580ef6.js";import{C as D}from"./shared-c782b9fa.js";import{N as E}from"./shared-da95bb48.js";import{i as w}from"./shared-53e42a77.js";import{l as S}from"./shared-d0aed1c1.js";import"./shared-3db3f3c3.js";import"./shared-7fa24559.js";import"./shared-c3d1d247.js";import"./shared-5574ea83.js";import"./shared-caac6517.js";import"./shared-dda75cab.js";import"./shared-0ea750af.js";import"./shared-53e476fd.js";import"./shared-e1e4d8f5.js";import"./shared-302f3391.js";import"./shared-a1cfe9d5.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";let P,C,I,M=e=>e;class V extends f{constructor(){super(...arguments),this.disabled=!1,this.items=[]}static get properties(){return p(p({},super.properties),{},{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}})}render(){return g(P||(P=M` <p class="font-lumo text-xs leading-s text-secondary"> ${0} </p> `),this.items.map((({name:e,value:t},i)=>g(C||(C=M`${0}${0} ${0}`),0===i?"":g(I||(I=M`&bull;`)),e,t))))}}
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 Vaadin Ltd.
@@ -1,4 +1,4 @@
1
- import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{T as n}from"./shared-88a1cb23.js";import{a as e}from"./shared-a89e8a07.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-ba5c42c7.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./foxy-nucleon-element.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,s,o,r,t,i,l,d,m,f,y,h=n=>n;class p extends(e(n,"reports-table")){constructor(){super(...arguments),this.columns=[p.nameColumn,p.startColumn,p.endColumn,p.createdOnColumn,p.linkColumn]}}p.nameColumn={header:({html:n,lang:e,ns:s})=>n(a||(a=h`<foxy-i18n lang=${0} key="report_name" ns=${0}></foxy-i18n>`),e,s),cell:({html:n,data:e,lang:a,ns:o})=>{const r=`report_name_${e.name}`;return n(s||(s=h`<foxy-i18n class="font-medium" lang=${0} key=${0} ns=${0}></foxy-i18n>`),a,r,o)}},p.startColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(o||(o=h`<foxy-i18n lang=${0} key="range_start" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(r||(r=h`
1
+ import"./foxy-spinner.js";import"./shared-64210e53.js";import{T as n}from"./shared-73c199ae.js";import{a as e}from"./shared-387d7254.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-7fec42f2.js";import"./shared-ba5c42c7.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./foxy-nucleon-element.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,s,o,r,t,i,l,d,m,f,y,h=n=>n;class p extends(e(n,"reports-table")){constructor(){super(...arguments),this.columns=[p.nameColumn,p.startColumn,p.endColumn,p.createdOnColumn,p.linkColumn]}}p.nameColumn={header:({html:n,lang:e,ns:s})=>n(a||(a=h`<foxy-i18n lang=${0} key="report_name" ns=${0}></foxy-i18n>`),e,s),cell:({html:n,data:e,lang:a,ns:o})=>{const r=`report_name_${e.name}`;return n(s||(s=h`<foxy-i18n class="font-medium" lang=${0} key=${0} ns=${0}></foxy-i18n>`),a,r,o)}},p.startColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(o||(o=h`<foxy-i18n lang=${0} key="range_start" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(r||(r=h`
2
2
  <foxy-i18n
3
3
  options=${0}
4
4
  lang=${0}
@@ -1 +1 @@
1
- import"./shared-dfe59df6.js";import"./foxy-nucleon-element.js";import"./shared-1b4a3e56.js";import{a as e}from"./shared-a89e8a07.js";import{I as t}from"./shared-160072f2.js";import{i as s}from"./shared-53e42a77.js";import{d as r}from"./shared-12973e93.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let o,i,a,n,l,c=e=>e;const h=e(t,"shipment-card");class u extends h{constructor(){super(...arguments),this.__transactionLoaderId="transactionLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,h,u,p,f,y,m;const{address_name:_,address1:v,address2:x,city:$,region:b,postal_code:j}=null!==(e=this.data)&&void 0!==e?e:{},g={address_name:_,address1:v,address2:x,city:$,region:b,postal_code:j},L={amount:`${null===(t=this.data)||void 0===t?void 0:t.total_shipping} ${this.__currencyCode}`,currencyDisplay:this.__currencyDisplay},k=null===(h=this.data)||void 0===h?void 0:h.shipping_service_description,I=null!==(f=null===(p=null===(u=this.data)||void 0===u?void 0:u._embedded)||void 0===p?void 0:p["fx:items"])&&void 0!==f?f:[];return d(o||(o=c` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="space-y-s"> <div class="grid leading-s text-body"> <foxy-i18n class="truncate text-m font-medium" infer="" key="full_address" .options="${0}"> </foxy-i18n> <span class="truncate text-s text-secondary"> ${0} <foxy-i18n key="price" infer="" .options="${0}"></foxy-i18n> &bull; <foxy-i18n infer="" key="item" .options="${0}"></foxy-i18n> </span> </div> ${0} </div> `),s(null===(y=this.data)||void 0===y?void 0:y._links["fx:transaction"].href),this.__transactionLoaderId,(()=>this.requestUpdate()),s(null===(m=this.data)||void 0===m?void 0:m._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),g,k?d(i||(i=c`${0} &bull; `),r(k)):"",L,{count:I.length},I.length>0?d(a||(a=c` <div class="border-t border-dashed border-contrast-20"></div> <div class="overflow-auto"> <table class="text-s leading-s whitespace-nowrap"> <thead></thead> <tbody> ${0} </tbody> </table> </div> `),I.map((e=>{var t;const s=null===(t=e._embedded)||void 0===t?void 0:t["fx:item_category"],r=null==s?void 0:s.default_length_unit,o=null==s?void 0:s.default_weight_unit;return d(n||(n=c` <tr> <td class="pr-s font-medium"> ${0} </td> <td class="px-s text-secondary">${0}</td> <td class="px-s text-tertiary"> ${0}&times;${0}&times;${0} ${0} </td> <td class="px-s text-tertiary">${0} ${0}</td> <td class="pl-s font-medium"> <foxy-i18n infer="" key="quantity" .options="${0}"> </foxy-i18n> </td> </tr> `),e.code||d(l||(l=c`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),e.name,e.width,e.height,e.length,r,e.weight,o,{count:e.quantity})}))):"")}get isBodyReady(){return super.isBodyReady&&!!this.__currencyDisplay&&!!this.__currencyCode}get __transactionLoader(){return this.renderRoot.querySelector(`#${this.__transactionLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __currencyDisplay(){var e;const t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data;return t?t.use_international_currency_symbol?"code":"symbol":void 0}get __currencyCode(){var e,t;return null===(t=null===(e=this.__transactionLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.currency_code}}customElements.define("foxy-shipment-card",u);export{u as ShipmentCard};
1
+ import"./shared-02dd05dd.js";import"./foxy-nucleon-element.js";import"./shared-64210e53.js";import{a as e}from"./shared-387d7254.js";import{I as t}from"./shared-264fb8a2.js";import{i as s}from"./shared-53e42a77.js";import{d as r}from"./shared-12973e93.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let o,i,a,n,c,l=e=>e;const h=e(t,"shipment-card");class u extends h{constructor(){super(...arguments),this.__transactionLoaderId="transactionLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,h,u,p,f,y,m;const{address_name:_,address1:v,address2:x,city:$,region:b,postal_code:j}=null!==(e=this.data)&&void 0!==e?e:{},g={address_name:_,address1:v,address2:x,city:$,region:b,postal_code:j},L={amount:`${null===(t=this.data)||void 0===t?void 0:t.total_shipping} ${this.__currencyCode}`,currencyDisplay:this.__currencyDisplay},k=null===(h=this.data)||void 0===h?void 0:h.shipping_service_description,I=null!==(f=null===(p=null===(u=this.data)||void 0===u?void 0:u._embedded)||void 0===p?void 0:p["fx:items"])&&void 0!==f?f:[];return d(o||(o=l` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="space-y-s"> <div class="grid leading-s text-body"> <foxy-i18n class="truncate text-m font-medium" infer="" key="full_address" .options="${0}"> </foxy-i18n> <span class="truncate text-s text-secondary"> ${0} <foxy-i18n key="price" infer="" .options="${0}"></foxy-i18n> &bull; <foxy-i18n infer="" key="item" .options="${0}"></foxy-i18n> </span> </div> ${0} </div> `),s(null===(y=this.data)||void 0===y?void 0:y._links["fx:transaction"].href),this.__transactionLoaderId,(()=>this.requestUpdate()),s(null===(m=this.data)||void 0===m?void 0:m._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),g,k?d(i||(i=l`${0} &bull; `),r(k)):"",L,{count:I.length},I.length>0?d(a||(a=l` <div class="border-t border-dashed border-contrast-20"></div> <div class="overflow-auto"> <table class="text-s leading-s whitespace-nowrap"> <thead></thead> <tbody> ${0} </tbody> </table> </div> `),I.map((e=>{var t;const s=null===(t=e._embedded)||void 0===t?void 0:t["fx:item_category"],r=null==s?void 0:s.default_length_unit,o=null==s?void 0:s.default_weight_unit;return d(n||(n=l` <tr> <td class="pr-s font-medium"> ${0} </td> <td class="px-s text-secondary">${0}</td> <td class="px-s text-tertiary"> ${0}&times;${0}&times;${0} ${0} </td> <td class="px-s text-tertiary">${0} ${0}</td> <td class="pl-s font-medium"> <foxy-i18n infer="" key="quantity" .options="${0}"> </foxy-i18n> </td> </tr> `),e.code||d(c||(c=l`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),e.name,e.width,e.height,e.length,r,e.weight,o,{count:e.quantity})}))):"")}get isBodyReady(){return super.isBodyReady&&!!this.__currencyDisplay&&!!this.__currencyCode}get __transactionLoader(){return this.renderRoot.querySelector(`#${this.__transactionLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __currencyDisplay(){var e;const t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data;return t?t.use_international_currency_symbol?"code":"symbol":void 0}get __currencyCode(){var e,t;return null===(t=null===(e=this.__transactionLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.currency_code}}customElements.define("foxy-shipment-card",u);export{u as ShipmentCard};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./shared-dfe59df6.js";import"./shared-1b4a3e56.js";import{a as r}from"./shared-a89e8a07.js";import{T as s}from"./shared-7d1512e1.js";import{h as e}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";let a,d,o=r=>r;const t=r(s,"shipping-container-card");class i extends t{renderBody(){return super.renderBody({title:r=>e(a||(a=o`${0}`),r.name),subtitle:({code:r})=>e(d||(d=o` <foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n> `),{code:r})})}}customElements.define("foxy-shipping-container-card",i);export{i as ShippingContainerCard};
1
+ import"./shared-5212ef4f.js";import"./shared-02dd05dd.js";import"./shared-64210e53.js";import{a as r}from"./shared-387d7254.js";import{T as s}from"./shared-15a7e329.js";import{h as e}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-264fb8a2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";let a,d,o=r=>r;const t=r(s,"shipping-container-card");class i extends t{renderBody(){return super.renderBody({title:r=>e(a||(a=o`${0}`),r.name),subtitle:({code:r})=>e(d||(d=o` <foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n> `),{code:r})})}}customElements.define("foxy-shipping-container-card",i);export{i as ShippingContainerCard};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./shared-dfe59df6.js";import"./shared-1b4a3e56.js";import{a as r}from"./shared-a89e8a07.js";import{T as s}from"./shared-7d1512e1.js";import{h as e}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";let a,d,o=r=>r;const t=r(s,"shipping-drop-type-card");class i extends t{renderBody(){return super.renderBody({title:r=>e(a||(a=o`${0}`),r.name),subtitle:({code:r})=>e(d||(d=o` <foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n> `),{code:r})})}}customElements.define("foxy-shipping-drop-type-card",i);export{i as ShippingDropTypeCard};
1
+ import"./shared-5212ef4f.js";import"./shared-02dd05dd.js";import"./shared-64210e53.js";import{a as r}from"./shared-387d7254.js";import{T as s}from"./shared-15a7e329.js";import{h as e}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-264fb8a2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";let d,a,o=r=>r;const t=r(s,"shipping-drop-type-card");class i extends t{renderBody(){return super.renderBody({title:r=>e(d||(d=o`${0}`),r.name),subtitle:({code:r})=>e(a||(a=o` <foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n> `),{code:r})})}}customElements.define("foxy-shipping-drop-type-card",i);export{i as ShippingDropTypeCard};
@@ -1 +1 @@
1
- import"./shared-dfe59df6.js";import"./foxy-nucleon-element.js";import"./shared-1b4a3e56.js";import{_ as e}from"./shared-7fec42f2.js";import{a as t}from"./shared-a89e8a07.js";import{I as s}from"./shared-160072f2.js";import{i as r}from"./shared-53e42a77.js";import{h as i}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,o=e=>e;const h=t(s,"shipping-method-card");class d extends h{constructor(){super(...arguments),this.storeShippingMethods=null,this.getImageSrc=null,this.__storeShippingMethodsLoaderId="storeShippingMethods"}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none' viewBox='0 0 40 40'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23E8E8E8' d='M0 0h40v40H0z'/%3E%3Cpath fill='%23fff' d='M0 14.81V7.88L7.88 0h6.93L0 14.81ZM0 0h6.47L0 6.47V0Zm16.22 0L0 16.22v6.93l9-9V14c0-.55.2-1.02.59-1.41.39-.4.86-.59 1.41-.59h.15l12-12h-6.93ZM9 15.57l-9 9v6.93l9-9v-6.93Zm.15 8.19L0 32.91v6.93l12.33-12.33a3.28 3.28 0 0 1-.46-.39A2.9 2.9 0 0 1 11 25c-.55 0-1.02-.2-1.41-.59a2 2 0 0 1-.44-.65Zm4.17 4.17L1.26 40h6.92L23 25.18V25h-6c0 .83-.3 1.54-.88 2.13A2.9 2.9 0 0 1 14 28a3.2 3.2 0 0 1-.68-.07Zm11.85-3.5.26-.26A.98.98 0 0 1 26 24c.28 0 .52.1.71.29.2.19.29.43.29.71 0 .28-.1.52-.29.71A.94.94 0 0 1 26 26a.97.97 0 0 1-.71-.29A.97.97 0 0 1 25 25a1 1 0 0 1 .17-.57Z'/%3E%3Cpath fill='%23fff' d='M23.29 26.31 9.59 40h6.94L40 16.53V9.6l-9.6 9.6.4.53c.07.08.12.17.15.27s.05.2.05.32V24c0 .28-.1.52-.29.71A.94.94 0 0 1 30 25h-1c0 .83-.3 1.54-.88 2.13A2.9 2.9 0 0 1 26 28a3 3 0 0 1-2.71-1.69Zm6.51-7.92L40 8.19V1.25L25.26 16h2.24a1 1 0 0 1 .45.1 1 1 0 0 1 .35.3l1.5 1.99ZM25 14.84 39.84 0h-6.93l-12 12H23c.55 0 1.02.2 1.41.59.4.39.59.86.59 1.41v.84ZM19.5 12l12-12h-6.93l-12 12h6.93Zm-1.56 28L40 17.94v6.93L24.87 40h-6.93ZM40 26.29 26.29 40h6.93L40 33.22v-6.93ZM34.63 40 40 34.63V40h-5.37ZM13 25c0 .28.1.52.29.71.19.2.43.29.71.29.28 0 .52-.1.71-.29.2-.19.29-.43.29-.71 0-.28-.1-.52-.29-.71A.97.97 0 0 0 14 24c-.07 0-.14 0-.2.02a.95.95 0 0 0-.51.27.95.95 0 0 0-.29.71Z'/%3E%3Cpath fill='%23fff' d='M25 18v3h4.21l-.85-1.18-.68-.91L27 18h-2Z'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h40v40H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"}static get properties(){return e(e({},super.properties),{},{storeShippingMethods:{attribute:"store-shipping-methods"},getImageSrc:{attribute:!1}})}renderBody(){var e,t,s;const h=d.defaultImageSrc,p=1===(null===(e=this.__storeShippingMethodsItems)||void 0===e?void 0:e.length),l=this.data;return i(a||(a=o` <figure class="flex" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1 leading-xs -my-xs"> <p class="text-m truncate text-body font-medium">${0}</p> <p class="text-s truncate text-secondary"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </p> </figcaption> </figure> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),null!==(s=l?null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,l.code):null)&&void 0!==s?s:h,this.t("image_alt"),(e=>e.currentTarget.src=h),null==l?void 0:l.name,p?"status_active":"status_inactive",r(this.__storeShippingMethodsHref),this.__storeShippingMethodsLoaderId,(()=>this.requestUpdate()))}get isBodyReady(){return!!super.isBodyReady&&(!this.storeShippingMethods||!!this.__storeShippingMethodsItems)}get __storeShippingMethodsHref(){try{const e=new URL(this.storeShippingMethods);return e.searchParams.set("shipping_method_id",this.href.split("/").pop()),e.searchParams.set("limit","1"),e.toString()}catch(e){}}get __storeShippingMethodsLoader(){return this.renderRoot.querySelector(`#${this.__storeShippingMethodsLoaderId}`)}get __storeShippingMethodsItems(){var e,t;return null===(t=null===(e=this.__storeShippingMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._embedded["fx:store_shipping_methods"]}}customElements.define("foxy-shipping-method-card",d);export{d as ShippingMethodCard};
1
+ import"./shared-02dd05dd.js";import"./foxy-nucleon-element.js";import"./shared-64210e53.js";import{_ as e}from"./shared-7fec42f2.js";import{a as t}from"./shared-387d7254.js";import{I as s}from"./shared-264fb8a2.js";import{i as r}from"./shared-53e42a77.js";import{h as i}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,o=e=>e;const h=t(s,"shipping-method-card");class d extends h{constructor(){super(...arguments),this.storeShippingMethods=null,this.getImageSrc=null,this.__storeShippingMethodsLoaderId="storeShippingMethods"}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none' viewBox='0 0 40 40'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23E8E8E8' d='M0 0h40v40H0z'/%3E%3Cpath fill='%23fff' d='M0 14.81V7.88L7.88 0h6.93L0 14.81ZM0 0h6.47L0 6.47V0Zm16.22 0L0 16.22v6.93l9-9V14c0-.55.2-1.02.59-1.41.39-.4.86-.59 1.41-.59h.15l12-12h-6.93ZM9 15.57l-9 9v6.93l9-9v-6.93Zm.15 8.19L0 32.91v6.93l12.33-12.33a3.28 3.28 0 0 1-.46-.39A2.9 2.9 0 0 1 11 25c-.55 0-1.02-.2-1.41-.59a2 2 0 0 1-.44-.65Zm4.17 4.17L1.26 40h6.92L23 25.18V25h-6c0 .83-.3 1.54-.88 2.13A2.9 2.9 0 0 1 14 28a3.2 3.2 0 0 1-.68-.07Zm11.85-3.5.26-.26A.98.98 0 0 1 26 24c.28 0 .52.1.71.29.2.19.29.43.29.71 0 .28-.1.52-.29.71A.94.94 0 0 1 26 26a.97.97 0 0 1-.71-.29A.97.97 0 0 1 25 25a1 1 0 0 1 .17-.57Z'/%3E%3Cpath fill='%23fff' d='M23.29 26.31 9.59 40h6.94L40 16.53V9.6l-9.6 9.6.4.53c.07.08.12.17.15.27s.05.2.05.32V24c0 .28-.1.52-.29.71A.94.94 0 0 1 30 25h-1c0 .83-.3 1.54-.88 2.13A2.9 2.9 0 0 1 26 28a3 3 0 0 1-2.71-1.69Zm6.51-7.92L40 8.19V1.25L25.26 16h2.24a1 1 0 0 1 .45.1 1 1 0 0 1 .35.3l1.5 1.99ZM25 14.84 39.84 0h-6.93l-12 12H23c.55 0 1.02.2 1.41.59.4.39.59.86.59 1.41v.84ZM19.5 12l12-12h-6.93l-12 12h6.93Zm-1.56 28L40 17.94v6.93L24.87 40h-6.93ZM40 26.29 26.29 40h6.93L40 33.22v-6.93ZM34.63 40 40 34.63V40h-5.37ZM13 25c0 .28.1.52.29.71.19.2.43.29.71.29.28 0 .52-.1.71-.29.2-.19.29-.43.29-.71 0-.28-.1-.52-.29-.71A.97.97 0 0 0 14 24c-.07 0-.14 0-.2.02a.95.95 0 0 0-.51.27.95.95 0 0 0-.29.71Z'/%3E%3Cpath fill='%23fff' d='M25 18v3h4.21l-.85-1.18-.68-.91L27 18h-2Z'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h40v40H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E"}static get properties(){return e(e({},super.properties),{},{storeShippingMethods:{attribute:"store-shipping-methods"},getImageSrc:{attribute:!1}})}renderBody(){var e,t,s;const h=d.defaultImageSrc,p=1===(null===(e=this.__storeShippingMethodsItems)||void 0===e?void 0:e.length),l=this.data;return i(a||(a=o` <figure class="flex" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1 leading-xs -my-xs"> <p class="text-m truncate text-body font-medium">${0}</p> <p class="text-s truncate text-secondary"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </p> </figcaption> </figure> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),null!==(s=l?null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,l.code):null)&&void 0!==s?s:h,this.t("image_alt"),(e=>e.currentTarget.src=h),null==l?void 0:l.name,p?"status_active":"status_inactive",r(this.__storeShippingMethodsHref),this.__storeShippingMethodsLoaderId,(()=>this.requestUpdate()))}get isBodyReady(){return!!super.isBodyReady&&(!this.storeShippingMethods||!!this.__storeShippingMethodsItems)}get __storeShippingMethodsHref(){try{const e=new URL(this.storeShippingMethods);return e.searchParams.set("shipping_method_id",this.href.split("/").pop()),e.searchParams.set("limit","1"),e.toString()}catch(e){}}get __storeShippingMethodsLoader(){return this.renderRoot.querySelector(`#${this.__storeShippingMethodsLoaderId}`)}get __storeShippingMethodsItems(){var e,t;return null===(t=null===(e=this.__storeShippingMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t._embedded["fx:store_shipping_methods"]}}customElements.define("foxy-shipping-method-card",d);export{d as ShippingMethodCard};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./shared-dfe59df6.js";import"./shared-1b4a3e56.js";import{a as r}from"./shared-a89e8a07.js";import{T as s}from"./shared-7d1512e1.js";import{h as e}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";let a,d,i=r=>r;const o=r(s,"shipping-service-card");class t extends o{renderBody(){return super.renderBody({title:r=>e(a||(a=i`${0}`),r.name),subtitle:r=>e(d||(d=i` <foxy-i18n infer="" key="subtitle" .options="${0}"> </foxy-i18n> `),{context:r.is_international?"international_only":"",code:r.code})})}}customElements.define("foxy-shipping-service-card",t);export{t as ShippingServiceCard};
1
+ import"./shared-5212ef4f.js";import"./shared-02dd05dd.js";import"./shared-64210e53.js";import{a as r}from"./shared-387d7254.js";import{T as s}from"./shared-15a7e329.js";import{h as e}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-264fb8a2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";let a,d,i=r=>r;const o=r(s,"shipping-service-card");class t extends o{renderBody(){return super.renderBody({title:r=>e(a||(a=i`${0}`),r.name),subtitle:r=>e(d||(d=i` <foxy-i18n infer="" key="subtitle" .options="${0}"> </foxy-i18n> `),{context:r.is_international?"international_only":"",code:r.code})})}}customElements.define("foxy-shipping-service-card",t);export{t as ShippingServiceCard};
@@ -1 +1 @@
1
- import"./shared-a41ccdc7.js";import"./shared-ce0df878.js";import"./shared-48129732.js";import"./shared-f2be9863.js";import"./shared-b15efc37.js";import"./shared-3f4549ba.js";import"./shared-ad8d209a.js";import"./shared-a4871405.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{_ as e}from"./shared-7fec42f2.js";import{h as t}from"./shared-ba5c42c7.js";import{C as r}from"./shared-c782b9fa.js";import{N as i}from"./shared-da95bb48.js";import{T as n,a as o}from"./shared-a89e8a07.js";import{c as a}from"./shared-4e709717.js";import{i as s}from"./shared-53e42a77.js";import{v as l}from"./shared-b738ee96.js";import"./shared-5af5ab06.js";import"./shared-3c64ecdd.js";import"./shared-1f95aa71.js";import"./shared-9bfb584b.js";import"./shared-6313b188.js";import"./shared-d3f37507.js";import"./shared-9884fb7d.js";import"./shared-0ea750af.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){var i,n;void 0===(n="function"==typeof(i=function(){for(var e=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],t=/^\d*$/,r=/^[A-Za-z0-9 $%*+\-./:]*$/,i=/^[A-Z0-9 $%*+\-./:]*$/,n=[],o=[-1],a=0,s=1;a<255;++a)n.push(s),o[s]=a,s=2*s^(s>=128?285:0);var l=[[]];for(a=0;a<30;++a){for(var d=l[a],u=[],c=0;c<=a;++c){var f=c<a?n[d[c]]:0,h=n[(a+(d[c-1]||0))%255];u.push(o[f^h])}l.push(u)}var p={};for(a=0;a<45;++a)p["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(a)]=a;var m=[function(e,t){return(e+t)%2==0},function(e,t){return e%2==0},function(e,t){return t%3==0},function(e,t){return(e+t)%3==0},function(e,t){return((e/2|0)+(t/3|0))%2==0},function(e,t){return e*t%2+e*t%3==0},function(e,t){return(e*t%2+e*t%3)%2==0},function(e,t){return((e+t)%2+e*t%3)%2==0}],v=function(e){return e>6},b=function(t,r){var i=-8&function(t){var r=e[t],i=16*t*t+128*t+64;return v(t)&&(i-=36),r[2].length&&(i-=25*r[2].length*r[2].length-10*r[2].length-55),i}(t),n=e[t];return i-8*n[0][r]*n[1][r]},g=function(e,t){switch(t){case 1:return e<10?10:e<27?12:14;case 2:return e<10?9:e<27?11:13;case 4:return e<10?8:16;case 8:return e<10?8:e<27?10:12}},y=function(e,t,r){var i=b(e,r)-4-g(e,t);switch(t){case 1:return 3*(i/10|0)+(i%10<4?0:i%10<7?1:2);case 2:return 2*(i/11|0)+(i%11<6?0:1);case 4:return i/8|0;case 8:return i/13|0}},_=function(e,t){for(var r=e.slice(0),i=e.length,a=t.length,s=0;s<a;++s)r.push(0);for(s=0;s<i;){var l=o[r[s++]];if(l>=0)for(var d=0;d<a;++d)r[s+d]^=n[(l+t[d])%255]}return r.slice(i)},w=function(e,t,r,i){for(var n=e<<i,o=t-1;o>=0;--o)n>>i+o&1&&(n^=r<<o);return e<<i|n},$=function(e,t,r){for(var i=m[r],n=e.length,o=0;o<n;++o)for(var a=0;a<n;++a)t[o][a]||(e[o][a]^=i(o,a));return e},S=function(e,t,r,i){for(var n=e.length,o=21522^w(r<<3|i,5,1335,10),a=0;a<15;++a){var s=[n-1,n-2,n-3,n-4,n-5,n-6,n-7,n-8,7,5,4,3,2,1,0][a];e[[0,1,2,3,4,5,7,8,n-7,n-6,n-5,n-4,n-3,n-2,n-1][a]][8]=e[8][s]=o>>a&1}return e},x=function(e){for(var t=function(e){for(var t=0,r=0;r<e.length;++r)e[r]>=5&&(t+=e[r]-5+3);for(r=5;r<e.length;r+=2){var i=e[r];e[r-1]==i&&e[r-2]==3*i&&e[r-3]==i&&e[r-4]==i&&(e[r-5]>=4*i||e[r+1]>=4*i)&&(t+=40)}return t},r=e.length,i=0,n=0,o=0;o<r;++o){var a,s=e[o];a=[0];for(var l=0;l<r;){for(d=0;l<r&&s[l];++d)++l;for(a.push(d),d=0;l<r&&!s[l];++d)++l;a.push(d)}for(i+=t(a),a=[0],l=0;l<r;){var d;for(d=0;l<r&&e[l][o];++d)++l;for(a.push(d),d=0;l<r&&!e[l][o];++d)++l;a.push(d)}i+=t(a);var u=e[o+1]||[];for(n+=s[0],l=1;l<r;++l){var c=s[l];n+=c,s[l-1]==c&&u[l]===c&&u[l-1]===c&&(i+=3)}}return i+10*(Math.abs(n/r/r-.5)/.05|0)},j=function(t,r,i,n,o){var a=e[r],s=function(e,t,r,i){var n=[],o=0,a=8,s=r.length,l=function(e,t){if(t>=a){for(n.push(o|e>>(t-=a));t>=8;)n.push(e>>(t-=8)&255);o=0,a=8}t>0&&(o|=(e&(1<<t)-1)<<(a-=t))},d=g(e,t);switch(l(t,4),l(s,d),t){case 1:for(var u=2;u<s;u+=3)l(parseInt(r.substring(u-2,u+1),10),10);l(parseInt(r.substring(u-2),10),[0,4,7][s%3]);break;case 2:for(u=1;u<s;u+=2)l(45*p[r.charAt(u-1)]+p[r.charAt(u)],11);s%2==1&&l(p[r.charAt(u-1)],6);break;case 4:for(u=0;u<s;++u)l(r[u],8)}for(l(0,4),a<8&&n.push(o);n.length+1<i;)n.push(236,17);return n.length<i&&n.push(236),n}(r,i,t,b(r,n)>>3);s=function(e,t,r){for(var i=[],n=e.length/t|0,o=0,a=t-e.length%t,s=0;s<a;++s)i.push(o),o+=n;for(s=a;s<t;++s)i.push(o),o+=n+1;i.push(o);var l=[];for(s=0;s<t;++s)l.push(_(e.slice(i[s],i[s+1]),r));var d=[],u=e.length/t|0;for(s=0;s<u;++s)for(var c=0;c<t;++c)d.push(e[i[c]+s]);for(c=a;c<t;++c)d.push(e[i[c+1]-1]);for(s=0;s<r.length;++s)for(c=0;c<t;++c)d.push(l[c][s]);return d}(s,a[1][n],l[a[0][n]]);var d=function(t){for(var r=e[t],i=function(e){return 4*e+17}(t),n=[],o=[],a=0;a<i;++a)n.push([]),o.push([]);var s=function(e,t,r,i,a){for(var s=0;s<r;++s)for(var l=0;l<i;++l)n[e+s][t+l]=a[s]>>l&1,o[e+s][t+l]=1};for(s(0,0,9,9,[127,65,93,93,93,65,383,0,64]),s(i-8,0,8,9,[256,127,65,93,93,93,65,127]),s(0,i-8,9,8,[254,130,186,186,186,130,254,0,0]),a=9;a<i-8;++a)n[6][a]=n[a][6]=1&~a,o[6][a]=o[a][6]=1;var l=r[2],d=l.length;for(a=0;a<d;++a)for(var u=0==a?d-1:d,c=0==a||a==d-1?1:0;c<u;++c)s(l[a],l[c],5,5,[31,17,21,17,31]);if(v(t)){var f=w(t,6,7973,12),h=0;for(a=0;a<6;++a)for(c=0;c<3;++c)n[a][i-11+c]=n[i-11+c][a]=f>>h++&1,o[a][i-11+c]=o[i-11+c][a]=1}return{matrix:n,reserved:o}}(r),u=d.matrix,c=d.reserved;if(function(e,t,r){for(var i=e.length,n=0,o=-1,a=i-1;a>=0;a-=2){6==a&&--a;for(var s=o<0?i-1:0,l=0;l<i;++l){for(var d=a;d>a-2;--d)t[s][d]||(e[s][d]=r[n>>3]>>(7&~n)&1,++n);s+=o}o=-o}}(u,c,s),o<0){$(u,c,0),S(u,0,n,0);var f=0,h=x(u);for($(u,c,0),o=1;o<8;++o){$(u,c,o),S(u,0,n,o);var m=x(u);h>m&&(h=m,f=o),$(u,c,o)}o=f}return $(u,c,o),S(u,0,n,o),u},k={generate:function(e,n){var o=(n=n||{}).version||-1,a={L:1,M:0,Q:3,H:2}[(n.ecclevel||"L").toUpperCase()],s=n.mode?{numeric:1,alphanumeric:2,octet:4}[n.mode.toLowerCase()]:-1,l="mask"in n?n.mask:-1;if(s<0)s="string"==typeof e?e.match(t)?1:e.match(i)?2:4:4;else if(1!=s&&2!=s&&4!=s)throw"invalid or unsupported mode";if(null===(e=function(e,i){switch(e){case 1:return i.match(t)?i:null;case 2:return i.match(r)?i.toUpperCase():null;case 4:if("string"==typeof i){for(var n=[],o=0;o<i.length;++o){var a=i.charCodeAt(o);a<128?n.push(a):a<2048?n.push(192|a>>6,128|63&a):a<65536?n.push(224|a>>12,128|a>>6&63,128|63&a):n.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|63&a)}return n}return i}}(s,e)))throw"invalid data format";if(a<0||a>3)throw"invalid ECC level";if(o<0){for(o=1;o<=40&&!(e.length<=y(o,s,a));++o);if(o>40)throw"too large data"}else if(o<1||o>40)throw"invalid version";if(-1!=l&&(l<0||l>8))throw"invalid mask";return j(e,o,s,a,l)},generateHTML:function(e,t){t=t||{};for(var r=k.generate(e,t),i=Math.max(t.modulesize||5,.5),n=t.unit||"px",o=t.ratio||1,a=Math.max(null!==t.margin?t.margin:4,0),s=document.createElement("div"),l=r.length,d=['<table border="0" cellspacing="0" cellpadding="0" style="border:'+i*a+'px solid #fff;background:#fff">'],u=0;u<l;++u){d.push("<tr>");for(var c=0;c<l;++c){const e="px"!==n?"width:"+i*o+n+"; height:"+i*o+n:"width:"+i+"px;height:"+i+"px";console.log("generateHTML",{unit:n,ratio:o,modsize:i,size:e}),d.push('<td style="'+e+(r[u][c]?";background:#000":"")+'" part="'+(r[u][c]?"module-fg":"module-bg")+'" ></td>')}d.push("</tr>")}return s.className="qrcode",s.innerHTML=d.join("")+"</table>",s},generateSVG:function(e,t){t=t||{};var r=k.generate(e,t),i=r.length,n=Math.max(t.modulesize||5,.5),o=Math.max(null!==t.margin?t.margin:4,0),a=n*(i+2*o),s=' class= "fg" width="'+n+'" height="'+n+'"/>',l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 "+a+" "+a),l.setAttribute("style","shape-rendering:crispEdges"),t.modulesize&&(l.setAttribute("width",a),l.setAttribute("height",a));for(var d=["<style scoped>.bg{fill:#FFF}.fg{fill:#000}</style>",'<rect class="bg" x="0" y="0"','width="'+a+'" height="'+a+'"/>'],u=o*n,c=0;c<i;++c){for(var f=o*n,h=0;h<i;++h)r[c][h]&&d.push('<rect x="'+f+'" y="'+u+'"',s),f+=n;u+=n}return l.innerHTML=d.join(""),l},generatePNG:function(e,t){t=t||{};var r,i=k.generate(e,t),n=Math.max(t.modulesize||5,.5),o=Math.max(null!==t.margin?t.margin:4,0),a=i.length,s=n*(a+2*o),l=document.createElement("canvas");if(l.width=l.height=s,!(r=l.getContext("2d")))throw"canvas support is needed for PNG output";r.fillStyle="#fff",r.fillRect(0,0,s,s),r.fillStyle="#000";for(var d=0;d<a;++d)for(var u=0;u<a;++u)i[d][u]&&r.fillRect(n*(o+u),n*(o+d),n,n);return l.toDataURL()}};return k})?i.apply(t,[]):i)||(e.exports=n)},function(e,t,r){r.r(t);var i=r(0),n=r.n(i);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,n=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!==o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===o(n)?n:String(n)),i)}var n}function s(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,h(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),f(i,e)})(e)}function u(e,t,r){return(u=c()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&f(n,r.prototype),n}).apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(p,e);var t,r,i,o,d,u=(t=p,r=c(),function(){var e,i=h(t);if(r){var n=h(this).constructor;e=Reflect.construct(i,arguments,n)}else e=i.apply(this,arguments);return s(this,e)});function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=u.call(this))._defineProperty=e._defineProperty.bind(l(e)),e.attachShadow({mode:"open"}),Object.keys(p.defaultAttributes).map(e._defineProperty),e}return i=p,d=[{key:"defaultAttributes",get:function(){return{data:null,format:"png",modulesize:5,margin:4,unit:"px",ratio:1}}},{key:"observedAttributes",get:function(){return Object.keys(p.defaultAttributes)}}],(o=[{key:"attributeChangedCallback",value:function(e,t,r){var i=this[e+"Changed"];i&&"function"==typeof i&&i.call(this,t,r),this.generate()}},{key:"_defineProperty",value:function(e){var t=this;Object.defineProperty(this,e,{get:function(){var r=t.getAttribute(e);return null===r?p.defaultAttributes[e]:r},set:function(r){t.setAttribute(e,r)}})}},{key:"getOptions",value:function(){var e=this.modulesize,t=this.margin,r=this.unit,i=this.ratio;return{margin:null!==t?parseInt(t):t,modulesize:null!==e?parseInt(e):e,unit:r||"px",ratio:i||1}}},{key:"generate",value:function(){try{this.clear(),null!==this.data?"png"===this.format?this.generatePNG():"html"===this.format?this.generateHTML():"svg"===this.format?this.generateSVG():this.shadowRoot.textContent="qr-code: ".concat(this.format," not supported!"):this.shadowRoot.textContent="qr-code: no data!"}catch(e){console.error(e),this.shadowRoot.textContent="qr-code: error!"}}},{key:"generatePNG",value:function(){var e=document.createElement("img");e.src=n.a.generatePNG(this.data,this.getOptions()),e.setAttribute("part","img"),this.shadowRoot.appendChild(e)}},{key:"generateHTML",value:function(){var e=n.a.generateHTML(this.data,this.getOptions()).firstChild;e.setAttribute("part","table"),this.shadowRoot.appendChild(e)}},{key:"generateSVG",value:function(){var e=n.a.generateSVG(this.data,this.getOptions());e.setAttribute("part","svg"),this.shadowRoot.appendChild(e)}},{key:"clear",value:function(){for(;this.shadowRoot.lastChild;)this.shadowRoot.removeChild(this.shadowRoot.lastChild)}}])&&a(i.prototype,o),d&&a(i,d),Object.defineProperty(i,"prototype",{writable:!1}),p}(d(HTMLElement));customElements.get("qr-code")||customElements.define("qr-code",p)}]);let d,u,c,f,h,p,m,v,b,g=e=>e;const y=n(r(o(i,"sign-in-form")));class _ extends y{constructor(){super(...arguments),this.issuer="Unknown",this.__autofillPoller=null,this.__emailValidator=()=>!this.errors.some((e=>e.startsWith("email"))),this.__passwordValidator=()=>!this.errors.some((e=>e.startsWith("password"))),this.__newPasswordValidator=()=>!this.errors.some((e=>e.startsWith("new_password")&&!e.endsWith("_error"))),this.__mfaTotpCodeValidator=()=>!this.errors.some((e=>e.startsWith("mfa_totp_code")&&!e.endsWith("_error"))),this.__renderEmail=()=>{var e;const{disabledSelector:r,readonlySelector:i,errors:n}=this,o=n.find((e=>e.startsWith("email"))),a=null==o?void 0:o.replace("email","v8n"),l=a?this.t(a).toString():"",u=this.in("busy");return t(d||(d=g` <div> ${0} <vaadin-email-field error-message="${0}" data-testid="email" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @keydown="${0}" @input="${0}"> </vaadin-email-field> ${0} </div> `),this.renderTemplateOrSlot("email:before"),l,this.t("email").toString(),s(null===(e=this.form.credential)||void 0===e?void 0:e.email),u||r.matches("email",!0),i.matches("email",!0),this.__emailValidator,(e=>"Enter"===e.key&&this.submit()),(e=>{var t,r;const i=e.target.value,n=null!==(r=null===(t=this.form.credential)||void 0===t?void 0:t.password)&&void 0!==r?r:"";this.edit({credential:{email:i,password:n},type:"password"})}),this.renderTemplateOrSlot("email:after"))},this.__renderPassword=()=>{var e;const{disabledSelector:r,readonlySelector:i,errors:n}=this,o=n.find((e=>e.startsWith("password"))),a=null==o?void 0:o.replace("password","v8n"),l=a?this.t(a).toString():"",d=this.in("busy");return t(u||(u=g` <div> ${0} <vaadin-password-field error-message="${0}" data-testid="password" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @keydown="${0}" @input="${0}"> </vaadin-password-field> ${0} </div> `),this.renderTemplateOrSlot("password:before"),l,this.t("password").toString(),s(null===(e=this.form.credential)||void 0===e?void 0:e.password),d||r.matches("password",!0),i.matches("password",!0),this.__passwordValidator,(e=>"Enter"===e.key&&this.submit()),(e=>{var t,r;const i=null!==(r=null===(t=this.form.credential)||void 0===t?void 0:t.email)&&void 0!==r?r:"",n=e.target.value;this.edit({credential:{email:i,password:n},type:"password"})}),this.renderTemplateOrSlot("password:after"))},this.__renderNewPassword=()=>{var e;const{disabledSelector:r,readonlySelector:i,errors:n}=this,o=n.find((e=>e.startsWith("new_password")&&!e.endsWith("_error"))),a=null==o?void 0:o.replace("new_password","v8n"),l=a?this.t(a).toString():"",d=this.in("busy");return t(c||(c=g` <div> ${0} <vaadin-password-field error-message="${0}" data-testid="new-password" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @keydown="${0}" @input="${0}"> </vaadin-password-field> ${0} </div> `),this.renderTemplateOrSlot("new-password:before"),l,this.t("new_password").toString(),s(null===(e=this.form.credential)||void 0===e?void 0:e.new_password),d||r.matches("new-password",!0),i.matches("new-password",!0),this.__newPasswordValidator,(e=>"Enter"===e.key&&this.submit()),(e=>{var t,r,i,n;this.edit({type:"password",credential:{email:null!==(r=null===(t=this.form.credential)||void 0===t?void 0:t.email)&&void 0!==r?r:"",password:null!==(n=null===(i=this.form.credential)||void 0===i?void 0:i.password)&&void 0!==n?n:"",new_password:e.target.value}})}),this.renderTemplateOrSlot("new-password:after"))},this.__renderMfaTotpCode=()=>{var r;const{disabledSelector:i,readonlySelector:n,errors:o}=this,a=this.__mfaSecretCode,l="mfa_totp_code",d="mfa-totp-code",u=o.find((e=>e.startsWith(l)&&!e.endsWith("_error"))),c=null==u?void 0:u.replace(l,"v8n"),h=c?this.t(c).toString():"",p=this.in("busy");return t(f||(f=g` <div> ${0} <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="123456" data-testid="${0}" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" autofocus @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot(`${d}:before`),h,a?this.t("mfa_totp_code_hint"):"",d,this.t(l).toString(),s(null===(r=this.form.credential)||void 0===r?void 0:r.mfa_totp_code),p||i.matches(d,!0),n.matches(d,!0),this.__mfaTotpCodeValidator,(e=>"Enter"===e.key&&this.submit()),(t=>{const r=t.target.value,i=e(e({},this.form.credential),{},{mfa_totp_code:r});a&&(i.mfa_secret_code=a),this.edit({type:"password",credential:i})}),this.renderTemplateOrSlot(`${d}:after`))},this.__renderMfaSecretCode=()=>{var e,r;const i="mfa-secret-code",n=this.__mfaSecretCode,o=encodeURIComponent(this.issuer),a=encodeURIComponent(null!==(r=null===(e=this.form.credential)||void 0===e?void 0:e.email)&&void 0!==r?r:""),s=new URL(`otpauth://totp/${o}:${a}`);return s.searchParams.set("secret",n),s.searchParams.set("issuer",this.issuer),t(h||(h=g` <div> ${0} <div data-testid="${0}" class="flex space-x-m overflow-hidden rounded border p-m mb-m border-contrast-10" style="background:#fff;color:#000"> <qr-code modulesize="2" margin="0" format="svg" class="inline-flex" data="${0}"> </qr-code> <div class="break-all font-medium leading-s text-xs tracking-widest"> ${0} </div> </div> ${0} </div> `),this.renderTemplateOrSlot(`${i}:before`),i,s.toString(),n,this.renderTemplateOrSlot(`${i}:after`))},this.__renderMfaRememberDevice=()=>{var r;const{__mfaSecretCode:i,form:n,lang:o,ns:a}=this,s="mfa-remember-device",l=this.in("busy")||this.disabledSelector.matches(s,!0);return t(p||(p=g` <div> ${0} <vaadin-checkbox data-testid="${0}" class="mb-m" ?disabled="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block" lang="${0}" key="mfa_remember_device" ns="${0}"></foxy-i18n> <foxy-i18n class="block text-xs ${0}" lang="${0}" key="mfa_remember_device_hint" ns="${0}"> </foxy-i18n> </vaadin-checkbox> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),s,l,!!(null===(r=n.credential)||void 0===r?void 0:r.mfa_remember_device),(t=>{var r,o;const a=t.currentTarget,s=e(e({},n.credential),{},{mfa_remember_device:a.checked,mfa_totp_code:null!==(o=null===(r=n.credential)||void 0===r?void 0:r.mfa_totp_code)&&void 0!==o?o:""});i&&(s.mfa_secret_code=i),this.edit({credential:s})}),o,a,l?"text-disabled":"text-secondary",o,a,this.renderTemplateOrSlot(`${s}:after`))},this.__renderError=()=>t(m||(m=g` <div> ${0} <p class="leading-s flex items-start text-s rounded p-s bg-error-10 text-error"> <iron-icon class="flex-shrink-0 mr-s icon-inline text-l" icon="lumo:error"></iron-icon> <foxy-i18n data-testid="error" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </p> ${0} </div> `),this.renderTemplateOrSlot("error:before"),this.lang,this.errors[0],this.ns,this.renderTemplateOrSlot("error:after")),this.__renderSubmit=()=>{const e=this.in({idle:{snapshot:{dirty:"valid"}}})||this.in({idle:{snapshot:{clean:"valid"}}})||this.in({idle:{template:{dirty:"valid"}}})||this.in({idle:{template:{clean:"valid"}}});return t(v||(v=g` <div> ${0} <vaadin-button data-testid="submit" class="w-full mt-m" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="sign_in"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),!e||this.in("busy")||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.ns,this.lang,this.renderTemplateOrSlot("submit:after"))}}static get properties(){return e(e({},super.properties),{},{issuer:{type:String}})}static get v8n(){return[({credential:e})=>!!(null==e?void 0:e.email)||"email_required",({credential:e})=>{var t;return l(null!==(t=null==e?void 0:e.email)&&void 0!==t?t:"")||"email_invalid_email"},({credential:e})=>!!(null==e?void 0:e.password)||"password_required",({credential:e})=>{var t;return 0!==(null===(t=null==e?void 0:e.new_password)||void 0===t?void 0:t.length)||"new_password_required"},({credential:e})=>{var t;return 0!==(null===(t=null==e?void 0:e.mfa_totp_code)||void 0===t?void 0:t.length)||"mfa_totp_code_required"}]}render(){var e,r,i,n;const{hiddenSelector:o,errors:s,lang:l,form:d,ns:u}=this,c=this.__mfaSecretCode,f=null===(e=d.credential)||void 0===e?void 0:e.mfa_totp_code,h=!!c||!!f||s.some((e=>e.startsWith("mfa"))),p="string"==typeof(null===(r=this.form.credential)||void 0===r?void 0:r.new_password)||s.some((e=>e.startsWith("new_password_"))),m=!h&&!f||o.matches("mfa-totp-code",!0),v=!h||h&&c||o.matches("mfa-remember-device",!0),y=!c||o.matches("mfa-secret-code",!0),_=h||o.matches("new-password",!0),w=s.some((e=>e.endsWith("_error"))),$=this.in("busy");return t(b||(b=g` <main aria-live="polite" aria-busy="${0}" class="relative font-lumo text-m leading-m"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="busy" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </main> `),$,o.matches("email",!0)?"":this.__renderEmail(),h||o.matches("password",!0)?"":this.__renderPassword(),_||!p?"":this.__renderNewPassword(),m?"":this.__renderMfaTotpCode(),y?"":this.__renderMfaSecretCode(),v?"":this.__renderMfaRememberDevice(),o.matches("error",!0)||!w?"":this.__renderError(),o.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!$}),l,u,null!==(n=null===(i=customElements.get("foxy-spinner"))||void 0===i?void 0:i.defaultNS)&&void 0!==n?n:"")}connectedCallback(){super.connectedCallback(),null!==this.__autofillPoller&&window.clearInterval(this.__autofillPoller),this.__autofillPoller=window.setInterval((()=>{this.renderRoot.querySelectorAll("vaadin-text-field, vaadin-email-field, vaadin-password-field").forEach((e=>{var t;const r=null!==(t=e.getAttribute("value"))&&void 0!==t?t:"";e.value!==r&&e.dispatchEvent(new InputEvent("input"))}))}),250)}disconnectedCallback(){super.disconnectedCallback(),null!==this.__autofillPoller&&window.clearInterval(this.__autofillPoller)}async _sendPost(e){const t=JSON.stringify(e),r=await this._fetch(this.parent,{body:t,method:"POST"}),n=i.Rumour(this.group),o=[...this.related,this.parent];return n.share({data:r,related:o,source:r._links.self.href}),r}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t="unknown_error";try{const r=(await e.json())._embedded["fx:errors"][0].code;"string"==typeof r&&(t=r)}catch(e){}throw[t]}}get __mfaSecretCode(){var e;const t=null===(e=this.form.credential)||void 0===e?void 0:e.mfa_secret_code;if(t)return t;const r="mfa_required",i=this.errors.find((e=>e.startsWith(r)));return null==i?void 0:i.replace(r,"").trim()}}customElements.define("foxy-sign-in-form",_);export{_ as SignInForm};
1
+ import"./shared-51919259.js";import"./shared-ac44a3a5.js";import"./shared-1d03ea56.js";import"./shared-297155d9.js";import"./shared-24998349.js";import"./shared-a6cf5b1f.js";import"./shared-c1b71162.js";import"./shared-ed24a3f9.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{_ as e}from"./shared-7fec42f2.js";import{h as t}from"./shared-ba5c42c7.js";import{C as r}from"./shared-c782b9fa.js";import{N as i}from"./shared-da95bb48.js";import{T as n,a as o}from"./shared-387d7254.js";import{c as a}from"./shared-4e709717.js";import{i as s}from"./shared-53e42a77.js";import{v as l}from"./shared-b738ee96.js";import"./shared-3bc9eaf7.js";import"./shared-dc357e9d.js";import"./shared-db758d3b.js";import"./shared-ab9dfa48.js";import"./shared-46efbc40.js";import"./shared-3db3f3c3.js";import"./shared-a1cfe9d5.js";import"./shared-0ea750af.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){var i,n;void 0===(n="function"==typeof(i=function(){for(var e=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],t=/^\d*$/,r=/^[A-Za-z0-9 $%*+\-./:]*$/,i=/^[A-Z0-9 $%*+\-./:]*$/,n=[],o=[-1],a=0,s=1;a<255;++a)n.push(s),o[s]=a,s=2*s^(s>=128?285:0);var l=[[]];for(a=0;a<30;++a){for(var d=l[a],u=[],c=0;c<=a;++c){var f=c<a?n[d[c]]:0,h=n[(a+(d[c-1]||0))%255];u.push(o[f^h])}l.push(u)}var p={};for(a=0;a<45;++a)p["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(a)]=a;var m=[function(e,t){return(e+t)%2==0},function(e,t){return e%2==0},function(e,t){return t%3==0},function(e,t){return(e+t)%3==0},function(e,t){return((e/2|0)+(t/3|0))%2==0},function(e,t){return e*t%2+e*t%3==0},function(e,t){return(e*t%2+e*t%3)%2==0},function(e,t){return((e+t)%2+e*t%3)%2==0}],v=function(e){return e>6},b=function(t,r){var i=-8&function(t){var r=e[t],i=16*t*t+128*t+64;return v(t)&&(i-=36),r[2].length&&(i-=25*r[2].length*r[2].length-10*r[2].length-55),i}(t),n=e[t];return i-8*n[0][r]*n[1][r]},g=function(e,t){switch(t){case 1:return e<10?10:e<27?12:14;case 2:return e<10?9:e<27?11:13;case 4:return e<10?8:16;case 8:return e<10?8:e<27?10:12}},y=function(e,t,r){var i=b(e,r)-4-g(e,t);switch(t){case 1:return 3*(i/10|0)+(i%10<4?0:i%10<7?1:2);case 2:return 2*(i/11|0)+(i%11<6?0:1);case 4:return i/8|0;case 8:return i/13|0}},_=function(e,t){for(var r=e.slice(0),i=e.length,a=t.length,s=0;s<a;++s)r.push(0);for(s=0;s<i;){var l=o[r[s++]];if(l>=0)for(var d=0;d<a;++d)r[s+d]^=n[(l+t[d])%255]}return r.slice(i)},w=function(e,t,r,i){for(var n=e<<i,o=t-1;o>=0;--o)n>>i+o&1&&(n^=r<<o);return e<<i|n},$=function(e,t,r){for(var i=m[r],n=e.length,o=0;o<n;++o)for(var a=0;a<n;++a)t[o][a]||(e[o][a]^=i(o,a));return e},S=function(e,t,r,i){for(var n=e.length,o=21522^w(r<<3|i,5,1335,10),a=0;a<15;++a){var s=[n-1,n-2,n-3,n-4,n-5,n-6,n-7,n-8,7,5,4,3,2,1,0][a];e[[0,1,2,3,4,5,7,8,n-7,n-6,n-5,n-4,n-3,n-2,n-1][a]][8]=e[8][s]=o>>a&1}return e},x=function(e){for(var t=function(e){for(var t=0,r=0;r<e.length;++r)e[r]>=5&&(t+=e[r]-5+3);for(r=5;r<e.length;r+=2){var i=e[r];e[r-1]==i&&e[r-2]==3*i&&e[r-3]==i&&e[r-4]==i&&(e[r-5]>=4*i||e[r+1]>=4*i)&&(t+=40)}return t},r=e.length,i=0,n=0,o=0;o<r;++o){var a,s=e[o];a=[0];for(var l=0;l<r;){for(d=0;l<r&&s[l];++d)++l;for(a.push(d),d=0;l<r&&!s[l];++d)++l;a.push(d)}for(i+=t(a),a=[0],l=0;l<r;){var d;for(d=0;l<r&&e[l][o];++d)++l;for(a.push(d),d=0;l<r&&!e[l][o];++d)++l;a.push(d)}i+=t(a);var u=e[o+1]||[];for(n+=s[0],l=1;l<r;++l){var c=s[l];n+=c,s[l-1]==c&&u[l]===c&&u[l-1]===c&&(i+=3)}}return i+10*(Math.abs(n/r/r-.5)/.05|0)},j=function(t,r,i,n,o){var a=e[r],s=function(e,t,r,i){var n=[],o=0,a=8,s=r.length,l=function(e,t){if(t>=a){for(n.push(o|e>>(t-=a));t>=8;)n.push(e>>(t-=8)&255);o=0,a=8}t>0&&(o|=(e&(1<<t)-1)<<(a-=t))},d=g(e,t);switch(l(t,4),l(s,d),t){case 1:for(var u=2;u<s;u+=3)l(parseInt(r.substring(u-2,u+1),10),10);l(parseInt(r.substring(u-2),10),[0,4,7][s%3]);break;case 2:for(u=1;u<s;u+=2)l(45*p[r.charAt(u-1)]+p[r.charAt(u)],11);s%2==1&&l(p[r.charAt(u-1)],6);break;case 4:for(u=0;u<s;++u)l(r[u],8)}for(l(0,4),a<8&&n.push(o);n.length+1<i;)n.push(236,17);return n.length<i&&n.push(236),n}(r,i,t,b(r,n)>>3);s=function(e,t,r){for(var i=[],n=e.length/t|0,o=0,a=t-e.length%t,s=0;s<a;++s)i.push(o),o+=n;for(s=a;s<t;++s)i.push(o),o+=n+1;i.push(o);var l=[];for(s=0;s<t;++s)l.push(_(e.slice(i[s],i[s+1]),r));var d=[],u=e.length/t|0;for(s=0;s<u;++s)for(var c=0;c<t;++c)d.push(e[i[c]+s]);for(c=a;c<t;++c)d.push(e[i[c+1]-1]);for(s=0;s<r.length;++s)for(c=0;c<t;++c)d.push(l[c][s]);return d}(s,a[1][n],l[a[0][n]]);var d=function(t){for(var r=e[t],i=function(e){return 4*e+17}(t),n=[],o=[],a=0;a<i;++a)n.push([]),o.push([]);var s=function(e,t,r,i,a){for(var s=0;s<r;++s)for(var l=0;l<i;++l)n[e+s][t+l]=a[s]>>l&1,o[e+s][t+l]=1};for(s(0,0,9,9,[127,65,93,93,93,65,383,0,64]),s(i-8,0,8,9,[256,127,65,93,93,93,65,127]),s(0,i-8,9,8,[254,130,186,186,186,130,254,0,0]),a=9;a<i-8;++a)n[6][a]=n[a][6]=1&~a,o[6][a]=o[a][6]=1;var l=r[2],d=l.length;for(a=0;a<d;++a)for(var u=0==a?d-1:d,c=0==a||a==d-1?1:0;c<u;++c)s(l[a],l[c],5,5,[31,17,21,17,31]);if(v(t)){var f=w(t,6,7973,12),h=0;for(a=0;a<6;++a)for(c=0;c<3;++c)n[a][i-11+c]=n[i-11+c][a]=f>>h++&1,o[a][i-11+c]=o[i-11+c][a]=1}return{matrix:n,reserved:o}}(r),u=d.matrix,c=d.reserved;if(function(e,t,r){for(var i=e.length,n=0,o=-1,a=i-1;a>=0;a-=2){6==a&&--a;for(var s=o<0?i-1:0,l=0;l<i;++l){for(var d=a;d>a-2;--d)t[s][d]||(e[s][d]=r[n>>3]>>(7&~n)&1,++n);s+=o}o=-o}}(u,c,s),o<0){$(u,c,0),S(u,0,n,0);var f=0,h=x(u);for($(u,c,0),o=1;o<8;++o){$(u,c,o),S(u,0,n,o);var m=x(u);h>m&&(h=m,f=o),$(u,c,o)}o=f}return $(u,c,o),S(u,0,n,o),u},k={generate:function(e,n){var o=(n=n||{}).version||-1,a={L:1,M:0,Q:3,H:2}[(n.ecclevel||"L").toUpperCase()],s=n.mode?{numeric:1,alphanumeric:2,octet:4}[n.mode.toLowerCase()]:-1,l="mask"in n?n.mask:-1;if(s<0)s="string"==typeof e?e.match(t)?1:e.match(i)?2:4:4;else if(1!=s&&2!=s&&4!=s)throw"invalid or unsupported mode";if(null===(e=function(e,i){switch(e){case 1:return i.match(t)?i:null;case 2:return i.match(r)?i.toUpperCase():null;case 4:if("string"==typeof i){for(var n=[],o=0;o<i.length;++o){var a=i.charCodeAt(o);a<128?n.push(a):a<2048?n.push(192|a>>6,128|63&a):a<65536?n.push(224|a>>12,128|a>>6&63,128|63&a):n.push(240|a>>18,128|a>>12&63,128|a>>6&63,128|63&a)}return n}return i}}(s,e)))throw"invalid data format";if(a<0||a>3)throw"invalid ECC level";if(o<0){for(o=1;o<=40&&!(e.length<=y(o,s,a));++o);if(o>40)throw"too large data"}else if(o<1||o>40)throw"invalid version";if(-1!=l&&(l<0||l>8))throw"invalid mask";return j(e,o,s,a,l)},generateHTML:function(e,t){t=t||{};for(var r=k.generate(e,t),i=Math.max(t.modulesize||5,.5),n=t.unit||"px",o=t.ratio||1,a=Math.max(null!==t.margin?t.margin:4,0),s=document.createElement("div"),l=r.length,d=['<table border="0" cellspacing="0" cellpadding="0" style="border:'+i*a+'px solid #fff;background:#fff">'],u=0;u<l;++u){d.push("<tr>");for(var c=0;c<l;++c){const e="px"!==n?"width:"+i*o+n+"; height:"+i*o+n:"width:"+i+"px;height:"+i+"px";console.log("generateHTML",{unit:n,ratio:o,modsize:i,size:e}),d.push('<td style="'+e+(r[u][c]?";background:#000":"")+'" part="'+(r[u][c]?"module-fg":"module-bg")+'" ></td>')}d.push("</tr>")}return s.className="qrcode",s.innerHTML=d.join("")+"</table>",s},generateSVG:function(e,t){t=t||{};var r=k.generate(e,t),i=r.length,n=Math.max(t.modulesize||5,.5),o=Math.max(null!==t.margin?t.margin:4,0),a=n*(i+2*o),s=' class= "fg" width="'+n+'" height="'+n+'"/>',l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 "+a+" "+a),l.setAttribute("style","shape-rendering:crispEdges"),t.modulesize&&(l.setAttribute("width",a),l.setAttribute("height",a));for(var d=["<style scoped>.bg{fill:#FFF}.fg{fill:#000}</style>",'<rect class="bg" x="0" y="0"','width="'+a+'" height="'+a+'"/>'],u=o*n,c=0;c<i;++c){for(var f=o*n,h=0;h<i;++h)r[c][h]&&d.push('<rect x="'+f+'" y="'+u+'"',s),f+=n;u+=n}return l.innerHTML=d.join(""),l},generatePNG:function(e,t){t=t||{};var r,i=k.generate(e,t),n=Math.max(t.modulesize||5,.5),o=Math.max(null!==t.margin?t.margin:4,0),a=i.length,s=n*(a+2*o),l=document.createElement("canvas");if(l.width=l.height=s,!(r=l.getContext("2d")))throw"canvas support is needed for PNG output";r.fillStyle="#fff",r.fillRect(0,0,s,s),r.fillStyle="#000";for(var d=0;d<a;++d)for(var u=0;u<a;++u)i[d][u]&&r.fillRect(n*(o+u),n*(o+d),n,n);return l.toDataURL()}};return k})?i.apply(t,[]):i)||(e.exports=n)},function(e,t,r){r.r(t);var i=r(0),n=r.n(i);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,n=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!==o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===o(n)?n:String(n)),i)}var n}function s(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,h(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),f(i,e)})(e)}function u(e,t,r){return(u=c()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&f(n,r.prototype),n}).apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(p,e);var t,r,i,o,d,u=(t=p,r=c(),function(){var e,i=h(t);if(r){var n=h(this).constructor;e=Reflect.construct(i,arguments,n)}else e=i.apply(this,arguments);return s(this,e)});function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=u.call(this))._defineProperty=e._defineProperty.bind(l(e)),e.attachShadow({mode:"open"}),Object.keys(p.defaultAttributes).map(e._defineProperty),e}return i=p,d=[{key:"defaultAttributes",get:function(){return{data:null,format:"png",modulesize:5,margin:4,unit:"px",ratio:1}}},{key:"observedAttributes",get:function(){return Object.keys(p.defaultAttributes)}}],(o=[{key:"attributeChangedCallback",value:function(e,t,r){var i=this[e+"Changed"];i&&"function"==typeof i&&i.call(this,t,r),this.generate()}},{key:"_defineProperty",value:function(e){var t=this;Object.defineProperty(this,e,{get:function(){var r=t.getAttribute(e);return null===r?p.defaultAttributes[e]:r},set:function(r){t.setAttribute(e,r)}})}},{key:"getOptions",value:function(){var e=this.modulesize,t=this.margin,r=this.unit,i=this.ratio;return{margin:null!==t?parseInt(t):t,modulesize:null!==e?parseInt(e):e,unit:r||"px",ratio:i||1}}},{key:"generate",value:function(){try{this.clear(),null!==this.data?"png"===this.format?this.generatePNG():"html"===this.format?this.generateHTML():"svg"===this.format?this.generateSVG():this.shadowRoot.textContent="qr-code: ".concat(this.format," not supported!"):this.shadowRoot.textContent="qr-code: no data!"}catch(e){console.error(e),this.shadowRoot.textContent="qr-code: error!"}}},{key:"generatePNG",value:function(){var e=document.createElement("img");e.src=n.a.generatePNG(this.data,this.getOptions()),e.setAttribute("part","img"),this.shadowRoot.appendChild(e)}},{key:"generateHTML",value:function(){var e=n.a.generateHTML(this.data,this.getOptions()).firstChild;e.setAttribute("part","table"),this.shadowRoot.appendChild(e)}},{key:"generateSVG",value:function(){var e=n.a.generateSVG(this.data,this.getOptions());e.setAttribute("part","svg"),this.shadowRoot.appendChild(e)}},{key:"clear",value:function(){for(;this.shadowRoot.lastChild;)this.shadowRoot.removeChild(this.shadowRoot.lastChild)}}])&&a(i.prototype,o),d&&a(i,d),Object.defineProperty(i,"prototype",{writable:!1}),p}(d(HTMLElement));customElements.get("qr-code")||customElements.define("qr-code",p)}]);let d,u,c,f,h,p,m,v,b,g=e=>e;const y=n(r(o(i,"sign-in-form")));class _ extends y{constructor(){super(...arguments),this.issuer="Unknown",this.__autofillPoller=null,this.__emailValidator=()=>!this.errors.some((e=>e.startsWith("email"))),this.__passwordValidator=()=>!this.errors.some((e=>e.startsWith("password"))),this.__newPasswordValidator=()=>!this.errors.some((e=>e.startsWith("new_password")&&!e.endsWith("_error"))),this.__mfaTotpCodeValidator=()=>!this.errors.some((e=>e.startsWith("mfa_totp_code")&&!e.endsWith("_error"))),this.__renderEmail=()=>{var e;const{disabledSelector:r,readonlySelector:i,errors:n}=this,o=n.find((e=>e.startsWith("email"))),a=null==o?void 0:o.replace("email","v8n"),l=a?this.t(a).toString():"",u=this.in("busy");return t(d||(d=g` <div> ${0} <vaadin-email-field error-message="${0}" data-testid="email" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @keydown="${0}" @input="${0}"> </vaadin-email-field> ${0} </div> `),this.renderTemplateOrSlot("email:before"),l,this.t("email").toString(),s(null===(e=this.form.credential)||void 0===e?void 0:e.email),u||r.matches("email",!0),i.matches("email",!0),this.__emailValidator,(e=>"Enter"===e.key&&this.submit()),(e=>{var t,r;const i=e.target.value,n=null!==(r=null===(t=this.form.credential)||void 0===t?void 0:t.password)&&void 0!==r?r:"";this.edit({credential:{email:i,password:n},type:"password"})}),this.renderTemplateOrSlot("email:after"))},this.__renderPassword=()=>{var e;const{disabledSelector:r,readonlySelector:i,errors:n}=this,o=n.find((e=>e.startsWith("password"))),a=null==o?void 0:o.replace("password","v8n"),l=a?this.t(a).toString():"",d=this.in("busy");return t(u||(u=g` <div> ${0} <vaadin-password-field error-message="${0}" data-testid="password" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @keydown="${0}" @input="${0}"> </vaadin-password-field> ${0} </div> `),this.renderTemplateOrSlot("password:before"),l,this.t("password").toString(),s(null===(e=this.form.credential)||void 0===e?void 0:e.password),d||r.matches("password",!0),i.matches("password",!0),this.__passwordValidator,(e=>"Enter"===e.key&&this.submit()),(e=>{var t,r;const i=null!==(r=null===(t=this.form.credential)||void 0===t?void 0:t.email)&&void 0!==r?r:"",n=e.target.value;this.edit({credential:{email:i,password:n},type:"password"})}),this.renderTemplateOrSlot("password:after"))},this.__renderNewPassword=()=>{var e;const{disabledSelector:r,readonlySelector:i,errors:n}=this,o=n.find((e=>e.startsWith("new_password")&&!e.endsWith("_error"))),a=null==o?void 0:o.replace("new_password","v8n"),l=a?this.t(a).toString():"",d=this.in("busy");return t(c||(c=g` <div> ${0} <vaadin-password-field error-message="${0}" data-testid="new-password" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @keydown="${0}" @input="${0}"> </vaadin-password-field> ${0} </div> `),this.renderTemplateOrSlot("new-password:before"),l,this.t("new_password").toString(),s(null===(e=this.form.credential)||void 0===e?void 0:e.new_password),d||r.matches("new-password",!0),i.matches("new-password",!0),this.__newPasswordValidator,(e=>"Enter"===e.key&&this.submit()),(e=>{var t,r,i,n;this.edit({type:"password",credential:{email:null!==(r=null===(t=this.form.credential)||void 0===t?void 0:t.email)&&void 0!==r?r:"",password:null!==(n=null===(i=this.form.credential)||void 0===i?void 0:i.password)&&void 0!==n?n:"",new_password:e.target.value}})}),this.renderTemplateOrSlot("new-password:after"))},this.__renderMfaTotpCode=()=>{var r;const{disabledSelector:i,readonlySelector:n,errors:o}=this,a=this.__mfaSecretCode,l="mfa_totp_code",d="mfa-totp-code",u=o.find((e=>e.startsWith(l)&&!e.endsWith("_error"))),c=null==u?void 0:u.replace(l,"v8n"),h=c?this.t(c).toString():"",p=this.in("busy");return t(f||(f=g` <div> ${0} <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="123456" data-testid="${0}" class="w-full mb-m" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" autofocus @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot(`${d}:before`),h,a?this.t("mfa_totp_code_hint"):"",d,this.t(l).toString(),s(null===(r=this.form.credential)||void 0===r?void 0:r.mfa_totp_code),p||i.matches(d,!0),n.matches(d,!0),this.__mfaTotpCodeValidator,(e=>"Enter"===e.key&&this.submit()),(t=>{const r=t.target.value,i=e(e({},this.form.credential),{},{mfa_totp_code:r});a&&(i.mfa_secret_code=a),this.edit({type:"password",credential:i})}),this.renderTemplateOrSlot(`${d}:after`))},this.__renderMfaSecretCode=()=>{var e,r;const i="mfa-secret-code",n=this.__mfaSecretCode,o=encodeURIComponent(this.issuer),a=encodeURIComponent(null!==(r=null===(e=this.form.credential)||void 0===e?void 0:e.email)&&void 0!==r?r:""),s=new URL(`otpauth://totp/${o}:${a}`);return s.searchParams.set("secret",n),s.searchParams.set("issuer",this.issuer),t(h||(h=g` <div> ${0} <div data-testid="${0}" class="flex space-x-m overflow-hidden rounded border p-m mb-m border-contrast-10" style="background:#fff;color:#000"> <qr-code modulesize="2" margin="0" format="svg" class="inline-flex" data="${0}"> </qr-code> <div class="break-all font-medium leading-s text-xs tracking-widest"> ${0} </div> </div> ${0} </div> `),this.renderTemplateOrSlot(`${i}:before`),i,s.toString(),n,this.renderTemplateOrSlot(`${i}:after`))},this.__renderMfaRememberDevice=()=>{var r;const{__mfaSecretCode:i,form:n,lang:o,ns:a}=this,s="mfa-remember-device",l=this.in("busy")||this.disabledSelector.matches(s,!0);return t(p||(p=g` <div> ${0} <vaadin-checkbox data-testid="${0}" class="mb-m" ?disabled="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n class="block" lang="${0}" key="mfa_remember_device" ns="${0}"></foxy-i18n> <foxy-i18n class="block text-xs ${0}" lang="${0}" key="mfa_remember_device_hint" ns="${0}"> </foxy-i18n> </vaadin-checkbox> ${0} </div> `),this.renderTemplateOrSlot(`${s}:before`),s,l,!!(null===(r=n.credential)||void 0===r?void 0:r.mfa_remember_device),(t=>{var r,o;const a=t.currentTarget,s=e(e({},n.credential),{},{mfa_remember_device:a.checked,mfa_totp_code:null!==(o=null===(r=n.credential)||void 0===r?void 0:r.mfa_totp_code)&&void 0!==o?o:""});i&&(s.mfa_secret_code=i),this.edit({credential:s})}),o,a,l?"text-disabled":"text-secondary",o,a,this.renderTemplateOrSlot(`${s}:after`))},this.__renderError=()=>t(m||(m=g` <div> ${0} <p class="leading-s flex items-start text-s rounded p-s bg-error-10 text-error"> <iron-icon class="flex-shrink-0 mr-s icon-inline text-l" icon="lumo:error"></iron-icon> <foxy-i18n data-testid="error" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </p> ${0} </div> `),this.renderTemplateOrSlot("error:before"),this.lang,this.errors[0],this.ns,this.renderTemplateOrSlot("error:after")),this.__renderSubmit=()=>{const e=this.in({idle:{snapshot:{dirty:"valid"}}})||this.in({idle:{snapshot:{clean:"valid"}}})||this.in({idle:{template:{dirty:"valid"}}})||this.in({idle:{template:{clean:"valid"}}});return t(v||(v=g` <div> ${0} <vaadin-button data-testid="submit" class="w-full mt-m" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="sign_in"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),!e||this.in("busy")||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.ns,this.lang,this.renderTemplateOrSlot("submit:after"))}}static get properties(){return e(e({},super.properties),{},{issuer:{type:String}})}static get v8n(){return[({credential:e})=>!!(null==e?void 0:e.email)||"email_required",({credential:e})=>{var t;return l(null!==(t=null==e?void 0:e.email)&&void 0!==t?t:"")||"email_invalid_email"},({credential:e})=>!!(null==e?void 0:e.password)||"password_required",({credential:e})=>{var t;return 0!==(null===(t=null==e?void 0:e.new_password)||void 0===t?void 0:t.length)||"new_password_required"},({credential:e})=>{var t;return 0!==(null===(t=null==e?void 0:e.mfa_totp_code)||void 0===t?void 0:t.length)||"mfa_totp_code_required"}]}render(){var e,r,i,n;const{hiddenSelector:o,errors:s,lang:l,form:d,ns:u}=this,c=this.__mfaSecretCode,f=null===(e=d.credential)||void 0===e?void 0:e.mfa_totp_code,h=!!c||!!f||s.some((e=>e.startsWith("mfa"))),p="string"==typeof(null===(r=this.form.credential)||void 0===r?void 0:r.new_password)||s.some((e=>e.startsWith("new_password_"))),m=!h&&!f||o.matches("mfa-totp-code",!0),v=!h||h&&c||o.matches("mfa-remember-device",!0),y=!c||o.matches("mfa-secret-code",!0),_=h||o.matches("new-password",!0),w=s.some((e=>e.endsWith("_error"))),$=this.in("busy");return t(b||(b=g` <main aria-live="polite" aria-busy="${0}" class="relative font-lumo text-m leading-m"> ${0} ${0} ${0} ${0} ${0} ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="busy" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </main> `),$,o.matches("email",!0)?"":this.__renderEmail(),h||o.matches("password",!0)?"":this.__renderPassword(),_||!p?"":this.__renderNewPassword(),m?"":this.__renderMfaTotpCode(),y?"":this.__renderMfaSecretCode(),v?"":this.__renderMfaRememberDevice(),o.matches("error",!0)||!w?"":this.__renderError(),o.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!$}),l,u,null!==(n=null===(i=customElements.get("foxy-spinner"))||void 0===i?void 0:i.defaultNS)&&void 0!==n?n:"")}connectedCallback(){super.connectedCallback(),null!==this.__autofillPoller&&window.clearInterval(this.__autofillPoller),this.__autofillPoller=window.setInterval((()=>{this.renderRoot.querySelectorAll("vaadin-text-field, vaadin-email-field, vaadin-password-field").forEach((e=>{var t;const r=null!==(t=e.getAttribute("value"))&&void 0!==t?t:"";e.value!==r&&e.dispatchEvent(new InputEvent("input"))}))}),250)}disconnectedCallback(){super.disconnectedCallback(),null!==this.__autofillPoller&&window.clearInterval(this.__autofillPoller)}async _sendPost(e){const t=JSON.stringify(e),r=await this._fetch(this.parent,{body:t,method:"POST"}),n=i.Rumour(this.group),o=[...this.related,this.parent];return n.share({data:r,related:o,source:r._links.self.href}),r}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t="unknown_error";try{const r=(await e.json())._embedded["fx:errors"][0].code;"string"==typeof r&&(t=r)}catch(e){}throw[t]}}get __mfaSecretCode(){var e;const t=null===(e=this.form.credential)||void 0===e?void 0:e.mfa_secret_code;if(t)return t;const r="mfa_required",i=this.errors.find((e=>e.startsWith(r)));return null==i?void 0:i.replace(r,"").trim()}}customElements.define("foxy-sign-in-form",_);export{_ as SignInForm};
@@ -1,4 +1,4 @@
1
- import"./shared-ad8d209a.js";import"./shared-9884fb7d.js";import"./shared-1b4a3e56.js";import{_ as t}from"./shared-7fec42f2.js";import{h as e,L as s,s as i}from"./shared-ba5c42c7.js";import{I as r}from"./shared-0ea750af.js";import{a as o,T as a}from"./shared-a89e8a07.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";let n,c,l,d,p,h,x=t=>t;const m=o(a(r(s)),"spinner");class f extends m{constructor(){super(...arguments),this.layout="horizontal",this.state="busy"}static get properties(){return t(t({},super.properties),{},{layout:{type:String},state:{type:String}})}render(){let t,s,r,o;return"end"===this.state?(s=e(n||(n=x`<iron-icon data-testid="icon" icon="icons:done-all"></iron-icon>`)),r="loading_end",o="text-tertiary"):"error"===this.state?(s=e(c||(c=x`<iron-icon data-testid="icon" icon="icons:error-outline"></iron-icon>`)),r="loading_error",o="text-error"):"paused"===this.state?(s=e(l||(l=x`<iron-icon data-testid="icon" icon="icons:more-horiz"></iron-icon>`)),r="loading_paused",o="text-tertiary"):"empty"===this.state?(s=e(d||(d=x`<iron-icon data-testid="icon" icon="icons:info-outline"></iron-icon>`)),r="loading_empty",o="text-tertiary"):(s=i(p||(p=x`
1
+ import"./shared-c1b71162.js";import"./shared-a1cfe9d5.js";import"./shared-64210e53.js";import{_ as t}from"./shared-7fec42f2.js";import{h as e,L as s,s as i}from"./shared-ba5c42c7.js";import{I as r}from"./shared-0ea750af.js";import{a as o,T as n}from"./shared-387d7254.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";let a,c,l,d,p,h,x=t=>t;const m=o(n(r(s)),"spinner");class f extends m{constructor(){super(...arguments),this.layout="horizontal",this.state="busy"}static get properties(){return t(t({},super.properties),{},{layout:{type:String},state:{type:String}})}render(){let t,s,r,o;return"end"===this.state?(s=e(a||(a=x`<iron-icon data-testid="icon" icon="icons:done-all"></iron-icon>`)),r="loading_end",o="text-tertiary"):"error"===this.state?(s=e(c||(c=x`<iron-icon data-testid="icon" icon="icons:error-outline"></iron-icon>`)),r="loading_error",o="text-error"):"paused"===this.state?(s=e(l||(l=x`<iron-icon data-testid="icon" icon="icons:more-horiz"></iron-icon>`)),r="loading_paused",o="text-tertiary"):"empty"===this.state?(s=e(d||(d=x`<iron-icon data-testid="icon" icon="icons:info-outline"></iron-icon>`)),r="loading_empty",o="text-tertiary"):(s=i(p||(p=x`
2
2
  <svg data-testid="icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 22 22" preserveAspectRatio="xMidYMid" class="animate-spin h-full w-full">
3
3
  <circle cx="11" cy="11" fill="none" stroke="#e15b64" stroke-width="2" r="8" stroke-dasharray="24 12" class="stroke-current"></circle>
4
4
  </svg>
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{_ as s}from"./shared-7fec42f2.js";import{a as r}from"./shared-a89e8a07.js";import{T as e}from"./shared-7d1512e1.js";import{c as a}from"./shared-4e709717.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let i,o,d=s=>s;const m=r(e,"store-card");class p extends m{constructor(){super(...arguments),this.defaultDomain=null}static get properties(){return s(s({},super.properties),{},{defaultDomain:{attribute:"default-domain"}})}renderBody(){return super.renderBody({title:s=>t(i||(i=d`${0}`),s.store_name),subtitle:s=>{const r=this.defaultDomain,e=null==s?void 0:s.store_domain;return t(o||(o=d` <span aria-label="${0}" style="width:.55em;height:.55em" class="${0}"></span> ${0} `),this.t("status_"+(s.is_active?"active":"inactive")),a({"inline-block flex-shrink-0 rounded-full":!0,"bg-success":s.is_active,"border border-contrast-50":!s.is_active}),(null==e?void 0:e.includes("."))||!r?e:`${e}.${r}`)}})}}customElements.define("foxy-store-card",p);export{p as StoreCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-64210e53.js";import{_ as s}from"./shared-7fec42f2.js";import{a as e}from"./shared-387d7254.js";import{T as r}from"./shared-15a7e329.js";import{c as t}from"./shared-4e709717.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-c1b71162.js";import"./shared-3db3f3c3.js";import"./shared-3bc9eaf7.js";import"./shared-a1cfe9d5.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-264fb8a2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let i,o,d=s=>s;const m=e(r,"store-card");class p extends m{constructor(){super(...arguments),this.defaultDomain=null}static get properties(){return s(s({},super.properties),{},{defaultDomain:{attribute:"default-domain"}})}renderBody(){return super.renderBody({title:s=>a(i||(i=d`${0}`),s.store_name),subtitle:s=>{const e=this.defaultDomain,r=null==s?void 0:s.store_domain;return a(o||(o=d` <span aria-label="${0}" style="width:.55em;height:.55em" class="${0}"></span> ${0} `),this.t("status_"+(s.is_active?"active":"inactive")),t({"inline-block flex-shrink-0 rounded-full":!0,"bg-success":s.is_active,"border border-contrast-50":!s.is_active}),(null==r?void 0:r.includes("."))||!e?r:`${r}.${e}`)}})}}customElements.define("foxy-store-card",p);export{p as StoreCard};