@foxy.io/elements 1.38.0-beta.2 → 1.38.0-beta.3

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 (221) 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 +2 -2
  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-api.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +11 -11
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +2 -2
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +3 -3
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-nucleon-element.js +1 -1
  71. package/dist/cdn/foxy-pagination.js +1 -1
  72. package/dist/cdn/foxy-passkey-card.js +1 -1
  73. package/dist/cdn/foxy-passkey-form.js +1 -1
  74. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  75. package/dist/cdn/foxy-payment-card.js +1 -1
  76. package/dist/cdn/foxy-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  83. package/dist/cdn/foxy-payments-api.js +1 -1
  84. package/dist/cdn/foxy-query-builder.js +1 -1
  85. package/dist/cdn/foxy-report-form.js +1 -1
  86. package/dist/cdn/foxy-reports-table.js +1 -1
  87. package/dist/cdn/foxy-shipment-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  92. package/dist/cdn/foxy-sign-in-form.js +1 -1
  93. package/dist/cdn/foxy-spinner.js +2 -2
  94. package/dist/cdn/foxy-store-card.js +1 -1
  95. package/dist/cdn/foxy-store-form.js +1 -1
  96. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +7 -7
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-aa45d4ec.js → shared-0164a1bb.js} +1 -1
  122. package/dist/cdn/{shared-57c3f0e4.js → shared-01fc874a.js} +1 -1
  123. package/dist/cdn/{shared-d54b3216.js → shared-0881a17c.js} +1 -1
  124. package/dist/cdn/{shared-893ead61.js → shared-099c2c3a.js} +1 -1
  125. package/dist/cdn/{shared-2db8d17c.js → shared-0a177e2c.js} +1 -1
  126. package/dist/cdn/shared-0aedd809.js +1 -0
  127. package/dist/cdn/{shared-8e36bcc1.js → shared-0ba8919d.js} +1 -1
  128. package/dist/cdn/{shared-dc6eb904.js → shared-1643e28d.js} +1 -1
  129. package/dist/cdn/{shared-6555fd71.js → shared-17b9f264.js} +1 -1
  130. package/dist/cdn/{shared-322ae633.js → shared-188614a4.js} +1 -1
  131. package/dist/cdn/{shared-82e82908.js → shared-1d0839af.js} +1 -1
  132. package/dist/cdn/{shared-d8cab6ab.js → shared-234b03f8.js} +2 -2
  133. package/dist/cdn/{shared-3691a26f.js → shared-243e3357.js} +1 -1
  134. package/dist/cdn/{shared-f6e9eda6.js → shared-25b175fb.js} +1 -1
  135. package/dist/cdn/{shared-17a61265.js → shared-2aa23b5f.js} +1 -1
  136. package/dist/cdn/{shared-812c706e.js → shared-3d276862.js} +1 -1
  137. package/dist/cdn/{shared-f61e5463.js → shared-3ff5c3d1.js} +2 -2
  138. package/dist/cdn/{shared-cba2b787.js → shared-4070a0d5.js} +1 -1
  139. package/dist/cdn/{shared-efecf1ca.js → shared-424970b6.js} +1 -1
  140. package/dist/cdn/{shared-569db166.js → shared-427529a8.js} +1 -1
  141. package/dist/cdn/shared-4a38cb3e.js +1 -0
  142. package/dist/cdn/{shared-bd941702.js → shared-516205e7.js} +1 -1
  143. package/dist/cdn/{shared-7e9fdf64.js → shared-5592ec6e.js} +1 -1
  144. package/dist/cdn/{shared-49e0541d.js → shared-58202132.js} +4 -4
  145. package/dist/cdn/{shared-ccc91a5f.js → shared-58400227.js} +1 -1
  146. package/dist/cdn/{shared-eeb2bd18.js → shared-5afb584d.js} +1 -1
  147. package/dist/cdn/shared-5e4a03d1.js +1 -0
  148. package/dist/cdn/{shared-fcdb896f.js → shared-5ef40e86.js} +1 -1
  149. package/dist/cdn/{shared-aab278b5.js → shared-5f157a83.js} +1 -1
  150. package/dist/cdn/{shared-c27ee44e.js → shared-62d05dde.js} +1 -1
  151. package/dist/cdn/{shared-3a446f14.js → shared-64ed7d2b.js} +1 -1
  152. package/dist/cdn/{shared-c2efc54e.js → shared-673d668a.js} +1 -1
  153. package/dist/cdn/{shared-1137b243.js → shared-6d8a44c7.js} +1 -1
  154. package/dist/cdn/{shared-2550f6d9.js → shared-704cd73c.js} +1 -1
  155. package/dist/cdn/{shared-58e7f6b1.js → shared-71f2c754.js} +1 -1
  156. package/dist/cdn/{shared-299543b6.js → shared-745bd2f4.js} +1 -1
  157. package/dist/cdn/{shared-019348d7.js → shared-7594e563.js} +1 -1
  158. package/dist/cdn/{shared-12a553c2.js → shared-7f7549aa.js} +1 -1
  159. package/dist/cdn/{shared-13d65f57.js → shared-844ab7a4.js} +1 -1
  160. package/dist/cdn/{shared-9f07fab6.js → shared-8650b26e.js} +1 -1
  161. package/dist/cdn/{shared-fcf6424c.js → shared-9127e26b.js} +1 -1
  162. package/dist/cdn/{shared-498ce88a.js → shared-9380d4fb.js} +1 -1
  163. package/dist/cdn/{shared-604261a0.js → shared-939a75a1.js} +1 -1
  164. package/dist/cdn/{shared-71f3226f.js → shared-93e5feba.js} +1 -1
  165. package/dist/cdn/{shared-4bcfe691.js → shared-988e3176.js} +1 -1
  166. package/dist/cdn/shared-994c7754.js +1 -0
  167. package/dist/cdn/{shared-9ca85d1e.js → shared-99a8889a.js} +1 -1
  168. package/dist/cdn/{shared-5a08dbb0.js → shared-9bd0911a.js} +1 -1
  169. package/dist/cdn/{shared-f2c4875b.js → shared-9ce51b25.js} +1 -1
  170. package/dist/cdn/{shared-dea71762.js → shared-9e6a97dd.js} +1 -1
  171. package/dist/cdn/{shared-85323ced.js → shared-a271467a.js} +1 -1
  172. package/dist/cdn/{shared-41aa53e0.js → shared-b3985d0a.js} +1 -1
  173. package/dist/cdn/{shared-6960ab99.js → shared-b3d72cd9.js} +1 -1
  174. package/dist/cdn/{shared-d4d11fb8.js → shared-b72066f8.js} +1 -1
  175. package/dist/cdn/{shared-2762e106.js → shared-b7a745ad.js} +1 -1
  176. package/dist/cdn/{shared-7d797451.js → shared-beba68ab.js} +1 -1
  177. package/dist/cdn/{shared-25a19cbe.js → shared-c0159ceb.js} +1 -1
  178. package/dist/cdn/{shared-166204e5.js → shared-c23fa7d5.js} +2 -2
  179. package/dist/cdn/{shared-1da49e3d.js → shared-c6624d27.js} +2 -2
  180. package/dist/cdn/{shared-6ef0392a.js → shared-c6f0f6b1.js} +1 -1
  181. package/dist/cdn/{shared-d1195c27.js → shared-cb58dfcd.js} +1 -1
  182. package/dist/cdn/{shared-a2693527.js → shared-cbd8c028.js} +1 -1
  183. package/dist/cdn/{shared-34119bbf.js → shared-d0fb346b.js} +1 -1
  184. package/dist/cdn/{shared-d199f862.js → shared-d1bf9a87.js} +2 -2
  185. package/dist/cdn/{shared-a2a27012.js → shared-d4e728a4.js} +1 -1
  186. package/dist/cdn/{shared-e6cd721f.js → shared-d5588203.js} +1 -1
  187. package/dist/cdn/{shared-3a3dc0d9.js → shared-d5961db8.js} +1 -1
  188. package/dist/cdn/{shared-f438f0f4.js → shared-d793edcb.js} +1 -1
  189. package/dist/cdn/{shared-59e22bc6.js → shared-d7dcb404.js} +1 -1
  190. package/dist/cdn/{shared-2bcdd0c6.js → shared-d888c826.js} +1 -1
  191. package/dist/cdn/{shared-1ba78e12.js → shared-daa5a8b2.js} +1 -1
  192. package/dist/cdn/{shared-674ba44d.js → shared-de7d816d.js} +1 -1
  193. package/dist/cdn/{shared-f3209496.js → shared-e18a194d.js} +1 -1
  194. package/dist/cdn/{shared-e1a6c036.js → shared-e3147d1a.js} +1 -1
  195. package/dist/cdn/{shared-aa211938.js → shared-e3b504c0.js} +1 -1
  196. package/dist/cdn/{shared-641786b2.js → shared-eb963ba3.js} +1 -1
  197. package/dist/cdn/{shared-56ba2d28.js → shared-ef4ad461.js} +1 -1
  198. package/dist/cdn/shared-f83207fb.js +1 -0
  199. package/dist/cdn/{shared-7c863df2.js → shared-fa5aa1c3.js} +1 -1
  200. package/dist/cdn/shared-ff8eb8a3.js +1 -0
  201. package/dist/cdn/translations/admin-subscription-form/en.json +4 -4
  202. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +1 -1
  203. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +19 -13
  204. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  205. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js +19 -40
  206. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js.map +1 -1
  207. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.d.ts +0 -1
  208. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js +0 -1
  209. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js.map +1 -1
  210. package/dist/elements/public/StoreForm/StoreForm.js +2 -2
  211. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  212. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +14 -10
  213. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  214. package/dist/mixins/themeable.js +0 -12
  215. package/dist/mixins/themeable.js.map +1 -1
  216. package/package.json +1 -1
  217. package/dist/cdn/shared-1aff7995.js +0 -1
  218. package/dist/cdn/shared-882a0fda.js +0 -1
  219. package/dist/cdn/shared-9cf15285.js +0 -1
  220. package/dist/cdn/shared-a1f85307.js +0 -1
  221. package/dist/cdn/shared-d1dfac4d.js +0 -1
