@foxy.io/elements 1.18.0-beta.16 → 1.18.0-beta.17

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 (209) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-api-browser.js +3 -3
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  12. package/dist/cdn/foxy-coupon-card.js +1 -1
  13. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  15. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  16. package/dist/cdn/foxy-coupon-form.js +1 -1
  17. package/dist/cdn/foxy-custom-field-card.js +1 -1
  18. package/dist/cdn/foxy-custom-field-form.js +1 -1
  19. package/dist/cdn/foxy-customer-api.js +1 -1
  20. package/dist/cdn/foxy-customer-card.js +1 -1
  21. package/dist/cdn/foxy-customer-form.js +1 -1
  22. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  23. package/dist/cdn/foxy-customer-portal.js +1 -1
  24. package/dist/cdn/foxy-customer.js +1 -1
  25. package/dist/cdn/foxy-customers-table.js +1 -1
  26. package/dist/cdn/foxy-discount-builder.js +1 -1
  27. package/dist/cdn/foxy-discount-card.js +1 -1
  28. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  29. package/dist/cdn/foxy-donation.js +1 -1
  30. package/dist/cdn/foxy-email-template-card.js +1 -1
  31. package/dist/cdn/foxy-email-template-form.js +1 -1
  32. package/dist/cdn/foxy-error-entry-card.js +1 -1
  33. package/dist/cdn/foxy-form-dialog.js +1 -1
  34. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  35. package/dist/cdn/foxy-gift-card-card.js +1 -1
  36. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  37. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  38. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  39. package/dist/cdn/foxy-gift-card-form.js +1 -1
  40. package/dist/cdn/foxy-i18n-editor.js +2 -0
  41. package/dist/cdn/foxy-i18n.js +1 -1
  42. package/dist/cdn/foxy-integration-card.js +1 -1
  43. package/dist/cdn/foxy-integration-form.js +1 -1
  44. package/dist/cdn/foxy-item-card.js +1 -1
  45. package/dist/cdn/foxy-item-category-card.js +1 -1
  46. package/dist/cdn/foxy-item-category-form.js +1 -1
  47. package/dist/cdn/foxy-item-form.js +1 -1
  48. package/dist/cdn/foxy-item-option-card.js +1 -1
  49. package/dist/cdn/foxy-item-option-form.js +1 -1
  50. package/dist/cdn/foxy-items-form.js +1 -1
  51. package/dist/cdn/foxy-nucleon-element.js +1 -1
  52. package/dist/cdn/foxy-pagination.js +1 -1
  53. package/dist/cdn/foxy-payment-card.js +1 -1
  54. package/dist/cdn/foxy-payment-method-card.js +1 -1
  55. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  56. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  57. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  58. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  59. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  60. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  61. package/dist/cdn/foxy-payments-api.js +1 -1
  62. package/dist/cdn/foxy-query-builder.js +1 -1
  63. package/dist/cdn/foxy-report-form.js +2 -2
  64. package/dist/cdn/foxy-reports-table.js +1 -1
  65. package/dist/cdn/foxy-shipment-card.js +1 -1
  66. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  67. package/dist/cdn/foxy-sign-in-form.js +1 -1
  68. package/dist/cdn/foxy-spinner.js +2 -2
  69. package/dist/cdn/foxy-store-form.js +1 -1
  70. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  71. package/dist/cdn/foxy-subscription-card.js +1 -1
  72. package/dist/cdn/foxy-subscription-form.js +3 -3
  73. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  74. package/dist/cdn/foxy-table.js +1 -1
  75. package/dist/cdn/foxy-tax-card.js +1 -1
  76. package/dist/cdn/foxy-tax-form.js +1 -1
  77. package/dist/cdn/foxy-template-card.js +1 -1
  78. package/dist/cdn/foxy-template-config-form.js +1 -1
  79. package/dist/cdn/foxy-template-form.js +1 -1
  80. package/dist/cdn/foxy-template-set-card.js +1 -1
  81. package/dist/cdn/foxy-template-set-form.js +1 -1
  82. package/dist/cdn/foxy-transaction-card.js +1 -1
  83. package/dist/cdn/foxy-transaction.js +1 -1
  84. package/dist/cdn/foxy-transactions-table.js +1 -1
  85. package/dist/cdn/foxy-user-form.js +1 -1
  86. package/dist/cdn/foxy-users-table.js +1 -1
  87. package/dist/cdn/foxy-webhook-card.js +1 -1
  88. package/dist/cdn/foxy-webhook-form.js +1 -1
  89. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  90. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  91. package/dist/cdn/shared-002b788f.js +15 -0
  92. package/dist/cdn/{shared-4623f740.js → shared-0672e78b.js} +1 -1
  93. package/dist/cdn/{shared-afaa6139.js → shared-162fc285.js} +1 -1
  94. package/dist/cdn/{shared-3f4f362e.js → shared-1b3e1a0d.js} +1 -1
  95. package/dist/cdn/{shared-de385bdb.js → shared-2215e6c8.js} +5 -5
  96. package/dist/cdn/shared-236d9b7e.js +1 -0
  97. package/dist/cdn/{shared-03f7cc13.js → shared-29376ba1.js} +1 -1
  98. package/dist/cdn/{shared-ff13276c.js → shared-29e21467.js} +3 -3
  99. package/dist/cdn/{shared-00c585e4.js → shared-2c842660.js} +1 -1
  100. package/dist/cdn/{shared-23e0d67e.js → shared-2d3027f4.js} +1 -1
  101. package/dist/cdn/{shared-a0c09692.js → shared-2f1e04ae.js} +1 -1
  102. package/dist/cdn/{shared-788e5ff5.js → shared-34b11d34.js} +1 -1
  103. package/dist/cdn/{shared-5714d3a4.js → shared-3a3878c9.js} +1 -1
  104. package/dist/cdn/{shared-0ff5e59d.js → shared-40537775.js} +1 -1
  105. package/dist/cdn/{shared-b1b40832.js → shared-40d82f6b.js} +1 -1
  106. package/dist/cdn/{shared-28b09f69.js → shared-4457dc27.js} +1 -1
  107. package/dist/cdn/{shared-6822bc96.js → shared-4975f86f.js} +1 -1
  108. package/dist/cdn/{shared-77359cd0.js → shared-4c338ca6.js} +1 -1
  109. package/dist/cdn/shared-515f00b1.js +1 -0
  110. package/dist/cdn/{shared-b5120f1a.js → shared-5504f415.js} +2 -2
  111. package/dist/cdn/{shared-452a471d.js → shared-55e20d5b.js} +1 -1
  112. package/dist/cdn/{shared-a8966936.js → shared-5ad8c9a0.js} +1 -1
  113. package/dist/cdn/{shared-9f53978e.js → shared-5b55627c.js} +1 -1
  114. package/dist/cdn/{shared-c70b41e1.js → shared-6003864d.js} +1 -1
  115. package/dist/cdn/shared-6b8874a7.js +1 -0
  116. package/dist/cdn/shared-6bf8883f.js +1 -0
  117. package/dist/cdn/{shared-77970922.js → shared-6d2064e9.js} +3 -3
  118. package/dist/cdn/{shared-1d851ca7.js → shared-6e6ed30a.js} +1 -1
  119. package/dist/cdn/{shared-59d73648.js → shared-71deb26e.js} +1 -1
  120. package/dist/cdn/{shared-0a7b94ac.js → shared-74277a73.js} +1 -1
  121. package/dist/cdn/{shared-555ec39f.js → shared-7661b51a.js} +15 -15
  122. package/dist/cdn/{shared-3d0dc4a6.js → shared-7b167fe9.js} +1 -1
  123. package/dist/cdn/{shared-03d5434f.js → shared-85f9051e.js} +1 -1
  124. package/dist/cdn/{shared-684e229f.js → shared-8a5e01ae.js} +1 -1
  125. package/dist/cdn/{shared-7af4d4b6.js → shared-8d533e0c.js} +1 -1
  126. package/dist/cdn/shared-923da875.js +6 -0
  127. package/dist/cdn/shared-92926b1d.js +1 -0
  128. package/dist/cdn/{shared-17d5d718.js → shared-92bd849f.js} +1 -1
  129. package/dist/cdn/shared-a46a2f49.js +1 -0
  130. package/dist/cdn/{shared-f04dd7e9.js → shared-a86761d3.js} +2 -2
  131. package/dist/cdn/{shared-b97d9ae3.js → shared-ad8141c4.js} +1 -1
  132. package/dist/cdn/{shared-7bfd93b7.js → shared-b28dbc68.js} +27 -51
  133. package/dist/cdn/{shared-2ce65ad5.js → shared-b5cbbdd8.js} +1 -1
  134. package/dist/cdn/{shared-15278fe0.js → shared-b7423eab.js} +1 -1
  135. package/dist/cdn/{shared-760538ac.js → shared-b7f7f15f.js} +1 -1
  136. package/dist/cdn/{shared-e4bc532a.js → shared-b8e9b536.js} +1 -1
  137. package/dist/cdn/{shared-ecd289b3.js → shared-bb522838.js} +1 -1
  138. package/dist/cdn/{shared-1e9dc71f.js → shared-bd194cdf.js} +1 -1
  139. package/dist/cdn/{shared-a98a6602.js → shared-c484320b.js} +1 -1
  140. package/dist/cdn/{shared-08d6d02b.js → shared-c52d3772.js} +1 -1
  141. package/dist/cdn/{shared-debbc076.js → shared-cced7800.js} +1 -1
  142. package/dist/cdn/{shared-b617fde5.js → shared-cfec6ec1.js} +1 -1
  143. package/dist/cdn/{shared-9195959e.js → shared-d302ad2c.js} +1 -1
  144. package/dist/cdn/{shared-e6bff624.js → shared-d43fc5cc.js} +1 -1
  145. package/dist/cdn/shared-dc798bf4.js +1 -0
  146. package/dist/cdn/{shared-4a796610.js → shared-dcbf57e0.js} +1 -1
  147. package/dist/cdn/{shared-8cb76c8b.js → shared-e119731e.js} +1 -1
  148. package/dist/cdn/shared-e396ec04.js +25 -0
  149. package/dist/cdn/{shared-0db7afef.js → shared-e3ce88dc.js} +12 -17
  150. package/dist/cdn/{shared-3b22a756.js → shared-ea316e64.js} +1 -1
  151. package/dist/cdn/{shared-b5b5c848.js → shared-ef0fc329.js} +1 -1
  152. package/dist/cdn/{shared-f43a5253.js → shared-f022673a.js} +7 -7
  153. package/dist/cdn/{shared-184945cc.js → shared-f23d122e.js} +3 -3
  154. package/dist/cdn/{shared-45c3705a.js → shared-f2d19582.js} +1 -1
  155. package/dist/cdn/{shared-0d697dd1.js → shared-facfe95a.js} +4 -4
  156. package/dist/cdn/{shared-779795c5.js → shared-ff2f84c7.js} +1 -1
  157. package/dist/cdn/translations/api-browser/en.json +1 -0
  158. package/dist/cdn/translations/i18n-editor/en.json +10 -0
  159. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +2 -0
  160. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +29 -17
  161. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
  162. package/dist/elements/public/ApiBrowser/ApiBrowser.d.ts +2 -1
  163. package/dist/elements/public/ApiBrowser/ApiBrowser.js +38 -15
  164. package/dist/elements/public/ApiBrowser/ApiBrowser.js.map +1 -1
  165. package/dist/elements/public/I18nEditor/I18nEditor.d.ts +18 -0
  166. package/dist/elements/public/I18nEditor/I18nEditor.js +173 -0
  167. package/dist/elements/public/I18nEditor/I18nEditor.js.map +1 -0
  168. package/dist/elements/public/I18nEditor/index.d.ts +7 -0
  169. package/dist/elements/public/I18nEditor/index.js +9 -0
  170. package/dist/elements/public/I18nEditor/index.js.map +1 -0
  171. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.d.ts +17 -0
  172. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +169 -0
  173. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -0
  174. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.d.ts +6 -0
  175. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js +8 -0
  176. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/index.js.map +1 -0
  177. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.d.ts +3 -0
  178. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js +2 -0
  179. package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/types.js.map +1 -0
  180. package/dist/elements/public/I18nEditor/types.d.ts +4 -0
  181. package/dist/elements/public/I18nEditor/types.js +2 -0
  182. package/dist/elements/public/I18nEditor/types.js.map +1 -0
  183. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +0 -2
  184. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -1
  185. package/dist/elements/public/StoreForm/StoreForm.js +2 -10
  186. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  187. package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +1 -0
  188. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +29 -18
  189. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -1
  190. package/dist/elements/public/TemplateSetForm/index.d.ts +1 -0
  191. package/dist/elements/public/TemplateSetForm/index.js +1 -0
  192. package/dist/elements/public/TemplateSetForm/index.js.map +1 -1
  193. package/dist/elements/public/index.d.ts +1 -0
  194. package/dist/elements/public/index.defined.d.ts +1 -0
  195. package/dist/elements/public/index.defined.js +1 -0
  196. package/dist/elements/public/index.defined.js.map +1 -1
  197. package/dist/elements/public/index.js +1 -0
  198. package/dist/elements/public/index.js.map +1 -1
  199. package/dist/mixins/responsive.js +3 -3
  200. package/dist/mixins/responsive.js.map +1 -1
  201. package/dist/mixins/themeable.js +264 -0
  202. package/dist/mixins/themeable.js.map +1 -1
  203. package/package.json +2 -2
  204. package/dist/cdn/shared-193a0fb1.js +0 -1
  205. package/dist/cdn/shared-2af327d0.js +0 -15
  206. package/dist/cdn/shared-a420358e.js +0 -1
  207. package/dist/cdn/shared-a83b38f1.js +0 -1
  208. package/dist/cdn/shared-d82f3ba0.js +0 -1
  209. package/dist/cdn/shared-f14201ed.js +0 -1
