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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +5 -5
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +2 -2
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-api.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +11 -11
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +1 -1
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-nucleon-element.js +1 -1
  71. package/dist/cdn/foxy-pagination.js +1 -1
  72. package/dist/cdn/foxy-passkey-card.js +1 -1
  73. package/dist/cdn/foxy-passkey-form.js +1 -1
  74. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  75. package/dist/cdn/foxy-payment-card.js +1 -1
  76. package/dist/cdn/foxy-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  83. package/dist/cdn/foxy-payments-api.js +1 -1
  84. package/dist/cdn/foxy-query-builder.js +1 -1
  85. package/dist/cdn/foxy-report-form.js +2 -2
  86. package/dist/cdn/foxy-reports-table.js +1 -1
  87. package/dist/cdn/foxy-shipment-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  92. package/dist/cdn/foxy-sign-in-form.js +1 -1
  93. package/dist/cdn/foxy-spinner.js +2 -2
  94. package/dist/cdn/foxy-store-card.js +1 -1
  95. package/dist/cdn/foxy-store-form.js +1 -1
  96. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +7 -7
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-1ba78e12.js → shared-058c340a.js} +1 -1
  122. package/dist/cdn/{shared-41aa53e0.js → shared-08b895b0.js} +1 -1
  123. package/dist/cdn/shared-0aedd809.js +1 -0
  124. package/dist/cdn/{shared-2bcdd0c6.js → shared-0d412ab6.js} +1 -1
  125. package/dist/cdn/{shared-812c706e.js → shared-16aa673a.js} +1 -1
  126. package/dist/cdn/{shared-12a553c2.js → shared-196b992c.js} +1 -1
  127. package/dist/cdn/{shared-82e82908.js → shared-1d0839af.js} +1 -1
  128. package/dist/cdn/{shared-2762e106.js → shared-28a6781e.js} +5 -5
  129. package/dist/cdn/{shared-f438f0f4.js → shared-2a305cf4.js} +1 -1
  130. package/dist/cdn/{shared-17a61265.js → shared-2aa23b5f.js} +1 -1
  131. package/dist/cdn/{shared-d199f862.js → shared-2b7e9979.js} +2 -2
  132. package/dist/cdn/{shared-a2693527.js → shared-2fe8f409.js} +1 -1
  133. package/dist/cdn/{shared-6960ab99.js → shared-377dea9e.js} +1 -1
  134. package/dist/cdn/{shared-f3209496.js → shared-37d9634f.js} +1 -1
  135. package/dist/cdn/{shared-fcf6424c.js → shared-3c54cb67.js} +1 -1
  136. package/dist/cdn/{shared-3a446f14.js → shared-3ca920e6.js} +1 -1
  137. package/dist/cdn/{shared-f61e5463.js → shared-3e7f5663.js} +2 -2
  138. package/dist/cdn/{shared-25a19cbe.js → shared-3f0b1660.js} +1 -1
  139. package/dist/cdn/{shared-85323ced.js → shared-4854f37a.js} +1 -1
  140. package/dist/cdn/shared-4a38cb3e.js +1 -0
  141. package/dist/cdn/{shared-aa211938.js → shared-52943926.js} +1 -1
  142. package/dist/cdn/{shared-7e9fdf64.js → shared-5592ec6e.js} +1 -1
  143. package/dist/cdn/{shared-d4d11fb8.js → shared-559ce27e.js} +1 -1
  144. package/dist/cdn/{shared-3a3dc0d9.js → shared-562d6c10.js} +1 -1
  145. package/dist/cdn/shared-5a19b58c.js +1 -0
  146. package/dist/cdn/{shared-eeb2bd18.js → shared-5afb584d.js} +1 -1
  147. package/dist/cdn/{shared-9f07fab6.js → shared-5b1511bc.js} +1 -1
  148. package/dist/cdn/{shared-d8cab6ab.js → shared-5bed5454.js} +1 -1
  149. package/dist/cdn/{shared-f2c4875b.js → shared-5c747b54.js} +1 -1
  150. package/dist/cdn/shared-5e4a03d1.js +1 -0
  151. package/dist/cdn/{shared-fcdb896f.js → shared-5ef40e86.js} +1 -1
  152. package/dist/cdn/{shared-dc6eb904.js → shared-65b74c44.js} +1 -1
  153. package/dist/cdn/{shared-c2efc54e.js → shared-673d668a.js} +1 -1
  154. package/dist/cdn/{shared-322ae633.js → shared-69b4b6a7.js} +1 -1
  155. package/dist/cdn/{shared-674ba44d.js → shared-7303e512.js} +1 -1
  156. package/dist/cdn/{shared-aab278b5.js → shared-730dd58a.js} +1 -1
  157. package/dist/cdn/{shared-7d797451.js → shared-73c3155d.js} +1 -1
  158. package/dist/cdn/{shared-d54b3216.js → shared-740e3ab9.js} +1 -1
  159. package/dist/cdn/{shared-dea71762.js → shared-746ecb15.js} +1 -1
  160. package/dist/cdn/{shared-019348d7.js → shared-7594e563.js} +1 -1
  161. package/dist/cdn/{shared-7c863df2.js → shared-75cf59dc.js} +1 -1
  162. package/dist/cdn/{shared-e6cd721f.js → shared-75feef80.js} +1 -1
  163. package/dist/cdn/{shared-aa45d4ec.js → shared-7bbb91c2.js} +1 -1
  164. package/dist/cdn/{shared-4bcfe691.js → shared-7cac2ea3.js} +1 -1
  165. package/dist/cdn/{shared-8e36bcc1.js → shared-8154088a.js} +1 -1
  166. package/dist/cdn/{shared-efecf1ca.js → shared-8219cdf0.js} +1 -1
  167. package/dist/cdn/shared-918c8b20.js +1 -0
  168. package/dist/cdn/{shared-5a08dbb0.js → shared-94756d7c.js} +1 -1
  169. package/dist/cdn/{shared-ccc91a5f.js → shared-96998138.js} +1 -1
  170. package/dist/cdn/{shared-9ca85d1e.js → shared-99a8889a.js} +1 -1
  171. package/dist/cdn/{shared-34119bbf.js → shared-9acbf607.js} +1 -1
  172. package/dist/cdn/{shared-f6e9eda6.js → shared-a6776a1d.js} +1 -1
  173. package/dist/cdn/{shared-2db8d17c.js → shared-ad179ade.js} +1 -1
  174. package/dist/cdn/{shared-2550f6d9.js → shared-ad888fc4.js} +1 -1
  175. package/dist/cdn/{shared-c27ee44e.js → shared-b0c5a062.js} +1 -1
  176. package/dist/cdn/{shared-49e0541d.js → shared-b24b86a3.js} +4 -4
  177. package/dist/cdn/{shared-299543b6.js → shared-b7775f62.js} +1 -1
  178. package/dist/cdn/{shared-57c3f0e4.js → shared-ba38add2.js} +1 -1
  179. package/dist/cdn/{shared-498ce88a.js → shared-bd2ebe88.js} +1 -1
  180. package/dist/cdn/{shared-1137b243.js → shared-c023350f.js} +1 -1
  181. package/dist/cdn/{shared-166204e5.js → shared-c44770f9.js} +1 -1
  182. package/dist/cdn/{shared-d1195c27.js → shared-cb58dfcd.js} +1 -1
  183. package/dist/cdn/{shared-13d65f57.js → shared-cbe634e6.js} +1 -1
  184. package/dist/cdn/{shared-6ef0392a.js → shared-cc8237eb.js} +1 -1
  185. package/dist/cdn/{shared-3691a26f.js → shared-ce12007b.js} +1 -1
  186. package/dist/cdn/{shared-893ead61.js → shared-cfb804b4.js} +1 -1
  187. package/dist/cdn/{shared-a2a27012.js → shared-cfce3012.js} +1 -1
  188. package/dist/cdn/{shared-604261a0.js → shared-d2bc4d51.js} +1 -1
  189. package/dist/cdn/{shared-569db166.js → shared-d40308b2.js} +1 -1
  190. package/dist/cdn/{shared-6555fd71.js → shared-d66a4bdb.js} +1 -1
  191. package/dist/cdn/{shared-bd941702.js → shared-deb5cb67.js} +1 -1
  192. package/dist/cdn/{shared-cba2b787.js → shared-e08f4e45.js} +1 -1
  193. package/dist/cdn/{shared-e1a6c036.js → shared-e5e98873.js} +1 -1
  194. package/dist/cdn/{shared-1da49e3d.js → shared-e9682623.js} +1 -1
  195. package/dist/cdn/{shared-641786b2.js → shared-eb963ba3.js} +1 -1
  196. package/dist/cdn/{shared-56ba2d28.js → shared-ef4ad461.js} +1 -1
  197. package/dist/cdn/{shared-59e22bc6.js → shared-f69bc3a6.js} +1 -1
  198. package/dist/cdn/{shared-71f3226f.js → shared-f6c479b8.js} +1 -1
  199. package/dist/cdn/shared-f83207fb.js +1 -0
  200. package/dist/cdn/{shared-58e7f6b1.js → shared-fb0c426a.js} +1 -1
  201. package/dist/cdn/translations/admin-subscription-form/en.json +14 -4
  202. package/dist/cdn/translations/coupon-code-form/en.json +2 -0
  203. package/dist/cdn/translations/coupon-form/en.json +2 -0
  204. package/dist/cdn/translations/customer/en.json +2 -0
  205. package/dist/cdn/translations/customer-portal/de.json +2 -0
  206. package/dist/cdn/translations/customer-portal/en.json +2 -0
  207. package/dist/cdn/translations/customer-portal/es.json +2 -0
  208. package/dist/cdn/translations/customer-portal/fr.json +2 -0
  209. package/dist/cdn/translations/customer-portal/nl.json +2 -0
  210. package/dist/cdn/translations/customer-portal/pl.json +2 -0
  211. package/dist/cdn/translations/customer-portal/sv.json +2 -0
  212. package/dist/cdn/translations/customer-portal/zh-hk.json +2 -0
  213. package/dist/cdn/translations/subscription-form/en.json +2 -0
  214. package/dist/cdn/translations/transaction/en.json +8 -0
  215. package/dist/cdn/translations/transaction-card/en.json +3 -1
  216. package/dist/elements/internal/InternalForm/InternalForm.d.ts +4 -0
  217. package/dist/elements/internal/InternalForm/InternalForm.js +22 -7
  218. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  219. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +1 -1
  220. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +19 -13
  221. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  222. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js +19 -40
  223. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js.map +1 -1
  224. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.d.ts +0 -1
  225. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js +0 -1
  226. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js.map +1 -1
  227. package/dist/elements/public/StoreForm/StoreForm.js +2 -2
  228. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  229. package/dist/elements/public/Transaction/Transaction.d.ts +3 -0
  230. package/dist/elements/public/Transaction/Transaction.js +9 -0
  231. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  232. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +16 -0
  233. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  234. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +2 -0
  235. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +2 -0
  236. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
  237. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +14 -10
  238. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  239. package/dist/elements/public/TransactionCard/TransactionCard.js +25 -4
  240. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  241. package/dist/mixins/themeable.js +8 -12
  242. package/dist/mixins/themeable.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/cdn/shared-1aff7995.js +0 -1
  245. package/dist/cdn/shared-882a0fda.js +0 -1
  246. package/dist/cdn/shared-9cf15285.js +0 -1
  247. package/dist/cdn/shared-a1f85307.js +0 -1
  248. package/dist/cdn/shared-d1dfac4d.js +0 -1