@@ -1,4 +1,4 @@
1
- import{D as e}from"./shared-f61e5463.js";import{D as t,A as i,y as n}from"./shared-f2c4875b.js";const s=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._setTheme(i)}},a=t=>class extends(s(t)){static finalize(){super.finalize();const e=this.prototype._template,t=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,i=Object.getPrototypeOf(this.prototype)._template;i&&!t&&Array.from(i.content.querySelectorAll("style[include]")).forEach((t=>{this._includeStyle(t.getAttribute("include"),e)})),this._includeMatchingThemes(e)}static _includeMatchingThemes(t){const i=e.prototype.modules;let n=!1;const s=this.is+"-default-theme";Object.keys(i).sort(((e,t)=>{const i=0===e.indexOf("vaadin-"),n=0===t.indexOf("vaadin-"),s=["lumo-","material-"],a=s.filter((t=>0===e.indexOf(t))).length>0,o=s.filter((e=>0===t.indexOf(e))).length>0;return i!==n?i?-1:1:a!==o?a?-1:1:0})).forEach((e=>{if(e!==s){const s=i[e].getAttribute("theme-for");s&&s.split(" ").forEach((i=>{new RegExp("^"+i.split("*").join(".*")+"$").test(this.is)&&(n=!0,this._includeStyle(e,t))}))}})),!n&&i[s]&&this._includeStyle(s,t)}static _includeStyle(e,t){if(t&&!t.content.querySelector(`style[include="${e}"]`)){const i=document.createElement("style");i.setAttribute("include",e),t.content.appendChild(i)}}}
1
+ import{D as e}from"./shared-3ff5c3d1.js";import{D as t,A as i,y as n}from"./shared-9ce51b25.js";const s=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._setTheme(i)}},a=t=>class extends(s(t)){static finalize(){super.finalize();const e=this.prototype._template,t=this.template&&this.template.parentElement&&this.template.parentElement.id===this.is,i=Object.getPrototypeOf(this.prototype)._template;i&&!t&&Array.from(i.content.querySelectorAll("style[include]")).forEach((t=>{this._includeStyle(t.getAttribute("include"),e)})),this._includeMatchingThemes(e)}static _includeMatchingThemes(t){const i=e.prototype.modules;let n=!1;const s=this.is+"-default-theme";Object.keys(i).sort(((e,t)=>{const i=0===e.indexOf("vaadin-"),n=0===t.indexOf("vaadin-"),s=["lumo-","material-"],a=s.filter((t=>0===e.indexOf(t))).length>0,o=s.filter((e=>0===t.indexOf(e))).length>0;return i!==n?i?-1:1:a!==o?a?-1:1:0})).forEach((e=>{if(e!==s){const s=i[e].getAttribute("theme-for");s&&s.split(" ").forEach((i=>{new RegExp("^"+i.split("*").join(".*")+"$").test(this.is)&&(n=!0,this._includeStyle(e,t))}))}})),!n&&i[s]&&this._includeStyle(s,t)}static _includeStyle(e,t){if(t&&!t.content.querySelector(`style[include="${e}"]`)){const i=document.createElement("style");i.setAttribute("include",e),t.content.appendChild(i)}}}
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2020 Vaadin Ltd.
@@ -1 +1 @@
1
- import"./shared-a2693527.js";import{a as e}from"./shared-6960ab99.js";import{_ as t}from"./shared-d1195c27.js";import{c as s,h as i,s as r}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-d0aed1c1.js";let d,n,u,h,p,c,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(p||(p=v` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,this.prefix?i(c||(c=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),o(this._value),this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
1
+ import"./shared-cbd8c028.js";import{a as e}from"./shared-b3d72cd9.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as s,h as i,s as r}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as a}from"./shared-4e709717.js";import{l as o}from"./shared-d0aed1c1.js";let d,n,u,h,c,p,f,m,v=e=>e;customElements.define("foxy-internal-text-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},__isErrorVisible:{attribute:!1}})}static get styles(){return[super.styles,s(d||(d=v`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(n||(n=v` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?clear-button-visible="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} ${0} </vaadin-text-field> `),l(this._errorMessage),this.helperText,this.placeholder,this.label,!this.suffix,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.prefix?i(u||(u=v`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(h||(h=v`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderSummaryItemLayout(){return i(c||(c=v` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs" style="min-width:30%"> ${0} <input placeholder="${0}" class="${0}" type="text" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} <button aria-label="${0}" class="${0}" style="width:1em;height:1em" ?disabled="${0}" ?hidden="${0}" @click="${0}"> ${0} </button> </div> </div> `),this.label,this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage,this.prefix?i(p||(p=v`<div>${0}</div>`),this.prefix):"",this.placeholder,a({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),o(this._value),this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),this.suffix?i(f||(f=v`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.t("clear"),a({"rounded-full transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"cursor-pointer text-tertiary hover-text-body":!this.disabled,"cursor-default text-disabled":this.disabled}),this.disabled,this.readonly||!this._value,(()=>{this._value="",this.dispatchEvent(new CustomEvent("clear"))}),r(m||(m=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25); margin-right: -0.16em"><path d="M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" /></svg>`)))}});
@@ -0,0 +1 @@
1
+ import{a,a5 as r,am as n,ao as s}from"./shared-cb58dfcd.js";function t(t,e,i){if(!a(i))return!1;var o=typeof e;return!!("number"==o?r(i)&&n(e,i.length):"string"==o&&e in i)&&s(i[e],t)}export{t as i};
@@ -1,4 +1,4 @@
1
- import{ap as e,aq as t,ar as s,as as a,at as i,au as n,av as r,aw as l,o,ax as d,ay as A,az as u,aA as h,aB as c,aC as m,aD as p,m as v,_ as g,aE as y}from"./shared-d1195c27.js";import{a as b,F as _}from"./shared-893ead61.js";import"./shared-8e36bcc1.js";import"./shared-674ba44d.js";import"./shared-299543b6.js";import{T as f}from"./shared-a2693527.js";import"./shared-aab278b5.js";import"./shared-2bcdd0c6.js";import{d as x,P as w,A as E,c as k,h as C,L as S}from"./shared-ba5c42c7.js";import"./shared-1137b243.js";import"./shared-604261a0.js";import{p as $}from"./shared-5a08dbb0.js";import{a as I,y as T,x as B,z as M}from"./shared-f61e5463.js";import{I as V}from"./shared-17a61265.js";import{s as D}from"./shared-53e476fd.js";import{i as j}from"./shared-fcdb896f.js";import"./shared-d54b3216.js";import"./shared-3a446f14.js";import"./shared-13d65f57.js";import{h as L,P as Q}from"./shared-f2c4875b.js";import{E as P,T as R}from"./shared-efecf1ca.js";import{L as O}from"./shared-2db8d17c.js";import{C as q}from"./shared-25a19cbe.js";import{I as F}from"./shared-dea71762.js";import"./shared-34119bbf.js";import{O as N}from"./shared-1ba78e12.js";var U={raise:e,send:t,sendParent:s,sendUpdate:a,log:i,cancel:n,start:r,stop:l,assign:o,after:d,done:A,respond:u,forwardTo:h,escalate:c,choose:m,pure:p};const G=x((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof w)s[a]!==e&&t.setValue(e);else{if(!(t instanceof E))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends CustomEvent{constructor(e){super("change",{detail:e})}}class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class K extends Y{}class J extends H{}let z,Z,X=e=>e;class ee extends(I(V(S))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=$(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=$(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return g(g({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return k(z||(z=X`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return C(Z||(Z=X` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,G(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new J(this.value))}}const te=y({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:U.assign({defaultCustomValue:(e,t)=>t.data}),setValue:U.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:U.assign({custom:(e,t)=>t.data}),setItems:U.assign({items:(e,t)=>t.data}),setType:U.assign({type:(e,t)=>t.data}),setMin:U.assign({min:(e,t)=>t.data}),setMax:U.assign({max:(e,t)=>t.data})}});let se,ae,ie,ne,re,le,oe,de,Ae,ue,he,ce,me,pe,ve=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ye extends T{constructor(){super(...arguments),this.getText=e=>e,this.__service=j(te).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":ee,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,k(ie||(ie=ve`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return g(g({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=C(ne||(ne=ve` ${0} `),e.map(((e,a,i)=>{var n;const r=this.custom&&a===i.length-1,l=r?s:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=D({value:r?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===ge?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ge?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new W(this.value))}}),A=C(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():C(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return C(oe||(oe=ve` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return C(ae||(ae=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A):function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return C(se||(se=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A),e===ge&&s?this.__field:"",e!==ge?C(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return C(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=D({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new W(this.value))}});return"frequency"===this.type?C(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?C(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?C(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?C(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):C(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=L`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{ap as e,aq as t,ar as s,as as a,at as i,au as n,av as r,aw as l,o,ax as d,ay as A,az as u,aA as h,aB as c,aC as m,aD as p,m as v,_ as g,aE as y}from"./shared-cb58dfcd.js";import{a as b,F as _}from"./shared-099c2c3a.js";import"./shared-0ba8919d.js";import"./shared-de7d816d.js";import"./shared-745bd2f4.js";import{T as f}from"./shared-cbd8c028.js";import"./shared-5f157a83.js";import"./shared-d888c826.js";import{d as x,P as w,A as E,c as k,h as C,L as S}from"./shared-ba5c42c7.js";import"./shared-6d8a44c7.js";import"./shared-939a75a1.js";import{p as $}from"./shared-9bd0911a.js";import{a as I,y as T,x as B,z as M}from"./shared-3ff5c3d1.js";import{I as V}from"./shared-2aa23b5f.js";import{s as D}from"./shared-53e476fd.js";import{i as j}from"./shared-5ef40e86.js";import"./shared-0881a17c.js";import"./shared-64ed7d2b.js";import"./shared-844ab7a4.js";import{h as L,P as Q}from"./shared-9ce51b25.js";import{E as P,T as R}from"./shared-424970b6.js";import{L as O}from"./shared-0a177e2c.js";import{C as q}from"./shared-c0159ceb.js";import{I as F}from"./shared-9e6a97dd.js";import"./shared-d0fb346b.js";import{O as N}from"./shared-daa5a8b2.js";var U={raise:e,send:t,sendParent:s,sendUpdate:a,log:i,cancel:n,start:r,stop:l,assign:o,after:d,done:A,respond:u,forwardTo:h,escalate:c,choose:m,pure:p};const G=x((e=>t=>{const{element:s,name:a,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof w)s[a]!==e&&t.setValue(e);else{if(!(t instanceof E))throw new Error("live directive can only be used on attributes or properties");s.getAttribute(a)!==e&&t.setValue(e)}}));class W extends CustomEvent{constructor(e){super("change",{detail:e})}}class H extends CustomEvent{constructor(e){super("change",{detail:e})}}class Y extends CustomEvent{constructor(e){super("change",{detail:e})}}class K extends Y{}class J extends H{}let z,Z,X=e=>e;class ee extends(I(V(S))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:s}=$(e);return[t.toString(),s]}},this.__getItems=v((e=>{const t=$(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return g(g({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return k(z||(z=X`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return C(Z||(Z=X` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,G(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new J(this.value))}}const te=y({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:U.assign({defaultCustomValue:(e,t)=>t.data}),setValue:U.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:U.assign({custom:(e,t)=>t.data}),setItems:U.assign({items:(e,t)=>t.data}),setType:U.assign({type:(e,t)=>t.data}),setMin:U.assign({min:(e,t)=>t.data}),setMax:U.assign({max:(e,t)=>t.data})}});let se,ae,ie,ne,re,le,oe,de,Ae,ue,he,ce,me,pe,ve=e=>e;const ge=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class ye extends T{constructor(){super(...arguments),this.getText=e=>e,this.__service=j(te).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":ee,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,k(ie||(ie=ve`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return g(g({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ge]:this.items,t=Array.isArray(this.value),s=this.__service.state.matches("extension.present.selected"),a=C(ne||(ne=ve` ${0} `),e.map(((e,a,i)=>{var n;const r=this.custom&&a===i.length-1,l=r?s:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),o=this.disabled||!this._isI18nReady,d=D({value:r?ge:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":o,"@change":t=>{if(this.readonly)return t.preventDefault();const s=t.target.checked,a=e===ge?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ge?s?[...i,a]:i.slice(0,i.length-1):s?[a,...i]:i.filter((e=>e!==a)):this.value=s?a:null,this.dispatchEvent(new W(this.value))}}),A=C(re||(re=ve` <div> ${0} </div> `),e===ge?this._t("choice.other").toString():C(le||(le=ve`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return C(oe||(oe=ve` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),a?"":"hidden",t?function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} transform ${s?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return C(ae||(ae=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A):function(e,t,s,a,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${s?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return C(se||(se=ve` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?s?"bg-primary-50":"bg-contrast-10":s?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,s,a,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,o,l,d,A),e===ge&&s?this.__field:"",e!==ge?C(de||(de=ve`<slot name="${0}"></slot>`),e):"")})));return C(Ae||(Ae=ve`<form>${0}</form> `),a)}get __field(){const e=D({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new W(this.value))}});return"frequency"===this.type?C(ue||(ue=ve`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?C(he||(he=ve`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?C(ce||(ce=ve`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?C(me||(me=ve`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):C(pe||(pe=ve`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}const be=L`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import{A as e}from"./shared-d1195c27.js";import{F as s}from"./shared-343d1fd7.js";class t extends e{constructor(e){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((o,r)=>{var a;const d="string"==typeof n[0]?new t.WHATWGRequest(...n):n[0];if(d.headers.set("FOXY-API-VERSION","1"),["POST","PATCH","PUT"].includes(d.method)){const e="string"==typeof n[0]?null===(a=n[1])||void 0===a?void 0:a.headers:n[0].headers;null===new t.WHATWGHeaders(e).get("Content-Type")&&d.headers.set("Content-Type","application/json")}const c=new s("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:d,resolve:o,reject:r});e.dispatchEvent(c),c.defaultPrevented||o(new Response(null,{status:500}))}))})}}t.FetchEvent=s;export{t as A};
1
+ import{A as e}from"./shared-cb58dfcd.js";import{F as s}from"./shared-343d1fd7.js";class t extends e{constructor(e){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((o,r)=>{var a;const d="string"==typeof n[0]?new t.WHATWGRequest(...n):n[0];if(d.headers.set("FOXY-API-VERSION","1"),["POST","PATCH","PUT"].includes(d.method)){const e="string"==typeof n[0]?null===(a=n[1])||void 0===a?void 0:a.headers:n[0].headers;null===new t.WHATWGHeaders(e).get("Content-Type")&&d.headers.set("Content-Type","application/json")}const c=new s("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:d,resolve:o,reject:r});e.dispatchEvent(c),c.defaultPrevented||o(new Response(null,{status:500}))}))})}}t.FetchEvent=s;export{t as A};
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./shared-d1195c27.js";import{T as t}from"./shared-aa45d4ec.js";import{a as s}from"./shared-f61e5463.js";import{p as a}from"./shared-882a0fda.js";let n,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(n||(n=l`
1
+ import{_ as e}from"./shared-cb58dfcd.js";import{T as t}from"./shared-0164a1bb.js";import{a as s}from"./shared-3ff5c3d1.js";import{p as n}from"./shared-ff8eb8a3.js";let a,o,i,r,l=e=>e;class c extends(s(t,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:t=>{const s=t.data._embedded["fx:transaction_template"],o=`${s.total_order} ${s.currency_code}`;return t.html(a||(a=l`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n frequencies"
4
4
  class="font-medium text-m font-tnum"
@@ -8,7 +8,7 @@ import{_ as e}from"./shared-d1195c27.js";import{T as t}from"./shared-aa45d4ec.js
8
8
  .options=${0}
9
9
  >
10
10
  </foxy-i18n>
11
- `),t.lang,".5m"===t.data.frequency?"twice_a_month":"recurring",t.ns,e(e({},a(t.data.frequency)),{},{amount:o}))}},c.summaryColumn={cell:e=>{const t=e.data._embedded["fx:transaction_template"]._embedded["fx:items"],s={most_expensive_item:[...t].sort(((e,t)=>e.price-t.price))[0],count_minus_one:t.length-1,count:t.length};return e.html(o||(o=l`
11
+ `),t.lang,".5m"===t.data.frequency?"twice_a_month":"recurring",t.ns,e(e({},n(t.data.frequency)),{},{amount:o}))}},c.summaryColumn={cell:e=>{const t=e.data._embedded["fx:transaction_template"]._embedded["fx:items"],s={most_expensive_item:[...t].sort(((e,t)=>e.price-t.price))[0],count_minus_one:t.length-1,count:t.length};return e.html(o||(o=l`
12
12
  <foxy-i18n
13
13
  data-testclass="i18n summaries"
14
14
  class="text-m"
@@ -18,7 +18,7 @@ import{_ as e}from"./shared-d1195c27.js";import{T as t}from"./shared-aa45d4ec.js
18
18
  .options=${0}
19
19
  >
20
20
  </foxy-i18n>
21
- `),e.lang,e.ns,s)}},c.statusColumn={hideBelow:"sm",cell:({ns:e,lang:t,data:s,html:a})=>{let n,o,r="bg-contrast-5 text-secondary";if(s.first_failed_transaction_date)r="bg-error-10 text-error",n=s.first_failed_transaction_date,o="subscription_failed";else if(s.end_date){n=s.end_date;o=new Date(s.end_date).getTime()>Date.now()?"subscription_will_be_cancelled":"subscription_cancelled"}else s.is_active?new Date(s.start_date)>new Date?(n=s.start_date,o="subscription_will_be_active"):(r="bg-success-10 text-success",n=s.next_transaction_date,o="subscription_active"):(n="",o="subscription_inactive");return a(i||(i=l`
21
+ `),e.lang,e.ns,s)}},c.statusColumn={hideBelow:"sm",cell:({ns:e,lang:t,data:s,html:n})=>{let a,o,r="bg-contrast-5 text-secondary";if(s.first_failed_transaction_date)r="bg-error-10 text-error",a=s.first_failed_transaction_date,o="subscription_failed";else if(s.end_date){a=s.end_date;o=new Date(s.end_date).getTime()>Date.now()?"subscription_will_be_cancelled":"subscription_cancelled"}else s.is_active?new Date(s.start_date)>new Date?(a=s.start_date,o="subscription_will_be_active"):(r="bg-success-10 text-success",a=s.next_transaction_date,o="subscription_active"):(a="",o="subscription_inactive");return n(i||(i=l`
22
22
  <foxy-i18n
23
23
  data-testclass="i18n statuses"
24
24
  class="px-s py-xs text-m font-medium block whitespace-normal rounded ${0}"
@@ -28,7 +28,7 @@ import{_ as e}from"./shared-d1195c27.js";import{T as t}from"./shared-aa45d4ec.js
28
28
  .options=${0}
29
29
  >
30
30
  </foxy-i18n>
31
- `),r,t,o,e,{date:n})}},c.subTokenURLColumn={cell:e=>e.html(r||(r=l`
31
+ `),r,t,o,e,{date:a})}},c.subTokenURLColumn={cell:e=>e.html(r||(r=l`
32
32
  <a
33
33
  data-testclass="links"
34
34
  target="_blank"
@@ -1 +1 @@
1
- import"./shared-299543b6.js";import"./shared-a2693527.js";import"./shared-aab278b5.js";import"./shared-1137b243.js";import"./shared-604261a0.js";import{a as e}from"./shared-6960ab99.js";import{_ as t}from"./shared-d1195c27.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> </div> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))))}});
1
+ import"./shared-745bd2f4.js";import"./shared-cbd8c028.js";import"./shared-5f157a83.js";import"./shared-6d8a44c7.js";import"./shared-939a75a1.js";import{a as e}from"./shared-b3d72cd9.js";import{_ as t}from"./shared-cb58dfcd.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="flex items-start gap-m leading-xs"> <div> <label class="text-m text-body" for="input">${0}</label> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> <div class="flex-1 flex items-center gap-xs"> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${0} </select> </div> </div> </div> `),this.label,this.helperText,this.disabled||this.readonly,this._errorMessage,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget;this._value=this.__i18n.formatValue([t.value,r])}),o({"relative rounded-s transition-colors transition-opacity":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))))}});
@@ -1 +1 @@
1
- import{B as e,_ as t}from"./shared-d1195c27.js";import{h as r}from"./shared-ba5c42c7.js";import{i as s}from"./shared-53e42a77.js";let o,i,n=e=>e;const l=l=>class extends l{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=e.False,this.disabled=!1,this.disabledControls=e.False,this.hidden=!1,this.hiddenControls=e.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return t(t({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())}})}get readonlySelector(){return this.readonly?e.True:this.readonlyControls}get disabledSelector(){return this.disabled?e.True:this.disabledControls}get hiddenSelector(){return this.hidden?e.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(e=!1){const r=e?{}:t({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,t){const l=null!=e?e:"default",d=this.templates[l];if(!d)return r(o||(o=n`<slot name="${0}"></slot>`),s(e));return r(i||(i=n` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),l,(()=>{try{const e=null!=t?t:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(r,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(t){if(super.applyInferredProperties(t),null===this.infer)return;const r=t.get("disabledSelector"),s=t.get("disabled"),o=t.get("readonlySelector"),i=t.get("readonly"),n=t.get("hiddenSelector"),l=t.get("hidden"),d=t.get("templates"),a=t.get("mode"),h=e.True.toString(),c=(e,t)=>e.toString()===h||null!=t&&t,u=t=>{var r;return null!==(r=this.infer?null==t?void 0:t.zoom(this.infer):t)&&void 0!==r?r:e.False};this.disabledControls=u(r),this.disabled=c(this.disabledControls,s),this.readonlyControls=u(o),this.readonly=c(this.readonlyControls,i),this.hiddenControls=u(n),this.hidden=c(this.hiddenControls,l),this.templates=null!=d?d:{},this.infer&&(this.templates=this.getNestedTemplates(this.infer)),this.mode=null!=a?a:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{l as C};
1
+ import{B as e,_ as t}from"./shared-cb58dfcd.js";import{h as r}from"./shared-ba5c42c7.js";import{i as s}from"./shared-53e42a77.js";let o,i,n=e=>e;const l=l=>class extends l{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=e.False,this.disabled=!1,this.disabledControls=e.False,this.hidden=!1,this.hiddenControls=e.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return t(t({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())}})}get readonlySelector(){return this.readonly?e.True:this.readonlyControls}get disabledSelector(){return this.disabled?e.True:this.disabledControls}get hiddenSelector(){return this.hidden?e.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(e=!1){const r=e?{}:t({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,t){const l=null!=e?e:"default",d=this.templates[l];if(!d)return r(o||(o=n`<slot name="${0}"></slot>`),s(e));return r(i||(i=n` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),l,(()=>{try{const e=null!=t?t:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(r,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(t){if(super.applyInferredProperties(t),null===this.infer)return;const r=t.get("disabledSelector"),s=t.get("disabled"),o=t.get("readonlySelector"),i=t.get("readonly"),n=t.get("hiddenSelector"),l=t.get("hidden"),d=t.get("templates"),a=t.get("mode"),h=e.True.toString(),c=(e,t)=>e.toString()===h||null!=t&&t,u=t=>{var r;return null!==(r=this.infer?null==t?void 0:t.zoom(this.infer):t)&&void 0!==r?r:e.False};this.disabledControls=u(r),this.disabled=c(this.disabledControls,s),this.readonlyControls=u(o),this.readonly=c(this.readonlyControls,i),this.hiddenControls=u(n),this.hidden=c(this.hiddenControls,l),this.templates=null!=d?d:{},this.infer&&(this.templates=this.getNestedTemplates(this.infer)),this.mode=null!=a?a:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{l as C};
@@ -0,0 +1 @@
1
+ import{a as t,a4 as r,a5 as e,a6 as n,a7 as o,a8 as a,r as c,a9 as u,aa as s,ab as i,ac as f,ad as b,ae as j,af as y,ag as v,ah as p,h as l,ai as d,aj as A,ak as w,al as g}from"./shared-cb58dfcd.js";import{b as h,a as m}from"./shared-7594e563.js";function O(t){return t}var x=Object.create,S=function(){function r(){}return function(e){if(!t(e))return{};if(x)return x(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}();function U(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}function I(t,r,e,n){var o=!e;e||(e={});for(var a=-1,c=r.length;++a<c;){var u=r[a],s=n?n(e[u],t[u],u,e,t):void 0;void 0===s&&(s=t[u]),o?h(e,u,s):m(e,u,s)}return e}var F=Object.prototype.hasOwnProperty;function B(e){if(!t(e))return function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}(e);var n=r(e),o=[];for(var a in e)("constructor"!=a||!n&&F.call(e,a))&&o.push(a);return o}function E(t){return e(t)?n(t,!0):B(t)}var M=o(Object.getPrototypeOf,Object);var D="object"==typeof exports&&exports&&!exports.nodeType&&exports,P=D&&"object"==typeof module&&module&&!module.nodeType&&module,k=P&&P.exports===D?c.Buffer:void 0,C=k?k.allocUnsafe:void 0;function L(t,r){if(r)return t.slice();var e=t.length,n=C?C(e):new t.constructor(e);return t.copy(n),n}var N=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)i(r,u(t)),t=M(t);return r}:s;function R(t){return f(t,E,N)}var T=Object.prototype.hasOwnProperty;function V(t){var r=new t.constructor(t.byteLength);return new b(r).set(new b(t)),r}var G=/\w*$/;var W=j?j.prototype:void 0,$=W?W.valueOf:void 0;function q(t,r){var e=r?V(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var z="[object Boolean]",H="[object Date]",J="[object Map]",K="[object Number]",Q="[object RegExp]",X="[object Set]",Y="[object String]",Z="[object Symbol]",_="[object ArrayBuffer]",tt="[object DataView]",rt="[object Float32Array]",et="[object Float64Array]",nt="[object Int8Array]",ot="[object Int16Array]",at="[object Int32Array]",ct="[object Uint8Array]",ut="[object Uint8ClampedArray]",st="[object Uint16Array]",it="[object Uint32Array]";function ft(t,r,e){var n,o,a,c=t.constructor;switch(r){case _:return V(t);case z:case H:return new c(+t);case tt:return function(t,r){var e=r?V(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case rt:case et:case nt:case ot:case at:case ct:case ut:case st:case it:return q(t,e);case J:return new c;case K:case Y:return new c(t);case Q:return(a=new(o=t).constructor(o.source,G.exec(o))).lastIndex=o.lastIndex,a;case X:return new c;case Z:return n=t,$?Object($.call(n)):{}}}function bt(t){return"function"!=typeof t.constructor||r(t)?{}:S(M(t))}var jt=p&&p.isMap,yt=jt?l(jt):function(t){return y(t)&&"[object Map]"==v(t)};var vt=p&&p.isSet,pt=vt?l(vt):function(t){return y(t)&&"[object Set]"==v(t)},lt=1,dt=2,At=4,wt="[object Arguments]",gt="[object Function]",ht="[object GeneratorFunction]",mt="[object Object]",Ot={};function xt(r,e,n,o,c,s){var i,f=e&lt,b=e&dt,j=e&At;if(n&&(i=c?n(r,o,c,s):n(r)),void 0!==i)return i;if(!t(r))return r;var y=d(r);if(y){if(i=function(t){var r=t.length,e=new t.constructor(r);return r&&"string"==typeof t[0]&&T.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(r),!f)return U(r,i)}else{var p=v(r),l=p==gt||p==ht;if(A(r))return L(r,f);if(p==mt||p==wt||l&&!c){if(i=b||l?{}:bt(r),!f)return b?function(t,r){return I(t,N(t),r)}(r,function(t,r){return t&&I(r,E(r),t)}(i,r)):function(t,r){return I(t,u(t),r)}(r,function(t,r){return t&&I(r,a(r),t)}(i,r))}else{if(!Ot[p])return c?r:{};i=ft(r,p,f)}}s||(s=new w);var h=s.get(r);if(h)return h;s.set(r,i),pt(r)?r.forEach((function(t){i.add(xt(t,e,n,t,r,s))})):yt(r)&&r.forEach((function(t,o){i.set(o,xt(t,e,n,o,r,s))}));var O=y?void 0:(j?b?R:g:b?E:a)(r);return function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n&&!1!==r(t[e],e,t););}(O||r,(function(t,o){O&&(t=r[o=t]),m(i,o,xt(t,e,n,o,r,s))})),i}Ot[wt]=Ot["[object Array]"]=Ot["[object ArrayBuffer]"]=Ot["[object DataView]"]=Ot["[object Boolean]"]=Ot["[object Date]"]=Ot["[object Float32Array]"]=Ot["[object Float64Array]"]=Ot["[object Int8Array]"]=Ot["[object Int16Array]"]=Ot["[object Int32Array]"]=Ot["[object Map]"]=Ot["[object Number]"]=Ot[mt]=Ot["[object RegExp]"]=Ot["[object Set]"]=Ot["[object String]"]=Ot["[object Symbol]"]=Ot["[object Uint8Array]"]=Ot["[object Uint8ClampedArray]"]=Ot["[object Uint16Array]"]=Ot["[object Uint32Array]"]=!0,Ot["[object Error]"]=Ot[gt]=Ot["[object WeakMap]"]=!1;function St(t){return xt(t,5)}export{St as a,I as b,U as c,L as d,q as e,bt as f,M as g,O as i,E as k};
@@ -1 +1 @@
1
- import{p as t,q as e,s as n,u as i,v as r,w as s,x as o,y as a,z as h,C as c,D as u,E as d,F as l,G as f,H as p,I as v,J as y,K as w,L as x,M as b,N as m,O as g,P as E,Q as S,S as T,T as L,U as _,V as O,W as k,X as C,Y as N,Z as M,$ as z,a0 as D,a1 as P,a2 as I,a3 as R}from"./shared-d1195c27.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),F=new Map,U=0,j=function(){return"x:"+U++},X=function(t,e){return F.set(t,e),t},A=function(t){return F.get(t)},V=function(t){F.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,u=void 0!==h?h:e.id;this.id=u,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=j()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,u,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],u=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var d=e(t),l=d.next();!l.done;l=d.next()){u(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(u)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(u)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||d(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===v.Invoke){var E=y(u.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case f:this.stopChild(t.activity.id);break;case l:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
1
+ import{p as t,q as e,s as n,u as i,v as r,w as s,x as o,y as a,z as h,C as c,D as d,E as u,F as l,G as f,H as p,I as v,J as y,K as w,L as x,M as b,N as m,O as g,P as E,Q as S,S as T,T as L,U as _,V as O,W as k,X as C,Y as N,Z as M,$ as z,a0 as D,a1 as P,a2 as I,a3 as R}from"./shared-cb58dfcd.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),F=new Map,U=0,j=function(){return"x:"+U++},X=function(t,e){return F.set(t,e),t},A=function(t){return F.get(t)},V=function(t){F.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,d=void 0!==h?h:e.id;this.id=d,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=j()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,d,u,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){d={error:t}}finally{try{m&&!m.done&&(u=b.return)&&u.call(b)}finally{if(d)throw d.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,d,u,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){u={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(u)throw u.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],d=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var u=e(t),l=u.next();!l.done;l=u.next()){d(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(d)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(d)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||u(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var d=t.activity;if(!this.state.activities[d.id||d.type])break;if(d.type===v.Invoke){var E=y(d.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=d.id,L=d.data,_="autoForward"in d?d.autoForward:!!d.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(d);break;case f:this.stopChild(t.activity.id);break;case l:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
@@ -1,4 +1,4 @@
1
- import{h as e}from"./shared-f2c4875b.js";import{N as t}from"./shared-299543b6.js";
1
+ import{h as e}from"./shared-9ce51b25.js";import{N as t}from"./shared-745bd2f4.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2019 Vaadin Ltd.
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import{h as e,G as t,P as r}from"./shared-f2c4875b.js";import{E as o,T as i,D as s}from"./shared-efecf1ca.js";import{C as a}from"./shared-25a19cbe.js";import"./shared-59e22bc6.js";import{F as l}from"./shared-893ead61.js";import{a as n}from"./shared-6960ab99.js";import"./shared-5a08dbb0.js";import{_ as d}from"./shared-d1195c27.js";import{i as h}from"./shared-53e42a77.js";import{c,h as u}from"./shared-ba5c42c7.js";import{c as p}from"./shared-4e709717.js";import{x as b}from"./shared-f61e5463.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
1
+ import"./shared-0ba8919d.js";import{h as e,G as t,P as r}from"./shared-9ce51b25.js";import{E as o,T as i,D as s}from"./shared-424970b6.js";import{C as a}from"./shared-c0159ceb.js";import"./shared-d7dcb404.js";import{F as l}from"./shared-099c2c3a.js";import{a as n}from"./shared-b3d72cd9.js";import"./shared-9bd0911a.js";import{_ as d}from"./shared-cb58dfcd.js";import{i as h}from"./shared-53e42a77.js";import{c,h as u}from"./shared-ba5c42c7.js";import{c as p}from"./shared-4e709717.js";import{x as b}from"./shared-3ff5c3d1.js";const m=e`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-8e36bcc1.js";import"./shared-e6cd721f.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-0ba8919d.js";import"./shared-d5588203.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);