@@ -1,4 +1,4 @@
1
- import"./shared-a98a6602.js";import{h as c}from"./shared-08d6d02b.js";
1
+ import"./shared-c484320b.js";import{h as c}from"./shared-c52d3772.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import{_ as e}from"./shared-a8ced8bf.js";import{L as t,h as s}from"./shared-7f33a83a.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-2af327d0.js";import{A as d}from"./shared-a420358e.js";import{U as u,a as _}from"./shared-d6276c83.js";import{I as c}from"./shared-4f037e43.js";import{i as l}from"./shared-4a796610.js";function f(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,d,u,_,c;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(u=null===(d=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===d?void 0:d.self)||void 0===u?void 0:u.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(_=this.node)||void 0===_?void 0:_._links)&&void 0!==c?c:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),d=new URL(e);return a.searchParams.set("offset",o.length.toString()),d.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:d.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}let v,p=e=>e;class m extends(c(t)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__hrefToLoad=null,this.__group="",this.__fetchEventQueue=[],this.__service=l(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:t=>{const s=this.constructor.v8n,r=e(e({},t.data),t.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:t,edits:s}=this.__service.state.context;return e(e({},t),s)}get data(){return this.__service.state.context.data}set data(e){this.__service.send({type:"SET_DATA",data:e}),this.__hrefToLoad=null}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e,t,s;return null!==(s=null!==(t=null===(e=this.form._links)||void 0===e?void 0:e.self.href)&&void 0!==t?t:this.__hrefToLoad)&&void 0!==s?s:""}set href(e){e?(this.__hrefToLoad=e,this.__service.send({type:"FETCH"})):(this.__hrefToLoad=null,this.__service.send({type:"SET_DATA",data:null}))}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){var t;"string"==typeof(null===(t=e._links)||void 0===t?void 0:t.self.href)&&(this.__hrefToLoad=null),this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return s(v||(v=p`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new u)}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new d(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();try{const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=await this._fetch(s._links.self.href),i=m.Rumour(this.group),n=[...this.related,this.parent];return i.share({data:r,related:n,source:r._links.self.href}),r}finally{this.__createRumour()}}async _sendGet(){this.__destroyRumour();try{const e=await this._fetch(this.href);return m.Rumour(this.group).share({data:e,source:this.href}),e}finally{this.__createRumour()}}async _sendPatch(e){this.__destroyRumour();try{const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return m.Rumour(this.group).share({data:s,source:this.href,related:this.related}),s}finally{this.__createRumour()}}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=m.Rumour(this.group),t=[...this.related,this.parent];return e.share({data:null,source:this.href,related:t}),null}finally{this.__createRumour()}}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{var t,s;if(!e.changed)return;let r;e.matches("idle")&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?r=_.ResourceDeleted:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"creating"}))&&(r=_.ResourceCreated)),this.requestUpdate(),this.dispatchEvent(new u("update",{detail:{result:r}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new u)})),this.__service.start()}__createRumour(){const e=m.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new m.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=f(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.__service.state.matches("busy")||this.__processFetchEventQueue())))}}m.UpdateEvent=u,m.Rumour=i((()=>new h)),m.API=d;export{m as N,f as s};
1
+ import{_ as e}from"./shared-a8ced8bf.js";import{L as t,h as s}from"./shared-7f33a83a.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-002b788f.js";import{A as d}from"./shared-dc798bf4.js";import{U as u,a as _}from"./shared-d6276c83.js";import{I as c}from"./shared-4f037e43.js";import{i as l}from"./shared-dcbf57e0.js";function f(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,d,u,_,c;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(u=null===(d=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===d?void 0:d.self)||void 0===u?void 0:u.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(_=this.node)||void 0===_?void 0:_._links)&&void 0!==c?c:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),d=new URL(e);return a.searchParams.set("offset",o.length.toString()),d.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:d.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}let v,p=e=>e;class m extends(c(t)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__hrefToLoad=null,this.__group="",this.__fetchEventQueue=[],this.__service=l(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:t=>{const s=this.constructor.v8n,r=e(e({},t.data),t.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:t,edits:s}=this.__service.state.context;return e(e({},t),s)}get data(){return this.__service.state.context.data}set data(e){this.__service.send({type:"SET_DATA",data:e}),this.__hrefToLoad=null}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e,t,s;return null!==(s=null!==(t=null===(e=this.form._links)||void 0===e?void 0:e.self.href)&&void 0!==t?t:this.__hrefToLoad)&&void 0!==s?s:""}set href(e){e?(this.__hrefToLoad=e,this.__service.send({type:"FETCH"})):(this.__hrefToLoad=null,this.__service.send({type:"SET_DATA",data:null}))}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){var t;"string"==typeof(null===(t=e._links)||void 0===t?void 0:t.self.href)&&(this.__hrefToLoad=null),this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return s(v||(v=p`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new u)}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new d(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();try{const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=await this._fetch(s._links.self.href),i=m.Rumour(this.group),n=[...this.related,this.parent];return i.share({data:r,related:n,source:r._links.self.href}),r}finally{this.__createRumour()}}async _sendGet(){this.__destroyRumour();try{const e=await this._fetch(this.href);return m.Rumour(this.group).share({data:e,source:this.href}),e}finally{this.__createRumour()}}async _sendPatch(e){this.__destroyRumour();try{const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return m.Rumour(this.group).share({data:s,source:this.href,related:this.related}),s}finally{this.__createRumour()}}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=m.Rumour(this.group),t=[...this.related,this.parent];return e.share({data:null,source:this.href,related:t}),null}finally{this.__createRumour()}}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{var t,s;if(!e.changed)return;let r;e.matches("idle")&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?r=_.ResourceDeleted:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"creating"}))&&(r=_.ResourceCreated)),this.requestUpdate(),this.dispatchEvent(new u("update",{detail:{result:r}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new u)})),this.__service.start()}__createRumour(){const e=m.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new m.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=f(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.__service.state.matches("busy")||this.__processFetchEventQueue())))}}m.UpdateEvent=u,m.Rumour=i((()=>new h)),m.API=d;export{m as N,f as s};
@@ -1 +1 @@
1
- import{_ as t}from"./shared-a8ced8bf.js";import{h as e,L as s}from"./shared-7f33a83a.js";import{C as i}from"./shared-a8966936.js";import{a as r,T as o}from"./shared-ff13276c.js";import{c as n}from"./shared-4e709717.js";import{l as a}from"./shared-f3b35364.js";import{r as l}from"./shared-d519a301.js";import{I as d}from"./shared-4f037e43.js";let c,h,u,m=t=>t;const p=r(i(o(d(s))));class f extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=n({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),s=n({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return e(c||(c=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),l(this.items,(t=>t.value),((i,r)=>{var o;return e(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),s,null!==(o=i.label)&&void 0!==o?o:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),n({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),a(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:s})=>{if(!this.items.some((t=>t.value===s)))return e(u||(u=m`<option value="${0}">${0}</option>`),s,null!=t?t:s)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),n({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{f as E};
1
+ import{_ as t}from"./shared-a8ced8bf.js";import{h as e,L as s}from"./shared-7f33a83a.js";import{C as i}from"./shared-5ad8c9a0.js";import{a as r,T as o}from"./shared-29e21467.js";import{c as n}from"./shared-4e709717.js";import{l as a}from"./shared-f3b35364.js";import{r as l}from"./shared-d519a301.js";import{I as d}from"./shared-4f037e43.js";let c,h,u,m=t=>t;const p=r(i(o(d(s))));class f extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=n({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),s=n({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return e(c||(c=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),l(this.items,(t=>t.value),((i,r)=>{var o;return e(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),s,null!==(o=i.label)&&void 0!==o?o:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),n({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),a(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:s})=>{if(!this.items.some((t=>t.value===s)))return e(u||(u=m`<option value="${0}">${0}</option>`),s,null!=t?t:s)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),n({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{f as E};
@@ -1,4 +1,4 @@
1
- import{E as t,C as e,T as o}from"./shared-3d0dc4a6.js";import{h as r,G as i,P as a,b as s}from"./shared-08d6d02b.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
1
+ import{E as t,C as e,T as o}from"./shared-7b167fe9.js";import{h as r,G as i,P as a,b as s}from"./shared-c52d3772.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import{E as e,T as t}from"./shared-3d0dc4a6.js";import"./shared-de385bdb.js";import{h as s,P as r}from"./shared-08d6d02b.js";import{F as l}from"./shared-a98a6602.js";const i=s`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
1
+ import{E as e,T as t}from"./shared-7b167fe9.js";import"./shared-2215e6c8.js";import{h as s,P as r}from"./shared-c52d3772.js";import{F as l}from"./shared-c484320b.js";const i=s`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
2
2
  <template>
3
3
  <style include="lumo-required-field">
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-0db7afef.js";import{I as e}from"./shared-59d73648.js";import"./shared-4623f740.js";import{_ as t}from"./shared-a8ced8bf.js";import{h as s,f as r}from"./shared-7f33a83a.js";import{i as a}from"./shared-d3bf9ac0.js";let i,l,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.theme=null,this.__renderer=e=>{const t=this.options.map((({label:e,value:t})=>s(i||(i=n` <vaadin-item value="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"></foxy-i18n> </vaadin-item> `),t,this.lang,e,this.ns)));e.firstElementChild||e.appendChild(document.createElement("vaadin-list-box")),r(t,e.firstElementChild)}}static get properties(){return t(t({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return s(l||(l=n` <vaadin-select error-message="${0}" placeholder="${0}" helper-text="${0}" class="w-full -mt-m -mb-xs" label="${0}" theme="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .renderer="${0}" .value="${0}" @change="${0}"> </vaadin-select> `),a(this._errorMessage),this.placeholder,this.helperText,this.label,a(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.__renderer,this._value,(e=>{const t=e.currentTarget;this._value=t.value}))}updated(e){var t;super.updated(e),(e.has("ns")||e.has("lang")||e.has("options"))&&(null===(t=this.renderRoot.querySelector("vaadin-select"))||void 0===t||t.render())}});
1
+ import"./shared-e3ce88dc.js";import{I as e}from"./shared-71deb26e.js";import"./shared-0672e78b.js";import{_ as t}from"./shared-a8ced8bf.js";import{h as s,f as r}from"./shared-7f33a83a.js";import{i as a}from"./shared-d3bf9ac0.js";let i,l,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.theme=null,this.__renderer=e=>{const t=this.options.map((({label:e,value:t})=>s(i||(i=n` <vaadin-item value="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"></foxy-i18n> </vaadin-item> `),t,this.lang,e,this.ns)));e.firstElementChild||e.appendChild(document.createElement("vaadin-list-box")),r(t,e.firstElementChild)}}static get properties(){return t(t({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return s(l||(l=n` <vaadin-select error-message="${0}" placeholder="${0}" helper-text="${0}" class="w-full -mt-m -mb-xs" label="${0}" theme="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .renderer="${0}" .value="${0}" @change="${0}"> </vaadin-select> `),a(this._errorMessage),this.placeholder,this.helperText,this.label,a(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.__renderer,this._value,(e=>{const t=e.currentTarget;this._value=t.value}))}updated(e){var t;super.updated(e),(e.has("ns")||e.has("lang")||e.has("options"))&&(null===(t=this.renderRoot.querySelector("vaadin-select"))||void 0===t||t.render())}});
@@ -1,4 +1,4 @@
1
- import{f as e,M as t,c as s,n as i,d as n,g as r,V as o,j as l,k as a,l as h,u as c,m as d,o as u,w as _,p,E as f,G as m,q as y,r as g,s as b,D as C,t as v,v as x,x as w,P as S,y as P,z as E,e as I,A as O,h as A}from"./shared-08d6d02b.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-ff13276c.js";
1
+ import{f as e,M as t,c as s,n as i,d as n,g as r,V as o,j as l,k as a,l as h,u as c,m as d,o as u,w as _,p,E as f,G as m,q as y,r as g,s as b,D as C,t as v,v as x,x as w,P as S,y as P,z as E,e as I,A as O,h as A}from"./shared-c52d3772.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-29e21467.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-ff13276c.js";
1
+ import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-29e21467.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import{_ as e}from"./shared-a8ced8bf.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-a8966936.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-ff13276c.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-15278fe0.js";let n,o,h,c,m,u=e=>e;const p=l(s(a(i(d))));class b extends p{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{b as T};
1
+ import{_ as e}from"./shared-a8ced8bf.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-5ad8c9a0.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-29e21467.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-b7423eab.js";let n,o,h,c,m,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(c||(c=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(m||(m=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{p as T};
@@ -1,4 +1,4 @@
1
- import{E as e,C as t,T as r,D as o}from"./shared-3d0dc4a6.js";import{h as i,G as s,P as a}from"./shared-08d6d02b.js";import"./shared-de385bdb.js";import{F as n}from"./shared-a98a6602.js";import{I as l}from"./shared-59d73648.js";import"./shared-4623f740.js";import{_ as d}from"./shared-a8ced8bf.js";import{i as h}from"./shared-d3bf9ac0.js";import{h as c}from"./shared-7f33a83a.js";const u=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
1
+ import{E as e,C as t,T as r,D as o}from"./shared-7b167fe9.js";import{h as i,G as s,P as a}from"./shared-c52d3772.js";import"./shared-2215e6c8.js";import{F as n}from"./shared-c484320b.js";import{I as l}from"./shared-71deb26e.js";import"./shared-0672e78b.js";import{_ as d}from"./shared-a8ced8bf.js";import{i as h}from"./shared-d3bf9ac0.js";import{h as c}from"./shared-7f33a83a.js";const u=i`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import{A as e,a8 as t}from"./shared-2af327d0.js";import{d as s}from"./shared-a8ced8bf.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
1
+ import{A as e,a8 as t}from"./shared-002b788f.js";import{d as s}from"./shared-a8ced8bf.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(r,a)}c((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(e,t){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),email:t().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(e,t,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/r[t]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
@@ -1,4 +1,4 @@
1
- import{T as e}from"./shared-de385bdb.js";import"./shared-3d0dc4a6.js";import{h as t}from"./shared-08d6d02b.js";import{D as i}from"./shared-ff13276c.js";const n=t`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
1
+ import"./shared-6b8874a7.js";import"./shared-7b167fe9.js";import{T as e}from"./shared-2215e6c8.js";import{h as t}from"./shared-c52d3772.js";import{D as i}from"./shared-29e21467.js";const n=t`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
2
2
  <template>
3
3
  <style include="lumo-field-button">
4
4
  :host {
@@ -0,0 +1 @@
1
+ import{F as e,A as s}from"./shared-002b788f.js";class t extends s{constructor(s){super({base:new URL(document.baseURI),fetch:(...n)=>new Promise(((o,a)=>{const c="string"==typeof n[0]?new t.WHATWGRequest(...n):n[0];c.headers.set("Content-Type","application/json"),c.headers.set("FOXY-API-VERSION","1");const r=new e("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:c,resolve:o,reject:a});s.dispatchEvent(r),r.defaultPrevented||o(new Response(null,{status:500}))}))})}}t.FetchEvent=e;export{t as A};
@@ -1 +1 @@
1
- import{_ as t,c as e,i as n,d as i,e as r,p as s,f as o,S as a,g as h,h as c,k as d,j as u,l,n as f,o as p,s as v,q as y,r as w,u as x,v as b,w as m,x as g,y as E,z as S,C as T,D as L,E as _,G as O,H as k,I as C,J as N,K as M,L as z,M as D,N as P,O as I,P as R}from"./shared-2af327d0.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}(),j=new Map,F=0,U=function(){return"x:"+F++},A=function(t,e){return j.set(t,e),t},X=function(t){return j.get(t)},V=function(t){j.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 B=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(k(t))return i.batch(t),i.state;var n=u(C(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===N.Parent||i.parent.id===n),s=r?i.parent:M(n)?i.children.get(n)||X(n):z(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===D?""+_(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,c=void 0!==h?h:e.id;this.id=c,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=U()}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;A(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return o(t)?e.machine.resolveState(t):e.machine.resolveState(a.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,h)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,a,h,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){a={error:t}}finally{try{E&&!E.done&&(h=g.return)&&h.call(g)}finally{if(a)throw a.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){c(t.stop)&&t.stop()}));try{for(var S=e(d(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=[],c=function(t){var e=u(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()){c(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,u(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=u(t);if(0===n.name.indexOf(l)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(l)})))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||f(t.type,n),a=c(o)?o:o?o.exec:t.exec;if(a)try{return a(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 S:var h=t;if("number"==typeof h.delay)return void this.defer(h);h.to?this.sendTo(h._event,h.to):this.send(h._event);break;case E:this.cancel(t.sendId);break;case y:var d=t.activity;if(!this.state.activities[d.id||d.type])break;if(d.type===w.Invoke){var u=x(d.src),l=this.machine.options.services?this.machine.options.services[u.type]:void 0,T=d.id,L=d.data,_="autoForward"in d?d.autoForward:!!d.forward;if(!l)return;var O=L?i(L,r,s):void 0,k=c(l)?l(r,s.data,{data:O,src:u}):l;b(k)?this.spawnPromise(Promise.resolve(k),T):c(k)?this.spawnCallback(k,T):m(k)?this.spawnObservable(k,T):g(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(d);break;case v:this.stopChild(t.activity.id);break;case p: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),c(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(b(e))return this.spawnPromise(Promise.resolve(e),n);if(c(e))return this.spawnCallback(e,n);if(T(e))return this.spawnActor(e);if(m(e))return this.spawnObservable(e,n);if(g(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(L,{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(u(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(u(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=_(e,t);try{n.send(u(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(u(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(_(e,t))}if(b(n))return this.spawnPromise(n,e);var a={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,c(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,a),a},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(u(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(u(_(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(u(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[O]=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=Q,q}();function Q(t,e){return new B(t,e)}export{Q as i};
1
+ import{_ as t,c as e,i as n,d as i,e as r,p as s,f as o,S as a,g as h,h as c,k as u,j as d,l,n as f,o as p,s as v,q as y,r as w,u as x,v as b,w as m,x as g,y as E,z as S,C as T,D as L,E as _,G as O,H as k,I as C,J as N,K as M,L as z,M as D,N as P,O as I,P as R}from"./shared-002b788f.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}(),j=new Map,F=0,U=function(){return"x:"+F++},A=function(t,e){return j.set(t,e),t},X=function(t){return j.get(t)},V=function(t){j.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 B=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(k(t))return i.batch(t),i.state;var n=d(C(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===N.Parent||i.parent.id===n),s=r?i.parent:M(n)?i.children.get(n)||X(n):z(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===D?""+_(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,c=void 0!==h?h:e.id;this.id=c,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=U()}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;A(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return o(t)?e.machine.resolveState(t):e.machine.resolveState(a.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,h)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,a,h,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){a={error:t}}finally{try{E&&!E.done&&(h=g.return)&&h.call(g)}finally{if(a)throw a.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){c(t.stop)&&t.stop()}));try{for(var S=e(u(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=[],c=function(t){var e=d(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()){c(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,d(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=d(t);if(0===n.name.indexOf(l)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(l)})))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||f(t.type,n),a=c(o)?o:o?o.exec:t.exec;if(a)try{return a(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 S:var h=t;if("number"==typeof h.delay)return void this.defer(h);h.to?this.sendTo(h._event,h.to):this.send(h._event);break;case E:this.cancel(t.sendId);break;case y:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===w.Invoke){var d=x(u.src),l=this.machine.options.services?this.machine.options.services[d.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!l)return;var O=L?i(L,r,s):void 0,k=c(l)?l(r,s.data,{data:O,src:d}):l;b(k)?this.spawnPromise(Promise.resolve(k),T):c(k)?this.spawnCallback(k,T):m(k)?this.spawnObservable(k,T):g(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case v:this.stopChild(t.activity.id);break;case p: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),c(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(b(e))return this.spawnPromise(Promise.resolve(e),n);if(c(e))return this.spawnCallback(e,n);if(T(e))return this.spawnActor(e);if(m(e))return this.spawnObservable(e,n);if(g(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(L,{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(d(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(d(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=_(e,t);try{n.send(d(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(d(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(_(e,t))}if(b(n))return this.spawnPromise(n,e);var a={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,c(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,a),a},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(d(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(d(_(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(d(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[O]=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=Q,q}();function Q(t,e){return new B(t,e)}export{Q as i};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-a8ced8bf.js";import{B as t}from"./shared-e4bc532a.js";import{c as r,h as s}from"./shared-7f33a83a.js";import{y as n}from"./shared-ff13276c.js";import{I as o}from"./shared-b5120f1a.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
1
+ import{_ as e}from"./shared-a8ced8bf.js";import{B as t}from"./shared-b8e9b536.js";import{c as r,h as s}from"./shared-7f33a83a.js";import{x as n}from"./shared-29e21467.js";import{I as o}from"./shared-5504f415.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
@@ -0,0 +1,25 @@
1
+ import{u as e}from"./shared-29e21467.js";import{d as t}from"./shared-c484320b.js";
2
+ /**
3
+ @license
4
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
5
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
+ Code distributed by Google as part of the polymer project is also
9
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
+ */let i=!1,s=[],n=[];function o(){i=!0,requestAnimationFrame((function(){i=!1,function(e){for(;e.length;)r(e.shift())}(s),setTimeout((function(){!function(e){for(let t=0,i=e.length;t<i;t++)r(e.shift())}(n)}))}))}function r(e){const t=e[0],i=e[1],s=e[2];try{i.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function a(e,t,s){i||o(),n.push([e,t,s])}
11
+ /**
12
+ @license
13
+ Copyright (c) 2017 Vaadin Ltd.
14
+ This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
15
+ */const h=e=>class extends e{static get properties(){return{_hasVaadinItemMixin:{value:!0},disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();const e=this.getAttribute("value");null!==e&&(this.value=e),this.addEventListener("focus",(e=>this._setFocused(!0)),!0),this.addEventListener("blur",(e=>this._setFocused(!1)),!0),this.addEventListener("mousedown",(e=>{this._setActive(this._mousedown=!0);const t=()=>{this._setActive(this._mousedown=!1),document.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t)})),this.addEventListener("keydown",(e=>this._onKeydown(e))),this.addEventListener("keyup",(e=>this._onKeyup(e)))}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("active")&&this._setFocused(!1)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){e?(this.selected=!1,this.setAttribute("aria-disabled","true"),this.blur()):this.removeAttribute("aria-disabled")}_setFocused(e){e?(this.setAttribute("focused",""),this._mousedown||this.setAttribute("focus-ring","")):(this.removeAttribute("focused"),this.removeAttribute("focus-ring"),this._setActive(!1))}_setActive(e){e?this.setAttribute("active",""):this.removeAttribute("active")}_onKeydown(e){/^( |SpaceBar|Enter)$/.test(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this._setActive(!0))}_onKeyup(e){this.hasAttribute("active")&&(this._setActive(!1),this.click())}}
16
+ /**
17
+ @license
18
+ Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
19
+ This code may only be used under the BSD style license found at
20
+ http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
21
+ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
22
+ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
23
+ part of the polymer project is also subject to an additional IP rights grant
24
+ found at http://polymer.github.io/PATENTS.txt
25
+ */;var d=new Set;const u={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(d.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(t){this._notifyingDescendant?t.stopPropagation():e||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=t(e).rootTarget;i!==this&&(i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(d.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?d.delete(this):d.add(this)}};export{h as I,a,u as b};
@@ -1,4 +1,4 @@
1
- import{a as e,E as t,T as i,C as s}from"./shared-3d0dc4a6.js";import{T as o}from"./shared-de385bdb.js";import{O as n,I as l}from"./shared-7bfd93b7.js";import{h as A,D as r,t as a,P as d}from"./shared-08d6d02b.js";import{F as h,P as u,a as m}from"./shared-a98a6602.js";import"./shared-ff13276c.js";const c=A`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{E as e,T as t,C as i}from"./shared-7b167fe9.js";import"./shared-6b8874a7.js";import{O as A}from"./shared-b28dbc68.js";import{T as s}from"./shared-2215e6c8.js";import{h as o,P as n}from"./shared-c52d3772.js";import{L as l}from"./shared-923da875.js";import{b as a}from"./shared-e396ec04.js";import{P as r,a as d,F as h}from"./shared-c484320b.js";import"./shared-29e21467.js";const m=o`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -76,23 +76,18 @@ import{a as e,E as t,T as i,C as s}from"./shared-3d0dc4a6.js";import{T as o}from
76
76
  }
77
77
  </style>
78
78
  </template>
79
- </dom-module>`;document.head.appendChild(c.content);
80
- /**
81
- @license
82
- Copyright (c) 2017 Vaadin Ltd.
83
- This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
84
- */
85
- const p=t=>class extends t{static get properties(){return{_hasVaadinListMixin:{value:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}ready(){super.ready(),this.addEventListener("keydown",(e=>this._onKeydown(e))),this.addEventListener("click",(e=>this._onClick(e))),this._observer=new h(this,(e=>{this._setItems(this._filterItems(Array.from(this.children)))}))}_enhanceItems(e,t,i,s){if(!s&&e){this.setAttribute("aria-orientation",t||"vertical"),this.items.forEach((e=>{t?e.setAttribute("orientation",t):e.removeAttribute("orientation"),e.updateStyles()})),this._setFocusable(i);const s=e[i];e.forEach((e=>e.selected=e===s)),s&&!s.disabled&&this._scrollToItem(i)}}get focused(){return this.getRootNode().activeElement}_filterItems(e){return e.filter((e=>e._hasVaadinItemMixin))}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let i;t&&!t.disabled&&(i=this.items.indexOf(t))>=0&&(this.selected=i)}_searchKey(e,t){this._searchReset=r.debounce(this._searchReset,a.after(500),(()=>this._searchBuf="")),this._searchBuf+=t.toLowerCase();this.items.some((e=>0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))||(this._searchBuf=t.toLowerCase());const i=1===this._searchBuf.length?e+1:e;return this._getAvailableIndex(i,1,(e=>!(e.disabled||this._isItemHidden(e))&&0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}_onKeydown(e){if(e.metaKey||e.ctrlKey)return;const t=e.key.replace(/^Arrow/,""),i=this.items.indexOf(this.focused);if(/[a-zA-Z0-9]/.test(t)&&1===t.length){const e=this._searchKey(i,t);return void(e>=0&&this._focus(e))}let s,o;const n=this._isRTL?-1:1;this._vertical&&"Up"===t||!this._vertical&&"Left"===t?(o=-n,s=i-n):this._vertical&&"Down"===t||!this._vertical&&"Right"===t?(o=n,s=i+n):"Home"===t?(o=1,s=0):"End"===t&&(o=-1,s=this.items.length-1),s=this._getAvailableIndex(s,o,(e=>!(e.disabled||this._isItemHidden(e)))),s>=0&&(this._focus(s),e.preventDefault())}_getAvailableIndex(e,t,i){const s=this.items.length;for(let o=0;"number"==typeof e&&o<s;o++,e+=t||1){e<0?e=s-1:e>=s&&(e=0);if(i(this.items[e]))return e}return-1}_isItemHidden(e){return"none"===getComputedStyle(e).display}_setFocusable(e){e=this._getAvailableIndex(e,1,(e=>!e.disabled));const t=this.items[e]||this.items[0];this.items.forEach((e=>e.tabIndex=e===t?0:-1))}_focus(e){const t=this.items[e];this.items.forEach((e=>e.focused=e===t)),this._setFocusable(e),this._scrollToItem(e),t.focus()}focus(){this._observer&&this._observer.flush();const e=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);e&&e.focus()}get _scrollerElement(){}_scrollToItem(e){const t=this.items[e];if(!t)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[e+1]||t).getBoundingClientRect(),n=(this.items[e-1]||t).getBoundingClientRect();let l=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?l=o[i[1]]-s[i[1]]:(!this._isRTL&&n[i[0]]<=s[i[0]]||this._isRTL&&n[i[0]]>=s[i[0]])&&(l=n[i[0]]-s[i[0]]),this._scroll(l)}get _vertical(){return"horizontal"!==this.orientation}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const i=e.detectScrollType(),s=e.getNormalizedScrollLeft(i,this.getAttribute("dir")||"ltr",this._scrollerElement)+t;e.setNormalizedScrollLeft(i,this.getAttribute("dir")||"ltr",this._scrollerElement,s)}}}
79
+ </dom-module>`;document.head.appendChild(m.content);
86
80
  /**
87
81
  @license
88
82
  Copyright (c) 2019 Vaadin Ltd.
89
83
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
90
- */,v=e=>class extends(p(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,i,s){if(e&&t){if(s){const t=s.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],i=t&&!t.disabled?this.items.indexOf(t):-1;i<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(i)?this.selectedValues=this.selectedValues.filter((e=>e!==i)):this.selectedValues=this.selectedValues.concat(i))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
84
+ */
85
+ const u=e=>class extends(l(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,i,A){if(e&&t){if(A){const t=A.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],i=t&&!t.disabled?this.items.indexOf(t):-1;i<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(i)?this.selectedValues=this.selectedValues.filter((e=>e!==i)):this.selectedValues=this.selectedValues.concat(i))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
91
86
  /**
92
87
  @license
93
88
  Copyright (c) 2017 Vaadin Ltd.
94
89
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
95
- */;class _ extends(t(v(i(d)))){static get template(){return A`
90
+ */;class c extends(e(u(t(n)))){static get template(){return o`
96
91
  <style>
97
92
  :host {
98
93
  display: flex;
@@ -112,7 +107,7 @@ This program is available under Apache License Version 2.0, available at https:/
112
107
  <div part="items">
113
108
  <slot></slot>
114
109
  </div>
115
- `}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof d||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(_.is,_);const g=A`<dom-module id="lumo-select" theme-for="vaadin-select">
110
+ `}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof n||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(c.is,c);const p=o`<dom-module id="lumo-select" theme-for="vaadin-select">
116
111
  <template>
117
112
  <style include="lumo-field-button">
118
113
  :host {
@@ -239,7 +234,7 @@ This program is available under Apache License Version 2.0, available at https:/
239
234
  }
240
235
  </style>
241
236
  </template>
242
- </dom-module>`;document.head.appendChild(g.content),
237
+ </dom-module>`;document.head.appendChild(p.content),
243
238
  /**
244
239
  @license
245
240
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -250,25 +245,25 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
250
245
  part of the polymer project is also subject to an additional IP rights grant
251
246
  found at http://polymer.github.io/PATENTS.txt
252
247
  */
253
- u({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});
248
+ r({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});
254
249
  /**
255
250
  @license
256
251
  Copyright (c) 2017 Vaadin Ltd.
257
252
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
258
253
  */
259
- const f=document.createElement("template");f.innerHTML='<dom-module id="vaadin-select-overlay-styles" theme-for="vaadin-select-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(f.content);class y extends n{static get is(){return"vaadin-select-overlay"}}
254
+ const v=document.createElement("template");v.innerHTML='<dom-module id="vaadin-select-overlay-styles" theme-for="vaadin-select-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(v.content);class g extends A{static get is(){return"vaadin-select-overlay"}}
260
255
  /**
261
256
  @license
262
257
  Copyright (c) 2017 Vaadin Ltd.
263
258
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
264
259
  */
265
- let b;customElements.define(y.is,y);class E extends o{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!b){b=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=b.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return b}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(E.is,E);
260
+ let _;customElements.define(g.is,g);class f extends s{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!_){_=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=_.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return _}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(f.is,f);
266
261
  /**
267
262
  @license
268
263
  Copyright (c) 2017 Vaadin Ltd.
269
264
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
270
265
  */
271
- const w=document.createElement("template");w.innerHTML="<custom-style>\n <style>\n @font-face {\n font-family: \"vaadin-select-icons\";\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAABDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIGKmNtYXAAAAFoAAAAVAAAAFQXVtKHZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHwAAAB8CohkJ2hlYWQAAAJAAAAANgAAADYOavgEaGhlYQAAAngAAAAkAAAAJAarA8ZobXR4AAACnAAAABQAAAAUCAABP2xvY2EAAAKwAAAADAAAAAwAKABSbWF4cAAAArwAAAAgAAAAIAAHABduYW1lAAAC3AAAAYYAAAGGmUoJ+3Bvc3QAAARkAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QADwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkA//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQE/AUAC6QIVABQAAAEwFx4BFxYxMDc+ATc2MTAjKgEjIgE/ISJPIiEhIk8iIUNCoEJDAhUhIk8iISEiTyIhAAEAAAABAABvL5bdXw889QALBAAAAAAA1jHaeQAAAADWMdp5AAAAAALpAhUAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAukAAQAAAAAAAAAAAAAAAAAAAAUEAAAAAAAAAAAAAAAAAAAABAABPwAAAAAACgAUAB4APgABAAAABQAVAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n</custom-style>",document.head.appendChild(w.content);class x extends(t(s(i(m(l,d))))){static get template(){return A`
266
+ const y=document.createElement("template");y.innerHTML="<custom-style>\n <style>\n @font-face {\n font-family: \"vaadin-select-icons\";\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAABDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIGKmNtYXAAAAFoAAAAVAAAAFQXVtKHZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHwAAAB8CohkJ2hlYWQAAAJAAAAANgAAADYOavgEaGhlYQAAAngAAAAkAAAAJAarA8ZobXR4AAACnAAAABQAAAAUCAABP2xvY2EAAAKwAAAADAAAAAwAKABSbWF4cAAAArwAAAAgAAAAIAAHABduYW1lAAAC3AAAAYYAAAGGmUoJ+3Bvc3QAAARkAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QADwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkA//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQE/AUAC6QIVABQAAAEwFx4BFxYxMDc+ATc2MTAjKgEjIgE/ISJPIiEhIk8iIUNCoEJDAhUhIk8iISEiTyIhAAEAAAABAABvL5bdXw889QALBAAAAAAA1jHaeQAAAADWMdp5AAAAAALpAhUAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAukAAQAAAAAAAAAAAAAAAAAAAAUEAAAAAAAAAAAAAAAAAAAABAABPwAAAAAACgAUAB4APgABAAAABQAVAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n</custom-style>",document.head.appendChild(y.content);class b extends(e(i(t(d(a,n))))){static get template(){return o`
272
267
  <style>
273
268
  :host {
274
269
  display: inline-block;
@@ -301,4 +296,4 @@ const w=document.createElement("template");w.innerHTML="<custom-style>\n <style
301
296
  <vaadin-select-overlay opened="{{opened}}" with-backdrop="[[_phone]]" phone\$="[[_phone]]" theme\$="[[theme]]"></vaadin-select-overlay>
302
297
 
303
298
  <iron-media-query query="[[_phoneMediaQuery]]" query-matches="{{_phone}}"></iron-media-query>
304
- `}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new h(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,i,s){e!==t?this._contentTemplate=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,i){if(i){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(i.setProperties({owner:this,renderer:t}),this.render(),i.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,i=void 0!==t?t:-1,s=this._menuElement._searchKey(i,e.key);s>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[s].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,i){t&&t.setAttribute("aria-expanded",e),i&&i.focusElement&&i.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),i=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?i:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,i,s)=>void 0===t&&i.value===e?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",i?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(x.is,x);export{p as L,x as S};
299
+ `}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new h(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,i,A){e!==t?this._contentTemplate=void 0:i!==A&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,i){if(i){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(i.setProperties({owner:this,renderer:t}),this.render(),i.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,i=void 0!==t?t:-1,A=this._menuElement._searchKey(i,e.key);A>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[A].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,i){t&&t.setAttribute("aria-expanded",e),i&&i.focusElement&&i.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),i=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?i:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,i,A)=>void 0===t&&i.value===e?A:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",i?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(b.is,b);export{b as S};
@@ -1,4 +1,4 @@
1
- import"./shared-a98a6602.js";import{h}from"./shared-08d6d02b.js";
1
+ import"./shared-c484320b.js";import{h}from"./shared-c52d3772.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-e4bc532a.js";import"./shared-4623f740.js";import{_ as t}from"./shared-a8ced8bf.js";import{h as e}from"./shared-7f33a83a.js";import{D as s}from"./shared-6822bc96.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
1
+ import"./shared-b8e9b536.js";import"./shared-0672e78b.js";import{_ as t}from"./shared-a8ced8bf.js";import{h as e}from"./shared-7f33a83a.js";import{D as s}from"./shared-4975f86f.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
@@ -1,4 +1,4 @@
1
- import{aw as t,ax as e,ay as o,aa as r,ar as a,az as i}from"./shared-2af327d0.js";import{a as s}from"./shared-d82f3ba0.js";import{e as n}from"./shared-a8ced8bf.js";import{E as l,T as c}from"./shared-3d0dc4a6.js";import{h as d,P as m}from"./shared-08d6d02b.js";import"./shared-de385bdb.js";import{L as h}from"./shared-0db7afef.js";import{d as f,I as u,a as p}from"./shared-7bfd93b7.js";import{a as b}from"./shared-a98a6602.js";var v=Object.prototype.hasOwnProperty;function g(t,e){return null!=t&&v.call(t,e)}function w(s,n){return null!=s&&function(s,n,l){for(var c=-1,d=(n=t(n,s)).length,m=!1;++c<d;){var h=e(n[c]);if(!(m=null!=s&&l(s,h)))break;s=s[h]}return m||++c!=d?m:!!(d=null==s?0:s.length)&&o(d)&&r(h,d)&&(a(s)||i(s))}(s,n,g)}function y(o,a,i){return null==o?o:function(o,a,i,l){if(!n(o))return o;for(var c=-1,d=(a=t(a,o)).length,m=d-1,h=o;null!=h&&++c<d;){var f=e(a[c]),u=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return o;if(c!=m){var p=h[f];void 0===(u=l?l(p,f,h):void 0)&&(u=n(p)?p:r(a[c+1])?[]:{})}s(h,f,u),h=h[f]}return o}(o,a,i)}const _=d`<dom-module id="lumo-tab" theme-for="vaadin-tab">
1
+ import{E as t,T as e}from"./shared-7b167fe9.js";import{h as o,P as r}from"./shared-c52d3772.js";import"./shared-6b8874a7.js";import{L as a}from"./shared-923da875.js";import{I as i,b as s,a as n}from"./shared-e396ec04.js";import{a as l}from"./shared-c484320b.js";const c=o`<dom-module id="lumo-tab" theme-for="vaadin-tab">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -220,15 +220,15 @@ import{aw as t,ax as e,ay as o,aa as r,ar as a,az as i}from"./shared-2af327d0.js
220
220
  }
221
221
  </style>
222
222
  </template>
223
- </dom-module>`;document.head.appendChild(_.content);
223
+ </dom-module>`;document.head.appendChild(c.content);
224
224
  /**
225
225
  @license
226
226
  Copyright (c) 2017 Vaadin Ltd.
227
227
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
228
228
  */
229
- class k extends(l(c(f(m)))){static get template(){return d`
229
+ class d extends(t(e(i(r)))){static get template(){return o`
230
230
  <slot></slot>
231
- `}static get is(){return"vaadin-tab"}static get version(){return"3.2.0"}ready(){super.ready(),this.setAttribute("role","tab")}_onKeyup(t){const e=this.hasAttribute("active");if(super._onKeyup(t),e){const t=this.querySelector("a");t&&t.click()}}}customElements.define(k.is,k);const x=d`<dom-module id="lumo-tabs" theme-for="vaadin-tabs">
231
+ `}static get is(){return"vaadin-tab"}static get version(){return"3.2.0"}ready(){super.ready(),this.setAttribute("role","tab")}_onKeyup(t){const e=this.hasAttribute("active");if(super._onKeyup(t),e){const t=this.querySelector("a");t&&t.click()}}}customElements.define(d.is,d);const m=o`<dom-module id="lumo-tabs" theme-for="vaadin-tabs">
232
232
  <template>
233
233
  <style>
234
234
  :host {
@@ -458,13 +458,13 @@ class k extends(l(c(f(m)))){static get template(){return d`
458
458
  }
459
459
  </style>
460
460
  </template>
461
- </dom-module>`;document.head.appendChild(x.content);
461
+ </dom-module>`;document.head.appendChild(m.content);
462
462
  /**
463
463
  @license
464
464
  Copyright (c) 2017 Vaadin Ltd.
465
465
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
466
466
  */
467
- const z=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class S extends(l(h(c(b([u],m))))){static get template(){return d`
467
+ const h=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class f extends(t(a(e(l([s],r))))){static get template(){return o`
468
468
  <style>
469
469
  :host {
470
470
  display: flex;
@@ -550,4 +550,4 @@ const z=/Apple.* Version\/(9|10)/.test(navigator.userAgent);class S extends(l(h(
550
550
  </div>
551
551
 
552
552
  <div on-click="_scrollForward" part="forward-button"></div>
553
- `}static get is(){return"vaadin-tabs"}static get version(){return"3.2.0"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["_updateOverflow(items.*, vertical)"]}ready(){super.ready(),this.addEventListener("iron-resize",(()=>this._updateOverflow())),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),p(this,(()=>{this._updateOverflow()}))}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement);let e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;e-=1;let o=t>0?"start":"";o+=t+this._scrollOffset<e?" end":"",1==this.__direction&&(o=o.replace(/start|end/gi,(t=>"start"===t?"end":"start"))),o?this.setAttribute("overflow",o.trim()):this.removeAttribute("overflow"),this._repaintShadowNodesHack()}_repaintShadowNodesHack(){if(z&&this.root){const t="-webkit-backface-visibility";this.root.querySelectorAll("*").forEach((e=>{e.style[t]="visible",e.style[t]=""}))}}}customElements.define(S.is,S);export{w as h,y as s};
553
+ `}static get is(){return"vaadin-tabs"}static get version(){return"3.2.0"}static get properties(){return{orientation:{value:"horizontal",type:String},selected:{value:0,type:Number}}}static get observers(){return["_updateOverflow(items.*, vertical)"]}ready(){super.ready(),this.addEventListener("iron-resize",(()=>this._updateOverflow())),this._scrollerElement.addEventListener("scroll",(()=>this._updateOverflow())),this.setAttribute("role","tablist"),n(this,(()=>{this._updateOverflow()}))}_scrollForward(){this._scroll(-this.__direction*this._scrollOffset)}_scrollBack(){this._scroll(this.__direction*this._scrollOffset)}get _scrollOffset(){return this._vertical?this._scrollerElement.offsetHeight:this._scrollerElement.offsetWidth}get _scrollerElement(){return this.$.scroll}get __direction(){return this._vertical||"rtl"!==this.getAttribute("dir")?-1:1}_updateOverflow(){const t=this._vertical?this._scrollerElement.scrollTop:this.__getNormalizedScrollLeft(this._scrollerElement);let e=this._vertical?this._scrollerElement.scrollHeight:this._scrollerElement.scrollWidth;e-=1;let o=t>0?"start":"";o+=t+this._scrollOffset<e?" end":"",1==this.__direction&&(o=o.replace(/start|end/gi,(t=>"start"===t?"end":"start"))),o?this.setAttribute("overflow",o.trim()):this.removeAttribute("overflow"),this._repaintShadowNodesHack()}_repaintShadowNodesHack(){if(h&&this.root){const t="-webkit-backface-visibility";this.root.querySelectorAll("*").forEach((e=>{e.style[t]="visible",e.style[t]=""}))}}}customElements.define(f.is,f);
@@ -1,4 +1,4 @@
1
- import{T as A}from"./shared-de385bdb.js";import"./shared-3d0dc4a6.js";import{h as e}from"./shared-08d6d02b.js";import{D as t}from"./shared-ff13276c.js";const s=e`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
1
+ import"./shared-6b8874a7.js";import"./shared-7b167fe9.js";import{h as A}from"./shared-c52d3772.js";import{T as e}from"./shared-2215e6c8.js";import{D as t}from"./shared-29e21467.js";const s=A`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
2
2
  <template>
3
3
  <style>
4
4
  [part="reveal-button"]::before {
@@ -26,7 +26,7 @@ import{T as A}from"./shared-de385bdb.js";import"./shared-3d0dc4a6.js";import{h a
26
26
  Copyright (c) 2017 Vaadin Ltd.
27
27
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
28
28
  */
29
- const i=e`<custom-style>
29
+ const i=A`<custom-style>
30
30
  <style>
31
31
  @font-face {
32
32
  font-family: 'vaadin-password-field-icons';
@@ -52,4 +52,4 @@ const i=e`<custom-style>
52
52
  </div>
53
53
  </template>
54
54
 
55
- </dom-module>`;let o;document.head.appendChild(i.content);class a extends A{static get is(){return"vaadin-password-field"}static get version(){return"2.9.2"}static get properties(){return{revealButtonHidden:{type:Boolean,value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChange",readOnly:!0}}}static get template(){if(!o){o=super.template.cloneNode(!0);const A=t.import(this.is+"-template","template"),e=A.content.querySelector('[part="reveal-button"]'),s=A.content.querySelector("style");o.content.querySelector('[part="input-field"]').appendChild(e),o.content.appendChild(s)}return o}ready(){super.ready(),this.inputElement.type="password",this.inputElement.autocapitalize="off",this.addEventListener("focusout",(()=>{this._passwordVisibilityChanging||(this._setPasswordVisible(!1),this._cachedChangeEvent&&this._onChange(this._cachedChangeEvent))}))}_onChange(A){this.querySelector(`${this._slottedTagName}[slot="${this._slottedTagName}"]`)&&A.stopPropagation(),this._passwordVisibilityChanging?this._cachedChangeEvent=A:(this._cachedChangeEvent=null,super._onChange(A))}_revealButtonMouseDown(A){this.hasAttribute("focused")&&A.preventDefault()}_togglePasswordVisibilityTouchend(A){A.preventDefault(),this._togglePasswordVisibility(),this.inputElement.focus()}_togglePasswordVisibility(){this._passwordVisibilityChanging=!0,this.inputElement.blur(),this._setPasswordVisible(!this.passwordVisible),this.inputElement.focus(),this._passwordVisibilityChanging=!1}_passwordVisibleChange(A){this.inputElement.type=A?"text":"password"}}customElements.define(a.is,a);export{a as P};
55
+ </dom-module>`;let o;document.head.appendChild(i.content);class a extends e{static get is(){return"vaadin-password-field"}static get version(){return"2.9.2"}static get properties(){return{revealButtonHidden:{type:Boolean,value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChange",readOnly:!0}}}static get template(){if(!o){o=super.template.cloneNode(!0);const A=t.import(this.is+"-template","template"),e=A.content.querySelector('[part="reveal-button"]'),s=A.content.querySelector("style");o.content.querySelector('[part="input-field"]').appendChild(e),o.content.appendChild(s)}return o}ready(){super.ready(),this.inputElement.type="password",this.inputElement.autocapitalize="off",this.addEventListener("focusout",(()=>{this._passwordVisibilityChanging||(this._setPasswordVisible(!1),this._cachedChangeEvent&&this._onChange(this._cachedChangeEvent))}))}_onChange(A){this.querySelector(`${this._slottedTagName}[slot="${this._slottedTagName}"]`)&&A.stopPropagation(),this._passwordVisibilityChanging?this._cachedChangeEvent=A:(this._cachedChangeEvent=null,super._onChange(A))}_revealButtonMouseDown(A){this.hasAttribute("focused")&&A.preventDefault()}_togglePasswordVisibilityTouchend(A){A.preventDefault(),this._togglePasswordVisibility(),this.inputElement.focus()}_togglePasswordVisibility(){this._passwordVisibilityChanging=!0,this.inputElement.blur(),this._setPasswordVisible(!this.passwordVisible),this.inputElement.focus(),this._passwordVisibilityChanging=!1}_passwordVisibleChange(A){this.inputElement.type=A?"text":"password"}}customElements.define(a.is,a);export{a as P};