@@ -1 +1 @@
1
- import{c as e,b as t,d as r}from"./shared-d1195c27.js";var n=e((function(e,n){e.exports=function(){function e(t,n,i){function a(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof r&&r;if(!u&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};t[s][0].call(p.exports,(function(e){return a(t[s][1][e]||e)}),p,p.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<i.length;s++)a(i[s]);return a}return e}()({1:[function(e,t,r){const n=e("./utils"),i=function(){const e=n.stringToArray,t=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],a=["Thousand","Million","Billion","Trillion"];function o(e,n){var o=function(e,n,s){var u="";if(e<=19)u=(n?" and ":"")+(s?r[e]:t[e]);else if(e<100){const t=Math.floor(e/10),r=e%10;u=(n?" and ":"")+i[t-2],r>0?u+="-"+o(r,!1,s):s&&(u=u.substring(0,u.length-1)+"ieth")}else if(e<1e3){const r=Math.floor(e/100),i=e%100;u=(n?", ":"")+t[r]+" Hundred",i>0?u+=o(i,!0,s):s&&(u+="th")}else{var c=Math.floor(Math.log10(e)/3);c>a.length&&(c=a.length);const t=Math.pow(10,3*c),r=Math.floor(e/t),i=e-r*t;u=(n?", ":"")+o(r,!1,!1)+" "+a[c-1],i>0?u+=o(i,!0,s):s&&(u+="th")}return u};return o(e,!1,n)}const s={};function u(e){const t=e.split(/,\s|\sand\s|[\s\\-]/).map((e=>s[e]));let r=[0];return t.forEach((e=>{if(e<100){let t=r.pop();t>=1e3&&(r.push(t),t=0),r.push(t+e)}else r.push(r.pop()*e)})),r.reduce(((e,t)=>e+t),0)}t.forEach((function(e,t){s[e.toLowerCase()]=t})),r.forEach((function(e,t){s[e.toLowerCase()]=t})),i.forEach((function(e,t){const r=e.toLowerCase();s[r]=10*(t+2),s[r.substring(0,e.length-1)+"ieth"]=s[r]})),s.hundredth=100,a.forEach((function(e,t){const r=e.toLowerCase(),n=Math.pow(10,3*(t+1));s[r]=n,s[r+"th"]=n}));const c=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],l={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function p(e){for(var t=0;t<c.length;t++){const r=c[t];if(e>=r[0])return r[1]+p(e-r[0])}return""}function f(e){for(var t=0,r=1,n=e.length-1;n>=0;n--){const i=e[n],a=l[i];a<r?t-=a:(r=a,t+=a)}return t}function d(e,t){for(var r=[],n=t.charCodeAt(0);e>0;)r.unshift(String.fromCharCode((e-1)%26+n)),e=Math.floor((e-1)/26);return r.join("")}function h(e,t){for(var r=t.charCodeAt(0),n=0,i=0;i<e.length;i++)n+=(e.charCodeAt(e.length-i-1)-r+1)*Math.pow(26,i);return n}function v(e,t){if(void 0!==e)return m(e=Math.floor(e),k(t))}const g={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function m(t,r){let n;const i=t<0;switch(t=Math.abs(t),r.primary){case g.LETTERS:n=d(t,r.case===y.UPPER?"A":"a");break;case g.ROMAN:n=p(t),r.case===y.UPPER&&(n=n.toUpperCase());break;case g.WORDS:n=o(t,r.ordinal),r.case===y.UPPER?n=n.toUpperCase():r.case===y.LOWER&&(n=n.toLowerCase());break;case g.DECIMAL:n=""+t;var a=r.mandatoryDigits-n.length;if(a>0){var s=new Array(a+1).join("0");n=s+n}if(48!==r.zeroCode&&(n=e(n).map((e=>String.fromCodePoint(e.codePointAt(0)+r.zeroCode-48))).join("")),r.regular)for(let e=Math.floor((n.length-1)/r.groupingSeparators.position);e>0;e--){const t=n.length-e*r.groupingSeparators.position;n=n.substr(0,t)+r.groupingSeparators.character+n.substr(t)}else r.groupingSeparators.reverse().forEach((e=>{const t=n.length-e.position;n=n.substr(0,t)+e.character+n.substr(t)}));if(r.ordinal){var u={1:"st",2:"nd",3:"rd"}[n[n.length-1]];(!u||n.length>1&&"1"===n[n.length-2])&&(u="th"),n+=u}break;case g.SEQUENCE:throw{code:"D3130",value:r.token}}return i&&(n="-"+n),n}const b=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function k(t){const r={type:"integer",primary:g.DECIMAL,case:y.LOWER,ordinal:!1};let n,i;const a=t.lastIndexOf(";");switch(-1===a?n=t:(n=t.substring(0,a),i=t.substring(a+1),"o"===i[0]&&(r.ordinal=!0)),n){case"A":r.case=y.UPPER;case"a":r.primary=g.LETTERS;break;case"I":r.case=y.UPPER;case"i":r.primary=g.ROMAN;break;case"W":r.case=y.UPPER,r.primary=g.WORDS;break;case"Ww":r.case=y.TITLE,r.primary=g.WORDS;break;case"w":r.primary=g.WORDS;break;default:{let t=null,i=0,a=0,o=[],s=0;if(e(n).map((e=>e.codePointAt(0))).reverse().forEach((e=>{let r=!1;for(let n=0;n<b.length;n++){const a=b[n];if(e>=a&&e<=a+9){if(r=!0,i++,s++,null===t)t=a;else if(a!==t)throw{code:"D3131"};break}}r||(35===e?(s++,a++):o.push({position:s,character:String.fromCodePoint(e)}))})),i>0){r.primary=g.DECIMAL,r.zeroCode=t,r.mandatoryDigits=i,r.optionalDigits=a;const e=function(e){if(0===e.length)return 0;const t=e[0].character;for(let r=1;r<e.length;r++)if(e[r].character!==t)return 0;const r=e.map((e=>e.position)),n=function(e,t){return 0===t?e:n(t,e%t)},i=r.reduce(n);for(let e=1;e<=r.length;e++)if(-1===r.indexOf(e*i))return 0;return i}(o);e>0?(r.regular=!0,r.groupingSeparators={position:e,character:o[0].character}):(r.regular=!1,r.groupingSeparators=o)}else r.primary=g.SEQUENCE,r.token=n}}return r}const x={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function w(e){var t=[];const r={type:"datetime",parts:t},n=function(r,n){if(n>r){let i=e.substring(r,n);i=i.split("]]").join("]"),t.push({type:"literal",value:i})}};for(var i=0,a=0;a<e.length;){if("["===e.charAt(a)){if("["===e.charAt(a+1)){n(i,a),t.push({type:"literal",value:"["}),i=a+=2;continue}if(n(i,a),i=a,-1===(a=e.indexOf("]",i)))throw{code:"D3135"};let r=e.substring(i+1,a);r=r.split(/\s+/).join("");var o,s={type:"marker",component:r.charAt(0)},u=r.lastIndexOf(",");if(-1!==u){const e=r.substring(u+1),t=e.indexOf("-");let n,i;const a=function(e){return void 0===e||"*"===e?void 0:parseInt(e)};-1===t?n=e:(n=e.substring(0,t),i=e.substring(t+1));const c={min:a(n),max:a(i)};s.width=c,o=r.substring(1,u)}else o=r.substring(1);if(1===o.length)s.presentation1=o;else if(o.length>1){var c=o.charAt(o.length-1);-1!=="atco".indexOf(c)?(s.presentation2=c,"o"===c&&(s.ordinal=!0),s.presentation1=o.substring(0,o.length-1)):s.presentation1=o}else s.presentation1=x[s.component];if(void 0===s.presentation1)throw{code:"D3132",value:s.component};if("n"===s.presentation1[0])s.names=y.LOWER;else if("N"===s.presentation1[0])"n"===s.presentation1[1]?s.names=y.TITLE:s.names=y.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(s.component)){var l=s.presentation1;if(s.presentation2&&(l+=";"+s.presentation2),s.integerFormat=k(l),s.width&&void 0!==s.width.min&&s.integerFormat.mandatoryDigits<s.width.min&&(s.integerFormat.mandatoryDigits=s.width.min),-1!=="YMD".indexOf(s.component))if(s.n=-1,s.width&&void 0!==s.width.max)s.n=s.width.max,s.integerFormat.mandatoryDigits=s.n;else{var p=s.integerFormat.mandatoryDigits+s.integerFormat.optionalDigits;p>=2&&(s.n=p)}}"Z"!==s.component&&"z"!==s.component||(s.integerFormat=k(s.presentation1)),t.push(s),i=a+1}a++}return n(i,a),r}const A=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],E=["January","February","March","April","May","June","July","August","September","October","November","December"],D=864e5,T=function(e){const t=Date.UTC(e.year,e.month);var r=new Date(t).getUTCDay();return 0===r&&(r=7),r>4?t+(8-r)*D:t-(r-1)*D},S=function(e,t){return{year:e,month:t,nextMonth:function(){return 11===t?S(e+1,0):S(e,t+1)},previousMonth:function(){return 0===t?S(e-1,11):S(e,t-1)},nextYear:function(){return S(e+1,t)},previousYear:function(){return S(e-1,t)}}},O=function(e,t){return(t-e)/(7*D)+1},P=(e,t)=>{let r;switch(t){case"Y":r=e.getUTCFullYear();break;case"M":r=e.getUTCMonth()+1;break;case"D":r=e.getUTCDate();break;case"d":r=(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0))/D+1;break;case"F":r=e.getUTCDay(),0===r&&(r=7);break;case"W":{const t=S(e.getUTCFullYear(),0),n=T(t),i=Date.UTC(t.year,e.getUTCMonth(),e.getUTCDate());let a=O(n,i);if(a>52)i>=T(t.nextYear())&&(a=1);else if(a<1){const e=T(t.previousYear());a=O(e,i)}r=Math.floor(a);break}case"w":{const t=S(e.getUTCFullYear(),e.getUTCMonth()),n=T(t),i=Date.UTC(t.year,t.month,e.getUTCDate());let a=O(n,i);if(a>4)i>=T(t.nextMonth())&&(a=1);else if(a<1){const e=T(t.previousMonth());a=O(e,i)}r=Math.floor(a);break}case"X":{const t=S(e.getUTCFullYear(),0),n=T(t),i=T(t.nextYear()),a=e.getTime();r=a<n?t.year-1:a>=i?t.year+1:t.year;break}case"x":{const t=S(e.getUTCFullYear(),e.getUTCMonth()),n=T(t),i=t.nextMonth(),a=T(i),o=e.getTime();r=o<n?t.previousMonth().month+1:o>=a?i.month+1:t.month+1;break}case"H":r=e.getUTCHours();break;case"h":r=e.getUTCHours(),r%=12,0===r&&(r=12);break;case"P":r=e.getUTCHours()>=12?"pm":"am";break;case"m":r=e.getUTCMinutes();break;case"s":r=e.getUTCSeconds();break;case"f":r=e.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":r="ISO"}return r};let M=null;function C(e,t,r){var n=0,i=0;if(void 0!==r){const e=parseInt(r);n=Math.floor(e/100),i=e%100}var a=function(e,t){var r=P(e,t.component);if(-1!=="YMDdFWwXxHhms".indexOf(t.component))if("Y"===t.component&&-1!==t.n&&(r%=Math.pow(10,t.n)),t.names){if("M"===t.component||"x"===t.component)r=E[r-1];else{if("F"!==t.component)throw{code:"D3133",value:t.component};r=A[r]}t.names===y.UPPER?r=r.toUpperCase():t.names===y.LOWER&&(r=r.toLowerCase()),t.width&&r.length>t.width.max&&(r=r.substring(0,t.width.max))}else r=m(r,t.integerFormat);else if("f"===t.component)r=m(r,t.integerFormat);else if("Z"===t.component||"z"===t.component){const e=100*n+i;if(t.integerFormat.regular)r=m(e,t.integerFormat);else{const a=t.integerFormat.mandatoryDigits;if(1===a||2===a)r=m(n,t.integerFormat),0!==i&&(r+=":"+v(i,"00"));else{if(3!==a&&4!==a)throw{code:"D3134",value:a};r=m(e,t.integerFormat)}}e>=0&&(r="+"+r),"z"===t.component&&(r="GMT"+r),0===e&&"t"===t.presentation2&&(r="Z")}return r};let o;void 0===t?(null===M&&(M=w("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),o=M):o=w(t);const s=new Date(e+60*(60*n+i)*1e3);let u="";return o.parts.forEach((function(e){"literal"===e.type?u+=e.value:u+=a(s,e)})),u}function j(e){var t={};if("datetime"===e.type)t.type="datetime",t.parts=e.parts.map((function(e){var t={};if("literal"===e.type)t.regex=e.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===e.component||"z"===e.component){let r;Array.isArray(e.integerFormat.groupingSeparators)||(r=e.integerFormat.groupingSeparators),t.regex="","z"===e.component&&(t.regex="GMT"),t.regex+="[-+][0-9]+",r&&(t.regex+=r.character+"[0-9]+"),t.parse=function(t){"z"===e.component&&(t=t.substring(3));let n=0,i=0;return r?(n=Number.parseInt(t.substring(0,t.indexOf(r.character))),i=Number.parseInt(t.substring(t.indexOf(r.character)+1))):t.length-1<=2?n=Number.parseInt(t):(n=Number.parseInt(t.substring(0,3)),i=Number.parseInt(t.substring(3))),60*n+i}}else if(e.integerFormat)e.integerFormat.n=e.n,t=j(e.integerFormat);else{t.regex="[a-zA-Z]+";var r={};if("M"===e.component||"x"===e.component)E.forEach((function(t,n){e.width&&e.width.max?r[t.substring(0,e.width.max)]=n+1:r[t]=n+1}));else if("F"===e.component)A.forEach((function(t,n){n>0&&(e.width&&e.width.max?r[t.substring(0,e.width.max)]=n:r[t]=n)}));else{if("P"!==e.component)throw{code:"D3133",value:e.component};r={am:0,AM:0,pm:1,PM:1}}t.parse=function(e){return r[e]}}return t.component=e.component,t}));else{t.type="integer";const r=e.case===y.UPPER;let n;switch(n=e.n&&e.n>0?0===e.optionalDigits?`{${e.n}}`:`{${e.n-e.optionalDigits},${e.n}}`:"+",e.primary){case g.LETTERS:t.regex=r?"[A-Z]+":"[a-z]+",t.parse=function(e){return h(e,r?"A":"a")};break;case g.ROMAN:t.regex=r?"[MDCLXVI]+":"[mdclxvi]+",t.parse=function(e){return f(r?e:e.toUpperCase())};break;case g.WORDS:t.regex="(?:"+Object.keys(s).concat("and","[\\-, ]").join("|")+")+",t.parse=function(e){return u(e.toLowerCase())};break;case g.DECIMAL:t.regex=`[0-9]${n}`,e.ordinal&&(t.regex+="(?:th|st|nd|rd)"),t.parse=function(t){let r=t;return e.ordinal&&(r=t.substring(0,t.length-2)),e.regular?r=r.split(",").join(""):e.groupingSeparators.forEach((e=>{r=r.split(e.character).join("")})),48!==e.zeroCode&&(r=r.split("").map((t=>String.fromCodePoint(t.codePointAt(0)-e.zeroCode+48))).join("")),parseInt(r)};break;case g.SEQUENCE:throw{code:"D3130",value:e.token}}}return t}function U(e,t){if(void 0!==e)return j(k(t)).parse(e)}function F(e,t){const r=j(w(t)),n="^"+r.parts.map((e=>"("+e.regex+")")).join("")+"$";var i=new RegExp(n,"i").exec(e);if(null!==i){const e=161,t=130,n=84,o=72,s=23,u=47,c={};for(let e=1;e<i.length;e++){const t=r.parts[e-1];t.parse&&(c[t.component]=t.parse(i[e]))}if(0===Object.getOwnPropertyNames(c).length)return;let l=0;const p=e=>{l<<=1,l+=e?1:0},f=e=>!(~e&l||!(e&l));"YXMxWwdD".split("").forEach((e=>p(c[e])));const d=!f(e)&&f(t),h=f(n),v=!h&&f(o);l=0,"PHhmsf".split("").forEach((e=>p(c[e])));const g=!f(s)&&f(u),y=(d?"YD":h?"XxwF":v?"XWF":"YMD")+(g?"Phmsf":"Hmsf"),m=this.environment.timestamp;let b=!1,k=!1;if(y.split("").forEach((e=>{if(void 0===c[e])b?(c[e]=-1!=="MDd".indexOf(e)?1:0,k=!0):c[e]=P(m,e);else if(b=!0,k)throw{code:"D3136"}})),c.M>0?c.M-=1:c.M=0,d){const e=Date.UTC(c.Y,0),t=1e3*(c.d-1)*60*60*24,r=new Date(e+t);c.M=r.getUTCMonth(),c.D=r.getUTCDate()}if(h)throw{code:"D3136"};if(v)throw{code:"D3136"};g&&(c.H=12===c.h?0:c.h,1===c.P&&(c.H+=12));var a=Date.UTC(c.Y,c.M,c.D,c.H,c.m,c.s,c.f);return(c.Z||c.z)&&(a-=60*(c.Z||c.z)*1e3),a}}var N=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function I(e,t){if(void 0!==e){if(void 0===t){if(!N.test(e))throw{stack:(new Error).stack,code:"D3110",value:e};return Date.parse(e)}return F.call(this,e,t)}}function R(e,t,r){if(void 0!==e)return C.call(this,e,t,r)}return{formatInteger:v,parseInteger:U,fromMillis:R,toMillis:I}}();t.exports=i},{"./utils":6}],2:[function(e,r,n){(function(t){(function(){var n=e("./utils");const i=(()=>{var e=n.isNumeric,r=n.isArrayOfStrings,i=n.isArrayOfNumbers,a=n.createSequence,o=n.isSequence,s=n.isFunction,u=n.isLambda,c=n.isIterable,l=n.getFunctionArity,p=n.isDeepEqual,f=n.stringToArray;function d(e){if(void 0!==e){var t=0;return e.forEach((function(e){t+=e})),t}}function h(e){return void 0===e?0:e.length}function v(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)}function g(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)}function y(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach((function(e){t+=e})),t/e.length}}function m(t,r=!1){if(void 0!==t){var n;if("string"==typeof t)n=t;else if(s(t))n="";else{if("number"==typeof t&&!isFinite(t))throw{code:"D3001",value:t,stack:(new Error).stack};var i=r?2:0;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),n=JSON.stringify(t,(function(t,r){return null!=r&&r.toPrecision&&e(r)?Number(r.toPrecision(15)):r&&s(r)?"":r}),i)}return n}}function b(e,t,r){if(void 0!==e){var n=f(e),i=n.length;if(i+t<0&&(t=0),void 0!==r){if(r<=0)return"";var a=t>=0?t+r:i+t+r;return n.slice(t,a).join("")}return n.slice(t).join("")}}function k(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(0,r):e}}function x(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(r+t.length):e}}function w(e){if(void 0!==e)return e.toLowerCase()}function A(e){if(void 0!==e)return e.toUpperCase()}function E(e){if(void 0!==e)return f(e).length}function D(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}}function T(e,t,r){if(void 0!==e){var n;void 0!==r&&0!==r.length||(r=" ");var i=Math.abs(t)-E(e);if(i>0){var a=new Array(i+1).join(r);r.length>1&&(a=b(a,0,i)),n=t>0?e+a:a+e}else n=e;return n}}function*S(e,t){var r=e.apply(this,[t]);if(c(r)&&(r=yield*r),r&&"number"!=typeof r.start&&"number"!==r.end&&!Array.isArray(r.groups)&&!s(r.next))throw{code:"T1010",stack:(new Error).stack};return r}function*O(e,t){if(void 0!==e)return"string"==typeof t?-1!==e.indexOf(t):void 0!==(yield*S(t,e))}function*P(e,t,r){if(void 0!==e){if(r<0)throw{stack:(new Error).stack,value:r,code:"D3040",index:3};var n=a();if(void 0===r||r>0){var i=0,o=yield*S(t,e);if(void 0!==o)for(;void 0!==o&&(void 0===r||i<r);)n.push({match:o.match,index:o.start,groups:o.groups}),o=yield*S(o.next),i++}return n}}function*M(e,t,r,n){if(void 0!==e){var i,a=this;if(""===t)throw{code:"D3010",stack:(new Error).stack,value:t,index:2};if(n<0)throw{code:"D3011",stack:(new Error).stack,value:n,index:4};i="string"==typeof r?function(e){for(var t="",n=0,i=r.indexOf("$",n);-1!==i&&n<r.length;){t+=r.substring(n,i),n=i+1;var a=r.charAt(n);if("$"===a)t+="$",n++;else if("0"===a)t+=e.match,n++;else{var o;if(o=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*Math.LOG10E)+1,i=parseInt(r.substring(n,n+o),10),o>1&&i>e.groups.length&&(i=parseInt(r.substring(n,n+o-1),10)),isNaN(i))t+="$";else{if(e.groups.length>0){var s=e.groups[i-1];void 0!==s&&(t+=s)}n+=i.toString().length}}i=r.indexOf("$",n)}return t+=r.substring(n)}:r;var o="",s=0;if(void 0===n||n>0){var u=0;if("string"==typeof t){for(var l=e.indexOf(t,s);-1!==l&&(void 0===n||u<n);)o+=e.substring(s,l),o+=r,s=l+t.length,u++,l=e.indexOf(t,s);o+=e.substring(s)}else{var p=yield*S(t,e);if(void 0!==p){for(;void 0!==p&&(void 0===n||u<n);){o+=e.substring(s,p.start);var f=i.apply(a,[p]);if(c(f)&&(f=yield*f),"string"!=typeof f)throw{code:"D3012",stack:(new Error).stack,value:f};o+=f,s=p.start+p.match.length,u++,p=yield*S(p.next)}o+=e.substring(s)}else o=e}}else o=e;return o}}function C(e){if(void 0!==e){var r="undefined"!=typeof window?window.btoa:function(e){return new t.Buffer.from(e,"binary").toString("base64")};return r(e)}}function j(e){if(void 0!==e){var r="undefined"!=typeof window?window.atob:function(e){return new t.Buffer.from(e,"base64").toString("binary")};return r(e)}}function U(e){if(void 0!==e){var t;try{t=encodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrlComponent"}}return t}}function F(e){if(void 0!==e){var t;try{t=encodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrl"}}return t}}function N(e){if(void 0!==e){var t;try{t=decodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrlComponent"}}return t}}function I(e){if(void 0!==e){var t;try{t=decodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrl"}}return t}}function*R(e,t,r){if(void 0!==e){if(r<0)throw{code:"D3020",stack:(new Error).stack,value:r,index:3};var n=[];if(void 0===r||r>0)if("string"==typeof t)n=e.split(t,r);else{var i=0,a=yield*S(t,e);if(void 0!==a){for(var o=0;void 0!==a&&(void 0===r||i<r);)n.push(e.substring(o,a.start)),o=a.end,a=yield*S(a.next),i++;(void 0===r||i<r)&&n.push(e.substring(o))}else n.push(e)}return n}}function z(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)}function $(e,t,r){if(void 0!==e){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&Object.keys(r).forEach((function(e){n[e]=r[e]}));for(var i=[],a=n["zero-digit"].charCodeAt(0),o=a;o<a+10;o++)i.push(String.fromCharCode(o));var s=i.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),u=t.split(n["pattern-separator"]);if(u.length>2)throw{code:"D3080",stack:(new Error).stack};var c=function(e){var t,r,i,a,o=function(){for(var t,r=0;r<e.length;r++)if(t=e.charAt(r),-1!==s.indexOf(t)&&t!==n["exponent-separator"])return e.substring(0,r)}(),u=function(){for(var t,r=e.length-1;r>=0;r--)if(t=e.charAt(r),-1!==s.indexOf(t)&&t!==n["exponent-separator"])return e.substring(r+1)}(),c=e.substring(o.length,e.length-u.length),l=e.indexOf(n["exponent-separator"],o.length);-1===l||l>e.length-u.length?(t=c,r=void 0):(t=c.substring(0,l),r=c.substring(l+1));var p=t.indexOf(n["decimal-separator"]);return-1===p?(i=t,a=u):(i=t.substring(0,p),a=t.substring(p+1)),{prefix:o,suffix:u,activePart:c,mantissaPart:t,exponentPart:r,integerPart:i,fractionalPart:a,subpicture:e}},l=function(e){var t,r,a=e.subpicture,o=a.indexOf(n["decimal-separator"]);o!==a.lastIndexOf(n["decimal-separator"])&&(t="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(t="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(t="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(t="D3084");var u=!1;for(r=0;r<e.mantissaPart.length;r++){var c=e.mantissaPart.charAt(r);if(-1!==i.indexOf(c)||c===n.digit){u=!0;break}}u||(t="D3085"),-1!==e.activePart.split("").map((function(e){return-1===s.indexOf(e)?"p":"a"})).join("").indexOf("p")&&(t="D3086"),-1!==o?a.charAt(o-1)!==n["grouping-separator"]&&a.charAt(o+1)!==n["grouping-separator"]||(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===n["grouping-separator"]&&(t="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(t="D3089");var l=e.integerPart.indexOf(n.digit);-1!==l&&e.integerPart.substring(0,l).split("").filter((function(e){return i.indexOf(e)>-1})).length>0&&(t="D3090"),-1!==(l=e.fractionalPart.lastIndexOf(n.digit))&&e.fractionalPart.substring(l).split("").filter((function(e){return i.indexOf(e)>-1})).length>0&&(t="D3091");var p="string"==typeof e.exponentPart;if(p&&e.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(t="D3092"),p&&(0===e.exponentPart.length||e.exponentPart.split("").filter((function(e){return-1===i.indexOf(e)})).length>0)&&(t="D3093"),t)throw{code:t,stack:(new Error).stack}},p=function(e){var t=function(t,r){for(var a=[],o=t.indexOf(n["grouping-separator"]);-1!==o;){var s=(r?t.substring(0,o):t.substring(o)).split("").filter((function(e){return-1!==i.indexOf(e)||e===n.digit})).length;a.push(s),o=e.integerPart.indexOf(n["grouping-separator"],o+1)}return a},r=t(e.integerPart),a=function(e){if(0===e.length)return 0;for(var t=function(e,r){return 0===r?e:t(r,e%r)},r=e.reduce(t),n=1;n<=e.length;n++)if(-1===e.indexOf(n*r))return 0;return r}(r),o=t(e.fractionalPart,!0),s=e.integerPart.split("").filter((function(e){return-1!==i.indexOf(e)})).length,u=s,c=e.fractionalPart.split(""),l=c.filter((function(e){return-1!==i.indexOf(e)})).length,p=c.filter((function(e){return-1!==i.indexOf(e)||e===n.digit})).length,f="string"==typeof e.exponentPart;0===s&&0===p&&(f?(l=1,p=1):s=1),f&&0===s&&-1!==e.integerPart.indexOf(n.digit)&&(s=1),0===s&&0===l&&(l=1);var d=0;return f&&(d=e.exponentPart.split("").filter((function(e){return-1!==i.indexOf(e)})).length),{integerPartGroupingPositions:r,regularGrouping:a,minimumIntegerPartSize:s,scalingFactor:u,prefix:e.prefix,fractionalPartGroupingPositions:o,minimumFactionalPartSize:l,maximumFactionalPartSize:p,minimumExponentSize:d,suffix:e.suffix,picture:e.subpicture}},f=u.map(c);f.forEach(l);var d,h,v,g,y=f.map(p),m=n["minus-sign"],b=n["zero-digit"],k=n["decimal-separator"],x=n["grouping-separator"];if(1===y.length&&(y.push(JSON.parse(JSON.stringify(y[0]))),y[1].prefix=m+y[1].prefix),h=-1!==(d=e>=0?y[0]:y[1]).picture.indexOf(n.percent)?100*e:-1!==d.picture.indexOf(n["per-mille"])?1e3*e:e,0===d.minimumExponentSize)v=h;else{var w=Math.pow(10,d.scalingFactor),A=Math.pow(10,d.scalingFactor-1);for(v=h,g=0;v<A;)v*=10,g-=1;for(;v>w;)v/=10,g+=1}var E=function(e,t){var r=Math.abs(e).toFixed(t);return"0"!==b&&(r=r.split("").map((function(e){return e>="0"&&e<="9"?i[e.charCodeAt(0)-48]:e})).join("")),r},D=E(H(v,d.maximumFactionalPartSize),d.maximumFactionalPartSize),T=D.indexOf(".");for(-1===T?D+=k:D=D.replace(".",k);D.charAt(0)===b;)D=D.substring(1);for(;D.charAt(D.length-1)===b;)D=D.substring(0,D.length-1);T=D.indexOf(k);var S=d.minimumIntegerPartSize-T,O=d.minimumFactionalPartSize-(D.length-T-1);if(D=(S>0?new Array(S+1).join(b):"")+D,D+=O>0?new Array(O+1).join(b):"",T=D.indexOf(k),d.regularGrouping>0)for(var P=Math.floor((T-1)/d.regularGrouping),M=1;M<=P;M++)D=[D.slice(0,T-M*d.regularGrouping),x,D.slice(T-M*d.regularGrouping)].join("");else d.integerPartGroupingPositions.forEach((function(e){D=[D.slice(0,T-e),x,D.slice(T-e)].join(""),T++}));if(T=D.indexOf(k),d.fractionalPartGroupingPositions.forEach((function(e){D=[D.slice(0,e+T+1),x,D.slice(e+T+1)].join("")})),T=D.indexOf(k),-1!==d.picture.indexOf(k)&&T!==D.length-1||(D=D.substring(0,D.length-1)),void 0!==g){var C=E(g,0);(S=d.minimumExponentSize-C.length)>0&&(C=new Array(S+1).join(b)+C),D=D+n["exponent-separator"]+(g<0?m:"")+C}return D=d.prefix+D+d.suffix}}function L(e,t){if(void 0!==e){if(e=H(e),(t=void 0===t?10:H(t))<2||t>36)throw{code:"D3100",stack:(new Error).stack,value:t};return e.toString(t)}}function q(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else if("string"==typeof e&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)&&!isNaN(parseFloat(e))&&isFinite(e))t=parseFloat(e);else if(!0===e)t=1;else{if(!1!==e)throw{code:"D3030",value:e,stack:(new Error).stack,index:1};t=0}return t}}function W(e){if(void 0!==e)return Math.abs(e)}function _(e){if(void 0!==e)return Math.floor(e)}function Y(e){if(void 0!==e)return Math.ceil(e)}function H(e,t){var r;if(void 0!==e){if(t){var n=e.toString().split("e");e=+(n[0]+"e"+(n[1]?+n[1]+t:t))}var i=(r=Math.round(e))-e;return.5===Math.abs(i)&&1===Math.abs(r%2)&&(r-=1),t&&(n=r.toString().split("e"),r=+(n[0]+"e"+(n[1]?+n[1]-t:-t))),Object.is(r,-0)&&(r=0),r}}function Z(e){if(void 0!==e){if(e<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}}function G(e,t){var r;if(void 0!==e){if(r=Math.pow(e,t),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:e,exp:t};return r}}function B(){return Math.random()}function J(t){if(void 0!==t){var r=!1;return Array.isArray(t)?1===t.length?r=J(t[0]):t.length>1&&(r=t.filter((function(e){return J(e)})).length>0):"string"==typeof t?t.length>0&&(r=!0):e(t)?0!==t&&(r=!0):null!==t&&"object"==typeof t?Object.keys(t).length>0&&(r=!0):"boolean"==typeof t&&!0===t&&(r=!0),r}}function X(e){if(void 0!==e)return!J(e)}function Q(e,t,r,n){var i=[t],a=l(e);return a>=2&&i.push(r),a>=3&&i.push(n),i}function*V(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=Q(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}}function*K(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=e[n],o=Q(t,i,n,e);J(yield*t.apply(this,o))&&r.push(i)}return r}}function*ee(e,t){if(void 0!==e){for(var r,n=!1,i=0;i<e.length;i++){var a=e[i],o=!0;if(void 0!==t){var s=Q(t,a,i,e);o=J(yield*t.apply(this,s))}if(o){if(n)throw{stack:(new Error).stack,code:"D3138",index:i};r=a,n=!0}}if(!n)throw{stack:(new Error).stack,code:"D3139"};return r}}function te(){for(var e=[],t=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,t.map((function(e){return Array.isArray(e)?e.length:0}))),n=0;n<r;n++){var i=t.map((e=>e[n]));e.push(i)}return e}function*re(e,t,r){if(void 0!==e){var n,i,a=l(t);if(a<2)throw{stack:(new Error).stack,code:"D3050",index:1};for(void 0===r&&e.length>0?(n=e[0],i=1):(n=r,i=0);i<e.length;){var o=[n,e[i]];a>=3&&o.push(i),a>=4&&o.push(e),n=yield*t.apply(this,o),i++}return n}}function ne(e){var t=a();if(Array.isArray(e)){var r={};e.forEach((function(e){ne(e).forEach((function(e){r[e]=!0}))})),t=ne(r)}else null===e||"object"!=typeof e||u(e)||Object.keys(e).forEach((e=>t.push(e)));return t}function ie(e,t){var r;if(Array.isArray(e)){r=a();for(var n=0;n<e.length;n++){var i=ie(e[n],t);void 0!==i&&(Array.isArray(i)?i.forEach((e=>r.push(e))):r.push(i))}}else null!==e&&"object"==typeof e&&(r=e[t]);return r}function ae(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=a(e)),Array.isArray(t)||(t=[t]),e.concat(t))}function oe(e){return void 0!==e}function se(e){var t=a();if(Array.isArray(e))e.forEach((function(e){t=ae(t,se(e))}));else if(null===e||"object"!=typeof e||u(e))t=e;else for(var r in e){var n={};n[r]=e[r],t.push(n)}return t}function ue(e){if(void 0!==e){var t={};return e.forEach((function(e){for(var r in e)t[r]=e[r]})),t}}function ce(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[t-n-1]=e[n];return r}}function*le(e,t){var r=a();for(var n in e){var i=Q(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}function pe(e){throw{code:"D3137",stack:(new Error).stack,message:e||"$error() function evaluated"}}function fe(e,t){if(!e)throw{code:"D3141",stack:(new Error).stack,message:t||"$assert() statement failed"}}function de(t){if(void 0!==t)return null===t?"null":e(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":s(t)?"function":"object"}function*he(e,t){if(void 0!==e){if(e.length<=1)return e;var n;if(void 0===t){if(!i(e)&&!r(e))throw{stack:(new Error).stack,code:"D3070",index:1};n=function*(e,t){return e>t}}else n=t;var a=function*(e,t){var r=function*(e,t,i){0===t.length?Array.prototype.push.apply(e,i):0===i.length?Array.prototype.push.apply(e,t):(yield*n(t[0],i[0]))?(e.push(i[0]),yield*r(e,t,i.slice(1))):(e.push(t[0]),yield*r(e,t.slice(1),i))},i=[];return yield*r(i,e,t),i},o=function*(e){if(!Array.isArray(e)||e.length<=1)return e;var t=Math.floor(e.length/2),r=e.slice(0,t),n=e.slice(t);return r=yield*o(r),n=yield*o(n),yield*a(r,n)};return yield*o(e)}}function ve(e){if(void 0!==e){if(e.length<=1)return e;for(var t=new Array(e.length),r=0;r<e.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(t[r]=t[n]),t[n]=e[r]}return t}}function ge(e){if(void 0!==e){if(!Array.isArray(e)||e.length<=1)return e;for(var t=o(e)?a():[],r=0;r<e.length;r++){for(var n=e[r],i=!1,s=0;s<t.length;s++)if(p(n,t[s])){i=!0;break}i||t.push(n)}return t}}function*ye(e,t){var r={};for(var n in e){var i=e[n],a=Q(t,i,n,e);J(yield*t.apply(this,a))&&(r[n]=i)}return 0===Object.keys(r).length&&(r=void 0),r}return{sum:d,count:h,max:v,min:g,average:y,string:m,substring:b,substringBefore:k,substringAfter:x,lowercase:w,uppercase:A,length:E,trim:D,pad:T,match:P,contains:O,replace:M,split:R,join:z,formatNumber:$,formatBase:L,number:q,floor:_,ceil:Y,round:H,abs:W,sqrt:Z,power:G,random:B,boolean:J,not:X,map:V,zip:te,filter:K,single:ee,foldLeft:re,sift:ye,keys:ne,lookup:ie,append:ae,exists:oe,spread:se,merge:ue,reverse:ce,each:le,error:pe,assert:fe,type:de,sort:he,shuffle:ve,distinct:ge,base64encode:C,base64decode:j,encodeUrlComponent:U,encodeUrl:F,decodeUrlComponent:N,decodeUrl:I}})();r.exports=i}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(e,t,r){var n=e("./datetime"),i=e("./functions"),a=e("./utils"),o=e("./parser"),s=e("./signature"),u=function(){var e=a.isNumeric,t=a.isArrayOfStrings,r=a.isArrayOfNumbers,u=a.createSequence,c=a.isSequence,l=a.isFunction,p=a.isLambda,f=a.isIterable,d=a.getFunctionArity,h=a.isDeepEqual,v=le(null);function*g(e,t,r){var n,i=r.lookup("__evaluate_entry");switch(i&&i(e,t,r),e.type){case"path":n=yield*y(e,t,r);break;case"binary":n=yield*A(e,t,r);break;case"unary":n=yield*E(e,t,r);break;case"name":n=D(e,t);break;case"string":case"number":case"value":n=T(e);break;case"wildcard":n=S(e,t);break;case"descendant":n=P(e,t);break;case"parent":n=r.lookup(e.slot.label);break;case"condition":n=yield*W(e,t,r);break;case"block":n=yield*_(e,t,r);break;case"bind":n=yield*q(e,t,r);break;case"regex":n=Y(e);break;case"function":n=yield*X(e,t,r);break;case"variable":n=H(e,t,r);break;case"lambda":n=K(e,t,r);break;case"partial":n=yield*ee(e,t,r);break;case"apply":n=yield*J(e,t,r);break;case"transform":n=G(e,t,r)}if(!r.async||null!=n&&"function"==typeof n.then||(n=Promise.resolve(n)),r.async&&"function"==typeof n.then&&e.nextFunction&&"function"==typeof n[e.nextFunction]||(n=yield n),Object.prototype.hasOwnProperty.call(e,"predicate"))for(var a=0;a<e.predicate.length;a++)n=yield*w(e.predicate[a].expr,n,r);"path"!==e.type&&Object.prototype.hasOwnProperty.call(e,"group")&&(n=yield*z(e.group,n,r));var o=r.lookup("__evaluate_exit");return o&&o(e,t,r,n),n&&c(n)&&!n.tupleStream&&(e.keepArray&&(n.keepSingleton=!0),0===n.length?n=void 0:1===n.length&&(n=n.keepSingleton?n:n[0])),n}function*y(e,t,r){var n,i;n=Array.isArray(t)&&"variable"!==e.steps[0].type?t:u(t);for(var a=!1,o=void 0,s=0;s<e.steps.length;s++){var c=e.steps[s];if(c.tuple&&(a=!0),0===s&&c.consarray?i=yield*g(c,n,r):a?o=yield*x(c,n,o,r):i=yield*b(c,n,r,s===e.steps.length-1),!a&&(void 0===i||0===i.length))break;void 0===c.focus&&(n=i)}if(a)if(e.tuple)i=o;else for(i=u(),s=0;s<o.length;s++)i.push(o[s]["@"]);return e.keepSingletonArray&&(Array.isArray(i)&&i.cons&&!i.sequence&&(i=u(i)),i.keepSingleton=!0),e.hasOwnProperty("group")&&(i=yield*z(e.group,a?o:i,r)),i}function m(e,t){var r=le(e);for(const e in t)r.bind(e,t[e]);return r}function*b(e,t,r,n){var i;if("sort"===e.type)return i=yield*Z(e,t,r),e.stages&&(i=yield*k(e.stages,i,r)),i;i=u();for(var a=0;a<t.length;a++){var o=yield*g(e,t[a],r);if(e.stages)for(var s=0;s<e.stages.length;s++)o=yield*w(e.stages[s].expr,o,r);void 0!==o&&i.push(o)}var l=u();return n&&1===i.length&&Array.isArray(i[0])&&!c(i[0])?l=i[0]:i.forEach((function(e){!Array.isArray(e)||e.cons?l.push(e):e.forEach((e=>l.push(e)))})),l}function*k(e,t,r){for(var n=t,i=0;i<e.length;i++){var a=e[i];switch(a.type){case"filter":n=yield*w(a.expr,n,r);break;case"index":for(var o=0;o<n.length;o++)n[o][a.value]=o}}return n}function*x(e,t,r,n){var i;if("sort"===e.type){if(r)i=yield*Z(e,r,n);else{var a=yield*Z(e,t,n);(i=u()).tupleStream=!0;for(var o=0;o<a.length;o++){var s={"@":a[o]};s[e.index]=o,i.push(s)}}return e.stages&&(i=yield*k(e.stages,i,n)),i}(i=u()).tupleStream=!0;var c=n;void 0===r&&(r=t.map((e=>({"@":e}))));for(var l=0;l<r.length;l++){c=m(n,r[l]);var p=yield*g(e,r[l]["@"],c);if(void 0!==p){Array.isArray(p)||(p=[p]);for(var f=0;f<p.length;f++)s={},Object.assign(s,r[l]),p.tupleStream?Object.assign(s,p[f]):(e.focus?(s[e.focus]=p[f],s["@"]=r[l]["@"]):s["@"]=p[f],e.index&&(s[e.index]=f),e.ancestor&&(s[e.ancestor.label]=r[l]["@"])),i.push(s)}}return e.stages&&(i=yield*k(e.stages,i,n)),i}function*w(t,n,a){var o=u();if(n&&n.tupleStream&&(o.tupleStream=!0),Array.isArray(n)||(n=u(n)),"number"===t.type){var s=Math.floor(t.value);s<0&&(s=n.length+s),void 0!==(c=n[s])&&(Array.isArray(c)?o=c:o.push(c))}else for(s=0;s<n.length;s++){var c,l=c=n[s],p=a;n.tupleStream&&(l=c["@"],p=m(a,c));var f=yield*g(t,l,p);e(f)&&(f=[f]),r(f)?f.forEach((function(e){var t=Math.floor(e);t<0&&(t=n.length+t),t===s&&o.push(c)})):i.boolean(f)&&o.push(c)}return o}function*A(e,t,r){var n,i=yield*g(e.lhs,t,r),a=e.value,o=function*(){return yield*g(e.rhs,t,r)};if("and"===a||"or"===a)try{return yield*N(i,o,a)}catch(t){throw t.position=e.position,t.token=a,t}var s=yield*o();try{switch(a){case"+":case"-":case"*":case"/":case"%":n=C(i,s,a);break;case"=":case"!=":n=j(i,s,a);break;case"<":case"<=":case">":case">=":n=U(i,s,a);break;case"&":n=R(i,s);break;case"..":n=L(i,s);break;case"in":n=F(i,s)}}catch(t){throw t.position=e.position,t.token=a,t}return n}function*E(t,r,n){var a;switch(t.value){case"-":if(void 0===(a=yield*g(t.expression,r,n)))a=void 0;else{if(!e(a))throw{code:"D1002",stack:(new Error).stack,position:t.position,token:t.value,value:a};a=-a}break;case"[":a=[];for(var o=0;o<t.expressions.length;o++){var s=t.expressions[o],u=yield*g(s,r,n);void 0!==u&&("["===s.value?a.push(u):a=i.append(a,u))}t.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=yield*z(t,r,n)}return a}function D(e,t,r){return i.lookup(t,e.value)}function T(e){return e.value}function S(e,t){var r=u();return Array.isArray(t)&&t.outerWrapper&&t.length>0&&(t=t[0]),null!==t&&"object"==typeof t&&Object.keys(t).forEach((function(e){var n=t[e];Array.isArray(n)?(n=O(n),r=i.append(r,n)):r.push(n)})),r}function O(e,t){return void 0===t&&(t=[]),Array.isArray(e)?e.forEach((function(e){O(e,t)})):t.push(e),t}function P(e,t){var r,n=u();return void 0!==t&&(M(t,n),r=1===n.length?n[0]:n),r}function M(e,t){Array.isArray(e)||t.push(e),Array.isArray(e)?e.forEach((function(e){M(e,t)})):null!==e&&"object"==typeof e&&Object.keys(e).forEach((function(r){M(e[r],t)}))}function C(t,r,n){var i;if(void 0!==t&&!e(t))throw{code:"T2001",stack:(new Error).stack,value:t};if(void 0!==r&&!e(r))throw{code:"T2002",stack:(new Error).stack,value:r};if(void 0===t||void 0===r)return i;switch(n){case"+":i=t+r;break;case"-":i=t-r;break;case"*":i=t*r;break;case"/":i=t/r;break;case"%":i=t%r}return i}function j(e,t,r){var n;if(void 0===e||void 0===t)return!1;switch(r){case"=":n=h(e,t);break;case"!=":n=!h(e,t)}return n}function U(e,t,r){var n,i=typeof e,a=typeof t;if("undefined"!==i&&"string"!==i&&"number"!==i||"undefined"!==a&&"string"!==a&&"number"!==a)throw{code:"T2010",stack:(new Error).stack,value:"string"!==i&&"number"!==i?e:t};if("undefined"!==i&&"undefined"!==a){if(i!==a)throw{code:"T2009",stack:(new Error).stack,value:e,value2:t};switch(r){case"<":n=e<t;break;case"<=":n=e<=t;break;case">":n=e>t;break;case">=":n=e>=t}return n}}function F(e,t){var r=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++)if(t[n]===e){r=!0;break}return r}function*N(e,t,r){var n,i=I(e);switch(r){case"and":n=i&&I(yield*t());break;case"or":n=i||I(yield*t())}return n}function I(e){var t=i.boolean(e);return void 0!==t&&t}function R(e,t){var r="",n="";return void 0!==e&&(r=i.string(e)),void 0!==t&&(n=i.string(t)),r.concat(n)}function*z(e,t,r){var n={},a={},o=!(!t||!t.tupleStream);Array.isArray(t)||(t=u(t)),0===t.length&&t.push(void 0);for(var s=0;s<t.length;s++)for(var c=t[s],l=o?m(r,c):r,p=0;p<e.lhs.length;p++){var f=e.lhs[p],d=yield*g(f[0],o?c["@"]:c,l);if("string"!=typeof d&&void 0!==d)throw{code:"T1003",stack:(new Error).stack,position:e.position,value:d};if(void 0!==d){var h={data:c,exprIndex:p};if(a.hasOwnProperty(d)){if(a[d].exprIndex!==p)throw{code:"D1009",stack:(new Error).stack,position:e.position,value:d};a[d].data=i.append(a[d].data,c)}else a[d]=h}}for(d in a){var v=(h=a[d]).data;if(l=r,o){var y=$(h.data);v=y["@"],delete y["@"],l=m(r,y)}var b=yield*g(e.lhs[h.exprIndex][1],v,l);void 0!==b&&(n[d]=b)}return n}function $(e){if(!Array.isArray(e))return e;var t={};Object.assign(t,e[0]);for(var r=1;r<e.length;r++)for(const n in e[r])t[n]=i.append(t[n],e[r][n]);return t}function L(e,t){var r;if(void 0!==e&&!Number.isInteger(e))throw{code:"T2003",stack:(new Error).stack,value:e};if(void 0!==t&&!Number.isInteger(t))throw{code:"T2004",stack:(new Error).stack,value:t};if(void 0===e||void 0===t)return r;if(e>t)return r;var n=t-e+1;if(n>1e7)throw{code:"D2014",stack:(new Error).stack,value:n};r=new Array(n);for(var i=e,a=0;i<=t;i++,a++)r[a]=i;return r.sequence=!0,r}function*q(e,t,r){var n=yield*g(e.rhs,t,r);return r.bind(e.lhs.value,n),n}function*W(e,t,r){var n,a=yield*g(e.condition,t,r);return i.boolean(a)?n=yield*g(e.then,t,r):void 0!==e.else&&(n=yield*g(e.else,t,r)),n}function*_(e,t,r){for(var n,i=le(r),a=0;a<e.expressions.length;a++)n=yield*g(e.expressions[a],t,i);return n}function Y(e){var t=new de.RegexEngine(e.value),r=function(n,i){var a;t.lastIndex=i||0;var o=t.exec(n);if(null!==o){if(a={match:o[0],start:o.index,end:o.index+o[0].length,groups:[]},o.length>1)for(var s=1;s<o.length;s++)a.groups.push(o[s]);a.next=function(){if(!(t.lastIndex>=n.length)){var i=r(n,t.lastIndex);if(i&&""===i.match)throw{code:"D1004",stack:(new Error).stack,position:e.position,value:e.value.source};return i}}}return a};return r}function H(e,t,r){return""===e.value?t&&t.outerWrapper?t[0]:t:r.lookup(e.value)}function*Z(e,t,r){var n=t,a=!!t.tupleStream,o=function*(t,n){for(var i=0,o=0;0===i&&o<e.terms.length;o++){var s=e.terms[o],u=t,c=r;a&&(u=t["@"],c=m(r,t));var l=yield*g(s.expression,u,c);u=n,c=r,a&&(u=n["@"],c=m(r,n));var p=yield*g(s.expression,u,c),f=typeof l,d=typeof p;if("undefined"!==f)if("undefined"!==d){if("string"!==f&&"number"!==f||"string"!==d&&"number"!==d)throw{code:"T2008",stack:(new Error).stack,position:e.position,value:"string"!==f&&"number"!==f?l:p};if(f!==d)throw{code:"T2007",stack:(new Error).stack,position:e.position,value:l,value2:p};l!==p&&(i=l<p?-1:1,!0===s.descending&&(i=-i))}else i=-1;else i="undefined"===d?0:1}return 1===i},s={environment:r,input:t};return yield*i.sort.apply(s,[n,o])}function G(e,r,n){return se((function*(r){if(void 0!==r){var i=n.lookup("clone");if(!l(i))throw{code:"T2013",stack:(new Error).stack,position:e.position};var a=yield*Q(i,[r],null,n),o=yield*g(e.pattern,a,n);if(void 0!==o){Array.isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var u=o[s];if(u&&(u.isPrototypeOf(a)||u instanceof Object.constructor))throw{code:"D1010",stack:(new Error).stack,position:e.position};var c=yield*g(e.update,u,n),p=typeof c;if("undefined"!==p){if("object"!==p||null===c||Array.isArray(c))throw{code:"T2011",stack:(new Error).stack,position:e.update.position,value:c};for(var f in c)u[f]=c[f]}if(void 0!==e.delete){var d=yield*g(e.delete,u,n);if(void 0!==d){var h=d;if(Array.isArray(d)||(d=[d]),!t(d))throw{code:"T2012",stack:(new Error).stack,position:e.delete.position,value:h};for(var v=0;v<d.length;v++)"object"==typeof u&&null!==u&&delete u[d[v]]}}}}return a}}),"<(oa):o>")}var B=o("function($f, $g) { function($x){ $g($f($x)) } }");function*J(e,t,r){var n,i=yield*g(e.lhs,t,r);if("function"===e.rhs.type)n=yield*X(e.rhs,t,r,{context:i});else{var a=yield*g(e.rhs,t,r);if(!l(a))throw{code:"T2006",stack:(new Error).stack,position:e.position,value:a};if(l(i)){var o=yield*g(B,null,r);n=yield*Q(o,[i,a],null,r)}else n=yield*Q(a,[i],null,r)}return n}function*X(e,t,r,n){var i,a=yield*g(e.procedure,t,r);if(void 0===a&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1005",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};var o=[];void 0!==n&&o.push(n.context);for(var s=0;s<e.arguments.length;s++){const n=yield*g(e.arguments[s],t,r);if(l(n)){const e=function*(...e){return yield*Q(n,e,null,r)};e.arity=d(n),o.push(e)}else o.push(n)}var u="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value;try{"object"==typeof a&&(a.token=u,a.position=e.position),i=yield*Q(a,o,t,r)}catch(t){throw t.position||(t.position=e.position),t.token||(t.token=u),t}return i}function*Q(e,t,r,n){var i;for(i=yield*V(e,t,r,n);p(i)&&!0===i.thunk;){var a=yield*g(i.body.procedure,i.input,i.environment);"variable"===i.body.procedure.type&&(a.token=i.body.procedure.value),a.position=i.body.procedure.position;for(var o=[],s=0;s<i.body.arguments.length;s++)o.push(yield*g(i.body.arguments[s],i.input,i.environment));i=yield*V(a,o,r,n)}return i}function*V(e,t,r,n){var i;try{var a=t;if(e&&(a=te(e.signature,t,r)),p(e))i=yield*re(e,a);else if(e&&!0===e._jsonata_function){var o={environment:n,input:r};i=e.implementation.apply(o,a),f(i)&&(i=yield*i)}else{if("function"!=typeof e)throw{code:"T1006",stack:(new Error).stack};i=e.apply(r,a),f(i)&&(i=yield*i)}}catch(t){throw e&&(void 0===t.token&&void 0!==e.token&&(t.token=e.token),t.position=e.position||t.position),t}return i}function K(e,t,r){var n={_jsonata_lambda:!0,input:t,environment:r,arguments:e.arguments,signature:e.signature,body:e.body};return!0===e.thunk&&(n.thunk=!0),n.apply=function*(e,r){return yield*Q(n,r,t,e.environment)},n}function*ee(e,t,r){for(var n,i=[],a=0;a<e.arguments.length;a++){var o=e.arguments[a];"operator"===o.type&&"?"===o.value?i.push(o):i.push(yield*g(o,t,r))}var s=yield*g(e.procedure,t,r);if(void 0===s&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1007",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};if(p(s))n=ne(s,i);else if(s&&!0===s._jsonata_function)n=ie(s.implementation,i);else{if("function"!=typeof s)throw{code:"T1008",stack:(new Error).stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};n=ie(s,i)}return n}function te(e,t,r){return void 0===e?t:e.validate(t,r)}function*re(e,t){var r=le(e.environment);return e.arguments.forEach((function(e,n){r.bind(e.value,t[n])})),"function"==typeof e.body?yield*ae(e.body,r):yield*g(e.body,e.input,r)}function ne(e,t){var r=le(e.environment),n=[];return e.arguments.forEach((function(e,i){var a=t[i];a&&"operator"===a.type&&"?"===a.value?n.push(e):r.bind(e.value,a)})),{_jsonata_lambda:!0,input:e.input,environment:r,arguments:n,body:e.body}}function ie(e,t){var r=oe(e),n="function("+(r=r.map((function(e){return"$"+e.trim()}))).join(", ")+"){ _ }",i=o(n);return i.body=e,ne(i,t)}function*ae(e,t){var r=oe(e).map((function(e){return t.lookup(e.trim())})),n={environment:t},i=e.apply(n,r);return f(i)&&(i=yield*i),i}function oe(e){var t=e.toString();return/\(([^)]*)\)/.exec(t)[1].split(",")}function se(e,t){var r={_jsonata_function:!0,implementation:e};return void 0!==t&&(r.signature=s(t)),r}function*ue(e,t){if(void 0!==e){var r=this.input;void 0!==t&&(r=t,Array.isArray(r)&&!c(r)&&((r=u(r)).outerWrapper=!0));try{var n=o(e,!1)}catch(e){throw fe(e),{stack:(new Error).stack,code:"D3120",value:e.message,error:e}}try{var i=yield*g(n,r,this.environment)}catch(e){throw fe(e),{stack:(new Error).stack,code:"D3121",value:e.message,error:e}}return i}}function ce(e){if(void 0!==e)return JSON.parse(i.string(e))}function le(e){var t={};return{bind:function(e,r){t[e]=r},lookup:function(r){var n;return t.hasOwnProperty(r)?n=t[r]:e&&(n=e.lookup(r)),n},timestamp:e?e.timestamp:null,async:!!e&&e.async,global:e?e.global:{ancestry:[null]}}}v.bind("sum",se(i.sum,"<a<n>:n>")),v.bind("count",se(i.count,"<a:n>")),v.bind("max",se(i.max,"<a<n>:n>")),v.bind("min",se(i.min,"<a<n>:n>")),v.bind("average",se(i.average,"<a<n>:n>")),v.bind("string",se(i.string,"<x-b?:s>")),v.bind("substring",se(i.substring,"<s-nn?:s>")),v.bind("substringBefore",se(i.substringBefore,"<s-s:s>")),v.bind("substringAfter",se(i.substringAfter,"<s-s:s>")),v.bind("lowercase",se(i.lowercase,"<s-:s>")),v.bind("uppercase",se(i.uppercase,"<s-:s>")),v.bind("length",se(i.length,"<s-:n>")),v.bind("trim",se(i.trim,"<s-:s>")),v.bind("pad",se(i.pad,"<s-ns?:s>")),v.bind("match",se(i.match,"<s-f<s:o>n?:a<o>>")),v.bind("contains",se(i.contains,"<s-(sf):b>")),v.bind("replace",se(i.replace,"<s-(sf)(sf)n?:s>")),v.bind("split",se(i.split,"<s-(sf)n?:a<s>>")),v.bind("join",se(i.join,"<a<s>s?:s>")),v.bind("formatNumber",se(i.formatNumber,"<n-so?:s>")),v.bind("formatBase",se(i.formatBase,"<n-n?:s>")),v.bind("formatInteger",se(n.formatInteger,"<n-s:s>")),v.bind("parseInteger",se(n.parseInteger,"<s-s:n>")),v.bind("number",se(i.number,"<(nsb)-:n>")),v.bind("floor",se(i.floor,"<n-:n>")),v.bind("ceil",se(i.ceil,"<n-:n>")),v.bind("round",se(i.round,"<n-n?:n>")),v.bind("abs",se(i.abs,"<n-:n>")),v.bind("sqrt",se(i.sqrt,"<n-:n>")),v.bind("power",se(i.power,"<n-n:n>")),v.bind("random",se(i.random,"<:n>")),v.bind("boolean",se(i.boolean,"<x-:b>")),v.bind("not",se(i.not,"<x-:b>")),v.bind("map",se(i.map,"<af>")),v.bind("zip",se(i.zip,"<a+>")),v.bind("filter",se(i.filter,"<af>")),v.bind("single",se(i.single,"<af?>")),v.bind("reduce",se(i.foldLeft,"<afj?:j>")),v.bind("sift",se(i.sift,"<o-f?:o>")),v.bind("keys",se(i.keys,"<x-:a<s>>")),v.bind("lookup",se(i.lookup,"<x-s:x>")),v.bind("append",se(i.append,"<xx:a>")),v.bind("exists",se(i.exists,"<x:b>")),v.bind("spread",se(i.spread,"<x-:a<o>>")),v.bind("merge",se(i.merge,"<a<o>:o>")),v.bind("reverse",se(i.reverse,"<a:a>")),v.bind("each",se(i.each,"<o-f:a>")),v.bind("error",se(i.error,"<s?:x>")),v.bind("assert",se(i.assert,"<bs?:x>")),v.bind("type",se(i.type,"<x:s>")),v.bind("sort",se(i.sort,"<af?:a>")),v.bind("shuffle",se(i.shuffle,"<a:a>")),v.bind("distinct",se(i.distinct,"<x:x>")),v.bind("base64encode",se(i.base64encode,"<s-:s>")),v.bind("base64decode",se(i.base64decode,"<s-:s>")),v.bind("encodeUrlComponent",se(i.encodeUrlComponent,"<s-:s>")),v.bind("encodeUrl",se(i.encodeUrl,"<s-:s>")),v.bind("decodeUrlComponent",se(i.decodeUrlComponent,"<s-:s>")),v.bind("decodeUrl",se(i.decodeUrl,"<s-:s>")),v.bind("eval",se(ue,"<sx?:x>")),v.bind("toMillis",se(n.toMillis,"<s-s?:n>")),v.bind("fromMillis",se(n.fromMillis,"<n-s?s?:s>")),v.bind("clone",se(ce,"<(oa)-:o>"));var pe={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",D1010:"Attempted to access the Javascript object prototype",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function fe(e){var t=pe[e.code];if(void 0!==t){var r=t.replace(/\{\{\{([^}]+)}}}/g,(function(){return e[arguments[1]]}));r=r.replace(/\{\{([^}]+)}}/g,(function(){return JSON.stringify(e[arguments[1]])})),e.message=r}}function de(e,t){var r,i;try{r=o(e,t&&t.recover),i=r.errors,delete r.errors}catch(e){throw fe(e),e}var a=le(v),s=new Date;return a.bind("now",se((function(e,t){return n.fromMillis(s.getTime(),e,t)}),"<s?s?:s>")),a.bind("millis",se((function(){return s.getTime()}),"<:n>")),t&&t.RegexEngine?de.RegexEngine=t.RegexEngine:de.RegexEngine=RegExp,{evaluate:function(e,t,n){if(void 0!==i){var o={code:"S0500",position:0};throw fe(o),o}var l,p,f;if(void 0!==t)for(var d in l=le(a),t)l.bind(d,t[d]);else l=a;if(l.bind("$",e),s=new Date,l.timestamp=s,Array.isArray(e)&&!c(e)&&((e=u(e)).outerWrapper=!0),"function"==typeof n){l.async=!0;var h=function(e){fe(e),n(e,null)},v=function(e){(p=f.next(e)).done?n(null,p.value):p.value.then(v).catch(h)};f=g(r,e,l),(p=f.next()).value.then(v).catch(h)}else try{for(f=g(r,e,l),p=f.next();!p.done;)p=f.next(p.value);return p.value}catch(o){throw fe(o),o}},assign:function(e,t){a.bind(e,t)},registerFunction:function(e,t,r){var n=se(t,r);a.bind(e,n)},ast:function(){return r},errors:function(){return i}}}return de.parser=o,de}();t.exports=u},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(e,t,r){var n=e("./signature");const i=(a={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(e){var t=0,r=e.length,n=function(e,r){return{type:e,value:r,position:t}},i=function(){for(var n,i,a=t,o=0;t<r;){var s=e.charAt(t);if("/"===s&&"\\"!==e.charAt(t-1)&&0===o){if(""===(n=e.substring(a,t)))throw{code:"S0301",stack:(new Error).stack,position:t};for(t++,s=e.charAt(t),a=t;"i"===s||"m"===s;)t++,s=e.charAt(t);return i=e.substring(a,t)+"g",new RegExp(n,i)}"("!==s&&"["!==s&&"{"!==s||"\\"===e.charAt(t-1)||o++,")"!==s&&"]"!==s&&"}"!==s||"\\"===e.charAt(t-1)||o--,t++}throw{code:"S0302",stack:(new Error).stack,position:t}},s=function(u){if(t>=r)return null;for(var c=e.charAt(t);t<r&&" \t\n\r\v".indexOf(c)>-1;)t++,c=e.charAt(t);if("/"===c&&"*"===e.charAt(t+1)){var l=t;for(t+=2,c=e.charAt(t);"*"!==c||"/"!==e.charAt(t+1);)if(c=e.charAt(++t),t>=r)throw{code:"S0106",stack:(new Error).stack,position:l};return t+=2,c=e.charAt(t),s(u)}if(!0!==u&&"/"===c)return t++,n("regex",i());if("."===c&&"."===e.charAt(t+1))return t+=2,n("operator","..");if(":"===c&&"="===e.charAt(t+1))return t+=2,n("operator",":=");if("!"===c&&"="===e.charAt(t+1))return t+=2,n("operator","!=");if(">"===c&&"="===e.charAt(t+1))return t+=2,n("operator",">=");if("<"===c&&"="===e.charAt(t+1))return t+=2,n("operator","<=");if("*"===c&&"*"===e.charAt(t+1))return t+=2,n("operator","**");if("~"===c&&">"===e.charAt(t+1))return t+=2,n("operator","~>");if(Object.prototype.hasOwnProperty.call(a,c))return t++,n("operator",c);if('"'===c||"'"===c){var p=c;t++;for(var f="";t<r;){if("\\"===(c=e.charAt(t)))if(t++,c=e.charAt(t),Object.prototype.hasOwnProperty.call(o,c))f+=o[c];else{if("u"!==c)throw{code:"S0103",stack:(new Error).stack,position:t,token:c};var d=e.substr(t+1,4);if(!/^[0-9a-fA-F]+$/.test(d))throw{code:"S0104",stack:(new Error).stack,position:t};var h=parseInt(d,16);f+=String.fromCharCode(h),t+=4}else{if(c===p)return t++,n("string",f);f+=c}t++}throw{code:"S0101",stack:(new Error).stack,position:t}}var v,g=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(e.substring(t));if(null!==g){var y=parseFloat(g[0]);if(!isNaN(y)&&isFinite(y))return t+=g[0].length,n("number",y);throw{code:"S0102",stack:(new Error).stack,position:t,token:g[0]}}if("`"===c){t++;var m=e.indexOf("`",t);if(-1!==m)return v=e.substring(t,m),t=m+1,n("name",v);throw t=r,{code:"S0105",stack:(new Error).stack,position:t}}for(var b,k=t;;)if(b=e.charAt(k),k===r||" \t\n\r\v".indexOf(b)>-1||Object.prototype.hasOwnProperty.call(a,b)){if("$"===e.charAt(t))return v=e.substring(t+1,k),t=k,n("variable",v);switch(v=e.substring(t,k),t=k,v){case"or":case"in":case"and":return n("operator",v);case"true":return n("value",!0);case"false":return n("value",!1);case"null":return n("value",null);default:return t===r&&""===v?null:n("name",v)}}else k++};return s},function(e,t){var r,i,o={},u=[],c=function(){var e=[];"(end)"!==r.id&&e.push({type:r.type,value:r.value,position:r.position});for(var t=i();null!==t;)e.push(t),t=i();return e},l={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(t)return e.remaining=c(),e.type="error",u.push(e),e;throw e.stack=(new Error).stack,e}},p=function(e,t){var r=o[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=Object.create(l)).id=r.value=e,r.lbp=t,o[e]=r),r},f=function(e){if(t){e.remaining=c(),u.push(e);var n=o["(error)"];return(r=Object.create(n)).error=e,r.type="(error)",r}throw e.stack=(new Error).stack,e},d=function(t,n){if(t&&r.id!==t){var a={code:"(end)"===r.id?"S0203":"S0202",position:r.position,token:r.value,value:t};return f(a)}var s=i(n);if(null===s)return(r=o["(end)"]).position=e.length,r;var u,c=s.value,l=s.type;switch(l){case"name":case"variable":u=o["(name)"];break;case"operator":if(!(u=o[c]))return f({code:"S0204",stack:(new Error).stack,position:s.position,token:c});break;case"string":case"number":case"value":u=o["(literal)"];break;case"regex":l="regex",u=o["(regex)"];break;default:return f({code:"S0205",stack:(new Error).stack,position:s.position,token:c})}return(r=Object.create(u)).value=c,r.type=l,r.position=s.position,r},h=function(e){var t,n=r;for(d(null,!0),t=n.nud();e<r.lbp;)n=r,d(),t=n.led(t);return t},v=function(e){p(e,0).nud=function(){return this}},g=function(e,t,r){var n=t||a[e],i=p(e,n);return i.led=r||function(e){return this.lhs=e,this.rhs=h(n),this.type="binary",this},i},y=function(e,t,r){var n=p(e,t);return n.led=r,n},m=function(e,t){var r=p(e);return r.nud=t||function(){return this.expression=h(70),this.type="unary",this},r};v("(end)"),v("(name)"),v("(literal)"),v("(regex)"),p(":"),p(";"),p(","),p(")"),p("]"),p("}"),p(".."),g("."),g("+"),g("-"),g("*"),g("/"),g("%"),g("="),g("<"),g(">"),g("!="),g("<="),g(">="),g("&"),g("and"),g("or"),g("in"),v("and"),v("or"),v("in"),m("-"),g("~>"),y("(error)",10,(function(e){return this.lhs=e,this.error=r.error,this.remaining=c(),this.type="error",this})),m("*",(function(){return this.type="wildcard",this})),m("**",(function(){return this.type="descendant",this})),m("%",(function(){return this.type="parent",this})),g("(",a["("],(function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==r.id)for(;"operator"===r.type&&"?"===r.id?(this.type="partial",this.arguments.push(r),d("?")):this.arguments.push(h(0)),","===r.id;)d(",");if(d(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach((function(e,t){if("variable"!==e.type)return f({code:"S0208",stack:(new Error).stack,position:e.position,token:e.value,value:t+1})})),this.type="lambda","<"===r.id){for(var t=r.position,i=1,a="<";i>0&&"{"!==r.id&&"(end)"!==r.id;){var o=d();">"===o.id?i--:"<"===o.id&&i++,a+=o.value}d(">");try{this.signature=n(a)}catch(e){return e.position=t+e.offset,f(e)}}d("{"),this.body=h(0),d("}")}return this})),m("(",(function(){for(var e=[];")"!==r.id&&(e.push(h(0)),";"===r.id);)d(";");return d(")",!0),this.type="block",this.expressions=e,this})),m("[",(function(){var e=[];if("]"!==r.id)for(;;){var t=h(0);if(".."===r.id){var n={type:"binary",value:"..",position:r.position,lhs:t};d(".."),n.rhs=h(0),t=n}if(e.push(t),","!==r.id)break;d(",")}return d("]",!0),this.expressions=e,this.type="unary",this})),g("[",a["["],(function(e){if("]"===r.id){for(var t=e;t&&"binary"===t.type&&"["===t.value;)t=t.lhs;return t.keepArray=!0,d("]"),e}return this.lhs=e,this.rhs=h(a["]"]),this.type="binary",d("]",!0),this})),g("^",a["^"],(function(e){d("(");for(var t=[];;){var n={descending:!1};if("<"===r.id?d("<"):">"===r.id&&(n.descending=!0,d(">")),n.expression=h(0),t.push(n),","!==r.id)break;d(",")}return d(")"),this.lhs=e,this.rhs=t,this.type="binary",this}));var b=function(e){var t=[];if("}"!==r.id)for(;;){var n=h(0);d(":");var i=h(0);if(t.push([n,i]),","!==r.id)break;d(",")}return d("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};m("{",b),g("{",a["{"],b),y(":=",a[":="],(function(e){return"variable"!==e.type?f({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=h(a[":="]-1),this.type="binary",this)})),g("@",a["@"],(function(e){return this.lhs=e,this.rhs=h(a["@"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)})),g("#",a["#"],(function(e){return this.lhs=e,this.rhs=h(a["#"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)})),g("?",a["?"],(function(e){return this.type="condition",this.condition=e,this.then=h(0),":"===r.id&&(d(":"),this.else=h(0)),this})),m("|",(function(){return this.type="transform",this.pattern=h(0),d("|"),this.update=h(0),","===r.id&&(d(","),this.delete=h(0)),d("|"),this}));var k=function(e){var t;if("function"!==e.type||e.predicate)if("condition"===e.type)e.then=k(e.then),void 0!==e.else&&(e.else=k(e.else)),t=e;else if("block"===e.type){var r=e.expressions.length;r>0&&(e.expressions[r-1]=k(e.expressions[r-1])),t=e}else t=e;else{var n={type:"lambda",thunk:!0,arguments:[],position:e.position};n.body=e,t=n}return t},x=0,w=0,A=[],E=function(e,t){switch(e.type){case"name":case"wildcard":t.level--,0===t.level&&(void 0===e.ancestor||(A[t.index].slot.label=e.ancestor.label),e.ancestor=t,e.tuple=!0);break;case"parent":t.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,t=E(e.expressions[e.expressions.length-1],t));break;case"path":e.tuple=!0;var r=e.steps.length-1;for(t=E(e.steps[r--],t);t.level>0&&r>=0;)t=E(e.steps[r--],t);break;default:throw{code:"S0217",token:e.type,position:e.position}}return t},D=function(e,t){if(void 0!==t.seekingParent||"parent"===t.type){var r=void 0!==t.seekingParent?t.seekingParent:[];"parent"===t.type&&r.push(t.slot),void 0===e.seekingParent?e.seekingParent=r:Array.prototype.push.apply(e.seekingParent,r)}},T=function(e){var t=e.steps.length-1,r=e.steps[t],n=void 0!==r.seekingParent?r.seekingParent:[];"parent"===r.type&&n.push(r.slot);for(var i=0;i<n.length;i++){var a=n[i];for(t=e.steps.length-2;a.level>0;){if(t<0){void 0===e.seekingParent?e.seekingParent=[a]:e.seekingParent.push(a);break}for(var o=e.steps[t--];t>=0&&o.focus&&e.steps[t].focus;)o=e.steps[t--];a=E(o,a)}}},S=function(e){var r;switch(e.type){case"binary":switch(e.value){case".":var n=S(e.lhs);r="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(r.seekingParent=[n.slot]);var i=S(e.rhs);"function"===i.type&&"path"===i.procedure.type&&1===i.procedure.steps.length&&"name"===i.procedure.steps[0].type&&"function"===r.steps[r.steps.length-1].type&&(r.steps[r.steps.length-1].nextFunction=i.procedure.steps[0].value),"path"===i.type?Array.prototype.push.apply(r.steps,i.steps):(void 0!==i.predicate&&(i.stages=i.predicate,delete i.predicate),r.steps.push(i)),r.steps.filter((function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:(new Error).stack,position:e.position,value:e.value};return"string"===e.type})).forEach((function(e){e.type="name"})),r.steps.filter((function(e){return!0===e.keepArray})).length>0&&(r.keepSingletonArray=!0);var a=r.steps[0];"unary"===a.type&&"["===a.value&&(a.consarray=!0);var o=r.steps[r.steps.length-1];"unary"===o.type&&"["===o.value&&(o.consarray=!0),T(r);break;case"[":var s=r=S(e.lhs),c="predicate";if("path"===r.type&&(s=r.steps[r.steps.length-1],c="stages"),void 0!==s.group)throw{code:"S0209",stack:(new Error).stack,position:e.position};void 0===s[c]&&(s[c]=[]);var l=S(e.rhs);void 0!==l.seekingParent&&(l.seekingParent.forEach((e=>{1===e.level?E(s,e):e.level--})),D(s,l)),s[c].push({type:"filter",expr:l,position:e.position});break;case"{":if(void 0!==(r=S(e.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:e.position};r.group={lhs:e.rhs.map((function(e){return[S(e[0]),S(e[1])]})),position:e.position};break;case"^":"path"!==(r=S(e.lhs)).type&&(r={type:"path",steps:[r]});var p={type:"sort",position:e.position};p.terms=e.rhs.map((function(e){var t=S(e.expression);return D(p,t),{descending:e.descending,expression:t}})),r.steps.push(p),T(r);break;case":=":(r={type:"bind",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),D(r,r.rhs);break;case"@":if(r=S(e.lhs),s=r,"path"===r.type&&(s=r.steps[r.steps.length-1]),void 0!==s.stages||void 0!==s.predicate)throw{code:"S0215",stack:(new Error).stack,position:e.position};if("sort"===s.type)throw{code:"S0216",stack:(new Error).stack,position:e.position};e.keepArray&&(s.keepArray=!0),s.focus=e.rhs.value,s.tuple=!0;break;case"#":r=S(e.lhs),s=r,"path"===r.type?s=r.steps[r.steps.length-1]:(r={type:"path",steps:[r]},void 0!==s.predicate&&(s.stages=s.predicate,delete s.predicate)),void 0===s.stages?s.index=e.rhs.value:s.stages.push({type:"index",value:e.rhs.value,position:e.position}),s.tuple=!0;break;case"~>":(r={type:"apply",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs);break;default:(r={type:e.type,value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),D(r,r.lhs),D(r,r.rhs)}break;case"unary":r={type:e.type,value:e.value,position:e.position},"["===e.value?r.expressions=e.expressions.map((function(e){var t=S(e);return D(r,t),t})):"{"===e.value?r.lhs=e.lhs.map((function(e){var t=S(e[0]);D(r,t);var n=S(e[1]);return D(r,n),[t,n]})):(r.expression=S(e.expression),"-"===e.value&&"number"===r.expression.type?(r=r.expression).value=-r.value:D(r,r.expression));break;case"function":case"partial":(r={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map((function(e){var t=S(e);return D(r,t),t})),r.procedure=S(e.procedure);break;case"lambda":r={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var f=S(e.body);r.body=k(f);break;case"condition":(r={type:e.type,position:e.position}).condition=S(e.condition),D(r,r.condition),r.then=S(e.then),D(r,r.then),void 0!==e.else&&(r.else=S(e.else),D(r,r.else));break;case"transform":(r={type:e.type,position:e.position}).pattern=S(e.pattern),r.update=S(e.update),void 0!==e.delete&&(r.delete=S(e.delete));break;case"block":(r={type:e.type,position:e.position}).expressions=e.expressions.map((function(e){var t=S(e);return D(r,t),(t.consarray||"path"===t.type&&t.steps[0].consarray)&&(r.consarray=!0),t}));break;case"name":r={type:"path",steps:[e]},e.keepArray&&(r.keepSingletonArray=!0);break;case"parent":r={type:"parent",slot:{label:"!"+x++,level:1,index:w++}},A.push(r);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":r=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",r=S(e);else{if("?"!==e.value)throw{code:"S0201",stack:(new Error).stack,position:e.position,token:e.value};r=e}break;case"error":r=e,e.lhs&&(r=S(e.lhs));break;default:var d="S0206";"(end)"===e.id&&(d="S0207");var h={code:d,position:e.position,token:e.value};if(t)return u.push(h),{type:"error",error:h};throw h.stack=(new Error).stack,h}return e.keepArray&&(r.keepArray=!0),r};i=s(e),d();var O=h(0);if("(end)"!==r.id){var P={code:"S0201",position:r.position,token:r.value};f(P)}if("parent"===(O=S(O)).type||void 0!==O.seekingParent)throw{code:"S0217",token:O.type,position:O.position};return u.length>0&&(O.errors=u),O});var a,o,s;t.exports=i},{"./signature":5}],5:[function(e,t,r){var n=e("./utils");const i=(()=>{var e={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function t(t){for(var r=1,i=[],a={},o=a;r<t.length;){var s=t.charAt(r);if(":"===s)break;var u=function(){i.push(a),o=a,a={}},c=function(e,t,r,n){for(var i=1,a=t;a<e.length;)if(a++,(s=e.charAt(a))===n){if(0==--i)break}else s===r&&i++;return a};switch(s){case"s":case"n":case"b":case"l":case"o":a.regex="["+s+"m]",a.type=s,u();break;case"a":a.regex="[asnblfom]",a.type=s,a.array=!0,u();break;case"f":a.regex="f",a.type=s,u();break;case"j":a.regex="[asnblom]",a.type=s,u();break;case"x":a.regex="[asnblfom]",a.type=s,u();break;case"-":o.context=!0,o.contextRegex=new RegExp(o.regex),o.regex+="?";break;case"?":case"+":o.regex+=s;break;case"(":var l=c(t,r,"(",")"),p=t.substring(r+1,l);if(-1!==p.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:p,offset:r};a.regex="["+p+"m]",a.type="("+p+")",r=l,u();break;case"<":if("a"!==o.type&&"f"!==o.type)throw{code:"S0401",stack:(new Error).stack,value:o.type,offset:r};var f=c(t,r,"<",">");o.subtype=t.substring(r+1,f),r=f}r++}var d="^"+i.map((function(e){return"("+e.regex+")"})).join("")+"$",h=new RegExp(d),v=function(e){var t;if(n.isFunction(e))t="f";else switch(typeof e){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;default:t="m"}return t},g=function(e,t){for(var r="^",n=0,a=0;a<i.length;a++){r+=i[a].regex;var o=t.match(r);if(null===o)throw{code:"T0410",stack:(new Error).stack,value:e[n],index:n+1};n=o[0].length}throw{code:"T0410",stack:(new Error).stack,value:e[n],index:n+1}};return{definition:t,validate:function(t,r){var n="";t.forEach((function(e){n+=v(e)}));var a=h.exec(n);if(a){var o=[],s=0;return i.forEach((function(n,i){var u=t[s],c=a[i+1];if(""===c)if(n.context&&n.contextRegex){var l=v(r);if(!n.contextRegex.test(l))throw{code:"T0411",stack:(new Error).stack,value:r,index:s+1};o.push(r)}else o.push(u),s++;else c.split("").forEach((function(r){if("a"===n.type){if("m"===r)u=void 0;else{u=t[s];var i=!0;if(void 0!==n.subtype)if("a"!==r&&c!==n.subtype)i=!1;else if("a"===r&&u.length>0){var a=v(u[0]);i=a===n.subtype.charAt(0)&&0===u.filter((function(e){return v(e)!==a})).length}if(!i)throw{code:"T0412",stack:(new Error).stack,value:u,index:s+1,type:e[n.subtype]};"a"!==r&&(u=[u])}o.push(u),s++}else o.push(u),s++}))})),o}g(t,n)}}}return t})();t.exports=i},{"./utils":6}],6:[function(e,t,r){const n=(()=>{function e(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:(new Error).stack};return t}function t(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter((function(e){return"string"!=typeof e})).length),t}function r(t){var r=!1;return Array.isArray(t)&&(r=0===t.filter((function(t){return!e(t)})).length),r}function n(){var e=[];return e.sequence=!0,1===arguments.length&&e.push(arguments[0]),e}function i(e){return!0===e.sequence&&Array.isArray(e)}function a(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e}function o(e){return"number"==typeof e.arity?e.arity:"function"==typeof e.implementation?e.implementation.length:"number"==typeof e.length?e.length:e.arguments.length}function s(e){return e&&!0===e._jsonata_lambda}var u=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";function c(e){return"object"==typeof e&&null!==e&&u in e&&"next"in e&&"function"==typeof e.next}function l(e,t){if(e===t)return!0;if("object"==typeof e&&"object"==typeof t&&null!==e&&null!==t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1;return!0}var n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertyNames(t);if(n.length!==i.length)return!1;for(n=n.sort(),i=i.sort(),r=0;r<n.length;r++)if(n[r]!==i[r])return!1;for(r=0;r<n.length;r++){var a=n[r];if(!l(e[a],t[a]))return!1}return!0}return!1}function p(e){var t=[];for(let r of e)t.push(r);return t}return{isNumeric:e,isArrayOfStrings:t,isArrayOfNumbers:r,createSequence:n,isSequence:i,isFunction:a,isLambda:s,isIterable:c,getFunctionArity:o,isDeepEqual:l,stringToArray:p}})();t.exports=n},{}]},{},[3])(3)}));export{n as j};
1
+ import{c as e,b as t,d as r}from"./shared-cb58dfcd.js";var n=e((function(e,n){e.exports=function(){function e(t,n,i){function a(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof r&&r;if(!u&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};t[s][0].call(p.exports,(function(e){return a(t[s][1][e]||e)}),p,p.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<i.length;s++)a(i[s]);return a}return e}()({1:[function(e,t,r){const n=e("./utils"),i=function(){const e=n.stringToArray,t=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],a=["Thousand","Million","Billion","Trillion"];function o(e,n){var o=function(e,n,s){var u="";if(e<=19)u=(n?" and ":"")+(s?r[e]:t[e]);else if(e<100){const t=Math.floor(e/10),r=e%10;u=(n?" and ":"")+i[t-2],r>0?u+="-"+o(r,!1,s):s&&(u=u.substring(0,u.length-1)+"ieth")}else if(e<1e3){const r=Math.floor(e/100),i=e%100;u=(n?", ":"")+t[r]+" Hundred",i>0?u+=o(i,!0,s):s&&(u+="th")}else{var c=Math.floor(Math.log10(e)/3);c>a.length&&(c=a.length);const t=Math.pow(10,3*c),r=Math.floor(e/t),i=e-r*t;u=(n?", ":"")+o(r,!1,!1)+" "+a[c-1],i>0?u+=o(i,!0,s):s&&(u+="th")}return u};return o(e,!1,n)}const s={};function u(e){const t=e.split(/,\s|\sand\s|[\s\\-]/).map((e=>s[e]));let r=[0];return t.forEach((e=>{if(e<100){let t=r.pop();t>=1e3&&(r.push(t),t=0),r.push(t+e)}else r.push(r.pop()*e)})),r.reduce(((e,t)=>e+t),0)}t.forEach((function(e,t){s[e.toLowerCase()]=t})),r.forEach((function(e,t){s[e.toLowerCase()]=t})),i.forEach((function(e,t){const r=e.toLowerCase();s[r]=10*(t+2),s[r.substring(0,e.length-1)+"ieth"]=s[r]})),s.hundredth=100,a.forEach((function(e,t){const r=e.toLowerCase(),n=Math.pow(10,3*(t+1));s[r]=n,s[r+"th"]=n}));const c=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],l={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function p(e){for(var t=0;t<c.length;t++){const r=c[t];if(e>=r[0])return r[1]+p(e-r[0])}return""}function f(e){for(var t=0,r=1,n=e.length-1;n>=0;n--){const i=e[n],a=l[i];a<r?t-=a:(r=a,t+=a)}return t}function d(e,t){for(var r=[],n=t.charCodeAt(0);e>0;)r.unshift(String.fromCharCode((e-1)%26+n)),e=Math.floor((e-1)/26);return r.join("")}function h(e,t){for(var r=t.charCodeAt(0),n=0,i=0;i<e.length;i++)n+=(e.charCodeAt(e.length-i-1)-r+1)*Math.pow(26,i);return n}function v(e,t){if(void 0!==e)return m(e=Math.floor(e),k(t))}const g={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function m(t,r){let n;const i=t<0;switch(t=Math.abs(t),r.primary){case g.LETTERS:n=d(t,r.case===y.UPPER?"A":"a");break;case g.ROMAN:n=p(t),r.case===y.UPPER&&(n=n.toUpperCase());break;case g.WORDS:n=o(t,r.ordinal),r.case===y.UPPER?n=n.toUpperCase():r.case===y.LOWER&&(n=n.toLowerCase());break;case g.DECIMAL:n=""+t;var a=r.mandatoryDigits-n.length;if(a>0){var s=new Array(a+1).join("0");n=s+n}if(48!==r.zeroCode&&(n=e(n).map((e=>String.fromCodePoint(e.codePointAt(0)+r.zeroCode-48))).join("")),r.regular)for(let e=Math.floor((n.length-1)/r.groupingSeparators.position);e>0;e--){const t=n.length-e*r.groupingSeparators.position;n=n.substr(0,t)+r.groupingSeparators.character+n.substr(t)}else r.groupingSeparators.reverse().forEach((e=>{const t=n.length-e.position;n=n.substr(0,t)+e.character+n.substr(t)}));if(r.ordinal){var u={1:"st",2:"nd",3:"rd"}[n[n.length-1]];(!u||n.length>1&&"1"===n[n.length-2])&&(u="th"),n+=u}break;case g.SEQUENCE:throw{code:"D3130",value:r.token}}return i&&(n="-"+n),n}const b=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function k(t){const r={type:"integer",primary:g.DECIMAL,case:y.LOWER,ordinal:!1};let n,i;const a=t.lastIndexOf(";");switch(-1===a?n=t:(n=t.substring(0,a),i=t.substring(a+1),"o"===i[0]&&(r.ordinal=!0)),n){case"A":r.case=y.UPPER;case"a":r.primary=g.LETTERS;break;case"I":r.case=y.UPPER;case"i":r.primary=g.ROMAN;break;case"W":r.case=y.UPPER,r.primary=g.WORDS;break;case"Ww":r.case=y.TITLE,r.primary=g.WORDS;break;case"w":r.primary=g.WORDS;break;default:{let t=null,i=0,a=0,o=[],s=0;if(e(n).map((e=>e.codePointAt(0))).reverse().forEach((e=>{let r=!1;for(let n=0;n<b.length;n++){const a=b[n];if(e>=a&&e<=a+9){if(r=!0,i++,s++,null===t)t=a;else if(a!==t)throw{code:"D3131"};break}}r||(35===e?(s++,a++):o.push({position:s,character:String.fromCodePoint(e)}))})),i>0){r.primary=g.DECIMAL,r.zeroCode=t,r.mandatoryDigits=i,r.optionalDigits=a;const e=function(e){if(0===e.length)return 0;const t=e[0].character;for(let r=1;r<e.length;r++)if(e[r].character!==t)return 0;const r=e.map((e=>e.position)),n=function(e,t){return 0===t?e:n(t,e%t)},i=r.reduce(n);for(let e=1;e<=r.length;e++)if(-1===r.indexOf(e*i))return 0;return i}(o);e>0?(r.regular=!0,r.groupingSeparators={position:e,character:o[0].character}):(r.regular=!1,r.groupingSeparators=o)}else r.primary=g.SEQUENCE,r.token=n}}return r}const x={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function w(e){var t=[];const r={type:"datetime",parts:t},n=function(r,n){if(n>r){let i=e.substring(r,n);i=i.split("]]").join("]"),t.push({type:"literal",value:i})}};for(var i=0,a=0;a<e.length;){if("["===e.charAt(a)){if("["===e.charAt(a+1)){n(i,a),t.push({type:"literal",value:"["}),i=a+=2;continue}if(n(i,a),i=a,-1===(a=e.indexOf("]",i)))throw{code:"D3135"};let r=e.substring(i+1,a);r=r.split(/\s+/).join("");var o,s={type:"marker",component:r.charAt(0)},u=r.lastIndexOf(",");if(-1!==u){const e=r.substring(u+1),t=e.indexOf("-");let n,i;const a=function(e){return void 0===e||"*"===e?void 0:parseInt(e)};-1===t?n=e:(n=e.substring(0,t),i=e.substring(t+1));const c={min:a(n),max:a(i)};s.width=c,o=r.substring(1,u)}else o=r.substring(1);if(1===o.length)s.presentation1=o;else if(o.length>1){var c=o.charAt(o.length-1);-1!=="atco".indexOf(c)?(s.presentation2=c,"o"===c&&(s.ordinal=!0),s.presentation1=o.substring(0,o.length-1)):s.presentation1=o}else s.presentation1=x[s.component];if(void 0===s.presentation1)throw{code:"D3132",value:s.component};if("n"===s.presentation1[0])s.names=y.LOWER;else if("N"===s.presentation1[0])"n"===s.presentation1[1]?s.names=y.TITLE:s.names=y.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(s.component)){var l=s.presentation1;if(s.presentation2&&(l+=";"+s.presentation2),s.integerFormat=k(l),s.width&&void 0!==s.width.min&&s.integerFormat.mandatoryDigits<s.width.min&&(s.integerFormat.mandatoryDigits=s.width.min),-1!=="YMD".indexOf(s.component))if(s.n=-1,s.width&&void 0!==s.width.max)s.n=s.width.max,s.integerFormat.mandatoryDigits=s.n;else{var p=s.integerFormat.mandatoryDigits+s.integerFormat.optionalDigits;p>=2&&(s.n=p)}}"Z"!==s.component&&"z"!==s.component||(s.integerFormat=k(s.presentation1)),t.push(s),i=a+1}a++}return n(i,a),r}const A=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],E=["January","February","March","April","May","June","July","August","September","October","November","December"],D=864e5,T=function(e){const t=Date.UTC(e.year,e.month);var r=new Date(t).getUTCDay();return 0===r&&(r=7),r>4?t+(8-r)*D:t-(r-1)*D},S=function(e,t){return{year:e,month:t,nextMonth:function(){return 11===t?S(e+1,0):S(e,t+1)},previousMonth:function(){return 0===t?S(e-1,11):S(e,t-1)},nextYear:function(){return S(e+1,t)},previousYear:function(){return S(e-1,t)}}},O=function(e,t){return(t-e)/(7*D)+1},P=(e,t)=>{let r;switch(t){case"Y":r=e.getUTCFullYear();break;case"M":r=e.getUTCMonth()+1;break;case"D":r=e.getUTCDate();break;case"d":r=(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0))/D+1;break;case"F":r=e.getUTCDay(),0===r&&(r=7);break;case"W":{const t=S(e.getUTCFullYear(),0),n=T(t),i=Date.UTC(t.year,e.getUTCMonth(),e.getUTCDate());let a=O(n,i);if(a>52)i>=T(t.nextYear())&&(a=1);else if(a<1){const e=T(t.previousYear());a=O(e,i)}r=Math.floor(a);break}case"w":{const t=S(e.getUTCFullYear(),e.getUTCMonth()),n=T(t),i=Date.UTC(t.year,t.month,e.getUTCDate());let a=O(n,i);if(a>4)i>=T(t.nextMonth())&&(a=1);else if(a<1){const e=T(t.previousMonth());a=O(e,i)}r=Math.floor(a);break}case"X":{const t=S(e.getUTCFullYear(),0),n=T(t),i=T(t.nextYear()),a=e.getTime();r=a<n?t.year-1:a>=i?t.year+1:t.year;break}case"x":{const t=S(e.getUTCFullYear(),e.getUTCMonth()),n=T(t),i=t.nextMonth(),a=T(i),o=e.getTime();r=o<n?t.previousMonth().month+1:o>=a?i.month+1:t.month+1;break}case"H":r=e.getUTCHours();break;case"h":r=e.getUTCHours(),r%=12,0===r&&(r=12);break;case"P":r=e.getUTCHours()>=12?"pm":"am";break;case"m":r=e.getUTCMinutes();break;case"s":r=e.getUTCSeconds();break;case"f":r=e.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":r="ISO"}return r};let M=null;function C(e,t,r){var n=0,i=0;if(void 0!==r){const e=parseInt(r);n=Math.floor(e/100),i=e%100}var a=function(e,t){var r=P(e,t.component);if(-1!=="YMDdFWwXxHhms".indexOf(t.component))if("Y"===t.component&&-1!==t.n&&(r%=Math.pow(10,t.n)),t.names){if("M"===t.component||"x"===t.component)r=E[r-1];else{if("F"!==t.component)throw{code:"D3133",value:t.component};r=A[r]}t.names===y.UPPER?r=r.toUpperCase():t.names===y.LOWER&&(r=r.toLowerCase()),t.width&&r.length>t.width.max&&(r=r.substring(0,t.width.max))}else r=m(r,t.integerFormat);else if("f"===t.component)r=m(r,t.integerFormat);else if("Z"===t.component||"z"===t.component){const e=100*n+i;if(t.integerFormat.regular)r=m(e,t.integerFormat);else{const a=t.integerFormat.mandatoryDigits;if(1===a||2===a)r=m(n,t.integerFormat),0!==i&&(r+=":"+v(i,"00"));else{if(3!==a&&4!==a)throw{code:"D3134",value:a};r=m(e,t.integerFormat)}}e>=0&&(r="+"+r),"z"===t.component&&(r="GMT"+r),0===e&&"t"===t.presentation2&&(r="Z")}return r};let o;void 0===t?(null===M&&(M=w("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),o=M):o=w(t);const s=new Date(e+60*(60*n+i)*1e3);let u="";return o.parts.forEach((function(e){"literal"===e.type?u+=e.value:u+=a(s,e)})),u}function j(e){var t={};if("datetime"===e.type)t.type="datetime",t.parts=e.parts.map((function(e){var t={};if("literal"===e.type)t.regex=e.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===e.component||"z"===e.component){let r;Array.isArray(e.integerFormat.groupingSeparators)||(r=e.integerFormat.groupingSeparators),t.regex="","z"===e.component&&(t.regex="GMT"),t.regex+="[-+][0-9]+",r&&(t.regex+=r.character+"[0-9]+"),t.parse=function(t){"z"===e.component&&(t=t.substring(3));let n=0,i=0;return r?(n=Number.parseInt(t.substring(0,t.indexOf(r.character))),i=Number.parseInt(t.substring(t.indexOf(r.character)+1))):t.length-1<=2?n=Number.parseInt(t):(n=Number.parseInt(t.substring(0,3)),i=Number.parseInt(t.substring(3))),60*n+i}}else if(e.integerFormat)e.integerFormat.n=e.n,t=j(e.integerFormat);else{t.regex="[a-zA-Z]+";var r={};if("M"===e.component||"x"===e.component)E.forEach((function(t,n){e.width&&e.width.max?r[t.substring(0,e.width.max)]=n+1:r[t]=n+1}));else if("F"===e.component)A.forEach((function(t,n){n>0&&(e.width&&e.width.max?r[t.substring(0,e.width.max)]=n:r[t]=n)}));else{if("P"!==e.component)throw{code:"D3133",value:e.component};r={am:0,AM:0,pm:1,PM:1}}t.parse=function(e){return r[e]}}return t.component=e.component,t}));else{t.type="integer";const r=e.case===y.UPPER;let n;switch(n=e.n&&e.n>0?0===e.optionalDigits?`{${e.n}}`:`{${e.n-e.optionalDigits},${e.n}}`:"+",e.primary){case g.LETTERS:t.regex=r?"[A-Z]+":"[a-z]+",t.parse=function(e){return h(e,r?"A":"a")};break;case g.ROMAN:t.regex=r?"[MDCLXVI]+":"[mdclxvi]+",t.parse=function(e){return f(r?e:e.toUpperCase())};break;case g.WORDS:t.regex="(?:"+Object.keys(s).concat("and","[\\-, ]").join("|")+")+",t.parse=function(e){return u(e.toLowerCase())};break;case g.DECIMAL:t.regex=`[0-9]${n}`,e.ordinal&&(t.regex+="(?:th|st|nd|rd)"),t.parse=function(t){let r=t;return e.ordinal&&(r=t.substring(0,t.length-2)),e.regular?r=r.split(",").join(""):e.groupingSeparators.forEach((e=>{r=r.split(e.character).join("")})),48!==e.zeroCode&&(r=r.split("").map((t=>String.fromCodePoint(t.codePointAt(0)-e.zeroCode+48))).join("")),parseInt(r)};break;case g.SEQUENCE:throw{code:"D3130",value:e.token}}}return t}function U(e,t){if(void 0!==e)return j(k(t)).parse(e)}function F(e,t){const r=j(w(t)),n="^"+r.parts.map((e=>"("+e.regex+")")).join("")+"$";var i=new RegExp(n,"i").exec(e);if(null!==i){const e=161,t=130,n=84,o=72,s=23,u=47,c={};for(let e=1;e<i.length;e++){const t=r.parts[e-1];t.parse&&(c[t.component]=t.parse(i[e]))}if(0===Object.getOwnPropertyNames(c).length)return;let l=0;const p=e=>{l<<=1,l+=e?1:0},f=e=>!(~e&l||!(e&l));"YXMxWwdD".split("").forEach((e=>p(c[e])));const d=!f(e)&&f(t),h=f(n),v=!h&&f(o);l=0,"PHhmsf".split("").forEach((e=>p(c[e])));const g=!f(s)&&f(u),y=(d?"YD":h?"XxwF":v?"XWF":"YMD")+(g?"Phmsf":"Hmsf"),m=this.environment.timestamp;let b=!1,k=!1;if(y.split("").forEach((e=>{if(void 0===c[e])b?(c[e]=-1!=="MDd".indexOf(e)?1:0,k=!0):c[e]=P(m,e);else if(b=!0,k)throw{code:"D3136"}})),c.M>0?c.M-=1:c.M=0,d){const e=Date.UTC(c.Y,0),t=1e3*(c.d-1)*60*60*24,r=new Date(e+t);c.M=r.getUTCMonth(),c.D=r.getUTCDate()}if(h)throw{code:"D3136"};if(v)throw{code:"D3136"};g&&(c.H=12===c.h?0:c.h,1===c.P&&(c.H+=12));var a=Date.UTC(c.Y,c.M,c.D,c.H,c.m,c.s,c.f);return(c.Z||c.z)&&(a-=60*(c.Z||c.z)*1e3),a}}var N=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function I(e,t){if(void 0!==e){if(void 0===t){if(!N.test(e))throw{stack:(new Error).stack,code:"D3110",value:e};return Date.parse(e)}return F.call(this,e,t)}}function R(e,t,r){if(void 0!==e)return C.call(this,e,t,r)}return{formatInteger:v,parseInteger:U,fromMillis:R,toMillis:I}}();t.exports=i},{"./utils":6}],2:[function(e,r,n){(function(t){(function(){var n=e("./utils");const i=(()=>{var e=n.isNumeric,r=n.isArrayOfStrings,i=n.isArrayOfNumbers,a=n.createSequence,o=n.isSequence,s=n.isFunction,u=n.isLambda,c=n.isIterable,l=n.getFunctionArity,p=n.isDeepEqual,f=n.stringToArray;function d(e){if(void 0!==e){var t=0;return e.forEach((function(e){t+=e})),t}}function h(e){return void 0===e?0:e.length}function v(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)}function g(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)}function y(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach((function(e){t+=e})),t/e.length}}function m(t,r=!1){if(void 0!==t){var n;if("string"==typeof t)n=t;else if(s(t))n="";else{if("number"==typeof t&&!isFinite(t))throw{code:"D3001",value:t,stack:(new Error).stack};var i=r?2:0;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),n=JSON.stringify(t,(function(t,r){return null!=r&&r.toPrecision&&e(r)?Number(r.toPrecision(15)):r&&s(r)?"":r}),i)}return n}}function b(e,t,r){if(void 0!==e){var n=f(e),i=n.length;if(i+t<0&&(t=0),void 0!==r){if(r<=0)return"";var a=t>=0?t+r:i+t+r;return n.slice(t,a).join("")}return n.slice(t).join("")}}function k(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(0,r):e}}function x(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(r+t.length):e}}function w(e){if(void 0!==e)return e.toLowerCase()}function A(e){if(void 0!==e)return e.toUpperCase()}function E(e){if(void 0!==e)return f(e).length}function D(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}}function T(e,t,r){if(void 0!==e){var n;void 0!==r&&0!==r.length||(r=" ");var i=Math.abs(t)-E(e);if(i>0){var a=new Array(i+1).join(r);r.length>1&&(a=b(a,0,i)),n=t>0?e+a:a+e}else n=e;return n}}function*S(e,t){var r=e.apply(this,[t]);if(c(r)&&(r=yield*r),r&&"number"!=typeof r.start&&"number"!==r.end&&!Array.isArray(r.groups)&&!s(r.next))throw{code:"T1010",stack:(new Error).stack};return r}function*O(e,t){if(void 0!==e)return"string"==typeof t?-1!==e.indexOf(t):void 0!==(yield*S(t,e))}function*P(e,t,r){if(void 0!==e){if(r<0)throw{stack:(new Error).stack,value:r,code:"D3040",index:3};var n=a();if(void 0===r||r>0){var i=0,o=yield*S(t,e);if(void 0!==o)for(;void 0!==o&&(void 0===r||i<r);)n.push({match:o.match,index:o.start,groups:o.groups}),o=yield*S(o.next),i++}return n}}function*M(e,t,r,n){if(void 0!==e){var i,a=this;if(""===t)throw{code:"D3010",stack:(new Error).stack,value:t,index:2};if(n<0)throw{code:"D3011",stack:(new Error).stack,value:n,index:4};i="string"==typeof r?function(e){for(var t="",n=0,i=r.indexOf("$",n);-1!==i&&n<r.length;){t+=r.substring(n,i),n=i+1;var a=r.charAt(n);if("$"===a)t+="$",n++;else if("0"===a)t+=e.match,n++;else{var o;if(o=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*Math.LOG10E)+1,i=parseInt(r.substring(n,n+o),10),o>1&&i>e.groups.length&&(i=parseInt(r.substring(n,n+o-1),10)),isNaN(i))t+="$";else{if(e.groups.length>0){var s=e.groups[i-1];void 0!==s&&(t+=s)}n+=i.toString().length}}i=r.indexOf("$",n)}return t+=r.substring(n)}:r;var o="",s=0;if(void 0===n||n>0){var u=0;if("string"==typeof t){for(var l=e.indexOf(t,s);-1!==l&&(void 0===n||u<n);)o+=e.substring(s,l),o+=r,s=l+t.length,u++,l=e.indexOf(t,s);o+=e.substring(s)}else{var p=yield*S(t,e);if(void 0!==p){for(;void 0!==p&&(void 0===n||u<n);){o+=e.substring(s,p.start);var f=i.apply(a,[p]);if(c(f)&&(f=yield*f),"string"!=typeof f)throw{code:"D3012",stack:(new Error).stack,value:f};o+=f,s=p.start+p.match.length,u++,p=yield*S(p.next)}o+=e.substring(s)}else o=e}}else o=e;return o}}function C(e){if(void 0!==e){var r="undefined"!=typeof window?window.btoa:function(e){return new t.Buffer.from(e,"binary").toString("base64")};return r(e)}}function j(e){if(void 0!==e){var r="undefined"!=typeof window?window.atob:function(e){return new t.Buffer.from(e,"base64").toString("binary")};return r(e)}}function U(e){if(void 0!==e){var t;try{t=encodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrlComponent"}}return t}}function F(e){if(void 0!==e){var t;try{t=encodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrl"}}return t}}function N(e){if(void 0!==e){var t;try{t=decodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrlComponent"}}return t}}function I(e){if(void 0!==e){var t;try{t=decodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrl"}}return t}}function*R(e,t,r){if(void 0!==e){if(r<0)throw{code:"D3020",stack:(new Error).stack,value:r,index:3};var n=[];if(void 0===r||r>0)if("string"==typeof t)n=e.split(t,r);else{var i=0,a=yield*S(t,e);if(void 0!==a){for(var o=0;void 0!==a&&(void 0===r||i<r);)n.push(e.substring(o,a.start)),o=a.end,a=yield*S(a.next),i++;(void 0===r||i<r)&&n.push(e.substring(o))}else n.push(e)}return n}}function z(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)}function $(e,t,r){if(void 0!==e){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&Object.keys(r).forEach((function(e){n[e]=r[e]}));for(var i=[],a=n["zero-digit"].charCodeAt(0),o=a;o<a+10;o++)i.push(String.fromCharCode(o));var s=i.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),u=t.split(n["pattern-separator"]);if(u.length>2)throw{code:"D3080",stack:(new Error).stack};var c=function(e){var t,r,i,a,o=function(){for(var t,r=0;r<e.length;r++)if(t=e.charAt(r),-1!==s.indexOf(t)&&t!==n["exponent-separator"])return e.substring(0,r)}(),u=function(){for(var t,r=e.length-1;r>=0;r--)if(t=e.charAt(r),-1!==s.indexOf(t)&&t!==n["exponent-separator"])return e.substring(r+1)}(),c=e.substring(o.length,e.length-u.length),l=e.indexOf(n["exponent-separator"],o.length);-1===l||l>e.length-u.length?(t=c,r=void 0):(t=c.substring(0,l),r=c.substring(l+1));var p=t.indexOf(n["decimal-separator"]);return-1===p?(i=t,a=u):(i=t.substring(0,p),a=t.substring(p+1)),{prefix:o,suffix:u,activePart:c,mantissaPart:t,exponentPart:r,integerPart:i,fractionalPart:a,subpicture:e}},l=function(e){var t,r,a=e.subpicture,o=a.indexOf(n["decimal-separator"]);o!==a.lastIndexOf(n["decimal-separator"])&&(t="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(t="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(t="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(t="D3084");var u=!1;for(r=0;r<e.mantissaPart.length;r++){var c=e.mantissaPart.charAt(r);if(-1!==i.indexOf(c)||c===n.digit){u=!0;break}}u||(t="D3085"),-1!==e.activePart.split("").map((function(e){return-1===s.indexOf(e)?"p":"a"})).join("").indexOf("p")&&(t="D3086"),-1!==o?a.charAt(o-1)!==n["grouping-separator"]&&a.charAt(o+1)!==n["grouping-separator"]||(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===n["grouping-separator"]&&(t="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(t="D3089");var l=e.integerPart.indexOf(n.digit);-1!==l&&e.integerPart.substring(0,l).split("").filter((function(e){return i.indexOf(e)>-1})).length>0&&(t="D3090"),-1!==(l=e.fractionalPart.lastIndexOf(n.digit))&&e.fractionalPart.substring(l).split("").filter((function(e){return i.indexOf(e)>-1})).length>0&&(t="D3091");var p="string"==typeof e.exponentPart;if(p&&e.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(t="D3092"),p&&(0===e.exponentPart.length||e.exponentPart.split("").filter((function(e){return-1===i.indexOf(e)})).length>0)&&(t="D3093"),t)throw{code:t,stack:(new Error).stack}},p=function(e){var t=function(t,r){for(var a=[],o=t.indexOf(n["grouping-separator"]);-1!==o;){var s=(r?t.substring(0,o):t.substring(o)).split("").filter((function(e){return-1!==i.indexOf(e)||e===n.digit})).length;a.push(s),o=e.integerPart.indexOf(n["grouping-separator"],o+1)}return a},r=t(e.integerPart),a=function(e){if(0===e.length)return 0;for(var t=function(e,r){return 0===r?e:t(r,e%r)},r=e.reduce(t),n=1;n<=e.length;n++)if(-1===e.indexOf(n*r))return 0;return r}(r),o=t(e.fractionalPart,!0),s=e.integerPart.split("").filter((function(e){return-1!==i.indexOf(e)})).length,u=s,c=e.fractionalPart.split(""),l=c.filter((function(e){return-1!==i.indexOf(e)})).length,p=c.filter((function(e){return-1!==i.indexOf(e)||e===n.digit})).length,f="string"==typeof e.exponentPart;0===s&&0===p&&(f?(l=1,p=1):s=1),f&&0===s&&-1!==e.integerPart.indexOf(n.digit)&&(s=1),0===s&&0===l&&(l=1);var d=0;return f&&(d=e.exponentPart.split("").filter((function(e){return-1!==i.indexOf(e)})).length),{integerPartGroupingPositions:r,regularGrouping:a,minimumIntegerPartSize:s,scalingFactor:u,prefix:e.prefix,fractionalPartGroupingPositions:o,minimumFactionalPartSize:l,maximumFactionalPartSize:p,minimumExponentSize:d,suffix:e.suffix,picture:e.subpicture}},f=u.map(c);f.forEach(l);var d,h,v,g,y=f.map(p),m=n["minus-sign"],b=n["zero-digit"],k=n["decimal-separator"],x=n["grouping-separator"];if(1===y.length&&(y.push(JSON.parse(JSON.stringify(y[0]))),y[1].prefix=m+y[1].prefix),h=-1!==(d=e>=0?y[0]:y[1]).picture.indexOf(n.percent)?100*e:-1!==d.picture.indexOf(n["per-mille"])?1e3*e:e,0===d.minimumExponentSize)v=h;else{var w=Math.pow(10,d.scalingFactor),A=Math.pow(10,d.scalingFactor-1);for(v=h,g=0;v<A;)v*=10,g-=1;for(;v>w;)v/=10,g+=1}var E=function(e,t){var r=Math.abs(e).toFixed(t);return"0"!==b&&(r=r.split("").map((function(e){return e>="0"&&e<="9"?i[e.charCodeAt(0)-48]:e})).join("")),r},D=E(H(v,d.maximumFactionalPartSize),d.maximumFactionalPartSize),T=D.indexOf(".");for(-1===T?D+=k:D=D.replace(".",k);D.charAt(0)===b;)D=D.substring(1);for(;D.charAt(D.length-1)===b;)D=D.substring(0,D.length-1);T=D.indexOf(k);var S=d.minimumIntegerPartSize-T,O=d.minimumFactionalPartSize-(D.length-T-1);if(D=(S>0?new Array(S+1).join(b):"")+D,D+=O>0?new Array(O+1).join(b):"",T=D.indexOf(k),d.regularGrouping>0)for(var P=Math.floor((T-1)/d.regularGrouping),M=1;M<=P;M++)D=[D.slice(0,T-M*d.regularGrouping),x,D.slice(T-M*d.regularGrouping)].join("");else d.integerPartGroupingPositions.forEach((function(e){D=[D.slice(0,T-e),x,D.slice(T-e)].join(""),T++}));if(T=D.indexOf(k),d.fractionalPartGroupingPositions.forEach((function(e){D=[D.slice(0,e+T+1),x,D.slice(e+T+1)].join("")})),T=D.indexOf(k),-1!==d.picture.indexOf(k)&&T!==D.length-1||(D=D.substring(0,D.length-1)),void 0!==g){var C=E(g,0);(S=d.minimumExponentSize-C.length)>0&&(C=new Array(S+1).join(b)+C),D=D+n["exponent-separator"]+(g<0?m:"")+C}return D=d.prefix+D+d.suffix}}function L(e,t){if(void 0!==e){if(e=H(e),(t=void 0===t?10:H(t))<2||t>36)throw{code:"D3100",stack:(new Error).stack,value:t};return e.toString(t)}}function q(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else if("string"==typeof e&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)&&!isNaN(parseFloat(e))&&isFinite(e))t=parseFloat(e);else if(!0===e)t=1;else{if(!1!==e)throw{code:"D3030",value:e,stack:(new Error).stack,index:1};t=0}return t}}function W(e){if(void 0!==e)return Math.abs(e)}function _(e){if(void 0!==e)return Math.floor(e)}function Y(e){if(void 0!==e)return Math.ceil(e)}function H(e,t){var r;if(void 0!==e){if(t){var n=e.toString().split("e");e=+(n[0]+"e"+(n[1]?+n[1]+t:t))}var i=(r=Math.round(e))-e;return.5===Math.abs(i)&&1===Math.abs(r%2)&&(r-=1),t&&(n=r.toString().split("e"),r=+(n[0]+"e"+(n[1]?+n[1]-t:-t))),Object.is(r,-0)&&(r=0),r}}function Z(e){if(void 0!==e){if(e<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}}function G(e,t){var r;if(void 0!==e){if(r=Math.pow(e,t),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:e,exp:t};return r}}function B(){return Math.random()}function J(t){if(void 0!==t){var r=!1;return Array.isArray(t)?1===t.length?r=J(t[0]):t.length>1&&(r=t.filter((function(e){return J(e)})).length>0):"string"==typeof t?t.length>0&&(r=!0):e(t)?0!==t&&(r=!0):null!==t&&"object"==typeof t?Object.keys(t).length>0&&(r=!0):"boolean"==typeof t&&!0===t&&(r=!0),r}}function X(e){if(void 0!==e)return!J(e)}function Q(e,t,r,n){var i=[t],a=l(e);return a>=2&&i.push(r),a>=3&&i.push(n),i}function*V(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=Q(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}}function*K(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=e[n],o=Q(t,i,n,e);J(yield*t.apply(this,o))&&r.push(i)}return r}}function*ee(e,t){if(void 0!==e){for(var r,n=!1,i=0;i<e.length;i++){var a=e[i],o=!0;if(void 0!==t){var s=Q(t,a,i,e);o=J(yield*t.apply(this,s))}if(o){if(n)throw{stack:(new Error).stack,code:"D3138",index:i};r=a,n=!0}}if(!n)throw{stack:(new Error).stack,code:"D3139"};return r}}function te(){for(var e=[],t=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,t.map((function(e){return Array.isArray(e)?e.length:0}))),n=0;n<r;n++){var i=t.map((e=>e[n]));e.push(i)}return e}function*re(e,t,r){if(void 0!==e){var n,i,a=l(t);if(a<2)throw{stack:(new Error).stack,code:"D3050",index:1};for(void 0===r&&e.length>0?(n=e[0],i=1):(n=r,i=0);i<e.length;){var o=[n,e[i]];a>=3&&o.push(i),a>=4&&o.push(e),n=yield*t.apply(this,o),i++}return n}}function ne(e){var t=a();if(Array.isArray(e)){var r={};e.forEach((function(e){ne(e).forEach((function(e){r[e]=!0}))})),t=ne(r)}else null===e||"object"!=typeof e||u(e)||Object.keys(e).forEach((e=>t.push(e)));return t}function ie(e,t){var r;if(Array.isArray(e)){r=a();for(var n=0;n<e.length;n++){var i=ie(e[n],t);void 0!==i&&(Array.isArray(i)?i.forEach((e=>r.push(e))):r.push(i))}}else null!==e&&"object"==typeof e&&(r=e[t]);return r}function ae(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=a(e)),Array.isArray(t)||(t=[t]),e.concat(t))}function oe(e){return void 0!==e}function se(e){var t=a();if(Array.isArray(e))e.forEach((function(e){t=ae(t,se(e))}));else if(null===e||"object"!=typeof e||u(e))t=e;else for(var r in e){var n={};n[r]=e[r],t.push(n)}return t}function ue(e){if(void 0!==e){var t={};return e.forEach((function(e){for(var r in e)t[r]=e[r]})),t}}function ce(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[t-n-1]=e[n];return r}}function*le(e,t){var r=a();for(var n in e){var i=Q(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}function pe(e){throw{code:"D3137",stack:(new Error).stack,message:e||"$error() function evaluated"}}function fe(e,t){if(!e)throw{code:"D3141",stack:(new Error).stack,message:t||"$assert() statement failed"}}function de(t){if(void 0!==t)return null===t?"null":e(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":s(t)?"function":"object"}function*he(e,t){if(void 0!==e){if(e.length<=1)return e;var n;if(void 0===t){if(!i(e)&&!r(e))throw{stack:(new Error).stack,code:"D3070",index:1};n=function*(e,t){return e>t}}else n=t;var a=function*(e,t){var r=function*(e,t,i){0===t.length?Array.prototype.push.apply(e,i):0===i.length?Array.prototype.push.apply(e,t):(yield*n(t[0],i[0]))?(e.push(i[0]),yield*r(e,t,i.slice(1))):(e.push(t[0]),yield*r(e,t.slice(1),i))},i=[];return yield*r(i,e,t),i},o=function*(e){if(!Array.isArray(e)||e.length<=1)return e;var t=Math.floor(e.length/2),r=e.slice(0,t),n=e.slice(t);return r=yield*o(r),n=yield*o(n),yield*a(r,n)};return yield*o(e)}}function ve(e){if(void 0!==e){if(e.length<=1)return e;for(var t=new Array(e.length),r=0;r<e.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(t[r]=t[n]),t[n]=e[r]}return t}}function ge(e){if(void 0!==e){if(!Array.isArray(e)||e.length<=1)return e;for(var t=o(e)?a():[],r=0;r<e.length;r++){for(var n=e[r],i=!1,s=0;s<t.length;s++)if(p(n,t[s])){i=!0;break}i||t.push(n)}return t}}function*ye(e,t){var r={};for(var n in e){var i=e[n],a=Q(t,i,n,e);J(yield*t.apply(this,a))&&(r[n]=i)}return 0===Object.keys(r).length&&(r=void 0),r}return{sum:d,count:h,max:v,min:g,average:y,string:m,substring:b,substringBefore:k,substringAfter:x,lowercase:w,uppercase:A,length:E,trim:D,pad:T,match:P,contains:O,replace:M,split:R,join:z,formatNumber:$,formatBase:L,number:q,floor:_,ceil:Y,round:H,abs:W,sqrt:Z,power:G,random:B,boolean:J,not:X,map:V,zip:te,filter:K,single:ee,foldLeft:re,sift:ye,keys:ne,lookup:ie,append:ae,exists:oe,spread:se,merge:ue,reverse:ce,each:le,error:pe,assert:fe,type:de,sort:he,shuffle:ve,distinct:ge,base64encode:C,base64decode:j,encodeUrlComponent:U,encodeUrl:F,decodeUrlComponent:N,decodeUrl:I}})();r.exports=i}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(e,t,r){var n=e("./datetime"),i=e("./functions"),a=e("./utils"),o=e("./parser"),s=e("./signature"),u=function(){var e=a.isNumeric,t=a.isArrayOfStrings,r=a.isArrayOfNumbers,u=a.createSequence,c=a.isSequence,l=a.isFunction,p=a.isLambda,f=a.isIterable,d=a.getFunctionArity,h=a.isDeepEqual,v=le(null);function*g(e,t,r){var n,i=r.lookup("__evaluate_entry");switch(i&&i(e,t,r),e.type){case"path":n=yield*y(e,t,r);break;case"binary":n=yield*A(e,t,r);break;case"unary":n=yield*E(e,t,r);break;case"name":n=D(e,t);break;case"string":case"number":case"value":n=T(e);break;case"wildcard":n=S(e,t);break;case"descendant":n=P(e,t);break;case"parent":n=r.lookup(e.slot.label);break;case"condition":n=yield*W(e,t,r);break;case"block":n=yield*_(e,t,r);break;case"bind":n=yield*q(e,t,r);break;case"regex":n=Y(e);break;case"function":n=yield*X(e,t,r);break;case"variable":n=H(e,t,r);break;case"lambda":n=K(e,t,r);break;case"partial":n=yield*ee(e,t,r);break;case"apply":n=yield*J(e,t,r);break;case"transform":n=G(e,t,r)}if(!r.async||null!=n&&"function"==typeof n.then||(n=Promise.resolve(n)),r.async&&"function"==typeof n.then&&e.nextFunction&&"function"==typeof n[e.nextFunction]||(n=yield n),Object.prototype.hasOwnProperty.call(e,"predicate"))for(var a=0;a<e.predicate.length;a++)n=yield*w(e.predicate[a].expr,n,r);"path"!==e.type&&Object.prototype.hasOwnProperty.call(e,"group")&&(n=yield*z(e.group,n,r));var o=r.lookup("__evaluate_exit");return o&&o(e,t,r,n),n&&c(n)&&!n.tupleStream&&(e.keepArray&&(n.keepSingleton=!0),0===n.length?n=void 0:1===n.length&&(n=n.keepSingleton?n:n[0])),n}function*y(e,t,r){var n,i;n=Array.isArray(t)&&"variable"!==e.steps[0].type?t:u(t);for(var a=!1,o=void 0,s=0;s<e.steps.length;s++){var c=e.steps[s];if(c.tuple&&(a=!0),0===s&&c.consarray?i=yield*g(c,n,r):a?o=yield*x(c,n,o,r):i=yield*b(c,n,r,s===e.steps.length-1),!a&&(void 0===i||0===i.length))break;void 0===c.focus&&(n=i)}if(a)if(e.tuple)i=o;else for(i=u(),s=0;s<o.length;s++)i.push(o[s]["@"]);return e.keepSingletonArray&&(Array.isArray(i)&&i.cons&&!i.sequence&&(i=u(i)),i.keepSingleton=!0),e.hasOwnProperty("group")&&(i=yield*z(e.group,a?o:i,r)),i}function m(e,t){var r=le(e);for(const e in t)r.bind(e,t[e]);return r}function*b(e,t,r,n){var i;if("sort"===e.type)return i=yield*Z(e,t,r),e.stages&&(i=yield*k(e.stages,i,r)),i;i=u();for(var a=0;a<t.length;a++){var o=yield*g(e,t[a],r);if(e.stages)for(var s=0;s<e.stages.length;s++)o=yield*w(e.stages[s].expr,o,r);void 0!==o&&i.push(o)}var l=u();return n&&1===i.length&&Array.isArray(i[0])&&!c(i[0])?l=i[0]:i.forEach((function(e){!Array.isArray(e)||e.cons?l.push(e):e.forEach((e=>l.push(e)))})),l}function*k(e,t,r){for(var n=t,i=0;i<e.length;i++){var a=e[i];switch(a.type){case"filter":n=yield*w(a.expr,n,r);break;case"index":for(var o=0;o<n.length;o++)n[o][a.value]=o}}return n}function*x(e,t,r,n){var i;if("sort"===e.type){if(r)i=yield*Z(e,r,n);else{var a=yield*Z(e,t,n);(i=u()).tupleStream=!0;for(var o=0;o<a.length;o++){var s={"@":a[o]};s[e.index]=o,i.push(s)}}return e.stages&&(i=yield*k(e.stages,i,n)),i}(i=u()).tupleStream=!0;var c=n;void 0===r&&(r=t.map((e=>({"@":e}))));for(var l=0;l<r.length;l++){c=m(n,r[l]);var p=yield*g(e,r[l]["@"],c);if(void 0!==p){Array.isArray(p)||(p=[p]);for(var f=0;f<p.length;f++)s={},Object.assign(s,r[l]),p.tupleStream?Object.assign(s,p[f]):(e.focus?(s[e.focus]=p[f],s["@"]=r[l]["@"]):s["@"]=p[f],e.index&&(s[e.index]=f),e.ancestor&&(s[e.ancestor.label]=r[l]["@"])),i.push(s)}}return e.stages&&(i=yield*k(e.stages,i,n)),i}function*w(t,n,a){var o=u();if(n&&n.tupleStream&&(o.tupleStream=!0),Array.isArray(n)||(n=u(n)),"number"===t.type){var s=Math.floor(t.value);s<0&&(s=n.length+s),void 0!==(c=n[s])&&(Array.isArray(c)?o=c:o.push(c))}else for(s=0;s<n.length;s++){var c,l=c=n[s],p=a;n.tupleStream&&(l=c["@"],p=m(a,c));var f=yield*g(t,l,p);e(f)&&(f=[f]),r(f)?f.forEach((function(e){var t=Math.floor(e);t<0&&(t=n.length+t),t===s&&o.push(c)})):i.boolean(f)&&o.push(c)}return o}function*A(e,t,r){var n,i=yield*g(e.lhs,t,r),a=e.value,o=function*(){return yield*g(e.rhs,t,r)};if("and"===a||"or"===a)try{return yield*N(i,o,a)}catch(t){throw t.position=e.position,t.token=a,t}var s=yield*o();try{switch(a){case"+":case"-":case"*":case"/":case"%":n=C(i,s,a);break;case"=":case"!=":n=j(i,s,a);break;case"<":case"<=":case">":case">=":n=U(i,s,a);break;case"&":n=R(i,s);break;case"..":n=L(i,s);break;case"in":n=F(i,s)}}catch(t){throw t.position=e.position,t.token=a,t}return n}function*E(t,r,n){var a;switch(t.value){case"-":if(void 0===(a=yield*g(t.expression,r,n)))a=void 0;else{if(!e(a))throw{code:"D1002",stack:(new Error).stack,position:t.position,token:t.value,value:a};a=-a}break;case"[":a=[];for(var o=0;o<t.expressions.length;o++){var s=t.expressions[o],u=yield*g(s,r,n);void 0!==u&&("["===s.value?a.push(u):a=i.append(a,u))}t.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=yield*z(t,r,n)}return a}function D(e,t,r){return i.lookup(t,e.value)}function T(e){return e.value}function S(e,t){var r=u();return Array.isArray(t)&&t.outerWrapper&&t.length>0&&(t=t[0]),null!==t&&"object"==typeof t&&Object.keys(t).forEach((function(e){var n=t[e];Array.isArray(n)?(n=O(n),r=i.append(r,n)):r.push(n)})),r}function O(e,t){return void 0===t&&(t=[]),Array.isArray(e)?e.forEach((function(e){O(e,t)})):t.push(e),t}function P(e,t){var r,n=u();return void 0!==t&&(M(t,n),r=1===n.length?n[0]:n),r}function M(e,t){Array.isArray(e)||t.push(e),Array.isArray(e)?e.forEach((function(e){M(e,t)})):null!==e&&"object"==typeof e&&Object.keys(e).forEach((function(r){M(e[r],t)}))}function C(t,r,n){var i;if(void 0!==t&&!e(t))throw{code:"T2001",stack:(new Error).stack,value:t};if(void 0!==r&&!e(r))throw{code:"T2002",stack:(new Error).stack,value:r};if(void 0===t||void 0===r)return i;switch(n){case"+":i=t+r;break;case"-":i=t-r;break;case"*":i=t*r;break;case"/":i=t/r;break;case"%":i=t%r}return i}function j(e,t,r){var n;if(void 0===e||void 0===t)return!1;switch(r){case"=":n=h(e,t);break;case"!=":n=!h(e,t)}return n}function U(e,t,r){var n,i=typeof e,a=typeof t;if("undefined"!==i&&"string"!==i&&"number"!==i||"undefined"!==a&&"string"!==a&&"number"!==a)throw{code:"T2010",stack:(new Error).stack,value:"string"!==i&&"number"!==i?e:t};if("undefined"!==i&&"undefined"!==a){if(i!==a)throw{code:"T2009",stack:(new Error).stack,value:e,value2:t};switch(r){case"<":n=e<t;break;case"<=":n=e<=t;break;case">":n=e>t;break;case">=":n=e>=t}return n}}function F(e,t){var r=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++)if(t[n]===e){r=!0;break}return r}function*N(e,t,r){var n,i=I(e);switch(r){case"and":n=i&&I(yield*t());break;case"or":n=i||I(yield*t())}return n}function I(e){var t=i.boolean(e);return void 0!==t&&t}function R(e,t){var r="",n="";return void 0!==e&&(r=i.string(e)),void 0!==t&&(n=i.string(t)),r.concat(n)}function*z(e,t,r){var n={},a={},o=!(!t||!t.tupleStream);Array.isArray(t)||(t=u(t)),0===t.length&&t.push(void 0);for(var s=0;s<t.length;s++)for(var c=t[s],l=o?m(r,c):r,p=0;p<e.lhs.length;p++){var f=e.lhs[p],d=yield*g(f[0],o?c["@"]:c,l);if("string"!=typeof d&&void 0!==d)throw{code:"T1003",stack:(new Error).stack,position:e.position,value:d};if(void 0!==d){var h={data:c,exprIndex:p};if(a.hasOwnProperty(d)){if(a[d].exprIndex!==p)throw{code:"D1009",stack:(new Error).stack,position:e.position,value:d};a[d].data=i.append(a[d].data,c)}else a[d]=h}}for(d in a){var v=(h=a[d]).data;if(l=r,o){var y=$(h.data);v=y["@"],delete y["@"],l=m(r,y)}var b=yield*g(e.lhs[h.exprIndex][1],v,l);void 0!==b&&(n[d]=b)}return n}function $(e){if(!Array.isArray(e))return e;var t={};Object.assign(t,e[0]);for(var r=1;r<e.length;r++)for(const n in e[r])t[n]=i.append(t[n],e[r][n]);return t}function L(e,t){var r;if(void 0!==e&&!Number.isInteger(e))throw{code:"T2003",stack:(new Error).stack,value:e};if(void 0!==t&&!Number.isInteger(t))throw{code:"T2004",stack:(new Error).stack,value:t};if(void 0===e||void 0===t)return r;if(e>t)return r;var n=t-e+1;if(n>1e7)throw{code:"D2014",stack:(new Error).stack,value:n};r=new Array(n);for(var i=e,a=0;i<=t;i++,a++)r[a]=i;return r.sequence=!0,r}function*q(e,t,r){var n=yield*g(e.rhs,t,r);return r.bind(e.lhs.value,n),n}function*W(e,t,r){var n,a=yield*g(e.condition,t,r);return i.boolean(a)?n=yield*g(e.then,t,r):void 0!==e.else&&(n=yield*g(e.else,t,r)),n}function*_(e,t,r){for(var n,i=le(r),a=0;a<e.expressions.length;a++)n=yield*g(e.expressions[a],t,i);return n}function Y(e){var t=new de.RegexEngine(e.value),r=function(n,i){var a;t.lastIndex=i||0;var o=t.exec(n);if(null!==o){if(a={match:o[0],start:o.index,end:o.index+o[0].length,groups:[]},o.length>1)for(var s=1;s<o.length;s++)a.groups.push(o[s]);a.next=function(){if(!(t.lastIndex>=n.length)){var i=r(n,t.lastIndex);if(i&&""===i.match)throw{code:"D1004",stack:(new Error).stack,position:e.position,value:e.value.source};return i}}}return a};return r}function H(e,t,r){return""===e.value?t&&t.outerWrapper?t[0]:t:r.lookup(e.value)}function*Z(e,t,r){var n=t,a=!!t.tupleStream,o=function*(t,n){for(var i=0,o=0;0===i&&o<e.terms.length;o++){var s=e.terms[o],u=t,c=r;a&&(u=t["@"],c=m(r,t));var l=yield*g(s.expression,u,c);u=n,c=r,a&&(u=n["@"],c=m(r,n));var p=yield*g(s.expression,u,c),f=typeof l,d=typeof p;if("undefined"!==f)if("undefined"!==d){if("string"!==f&&"number"!==f||"string"!==d&&"number"!==d)throw{code:"T2008",stack:(new Error).stack,position:e.position,value:"string"!==f&&"number"!==f?l:p};if(f!==d)throw{code:"T2007",stack:(new Error).stack,position:e.position,value:l,value2:p};l!==p&&(i=l<p?-1:1,!0===s.descending&&(i=-i))}else i=-1;else i="undefined"===d?0:1}return 1===i},s={environment:r,input:t};return yield*i.sort.apply(s,[n,o])}function G(e,r,n){return se((function*(r){if(void 0!==r){var i=n.lookup("clone");if(!l(i))throw{code:"T2013",stack:(new Error).stack,position:e.position};var a=yield*Q(i,[r],null,n),o=yield*g(e.pattern,a,n);if(void 0!==o){Array.isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var u=o[s];if(u&&(u.isPrototypeOf(a)||u instanceof Object.constructor))throw{code:"D1010",stack:(new Error).stack,position:e.position};var c=yield*g(e.update,u,n),p=typeof c;if("undefined"!==p){if("object"!==p||null===c||Array.isArray(c))throw{code:"T2011",stack:(new Error).stack,position:e.update.position,value:c};for(var f in c)u[f]=c[f]}if(void 0!==e.delete){var d=yield*g(e.delete,u,n);if(void 0!==d){var h=d;if(Array.isArray(d)||(d=[d]),!t(d))throw{code:"T2012",stack:(new Error).stack,position:e.delete.position,value:h};for(var v=0;v<d.length;v++)"object"==typeof u&&null!==u&&delete u[d[v]]}}}}return a}}),"<(oa):o>")}var B=o("function($f, $g) { function($x){ $g($f($x)) } }");function*J(e,t,r){var n,i=yield*g(e.lhs,t,r);if("function"===e.rhs.type)n=yield*X(e.rhs,t,r,{context:i});else{var a=yield*g(e.rhs,t,r);if(!l(a))throw{code:"T2006",stack:(new Error).stack,position:e.position,value:a};if(l(i)){var o=yield*g(B,null,r);n=yield*Q(o,[i,a],null,r)}else n=yield*Q(a,[i],null,r)}return n}function*X(e,t,r,n){var i,a=yield*g(e.procedure,t,r);if(void 0===a&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1005",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};var o=[];void 0!==n&&o.push(n.context);for(var s=0;s<e.arguments.length;s++){const n=yield*g(e.arguments[s],t,r);if(l(n)){const e=function*(...e){return yield*Q(n,e,null,r)};e.arity=d(n),o.push(e)}else o.push(n)}var u="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value;try{"object"==typeof a&&(a.token=u,a.position=e.position),i=yield*Q(a,o,t,r)}catch(t){throw t.position||(t.position=e.position),t.token||(t.token=u),t}return i}function*Q(e,t,r,n){var i;for(i=yield*V(e,t,r,n);p(i)&&!0===i.thunk;){var a=yield*g(i.body.procedure,i.input,i.environment);"variable"===i.body.procedure.type&&(a.token=i.body.procedure.value),a.position=i.body.procedure.position;for(var o=[],s=0;s<i.body.arguments.length;s++)o.push(yield*g(i.body.arguments[s],i.input,i.environment));i=yield*V(a,o,r,n)}return i}function*V(e,t,r,n){var i;try{var a=t;if(e&&(a=te(e.signature,t,r)),p(e))i=yield*re(e,a);else if(e&&!0===e._jsonata_function){var o={environment:n,input:r};i=e.implementation.apply(o,a),f(i)&&(i=yield*i)}else{if("function"!=typeof e)throw{code:"T1006",stack:(new Error).stack};i=e.apply(r,a),f(i)&&(i=yield*i)}}catch(t){throw e&&(void 0===t.token&&void 0!==e.token&&(t.token=e.token),t.position=e.position||t.position),t}return i}function K(e,t,r){var n={_jsonata_lambda:!0,input:t,environment:r,arguments:e.arguments,signature:e.signature,body:e.body};return!0===e.thunk&&(n.thunk=!0),n.apply=function*(e,r){return yield*Q(n,r,t,e.environment)},n}function*ee(e,t,r){for(var n,i=[],a=0;a<e.arguments.length;a++){var o=e.arguments[a];"operator"===o.type&&"?"===o.value?i.push(o):i.push(yield*g(o,t,r))}var s=yield*g(e.procedure,t,r);if(void 0===s&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1007",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};if(p(s))n=ne(s,i);else if(s&&!0===s._jsonata_function)n=ie(s.implementation,i);else{if("function"!=typeof s)throw{code:"T1008",stack:(new Error).stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};n=ie(s,i)}return n}function te(e,t,r){return void 0===e?t:e.validate(t,r)}function*re(e,t){var r=le(e.environment);return e.arguments.forEach((function(e,n){r.bind(e.value,t[n])})),"function"==typeof e.body?yield*ae(e.body,r):yield*g(e.body,e.input,r)}function ne(e,t){var r=le(e.environment),n=[];return e.arguments.forEach((function(e,i){var a=t[i];a&&"operator"===a.type&&"?"===a.value?n.push(e):r.bind(e.value,a)})),{_jsonata_lambda:!0,input:e.input,environment:r,arguments:n,body:e.body}}function ie(e,t){var r=oe(e),n="function("+(r=r.map((function(e){return"$"+e.trim()}))).join(", ")+"){ _ }",i=o(n);return i.body=e,ne(i,t)}function*ae(e,t){var r=oe(e).map((function(e){return t.lookup(e.trim())})),n={environment:t},i=e.apply(n,r);return f(i)&&(i=yield*i),i}function oe(e){var t=e.toString();return/\(([^)]*)\)/.exec(t)[1].split(",")}function se(e,t){var r={_jsonata_function:!0,implementation:e};return void 0!==t&&(r.signature=s(t)),r}function*ue(e,t){if(void 0!==e){var r=this.input;void 0!==t&&(r=t,Array.isArray(r)&&!c(r)&&((r=u(r)).outerWrapper=!0));try{var n=o(e,!1)}catch(e){throw fe(e),{stack:(new Error).stack,code:"D3120",value:e.message,error:e}}try{var i=yield*g(n,r,this.environment)}catch(e){throw fe(e),{stack:(new Error).stack,code:"D3121",value:e.message,error:e}}return i}}function ce(e){if(void 0!==e)return JSON.parse(i.string(e))}function le(e){var t={};return{bind:function(e,r){t[e]=r},lookup:function(r){var n;return t.hasOwnProperty(r)?n=t[r]:e&&(n=e.lookup(r)),n},timestamp:e?e.timestamp:null,async:!!e&&e.async,global:e?e.global:{ancestry:[null]}}}v.bind("sum",se(i.sum,"<a<n>:n>")),v.bind("count",se(i.count,"<a:n>")),v.bind("max",se(i.max,"<a<n>:n>")),v.bind("min",se(i.min,"<a<n>:n>")),v.bind("average",se(i.average,"<a<n>:n>")),v.bind("string",se(i.string,"<x-b?:s>")),v.bind("substring",se(i.substring,"<s-nn?:s>")),v.bind("substringBefore",se(i.substringBefore,"<s-s:s>")),v.bind("substringAfter",se(i.substringAfter,"<s-s:s>")),v.bind("lowercase",se(i.lowercase,"<s-:s>")),v.bind("uppercase",se(i.uppercase,"<s-:s>")),v.bind("length",se(i.length,"<s-:n>")),v.bind("trim",se(i.trim,"<s-:s>")),v.bind("pad",se(i.pad,"<s-ns?:s>")),v.bind("match",se(i.match,"<s-f<s:o>n?:a<o>>")),v.bind("contains",se(i.contains,"<s-(sf):b>")),v.bind("replace",se(i.replace,"<s-(sf)(sf)n?:s>")),v.bind("split",se(i.split,"<s-(sf)n?:a<s>>")),v.bind("join",se(i.join,"<a<s>s?:s>")),v.bind("formatNumber",se(i.formatNumber,"<n-so?:s>")),v.bind("formatBase",se(i.formatBase,"<n-n?:s>")),v.bind("formatInteger",se(n.formatInteger,"<n-s:s>")),v.bind("parseInteger",se(n.parseInteger,"<s-s:n>")),v.bind("number",se(i.number,"<(nsb)-:n>")),v.bind("floor",se(i.floor,"<n-:n>")),v.bind("ceil",se(i.ceil,"<n-:n>")),v.bind("round",se(i.round,"<n-n?:n>")),v.bind("abs",se(i.abs,"<n-:n>")),v.bind("sqrt",se(i.sqrt,"<n-:n>")),v.bind("power",se(i.power,"<n-n:n>")),v.bind("random",se(i.random,"<:n>")),v.bind("boolean",se(i.boolean,"<x-:b>")),v.bind("not",se(i.not,"<x-:b>")),v.bind("map",se(i.map,"<af>")),v.bind("zip",se(i.zip,"<a+>")),v.bind("filter",se(i.filter,"<af>")),v.bind("single",se(i.single,"<af?>")),v.bind("reduce",se(i.foldLeft,"<afj?:j>")),v.bind("sift",se(i.sift,"<o-f?:o>")),v.bind("keys",se(i.keys,"<x-:a<s>>")),v.bind("lookup",se(i.lookup,"<x-s:x>")),v.bind("append",se(i.append,"<xx:a>")),v.bind("exists",se(i.exists,"<x:b>")),v.bind("spread",se(i.spread,"<x-:a<o>>")),v.bind("merge",se(i.merge,"<a<o>:o>")),v.bind("reverse",se(i.reverse,"<a:a>")),v.bind("each",se(i.each,"<o-f:a>")),v.bind("error",se(i.error,"<s?:x>")),v.bind("assert",se(i.assert,"<bs?:x>")),v.bind("type",se(i.type,"<x:s>")),v.bind("sort",se(i.sort,"<af?:a>")),v.bind("shuffle",se(i.shuffle,"<a:a>")),v.bind("distinct",se(i.distinct,"<x:x>")),v.bind("base64encode",se(i.base64encode,"<s-:s>")),v.bind("base64decode",se(i.base64decode,"<s-:s>")),v.bind("encodeUrlComponent",se(i.encodeUrlComponent,"<s-:s>")),v.bind("encodeUrl",se(i.encodeUrl,"<s-:s>")),v.bind("decodeUrlComponent",se(i.decodeUrlComponent,"<s-:s>")),v.bind("decodeUrl",se(i.decodeUrl,"<s-:s>")),v.bind("eval",se(ue,"<sx?:x>")),v.bind("toMillis",se(n.toMillis,"<s-s?:n>")),v.bind("fromMillis",se(n.fromMillis,"<n-s?s?:s>")),v.bind("clone",se(ce,"<(oa)-:o>"));var pe={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",D1010:"Attempted to access the Javascript object prototype",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function fe(e){var t=pe[e.code];if(void 0!==t){var r=t.replace(/\{\{\{([^}]+)}}}/g,(function(){return e[arguments[1]]}));r=r.replace(/\{\{([^}]+)}}/g,(function(){return JSON.stringify(e[arguments[1]])})),e.message=r}}function de(e,t){var r,i;try{r=o(e,t&&t.recover),i=r.errors,delete r.errors}catch(e){throw fe(e),e}var a=le(v),s=new Date;return a.bind("now",se((function(e,t){return n.fromMillis(s.getTime(),e,t)}),"<s?s?:s>")),a.bind("millis",se((function(){return s.getTime()}),"<:n>")),t&&t.RegexEngine?de.RegexEngine=t.RegexEngine:de.RegexEngine=RegExp,{evaluate:function(e,t,n){if(void 0!==i){var o={code:"S0500",position:0};throw fe(o),o}var l,p,f;if(void 0!==t)for(var d in l=le(a),t)l.bind(d,t[d]);else l=a;if(l.bind("$",e),s=new Date,l.timestamp=s,Array.isArray(e)&&!c(e)&&((e=u(e)).outerWrapper=!0),"function"==typeof n){l.async=!0;var h=function(e){fe(e),n(e,null)},v=function(e){(p=f.next(e)).done?n(null,p.value):p.value.then(v).catch(h)};f=g(r,e,l),(p=f.next()).value.then(v).catch(h)}else try{for(f=g(r,e,l),p=f.next();!p.done;)p=f.next(p.value);return p.value}catch(o){throw fe(o),o}},assign:function(e,t){a.bind(e,t)},registerFunction:function(e,t,r){var n=se(t,r);a.bind(e,n)},ast:function(){return r},errors:function(){return i}}}return de.parser=o,de}();t.exports=u},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(e,t,r){var n=e("./signature");const i=(a={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(e){var t=0,r=e.length,n=function(e,r){return{type:e,value:r,position:t}},i=function(){for(var n,i,a=t,o=0;t<r;){var s=e.charAt(t);if("/"===s&&"\\"!==e.charAt(t-1)&&0===o){if(""===(n=e.substring(a,t)))throw{code:"S0301",stack:(new Error).stack,position:t};for(t++,s=e.charAt(t),a=t;"i"===s||"m"===s;)t++,s=e.charAt(t);return i=e.substring(a,t)+"g",new RegExp(n,i)}"("!==s&&"["!==s&&"{"!==s||"\\"===e.charAt(t-1)||o++,")"!==s&&"]"!==s&&"}"!==s||"\\"===e.charAt(t-1)||o--,t++}throw{code:"S0302",stack:(new Error).stack,position:t}},s=function(u){if(t>=r)return null;for(var c=e.charAt(t);t<r&&" \t\n\r\v".indexOf(c)>-1;)t++,c=e.charAt(t);if("/"===c&&"*"===e.charAt(t+1)){var l=t;for(t+=2,c=e.charAt(t);"*"!==c||"/"!==e.charAt(t+1);)if(c=e.charAt(++t),t>=r)throw{code:"S0106",stack:(new Error).stack,position:l};return t+=2,c=e.charAt(t),s(u)}if(!0!==u&&"/"===c)return t++,n("regex",i());if("."===c&&"."===e.charAt(t+1))return t+=2,n("operator","..");if(":"===c&&"="===e.charAt(t+1))return t+=2,n("operator",":=");if("!"===c&&"="===e.charAt(t+1))return t+=2,n("operator","!=");if(">"===c&&"="===e.charAt(t+1))return t+=2,n("operator",">=");if("<"===c&&"="===e.charAt(t+1))return t+=2,n("operator","<=");if("*"===c&&"*"===e.charAt(t+1))return t+=2,n("operator","**");if("~"===c&&">"===e.charAt(t+1))return t+=2,n("operator","~>");if(Object.prototype.hasOwnProperty.call(a,c))return t++,n("operator",c);if('"'===c||"'"===c){var p=c;t++;for(var f="";t<r;){if("\\"===(c=e.charAt(t)))if(t++,c=e.charAt(t),Object.prototype.hasOwnProperty.call(o,c))f+=o[c];else{if("u"!==c)throw{code:"S0103",stack:(new Error).stack,position:t,token:c};var d=e.substr(t+1,4);if(!/^[0-9a-fA-F]+$/.test(d))throw{code:"S0104",stack:(new Error).stack,position:t};var h=parseInt(d,16);f+=String.fromCharCode(h),t+=4}else{if(c===p)return t++,n("string",f);f+=c}t++}throw{code:"S0101",stack:(new Error).stack,position:t}}var v,g=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(e.substring(t));if(null!==g){var y=parseFloat(g[0]);if(!isNaN(y)&&isFinite(y))return t+=g[0].length,n("number",y);throw{code:"S0102",stack:(new Error).stack,position:t,token:g[0]}}if("`"===c){t++;var m=e.indexOf("`",t);if(-1!==m)return v=e.substring(t,m),t=m+1,n("name",v);throw t=r,{code:"S0105",stack:(new Error).stack,position:t}}for(var b,k=t;;)if(b=e.charAt(k),k===r||" \t\n\r\v".indexOf(b)>-1||Object.prototype.hasOwnProperty.call(a,b)){if("$"===e.charAt(t))return v=e.substring(t+1,k),t=k,n("variable",v);switch(v=e.substring(t,k),t=k,v){case"or":case"in":case"and":return n("operator",v);case"true":return n("value",!0);case"false":return n("value",!1);case"null":return n("value",null);default:return t===r&&""===v?null:n("name",v)}}else k++};return s},function(e,t){var r,i,o={},u=[],c=function(){var e=[];"(end)"!==r.id&&e.push({type:r.type,value:r.value,position:r.position});for(var t=i();null!==t;)e.push(t),t=i();return e},l={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(t)return e.remaining=c(),e.type="error",u.push(e),e;throw e.stack=(new Error).stack,e}},p=function(e,t){var r=o[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=Object.create(l)).id=r.value=e,r.lbp=t,o[e]=r),r},f=function(e){if(t){e.remaining=c(),u.push(e);var n=o["(error)"];return(r=Object.create(n)).error=e,r.type="(error)",r}throw e.stack=(new Error).stack,e},d=function(t,n){if(t&&r.id!==t){var a={code:"(end)"===r.id?"S0203":"S0202",position:r.position,token:r.value,value:t};return f(a)}var s=i(n);if(null===s)return(r=o["(end)"]).position=e.length,r;var u,c=s.value,l=s.type;switch(l){case"name":case"variable":u=o["(name)"];break;case"operator":if(!(u=o[c]))return f({code:"S0204",stack:(new Error).stack,position:s.position,token:c});break;case"string":case"number":case"value":u=o["(literal)"];break;case"regex":l="regex",u=o["(regex)"];break;default:return f({code:"S0205",stack:(new Error).stack,position:s.position,token:c})}return(r=Object.create(u)).value=c,r.type=l,r.position=s.position,r},h=function(e){var t,n=r;for(d(null,!0),t=n.nud();e<r.lbp;)n=r,d(),t=n.led(t);return t},v=function(e){p(e,0).nud=function(){return this}},g=function(e,t,r){var n=t||a[e],i=p(e,n);return i.led=r||function(e){return this.lhs=e,this.rhs=h(n),this.type="binary",this},i},y=function(e,t,r){var n=p(e,t);return n.led=r,n},m=function(e,t){var r=p(e);return r.nud=t||function(){return this.expression=h(70),this.type="unary",this},r};v("(end)"),v("(name)"),v("(literal)"),v("(regex)"),p(":"),p(";"),p(","),p(")"),p("]"),p("}"),p(".."),g("."),g("+"),g("-"),g("*"),g("/"),g("%"),g("="),g("<"),g(">"),g("!="),g("<="),g(">="),g("&"),g("and"),g("or"),g("in"),v("and"),v("or"),v("in"),m("-"),g("~>"),y("(error)",10,(function(e){return this.lhs=e,this.error=r.error,this.remaining=c(),this.type="error",this})),m("*",(function(){return this.type="wildcard",this})),m("**",(function(){return this.type="descendant",this})),m("%",(function(){return this.type="parent",this})),g("(",a["("],(function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==r.id)for(;"operator"===r.type&&"?"===r.id?(this.type="partial",this.arguments.push(r),d("?")):this.arguments.push(h(0)),","===r.id;)d(",");if(d(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach((function(e,t){if("variable"!==e.type)return f({code:"S0208",stack:(new Error).stack,position:e.position,token:e.value,value:t+1})})),this.type="lambda","<"===r.id){for(var t=r.position,i=1,a="<";i>0&&"{"!==r.id&&"(end)"!==r.id;){var o=d();">"===o.id?i--:"<"===o.id&&i++,a+=o.value}d(">");try{this.signature=n(a)}catch(e){return e.position=t+e.offset,f(e)}}d("{"),this.body=h(0),d("}")}return this})),m("(",(function(){for(var e=[];")"!==r.id&&(e.push(h(0)),";"===r.id);)d(";");return d(")",!0),this.type="block",this.expressions=e,this})),m("[",(function(){var e=[];if("]"!==r.id)for(;;){var t=h(0);if(".."===r.id){var n={type:"binary",value:"..",position:r.position,lhs:t};d(".."),n.rhs=h(0),t=n}if(e.push(t),","!==r.id)break;d(",")}return d("]",!0),this.expressions=e,this.type="unary",this})),g("[",a["["],(function(e){if("]"===r.id){for(var t=e;t&&"binary"===t.type&&"["===t.value;)t=t.lhs;return t.keepArray=!0,d("]"),e}return this.lhs=e,this.rhs=h(a["]"]),this.type="binary",d("]",!0),this})),g("^",a["^"],(function(e){d("(");for(var t=[];;){var n={descending:!1};if("<"===r.id?d("<"):">"===r.id&&(n.descending=!0,d(">")),n.expression=h(0),t.push(n),","!==r.id)break;d(",")}return d(")"),this.lhs=e,this.rhs=t,this.type="binary",this}));var b=function(e){var t=[];if("}"!==r.id)for(;;){var n=h(0);d(":");var i=h(0);if(t.push([n,i]),","!==r.id)break;d(",")}return d("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};m("{",b),g("{",a["{"],b),y(":=",a[":="],(function(e){return"variable"!==e.type?f({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=h(a[":="]-1),this.type="binary",this)})),g("@",a["@"],(function(e){return this.lhs=e,this.rhs=h(a["@"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)})),g("#",a["#"],(function(e){return this.lhs=e,this.rhs=h(a["#"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)})),g("?",a["?"],(function(e){return this.type="condition",this.condition=e,this.then=h(0),":"===r.id&&(d(":"),this.else=h(0)),this})),m("|",(function(){return this.type="transform",this.pattern=h(0),d("|"),this.update=h(0),","===r.id&&(d(","),this.delete=h(0)),d("|"),this}));var k=function(e){var t;if("function"!==e.type||e.predicate)if("condition"===e.type)e.then=k(e.then),void 0!==e.else&&(e.else=k(e.else)),t=e;else if("block"===e.type){var r=e.expressions.length;r>0&&(e.expressions[r-1]=k(e.expressions[r-1])),t=e}else t=e;else{var n={type:"lambda",thunk:!0,arguments:[],position:e.position};n.body=e,t=n}return t},x=0,w=0,A=[],E=function(e,t){switch(e.type){case"name":case"wildcard":t.level--,0===t.level&&(void 0===e.ancestor||(A[t.index].slot.label=e.ancestor.label),e.ancestor=t,e.tuple=!0);break;case"parent":t.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,t=E(e.expressions[e.expressions.length-1],t));break;case"path":e.tuple=!0;var r=e.steps.length-1;for(t=E(e.steps[r--],t);t.level>0&&r>=0;)t=E(e.steps[r--],t);break;default:throw{code:"S0217",token:e.type,position:e.position}}return t},D=function(e,t){if(void 0!==t.seekingParent||"parent"===t.type){var r=void 0!==t.seekingParent?t.seekingParent:[];"parent"===t.type&&r.push(t.slot),void 0===e.seekingParent?e.seekingParent=r:Array.prototype.push.apply(e.seekingParent,r)}},T=function(e){var t=e.steps.length-1,r=e.steps[t],n=void 0!==r.seekingParent?r.seekingParent:[];"parent"===r.type&&n.push(r.slot);for(var i=0;i<n.length;i++){var a=n[i];for(t=e.steps.length-2;a.level>0;){if(t<0){void 0===e.seekingParent?e.seekingParent=[a]:e.seekingParent.push(a);break}for(var o=e.steps[t--];t>=0&&o.focus&&e.steps[t].focus;)o=e.steps[t--];a=E(o,a)}}},S=function(e){var r;switch(e.type){case"binary":switch(e.value){case".":var n=S(e.lhs);r="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(r.seekingParent=[n.slot]);var i=S(e.rhs);"function"===i.type&&"path"===i.procedure.type&&1===i.procedure.steps.length&&"name"===i.procedure.steps[0].type&&"function"===r.steps[r.steps.length-1].type&&(r.steps[r.steps.length-1].nextFunction=i.procedure.steps[0].value),"path"===i.type?Array.prototype.push.apply(r.steps,i.steps):(void 0!==i.predicate&&(i.stages=i.predicate,delete i.predicate),r.steps.push(i)),r.steps.filter((function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:(new Error).stack,position:e.position,value:e.value};return"string"===e.type})).forEach((function(e){e.type="name"})),r.steps.filter((function(e){return!0===e.keepArray})).length>0&&(r.keepSingletonArray=!0);var a=r.steps[0];"unary"===a.type&&"["===a.value&&(a.consarray=!0);var o=r.steps[r.steps.length-1];"unary"===o.type&&"["===o.value&&(o.consarray=!0),T(r);break;case"[":var s=r=S(e.lhs),c="predicate";if("path"===r.type&&(s=r.steps[r.steps.length-1],c="stages"),void 0!==s.group)throw{code:"S0209",stack:(new Error).stack,position:e.position};void 0===s[c]&&(s[c]=[]);var l=S(e.rhs);void 0!==l.seekingParent&&(l.seekingParent.forEach((e=>{1===e.level?E(s,e):e.level--})),D(s,l)),s[c].push({type:"filter",expr:l,position:e.position});break;case"{":if(void 0!==(r=S(e.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:e.position};r.group={lhs:e.rhs.map((function(e){return[S(e[0]),S(e[1])]})),position:e.position};break;case"^":"path"!==(r=S(e.lhs)).type&&(r={type:"path",steps:[r]});var p={type:"sort",position:e.position};p.terms=e.rhs.map((function(e){var t=S(e.expression);return D(p,t),{descending:e.descending,expression:t}})),r.steps.push(p),T(r);break;case":=":(r={type:"bind",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),D(r,r.rhs);break;case"@":if(r=S(e.lhs),s=r,"path"===r.type&&(s=r.steps[r.steps.length-1]),void 0!==s.stages||void 0!==s.predicate)throw{code:"S0215",stack:(new Error).stack,position:e.position};if("sort"===s.type)throw{code:"S0216",stack:(new Error).stack,position:e.position};e.keepArray&&(s.keepArray=!0),s.focus=e.rhs.value,s.tuple=!0;break;case"#":r=S(e.lhs),s=r,"path"===r.type?s=r.steps[r.steps.length-1]:(r={type:"path",steps:[r]},void 0!==s.predicate&&(s.stages=s.predicate,delete s.predicate)),void 0===s.stages?s.index=e.rhs.value:s.stages.push({type:"index",value:e.rhs.value,position:e.position}),s.tuple=!0;break;case"~>":(r={type:"apply",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs);break;default:(r={type:e.type,value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),D(r,r.lhs),D(r,r.rhs)}break;case"unary":r={type:e.type,value:e.value,position:e.position},"["===e.value?r.expressions=e.expressions.map((function(e){var t=S(e);return D(r,t),t})):"{"===e.value?r.lhs=e.lhs.map((function(e){var t=S(e[0]);D(r,t);var n=S(e[1]);return D(r,n),[t,n]})):(r.expression=S(e.expression),"-"===e.value&&"number"===r.expression.type?(r=r.expression).value=-r.value:D(r,r.expression));break;case"function":case"partial":(r={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map((function(e){var t=S(e);return D(r,t),t})),r.procedure=S(e.procedure);break;case"lambda":r={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var f=S(e.body);r.body=k(f);break;case"condition":(r={type:e.type,position:e.position}).condition=S(e.condition),D(r,r.condition),r.then=S(e.then),D(r,r.then),void 0!==e.else&&(r.else=S(e.else),D(r,r.else));break;case"transform":(r={type:e.type,position:e.position}).pattern=S(e.pattern),r.update=S(e.update),void 0!==e.delete&&(r.delete=S(e.delete));break;case"block":(r={type:e.type,position:e.position}).expressions=e.expressions.map((function(e){var t=S(e);return D(r,t),(t.consarray||"path"===t.type&&t.steps[0].consarray)&&(r.consarray=!0),t}));break;case"name":r={type:"path",steps:[e]},e.keepArray&&(r.keepSingletonArray=!0);break;case"parent":r={type:"parent",slot:{label:"!"+x++,level:1,index:w++}},A.push(r);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":r=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",r=S(e);else{if("?"!==e.value)throw{code:"S0201",stack:(new Error).stack,position:e.position,token:e.value};r=e}break;case"error":r=e,e.lhs&&(r=S(e.lhs));break;default:var d="S0206";"(end)"===e.id&&(d="S0207");var h={code:d,position:e.position,token:e.value};if(t)return u.push(h),{type:"error",error:h};throw h.stack=(new Error).stack,h}return e.keepArray&&(r.keepArray=!0),r};i=s(e),d();var O=h(0);if("(end)"!==r.id){var P={code:"S0201",position:r.position,token:r.value};f(P)}if("parent"===(O=S(O)).type||void 0!==O.seekingParent)throw{code:"S0217",token:O.type,position:O.position};return u.length>0&&(O.errors=u),O});var a,o,s;t.exports=i},{"./signature":5}],5:[function(e,t,r){var n=e("./utils");const i=(()=>{var e={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function t(t){for(var r=1,i=[],a={},o=a;r<t.length;){var s=t.charAt(r);if(":"===s)break;var u=function(){i.push(a),o=a,a={}},c=function(e,t,r,n){for(var i=1,a=t;a<e.length;)if(a++,(s=e.charAt(a))===n){if(0==--i)break}else s===r&&i++;return a};switch(s){case"s":case"n":case"b":case"l":case"o":a.regex="["+s+"m]",a.type=s,u();break;case"a":a.regex="[asnblfom]",a.type=s,a.array=!0,u();break;case"f":a.regex="f",a.type=s,u();break;case"j":a.regex="[asnblom]",a.type=s,u();break;case"x":a.regex="[asnblfom]",a.type=s,u();break;case"-":o.context=!0,o.contextRegex=new RegExp(o.regex),o.regex+="?";break;case"?":case"+":o.regex+=s;break;case"(":var l=c(t,r,"(",")"),p=t.substring(r+1,l);if(-1!==p.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:p,offset:r};a.regex="["+p+"m]",a.type="("+p+")",r=l,u();break;case"<":if("a"!==o.type&&"f"!==o.type)throw{code:"S0401",stack:(new Error).stack,value:o.type,offset:r};var f=c(t,r,"<",">");o.subtype=t.substring(r+1,f),r=f}r++}var d="^"+i.map((function(e){return"("+e.regex+")"})).join("")+"$",h=new RegExp(d),v=function(e){var t;if(n.isFunction(e))t="f";else switch(typeof e){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;default:t="m"}return t},g=function(e,t){for(var r="^",n=0,a=0;a<i.length;a++){r+=i[a].regex;var o=t.match(r);if(null===o)throw{code:"T0410",stack:(new Error).stack,value:e[n],index:n+1};n=o[0].length}throw{code:"T0410",stack:(new Error).stack,value:e[n],index:n+1}};return{definition:t,validate:function(t,r){var n="";t.forEach((function(e){n+=v(e)}));var a=h.exec(n);if(a){var o=[],s=0;return i.forEach((function(n,i){var u=t[s],c=a[i+1];if(""===c)if(n.context&&n.contextRegex){var l=v(r);if(!n.contextRegex.test(l))throw{code:"T0411",stack:(new Error).stack,value:r,index:s+1};o.push(r)}else o.push(u),s++;else c.split("").forEach((function(r){if("a"===n.type){if("m"===r)u=void 0;else{u=t[s];var i=!0;if(void 0!==n.subtype)if("a"!==r&&c!==n.subtype)i=!1;else if("a"===r&&u.length>0){var a=v(u[0]);i=a===n.subtype.charAt(0)&&0===u.filter((function(e){return v(e)!==a})).length}if(!i)throw{code:"T0412",stack:(new Error).stack,value:u,index:s+1,type:e[n.subtype]};"a"!==r&&(u=[u])}o.push(u),s++}else o.push(u),s++}))})),o}g(t,n)}}}return t})();t.exports=i},{"./utils":6}],6:[function(e,t,r){const n=(()=>{function e(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:(new Error).stack};return t}function t(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter((function(e){return"string"!=typeof e})).length),t}function r(t){var r=!1;return Array.isArray(t)&&(r=0===t.filter((function(t){return!e(t)})).length),r}function n(){var e=[];return e.sequence=!0,1===arguments.length&&e.push(arguments[0]),e}function i(e){return!0===e.sequence&&Array.isArray(e)}function a(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e}function o(e){return"number"==typeof e.arity?e.arity:"function"==typeof e.implementation?e.implementation.length:"number"==typeof e.length?e.length:e.arguments.length}function s(e){return e&&!0===e._jsonata_lambda}var u=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";function c(e){return"object"==typeof e&&null!==e&&u in e&&"next"in e&&"function"==typeof e.next}function l(e,t){if(e===t)return!0;if("object"==typeof e&&"object"==typeof t&&null!==e&&null!==t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1;return!0}var n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertyNames(t);if(n.length!==i.length)return!1;for(n=n.sort(),i=i.sort(),r=0;r<n.length;r++)if(n[r]!==i[r])return!1;for(r=0;r<n.length;r++){var a=n[r];if(!l(e[a],t[a]))return!1}return!0}return!1}function p(e){var t=[];for(let r of e)t.push(r);return t}return{isNumeric:e,isArrayOfStrings:t,isArrayOfNumbers:r,createSequence:n,isSequence:i,isFunction:a,isLambda:s,isIterable:c,getFunctionArity:o,isDeepEqual:l,stringToArray:p}})();t.exports=n},{}]},{},[3])(3)}));export{n as j};
@@ -1 +1 @@
1
- import"./shared-6ef0392a.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-5a08dbb0.js";import{a as e}from"./shared-6960ab99.js";import{m as i,_ as t}from"./shared-d1195c27.js";import{N as r}from"./shared-d1dfac4d.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as a}from"./shared-ba5c42c7.js";let l,d,h,c,u,f=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>o(l||(l=f` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,a=this.disabled||!this.__allLinks||this.__isFetching;return r(o(d||(d=f` <vaadin-checkbox class="block" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),a,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),a?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1}})}static get styles(){return[super.styles,a(h||(h=f`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center}`))]}renderControl(){var e;let i;try{const t=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");t.searchParams.set("limit",this.limit.toString()),i=t.toString()}catch(e){i=void 0}const t=this.__isFetching||!this.__allLinks;return o(c||(c=f` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,t?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(i),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-contrast-10":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,o,a;this.__isFetching=!0;const l=new r.API(this),d=await l.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(d.ok){const e=await d.json(),i=await l.fetch(e._links.self.href);if(i.ok){const t=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await i.json();t.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var i,t,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),a=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),a.push(i.toString())}}catch(e){}return a.map((e=>o(u||(u=f` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});
1
+ import"./shared-cc8237eb.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-94756d7c.js";import{a as e}from"./shared-377dea9e.js";import{m as i,_ as t}from"./shared-cb58dfcd.js";import{N as r}from"./shared-f83207fb.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as a}from"./shared-ba5c42c7.js";let l,d,c,h,u,f=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=i(((e,i)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${i?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var i;const t=this.__getItemRenderer(this.item,!!e.data),r=e=>o(l||(l=f` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(t(e));if(this.readonly)return r(t(e));const s=this.foreignKeyForUri,n=s?null===(i=this.__allLinks)||void 0===i?void 0:i.find((i=>i[s]===e.href)):void 0,a=this.disabled||!this.__allLinks||this.__isFetching;return r(o(d||(d=f` <vaadin-checkbox class="block" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),a,!!n,(i=>{var t,r,s;i.currentTarget.checked?this.__insertLink(null!==(r=null===(t=e.data)||void 0===t?void 0:t._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),a?"opacity-50":"opacity-100",t(e)))},this.__isFetching=!1}static get properties(){return t(t({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1}})}static get styles(){return[super.styles,a(c||(c=f`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center}`))]}renderControl(){var e;let i;try{const t=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");t.searchParams.set("limit",this.limit.toString()),i=t.toString()}catch(e){i=void 0}const t=this.__isFetching||!this.__allLinks;return o(h||(h=f` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,t?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(i),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-contrast-10":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var i,t;super.updated(e),e.has("item")&&(null===(t=(i=this.__getItemRenderer.cache).clear)||void 0===t||t.call(i))}async __insertLink(e){var i,t,s,n,o,a;this.__isFetching=!0;const l=new r.API(this),d=await l.fetch(null!==(i=this.linksHref)&&void 0!==i?i:"",{method:"POST",body:JSON.stringify({[null!==(t=this.foreignKeyForUri)&&void 0!==t?t:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(d.ok){const e=await d.json(),i=await l.fetch(e._links.self.href);if(i.ok){const t=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await i.json();t.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var i,t,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(t=null===(i=this.nucleon)||void 0===i?void 0:i.group)&&void 0!==t?t:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,i,t;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==i?i:r),a=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const i=new URL(null!==(t=this.linksHref)&&void 0!==t?t:"");i.searchParams.set("offset",String(e*r)),i.searchParams.set("limit",String(r)),a.push(i.toString())}}catch(e){}return a.map((e=>o(u||(u=f` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,i;const t=this.embedKey;if(!t)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(i=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===i?void 0:i[t];if(!r)return null;s.push(...r)}return s}});
@@ -1 +1 @@
1
- import"./shared-8e36bcc1.js";import"./shared-893ead61.js";const c=document.createElement("template");c.innerHTML='<iron-iconset-svg size="1000" name="lumo">\n<svg xmlns="http://www.w3.org/2000/svg">\n<defs>\n<g id="angle-down"><path d="M283 391c-18-16-46-15-63 4-16 18-15 46 3 63l244 224c17 15 43 15 60 0l250-229c18-16 20-45 3-63-16-18-45-20-63-4l-220 203-214-198z"></path></g>\n<g id="angle-left"><path d="M601 710c16 18 15 46-3 63-18 16-46 15-63-4l-224-244c-15-17-15-43 0-59l229-250c16-18 45-20 63-4 18 16 20 45 3 63l-203 220 198 215z"></path></g>\n<g id="angle-right"><path d="M399 275c-16-18-15-46 3-63 18-16 46-15 63 4l224 244c15 17 15 43 0 59l-229 250c-16 18-45 20-63 4-18-16-20-45-3-63l203-220-198-215z"></path></g>\n<g id="angle-up"><path d="M283 635c-18 16-46 15-63-3-16-18-15-46 3-63l244-224c17-15 43-15 60 0l250 229c18 16 20 45 3 63-16 18-45 20-63 3l-220-202L283 635z"></path></g>\n<g id="arrow-down"><path d="M538 646l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166c0 0 0 0 0 0-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 646V312c0-21 17-38 38-37s38 17 37 37v334z"></path></g>\n<g id="arrow-left"><path d="M375 538l111 125c14 15 12 39-3 53-15 14-39 12-53-4l-166-187c0 0 0 0 0 0-13-14-12-36 0-50l166-187c14-15 37-17 53-4 15 14 17 37 3 53L375 463h333c21 0 38 17 38 37 0 21-17 38-38 38h-333z"></path></g>\n<g id="arrow-right"><path d="M625 538h-333c-21 0-38-17-38-38 0-21 17-38 38-37h333l-111-126c-14-15-12-39 3-53 15-14 39-12 53 4l166 187c13 14 13 36 0 50 0 0 0 0 0 0l-166 187c-14 15-37 17-53 4-15-14-17-37-3-53l111-125z"></path></g>\n<g id="arrow-up"><path d="M538 354V688c0 21-17 38-38 37s-38-17-38-38V354l-125 112c-15 14-39 12-53-4-14-15-12-39 4-53l187-166c14-13 36-13 50 0 0 0 0 0 0 0l187 166c15 14 17 37 4 53-14 15-37 17-53 4L538 354z"></path></g>\n<g id="bar-chart"><path d="M175 500h108c28 0 50 22 50 50v233c0 28-22 50-50 50H175c-28 0-50-22-50-50v-233c0-28 22-50 50-50z m33 67c-9 0-17 7-16 16v167c0 9 7 17 16 17h42c9 0 17-7 17-17v-167c0-9-7-17-17-16H208zM446 167h108c28 0 50 22 50 50v566c0 28-22 50-50 50h-108c-28 0-50-22-50-50V217c0-28 22-50 50-50z m33 66c-9 0-17 7-17 17v500c0 9 7 17 17 17h42c9 0 17-7 16-17V250c0-9-7-17-16-17h-42zM717 333h108c28 0 50 22 50 50v400c0 28-22 50-50 50h-108c-28 0-50-22-50-50V383c0-28 22-50 50-50z m33 67c-9 0-17 7-17 17v333c0 9 7 17 17 17h42c9 0 17-7 16-17v-333c0-9-7-17-16-17h-42z"></path></g>\n<g id="bell"><path d="M367 675H292v-258C292 325 366 250 459 250H458V208c0-23 18-42 42-41 23 0 42 18 42 41v42h-1C634 250 708 325 708 417V675h-75v-258c0-51-41-92-91-92h-84C408 325 367 366 367 417V675z m-159 37c0-21 17-38 38-37h508c21 0 37 17 38 37 0 21-17 38-38 38H246C225 750 208 733 208 713z m230 71h125v32c0 17-14 31-32 31h-62c-17 0-32-14-31-31v-32z"></path></g>\n<g id="calendar"><path d="M375 208h250v-20C625 176 634 167 646 167h41C699 167 708 176 708 188V208h74c23 0 41 19 41 42v42C823 315 804 333 782 333H218C196 333 177 315 177 292V250C177 227 196 208 218 208H292v-20C292 176 301 167 313 167h41C366 167 375 176 375 188V208zM229 375h42C283 375 292 384 292 396v41C292 449 282 458 271 458h-42C217 458 208 449 208 437v-41C208 384 218 375 229 375z m125 0h42C408 375 417 384 417 396v41C417 449 407 458 396 458h-42C342 458 333 449 333 437v-41C333 384 343 375 354 375z m125 0h42C533 375 542 384 542 396v41C542 449 532 458 521 458h-42C467 458 458 449 458 437v-41C458 384 468 375 479 375z m-250 125h42C283 500 292 509 292 521v41C292 574 282 583 271 583h-42C217 583 208 574 208 562v-41C208 509 218 500 229 500z m125 0h42C408 500 417 509 417 521v41C417 574 407 583 396 583h-42C342 583 333 574 333 562v-41C333 509 343 500 354 500z m125 0h42c12 0 21 9 21 21v41C542 574 532 583 521 583h-42C467 583 458 574 458 562v-41C458 509 468 500 479 500z m-250 125h42C283 625 292 634 292 646v41C292 699 282 708 271 708h-42C217 708 208 699 208 687v-41C208 634 218 625 229 625z m125 0h42C408 625 417 634 417 646v41C417 699 407 708 396 708h-42C342 708 333 699 333 687v-41C333 634 343 625 354 625z m125 0h42c12 0 21 9 21 21v41C542 699 532 708 521 708h-42C467 708 458 699 458 687v-41C458 634 468 625 479 625z m125-250h42C658 375 667 384 667 396v41C667 449 657 458 646 458h-42C592 458 583 449 583 437v-41C583 384 593 375 604 375z m0 125h42c12 0 21 9 21 21v41C667 574 657 583 646 583h-42C592 583 583 574 583 562v-41C583 509 593 500 604 500z m0 125h42c12 0 21 9 21 21v41C667 699 657 708 646 708h-42C592 708 583 699 583 687v-41C583 634 593 625 604 625z m125 0h42c12 0 21 9 21 21v41C792 699 782 708 771 708h-42C717 708 708 699 708 687v-41C708 634 718 625 729 625z m-500 125h42C283 750 292 759 292 771v41C292 824 282 833 271 833h-42C217 833 208 824 208 812v-41C208 759 218 750 229 750z m125 0h42C408 750 417 759 417 771v41C417 824 407 833 396 833h-42C342 833 333 824 333 812v-41C333 759 343 750 354 750z m125 0h42c12 0 21 9 21 21v41C542 824 532 833 521 833h-42C467 833 458 824 458 812v-41C458 759 468 750 479 750z m125 0h42c12 0 21 9 21 21v41C667 824 657 833 646 833h-42C592 833 583 824 583 812v-41C583 759 593 750 604 750z m125 0h42c12 0 21 9 21 21v41C792 824 782 833 771 833h-42C717 833 708 824 708 812v-41C708 759 718 750 729 750z m0-250h42c12 0 21 9 21 21v41C792 574 782 583 771 583h-42C717 583 708 574 708 562v-41C708 509 718 500 729 500z m0-125h42C783 375 792 384 792 396v41C792 449 782 458 771 458h-42C717 458 708 449 708 437v-41C708 384 718 375 729 375z"></path></g>\n<g id="checkmark"><path d="M318 493c-15-15-38-15-53 0-15 15-15 38 0 53l136 136c15 15 38 15 53 0l323-322c15-15 15-38 0-53-15-15-38-15-54 0l-295 296-110-110z"></path></g>\n<g id="chevron-down"><path d="M533 654l210-199c9-9 9-23 0-32C739 419 733 417 726 417H274C261 417 250 427 250 439c0 6 2 12 7 16l210 199c18 17 48 17 66 0z"></path></g>\n<g id="chevron-left"><path d="M346 533l199 210c9 9 23 9 32 0 4-4 7-10 6-17V274C583 261 573 250 561 250c-6 0-12 2-16 7l-199 210c-17 18-17 48 0 66z"></path></g>\n<g id="chevron-right"><path d="M654 533L455 743c-9 9-23 9-32 0C419 739 417 733 417 726V274C417 261 427 250 439 250c6 0 12 2 16 7l199 210c17 18 17 48 0 66z"></path></g>\n<g id="chevron-up"><path d="M533 346l210 199c9 9 9 23 0 32-4 4-10 7-17 6H274C261 583 250 573 250 561c0-6 2-12 7-16l210-199c18-17 48-17 66 0z"></path></g>\n<g id="clock"><path d="M538 489l85 85c15 15 15 38 0 53-15 15-38 15-53 0l-93-93a38 38 0 0 1-2-2C467 525 462 515 462 504V308c0-21 17-38 38-37 21 0 38 17 37 37v181zM500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265z"></path></g>\n<g id="cog"><path d="M833 458l-81-18c-8-25-17-50-29-75L767 292 708 233l-72 49c-21-12-46-25-75-30L542 167h-84l-19 79c-25 8-50 17-71 30L296 233 233 296l47 69c-12 21-21 46-29 71L167 458v84l84 25c8 25 17 50 29 75L233 708 292 767l76-44c21 12 46 25 75 29L458 833h84l19-81c25-8 50-17 75-29L708 767l59-59-44-66c12-21 25-46 29-75L833 542v-84z m-333 217c-96 0-175-79-175-175 0-96 79-175 175-175 96 0 175 79 175 175 0 96-79 175-175 175z"></path></g>\n<g id="cross"><path d="M445 500l-142-141c-15-15-15-40 0-56 15-15 40-15 56 0L500 445l141-142c15-15 40-15 56 0 15 15 15 40 0 56L555 500l142 141c15 15 15 40 0 56-15 15-40 15-56 0L500 555l-141 142c-15 15-40 15-56 0-15-15-15-40 0-56L445 500z"></path></g>\n<g id="download"><path d="M538 521l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166a38 38 0 0 1 0 0c-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 521V188c0-21 17-38 38-38s38 17 37 38v333zM758 704c0-21 17-38 38-37 21 0 38 17 37 37v92c0 21-17 38-37 37H204c-21 0-38-17-37-37v-92c0-21 17-38 37-37s38 17 38 37v54h516v-54z"></path></g>\n<g id="dropdown"><path d="M317 393c-15-14-39-13-53 3-14 15-13 39 3 53l206 189c14 13 36 13 50 0l210-193c15-14 17-38 3-53-14-15-38-17-53-3l-185 171L317 393z"></path></g>\n<g id="edit"><path d="M673 281l62 56-205 233c-9 10-38 24-85 39a8 8 0 0 1-5 0c-4-1-7-6-6-10l0 0c14-47 25-76 35-86l204-232z m37-42l52-59c15-17 41-18 58-2 17 16 18 42 3 59L772 295l-62-56zM626 208l-67 75h-226C305 283 283 306 283 333v334C283 695 306 717 333 717h334c28 0 50-22 50-50v-185L792 398v269C792 736 736 792 667 792H333C264 792 208 736 208 667V333C208 264 264 208 333 208h293z"></path></g>\n<g id="error"><path d="M500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265zM479 292h42c12 0 21 9 20 20l-11 217c0 8-6 13-13 13h-34c-7 0-13-6-13-13l-11-217C459 301 468 292 479 292zM483 608h34c12 0 21 9 20 21v33c0 12-9 21-20 21h-34c-12 0-21-9-21-21v-33c0-12 9-21 21-21z"></path></g>\n<g id="eye"><path d="M500 750c-187 0-417-163-417-250s230-250 417-250 417 163 417 250-230 250-417 250z m-336-231c20 22 47 46 78 69C322 644 411 678 500 678s178-34 258-90c31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69C678 356 589 322 500 322s-178 34-258 90c-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19zM500 646c-81 0-146-65-146-146s65-146 146-146 146 65 146 146-65 146-146 146z m0-75c39 0 71-32 71-71 0-39-32-71-71-71-39 0-71 32-71 71 0 39 32 71 71 71z"></path></g>\n<g id="eye-disabled"><path d="M396 735l60-60c15 2 30 3 44 3 89 0 178-34 258-90 31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69-8-5-15-11-23-15l50-51C862 397 917 458 917 500c0 87-230 250-417 250-34 0-69-5-104-15zM215 654C138 603 83 542 83 500c0-87 230-250 417-250 34 0 69 5 104 15l-59 60c-15-2-30-3-45-3-89 0-178 34-258 90-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19 20 22 47 46 78 69 8 5 16 11 24 16L215 654z m271-9l159-159c0 5 1 9 1 14 0 81-65 146-146 146-5 0-9 0-14-1z m-131-131C354 510 354 505 354 500c0-81 65-146 146-146 5 0 10 0 14 1l-159 159z m-167 257L780 179c12-12 32-12 44 0 12 12 12 32 0 44L232 815c-12 12-32 12-44 0s-12-32 0-44z"></path></g>\n<g id="menu"><path d="M167 292c0-23 19-42 41-42h584C815 250 833 268 833 292c0 23-19 42-41 41H208C185 333 167 315 167 292z m0 208c0-23 19-42 41-42h584C815 458 833 477 833 500c0 23-19 42-41 42H208C185 542 167 523 167 500z m0 208c0-23 19-42 41-41h584C815 667 833 685 833 708c0 23-19 42-41 42H208C185 750 167 732 167 708z"></path></g>\n<g id="minus"><path d="M261 461c-22 0-39 18-39 39 0 22 18 39 39 39h478c22 0 39-18 39-39 0-22-18-39-39-39H261z"></path></g>\n<g id="ordered-list"><path d="M138 333V198H136l-43 28v-38l45-31h45V333H138z m-61 128c0-35 27-59 68-59 39 0 66 21 66 53 0 20-11 37-43 64l-29 27v2h74V583H80v-30l55-52c26-24 32-33 33-43 0-13-10-22-24-22-15 0-26 10-26 25v1h-41v-1zM123 759v-31h21c15 0 25-8 25-21 0-13-10-21-25-21-15 0-26 9-26 23h-41c1-34 27-56 68-57 39 0 66 20 66 49 0 20-14 36-33 39v3c24 3 40 19 39 41 0 32-30 54-73 54-41 0-69-22-70-57h43c1 13 11 22 28 22 16 0 27-9 27-22 0-14-10-22-28-22h-21zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="phone"><path d="M296 208l42-37c17-15 44-13 58 4a42 42 0 0 1 5 7L459 282c12 20 5 45-15 57l-7 4c-17 10-25 30-19 48l20 66a420 420 0 0 0 93 157l41 45c13 14 35 17 51 8l7-5c20-12 45-5 57 16L745 777c12 20 5 45-15 57a42 42 0 0 1-8 4l-52 17c-61 21-129 4-174-43l-50-52c-81-85-141-189-175-302l-24-78c-19-62 0-129 49-172z"></path></g>\n<g id="photo"><path d="M208 167h584c69 0 125 56 125 125v416c0 69-56 125-125 125H208c-69 0-125-56-125-125V292c0-69 56-125 125-125z m584 75H208c-28 0-50 22-50 50v416c0 28 22 50 50 50h584c28 0 50-22 50-50V292c0-28-22-50-50-50zM239 740l167-167c12-12 31-14 45-6l73 43 172-201c13-15 34-18 50-7l95 67v92l-111-78-169 199c-12 14-32 17-47 8l-76-43-111 111H229c2-7 5-13 10-18zM458 427C458 490 407 542 344 542S229 490 229 427c0-63 51-115 115-115S458 364 458 427z m-62 0C396 398 373 375 344 375S292 398 292 427c0 29 23 52 52 52s52-23 52-52z"></path></g>\n<g id="play"><path d="M689 528l-298 175c-13 8-34 8-48 0-6-4-10-9-10-14V311C333 300 348 292 367 292c9 0 17 2 24 5l298 175c26 15 26 40 0 56z"></path></g>\n<g id="plus"><path d="M461 461H261c-22 0-39 18-39 39 0 22 18 39 39 39h200v200c0 22 18 39 39 39 22 0 39-18 39-39v-200h200c22 0 39-18 39-39 0-22-18-39-39-39h-200V261c0-22-18-39-39-39-22 0-39 18-39 39v200z"></path></g>\n<g id="redo"><path d="M290 614C312 523 393 458 491 458c55 0 106 22 144 57l-88 88c-3 3-5 7-5 11 0 8 6 15 15 15l193-5c17 0 31-15 31-32l5-192c0-4-1-8-4-11-6-6-16-6-22 0l-66 67C641 406 570 375 491 375c-136 0-248 90-281 215-1 2-1 5-1 8-8 44 45 68 73 32 4-5 7-11 8-16z"></path></g>\n<g id="reload"><path d="M500 233V137c0-9 7-16 15-16 4 0 8 2 10 4l133 140c12 12 12 32 0 45l-133 140c-6 6-15 6-21 0C502 447 500 443 500 438V308c-117 0-212 95-212 213 0 117 95 212 212 212 117 0 212-95 212-212 0-21 17-38 38-38s38 17 37 38c0 159-129 288-287 287-159 0-288-129-288-287 0-159 129-288 288-288z"></path></g>\n<g id="search"><path d="M662 603l131 131c16 16 16 42 0 59-16 16-43 16-59 0l-131-131C562 691 512 708 458 708c-138 0-250-112-250-250 0-138 112-250 250-250 138 0 250 112 250 250 0 54-17 104-46 145zM458 646c104 0 188-84 188-188S562 271 458 271 271 355 271 458s84 188 187 188z"></path></g>\n<g id="undo"><path d="M710 614C688 523 607 458 509 458c-55 0-106 22-144 57l88 88c3 3 5 7 5 11 0 8-6 15-15 15l-193-5c-17 0-31-15-31-32L214 400c0-4 1-8 4-11 6-6 16-6 22 0l66 67C359 406 430 375 509 375c136 0 248 90 281 215 1 2 1 5 1 8 8 44-45 68-73 32-4-5-7-11-8-16z"></path></g>\n<g id="unordered-list"><path d="M146 325c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="upload"><path d="M454 271V604c0 21-17 38-37 38s-38-17-38-38V271L254 382c-15 14-39 12-53-3-14-15-12-39 3-53L391 160c14-13 36-13 51-1 0 0 0 0 0 1l187 166c15 14 17 37 3 53-14 15-37 17-53 3L454 271zM675 704c0-21 17-38 37-37 21 0 38 17 38 37v92c0 21-17 38-38 37H121c-21 0-38-17-38-37v-92c0-21 17-38 38-37s38 17 37 37v54h517v-54z"></path></g>\n<g id="user"><path d="M500 500c-69 0-125-56-125-125s56-125 125-125 125 56 125 125-56 125-125 125z m-292 292c0-115 131-208 292-209s292 93 292 209H208z"></path></g>\n</defs>\n</svg>\n</iron-iconset-svg>',document.head.appendChild(c.content);
1
+ import"./shared-8154088a.js";import"./shared-cfb804b4.js";const c=document.createElement("template");c.innerHTML='<iron-iconset-svg size="1000" name="lumo">\n<svg xmlns="http://www.w3.org/2000/svg">\n<defs>\n<g id="angle-down"><path d="M283 391c-18-16-46-15-63 4-16 18-15 46 3 63l244 224c17 15 43 15 60 0l250-229c18-16 20-45 3-63-16-18-45-20-63-4l-220 203-214-198z"></path></g>\n<g id="angle-left"><path d="M601 710c16 18 15 46-3 63-18 16-46 15-63-4l-224-244c-15-17-15-43 0-59l229-250c16-18 45-20 63-4 18 16 20 45 3 63l-203 220 198 215z"></path></g>\n<g id="angle-right"><path d="M399 275c-16-18-15-46 3-63 18-16 46-15 63 4l224 244c15 17 15 43 0 59l-229 250c-16 18-45 20-63 4-18-16-20-45-3-63l203-220-198-215z"></path></g>\n<g id="angle-up"><path d="M283 635c-18 16-46 15-63-3-16-18-15-46 3-63l244-224c17-15 43-15 60 0l250 229c18 16 20 45 3 63-16 18-45 20-63 3l-220-202L283 635z"></path></g>\n<g id="arrow-down"><path d="M538 646l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166c0 0 0 0 0 0-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 646V312c0-21 17-38 38-37s38 17 37 37v334z"></path></g>\n<g id="arrow-left"><path d="M375 538l111 125c14 15 12 39-3 53-15 14-39 12-53-4l-166-187c0 0 0 0 0 0-13-14-12-36 0-50l166-187c14-15 37-17 53-4 15 14 17 37 3 53L375 463h333c21 0 38 17 38 37 0 21-17 38-38 38h-333z"></path></g>\n<g id="arrow-right"><path d="M625 538h-333c-21 0-38-17-38-38 0-21 17-38 38-37h333l-111-126c-14-15-12-39 3-53 15-14 39-12 53 4l166 187c13 14 13 36 0 50 0 0 0 0 0 0l-166 187c-14 15-37 17-53 4-15-14-17-37-3-53l111-125z"></path></g>\n<g id="arrow-up"><path d="M538 354V688c0 21-17 38-38 37s-38-17-38-38V354l-125 112c-15 14-39 12-53-4-14-15-12-39 4-53l187-166c14-13 36-13 50 0 0 0 0 0 0 0l187 166c15 14 17 37 4 53-14 15-37 17-53 4L538 354z"></path></g>\n<g id="bar-chart"><path d="M175 500h108c28 0 50 22 50 50v233c0 28-22 50-50 50H175c-28 0-50-22-50-50v-233c0-28 22-50 50-50z m33 67c-9 0-17 7-16 16v167c0 9 7 17 16 17h42c9 0 17-7 17-17v-167c0-9-7-17-17-16H208zM446 167h108c28 0 50 22 50 50v566c0 28-22 50-50 50h-108c-28 0-50-22-50-50V217c0-28 22-50 50-50z m33 66c-9 0-17 7-17 17v500c0 9 7 17 17 17h42c9 0 17-7 16-17V250c0-9-7-17-16-17h-42zM717 333h108c28 0 50 22 50 50v400c0 28-22 50-50 50h-108c-28 0-50-22-50-50V383c0-28 22-50 50-50z m33 67c-9 0-17 7-17 17v333c0 9 7 17 17 17h42c9 0 17-7 16-17v-333c0-9-7-17-16-17h-42z"></path></g>\n<g id="bell"><path d="M367 675H292v-258C292 325 366 250 459 250H458V208c0-23 18-42 42-41 23 0 42 18 42 41v42h-1C634 250 708 325 708 417V675h-75v-258c0-51-41-92-91-92h-84C408 325 367 366 367 417V675z m-159 37c0-21 17-38 38-37h508c21 0 37 17 38 37 0 21-17 38-38 38H246C225 750 208 733 208 713z m230 71h125v32c0 17-14 31-32 31h-62c-17 0-32-14-31-31v-32z"></path></g>\n<g id="calendar"><path d="M375 208h250v-20C625 176 634 167 646 167h41C699 167 708 176 708 188V208h74c23 0 41 19 41 42v42C823 315 804 333 782 333H218C196 333 177 315 177 292V250C177 227 196 208 218 208H292v-20C292 176 301 167 313 167h41C366 167 375 176 375 188V208zM229 375h42C283 375 292 384 292 396v41C292 449 282 458 271 458h-42C217 458 208 449 208 437v-41C208 384 218 375 229 375z m125 0h42C408 375 417 384 417 396v41C417 449 407 458 396 458h-42C342 458 333 449 333 437v-41C333 384 343 375 354 375z m125 0h42C533 375 542 384 542 396v41C542 449 532 458 521 458h-42C467 458 458 449 458 437v-41C458 384 468 375 479 375z m-250 125h42C283 500 292 509 292 521v41C292 574 282 583 271 583h-42C217 583 208 574 208 562v-41C208 509 218 500 229 500z m125 0h42C408 500 417 509 417 521v41C417 574 407 583 396 583h-42C342 583 333 574 333 562v-41C333 509 343 500 354 500z m125 0h42c12 0 21 9 21 21v41C542 574 532 583 521 583h-42C467 583 458 574 458 562v-41C458 509 468 500 479 500z m-250 125h42C283 625 292 634 292 646v41C292 699 282 708 271 708h-42C217 708 208 699 208 687v-41C208 634 218 625 229 625z m125 0h42C408 625 417 634 417 646v41C417 699 407 708 396 708h-42C342 708 333 699 333 687v-41C333 634 343 625 354 625z m125 0h42c12 0 21 9 21 21v41C542 699 532 708 521 708h-42C467 708 458 699 458 687v-41C458 634 468 625 479 625z m125-250h42C658 375 667 384 667 396v41C667 449 657 458 646 458h-42C592 458 583 449 583 437v-41C583 384 593 375 604 375z m0 125h42c12 0 21 9 21 21v41C667 574 657 583 646 583h-42C592 583 583 574 583 562v-41C583 509 593 500 604 500z m0 125h42c12 0 21 9 21 21v41C667 699 657 708 646 708h-42C592 708 583 699 583 687v-41C583 634 593 625 604 625z m125 0h42c12 0 21 9 21 21v41C792 699 782 708 771 708h-42C717 708 708 699 708 687v-41C708 634 718 625 729 625z m-500 125h42C283 750 292 759 292 771v41C292 824 282 833 271 833h-42C217 833 208 824 208 812v-41C208 759 218 750 229 750z m125 0h42C408 750 417 759 417 771v41C417 824 407 833 396 833h-42C342 833 333 824 333 812v-41C333 759 343 750 354 750z m125 0h42c12 0 21 9 21 21v41C542 824 532 833 521 833h-42C467 833 458 824 458 812v-41C458 759 468 750 479 750z m125 0h42c12 0 21 9 21 21v41C667 824 657 833 646 833h-42C592 833 583 824 583 812v-41C583 759 593 750 604 750z m125 0h42c12 0 21 9 21 21v41C792 824 782 833 771 833h-42C717 833 708 824 708 812v-41C708 759 718 750 729 750z m0-250h42c12 0 21 9 21 21v41C792 574 782 583 771 583h-42C717 583 708 574 708 562v-41C708 509 718 500 729 500z m0-125h42C783 375 792 384 792 396v41C792 449 782 458 771 458h-42C717 458 708 449 708 437v-41C708 384 718 375 729 375z"></path></g>\n<g id="checkmark"><path d="M318 493c-15-15-38-15-53 0-15 15-15 38 0 53l136 136c15 15 38 15 53 0l323-322c15-15 15-38 0-53-15-15-38-15-54 0l-295 296-110-110z"></path></g>\n<g id="chevron-down"><path d="M533 654l210-199c9-9 9-23 0-32C739 419 733 417 726 417H274C261 417 250 427 250 439c0 6 2 12 7 16l210 199c18 17 48 17 66 0z"></path></g>\n<g id="chevron-left"><path d="M346 533l199 210c9 9 23 9 32 0 4-4 7-10 6-17V274C583 261 573 250 561 250c-6 0-12 2-16 7l-199 210c-17 18-17 48 0 66z"></path></g>\n<g id="chevron-right"><path d="M654 533L455 743c-9 9-23 9-32 0C419 739 417 733 417 726V274C417 261 427 250 439 250c6 0 12 2 16 7l199 210c17 18 17 48 0 66z"></path></g>\n<g id="chevron-up"><path d="M533 346l210 199c9 9 9 23 0 32-4 4-10 7-17 6H274C261 583 250 573 250 561c0-6 2-12 7-16l210-199c18-17 48-17 66 0z"></path></g>\n<g id="clock"><path d="M538 489l85 85c15 15 15 38 0 53-15 15-38 15-53 0l-93-93a38 38 0 0 1-2-2C467 525 462 515 462 504V308c0-21 17-38 38-37 21 0 38 17 37 37v181zM500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265z"></path></g>\n<g id="cog"><path d="M833 458l-81-18c-8-25-17-50-29-75L767 292 708 233l-72 49c-21-12-46-25-75-30L542 167h-84l-19 79c-25 8-50 17-71 30L296 233 233 296l47 69c-12 21-21 46-29 71L167 458v84l84 25c8 25 17 50 29 75L233 708 292 767l76-44c21 12 46 25 75 29L458 833h84l19-81c25-8 50-17 75-29L708 767l59-59-44-66c12-21 25-46 29-75L833 542v-84z m-333 217c-96 0-175-79-175-175 0-96 79-175 175-175 96 0 175 79 175 175 0 96-79 175-175 175z"></path></g>\n<g id="cross"><path d="M445 500l-142-141c-15-15-15-40 0-56 15-15 40-15 56 0L500 445l141-142c15-15 40-15 56 0 15 15 15 40 0 56L555 500l142 141c15 15 15 40 0 56-15 15-40 15-56 0L500 555l-141 142c-15 15-40 15-56 0-15-15-15-40 0-56L445 500z"></path></g>\n<g id="download"><path d="M538 521l125-112c15-14 39-12 53 4 14 15 12 39-4 53l-187 166a38 38 0 0 1 0 0c-14 13-36 12-50 0l-187-166c-15-14-17-37-4-53 14-15 37-17 53-4L462 521V188c0-21 17-38 38-38s38 17 37 38v333zM758 704c0-21 17-38 38-37 21 0 38 17 37 37v92c0 21-17 38-37 37H204c-21 0-38-17-37-37v-92c0-21 17-38 37-37s38 17 38 37v54h516v-54z"></path></g>\n<g id="dropdown"><path d="M317 393c-15-14-39-13-53 3-14 15-13 39 3 53l206 189c14 13 36 13 50 0l210-193c15-14 17-38 3-53-14-15-38-17-53-3l-185 171L317 393z"></path></g>\n<g id="edit"><path d="M673 281l62 56-205 233c-9 10-38 24-85 39a8 8 0 0 1-5 0c-4-1-7-6-6-10l0 0c14-47 25-76 35-86l204-232z m37-42l52-59c15-17 41-18 58-2 17 16 18 42 3 59L772 295l-62-56zM626 208l-67 75h-226C305 283 283 306 283 333v334C283 695 306 717 333 717h334c28 0 50-22 50-50v-185L792 398v269C792 736 736 792 667 792H333C264 792 208 736 208 667V333C208 264 264 208 333 208h293z"></path></g>\n<g id="error"><path d="M500 833c-184 0-333-149-333-333s149-333 333-333 333 149 333 333-149 333-333 333z m0-68c146 0 265-118 265-265 0-146-118-265-265-265-146 0-265 118-265 265 0 146 118 265 265 265zM479 292h42c12 0 21 9 20 20l-11 217c0 8-6 13-13 13h-34c-7 0-13-6-13-13l-11-217C459 301 468 292 479 292zM483 608h34c12 0 21 9 20 21v33c0 12-9 21-20 21h-34c-12 0-21-9-21-21v-33c0-12 9-21 21-21z"></path></g>\n<g id="eye"><path d="M500 750c-187 0-417-163-417-250s230-250 417-250 417 163 417 250-230 250-417 250z m-336-231c20 22 47 46 78 69C322 644 411 678 500 678s178-34 258-90c31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69C678 356 589 322 500 322s-178 34-258 90c-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19zM500 646c-81 0-146-65-146-146s65-146 146-146 146 65 146 146-65 146-146 146z m0-75c39 0 71-32 71-71 0-39-32-71-71-71-39 0-71 32-71 71 0 39 32 71 71 71z"></path></g>\n<g id="eye-disabled"><path d="M396 735l60-60c15 2 30 3 44 3 89 0 178-34 258-90 31-22 59-46 78-69 6-7 12-14 16-19-4-6-9-12-16-19-20-22-47-46-78-69-8-5-15-11-23-15l50-51C862 397 917 458 917 500c0 87-230 250-417 250-34 0-69-5-104-15zM215 654C138 603 83 542 83 500c0-87 230-250 417-250 34 0 69 5 104 15l-59 60c-15-2-30-3-45-3-89 0-178 34-258 90-31 22-59 46-78 69-6 7-12 14-16 19 4 6 9 12 16 19 20 22 47 46 78 69 8 5 16 11 24 16L215 654z m271-9l159-159c0 5 1 9 1 14 0 81-65 146-146 146-5 0-9 0-14-1z m-131-131C354 510 354 505 354 500c0-81 65-146 146-146 5 0 10 0 14 1l-159 159z m-167 257L780 179c12-12 32-12 44 0 12 12 12 32 0 44L232 815c-12 12-32 12-44 0s-12-32 0-44z"></path></g>\n<g id="menu"><path d="M167 292c0-23 19-42 41-42h584C815 250 833 268 833 292c0 23-19 42-41 41H208C185 333 167 315 167 292z m0 208c0-23 19-42 41-42h584C815 458 833 477 833 500c0 23-19 42-41 42H208C185 542 167 523 167 500z m0 208c0-23 19-42 41-41h584C815 667 833 685 833 708c0 23-19 42-41 42H208C185 750 167 732 167 708z"></path></g>\n<g id="minus"><path d="M261 461c-22 0-39 18-39 39 0 22 18 39 39 39h478c22 0 39-18 39-39 0-22-18-39-39-39H261z"></path></g>\n<g id="ordered-list"><path d="M138 333V198H136l-43 28v-38l45-31h45V333H138z m-61 128c0-35 27-59 68-59 39 0 66 21 66 53 0 20-11 37-43 64l-29 27v2h74V583H80v-30l55-52c26-24 32-33 33-43 0-13-10-22-24-22-15 0-26 10-26 25v1h-41v-1zM123 759v-31h21c15 0 25-8 25-21 0-13-10-21-25-21-15 0-26 9-26 23h-41c1-34 27-56 68-57 39 0 66 20 66 49 0 20-14 36-33 39v3c24 3 40 19 39 41 0 32-30 54-73 54-41 0-69-22-70-57h43c1 13 11 22 28 22 16 0 27-9 27-22 0-14-10-22-28-22h-21zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="phone"><path d="M296 208l42-37c17-15 44-13 58 4a42 42 0 0 1 5 7L459 282c12 20 5 45-15 57l-7 4c-17 10-25 30-19 48l20 66a420 420 0 0 0 93 157l41 45c13 14 35 17 51 8l7-5c20-12 45-5 57 16L745 777c12 20 5 45-15 57a42 42 0 0 1-8 4l-52 17c-61 21-129 4-174-43l-50-52c-81-85-141-189-175-302l-24-78c-19-62 0-129 49-172z"></path></g>\n<g id="photo"><path d="M208 167h584c69 0 125 56 125 125v416c0 69-56 125-125 125H208c-69 0-125-56-125-125V292c0-69 56-125 125-125z m584 75H208c-28 0-50 22-50 50v416c0 28 22 50 50 50h584c28 0 50-22 50-50V292c0-28-22-50-50-50zM239 740l167-167c12-12 31-14 45-6l73 43 172-201c13-15 34-18 50-7l95 67v92l-111-78-169 199c-12 14-32 17-47 8l-76-43-111 111H229c2-7 5-13 10-18zM458 427C458 490 407 542 344 542S229 490 229 427c0-63 51-115 115-115S458 364 458 427z m-62 0C396 398 373 375 344 375S292 398 292 427c0 29 23 52 52 52s52-23 52-52z"></path></g>\n<g id="play"><path d="M689 528l-298 175c-13 8-34 8-48 0-6-4-10-9-10-14V311C333 300 348 292 367 292c9 0 17 2 24 5l298 175c26 15 26 40 0 56z"></path></g>\n<g id="plus"><path d="M461 461H261c-22 0-39 18-39 39 0 22 18 39 39 39h200v200c0 22 18 39 39 39 22 0 39-18 39-39v-200h200c22 0 39-18 39-39 0-22-18-39-39-39h-200V261c0-22-18-39-39-39-22 0-39 18-39 39v200z"></path></g>\n<g id="redo"><path d="M290 614C312 523 393 458 491 458c55 0 106 22 144 57l-88 88c-3 3-5 7-5 11 0 8 6 15 15 15l193-5c17 0 31-15 31-32l5-192c0-4-1-8-4-11-6-6-16-6-22 0l-66 67C641 406 570 375 491 375c-136 0-248 90-281 215-1 2-1 5-1 8-8 44 45 68 73 32 4-5 7-11 8-16z"></path></g>\n<g id="reload"><path d="M500 233V137c0-9 7-16 15-16 4 0 8 2 10 4l133 140c12 12 12 32 0 45l-133 140c-6 6-15 6-21 0C502 447 500 443 500 438V308c-117 0-212 95-212 213 0 117 95 212 212 212 117 0 212-95 212-212 0-21 17-38 38-38s38 17 37 38c0 159-129 288-287 287-159 0-288-129-288-287 0-159 129-288 288-288z"></path></g>\n<g id="search"><path d="M662 603l131 131c16 16 16 42 0 59-16 16-43 16-59 0l-131-131C562 691 512 708 458 708c-138 0-250-112-250-250 0-138 112-250 250-250 138 0 250 112 250 250 0 54-17 104-46 145zM458 646c104 0 188-84 188-188S562 271 458 271 271 355 271 458s84 188 187 188z"></path></g>\n<g id="undo"><path d="M710 614C688 523 607 458 509 458c-55 0-106 22-144 57l88 88c3 3 5 7 5 11 0 8-6 15-15 15l-193-5c-17 0-31-15-31-32L214 400c0-4 1-8 4-11 6-6 16-6 22 0l66 67C359 406 430 375 509 375c136 0 248 90 281 215 1 2 1 5 1 8 8 44-45 68-73 32-4-5-7-11-8-16z"></path></g>\n<g id="unordered-list"><path d="M146 325c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63z m0 250c-42 0-67-26-67-63 0-37 25-63 67-63 42 0 67 26 67 63 0 37-25 63-67 63zM333 258c0-18 15-33 34-33h516c18 0 33 15 34 33 0 18-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z m0 250c0-18 15-33 34-33h516c18 0 33 15 34 33s-15 33-34 34H367c-18 0-33-15-34-34z"></path></g>\n<g id="upload"><path d="M454 271V604c0 21-17 38-37 38s-38-17-38-38V271L254 382c-15 14-39 12-53-3-14-15-12-39 3-53L391 160c14-13 36-13 51-1 0 0 0 0 0 1l187 166c15 14 17 37 3 53-14 15-37 17-53 3L454 271zM675 704c0-21 17-38 37-37 21 0 38 17 38 37v92c0 21-17 38-38 37H121c-21 0-38-17-38-37v-92c0-21 17-38 38-37s38 17 37 37v54h517v-54z"></path></g>\n<g id="user"><path d="M500 500c-69 0-125-56-125-125s56-125 125-125 125 56 125 125-56 125-125 125z m-292 292c0-115 131-208 292-209s292 93 292 209H208z"></path></g>\n</defs>\n</svg>\n</iron-iconset-svg>',document.head.appendChild(c.content);
@@ -1,4 +1,4 @@
1
- import{h as e}from"./shared-f2c4875b.js";import{N as t}from"./shared-299543b6.js";
1
+ import{h as e}from"./shared-5c747b54.js";import{N as t}from"./shared-b7775f62.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2019 Vaadin Ltd.
@@ -1 +1 @@
1
- import"./shared-8e36bcc1.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-8154088a.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);