@supersoniks/concorde 4.9.98-visual-stack.1 → 4.9.98-visual-stack.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/.gitlab-ci.yml +0 -13
  2. package/build-infos.json +1 -1
  3. package/concorde-3d.bundle.js +1 -1
  4. package/concorde-3d.es.js +2 -2
  5. package/concorde-core.bundle.js +557 -622
  6. package/concorde-core.es.js +6025 -5575
  7. package/concorde-hugging-face-infer.bundle.js +1 -1
  8. package/concorde-hugging-face-infer.es.js +1 -1
  9. package/concorde-interactive.bundle.js +1162 -0
  10. package/concorde-interactive.es.js +10723 -0
  11. package/concorde-shader.bundle.js +1 -1
  12. package/concorde-shader.es.js +2 -2
  13. package/concorde-webgpu.bundle.js +1 -1
  14. package/concorde-webgpu.es.js +2 -2
  15. package/dist/concorde-3d.bundle.js +1 -1
  16. package/dist/concorde-3d.es.js +2 -2
  17. package/dist/concorde-core.bundle.js +557 -622
  18. package/dist/concorde-core.es.js +6025 -5575
  19. package/dist/concorde-hugging-face-infer.bundle.js +1 -1
  20. package/dist/concorde-hugging-face-infer.es.js +1 -1
  21. package/dist/concorde-interactive.bundle.js +1162 -0
  22. package/dist/concorde-interactive.es.js +10723 -0
  23. package/dist/concorde-shader.bundle.js +1 -1
  24. package/dist/concorde-shader.es.js +2 -2
  25. package/dist/concorde-webgpu.bundle.js +1 -1
  26. package/dist/concorde-webgpu.es.js +2 -2
  27. package/dist/docs-mock-api-sw.js +5 -1
  28. package/dist/docs-mock-api-sw.js.map +2 -2
  29. package/dist/js/addons/interactive.js +6 -0
  30. package/dist/js/addons/interactive.js.map +1 -0
  31. package/dist/js/core/components/functional/if/if.js +65 -7
  32. package/dist/js/core/components/functional/if/if.js.map +1 -1
  33. package/dist/js/core/components/functional/interactive/action.js +96 -0
  34. package/dist/js/core/components/functional/interactive/action.js.map +1 -0
  35. package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
  36. package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
  37. package/dist/js/core/components/functional/interactive/gesture.js +148 -0
  38. package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
  39. package/dist/js/core/components/functional/interactive/helpers.js +82 -0
  40. package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
  41. package/dist/js/core/components/functional/interactive/index.js +20 -0
  42. package/dist/js/core/components/functional/interactive/index.js.map +1 -0
  43. package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
  44. package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
  45. package/dist/js/core/components/functional/interactive/matrix.js +201 -0
  46. package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
  47. package/dist/js/core/components/functional/interactive/registry.js +28 -0
  48. package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
  49. package/dist/js/core/components/functional/interactive/store.js +264 -0
  50. package/dist/js/core/components/functional/interactive/store.js.map +1 -0
  51. package/dist/js/core/components/functional/interactive/ticker.js +182 -0
  52. package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
  53. package/dist/js/core/components/functional/value/value.js +49 -4
  54. package/dist/js/core/components/functional/value/value.js.map +1 -1
  55. package/dist/js/core/components/ui/_css/rounded.js +34 -0
  56. package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
  57. package/dist/js/core/components/ui/_css/type.js +44 -0
  58. package/dist/js/core/components/ui/_css/type.js.map +1 -1
  59. package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
  60. package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
  61. package/dist/js/core/components/ui/alert/alert.js +72 -87
  62. package/dist/js/core/components/ui/alert/alert.js.map +1 -1
  63. package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
  64. package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
  65. package/dist/js/core/components/ui/badge/badge.js +29 -80
  66. package/dist/js/core/components/ui/badge/badge.js.map +1 -1
  67. package/dist/js/core/components/ui/button/button.js +8 -7
  68. package/dist/js/core/components/ui/button/button.js.map +1 -1
  69. package/dist/js/core/components/ui/card/card-header.js +7 -2
  70. package/dist/js/core/components/ui/card/card-header.js.map +1 -1
  71. package/dist/js/core/components/ui/divider/divider.js +1 -1
  72. package/dist/js/core/components/ui/divider/divider.js.map +1 -1
  73. package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
  74. package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
  75. package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
  76. package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
  77. package/dist/js/core/components/ui/form/input/input.js +12 -15
  78. package/dist/js/core/components/ui/form/input/input.js.map +1 -1
  79. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
  80. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
  81. package/dist/js/core/components/ui/form/radio/radio.js +1 -1
  82. package/dist/js/core/components/ui/form/select/select.js +3 -6
  83. package/dist/js/core/components/ui/form/select/select.js.map +1 -1
  84. package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
  85. package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
  86. package/dist/js/core/components/ui/image/image.js +9 -37
  87. package/dist/js/core/components/ui/image/image.js.map +1 -1
  88. package/dist/js/core/components/ui/link/link.js +25 -26
  89. package/dist/js/core/components/ui/link/link.js.map +1 -1
  90. package/dist/js/core/components/ui/modal/modal-close.js +3 -12
  91. package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
  92. package/dist/js/core/components/ui/modal/modal.js +18 -18
  93. package/dist/js/core/components/ui/modal/modal.js.map +1 -1
  94. package/dist/js/core/components/ui/pop/pop.js +131 -112
  95. package/dist/js/core/components/ui/pop/pop.js.map +1 -1
  96. package/dist/js/core/components/ui/table/table.js.map +1 -1
  97. package/dist/js/core/components/ui/theme/theme.js +1 -1
  98. package/dist/js/core/components/ui/toast/dismissed.js +9 -0
  99. package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
  100. package/dist/js/core/components/ui/toast/render-content.js +14 -0
  101. package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
  102. package/dist/js/core/components/ui/toast/toast-item.js +150 -96
  103. package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
  104. package/dist/js/core/components/ui/toast/toast.js +41 -13
  105. package/dist/js/core/components/ui/toast/toast.js.map +1 -1
  106. package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
  107. package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
  108. package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
  109. package/dist/js/core/decorators/subscriber/derive.js +3 -1
  110. package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
  111. package/dist/js/core/mixins/Fetcher.js.map +1 -1
  112. package/dist/js/core/mixins/FormCheckable.js +1 -8
  113. package/dist/js/core/mixins/FormCheckable.js.map +1 -1
  114. package/dist/js/core/mixins/FormElement.js +26 -53
  115. package/dist/js/core/mixins/FormElement.js.map +1 -1
  116. package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
  117. package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
  118. package/dist/js/core/utils/LocationHandler.js +1 -1
  119. package/dist/js/core/utils/LocationHandler.js.map +1 -1
  120. package/dist/js/core/utils/dismissed.js +23 -0
  121. package/dist/js/core/utils/dismissed.js.map +1 -0
  122. package/dist/js/core/utils/positioning.js +110 -0
  123. package/dist/js/core/utils/positioning.js.map +1 -0
  124. package/dist/js/directives.js +1 -2
  125. package/dist/js/directives.js.map +1 -1
  126. package/dist/types/addons/interactive.d.ts +6 -0
  127. package/dist/types/addons/interactive.d.ts.map +1 -0
  128. package/dist/types/core/components/functional/if/if.d.ts +14 -5
  129. package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
  130. package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
  131. package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
  132. package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
  133. package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
  134. package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
  135. package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
  136. package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
  137. package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
  138. package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
  139. package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
  140. package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
  141. package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
  142. package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
  143. package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
  144. package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
  145. package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
  146. package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
  147. package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
  148. package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
  149. package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
  150. package/dist/types/core/components/functional/value/value.d.ts +6 -0
  151. package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
  152. package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
  153. package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
  154. package/dist/types/core/components/ui/_css/type.d.ts +13 -0
  155. package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
  156. package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
  157. package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
  158. package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
  159. package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
  160. package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
  161. package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
  162. package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
  163. package/dist/types/core/components/ui/button/button.d.ts +13 -29
  164. package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
  165. package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
  166. package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
  167. package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
  168. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
  169. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
  170. package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
  171. package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
  172. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
  173. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
  174. package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
  175. package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
  176. package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
  177. package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
  178. package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
  179. package/dist/types/core/components/ui/image/image.d.ts +2 -1
  180. package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
  181. package/dist/types/core/components/ui/link/link.d.ts +10 -9
  182. package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
  183. package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
  184. package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
  185. package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
  186. package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
  187. package/dist/types/core/components/ui/table/table.d.ts +2 -1
  188. package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
  189. package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
  190. package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
  191. package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
  192. package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
  193. package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
  194. package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
  195. package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
  196. package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
  197. package/dist/types/core/components/ui/toast/types.d.ts +12 -2
  198. package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
  199. package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
  200. package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
  201. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
  202. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
  203. package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
  204. package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
  205. package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
  206. package/dist/types/core/mixins/FormElement.d.ts +21 -10
  207. package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
  208. package/dist/types/core/mixins/FormInput.d.ts +11 -27
  209. package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
  210. package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
  211. package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
  212. package/dist/types/core/utils/LocationHandler.d.ts +3 -2
  213. package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
  214. package/dist/types/core/utils/dismissed.d.ts +3 -0
  215. package/dist/types/core/utils/dismissed.d.ts.map +1 -0
  216. package/dist/types/core/utils/positioning.d.ts +44 -0
  217. package/dist/types/core/utils/positioning.d.ts.map +1 -0
  218. package/dist/types/directives.d.ts +1 -3
  219. package/dist/types/directives.d.ts.map +1 -1
  220. package/dist/types/mixins.d.ts +22 -55
  221. package/dist/types/mixins.d.ts.map +1 -1
  222. package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
  223. package/docs/assets/index-DiD0qYvE.css +1 -0
  224. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
  225. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
  226. package/docs/crawl/hubs/form-components.html +13 -11
  227. package/docs/docs-mock-api-sw.js +5 -1
  228. package/docs/docs-mock-api-sw.js.map +2 -2
  229. package/docs/index.html +2 -2
  230. package/docs/llms-full.txt +12 -38
  231. package/docs/llms.txt +1 -1
  232. package/docs/src/core/components/functional/sdui/sdui.md +0 -0
  233. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
  234. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  235. package/docs/src/docs/_getting-started/create-a-component.md +0 -0
  236. package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
  237. package/docs/src/docs/search/docs-search.json +195 -200
  238. package/docs/src/tsconfig.json +324 -0
  239. package/gitlab/job_tests.sh +25 -12
  240. package/index.html +3 -3
  241. package/package.json +182 -10
  242. package/public/docs-mock-api-sw.js +5 -1
  243. package/public/docs-mock-api-sw.js.map +2 -2
  244. package/scripts/build-addons.mjs +2 -2
  245. package/scripts/post-build.mjs +9 -0
  246. package/src/addons/interactive.ts +5 -0
  247. package/src/core/components/functional/if/if.ts +54 -7
  248. package/src/core/components/functional/interactive/action.ts +84 -0
  249. package/src/core/components/functional/interactive/gamepad.ts +197 -0
  250. package/src/core/components/functional/interactive/gesture.ts +136 -0
  251. package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
  252. package/src/core/components/functional/interactive/helpers.ts +97 -0
  253. package/src/core/components/functional/interactive/index.ts +25 -0
  254. package/src/core/components/functional/interactive/interactive.md +33 -0
  255. package/src/core/components/functional/interactive/keyboard.ts +171 -0
  256. package/src/core/components/functional/interactive/matrix.ts +185 -0
  257. package/src/core/components/functional/interactive/registry.ts +46 -0
  258. package/src/core/components/functional/interactive/store.ts +270 -0
  259. package/src/core/components/functional/interactive/ticker.ts +171 -0
  260. package/src/core/components/functional/list/list.ts +0 -0
  261. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  262. package/src/core/components/functional/value/value.ts +44 -4
  263. package/src/core/components/ui/_css/rounded.ts +36 -0
  264. package/src/core/components/ui/_css/type.ts +49 -0
  265. package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
  266. package/src/core/components/ui/alert/alert.md +128 -72
  267. package/src/core/components/ui/alert/alert.spec.ts +145 -0
  268. package/src/core/components/ui/alert/alert.ts +86 -91
  269. package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
  270. package/src/core/components/ui/badge/badge.md +126 -78
  271. package/src/core/components/ui/badge/badge.ts +29 -81
  272. package/src/core/components/ui/button/button.md +1 -0
  273. package/src/core/components/ui/button/button.ts +12 -10
  274. package/src/core/components/ui/card/card-header.ts +7 -2
  275. package/src/core/components/ui/card/card.md +120 -65
  276. package/src/core/components/ui/divider/divider.ts +4 -9
  277. package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
  278. package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
  279. package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
  280. package/src/core/components/ui/form/fieldset/legend.ts +1 -1
  281. package/src/core/components/ui/form/input/input.md +1 -1
  282. package/src/core/components/ui/form/input/input.ts +25 -27
  283. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  284. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
  285. package/src/core/components/ui/form/radio/radio.ts +1 -1
  286. package/src/core/components/ui/form/select/select.ts +3 -6
  287. package/src/core/components/ui/form/textarea/textarea.md +1 -1
  288. package/src/core/components/ui/form/textarea/textarea.ts +1 -2
  289. package/src/core/components/ui/image/image.md +147 -53
  290. package/src/core/components/ui/image/image.ts +10 -44
  291. package/src/core/components/ui/link/link.md +2 -2
  292. package/src/core/components/ui/link/link.ts +42 -37
  293. package/src/core/components/ui/modal/modal-close.ts +8 -12
  294. package/src/core/components/ui/modal/modal.ts +18 -18
  295. package/src/core/components/ui/pop/pop.md +105 -1
  296. package/src/core/components/ui/pop/pop.ts +145 -141
  297. package/src/core/components/ui/table/table.ts +2 -8
  298. package/src/core/components/ui/theme/theme.ts +1 -1
  299. package/src/core/components/ui/toast/dismissed.ts +14 -0
  300. package/src/core/components/ui/toast/render-content.ts +13 -0
  301. package/src/core/components/ui/toast/toast-item.ts +179 -103
  302. package/src/core/components/ui/toast/toast.ts +58 -21
  303. package/src/core/components/ui/toast/types.ts +14 -2
  304. package/src/core/components/ui/tooltip/tooltip.ts +176 -154
  305. package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
  306. package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
  307. package/src/core/decorators/subscriber/derive.ts +3 -3
  308. package/src/core/mixins/Fetcher.ts +1 -1
  309. package/src/core/mixins/FormCheckable.ts +1 -8
  310. package/src/core/mixins/FormElement.ts +74 -76
  311. package/src/core/mixins/Subscriber.ts +5 -1
  312. package/src/core/utils/AncestorAttributeObserver.ts +183 -70
  313. package/src/core/utils/DataBindObserver.ts +0 -0
  314. package/src/core/utils/LocationHandler.ts +12 -5
  315. package/src/core/utils/Objects.ts +0 -0
  316. package/src/core/utils/dismissed.ts +22 -0
  317. package/src/core/utils/positioning.spec.ts +208 -0
  318. package/src/core/utils/positioning.ts +183 -0
  319. package/src/directives.ts +1 -3
  320. package/src/docs/_core-concept/dataFlow.md +1 -1
  321. package/src/docs/_decorators/ancestor-attribute.md +3 -2
  322. package/src/docs/_getting-started/cdn-addons.md +1 -0
  323. package/src/docs/_getting-started/concorde-outside.md +3 -3
  324. package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  325. package/src/docs/_misc/html-integration.md +2 -0
  326. package/src/docs/code.ts +3 -1
  327. package/src/docs/components/docs-demo-sources.ts +60 -0
  328. package/src/docs/docs.ts +1 -0
  329. package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
  330. package/src/docs/mock-api/router.ts +17 -1
  331. package/src/docs/navigation/navigation.ts +8 -0
  332. package/src/docs/search/docs-search.json +956 -243
  333. package/src/docs/tailwind/css/tailwind.css +13 -6
  334. package/src/tsconfig.json +135 -6
  335. package/src/tsconfig.tsbuildinfo +1 -1
  336. package/tailwind.config.js +50 -3
  337. package/vite/config.js +23 -35
  338. package/vite.config.mts +5 -0
  339. package/vitest.setup.ts +49 -13
  340. package/docs/assets/index-BZiZXMU-.css +0 -1
@@ -1,20 +1,20 @@
1
- (function(an){typeof define=="function"&&define.amd?define(an):an()})((function(){"use strict";var Oe,et;function vl(t){const e=t.trim();if(!e)return!1;try{const s=new URL(e,"https://example.invalid/");return s.protocol==="http:"||s.protocol==="https:"||s.protocol==="blob:"}catch{return!1}}let Je=class Ct{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){let r=e;for(;r;){if(!s(r))return;r=r.parentNode||r.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(Ct.overflowMatches(i,s))return r}r=Ct.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const r of Ct.scopeAttributeNames(s))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const n=Ct.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const s=Ct.getAncestorAttributeValue(e,"token"),r=Ct.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=Ct.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=Ct.getAncestorAttributeValue(e,"tokenProvider"),h=Ct.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ct.getAncestorAttributeValue(e,"userName"),o=Ct.getAncestorAttributeValue(e,"password"));const b=Ct.getAncestorAttributeValue(e,"credentials")||void 0,k=e.getAttribute("cache"),g=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:h,tokenProvider:c,addHTTPResponse:r,credentials:b,cache:k,blockUntilDone:g,keepAlive:f}}static getClosestElement(e,s){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===s);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return Ct.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(e,s){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const n of s)try{if(i.matches(n)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!vl(e))return!1;const s=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(n=>n.src===s);if(r)return r.dataset.concordeLoaded==="1"?!0:new Promise(n=>{let o=!1;const c=b=>{o||(o=!0,b&&(r.dataset.concordeLoaded="1"),n(b))};r.addEventListener("load",()=>c(!0),{once:!0}),r.addEventListener("error",()=>c(!1),{once:!0});const h=r.readyState;if(h==="complete"||h==="loaded"){c(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||c(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(n=>{const o=document.createElement("script");o.src=e,i&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded="1",n(!0)},o.onerror=()=>n(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(s=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>s(!0),r.onerror=()=>s(!0),document.head.appendChild(r)})}};const ln=t=>{const e=document.documentElement;new MutationObserver(r=>{for(const i of r)i.type==="attributes"&&i.attributeName==="lang"&&t()}).observe(e,{attributes:!0,attributeFilter:["lang"]})};let Tr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=Je.getLanguage());const i=(b,k)=>[Math.floor(b/k),b%k];function n(b,k,g){return new Intl.NumberFormat(b,{style:"unit",unit:k,unitDisplay:g}).format}const[o,c]=i(e,60),h=[];return o&&h.push(n(s,"hour",r)(o)),c&&h.push(n(s,"minute",r)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(h)}static js(e){try{return Function("return "+e)()}catch{return""}}};class xo{constructor(e){this.path=e}toString(){return this.path}}function So(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const r=e.path?`${e.path}.${String(s)}`:String(s);return So(new xo(r))}})}const yl=/\$\{|\{\$/;function wl(t){return yl.test(t)}function di(t){const e=typeof t=="string"?t:t.path;if(wl(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Ss=function(t){return this instanceof Ss?So(new xo(t)):new Ss(t)};let at=class xs{static shallowEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],h=s[o];if(r?c!==h:c!=h)return!1}return!0}static deepEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],h=s[o],b=xs.isObject(c)&&xs.isObject(h),k=r?c!==h:c!=h;if(b&&!xs.deepEqual(c,h)||!b&&k)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return xs.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const i of s){const n=e[i];if(n===void 0)return;r&&xs.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[i]}return e}static traverseDotNotation(e,s,r=!1){return xs.traverse(e,s.split("."),r)}static getURLSearchArray(e,s=""){let r=[];for(let i in e){const n=e[i];s&&(i=s+"["+i+"]"),xs.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(e){return xs.getURLSearchArray(e,"").join("&")}};const kt=at.traverseDotNotation;let _l=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},Ao="sonic";typeof __SONIC_PREFIX__<"u"&&(Ao=__SONIC_PREFIX__);let Co=Ao.replace(/-([a-z])/g,t=>t[1].toUpperCase());const cn=Co.charAt(0).toUpperCase()+Co.slice(1),Pl=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function ko(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>Pl.has(e))}function pi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function As(t){return typeof t=="object"&&t!==null}let ur="sonic";typeof __SONIC_PREFIX__>"u"&&(ur="sonic");const un=ur=="sonic"?"publisher-proxies-data":ur+"-publisher-proxies-data",Us=class Us{constructor(e,s,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Us.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!be.changed){be.changed=!0,be.saveId++;const s=be.saveId;setTimeout(()=>be.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const s in this._value_){let r=s;const i=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||As(this._value_)&&As(e)&&e&&pi(this._value_)&&pi(e)&&this._value_.__value===e.__value||!As(e)&&e===this._value_.__value)return!0;this._value_=As(e)?e:{__value:e},this._cachedGet_=void 0;const r=pi(this._value_);if(this._parentKey_&&this.parent){const i=pi(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const n=[];n[Number(this._parentKey_)]=i,this.parent.set(n)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,n)=>{n!="_parent_"&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),As(this._value_))for(const i in this._value_){const n=e[i],c=As(n)?n:{__value:n};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,n);continue}this._proxies_.get(i)?.set(c,!0),this._publishDynamicFilling_(i,n)}return!0}get(){if(xl(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Us.instancesCounter++,this._instanceCounter_=Us.instancesCounter),Us.instances.set(this._instanceCounter_,this),"<"+ur+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+ur+"-publisher-proxy>"}};Us.instances=new Map,Us.instancesCounter=0;let Lr=Us;const fi=[];function xl(t){fi.length>0&&fi[0].add(t)}function $o(){fi.unshift(new Set)}function Do(){return fi.shift()}const Te=class Te{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Te.instance!=null)throw"Singleton / use getInstance";Te.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Te.initPageShowHandler()}static initPageShowHandler(){Te.pageShowHandlerInitialized||(Te.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Te.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(un),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(un,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],h=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<h&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Te.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Te)}return Te.instance==null?new Te:Te.instance}static get(e,s){return Te.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+Je.getLanguage()]?.data||e.get())}get(e,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=hn({});this.set(e,c)}const n=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Te.saveId&&e%10!=0))try{if(!Te.changed||Te.saving)return;Te.saving=!0,Te.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const i of s){const n=this.publishers.get(i);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[i+"¤lang_"+Je.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(un,i)}if(Te.saving=!1,Te.changed){Te.saveId++;const i=Te.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{Te.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const c=await new Response(n.readable).arrayBuffer(),h=new Uint8Array(c);let b="";for(let k=0;k<h.length;k++)b+=String.fromCharCode(h[k]);return btoa(b)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,k=>k.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),h=c.writable.getWriter();h.write(n),h.close();const b=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(b)}};Te.buildDate="Wed Sep 30 2026 10:44:48 GMT+0200 (Central European Summer Time)",Te.changed=!1,Te.saving=!1,Te.saveId=0,Te.instance=null,Te.instances=new Map,Te.pageShowHandlerInitialized=!1;let be=Te;if(typeof window<"u"){const t=window,e=cn+"PublisherManager",s=t[e]||be;if(t[e]||(t[e]=be),s!==be){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty(be,i,{configurable:!0,get(){return s[i]},set(n){s[i]=n}})}}const Sl=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Al(t,e){return{get:function(s,r){if(typeof r=="string"&&Sl.has(r))return t[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(r)){const i=t._value_[r],n=hn(As(i)?i:{__value:i},t,r);n._proxies_.set("_parent_",e()),t._proxies_.set(r,n)}return t._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return t._value_=i,!0;if(r=="_cachedGet_")return t._cachedGet_=i,!0;if(r=="_assignmentId_")return t._assignmentId_=i,!0;if(r=="_is_savable_")return t._is_savable_=i,!0;if(r=="_expiration_delay_")return t._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return t._instanceCounter_=i,!0;if(!t._proxies_.has(r)){const o=hn({},t,r);o._proxies_.set("_parent_",e()),t._proxies_.set(r,o)}return t._value_[r]!==i&&(t._value_[r]=i,t._publishDynamicFilling_(r,i),t._proxies_.get(r)?.set(As(i)?i:{__value:i})),!0},deleteProperty:function(s,r){return t._publishDynamicFilling_(r,null),t._proxies_.get(r)?.set(null),delete t._value_[r]},has:function(s,r){return r in t._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(t._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function hn(t,e=null,s){const r=new Lr(t,e,s);let i=null;const n=Al(r,()=>i);return i=new Proxy(r,n),i}class Cl extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Lr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(ur+"-publisher-proxy",Cl)}catch{}const gi=(t,e)=>{if(typeof t=="function"){const s=t;return $o(),s(),Do()}if(typeof t=="string"){const s=t.split("."),r=s.shift()||"";let i=be.get(r,e);i=at.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([t])};function kl(t){const e=di(t);return gi(e).values().next().value?.get()}function bi(t,e,s){const r=di(t);return gi(r,s).values().next().value}function $l(t,e){return ko(e)?bi(t,void 0,e):bi(t)}function mi(t,e){return ko(e)?bi(t,void 0,e):bi(t)}function Dl(t,e){const s=di(t);gi(s).values().next().value?.set(e)}let vi=(Oe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Oe.observedElements.keys()).forEach(e=>Oe.unObserve(e)))}static observe(e){if(!e||!Oe.enabled||Oe.observedElements.has(e))return;const s=new MutationObserver(Oe.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>Oe.addPublisherListeners(i)),Oe.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>Oe.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.addPublisherListeners(s)):e.childNodes.forEach(s=>Oe.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.removePublisherListeners(s)):e.childNodes.forEach(s=>Oe.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Oe.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{Oe.onAdded(r)}),s.removedNodes.forEach(r=>{Oe.onRemoved(r)});break}}static removePublisherListeners(e){const s=Oe.publisherListeners.get(e);s&&(Oe.publisherListeners.delete(e),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:Oe.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){Oe.removePublisherListeners(e);const s=Je.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=be.getInstance().get(s),i=Oe.getDataBindItems(e),n=[];i.forEach(o=>{const c=o.bindedVariablesDescriptor,h=o.propertyToUpdate;for(const b of c.variables){const k=b;let g=r;g=Oe.getSubPublisher(r,k);const f=e,A={publisher:g,onAssign:()=>{const E=c.variables.map(U=>Oe.getSubPublisher(r,U)?.get());let O=c.expression,N=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let U=E[0];U===null&&(U=""),f[h]=U;return}for(let U=0;U<E.length;U++){let P=E[U];const y=c.variables[U];P===null&&(N=!0,P=void 0),O=O.replace("$"+y.join("."),P)}if(O.indexOf("|")!=-1){const U=O.indexOf("|");if(U==0)O=Tr.js(O.substring(1));else{const P=O.substring(0,U),y=O.substring(U+1),I=Tr[P];O=N?"":I?I(y):O}}else O=N?"":O;f[h]=O}};g?.onAssign(A.onAssign),n.push(A)}}),Oe.publisherListeners.set(e,n)}},Oe.observedElements=new Map,Oe.enabled=!0,Oe.publisherListeners=new Map,Oe);vi.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=vi);/**
1
+ (function(dn){typeof define=="function"&&define.amd?define(dn):dn()})((function(){"use strict";var Te,st;function Wl(t){const e=t.trim();if(!e)return!1;try{const s=new URL(e,"https://example.invalid/");return s.protocol==="http:"||s.protocol==="https:"||s.protocol==="blob:"}catch{return!1}}let Ge=class Ct{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){let r=e;for(;r;){if(!s(r))return;r=r.parentNode||r.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(Ct.overflowMatches(i,s))return r}r=Ct.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const r of Ct.scopeAttributeNames(s))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const n=Ct.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const s=Ct.getAncestorAttributeValue(e,"token"),r=Ct.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=Ct.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=Ct.getAncestorAttributeValue(e,"tokenProvider"),h=Ct.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ct.getAncestorAttributeValue(e,"userName"),o=Ct.getAncestorAttributeValue(e,"password"));const g=Ct.getAncestorAttributeValue(e,"credentials")||void 0,A=e.getAttribute("cache"),m=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:h,tokenProvider:c,addHTTPResponse:r,credentials:g,cache:A,blockUntilDone:m,keepAlive:f}}static getClosestElement(e,s){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===s);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return Ct.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(e,s){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const n of s)try{if(i.matches(n)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!Wl(e))return!1;const s=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(n=>n.src===s);if(r)return r.dataset.concordeLoaded==="1"?!0:new Promise(n=>{let o=!1;const c=g=>{o||(o=!0,g&&(r.dataset.concordeLoaded="1"),n(g))};r.addEventListener("load",()=>c(!0),{once:!0}),r.addEventListener("error",()=>c(!1),{once:!0});const h=r.readyState;if(h==="complete"||h==="loaded"){c(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||c(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(n=>{const o=document.createElement("script");o.src=e,i&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded="1",n(!0)},o.onerror=()=>n(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(s=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>s(!0),r.onerror=()=>s(!0),document.head.appendChild(r)})}};const pn=t=>{const e=document.documentElement;new MutationObserver(r=>{for(const i of r)i.type==="attributes"&&i.attributeName==="lang"&&t()}).observe(e,{attributes:!0,attributeFilter:["lang"]})};let Ir=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=Ge.getLanguage());const i=(g,A)=>[Math.floor(g/A),g%A];function n(g,A,m){return new Intl.NumberFormat(g,{style:"unit",unit:A,unitDisplay:m}).format}const[o,c]=i(e,60),h=[];return o&&h.push(n(s,"hour",r)(o)),c&&h.push(n(s,"minute",r)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(h)}static js(e){try{return Function("return "+e)()}catch{return""}}};class To{constructor(e){this.path=e}toString(){return this.path}}function Lo(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const r=e.path?`${e.path}.${String(s)}`:String(s);return Lo(new To(r))}})}const Kl=/\$\{|\{\$/;function Gl(t){return Kl.test(t)}function mi(t){const e=typeof t=="string"?t:t.path;if(Gl(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const $s=function(t){return this instanceof $s?Lo(new To(t)):new $s(t)};let lt=class ks{static shallowEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],h=s[o];if(r?c!==h:c!=h)return!1}return!0}static deepEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],h=s[o],g=ks.isObject(c)&&ks.isObject(h),A=r?c!==h:c!=h;if(g&&!ks.deepEqual(c,h)||!g&&A)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ks.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const i of s){const n=e[i];if(n===void 0)return;r&&ks.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[i]}return e}static traverseDotNotation(e,s,r=!1){return ks.traverse(e,s.split("."),r)}static getURLSearchArray(e,s=""){let r=[];for(let i in e){const n=e[i];s&&(i=s+"["+i+"]"),ks.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(e){return ks.getURLSearchArray(e,"").join("&")}};const qt=lt.traverseDotNotation;let Yl=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},Mo="sonic";typeof __SONIC_PREFIX__<"u"&&(Mo=__SONIC_PREFIX__);let Fo=Mo.replace(/-([a-z])/g,t=>t[1].toUpperCase());const fn=Fo.charAt(0).toUpperCase()+Fo.slice(1),Zl=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Io(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>Zl.has(e))}function gi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function Ds(t){return typeof t=="object"&&t!==null}let pr="sonic";typeof __SONIC_PREFIX__>"u"&&(pr="sonic");const mn=pr=="sonic"?"publisher-proxies-data":pr+"-publisher-proxies-data",Vs=class Vs{constructor(e,s,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=s||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Vs.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!me.changed){me.changed=!0,me.saveId++;const s=me.saveId;setTimeout(()=>me.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const s in this._value_){let r=s;const i=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||Ds(this._value_)&&Ds(e)&&e&&gi(this._value_)&&gi(e)&&this._value_.__value===e.__value||!Ds(e)&&e===this._value_.__value)return!0;this._value_=Ds(e)?e:{__value:e},this._cachedGet_=void 0;const r=gi(this._value_);if(this._parentKey_&&this.parent){const i=gi(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const n=[];n[Number(this._parentKey_)]=i,this.parent.set(n)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,n)=>{n!="_parent_"&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Ds(this._value_))for(const i in this._value_){const n=e[i],c=Ds(n)?n:{__value:n};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,n);continue}this._proxies_.get(i)?.set(c,!0),this._publishDynamicFilling_(i,n)}return!0}get(){if(Jl(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Vs.instancesCounter++,this._instanceCounter_=Vs.instancesCounter),Vs.instances.set(this._instanceCounter_,this),"<"+pr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+pr+"-publisher-proxy>"}};Vs.instances=new Map,Vs.instancesCounter=0;let Nr=Vs;const bi=[];function Jl(t){bi.length>0&&bi[0].add(t)}function No(){bi.unshift(new Set)}function Ro(){return bi.shift()}const Me=class Me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Me.instance!=null)throw"Singleton / use getInstance";Me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Me.initPageShowHandler()}static initPageShowHandler(){Me.pageShowHandlerInitialized||(Me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(mn),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(mn,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],h=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<h&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Me.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Me)}return Me.instance==null?new Me:Me.instance}static get(e,s){return Me.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+Ge.getLanguage()]?.data||e.get())}get(e,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=gn({});this.set(e,c)}const n=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Me.saveId&&e%10!=0))try{if(!Me.changed||Me.saving)return;Me.saving=!0,Me.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const i of s){const n=this.publishers.get(i);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[i+"¤lang_"+Ge.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(mn,i)}if(Me.saving=!1,Me.changed){Me.saveId++;const i=Me.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{Me.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const c=await new Response(n.readable).arrayBuffer(),h=new Uint8Array(c);let g="";for(let A=0;A<h.length;A++)g+=String.fromCharCode(h[A]);return btoa(g)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,A=>A.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),h=c.writable.getWriter();h.write(n),h.close();const g=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(g)}};Me.buildDate="Thu Oct 01 2026 19:01:47 GMT+0200 (Central European Summer Time)",Me.changed=!1,Me.saving=!1,Me.saveId=0,Me.instance=null,Me.instances=new Map,Me.pageShowHandlerInitialized=!1;let me=Me;if(typeof window<"u"){const t=window,e=fn+"PublisherManager",s=t[e]||me;if(t[e]||(t[e]=me),s!==me){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty(me,i,{configurable:!0,get(){return s[i]},set(n){s[i]=n}})}}const Ql=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Xl(t,e){return{get:function(s,r){if(typeof r=="string"&&Ql.has(r))return t[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(r)){const i=t._value_[r],n=gn(Ds(i)?i:{__value:i},t,r);n._proxies_.set("_parent_",e()),t._proxies_.set(r,n)}return t._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return t._value_=i,!0;if(r=="_cachedGet_")return t._cachedGet_=i,!0;if(r=="_assignmentId_")return t._assignmentId_=i,!0;if(r=="_is_savable_")return t._is_savable_=i,!0;if(r=="_expiration_delay_")return t._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return t._instanceCounter_=i,!0;if(!t._proxies_.has(r)){const o=gn({},t,r);o._proxies_.set("_parent_",e()),t._proxies_.set(r,o)}return t._value_[r]!==i&&(t._value_[r]=i,t._publishDynamicFilling_(r,i),t._proxies_.get(r)?.set(Ds(i)?i:{__value:i})),!0},deleteProperty:function(s,r){return t._publishDynamicFilling_(r,null),t._proxies_.get(r)?.set(null),delete t._value_[r]},has:function(s,r){return r in t._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(t._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function gn(t,e=null,s){const r=new Nr(t,e,s);let i=null;const n=Xl(r,()=>i);return i=new Proxy(r,n),i}class ec extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Nr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(pr+"-publisher-proxy",ec)}catch{}const vi=(t,e)=>{if(typeof t=="function"){const s=t;return No(),s(),Ro()}if(typeof t=="string"){const s=t.split("."),r=s.shift()||"";let i=me.get(r,e);i=lt.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([t])};function tc(t){const e=mi(t);return vi(e).values().next().value?.get()}function yi(t,e,s){const r=mi(t);return vi(r,s).values().next().value}function sc(t,e){return Io(e)?yi(t,void 0,e):yi(t)}function wi(t,e){return Io(e)?yi(t,void 0,e):yi(t)}function rc(t,e){const s=mi(t);vi(s).values().next().value?.set(e)}let _i=(Te=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Te.observedElements.keys()).forEach(e=>Te.unObserve(e)))}static observe(e){if(!e||!Te.enabled||Te.observedElements.has(e))return;const s=new MutationObserver(Te.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>Te.addPublisherListeners(i)),Te.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>Te.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.addPublisherListeners(s)):e.childNodes.forEach(s=>Te.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Te.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Te.removePublisherListeners(s)):e.childNodes.forEach(s=>Te.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Te.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{Te.onAdded(r)}),s.removedNodes.forEach(r=>{Te.onRemoved(r)});break}}static removePublisherListeners(e){const s=Te.publisherListeners.get(e);s&&(Te.publisherListeners.delete(e),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:Te.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){Te.removePublisherListeners(e);const s=Ge.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=me.getInstance().get(s),i=Te.getDataBindItems(e),n=[];i.forEach(o=>{const c=o.bindedVariablesDescriptor,h=o.propertyToUpdate;for(const g of c.variables){const A=g;let m=r;m=Te.getSubPublisher(r,A);const f=e,k={publisher:m,onAssign:()=>{const E=c.variables.map(B=>Te.getSubPublisher(r,B)?.get());let O=c.expression,z=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let B=E[0];B===null&&(B=""),f[h]=B;return}for(let B=0;B<E.length;B++){let S=E[B];const y=c.variables[B];S===null&&(z=!0,S=void 0),O=O.replace("$"+y.join("."),S)}if(O.indexOf("|")!=-1){const B=O.indexOf("|");if(B==0)O=Ir.js(O.substring(1));else{const S=O.substring(0,B),y=O.substring(B+1),F=Ir[S];O=z?"":F?F(y):O}}else O=z?"":O;f[h]=O}};m?.onAssign(k.onAssign),n.push(k)}}),Te.publisherListeners.set(e,n)}},Te.observedElements=new Map,Te.enabled=!0,Te.publisherListeners=new Map,Te);_i.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=_i);/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const X=t=>(e,s)=>{s!==void 0?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};/**
5
+ */const Q=t=>(e,s)=>{s!==void 0?s.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};/**
6
6
  * @license
7
7
  * Copyright 2019 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const yi=globalThis,dn=yi.ShadowRoot&&(yi.ShadyCSS===void 0||yi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,pn=Symbol(),Eo=new WeakMap;let fn=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==pn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(dn&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=Eo.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Eo.set(s,e))}return e}toString(){return this.cssText}};const El=t=>new fn(typeof t=="string"?t:t+"",void 0,pn),ee=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new fn(s,t,pn)},Ol=(t,e)=>{if(dn)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const r=document.createElement("style"),i=yi.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)}},Oo=dn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return El(s)})(t):t;/**
9
+ */const Si=globalThis,bn=Si.ShadowRoot&&(Si.ShadyCSS===void 0||Si.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vn=Symbol(),jo=new WeakMap;let yn=class{constructor(e,s,r){if(this._$cssResult$=!0,r!==vn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(bn&&e===void 0){const r=s!==void 0&&s.length===1;r&&(e=jo.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&jo.set(s,e))}return e}toString(){return this.cssText}};const ic=t=>new yn(typeof t=="string"?t:t+"",void 0,vn),X=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((r,i,n)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new yn(s,t,vn)},nc=(t,e)=>{if(bn)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const r=document.createElement("style"),i=Si.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=s.cssText,t.appendChild(r)}},zo=bn?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const r of e.cssRules)s+=r.cssText;return ic(s)})(t):t;/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const{is:Tl,defineProperty:Ll,getOwnPropertyDescriptor:Ml,getOwnPropertyNames:Il,getOwnPropertySymbols:Nl,getPrototypeOf:Fl}=Object,wi=globalThis,To=wi.trustedTypes,jl=To?To.emptyScript:"",Rl=wi.reactiveElementPolyfillSupport,Mr=(t,e)=>t,_i={toAttribute(t,e){switch(e){case Boolean:t=t?jl:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},gn=(t,e)=>!Tl(t,e),Lo={attribute:!0,type:String,converter:_i,reflect:!1,useDefault:!1,hasChanged:gn};Symbol.metadata??=Symbol("metadata"),wi.litPropertyMetadata??=new WeakMap;let hr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=Lo){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,s);i!==void 0&&Ll(this.prototype,e,i)}}static getPropertyDescriptor(e,s,r){const{get:i,set:n}=Ml(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:i,set(o){const c=i?.call(this);n?.call(this,o),this.requestUpdate(e,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Lo}static _$Ei(){if(this.hasOwnProperty(Mr("elementProperties")))return;const e=Fl(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Mr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Mr("properties"))){const s=this.properties,r=[...Il(s),...Nl(s)];for(const i of r)this.createProperty(i,s[i])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[r,i]of s)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const i=this._$Eu(s,r);i!==void 0&&this._$Eh.set(i,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)s.unshift(Oo(i))}else e!==void 0&&s.push(Oo(e));return s}static _$Eu(e,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ol(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:_i).toAttribute(s,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,s){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:_i;this._$Em=i;const c=o.fromAttribute(s,n.type);this[i]=c??this._$Ej?.get(i)??c,this._$Em=null}}requestUpdate(e,s,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??gn)(n,s)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:o}=n,c=this[i];o!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,n,c)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};hr.elementStyles=[],hr.shadowRootOptions={mode:"open"},hr[Mr("elementProperties")]=new Map,hr[Mr("finalized")]=new Map,Rl?.({ReactiveElement:hr}),(wi.reactiveElementVersions??=[]).push("2.1.1");/**
13
+ */const{is:oc,defineProperty:ac,getOwnPropertyDescriptor:lc,getOwnPropertyNames:cc,getOwnPropertySymbols:uc,getPrototypeOf:hc}=Object,Pi=globalThis,Uo=Pi.trustedTypes,dc=Uo?Uo.emptyScript:"",pc=Pi.reactiveElementPolyfillSupport,Rr=(t,e)=>t,xi={toAttribute(t,e){switch(e){case Boolean:t=t?dc:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},wn=(t,e)=>!oc(t,e),qo={attribute:!0,type:String,converter:xi,reflect:!1,useDefault:!1,hasChanged:wn};Symbol.metadata??=Symbol("metadata"),Pi.litPropertyMetadata??=new WeakMap;let fr=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=qo){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,s);i!==void 0&&ac(this.prototype,e,i)}}static getPropertyDescriptor(e,s,r){const{get:i,set:n}=lc(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:i,set(o){const c=i?.call(this);n?.call(this,o),this.requestUpdate(e,c,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qo}static _$Ei(){if(this.hasOwnProperty(Rr("elementProperties")))return;const e=hc(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Rr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Rr("properties"))){const s=this.properties,r=[...cc(s),...uc(s)];for(const i of r)this.createProperty(i,s[i])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[r,i]of s)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[s,r]of this.elementProperties){const i=this._$Eu(s,r);i!==void 0&&this._$Eh.set(i,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)s.unshift(zo(i))}else e!==void 0&&s.push(zo(e));return s}static _$Eu(e,s){const r=s.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const r of s.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return nc(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,r){this._$AK(e,r)}_$ET(e,s){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const n=(r.converter?.toAttribute!==void 0?r.converter:xi).toAttribute(s,r.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,s){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=r.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:xi;this._$Em=i;const c=o.fromAttribute(s,n.type);this[i]=c??this._$Ej?.get(i)??c,this._$Em=null}}requestUpdate(e,s,r){if(e!==void 0){const i=this.constructor,n=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??wn)(n,s)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,s,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(s=void 0),this._$AL.set(e,s)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,n]of r){const{wrapped:o}=n,c=this[i];o!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,n,c)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(s)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};fr.elementStyles=[],fr.shadowRootOptions={mode:"open"},fr[Rr("elementProperties")]=new Map,fr[Rr("finalized")]=new Map,pc?.({ReactiveElement:fr}),(Pi.reactiveElementVersions??=[]).push("2.1.1");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */const zl={attribute:!0,type:String,converter:_i,reflect:!1,hasChanged:gn},Ul=(t=zl,e,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),r==="accessor"){const{name:o}=s;return{set(c){const h=e.get.call(this);e.set.call(this,c),this.requestUpdate(o,h,t)},init(c){return c!==void 0&&this.C(o,void 0,t,c),c}}}if(r==="setter"){const{name:o}=s;return function(c){const h=this[o];e.call(this,c),this.requestUpdate(o,h,t)}}throw Error("Unsupported decorator location: "+r)};function u(t){return(e,s)=>typeof s=="object"?Ul(t,e,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,s)}/**
17
+ */const fc={attribute:!0,type:String,converter:xi,reflect:!1,hasChanged:wn},mc=(t=fc,e,s)=>{const{kind:r,metadata:i}=s;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),r==="accessor"){const{name:o}=s;return{set(c){const h=e.get.call(this);e.set.call(this,c),this.requestUpdate(o,h,t)},init(c){return c!==void 0&&this.C(o,void 0,t,c),c}}}if(r==="setter"){const{name:o}=s;return function(c){const h=this[o];e.call(this,c),this.requestUpdate(o,h,t)}}throw Error("Unsupported decorator location: "+r)};function u(t){return(e,s)=>typeof s=="object"?mc(t,e,s):((r,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),o?Object.getOwnPropertyDescriptor(i,n):void 0})(t,e,s)}/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
@@ -22,61 +22,61 @@
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const bn=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
25
+ */const _n=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function Cs(t,e){return(s,r,i)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return bn(s,r,{get(){return n(this)}})}}/**
29
+ */function ms(t,e){return(s,r,i)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return _n(s,r,{get(){return n(this)}})}}/**
30
30
  * @license
31
31
  * Copyright 2021 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */function Ir(t){return(e,s)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=${r}]`:":not([name])");return bn(e,s,{get(){const o=this.renderRoot?.querySelector(n),c=o?.assignedElements(t)??[];return i===void 0?c:c.filter((h=>h.matches(i)))}})}}/**
33
+ */function jr(t){return(e,s)=>{const{slot:r,selector:i}=t??{},n="slot"+(r?`[name=${r}]`:":not([name])");return _n(e,s,{get(){const o=this.renderRoot?.querySelector(n),c=o?.assignedElements(t)??[];return i===void 0?c:c.filter((h=>h.matches(i)))}})}}/**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */function bt(t){return(e,s)=>{const{slot:r}=t??{},i="slot"+(r?`[name=${r}]`:":not([name])");return bn(e,s,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(t)??[]}})}}/**
37
+ */function gt(t){return(e,s)=>{const{slot:r}=t??{},i="slot"+(r?`[name=${r}]`:":not([name])");return _n(e,s,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(t)??[]}})}}/**
38
38
  * @license
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const mn=globalThis,Pi=mn.trustedTypes,Mo=Pi?Pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Io="$lit$",ks=`lit$${Math.random().toFixed(9).slice(2)}$`,No="?"+ks,ql=`<${No}>`,Bs=document,Nr=()=>Bs.createComment(""),Fr=t=>t===null||typeof t!="object"&&typeof t!="function",vn=Array.isArray,Vl=t=>vn(t)||typeof t?.[Symbol.iterator]=="function",yn=`[
42
- \f\r]`,jr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fo=/-->/g,jo=/>/g,Hs=RegExp(`>|${yn}(?:([^\\s"'>=/]+)(${yn}*=${yn}*(?:[^
43
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ro=/'/g,zo=/"/g,Uo=/^(?:script|style|textarea|title)$/i,Bl=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=Bl(1),Nt=Symbol.for("lit-noChange"),re=Symbol.for("lit-nothing"),qo=new WeakMap,Ws=Bs.createTreeWalker(Bs,129);function Vo(t,e){if(!vn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Mo!==void 0?Mo.createHTML(e):e}const Hl=(t,e)=>{const s=t.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=jr;for(let c=0;c<s;c++){const h=t[c];let b,k,g=-1,f=0;for(;f<h.length&&(o.lastIndex=f,k=o.exec(h),k!==null);)f=o.lastIndex,o===jr?k[1]==="!--"?o=Fo:k[1]!==void 0?o=jo:k[2]!==void 0?(Uo.test(k[2])&&(i=RegExp("</"+k[2],"g")),o=Hs):k[3]!==void 0&&(o=Hs):o===Hs?k[0]===">"?(o=i??jr,g=-1):k[1]===void 0?g=-2:(g=o.lastIndex-k[2].length,b=k[1],o=k[3]===void 0?Hs:k[3]==='"'?zo:Ro):o===zo||o===Ro?o=Hs:o===Fo||o===jo?o=jr:(o=Hs,i=void 0);const A=o===Hs&&t[c+1].startsWith("/>")?" ":"";n+=o===jr?h+ql:g>=0?(r.push(b),h.slice(0,g)+Io+h.slice(g)+ks+A):h+ks+(g===-2?c:A)}return[Vo(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let wn=class ml{constructor({strings:e,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const c=e.length-1,h=this.parts,[b,k]=Hl(e,s);if(this.el=ml.createElement(b,r),Ws.currentNode=this.el.content,s===2||s===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(i=Ws.nextNode())!==null&&h.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const g of i.getAttributeNames())if(g.endsWith(Io)){const f=k[o++],A=i.getAttribute(g).split(ks),E=/([.?@])?(.*)/.exec(f);h.push({type:1,index:n,name:E[2],strings:A,ctor:E[1]==="."?Kl:E[1]==="?"?Yl:E[1]==="@"?Gl:xi}),i.removeAttribute(g)}else g.startsWith(ks)&&(h.push({type:6,index:n}),i.removeAttribute(g));if(Uo.test(i.tagName)){const g=i.textContent.split(ks),f=g.length-1;if(f>0){i.textContent=Pi?Pi.emptyScript:"";for(let A=0;A<f;A++)i.append(g[A],Nr()),Ws.nextNode(),h.push({type:2,index:++n});i.append(g[f],Nr())}}}else if(i.nodeType===8)if(i.data===No)h.push({type:2,index:n});else{let g=-1;for(;(g=i.data.indexOf(ks,g+1))!==-1;)h.push({type:7,index:n}),g+=ks.length-1}n++}}static createElement(e,s){const r=Bs.createElement("template");return r.innerHTML=e,r}};function dr(t,e,s=t,r){if(e===Nt)return e;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=Fr(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,s,r)),r!==void 0?(s._$Co??=[])[r]=i:s._$Cl=i),i!==void 0&&(e=dr(t,i._$AS(t,e.values),i,r)),e}let Wl=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:r}=this._$AD,i=(e?.creationScope??Bs).importNode(s,!0);Ws.currentNode=i;let n=Ws.nextNode(),o=0,c=0,h=r[0];for(;h!==void 0;){if(o===h.index){let b;h.type===2?b=new pr(n,n.nextSibling,this,e):h.type===1?b=new h.ctor(n,h.name,h.strings,this,e):h.type===6&&(b=new Zl(n,this,e)),this._$AV.push(b),h=r[++c]}o!==h?.index&&(n=Ws.nextNode(),o++)}return Ws.currentNode=Bs,i}p(e){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}};class pr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,i){this.type=2,this._$AH=re,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=dr(this,e,s),Fr(e)?e===re||e==null||e===""?(this._$AH!==re&&this._$AR(),this._$AH=re):e!==this._$AH&&e!==Nt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Vl(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==re&&Fr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Bs.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=wn.createElement(Vo(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new Wl(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=qo.get(e.strings);return s===void 0&&qo.set(e.strings,s=new wn(e)),s}k(e){vn(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of e)i===s.length?s.push(r=new pr(this.O(Nr()),this.O(Nr()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class xi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,i,n){this.type=1,this._$AH=re,this._$AN=void 0,this.element=e,this.name=s,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=re}_$AI(e,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)e=dr(this,e,s,0),o=!Fr(e)||e!==this._$AH&&e!==Nt,o&&(this._$AH=e);else{const c=e;let h,b;for(e=n[0],h=0;h<n.length-1;h++)b=dr(this,c[r+h],s,h),b===Nt&&(b=this._$AH[h]),o||=!Fr(b)||b!==this._$AH[h],b===re?e=re:e!==re&&(e+=(b??"")+n[h+1]),this._$AH[h]=b}o&&!i&&this.j(e)}j(e){e===re?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Kl extends xi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===re?void 0:e}}class Yl extends xi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==re)}}class Gl extends xi{constructor(e,s,r,i,n){super(e,s,r,i,n),this.type=5}_$AI(e,s=this){if((e=dr(this,e,s,0)??re)===Nt)return;const r=this._$AH,i=e===re&&r!==re||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==re&&(r===re||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Zl{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){dr(this,e)}}const Jl={I:pr},Xl=mn.litHtmlPolyfillSupport;Xl?.(wn,pr),(mn.litHtmlVersions??=[]).push("3.3.1");const Ql=(t,e,s)=>{const r=s?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new pr(e.insertBefore(Nr(),n),n,void 0,s??{})}return i._$AI(t),i};/**
41
+ */const Sn=globalThis,Ai=Sn.trustedTypes,Bo=Ai?Ai.createPolicy("lit-html",{createHTML:t=>t}):void 0,Ho="$lit$",Es=`lit$${Math.random().toFixed(9).slice(2)}$`,Vo="?"+Es,gc=`<${Vo}>`,Gs=document,zr=()=>Gs.createComment(""),Ur=t=>t===null||typeof t!="object"&&typeof t!="function",Pn=Array.isArray,bc=t=>Pn(t)||typeof t?.[Symbol.iterator]=="function",xn=`[
42
+ \f\r]`,qr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wo=/-->/g,Ko=/>/g,Ys=RegExp(`>|${xn}(?:([^\\s"'>=/]+)(${xn}*=${xn}*(?:[^
43
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Go=/'/g,Yo=/"/g,Zo=/^(?:script|style|textarea|title)$/i,vc=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),R=vc(1),Nt=Symbol.for("lit-noChange"),se=Symbol.for("lit-nothing"),Jo=new WeakMap,Zs=Gs.createTreeWalker(Gs,129);function Qo(t,e){if(!Pn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bo!==void 0?Bo.createHTML(e):e}const yc=(t,e)=>{const s=t.length-1,r=[];let i,n=e===2?"<svg>":e===3?"<math>":"",o=qr;for(let c=0;c<s;c++){const h=t[c];let g,A,m=-1,f=0;for(;f<h.length&&(o.lastIndex=f,A=o.exec(h),A!==null);)f=o.lastIndex,o===qr?A[1]==="!--"?o=Wo:A[1]!==void 0?o=Ko:A[2]!==void 0?(Zo.test(A[2])&&(i=RegExp("</"+A[2],"g")),o=Ys):A[3]!==void 0&&(o=Ys):o===Ys?A[0]===">"?(o=i??qr,m=-1):A[1]===void 0?m=-2:(m=o.lastIndex-A[2].length,g=A[1],o=A[3]===void 0?Ys:A[3]==='"'?Yo:Go):o===Yo||o===Go?o=Ys:o===Wo||o===Ko?o=qr:(o=Ys,i=void 0);const k=o===Ys&&t[c+1].startsWith("/>")?" ":"";n+=o===qr?h+gc:m>=0?(r.push(g),h.slice(0,m)+Ho+h.slice(m)+Es+k):h+Es+(m===-2?c:k)}return[Qo(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};let An=class Vl{constructor({strings:e,_$litType$:s},r){let i;this.parts=[];let n=0,o=0;const c=e.length-1,h=this.parts,[g,A]=yc(e,s);if(this.el=Vl.createElement(g,r),Zs.currentNode=this.el.content,s===2||s===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=Zs.nextNode())!==null&&h.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const m of i.getAttributeNames())if(m.endsWith(Ho)){const f=A[o++],k=i.getAttribute(m).split(Es),E=/([.?@])?(.*)/.exec(f);h.push({type:1,index:n,name:E[2],strings:k,ctor:E[1]==="."?_c:E[1]==="?"?Sc:E[1]==="@"?Pc:Ci}),i.removeAttribute(m)}else m.startsWith(Es)&&(h.push({type:6,index:n}),i.removeAttribute(m));if(Zo.test(i.tagName)){const m=i.textContent.split(Es),f=m.length-1;if(f>0){i.textContent=Ai?Ai.emptyScript:"";for(let k=0;k<f;k++)i.append(m[k],zr()),Zs.nextNode(),h.push({type:2,index:++n});i.append(m[f],zr())}}}else if(i.nodeType===8)if(i.data===Vo)h.push({type:2,index:n});else{let m=-1;for(;(m=i.data.indexOf(Es,m+1))!==-1;)h.push({type:7,index:n}),m+=Es.length-1}n++}}static createElement(e,s){const r=Gs.createElement("template");return r.innerHTML=e,r}};function mr(t,e,s=t,r){if(e===Nt)return e;let i=r!==void 0?s._$Co?.[r]:s._$Cl;const n=Ur(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(t),i._$AT(t,s,r)),r!==void 0?(s._$Co??=[])[r]=i:s._$Cl=i),i!==void 0&&(e=mr(t,i._$AS(t,e.values),i,r)),e}let wc=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:r}=this._$AD,i=(e?.creationScope??Gs).importNode(s,!0);Zs.currentNode=i;let n=Zs.nextNode(),o=0,c=0,h=r[0];for(;h!==void 0;){if(o===h.index){let g;h.type===2?g=new gr(n,n.nextSibling,this,e):h.type===1?g=new h.ctor(n,h.name,h.strings,this,e):h.type===6&&(g=new xc(n,this,e)),this._$AV.push(g),h=r[++c]}o!==h?.index&&(n=Zs.nextNode(),o++)}return Zs.currentNode=Gs,i}p(e){let s=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,s),s+=r.strings.length-2):r._$AI(e[s])),s++}};class gr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,r,i){this.type=2,this._$AH=se,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=mr(this,e,s),Ur(e)?e===se||e==null||e===""?(this._$AH!==se&&this._$AR(),this._$AH=se):e!==this._$AH&&e!==Nt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):bc(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==se&&Ur(this._$AH)?this._$AA.nextSibling.data=e:this.T(Gs.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=An.createElement(Qo(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(s);else{const n=new wc(i,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=Jo.get(e.strings);return s===void 0&&Jo.set(e.strings,s=new An(e)),s}k(e){Pn(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let r,i=0;for(const n of e)i===s.length?s.push(r=new gr(this.O(zr()),this.O(zr()),this,this.options)):r=s[i],r._$AI(n),i++;i<s.length&&(this._$AR(r&&r._$AB.nextSibling,i),s.length=i)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Ci{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,r,i,n){this.type=1,this._$AH=se,this._$AN=void 0,this.element=e,this.name=s,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=se}_$AI(e,s=this,r,i){const n=this.strings;let o=!1;if(n===void 0)e=mr(this,e,s,0),o=!Ur(e)||e!==this._$AH&&e!==Nt,o&&(this._$AH=e);else{const c=e;let h,g;for(e=n[0],h=0;h<n.length-1;h++)g=mr(this,c[r+h],s,h),g===Nt&&(g=this._$AH[h]),o||=!Ur(g)||g!==this._$AH[h],g===se?e=se:e!==se&&(e+=(g??"")+n[h+1]),this._$AH[h]=g}o&&!i&&this.j(e)}j(e){e===se?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class _c extends Ci{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===se?void 0:e}}class Sc extends Ci{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==se)}}class Pc extends Ci{constructor(e,s,r,i,n){super(e,s,r,i,n),this.type=5}_$AI(e,s=this){if((e=mr(this,e,s,0)??se)===Nt)return;const r=this._$AH,i=e===se&&r!==se||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==se&&(r===se||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class xc{constructor(e,s,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){mr(this,e)}}const Ac={I:gr},Cc=Sn.litHtmlPolyfillSupport;Cc?.(An,gr),(Sn.litHtmlVersions??=[]).push("3.3.1");const kc=(t,e,s)=>{const r=s?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const n=s?.renderBefore??null;r._$litPart$=i=new gr(e.insertBefore(zr(),n),n,void 0,s??{})}return i._$AI(t),i};/**
44
44
  * @license
45
45
  * Copyright 2020 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const{I:ec}=Jl,tc=t=>t.strings===void 0,Bo=()=>document.createComment(""),Rr=(t,e,s)=>{const r=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=r.insertBefore(Bo(),i),o=r.insertBefore(Bo(),i);s=new ec(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,c=o!==t;if(c){let h;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(h=t._$AU)!==o._$AU&&s._$AP(h)}if(n!==i||c){let h=s._$AA;for(;h!==n;){const b=h.nextSibling;r.insertBefore(h,i),h=b}}}return s},Ks=(t,e,s=t)=>(t._$AI(e,s),t),sc={},rc=(t,e=sc)=>t._$AH=e,ic=t=>t._$AH,_n=t=>{t._$AR(),t._$AA.remove()};/**
47
+ */const{I:$c}=Ac,Dc=t=>t.strings===void 0,Xo=()=>document.createComment(""),Br=(t,e,s)=>{const r=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=r.insertBefore(Xo(),i),o=r.insertBefore(Xo(),i);s=new $c(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,c=o!==t;if(c){let h;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(h=t._$AU)!==o._$AU&&s._$AP(h)}if(n!==i||c){let h=s._$AA;for(;h!==n;){const g=h.nextSibling;r.insertBefore(h,i),h=g}}}return s},Js=(t,e,s=t)=>(t._$AI(e,s),t),Ec={},Oc=(t,e=Ec)=>t._$AH=e,Tc=t=>t._$AH,Cn=t=>{t._$AR(),t._$AA.remove()};/**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */const Ys={ATTRIBUTE:1,CHILD:2},$s=t=>(...e)=>({_$litDirective$:t,values:e});let fr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
51
+ */const Qs={ATTRIBUTE:1,CHILD:2},Os=t=>(...e)=>({_$litDirective$:t,values:e});let br=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,r){this._$Ct=e,this._$AM=s,this._$Ci=r}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
- */const zr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const r of s)r._$AO?.(e,!1),zr(r,e);return!0},Si=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},Ho=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),ac(e)}};function nc(t){this._$AN!==void 0?(Si(this),this._$AM=t,Ho(this)):this._$AM=t}function oc(t,e=!1,s=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let n=s;n<r.length;n++)zr(r[n],!1),Si(r[n]);else r!=null&&(zr(r,!1),Si(r));else zr(this,t)}const ac=t=>{t.type==Ys.CHILD&&(t._$AP??=oc,t._$AQ??=nc)};class Pn extends fr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,r){super._$AT(e,s,r),Ho(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(zr(this,e),Si(this))}setValue(e){if(tc(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
55
+ */const Hr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const r of s)r._$AO?.(e,!1),Hr(r,e);return!0},ki=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},ea=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Fc(e)}};function Lc(t){this._$AN!==void 0?(ki(this),this._$AM=t,ea(this)):this._$AM=t}function Mc(t,e=!1,s=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let n=s;n<r.length;n++)Hr(r[n],!1),ki(r[n]);else r!=null&&(Hr(r,!1),ki(r));else Hr(this,t)}const Fc=t=>{t.type==Qs.CHILD&&(t._$AP??=Mc,t._$AQ??=Lc)};class kn extends br{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,r){super._$AT(e,s,r),ea(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(Hr(this,e),ki(this))}setValue(e){if(Dc(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */const xn=globalThis;let J=class extends hr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ql(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Nt}};J._$litElement$=!0,J.finalized=!0,xn.litElementHydrateSupport?.({LitElement:J});const lc=xn.litElementPolyfillSupport;lc?.({LitElement:J}),(xn.litElementVersions??=[]).push("4.2.1");function Wo(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Ne=class Ne{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){Ne.tokens.delete(this.serviceURL);return}Ne.invalidTokens.includes(e)||Ne.tokens.set(this.serviceURL,e)}get token(){return Ne.invalidTokens.includes(this._token)?Ne.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Ne.invalidTokens.includes(e)||(Ne.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Ne.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let n={};if(!r||r.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&at.isObject(n)&&(n._sonic_http_response_=e),i===498&&!Ne.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const c=await this.get(s.path,s.additionalHeaders);if(c==null)throw new Error("GET retry failed after token refresh");n=c}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return mi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Ne.tokens.has(this.serviceURL)){this.token=Ne.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),r=s.protocol+"//"+s.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await i.json();n.token?this.token=n.token:Ne.failledTokenUpdates.set(this.serviceURL,!0)}catch{Ne.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const r=be.get(e),i=new URLSearchParams(s.split("?")[1]||""),n=r.get();let o=[];Array.isArray(n)?o=n:o=[n];const c=[];let h=Number.POSITIVE_INFINITY,b=0,k=0;if(i.has("limit")&&(h=parseInt(i.get("limit")||"0"),k++),i.has("offset")&&(b=parseInt(i.get("offset")||"0"),k++),k>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(b,b+h);for(const[g,f]of i.entries()){const A=f.split(",").map(E=>E.trim());for(const E of A)for(const O of o)if(typeof O!="object")isNaN(+O)?O.toString().toLowerCase().includes(f.toLowerCase())&&c.push(O):O===f&&c.push(O);else{const N=O;if(!N[g])continue;isNaN(+N[g])?N[g]?.toString().toLowerCase().includes(E.toLowerCase())&&c.push(O):N[g]===E&&c.push(O)}}return c.slice(b,b+h)}firstCallDone(){return new Promise(e=>{if(!Ne.firstCallDoneFlags.has(this.serviceURL))Ne.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Ne.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Ne.firstCallDoneFlags.set(this.serviceURL,"loading"));const b=e.match(r);if(!b)throw new Error("dataProvider path is not valid");return await this.localGet(b[1],b[2])}const i={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),c=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Ne.firstCallDoneFlags.set(this.serviceURL,"loading")),!Ne.loadingGetPromises.has(c)){const b=new Promise(async k=>{try{const g=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(g,i);k({processed:f,response:this.lastResult})}catch{Ne.firstCallDoneFlags.set(this.serviceURL,"error"),k(null)}});Ne.loadingGetPromises.set(c,b)}const h=await Ne.loadingGetPromises.get(c);return Ne.loadingGetPromises.delete(c),h?(this.lastResult=h.response,h.processed):null}async getDetailed(e,s){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,s);if(i==null)return;const n=Wo(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:n};const c=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(c),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,r,i){const n=await this.send(e,s,r,i);if(n==null)return;const o=Wo(n),c=this.computeURL(e),h=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(c,{method:r,headers:new Headers(h),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,r){return this.sendDetailed(e,s,"POST",r)}async putDetailed(e,s,r){return this.sendDetailed(e,s,"PUT",r)}async patchDetailed(e,s,r){return this.sendDetailed(e,s,"PATCH",r)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=Je.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const n in s)i.searchParams.set(n,s[n]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,r="POST",i){const n={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const c=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(c,n)}async submitFormData(e,s,r="POST",i){const n={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json";const c=new FormData,h=s;for(const k in h)c.set(k,h[k]);const b=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:c,keepalive:this.keepAlive});return await this.handleResult(b,n)}async put(e,s,r){return this.send(e,s,"PUT",r)}async post(e,s,r){return this.send(e,s,"POST",r)}async patch(e,s,r){return this.send(e,s,"PATCH",r)}async delete(e,s,r){return this.send(e,s,"delete",r)}};Ne.loadingGetPromises=new Map,Ne.tokens=new Map,Ne.invalidTokens=[],Ne.failledTokenUpdates=new Map,Ne.firstCallDoneFlags=new Map;let Ds=Ne;Je.getApiConfiguration(document.body||document.documentElement);const cc=async(t,e)=>{};/**
59
+ */const $n=globalThis;let J=class extends fr{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=kc(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Nt}};J._$litElement$=!0,J.finalized=!0,$n.litElementHydrateSupport?.({LitElement:J});const Ic=$n.litElementPolyfillSupport;Ic?.({LitElement:J}),($n.litElementVersions??=[]).push("4.2.1");function ta(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Re=class Re{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){Re.tokens.delete(this.serviceURL);return}Re.invalidTokens.includes(e)||Re.tokens.set(this.serviceURL,e)}get token(){return Re.invalidTokens.includes(this._token)?Re.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Re.invalidTokens.includes(e)||(Re.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Re.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let n={};if(!r||r.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&lt.isObject(n)&&(n._sonic_http_response_=e),i===498&&!Re.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const c=await this.get(s.path,s.additionalHeaders);if(c==null)throw new Error("GET retry failed after token refresh");n=c}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return wi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Re.tokens.has(this.serviceURL)){this.token=Re.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),r=s.protocol+"//"+s.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await i.json();n.token?this.token=n.token:Re.failledTokenUpdates.set(this.serviceURL,!0)}catch{Re.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const r=me.get(e),i=new URLSearchParams(s.split("?")[1]||""),n=r.get();let o=[];Array.isArray(n)?o=n:o=[n];const c=[];let h=Number.POSITIVE_INFINITY,g=0,A=0;if(i.has("limit")&&(h=parseInt(i.get("limit")||"0"),A++),i.has("offset")&&(g=parseInt(i.get("offset")||"0"),A++),A>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(g,g+h);for(const[m,f]of i.entries()){const k=f.split(",").map(E=>E.trim());for(const E of k)for(const O of o)if(typeof O!="object")isNaN(+O)?O.toString().toLowerCase().includes(f.toLowerCase())&&c.push(O):O===f&&c.push(O);else{const z=O;if(!z[m])continue;isNaN(+z[m])?z[m]?.toString().toLowerCase().includes(E.toLowerCase())&&c.push(O):z[m]===E&&c.push(O)}}return c.slice(g,g+h)}firstCallDone(){return new Promise(e=>{if(!Re.firstCallDoneFlags.has(this.serviceURL))Re.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Re.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading"));const g=e.match(r);if(!g)throw new Error("dataProvider path is not valid");return await this.localGet(g[1],g[2])}const i={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),c=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Re.firstCallDoneFlags.set(this.serviceURL,"loading")),!Re.loadingGetPromises.has(c)){const g=new Promise(async A=>{try{const m=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(m,i);A({processed:f,response:this.lastResult})}catch{Re.firstCallDoneFlags.set(this.serviceURL,"error"),A(null)}});Re.loadingGetPromises.set(c,g)}const h=await Re.loadingGetPromises.get(c);return Re.loadingGetPromises.delete(c),h?(this.lastResult=h.response,h.processed):null}async getDetailed(e,s){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,s);if(i==null)return;const n=ta(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:n};const c=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(c),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,r,i){const n=await this.send(e,s,r,i);if(n==null)return;const o=ta(n),c=this.computeURL(e),h=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(c,{method:r,headers:new Headers(h),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,r){return this.sendDetailed(e,s,"POST",r)}async putDetailed(e,s,r){return this.sendDetailed(e,s,"PUT",r)}async patchDetailed(e,s,r){return this.sendDetailed(e,s,"PATCH",r)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=Ge.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const n in s)i.searchParams.set(n,s[n]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,r="POST",i){const n={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const c=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(c,n)}async submitFormData(e,s,r="POST",i){const n={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:s},o=await this.createHeaders(i);o.Accept="application/json";const c=new FormData,h=s;for(const A in h)c.set(A,h[A]);const g=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:c,keepalive:this.keepAlive});return await this.handleResult(g,n)}async put(e,s,r){return this.send(e,s,"PUT",r)}async post(e,s,r){return this.send(e,s,"POST",r)}async patch(e,s,r){return this.send(e,s,"PATCH",r)}async delete(e,s,r){return this.send(e,s,"delete",r)}};Re.loadingGetPromises=new Map,Re.tokens=new Map,Re.invalidTokens=[],Re.failledTokenUpdates=new Map,Re.firstCallDoneFlags=new Map;let Ts=Re;Ge.getApiConfiguration(document.body||document.documentElement);const Nc=async(t,e)=>{};/**
60
60
  * @license
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */let Sn=class extends fr{constructor(e){if(super(e),this.it=re,e.type!==Ys.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===re||e==null)return this._t=void 0,this.it=e;if(e===Nt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Sn.directiveName="unsafeHTML",Sn.resultType=1;const je=$s(Sn),An=new Map,Ko=t=>{if(!t)return null;const e=Je.getApiConfiguration(t),s=Je.getAncestorAttributeValue(t,"wordingProvider"),r=Je.getAncestorAttributeValue(t,"wordingVersionProvider"),i={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:r};let n=null;for(const[o,c]of An)if(at.deepEqual(o,i)){n=c;break}return n||(n={api:new Ds(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:r,apiCallKey:i},An.set(i,n)),n},Yo="",Ve=class Ve extends Pn{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const r=this.useUnsafeHTML?je(s):s;this.setValue(r)},this.node=e.options.host}unsubscribe(){Ve.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),Nt}static async callApi(e,s,r=!0,i){if(await be.getInstance().isLocalStrorageReady,Ve.firstCall){Ve.firstCall=!1,ln(Ve.reloadWordings);const k=Object.keys(Ve.publisher.get());for(const g of k)Ve.publisher.get()[g]===Yo&&delete Ve.publisher[g]}if(e){const k=Je.getAncestorAttributeValue(e,"wordingVersionProvider");k&&mi(k).onAssign(Ve.handleVersionProvider(e))}let n=Ve.publisher.get()["wording_"+s]!=null;const o=i||Ko(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const c=o.callIndex,h=o.wordingProvider??"";if(!h&&r){window.setTimeout(async()=>{Ve.callApi(null,s,!1,o)},1e3);return}const b=o.api;window.queueMicrotask(async()=>{if(n=Ve.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),Ve.publisher["wording_"+s].set(Yo)),c!==o.callIndex)return;const k=Array.from(o.keysToTranslate);if(!k.length)return;const g=h.split("?"),f=g.shift(),A=(g.length>0?g.join("?")+"&":"")+"labels[]="+k.join("&labels[]="),E=f+"?"+A;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const O=await b.get(E);for(const N in O)Ve.publisher["wording_"+N].set(O[N])})}static reloadWordings(){for(const e of An.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&Ve.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=Ko(e),r=n=>{};if(!s)return r;if(Ve.versionProviderHandlers.has(s))return Ve.versionProviderHandlers.get(s)||r;const i=function(n){if(!s.wordingVersionProvider)return;const c=Ve.publisher.get().__wording_versions__??[];if(n==null)return;const h=c.find(b=>b.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};c.includes(h)||c.push(h),n!==h.version&&(h.version=n,Ve.publisher.set({__wording_versions__:c}),Ve.reloadWordings())};return Ve.versionProviderHandlers.set(s,i),i}subscribe(e){this.unsubscribe(),Ve.publisher["wording_"+e].onAssign(this.onAssign),Ve.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};Ve.publisher=be.get("sonic-wording",{localStorageMode:"enabled"}),Ve.firstCall=!0,Ve.versionProviderHandlers=new Map;let gr=Ve;const uc=$s(gr);var hc=Object.defineProperty,dc=Object.getOwnPropertyDescriptor,es=(t,e,s,r)=>{for(var i=r>1?void 0:r?dc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&hc(e,s,i),i};let Ai=!1,Cn=new Set;const nt=(t,e)=>{var i;const s=(i=class extends t{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=c=>{this.props=c}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return Je.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const h=[...(this.shadowRoot||this).children].filter(k=>k.tagName!="STYLE"),b=this.displayContents?"contents":h.length==0?"none":null;b?this.style.display=b:this.style.removeProperty("display")}connectedCallback(){if(i.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let c=!0;const h=new IntersectionObserver(b=>{for(const k of b)if(c&&k.isIntersecting){c=!1,h.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);h.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),gr.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),Ai=!Ai)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ai||this.removeDebugger(),document.body.appendChild(this.debug),Cn.add(this.debug)}),this.addEventListener("mouseout",()=>{Ai||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
63
+ */let Dn=class extends br{constructor(e){if(super(e),this.it=se,e.type!==Qs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===se||e==null)return this._t=void 0,this.it=e;if(e===Nt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Dn.directiveName="unsafeHTML",Dn.resultType=1;const Be=Os(Dn),En=new Map,sa=t=>{if(!t)return null;const e=Ge.getApiConfiguration(t),s=Ge.getAncestorAttributeValue(t,"wordingProvider"),r=Ge.getAncestorAttributeValue(t,"wordingVersionProvider"),i={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:r};let n=null;for(const[o,c]of En)if(lt.deepEqual(o,i)){n=c;break}return n||(n={api:new Ts(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:r,apiCallKey:i},En.set(i,n)),n},ra="",Ve=class Ve extends kn{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const r=this.useUnsafeHTML?Be(s):s;this.setValue(r)},this.node=e.options.host}unsubscribe(){Ve.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),Nt}static async callApi(e,s,r=!0,i){if(await me.getInstance().isLocalStrorageReady,Ve.firstCall){Ve.firstCall=!1,pn(Ve.reloadWordings);const A=Object.keys(Ve.publisher.get());for(const m of A)Ve.publisher.get()[m]===ra&&delete Ve.publisher[m]}if(e){const A=Ge.getAncestorAttributeValue(e,"wordingVersionProvider");A&&wi(A).onAssign(Ve.handleVersionProvider(e))}let n=Ve.publisher.get()["wording_"+s]!=null;const o=i||sa(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const c=o.callIndex,h=o.wordingProvider??"";if(!h&&r){window.setTimeout(async()=>{Ve.callApi(null,s,!1,o)},1e3);return}const g=o.api;window.queueMicrotask(async()=>{if(n=Ve.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),Ve.publisher["wording_"+s].set(ra)),c!==o.callIndex)return;const A=Array.from(o.keysToTranslate);if(!A.length)return;const m=h.split("?"),f=m.shift(),k=(m.length>0?m.join("?")+"&":"")+"labels[]="+A.join("&labels[]="),E=f+"?"+k;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const O=await g.get(E);for(const z in O)Ve.publisher["wording_"+z].set(O[z])})}static reloadWordings(){for(const e of En.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&Ve.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=sa(e),r=n=>{};if(!s)return r;if(Ve.versionProviderHandlers.has(s))return Ve.versionProviderHandlers.get(s)||r;const i=function(n){if(!s.wordingVersionProvider)return;const c=Ve.publisher.get().__wording_versions__??[];if(n==null)return;const h=c.find(g=>g.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};c.includes(h)||c.push(h),n!==h.version&&(h.version=n,Ve.publisher.set({__wording_versions__:c}),Ve.reloadWordings())};return Ve.versionProviderHandlers.set(s,i),i}subscribe(e){this.unsubscribe(),Ve.publisher["wording_"+e].onAssign(this.onAssign),Ve.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};Ve.publisher=me.get("sonic-wording",{localStorageMode:"enabled"}),Ve.firstCall=!0,Ve.versionProviderHandlers=new Map;let vr=Ve;const Rc=Os(vr);var jc=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,ss=(t,e,s,r)=>{for(var i=r>1?void 0:r?zc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jc(e,s,i),i};let $i=!1,On=new Set;const kt=(t,e)=>{var i;const s=(i=class extends t{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=c=>{this.props=c}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return Ge.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const h=[...(this.shadowRoot||this).children].filter(A=>A.tagName!="STYLE"),g=this.displayContents?"contents":h.length==0?"none":null;g?this.style.display=g:this.style.removeProperty("display")}connectedCallback(){if(i.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let c=!0;const h=new IntersectionObserver(g=>{for(const A of g)if(c&&A.isIntersecting){c=!1,h.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);h.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),vr.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),$i=!$i)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{$i||this.removeDebugger(),document.body.appendChild(this.debug),On.add(this.debug)}),this.addEventListener("mouseout",()=>{$i||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
64
64
  <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
65
65
  Variable disponible dans la console<br>
66
66
  ctrl + Clique : épingler / désépingler
67
67
  </div>
68
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Cn.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Cn=new Set}getApiConfiguration(){return Je.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&gr.callApi(this,c.substring(8));gr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return vi.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=be.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+i.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let h=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const b=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+b,h=at.traverse(h,b.split(".")),o.set(this.dataProvider,h),this.publisher=h}this.publisher=h}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},i.instanceCounter=0,i);return es([u({type:Number})],s.prototype,"collectDependenciesVersion",2),es([u({type:Boolean})],s.prototype,"displayContents",2),es([u({type:Boolean})],s.prototype,"noAutoFill",2),es([u({type:Boolean})],s.prototype,"forceAutoFill",2),es([u({type:Object})],s.prototype,"propertyMap",2),es([u({type:String,attribute:"data-title"})],s.prototype,"title",2),es([u({reflect:!0})],s.prototype,"dataProvider",2),es([u()],s.prototype,"bindPublisher",2),es([u()],s.prototype,"props",1),es([Ae()],s.prototype,"shouldRenderLazy",2),s};var pc=Object.defineProperty,fc=(t,e,s,r)=>{for(var i=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(e,s,i)||i);return i&&pc(e,s,i),i};const Ur=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const r=this.templates||[...this.querySelectorAll("template")];for(const i of r)i.hasAttribute(this.templateValueAttribute)&&(this.templateParts[i.getAttribute(this.templateValueAttribute)]=i,this.templatePartsList.push(i)),i.hasAttribute("skeleton")&&(this.templateParts.skeleton=i),i.hasAttribute("no-result")&&(this.templateParts["no-result"]=i),i.hasAttribute("no-item")&&(this.templateParts["no-item"]=i);this.templateList=r.filter(i=>!i.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=r),super.connectedCallback()}}return fc([u({type:Array})],e.prototype,"templates"),e};var gc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,r)=>{for(var i=r>1?void 0:r?bc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&gc(e,s,i),i};const mc="sonic-date";ln(()=>Re.updateComponentsLanguage());let Re=class extends nt(Ur(J)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){Re.dateCompnents.forEach(t=>t.pageLanguage=Je.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=Je.getLanguage(),Re.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Re.dateCompnents.delete(this)}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(t*1e3);let i=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=r.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,n),!o){const h=i.find(b=>b.type=="literal"&&b.source=="shared"&&b.value.trim().length>0);h&&(h.value=" "+this.duAu[1]+" ",h.type="to"),this.designMode||i.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r);return this.designMode&&i.forEach(n=>n.value=n.value.replace(/,/g," ")),i[0].value=Tr.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return re;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return je(`${e.map(s=>{const r=this.templateParts[s.type];if(r){const o=document.importNode(r.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const i=document.createElement("span");return i.innerText=s.value,i.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Re.dateCompnents=new Set,Xe([u()],Re.prototype,"wording_billet_periode_validite",1),Xe([u({type:Boolean})],Re.prototype,"designMode",2),Xe([u({type:String})],Re.prototype,"time_zone",2),Xe([u({type:Number})],Re.prototype,"date",2),Xe([u({type:String})],Re.prototype,"date_string",2),Xe([u({type:String})],Re.prototype,"start_date_string",2),Xe([u({type:String})],Re.prototype,"end_date_string",2),Xe([u({type:Number})],Re.prototype,"start_date",2),Xe([u({type:Number})],Re.prototype,"end_date",2),Xe([u({type:Boolean})],Re.prototype,"hide_hours",2),Xe([u({type:String})],Re.prototype,"era",2),Xe([u({type:String})],Re.prototype,"year",2),Xe([u({type:String})],Re.prototype,"month",2),Xe([u({type:String})],Re.prototype,"day",2),Xe([u({type:String})],Re.prototype,"weekday",2),Xe([u({type:String})],Re.prototype,"hour",2),Xe([u({type:Boolean})],Re.prototype,"hour12",2),Xe([u({type:String})],Re.prototype,"minute",2),Xe([u({type:String})],Re.prototype,"language",2),Xe([u({type:Boolean})],Re.prototype,"renderIf",2),Xe([u({type:Boolean})],Re.prototype,"now",2),Re=Xe([X(mc)],Re);let ct=(et=class{static listen(){if(!et.listening)return;const e=document.location?.href.replace(document.location.origin,"");et.prevURL&&et.prevURL!=e&&(et.prevURL=e,et.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(et.listen)}static offChange(e){const s=et.listeners.indexOf(e);s!=-1&&(et.listeners.splice(s,1),et.listeners.length==0&&(et.listening=!1))}static onChange(e){et.listening||(et.listening=!0,et.listen()),et.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,r=document.referrer;if(s!=null){const b=document.location.origin,k=(s||b).toString(),f=r.indexOf("http")==0?new URL(r).origin!=b:!1,A=r=="",E=history.length<3,O=A&&E,N=k!=document.location.href;if(f&&N||O){const P=history.state||{};P.concorde=P.concorde||{},P.concorde.hasDoneHistoryBack=!0,history.pushState(P,document.title),history.back(),document.location.replace(k)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const n=new URL(i,document.location.href),o=n.pathname.split("/"),c=[];let h="";for(const b of o)b!=h&&c.push(b),h=b;i="/"+c.join("/")+n.search+(n.hash?+n.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},et.listeners=[],et.listening=!1,et.prevURL=document.location?.href.replace(document.location.origin,""),et);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){On.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),On=new Set}getApiConfiguration(){return Ge.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&vr.callApi(this,c.substring(8));vr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return _i.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=me.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+i.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let h=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const g=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+g,h=lt.traverse(h,g.split(".")),o.set(this.dataProvider,h),this.publisher=h}this.publisher=h}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},i.instanceCounter=0,i);return ss([u({type:Number})],s.prototype,"collectDependenciesVersion",2),ss([u({type:Boolean})],s.prototype,"displayContents",2),ss([u({type:Boolean})],s.prototype,"noAutoFill",2),ss([u({type:Boolean})],s.prototype,"forceAutoFill",2),ss([u({type:Object})],s.prototype,"propertyMap",2),ss([u({type:String,attribute:"data-title"})],s.prototype,"title",2),ss([u({reflect:!0})],s.prototype,"dataProvider",2),ss([u()],s.prototype,"bindPublisher",2),ss([u()],s.prototype,"props",1),ss([Ae()],s.prototype,"shouldRenderLazy",2),s};var Uc=Object.defineProperty,qc=(t,e,s,r)=>{for(var i=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(e,s,i)||i);return i&&Uc(e,s,i),i};const Vr=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const r=this.templates||[...this.querySelectorAll("template")];for(const i of r)i.hasAttribute(this.templateValueAttribute)&&(this.templateParts[i.getAttribute(this.templateValueAttribute)]=i,this.templatePartsList.push(i)),i.hasAttribute("skeleton")&&(this.templateParts.skeleton=i),i.hasAttribute("no-result")&&(this.templateParts["no-result"]=i),i.hasAttribute("no-item")&&(this.templateParts["no-item"]=i);this.templateList=r.filter(i=>!i.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=r),super.connectedCallback()}}return qc([u({type:Array})],e.prototype,"templates"),e};var Bc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Bc(e,s,i),i};const Vc="sonic-date";pn(()=>ze.updateComponentsLanguage());let ze=class extends kt(Vr(J)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){ze.dateCompnents.forEach(t=>t.pageLanguage=Ge.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=Ge.getLanguage(),ze.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),ze.dateCompnents.delete(this)}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(t*1e3);let i=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=r.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,n),!o){const h=i.find(g=>g.type=="literal"&&g.source=="shared"&&g.value.trim().length>0);h&&(h.value=" "+this.duAu[1]+" ",h.type="to"),this.designMode||i.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r);return this.designMode&&i.forEach(n=>n.value=n.value.replace(/,/g," ")),i[0].value=Ir.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return se;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return Be(`${e.map(s=>{const r=this.templateParts[s.type];if(r){const o=document.importNode(r.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const i=document.createElement("span");return i.innerText=s.value,i.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};ze.dateCompnents=new Set,Xe([u()],ze.prototype,"wording_billet_periode_validite",1),Xe([u({type:Boolean})],ze.prototype,"designMode",2),Xe([u({type:String})],ze.prototype,"time_zone",2),Xe([u({type:Number})],ze.prototype,"date",2),Xe([u({type:String})],ze.prototype,"date_string",2),Xe([u({type:String})],ze.prototype,"start_date_string",2),Xe([u({type:String})],ze.prototype,"end_date_string",2),Xe([u({type:Number})],ze.prototype,"start_date",2),Xe([u({type:Number})],ze.prototype,"end_date",2),Xe([u({type:Boolean})],ze.prototype,"hide_hours",2),Xe([u({type:String})],ze.prototype,"era",2),Xe([u({type:String})],ze.prototype,"year",2),Xe([u({type:String})],ze.prototype,"month",2),Xe([u({type:String})],ze.prototype,"day",2),Xe([u({type:String})],ze.prototype,"weekday",2),Xe([u({type:String})],ze.prototype,"hour",2),Xe([u({type:Boolean})],ze.prototype,"hour12",2),Xe([u({type:String})],ze.prototype,"minute",2),Xe([u({type:String})],ze.prototype,"language",2),Xe([u({type:Boolean})],ze.prototype,"renderIf",2),Xe([u({type:Boolean})],ze.prototype,"now",2),ze=Xe([Q(Vc)],ze);let ut=(st=class{static listen(){if(!st.listening)return;const e=document.location?.href.replace(document.location.origin,"");st.prevURL&&st.prevURL!=e&&(st.prevURL=e,st.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(st.listen)}static offChange(e){const s=st.listeners.indexOf(e);s!=-1&&(st.listeners.splice(s,1),st.listeners.length==0&&(st.listening=!1))}static onChange(e){st.listening||(st.listening=!0,st.listen()),st.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,r=document.referrer;if(s!=null){const g=document.location.origin,A=(s||g).toString(),f=r.indexOf("http")==0?new URL(r).origin!=g:!1,k=r=="",E=history.length<3,O=k&&E,z=A!=document.location.href;if(f&&z||O){const S=history.state||{};S.concorde=S.concorde||{},S.concorde.hasDoneHistoryBack=!0,history.pushState(S,document.title),history.back(),document.location.replace(A)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const n=new URL(i,document.location.href),o=n.pathname.split("/"),c=[];let h="";for(const g of o)g!=h&&c.push(g),h=g;i="/"+c.join("/")+n.search+(n.hash?n.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},st.listeners=[],st.listening=!1,st.prevURL=document.location?.href.replace(document.location.origin,""),st);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
72
- */const Go="important",vc=" !"+Go,$t=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return r==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(vc);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?Go:""):s[r]=i}}return Nt}});var yc=Object.defineProperty,wc=Object.getOwnPropertyDescriptor,ts=(t,e,s,r)=>{for(var i=r>1?void 0:r?wc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yc(e,s,i),i};const Ci=new Map,br=t=>{class e extends t{constructor(...r){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=i=>{this.setValueFromPublisher(i)},this.onFormValueAssign=async i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(r){this.hasAttribute("name")&&!this.forceAutoFill&&(r=this.getAttribute("name")),this._name=r,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?be.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&kt(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?kt(r,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(r){this.value=r}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),at.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&kt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&r&&kt(r,this._name).offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&kt(this.publisher,this._name).onAssign(this.onValueAssign),r=this.getFormPublisher(),this._name&&r&&(kt(r,this._name).onAssign(this.onFormValueAssign),r.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),i&&(this.value=i)}handleBlur(){this.touched=!0}handleChange(r){this.value=r.target.value;const i=new Event("change");this.dispatchEvent(i)}addKeyboardNavigation(){const r=this.getAncestorAttributeValue("data-keyboard-nav");if(!r)return;const i=r.split(" "),n=i[0];if(!n)return;for(const c of i){Ci.has(c)||Ci.set(c,[]);const h=Ci.get(c);h?.indexOf(this)==-1&&h.push(this)}const o=Ci.get(n);this.addEventListener("keydown",c=>{const h=c;if(!["ArrowDown","ArrowUp"].includes(h.key))return;const b="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",k=o?.filter(A=>{const E=A.shadowRoot?.querySelector(b);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let g=null;if(h.key=="ArrowDown"&&k){const A=k.indexOf(this);A==k.length-1?g=k[0]:g=k[A+1]}else if(h.key=="ArrowUp"&&k){const A=k.indexOf(this);A==0?g=k[k.length-1]:g=k[A-1]}const f=g?.shadowRoot?.querySelector(b);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&kt(this.publisher,this._name).offAssign(this.onValueAssign);const r=this.getFormPublisher();this._name&&r&&(kt(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return ts([u({type:Boolean,reflect:!0})],e.prototype,"touched",2),ts([u({type:Boolean})],e.prototype,"error",2),ts([u({type:Boolean})],e.prototype,"autofocus",2),ts([u({type:Boolean})],e.prototype,"required",2),ts([u({type:Boolean})],e.prototype,"forceAutoFill",2),ts([u({type:Boolean,reflect:!0})],e.prototype,"disabled",2),ts([u({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),ts([u({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),ts([u()],e.prototype,"name",1),ts([u()],e.prototype,"value",1),e};let _c=class cr{static areEqual(e,s){return e.length===s.length?e.every((r,i)=>r===s[i]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const r=(e[0]||{})[s];return e.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>cr.from(e.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>cr.from(e.map(s)),filter:s=>cr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of e){const o=n[s];if(!i.has(o)){const c=r.length;i.set(o,c);const h={items:[]};h[s]=o,r.push(h)}r[i.get(o)].items.push(n)}return cr.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(e.map(i=>i[s]))];return cr.from(r.map(i=>e.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>c=>n[o]!=c[o];return cr.from(e.filter(n=>s.every(i(n,r))))}})})})}}};var Zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qr={exports:{}},Pc=qr.exports,Xo;function xc(){return Xo||(Xo=1,(function(t,e){var s=[].slice;(function(r,i){return e!==null?t.exports=i():r.UrlPattern=i()})(Pc,function(){var r,i,n,o,c,h,b,k,g,f,A,E,O,N,U;return g=function(P){return P.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},b=function(P,y){var I,C,$;for($=[],I=-1,C=P.length;++I<C;)$=$.concat(y(P[I]));return $},N=function(P,y){var I,C,$;for($="",I=-1,C=P.length;++I<C;)$+=y(P[I]);return $},O=function(P){return new RegExp(P.toString()+"|").exec("").length-1},A=function(P,y){var I,C,$,G,z;for(G={},I=-1,$=P.length;++I<$;)C=P[I],z=y[I],z!=null&&(G[C]!=null?(Array.isArray(G[C])||(G[C]=[G[C]]),G[C].push(z)):G[C]=z);return G},r={},r.Result=function(P,y){this.value=P,this.rest=y},r.Tagged=function(P,y){this.tag=P,this.value=y},r.tag=function(P,y){return function(I){var C,$;if(C=y(I),C!=null)return $=new r.Tagged(P,C.value),new r.Result($,C.rest)}},r.regex=function(P){return function(y){var I,C;if(I=P.exec(y),I!=null)return C=I[0],new r.Result(C,y.slice(C.length))}},r.sequence=function(){var P;return P=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,$,G,z,ne;for(I=-1,C=P.length,ne=[],G=y;++I<C;){if($=P[I],z=$(G),z==null)return;ne.push(z.value),G=z.rest}return new r.Result(ne,G)}},r.pick=function(){var P,y;return P=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(I){var C,$;if($=r.sequence.apply(r,y)(I),$!=null)return C=$.value,$.value=C[P],$}},r.string=function(P){var y;return y=P.length,function(I){if(I.slice(0,y)===P)return new r.Result(P,I.slice(y))}},r.lazy=function(P){var y;return y=null,function(I){return y==null&&(y=P()),y(I)}},r.baseMany=function(P,y,I,C,$){var G,z,ne,se;for(ne=$,se=I?"":[];!(y!=null&&(G=y(ne),G!=null)||(z=P(ne),z==null));)I?se+=z.value:se.push(z.value),ne=z.rest;if(!(C&&se.length===0))return new r.Result(se,ne)},r.many1=function(P){return function(y){return r.baseMany(P,null,!1,!0,y)}},r.concatMany1Till=function(P,y){return function(I){return r.baseMany(P,y,!0,!0,I)}},r.firstChoice=function(){var P;return P=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,$,G;for(I=-1,C=P.length;++I<C;)if($=P[I],G=$(y),G!=null)return G}},E=function(P){var y;return y={},y.wildcard=r.tag("wildcard",r.string(P.wildcardChar)),y.optional=r.tag("optional",r.pick(1,r.string(P.optionalSegmentStartChar),r.lazy(function(){return y.pattern}),r.string(P.optionalSegmentEndChar))),y.name=r.regex(new RegExp("^["+P.segmentNameCharset+"]+")),y.named=r.tag("named",r.pick(1,r.string(P.segmentNameStartChar),r.lazy(function(){return y.name}))),y.escapedChar=r.pick(1,r.string(P.escapeChar),r.regex(/^./)),y.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return y.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(P.segmentNameStartChar),r.string(P.optionalSegmentStartChar),r.string(P.optionalSegmentEndChar),y.wildcard))),y.token=r.lazy(function(){return r.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=r.many1(r.lazy(function(){return y.token})),y},k={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},h=function(P,y){if(Array.isArray(P))return N(P,function(I){return h(I,y)});switch(P.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return g(P.value);case"optional":return"(?:"+h(P.value,y)+")?"}},c=function(P,y){return y==null&&(y=k.segmentValueCharset),"^"+h(P,y)+"$"},o=function(P){if(Array.isArray(P))return b(P,o);switch(P.tag){case"wildcard":return["_"];case"named":return[P.value];case"static":return[];case"optional":return o(P.value)}},f=function(P,y,I,C){var $,G,z,ne;if(C==null&&(C=!1),ne=P[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if($=I[y]||0,G=Array.isArray(ne)?ne.length-1:0,$>G){if(C)throw new Error("too few values provided for key `"+y+"`");return}return z=Array.isArray(ne)?ne[$]:ne,C&&(I[y]=$+1),z},n=function(P,y,I){var C,$;if(Array.isArray(P)){for(C=-1,$=P.length;++C<$;)if(n(P[C],y,I))return!0;return!1}switch(P.tag){case"wildcard":return f(y,"_",I,!1)!=null;case"named":return f(y,P.value,I,!1)!=null;case"static":return!1;case"optional":return n(P.value,y,I)}},U=function(P,y,I){if(Array.isArray(P))return N(P,function(C){return U(C,y,I)});switch(P.tag){case"wildcard":return f(y,"_",I,!0);case"named":return f(y,P.value,I,!0);case"static":return P.value;case"optional":return n(P.value,y,I)?U(P.value,y,I):""}},i=function(P,y){var I,C,$,G,z;if(P instanceof i){this.isRegex=P.isRegex,this.regex=P.regex,this.ast=P.ast,this.names=P.names;return}if(this.isRegex=P instanceof RegExp,!(typeof P=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=P,y!=null){if(!Array.isArray(y))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(I=O(this.regex),y.length!==I)throw new Error("regex contains "+I+" groups but array of group names contains "+y.length);this.names=y}return}if(P==="")throw new Error("argument must not be the empty string");if(z=P.replace(/\s+/g,""),z!==P)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||k.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||k.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||k.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||k.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||k.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||k.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||k.wildcardChar},G=E(C),$=G.pattern(P),$==null)throw new Error("couldn't parse pattern");if($.rest!=="")throw new Error("could only partially parse pattern");this.ast=$.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(P){var y,I;return I=this.regex.exec(P),I==null?null:(y=I.slice(1),this.names?A(this.names,y):y)},i.prototype.stringify=function(P){if(P==null&&(P={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(P!==Object(P))throw new Error("argument must be an object or undefined");return U(this.ast,P,{})},i.escapeForRegex=g,i.concatMap=b,i.stringConcatMap=N,i.regexGroupCount=O,i.keysAndValuesToObject=A,i.P=r,i.newParser=E,i.defaultOptions=k,i.astNodeToRegexString=c,i.astNodeToNames=o,i.getParam=f,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=U,i})})(qr,qr.exports)),qr.exports}var Sc=xc();const ps=Jo(Sc);class ki{constructor(e){this.path=ki.normalizePath(e)}getDataProviderKey(){return new Ss(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let h;try{h=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return h.pathname=h.pathname.replace(/\/+/g,"/"),h.href}const r=s.indexOf("?"),i=s.indexOf("#");let n=s.length;r>=0&&(n=Math.min(n,r)),i>=0&&(n=Math.min(n,i));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const Ac=50,Cc=1e4,kc=100,kn=new Map;function $i(t){return di(t)}function Vr(t){return t.split(".")[0]??t}function Di(t){const e=t.split("."),s=e.shift();let r=be.get(s);return e.length&&(r=at.traverse(r,e)),r}function $c(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function Dc(t){return Array.isArray(t)?t.length:0}function Ec(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Vr(t),r=new Map;for(const[o,c]of kn)r.set(Vr(o),new Set(c));r.set(s,new Set(e.map(Vr)));const i=new Set,n=o=>{if(i.has(o))return!0;i.add(o);for(const c of r.get(o)??[])if(n(c))return!0;return i.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function Oc(t,e){kn.set(t,new Set(e.map(s=>Vr(s))))}function Tc(t){kn.delete(t)}function Lc(t){return`${Vr($i(t))}/_state_`}function Ei(t,e){const s=Lc(t);be.get(s).set(e)}function Mc(t,e,s,r){const i=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:r},n=i.debounceMs??Ac,o=i.maxInputItems??Cc,c=i.isEmpty??$c,h=$i(i.output),b=Object.entries(i.inputs).map(([ie,q])=>({alias:ie,path:$i(q)})),k=b.map(ie=>ie.path),g=i.variables?$i(i.variables):null;Ec(h,k),Oc(h,k);const f=Di(h);let A,E=!1,O=0,N=null,U=!1,P="";const y=ie=>{E=!0,A=ie,f.set(ie),E=!1},I=()=>{E||U||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${h}".`),A!==void 0&&(E=!0,f.set(A),E=!1))};f.onAssign(I,!1);const C=()=>{const ie={};for(const{alias:q,path:le}of b){const pe=Di(le).get(),Ue=Dc(pe);Ue>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Ue} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[q]=pe}return ie},$=()=>g?Di(g).get()??{}:{},G=async()=>{if(U)return;const ie=++O;Ei(h,{status:"loading",error:null});const q=C(),le=$(),pe=JSON.stringify({inputs:q,vars:le});if(pe===P&&A!==void 0){Ei(h,{status:c(A)?"empty":"ready",error:null});return}const Ue=typeof performance<"u"?performance.now():Date.now();try{const ue=await Promise.resolve(i.compute(q,le));if(U||ie!==O)return;const me=(typeof performance<"u"?performance.now():Date.now())-Ue;me>kc&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(me)} ms) → "${h}".`),P=pe,y(ue),Ei(h,{status:c(ue)?"empty":"ready",error:null})}catch(ue){if(U||ie!==O)return;const me=ue instanceof Error?ue.message:String(ue);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${h}" :`,me),Ei(h,{status:"error",error:me})}},z=()=>{U||(N&&clearTimeout(N),N=setTimeout(()=>{N=null,G()},n))},ne=[],se=ie=>{const q=Di(ie),le=()=>z();q.onInternalMutation(le),ne.push({pub:q,handler:le})};for(const{path:ie}of b)se(ie);return g&&se(g),z(),{stop(){if(!U){U=!0,N&&clearTimeout(N);for(const{pub:ie,handler:q}of ne)ie.offInternalMutation(q);f.offAssign(I),Tc(h)}},recompute(){P="",G()}}}function Oi(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $n={exports:{}},Qo;function Ic(){return Qo||(Qo=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(r,i,n){function o(b,k){if(!i[b]){if(!r[b]){var g=typeof Oi=="function"&&Oi;if(!k&&g)return g(b,!0);if(c)return c(b,!0);var f=new Error("Cannot find module '"+b+"'");throw f.code="MODULE_NOT_FOUND",f}var A=i[b]={exports:{}};r[b][0].call(A.exports,function(E){var O=r[b][1][E];return o(O||E)},A,A.exports,s,r,i,n)}return i[b].exports}for(var c=typeof Oi=="function"&&Oi,h=0;h<n.length;h++)o(n[h]);return o}return s})()({1:[function(s,r,i){const n=s("./utils"),o=(function(){const c=n.stringToArray,h=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],b=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],k=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],g=["Thousand","Million","Billion","Trillion"];function f(T,M){var D=function(V,H,F){var Y="";if(V<=19)Y=(H?" and ":"")+(F?b[V]:h[V]);else if(V<100){const xe=Math.floor(V/10),ge=V%10;Y=(H?" and ":"")+k[xe-2],ge>0?Y+="-"+D(ge,!1,F):F&&(Y=Y.substring(0,Y.length-1)+"ieth")}else if(V<1e3){const xe=Math.floor(V/100),ge=V%100;Y=(H?", ":"")+h[xe]+" Hundred",ge>0?Y+=D(ge,!0,F):F&&(Y+="th")}else{var ae=Math.floor(Math.log10(V)/3);ae>g.length&&(ae=g.length);const xe=Math.pow(10,ae*3),ge=Math.floor(V/xe),fe=V-ge*xe;Y=(H?", ":"")+D(ge,!1,!1)+" "+g[ae-1],fe>0?Y+=D(fe,!0,F):F&&(Y+="th")}return Y},j=D(T,!1,M);return j}const A=Object.create(null);h.forEach(function(T,M){A[T.toLowerCase()]=M}),b.forEach(function(T,M){A[T.toLowerCase()]=M}),k.forEach(function(T,M){const D=T.toLowerCase();A[D]=(M+2)*10,A[D.substring(0,T.length-1)+"ieth"]=A[D]}),A.hundredth=100,g.forEach(function(T,M){const D=T.toLowerCase(),j=Math.pow(10,(M+1)*3);A[D]=j,A[D+"th"]=j});function E(T){const D=T.split(/,\s|\sand\s|[\s\\-]/).map(H=>A[H]);let j=[0];return D.forEach(H=>{if(H<100){let F=j.pop();F>=1e3&&(j.push(F),F=0),j.push(F+H)}else j.push(j.pop()*H)}),j.reduce((H,F)=>H+F,0)}const O=[[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"]],N={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function U(T){for(var M=0;M<O.length;M++){const D=O[M];if(T>=D[0])return D[1]+U(T-D[0])}return""}function P(T){for(var M=0,D=1,j=T.length-1;j>=0;j--){const V=T[j],H=N[V];H<D?M-=H:(D=H,M+=H)}return M}function y(T,M){for(var D=[],j=M.charCodeAt(0);T>0;)D.unshift(String.fromCharCode((T-1)%26+j)),T=Math.floor((T-1)/26);return D.join("")}function I(T,M){for(var D=M.charCodeAt(0),j=0,V=0;V<T.length;V++)j+=(T.charCodeAt(T.length-V-1)-D+1)*Math.pow(26,V);return j}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const D=se(M);return z(T,D)}const $={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},G={UPPER:"upper",LOWER:"lower",TITLE:"title"};function z(T,M){let D;const j=T<0;switch(T=Math.abs(T),M.primary){case $.LETTERS:D=y(T,M.case===G.UPPER?"A":"a");break;case $.ROMAN:D=U(T),M.case===G.UPPER&&(D=D.toUpperCase());break;case $.WORDS:D=f(T,M.ordinal),M.case===G.UPPER?D=D.toUpperCase():M.case===G.LOWER&&(D=D.toLowerCase());break;case $.DECIMAL:D=""+T;var V=M.mandatoryDigits-D.length;if(V>0){var H=new Array(V+1).join("0");D=H+D}if(M.zeroCode!==48&&(D=c(D).map(xe=>String.fromCodePoint(xe.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const xe=Math.floor((D.length-1)/M.groupingSeparators.position);for(let ge=xe;ge>0;ge--){const fe=D.length-ge*M.groupingSeparators.position;D=D.substr(0,fe)+M.groupingSeparators.character+D.substr(fe)}}else M.groupingSeparators.reverse().forEach(xe=>{const ge=D.length-xe.position;D=D.substr(0,ge)+xe.character+D.substr(ge)});if(M.ordinal){var F={1:"st",2:"nd",3:"rd"},Y=D[D.length-1],ae=F[Y];(!ae||D.length>1&&D[D.length-2]==="1")&&(ae="th"),D=D+ae}break;case $.SEQUENCE:throw{code:"D3130",value:M.token}}return j&&(D="-"+D),D}const ne=[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 se(T){const M={type:"integer",primary:$.DECIMAL,case:G.LOWER,ordinal:!1};let D,j;const V=T.lastIndexOf(";");switch(V===-1?D=T:(D=T.substring(0,V),j=T.substring(V+1),j[0]==="o"&&(M.ordinal=!0)),D){case"A":M.case=G.UPPER;case"a":M.primary=$.LETTERS;break;case"I":M.case=G.UPPER;case"i":M.primary=$.ROMAN;break;case"W":M.case=G.UPPER,M.primary=$.WORDS;break;case"Ww":M.case=G.TITLE,M.primary=$.WORDS;break;case"w":M.primary=$.WORDS;break;default:{let H=null,F=0,Y=0,ae=[],xe=0;if(c(D).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let he=!1;for(let $e=0;$e<ne.length;$e++){const de=ne[$e];if(fe>=de&&fe<=de+9){if(he=!0,F++,xe++,H===null)H=de;else if(de!==H)throw{code:"D3131"};break}}he||(fe===35?(xe++,Y++):ae.push({position:xe,character:String.fromCodePoint(fe)}))}),F>0){M.primary=$.DECIMAL,M.zeroCode=H,M.mandatoryDigits=F,M.optionalDigits=Y;const he=function($e){if($e.length===0)return 0;const de=$e[0].character;for(let st=1;st<$e.length;st++)if($e[st].character!==de)return 0;const ft=$e.map(st=>st.position),Kt=function(st,Pt){return Pt===0?st:Kt(Pt,st%Pt)},_t=ft.reduce(Kt);for(let st=1;st<=ft.length;st++)if(ft.indexOf(st*_t)===-1)return 0;return _t}(ae);he>0?(M.regular=!0,M.groupingSeparators={position:he,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=$.SEQUENCE,M.token=D}}return M}const ie={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 q(T){var M=[];const D={type:"datetime",parts:M},j=function(he,$e){if($e>he){let de=T.substring(he,$e);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var V=0,H=0;H<T.length;){if(T.charAt(H)==="["){if(T.charAt(H+1)==="["){j(V,H),M.push({type:"literal",value:"["}),H+=2,V=H;continue}if(j(V,H),V=H,H=T.indexOf("]",V),H===-1)throw{code:"D3135"};let he=T.substring(V+1,H);he=he.split(/\s+/).join("");var F={type:"marker",component:he.charAt(0)},Y=he.lastIndexOf(","),ae;if(Y!==-1){const $e=he.substring(Y+1),de=$e.indexOf("-");let ft,Kt;const _t=function(Pt){if(!(typeof Pt>"u"||Pt==="*"))return parseInt(Pt)};de===-1?ft=$e:(ft=$e.substring(0,de),Kt=$e.substring(de+1));const st={min:_t(ft),max:_t(Kt)};F.width=st,ae=he.substring(1,Y)}else ae=he.substring(1);if(ae.length===1)F.presentation1=ae;else if(ae.length>1){var xe=ae.charAt(ae.length-1);"atco".indexOf(xe)!==-1?(F.presentation2=xe,xe==="o"&&(F.ordinal=!0),F.presentation1=ae.substring(0,ae.length-1)):F.presentation1=ae}else F.presentation1=ie[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=G.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=G.TITLE:F.names=G.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var ge=F.presentation1;if(F.presentation2&&(ge+=";"+F.presentation2),F.integerFormat=se(ge),F.width&&F.width.min!==void 0&&F.integerFormat.mandatoryDigits<F.width.min&&(F.integerFormat.mandatoryDigits=F.width.min),F.component==="Y")if(F.n=-1,F.width&&F.width.max!==void 0)F.n=F.width.max,F.integerFormat.mandatoryDigits=F.n;else{var fe=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;fe>=2&&(F.n=fe)}const $e=M[M.length-1];$e&&$e.integerFormat&&($e.integerFormat.parseWidth=$e.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=se(F.presentation1)),M.push(F),V=H+1}H++}return j(V,H),D}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ue=1e3*60*60*24,ue=function(T){const M=Date.UTC(T.year,T.month);var D=new Date(M).getUTCDay();return D===0&&(D=7),D>4?M+(8-D)*Ue:M-(D-1)*Ue},me=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?me(T+1,0):me(T,M+1)},previousMonth:function(){return M===0?me(T-1,11):me(T,M-1)},nextYear:function(){return me(T+1,M)},previousYear:function(){return me(T-1,M)}}},ke=function(T,M){return(M-T)/(Ue*7)+1},ce=(T,M)=>{let D;switch(M){case"Y":D=T.getUTCFullYear();break;case"M":D=T.getUTCMonth()+1;break;case"D":D=T.getUTCDate();break;case"d":{const j=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),V=Date.UTC(T.getUTCFullYear(),0);D=(j-V)/Ue+1;break}case"F":D=T.getUTCDay(),D===0&&(D=7);break;case"W":{const j=me(T.getUTCFullYear(),0),V=ue(j),H=Date.UTC(j.year,T.getUTCMonth(),T.getUTCDate());let F=ke(V,H);if(F>52){const Y=ue(j.nextYear());H>=Y&&(F=1)}else if(F<1){const Y=ue(j.previousYear());F=ke(Y,H)}D=Math.floor(F);break}case"w":{const j=me(T.getUTCFullYear(),T.getUTCMonth()),V=ue(j),H=Date.UTC(j.year,j.month,T.getUTCDate());let F=ke(V,H);if(F>4){const Y=ue(j.nextMonth());H>=Y&&(F=1)}else if(F<1){const Y=ue(j.previousMonth());F=ke(Y,H)}D=Math.floor(F);break}case"X":{const j=me(T.getUTCFullYear(),0),V=ue(j),H=ue(j.nextYear()),F=T.getTime();F<V?D=j.year-1:F>=H?D=j.year+1:D=j.year;break}case"x":{const j=me(T.getUTCFullYear(),T.getUTCMonth()),V=ue(j),H=j.nextMonth(),F=ue(H),Y=T.getTime();Y<V?D=j.previousMonth().month+1:Y>=F?D=H.month+1:D=j.month+1;break}case"H":D=T.getUTCHours();break;case"h":D=T.getUTCHours(),D=D%12,D===0&&(D=12);break;case"P":D=T.getUTCHours()>=12?"pm":"am";break;case"m":D=T.getUTCMinutes();break;case"s":D=T.getUTCSeconds();break;case"f":D=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":D="ISO";break;case"E":D="ISO";break}return D};let W=null;function Pe(T,M,D){var j=0,V=0;if(typeof D<"u"){const ge=parseInt(D);j=Math.floor(ge/100),V=ge%100}var H=function(ge,fe){var he=ce(ge,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(he=he%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")he=pe[he-1];else if(fe.component==="F")he=le[he];else throw{code:"D3133",value:fe.component};fe.names===G.UPPER?he=he.toUpperCase():fe.names===G.LOWER&&(he=he.toLowerCase()),fe.width&&he.length>fe.width.max&&(he=he.substring(0,fe.width.max))}else he=z(he,fe.integerFormat);else if(fe.component==="f")he=z(he,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const $e=j*100+V;if(fe.integerFormat.regular)he=z($e,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)he=z(j,fe.integerFormat),V!==0&&(he+=":"+C(V,"00"));else if(de===3||de===4)he=z($e,fe.integerFormat);else throw{code:"D3134",value:de}}$e>=0&&(he="+"+he),fe.component==="z"&&(he="GMT"+he),$e===0&&fe.presentation2==="t"&&(he="Z")}else fe.component==="P"&&fe.names===G.UPPER&&(he=he.toUpperCase());return he};let F;typeof M>"u"?(W===null&&(W=q("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=W):F=q(M);const Y=(60*j+V)*60*1e3,ae=new Date(T+Y);let xe="";return F.parts.forEach(function(ge){ge.type==="literal"?xe+=ge.value:xe+=H(ae,ge)}),xe}function m(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function(D){var j=Object.create(null);if(D.type==="literal")j.regex=D.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(D.component==="Z"||D.component==="z"){let H;Array.isArray(D.integerFormat.groupingSeparators)||(H=D.integerFormat.groupingSeparators),j.regex="",D.component==="z"&&(j.regex="GMT"),j.regex+="[-+][0-9]+",H&&(j.regex+=H.character+"[0-9]+"),j.parse=function(F){D.component==="z"&&(F=F.substring(3));let Y=0,ae=0;return H?(Y=Number.parseInt(F.substring(0,F.indexOf(H.character))),ae=Number.parseInt(F.substring(F.indexOf(H.character)+1))):F.length-1<=2?Y=Number.parseInt(F):(Y=Number.parseInt(F.substring(0,3)),ae=Number.parseInt(F.substring(3))),Y*60+ae}}else if(D.component==="f")j.regex="[0-9]+",j.parse=function(H){return parseFloat("0."+H.substring(0,3))*1e3};else if(D.integerFormat)j=m(D.integerFormat);else{j.regex="[a-zA-Z]+";var V=Object.create(null);if(D.component==="M"||D.component==="x")pe.forEach(function(H,F){D.width&&D.width.max?V[H.substring(0,D.width.max)]=F+1:V[H]=F+1});else if(D.component==="F")le.forEach(function(H,F){F>0&&(D.width&&D.width.max?V[H.substring(0,D.width.max)]=F:V[H]=F)});else if(D.component==="P")V={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:D.component};j.parse=function(H){return V[H]}}return j.component=D.component,j});else{M.type="integer";const D=T.case===G.UPPER;switch(T.primary){case $.LETTERS:M.regex=D?"[A-Z]+":"[a-z]+",M.parse=function(j){return I(j,D?"A":"a")};break;case $.ROMAN:M.regex=D?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(j){return P(D?j:j.toUpperCase())};break;case $.WORDS:M.regex="(?:"+n.keys(A).concat("and","[\\-, ]").join("|")+")+",M.parse=function(j){return E(j.toLowerCase())};break;case $.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(j){let V=j;return T.ordinal&&(V=j.substring(0,j.length-2)),T.regular?V=V.split(",").join(""):T.groupingSeparators.forEach(H=>{V=V.split(H.character).join("")}),T.zeroCode!==48&&(V=V.split("").map(H=>String.fromCodePoint(H.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(V)};break;case $.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const D=se(M);return m(D).parse(T)}function Q(T,M){const D=q(M),j=m(D),V="^"+j.parts.map(ae=>"("+ae.regex+")").join("")+"$";var F=new RegExp(V,"i").exec(T);if(F!==null){const de=Object.create(null);for(let d=1;d<F.length;d++){const v=j.parts[d-1];v.parse&&(de[v.component]=v.parse(F[d]))}if(Object.getOwnPropertyNames(de).length===0)return;let ft=0;const Kt=d=>{ft<<=1,ft+=d?1:0},_t=d=>!(~d&ft)&&!!(d&ft);"YXMxWwdD".split("").forEach(d=>Kt(de[d]));const Pt=!_t(161)&&_t(130),_s=_t(84),$r=!_s&&_t(72);ft=0,"PHhmsf".split("").forEach(d=>Kt(de[d]));const Z=!_t(23)&&_t(47),Xt=(Pt?"YD":_s?"XxwF":$r?"XWF":"YMD")+(Z?"Phmsf":"Hmsf"),li=this.environment.timestamp;let hs=!1,ar=!1;if(Xt.split("").forEach(d=>{if(typeof de[d]>"u")hs?(de[d]="MDd".indexOf(d)!==-1?1:0,ar=!0):de[d]=ce(li,d);else if(hs=!0,ar)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,Pt){const d=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(d+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(_s)throw{code:"D3136"};if($r)throw{code:"D3136"};Z&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var Y=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(Y-=(de.Z||de.z)*60*1e3),Y}}var ye=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 _e(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!ye.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return Q.call(this,T,M)}function De(T,M,D){if(!(typeof T>"u"))return Pe.call(this,T,M,D)}return{formatInteger:C,parseInteger:_,fromMillis:De,toMillis:_e}})();r.exports=o},{"./utils":6}],2:[function(s,r,i){(function(n){(function(){var o=s("./utils");const c=(()=>{var h=o.isNumeric,b=o.isArrayOfStrings,k=o.isArrayOfNumbers,g=o.isSequence,f=o.isFunction,A=o.isLambda,E=o.isPromise,O=o.getFunctionArity,N=o.isDeepEqual,U=o.stringToArray;function P(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function I(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function $(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function G(a,l=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var S=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(x,L){return typeof L<"u"&&L!==null&&h(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},S)}return p}}function z(a,l,p){if(!(typeof a>"u")){var S=U(a),x=S.length;if(x+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:x+l+p;return S.slice(l,L).join("")}return S.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function se(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function q(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return U(a).length}function pe(a){if(!(typeof a>"u")){var l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function Ue(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var S;l=Math.trunc(l);var x=Math.abs(l)-le(a);if(x>0){var L=new Array(x+1).join(p);p.length>1&&(L=z(L,0,x)),l>0?S=a+L:S=L+a}else S=a;return S}}async function ue(a,l){var p=a.apply(this,[l]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function me(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var S=await ue(l,a);p=typeof S<"u"}return p}}async function ke(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var S=this.createSequence();if(typeof p>"u"||p>0){var x=0,L=await ue(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||x<p);)S.push({match:L.match,index:L.start,groups:L.groups}),L=await ue(L.next),x++}return S}}async function ce(a,l,p,S){if(!(typeof a>"u")){var x=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(S<0)throw{code:"D3011",stack:new Error().stack,value:S,index:4};var L;typeof p=="string"?L=function(We){for(var rt="",Le=0,Ze=p.indexOf("$",Le);Ze!==-1&&Le<p.length;){rt+=p.substring(Le,Ze),Le=Ze+1;var Yt=p.charAt(Le);if(Yt==="$")rt+="$",Le++;else if(Yt==="0")rt+=We.match,Le++;else{var xt;if(We.groups.length===0?xt=1:xt=Math.floor(Math.log(We.groups.length)*Math.LOG10E)+1,Ze=parseInt(p.substring(Le,Le+xt),10),xt>1&&Ze>We.groups.length&&(Ze=parseInt(p.substring(Le,Le+xt-1),10)),isNaN(Ze))rt+="$";else{if(We.groups.length>0){var ds=We.groups[Ze-1];typeof ds<"u"&&(rt+=ds)}Le+=Ze.toString().length}}Ze=p.indexOf("$",Le)}return rt+=p.substring(Le),rt}:L=p;var B="",K=0;if(typeof S>"u"||S>0){var we=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof S>"u"||we<S);)B+=a.substring(K,oe),B+=p,K=oe+l.length,we++,oe=a.indexOf(l,K);B+=a.substring(K)}else{var Fe=await ue(l,a);if(typeof Fe<"u"){for(;typeof Fe<"u"&&(typeof S>"u"||we<S);){B+=a.substring(K,Fe.start);var He=L.apply(x,[Fe]);if(E(He)&&(He=await He),typeof He=="string")B+=He;else throw{code:"D3012",stack:new Error().stack,value:He};K=Fe.start+Fe.match.length,we++,Fe=await ue(Fe.next)}B+=a.substring(K)}else B=a}}else B=a;return B}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function Pe(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function m(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function Q(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function ye(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function _e(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var S=[];if(typeof p>"u"||p>0)if(typeof l=="string")S=a.split(l,p);else{var x=0,L=await ue(l,a);if(typeof L<"u"){for(var B=0;typeof L<"u"&&(typeof p>"u"||x<p);)S.push(a.substring(B,L.start)),B=L.end,L=await ue(L.next),x++;(typeof p>"u"||x<p)&&S.push(a.substring(B))}else S.push(a)}return S}}function De(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var S={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},x=S;typeof p<"u"&&o.keys(p).forEach(function(ve){x[ve]=p[ve]});for(var L=[],B=x["zero-digit"].charCodeAt(0),K=B;K<B+10;K++)L.push(String.fromCharCode(K));var we=L.concat([x["decimal-separator"],x["exponent-separator"],x["grouping-separator"],x.digit,x["pattern-separator"]]),oe=l.split(x["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var Fe=function(ve){var Ye=(function(){for(var lt,zt=0;zt<ve.length;zt++)if(lt=ve.charAt(zt),we.indexOf(lt)!==-1&&lt!==x["exponent-separator"])return ve.substring(0,zt);return""})(),At=(function(){for(var lt,zt=ve.length-1;zt>=0;zt--)if(lt=ve.charAt(zt),we.indexOf(lt)!==-1&&lt!==x["exponent-separator"])return ve.substring(zt+1);return""})(),Ke=ve.substring(Ye.length,ve.length-At.length),Mt,Vs,It,lr,Rt=ve.indexOf(x["exponent-separator"],Ye.length);Rt===-1||Rt>ve.length-At.length?(Mt=Ke,Vs=void 0):(Mt=Ke.substring(0,Rt),Vs=Ke.substring(Rt+1));var Qt=Mt.indexOf(x["decimal-separator"]);return Qt===-1?(It=Mt,lr=At):(It=Mt.substring(0,Qt),lr=Mt.substring(Qt+1)),{prefix:Ye,suffix:At,activePart:Ke,mantissaPart:Mt,exponentPart:Vs,integerPart:It,fractionalPart:lr,subpicture:ve}},He=function(ve){var Ye,At,Ke=ve.subpicture,Mt=Ke.indexOf(x["decimal-separator"]);Mt!==Ke.lastIndexOf(x["decimal-separator"])&&(Ye="D3081"),Ke.indexOf(x.percent)!==Ke.lastIndexOf(x.percent)&&(Ye="D3082"),Ke.indexOf(x["per-mille"])!==Ke.lastIndexOf(x["per-mille"])&&(Ye="D3083"),Ke.indexOf(x.percent)!==-1&&Ke.indexOf(x["per-mille"])!==-1&&(Ye="D3084");var Vs=!1;for(At=0;At<ve.mantissaPart.length;At++){var It=ve.mantissaPart.charAt(At);if(L.indexOf(It)!==-1||It===x.digit){Vs=!0;break}}Vs||(Ye="D3085");var lr=ve.activePart.split("").map(function(lt){return we.indexOf(lt)===-1?"p":"a"}).join("");lr.indexOf("p")!==-1&&(Ye="D3086"),Mt!==-1?(Ke.charAt(Mt-1)===x["grouping-separator"]||Ke.charAt(Mt+1)===x["grouping-separator"])&&(Ye="D3087"):ve.integerPart.charAt(ve.integerPart.length-1)===x["grouping-separator"]&&(Ye="D3088"),Ke.indexOf(x["grouping-separator"]+x["grouping-separator"])!==-1&&(Ye="D3089");var Rt=ve.integerPart.indexOf(x.digit);Rt!==-1&&ve.integerPart.substring(0,Rt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ye="D3090"),Rt=ve.fractionalPart.lastIndexOf(x.digit),Rt!==-1&&ve.fractionalPart.substring(Rt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ye="D3091");var Qt=typeof ve.exponentPart=="string";if(Qt&&ve.exponentPart.length>0&&(Ke.indexOf(x.percent)!==-1||Ke.indexOf(x["per-mille"])!==-1)&&(Ye="D3092"),Qt&&(ve.exponentPart.length===0||ve.exponentPart.split("").filter(function(lt){return L.indexOf(lt)===-1}).length>0)&&(Ye="D3093"),Ye)throw{code:Ye,stack:new Error().stack}},We=function(ve){var Ye=function(gt,nn){for(var hi=[],Ps=gt.indexOf(x["grouping-separator"]);Ps!==-1;){var on=(nn?gt.substring(0,Ps):gt.substring(Ps)).split("").filter(function(Or){return L.indexOf(Or)!==-1||Or===x.digit}).length;hi.push(on),Ps=ve.integerPart.indexOf(x["grouping-separator"],Ps+1)}return hi},At=Ye(ve.integerPart),Ke=function(gt){if(gt.length===0)return 0;for(var nn=function(on,Or){return Or===0?on:nn(Or,on%Or)},hi=gt.reduce(nn),Ps=1;Ps<=gt.length;Ps++)if(gt.indexOf(Ps*hi)===-1)return 0;return hi},Mt=Ke(At),Vs=Ye(ve.fractionalPart,!0),It=ve.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,lr=It,Rt=ve.fractionalPart.split(""),Qt=Rt.filter(function(gt){return L.indexOf(gt)!==-1}).length,lt=Rt.filter(function(gt){return L.indexOf(gt)!==-1||gt===x.digit}).length,zt=typeof ve.exponentPart=="string";It===0&&lt===0&&(zt?(Qt=1,lt=1):It=1),zt&&It===0&&ve.integerPart.indexOf(x.digit)!==-1&&(It=1),It===0&&Qt===0&&(Qt=1);var bl=0;return zt&&(bl=ve.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:At,regularGrouping:Mt,minimumIntegerPartSize:It,scalingFactor:lr,prefix:ve.prefix,fractionalPartGroupingPositions:Vs,minimumFactionalPartSize:Qt,maximumFactionalPartSize:lt,minimumExponentSize:bl,suffix:ve.suffix,picture:ve.subpicture}},rt=oe.map(Fe);rt.forEach(He);var Le=rt.map(We),Ze=x["minus-sign"],Yt=x["zero-digit"],xt=x["decimal-separator"],ds=x["grouping-separator"];Le.length===1&&(Le.push(JSON.parse(JSON.stringify(Le[0]))),Le[1].prefix=Ze+Le[1].prefix);var it;a>=0?it=Le[0]:it=Le[1];var ci;it.picture.indexOf(x.percent)!==-1?ci=a*100:it.picture.indexOf(x["per-mille"])!==-1?ci=a*1e3:ci=a;var qs,Er;if(it.minimumExponentSize===0)qs=ci;else{var mg=Math.pow(10,it.scalingFactor),vg=Math.pow(10,it.scalingFactor-1);if(qs=ci,Er=0,qs!==0){for(;Math.abs(qs)<vg;)qs*=10,Er-=1;for(;Math.abs(qs)>mg;)qs/=10,Er+=1}}var yg=F(qs,it.maximumFactionalPartSize),fl=function(ve,Ye){var At=Math.abs(ve).toFixed(Ye);return Yt!=="0"&&(At=At.split("").map(function(Ke){return Ke>="0"&&Ke<="9"?L[Ke.charCodeAt(0)-48]:Ke}).join("")),At},Se=fl(yg,it.maximumFactionalPartSize),St=Se.indexOf(".");for(St===-1?Se=Se+xt:Se=Se.replace(".",xt);Se.charAt(0)===Yt;)Se=Se.substring(1);for(;Se.charAt(Se.length-1)===Yt;)Se=Se.substring(0,Se.length-1);St=Se.indexOf(xt);var ui=it.minimumIntegerPartSize-St,gl=it.minimumFactionalPartSize-(Se.length-St-1);if(Se=(ui>0?new Array(ui+1).join(Yt):"")+Se,Se=Se+(gl>0?new Array(gl+1).join(Yt):""),St=Se.indexOf(xt),it.regularGrouping>0)for(var wg=Math.floor((St-1)/it.regularGrouping),sn=1;sn<=wg;sn++)Se=[Se.slice(0,St-sn*it.regularGrouping),ds,Se.slice(St-sn*it.regularGrouping)].join("");else it.integerPartGroupingPositions.forEach(function(ve){Se=[Se.slice(0,St-ve),ds,Se.slice(St-ve)].join(""),St++});if(St=Se.indexOf(xt),it.fractionalPartGroupingPositions.forEach(function(ve){Se=[Se.slice(0,ve+St+1),ds,Se.slice(ve+St+1)].join("")}),St=Se.indexOf(xt),(it.picture.indexOf(xt)===-1||St===Se.length-1)&&(Se=Se.substring(0,Se.length-1)),typeof Er<"u"){var rn=fl(Er,0);ui=it.minimumExponentSize-rn.length,ui>0&&(rn=new Array(ui+1).join(Yt)+rn),Se=Se+x["exponent-separator"]+(Er<0?Ze:"")+rn}return Se=it.prefix+Se+it.suffix,Se}}function M(a,l){if(!(typeof a>"u")){if(a=F(a),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function D(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function j(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function H(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function F(a,l){var p;if(!(typeof a>"u")){if(l){var S=a.toString().split("e");a=+(S[0]+"e"+(S[1]?+S[1]+l:l))}p=Math.round(a);var x=p-a;return Math.abs(x)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(S=p.toString().split("e"),p=+(S[0]+"e"+(S[1]?+S[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function Y(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function xe(){return Math.random()}function ge(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=ge(a[0]);else if(a.length>1){var p=a.filter(function(S){return ge(S)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):h(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!ge(a)}function he(a,l,p,S){var x=[l],L=O(a);return L>=2&&x.push(p),L>=3&&x.push(S),x}async function $e(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),S=0;S<a.length;S++){var x=he(l,a[S],S,a),L=await l.apply(this,x);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),S=0;S<a.length;S++){var x=a[S],L=he(l,x,S,a),B=await l.apply(this,L);ge(B)&&p.push(x)}return p}}async function ft(a,l){if(!(typeof a>"u")){for(var p=!1,S,x=0;x<a.length;x++){var L=a[x],B=!0;if(typeof l<"u"){var K=he(l,L,x,a),we=await l.apply(this,K);B=ge(we)}if(B)if(!p)S=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:x}}if(!p)throw{stack:new Error().stack,code:"D3139"};return S}}function Kt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),S=0;S<p;S++){var x=l.map(L=>L[S]);a.push(x)}return a}async function _t(a,l,p){if(!(typeof a>"u")){var S,x=O(l);if(x<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(S=a[0],L=1):(S=p,L=0);L<a.length;){var B=[S,a[L]];x>=3&&B.push(L),x>=4&&B.push(a),S=await l.apply(this,B),L++}return S}}function st(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),S=0;S<a.length;S++){var x=st.call(this,a[S]);x.forEach(function(L){p[L]=!0})}l=st.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function Pt(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var S=0;S<a.length;S++){var x=Pt.call(this,a[S],l);typeof x<"u"&&(Array.isArray(x)?x.forEach(L=>p.push(L)):p.push(x))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,l)&&!f(a)&&(p=a[l]);return p}function _s(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function $r(a){return!(typeof a>"u")}function Dr(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=_s.call(this,l,Dr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!A(a))for(const x of o.keys(a)){var S=Object.create(null);S[x]=a[x],l.push(S)}else l=a;return l}function Z(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const S of o.keys(p))l[S]=p[S]}),l}}function en(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),S=0;S<l;S++)p[l-S-1]=a[S];return p}}async function tn(a,l){var p=this.createSequence();for(const L of o.keys(a)){var S=he(l,a[L],L,a),x=await l.apply(this,S);typeof x<"u"&&p.push(x)}return p}function Xt(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function li(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function hs(a){if(a!==void 0)return a===null?"null":h(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ar(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!k(a)&&!b(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(B,K){return B>K}}else p=l;var S=async function(B,K){var we=async function(Fe,He,We){He.length===0?Array.prototype.push.apply(Fe,We):We.length===0?Array.prototype.push.apply(Fe,He):await p(He[0],We[0])?(Fe.push(We[0]),await we(Fe,He,We.slice(1))):(Fe.push(He[0]),await we(Fe,He.slice(1),We))},oe=[];return await we(oe,B,K),oe},x=async function(B){if(!Array.isArray(B)||B.length<=1)return B;var K=Math.floor(B.length/2),we=B.slice(0,K),oe=B.slice(K);return we=await x(we),oe=await x(oe),await S(we,oe)},L=await x(a);return L}}function d(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var S=Math.floor(Math.random()*(p+1));p!==S&&(l[p]=l[S]),l[S]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=g(a)?this.createSequence():[],p=0;p<a.length;p++){for(var S=a[p],x=!1,L=0;L<l.length;L++)if(N(S,l[L])){x=!0;break}x||l.push(S)}return l}}async function w(a,l){var p=Object.create(null);for(const B of o.keys(a)){var S=a[B],x=he(l,S,B,a),L=await l.apply(this,x);ge(L)&&(p[B]=S)}return o.keys(p).length===0&&(p=void 0),p}return{sum:P,count:y,max:I,min:C,average:$,string:G,substring:z,substringBefore:ne,substringAfter:se,lowercase:ie,uppercase:q,length:le,trim:pe,pad:Ue,match:ke,contains:me,replace:ce,split:_e,join:De,formatNumber:T,formatBase:M,number:D,floor:V,ceil:H,round:F,abs:j,sqrt:Y,power:ae,random:xe,boolean:ge,not:fe,map:$e,zip:Kt,filter:de,single:ft,foldLeft:_t,sift:w,keys:st,lookup:Pt,append:_s,exists:$r,spread:Dr,merge:Z,reverse:en,each:tn,error:Xt,assert:li,type:hs,sort:ar,shuffle:d,distinct:v,base64encode:W,base64decode:Pe,encodeUrlComponent:m,encodeUrl:_,decodeUrlComponent:Q,decodeUrl:ye}})();r.exports=c}).call(this)}).call(this,typeof Zo<"u"?Zo:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,r,i){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),h=s("./parser"),b=s("./signature"),k=(function(){var g=c.isNumeric,f=c.isArrayOfStrings,A=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,N=c.isLambda,U=c.isIterable,P=c.isPromise,y=c.getFunctionArity,I=c.isDeepEqual,C=Xt(null);async function $(d,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(d,v,w),d.type){case"path":a=await G(d,v,w);break;case"binary":a=await le(d,v,w);break;case"unary":a=await pe(d,v,w);break;case"name":a=Ue(d,v,w);break;case"string":case"number":case"value":a=ue(d);break;case"wildcard":a=me(d,v,w);break;case"descendant":a=ce(d,v,w);break;case"parent":a=w.lookup(d.slot.label);break;case"condition":a=await V(d,v,w);break;case"block":a=await H(d,v,w);break;case"bind":a=await j(d,v,w);break;case"regex":a=F(d,v,w);break;case"function":a=await he(d,v,w);break;case"variable":a=Y(d,v,w);break;case"lambda":a=ft(d,v,w);break;case"partial":a=await Kt(d,v,w);break;case"apply":a=await fe(d,v,w);break;case"transform":a=xe(d,v,w);break}if(Object.prototype.hasOwnProperty.call(d,"predicate"))for(var p=0;p<d.predicate.length;p++)a=await q(d.predicate[p].expr,a,w);d.type!=="path"&&Object.prototype.hasOwnProperty.call(d,"group")&&(a=await T(d.group,a,w));var S=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return S&&await S(d,v,w,a),a&&E(a)&&!a.tupleStream&&(d.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function G(d,v,w){var a;Array.isArray(v)&&d.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,S=void 0,x=0;x<d.steps.length;x++){var L=d.steps[x];if(L.tuple&&(p=!0),x===0&&L.consarray?l=await $(L,a,w):p?S=await ie(L,a,S,w):l=await ne(L,a,w,x===d.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(d.tuple)l=S;else for(l=w.base.createSequence(),x=0;x<S.length;x++)l.push(S[x]["@"]);return d.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(d,"group")&&(l=await T(d.group,p?S:l,w)),l}function z(d,v){var w=Xt(d);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(d,v,w,a){var l;if(d.type==="sort")return l=await ae(d,v,w),d.stages&&(l=await se(d.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var S=await $(d,v[p],w);if(d.stages)for(var x=0;x<d.stages.length;x++)S=await q(d.stages[x].expr,S,w);typeof S<"u"&&l.push(S)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(B){!Array.isArray(B)||B.cons?L.push(B):Array.prototype.forEach.call(B,K=>L.push(K))}),L}async function se(d,v,w){for(var a=v,l=0;l<d.length;l++){var p=d[l];switch(p.type){case"filter":a=await q(p.expr,a,w);break;case"index":for(var S=0;S<a.length;S++){var x=a[S];x[p.value]=S}break}}return a}async function ie(d,v,w,a){var l;if(d.type==="sort"){if(w)l=await ae(d,w,a);else{var p=await ae(d,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var S=0;S<p.length;S++){var x={"@":p[S]};x[d.index]=S,l.push(x)}}return d.stages&&(l=await se(d.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var B=0;B<w.length;B++){L=z(a,w[B]);var K=await $(d,w[B]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var we=0;we<K.length;we++)x=Object.create(null),Object.assign(x,w[B]),K.tupleStream?Object.assign(x,K[we]):(d.focus?(x[d.focus]=K[we],x["@"]=w[B]["@"]):x["@"]=K[we],d.index&&(x[d.index]=we),d.ancestor&&(x[d.ancestor.label]=w[B]["@"])),l.push(x)}}return d.stages&&(l=await se(d.stages,l,a)),l}async function q(d,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),d.type==="number"){var l=Math.floor(d.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],S=p,x=w;v.tupleStream&&(S=p["@"],x=z(w,p));var L=await $(d,S,x);g(L)&&(L=[L]),A(L)?Array.prototype.forEach.call(L,function(K){var we=Math.floor(K);we<0&&(we=v.length+we),we===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(d,v,w){var a,l=await $(d.lhs,v,w),p=d.value,S=async()=>await $(d.rhs,v,w);if(p==="and"||p==="or")try{return await ye(l,S,p)}catch(L){throw L.position=d.position,L.token=p,L}var x=await S();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=Pe(l,x,p);break;case"=":case"!=":a=m(l,x,p);break;case"<":case"<=":case">":case">=":a=_(l,x,p);break;case"&":a=De(l,x);break;case"..":a=D(l,x,w);break;case"in":a=Q(l,x);break}}catch(L){throw L.position=d.position,L.token=p,L}return a}async function pe(d,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(d.value){case"-":if(a=await $(d.expression,v,w),typeof a>"u")a=void 0;else if(g(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:d.position,token:d.value,value:a};break;case"[":a=[];let x=await Promise.all(d.expressions.map(async(L,B)=>(w.isParallelCall=B>0,[L,await $(L,v,w)])));for(let L of x){var[p,S]=L;typeof S<"u"&&(p.value==="["?a.push(S):a=o.append.call(l,a,S))}d.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(d,v,w);break}return a}function Ue(d,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,d.value)}function ue(d){return d.value}function me(d,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var S=v[p];Array.isArray(S)?(S=ke(S),l=o.append.call(a,l,S)):l.push(S)}),l}function ke(d,v){return typeof v>"u"&&(v=[]),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){ke(w,v)}):v.push(d),v}function ce(d,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(d,v){Array.isArray(d)||v.push(d),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){W(w,v)}):d!==null&&typeof d=="object"&&!O(d)&&c.keys(d).forEach(function(w){W(d[w],v)})}function Pe(d,v,w){var a;if(typeof d<"u"&&!g(d))throw{code:"T2001",stack:new Error().stack,value:d};if(typeof v<"u"&&!g(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u")return a;switch(w){case"+":a=d+v;break;case"-":a=d-v;break;case"*":a=d*v;break;case"/":a=d/v;break;case"%":a=d%v;break}return a}function m(d,v,w){var a,l=typeof d,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=I(d,v);break;case"!=":a=!I(d,v);break}return a}function _(d,v,w){var a,l=typeof d,p=typeof v,S=l==="undefined"||l==="string"||l==="number",x=p==="undefined"||p==="string"||p==="number";if(!S||!x)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:d};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:d,value2:v};switch(w){case"<":a=d<v;break;case"<=":a=d<=v;break;case">":a=d>v;break;case">=":a=d>=v;break}return a}}function Q(d,v){var w=!1;if(typeof d>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===d){w=!0;break}return w}async function ye(d,v,w){var a,l=_e(d);switch(w){case"and":a=l&&_e(await v());break;case"or":a=l||_e(await v());break}return a}function _e(d){var v=o.boolean(d);return typeof v>"u"?!1:v}function De(d,v){var w,a="",l="";return typeof d<"u"&&(a=o.string(d)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(d,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),S={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=S.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var x=0;x<v.length;x++)for(var L=v[x],B=p?z(w,L):w,K=0;K<d.lhs.length;K++){var we=d.lhs[K],oe=await $(we[0],p?L["@"]:L,B);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:d.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:d.position,value:oe};var Fe={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:d.position,value:oe};l[oe].data=o.append.call(S,l[oe].data,L)}else l[oe]=Fe}}let He=await Promise.all(c.keys(l).map(async(rt,Le)=>{let Ze=l[rt];var Yt=Ze.data,xt=w;if(p){var ds=M(Ze.data,w);Yt=ds["@"],delete ds["@"],xt=z(w,ds)}return w.isParallelCall=Le>0,[rt,await $(d.lhs[Ze.exprIndex][1],Yt,xt)]}));for(let rt of He){var[oe,We]=await rt;typeof We<"u"&&(a[oe]=We)}return a}function M(d,v){if(!Array.isArray(d))return d;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,d[0]);for(var l=1;l<d.length;l++)for(const p of c.keys(d[l]))w[p]=o.append.call(a,w[p],d[l][p]);return w}function D(d,v,w){var a;if(typeof d<"u"&&!Number.isInteger(d))throw{code:"T2003",stack:new Error().stack,value:d};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u"||d>v)return a;var l=v-d+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=d,S=0;p<=v;p++,S++)a[S]=p;return a.sequence=!0,a}async function j(d,v,w){var a=await $(d.rhs,v,w);return w.bind(d.lhs.value,a),a}async function V(d,v,w){var a,l=await $(d.condition,v,w);return o.boolean(l)?a=await $(d.then,v,w):typeof d.else<"u"&&(a=await $(d.else,v,w)),a}async function H(d,v,w){for(var a,l=Xt(w),p=0;p<d.expressions.length;p++)a=await $(d.expressions[p],v,l);return a}function F(d,v,w){var a=new w.base.RegexEngine(d.value),l=function(p,S){var x;a.lastIndex=S||0;var L=a.exec(p);if(L!==null){if(x={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var B=1;B<L.length;B++)x.groups.push(L[B]);x.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:d.position,value:d.value.source};return K}}}return x};return l}function Y(d,v,w){var a;return d.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(d.value),a}async function ae(d,v,w){var a,l=v,p=!!v.tupleStream,S=async function(L,B){for(var K=0,we=0;K===0&&we<d.terms.length;we++){var oe=d.terms[we],Fe=L,He=w;p&&(Fe=L["@"],He=z(w,L));var We=await $(oe.expression,Fe,He);Fe=B,He=w,p&&(Fe=B["@"],He=z(w,B));var rt=await $(oe.expression,Fe,He),Le=typeof We,Ze=typeof rt;if(Le==="undefined"){K=Ze==="undefined"?0:1;continue}if(Ze==="undefined"){K=-1;continue}if(!(Le==="string"||Le==="number")||!(Ze==="string"||Ze==="number"))throw{code:"T2008",stack:new Error().stack,position:d.position,value:Le==="string"||Le==="number"?rt:We};if(Le!==Ze)throw{code:"T2007",stack:new Error().stack,position:d.position,value:We,value2:rt};We!==rt&&(We<rt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},x={environment:w,input:v};return a=await o.sort.apply(x,[l,S]),a}function xe(d,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:d.position};var S=await $e(p,[l],null,w),x=await $(d.pattern,S,w);if(typeof x<"u"){Array.isArray(x)||(x=[x]);for(var L=0;L<x.length;L++){var B=x[L],K=await $(d.update,B,w),we=typeof K;if(we!=="undefined"){if(we!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:d.update.position,value:K};for(const We of c.keys(K))B[We]=K[We]}if(typeof d.delete<"u"){var oe=await $(d.delete,B,w);if(typeof oe<"u"){var Fe=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:d.delete.position,value:Fe};for(var He=0;He<oe.length;He++)typeof B=="object"&&B!==null&&delete B[oe[He]]}}}}return S}};return Z(a,"<(oa):o>")}var ge=h("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(d,v,w){var a,l=await $(d.lhs,v,w);if(d.rhs.type==="function")a=await he(d.rhs,v,w,{context:l});else{var p=await $(d.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:d.position,value:p};if(O(l)){var S=await $(ge,null,w);a=await $e(S,[l,p],null,w)}else a=await $e(p,[l],null,w)}return a}async function he(d,v,w,a){var l,p=await $(d.procedure,v,w);if(typeof p>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};var S=[];typeof a<"u"&&S.push(a.context);for(var x=0;x<d.arguments.length;x++){const B=await $(d.arguments[x],v,w);if(O(B)){const K=async function(...we){return await $e(B,we,null,w)};K.arity=y(B),S.push(K)}else S.push(B)}var L=d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=d.position),l=await $e(p,S,v,w)}catch(B){throw B.position||(B.position=d.position),B.token||(B.token=L),B}return l}async function $e(d,v,w,a){var l;for(l=await de(d,v,w,a);N(l)&&l.thunk===!0;){var p=await $(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var S=[],x=0;x<l.body.arguments.length;x++)S.push(await $(l.body.arguments[x],l.input,l.environment));l=await de(p,S,w,a)}return l}async function de(d,v,w,a){var l;try{var p=v;if(d&&(p=_t(d.signature,v,w)),N(d))l=await st(d,p);else if(d&&d._jsonata_function===!0){var S={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=d.implementation.apply(S,p),U(l)&&(l=l.next().value),P(l)&&(l=await l)}else if(typeof d=="function")l=d.apply(w,p),P(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(x){throw d&&(typeof x.token>"u"&&typeof d.token<"u"&&(x.token=d.token),x.position=d.position||x.position),x}return l}function ft(d,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:d.arguments,signature:d.signature,body:d.body};return d.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await $e(a,p,v,l?l.environment:w)},a}async function Kt(d,v,w){for(var a,l=[],p=0;p<d.arguments.length;p++){var S=d.arguments[p];S.type==="operator"&&S.value==="?"?l.push(S):l.push(await $(S,v,w))}var x=await $(d.procedure,v,w);if(typeof x>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};if(N(x))a=Pt(x,l,w);else if(x&&x._jsonata_function===!0)a=_s(x.implementation,l,w);else if(typeof x=="function")a=_s(x,l,w);else throw{code:"T1008",stack:new Error().stack,position:d.position,token:d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value};return a}function _t(d,v,w){if(typeof d>"u")return v;var a=d.validate(v,w);return a}async function st(d,v){var w,a=Xt(d.environment);return Array.prototype.forEach.call(d.arguments,function(l,p){a.bind(l.value,v[p])}),typeof d.body=="function"?w=await $r(d.body,a):w=await $(d.body,d.input,a),w}function Pt(d,v,w){var a=Xt(d.environment||w),l=[];Array.prototype.forEach.call(d.arguments,function(S,x){var L=v[x];L&&L.type==="operator"&&L.value==="?"?l.push(S):a.bind(S.value,L)});var p={_jsonata_lambda:!0,input:d.input,environment:a,arguments:l,body:d.body};return p}function _s(d,v,w){var a=Dr(d);a=a.map(function(x){return"$"+x.trim()});var l="function("+a.join(", ")+"){ _ }",p=h(l);p.body=d;var S=Pt(p,v,w);return S}async function $r(d,v){var w=Dr(d),a=w.map(function(S){return v.lookup(S.trim())}),l={environment:v,createSequence:v.base.createSequence},p=d.apply(l,a);return P(p)&&(p=await p),p}function Dr(d){var v=d.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function Z(d,v){var w={_jsonata_function:!0,implementation:d};return typeof v<"u"&&(w.signature=b(v)),w}async function en(d,v){if(!(typeof d>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=h(d,!1)}catch(p){throw hs(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await $(a,w,this.environment)}catch(p){throw hs(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function tn(d){if(!(typeof d>"u"))return JSON.parse(o.string(d))}function Xt(d){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:d&&(p=d.lookup(l)),p},timestamp:d?d.timestamp:null,async:d?d.async:!1,isParallelCall:d?d.isParallelCall:!1,global:d?d.global:{ancestry:[null]}};if(d){var a=d.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(d,w),w.base=d.base}return w}C.bind("sum",Z(o.sum,"<a<n>:n>")),C.bind("count",Z(o.count,"<a:n>")),C.bind("max",Z(o.max,"<a<n>:n>")),C.bind("min",Z(o.min,"<a<n>:n>")),C.bind("average",Z(o.average,"<a<n>:n>")),C.bind("string",Z(o.string,"<x-b?:s>")),C.bind("substring",Z(o.substring,"<s-nn?:s>")),C.bind("substringBefore",Z(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",Z(o.substringAfter,"<s-s:s>")),C.bind("lowercase",Z(o.lowercase,"<s-:s>")),C.bind("uppercase",Z(o.uppercase,"<s-:s>")),C.bind("length",Z(o.length,"<s-:n>")),C.bind("trim",Z(o.trim,"<s-:s>")),C.bind("pad",Z(o.pad,"<s-ns?:s>")),C.bind("match",Z(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",Z(o.contains,"<s-(sf):b>")),C.bind("replace",Z(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",Z(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",Z(o.join,"<a<s>s?:s>")),C.bind("formatNumber",Z(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",Z(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",Z(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",Z(n.parseInteger,"<s-s:n>")),C.bind("number",Z(o.number,"<(nsb)-:n>")),C.bind("floor",Z(o.floor,"<n-:n>")),C.bind("ceil",Z(o.ceil,"<n-:n>")),C.bind("round",Z(o.round,"<n-n?:n>")),C.bind("abs",Z(o.abs,"<n-:n>")),C.bind("sqrt",Z(o.sqrt,"<n-:n>")),C.bind("power",Z(o.power,"<n-n:n>")),C.bind("random",Z(o.random,"<:n>")),C.bind("boolean",Z(o.boolean,"<x-:b>")),C.bind("not",Z(o.not,"<x-:b>")),C.bind("map",Z(o.map,"<af>")),C.bind("zip",Z(o.zip,"<a+>")),C.bind("filter",Z(o.filter,"<af>")),C.bind("single",Z(o.single,"<af?>")),C.bind("reduce",Z(o.foldLeft,"<afj?:j>")),C.bind("sift",Z(o.sift,"<o-f?:o>")),C.bind("keys",Z(o.keys,"<x-:a<s>>")),C.bind("lookup",Z(o.lookup,"<x-s:x>")),C.bind("append",Z(o.append,"<xx:a>")),C.bind("exists",Z(o.exists,"<x:b>")),C.bind("spread",Z(o.spread,"<x-:a<o>>")),C.bind("merge",Z(o.merge,"<a<o>:o>")),C.bind("reverse",Z(o.reverse,"<a:a>")),C.bind("each",Z(o.each,"<o-f:a>")),C.bind("error",Z(o.error,"<s?:x>")),C.bind("assert",Z(o.assert,"<bs?:x>")),C.bind("type",Z(o.type,"<x:s>")),C.bind("sort",Z(o.sort,"<af?:a>")),C.bind("shuffle",Z(o.shuffle,"<a:a>")),C.bind("distinct",Z(o.distinct,"<x:x>")),C.bind("base64encode",Z(o.base64encode,"<s-:s>")),C.bind("base64decode",Z(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",Z(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",Z(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",Z(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",Z(o.decodeUrl,"<s-:s>")),C.bind("eval",Z(en,"<sx?:x>")),C.bind("toMillis",Z(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",Z(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",Z(tn,"<(oa)-:o>"));var li={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}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",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 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",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 hs(d){var v=li[d.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return d[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(d[arguments[1]])}),d.message=w}}function ar(d,v){var w,a;try{w=h(d,v&&v.recover),a=w.errors,delete w.errors}catch(S){throw hs(S),S}var l=Xt(C),p=new Date;return l.bind("now",Z(function(S,x){return n.fromMillis(p.getTime(),S,x)},"<s?s?:s>")),l.bind("millis",Z(function(){return p.getTime()},"<:n>")),{evaluate:async function(S,x,L){if(typeof a<"u"){var B={code:"S0500",position:0};throw hs(B),B}const K=Xt(l);for(const oe of c.keys(x))K.bind(oe,x[oe]);if(K.bind("$",S),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...Fe){if(oe.length+Fe.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,Fe)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(S)&&!E(S)&&(S=K.createSequence(S),S.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var we;try{return we=await $(w,S,K),typeof L=="function"&&L(null,we),we}catch(oe){throw hs(oe),oe}},assign:function(S,x){l.bind(S,x)},registerFunction:function(S,x,L){var B=Z(x,L);l.bind(S,B)},ast:function(){return w},errors:function(){return a}}}return ar.parser=h,ar})();r.exports=k},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,r,i){var n=s("./signature");const o=(()=>{var c={".":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,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
- `,r:"\r",t:" "},b=function(g){var f=0,A=g.length,E=function(U,P){var y={type:U,value:P,position:f};return y},O=function(){for(var U=f,P=0,y,I,C=function(G){if(g.charAt(G)==="/"&&P===0){for(var z=0;g.charAt(G-(z+1))==="\\";)z++;if(z%2===0)return!0}return!1};f<A;){var $=g.charAt(f);if(C(f)){if(y=g.substring(U,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,$=g.charAt(f),U=f;$==="i"||$==="m";)f++,$=g.charAt(f);return I=g.substring(U,f)+"g",new RegExp(y,I)}($==="("||$==="["||$==="{")&&g.charAt(f-1)!=="\\"&&P++,($===")"||$==="]"||$==="}")&&g.charAt(f-1)!=="\\"&&P--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},N=function(U){if(f>=A)return null;for(var P=g.charAt(f);f<A&&`
74
- \r\v`.indexOf(P)>-1;)f++,P=g.charAt(f);if(P==="/"&&g.charAt(f+1)==="*"){var y=f;for(f+=2,P=g.charAt(f);!(P==="*"&&g.charAt(f+1)==="/");)if(P=g.charAt(++f),f>=A)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,P=g.charAt(f),N(U)}if(U!==!0&&P==="/")return f++,E("regex",O());if(P==="."&&g.charAt(f+1)===".")return f+=2,E("operator","..");if(P===":"&&g.charAt(f+1)==="=")return f+=2,E("operator",":=");if(P==="!"&&g.charAt(f+1)==="=")return f+=2,E("operator","!=");if(P===">"&&g.charAt(f+1)==="=")return f+=2,E("operator",">=");if(P==="<"&&g.charAt(f+1)==="=")return f+=2,E("operator","<=");if(P==="*"&&g.charAt(f+1)==="*")return f+=2,E("operator","**");if(P==="~"&&g.charAt(f+1)===">")return f+=2,E("operator","~>");if(P==="?"&&g.charAt(f+1)===":")return f+=2,E("operator","?:");if(P==="?"&&g.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(c,P))return f++,E("operator",P);if(P==='"'||P==="'"){var I=P;f++;for(var C="";f<A;){if(P=g.charAt(f),P==="\\")if(f++,P=g.charAt(f),Object.prototype.hasOwnProperty.call(h,P))C+=h[P];else if(P==="u"){var $=g.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test($)){var G=parseInt($,16);C+=String.fromCharCode(G),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:P};else{if(P===I)return f++,E("string",C);C+=P}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var z=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=z.exec(g.substring(f));if(ne!==null){var se=parseFloat(ne[0]);if(!isNaN(se)&&isFinite(se))return f+=ne[0].length,E("number",se);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(P==="`"){f++;var q=g.indexOf("`",f);if(q!==-1)return ie=g.substring(f,q),f=q+1,E("name",ie);throw f=A,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=g.charAt(le),le===A||`
75
- \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(g.charAt(f)==="$")return ie=g.substring(f+1,le),f=le,E("variable",ie);switch(ie=g.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===A&&ie===""?null:E("name",ie)}}else le++};return N},k=function(g,f){var A,E,O=Object.create(null),N=[],U=function(){var m=[];A.id!=="(end)"&&m.push({type:A.type,value:A.value,position:A.position});for(var _=E();_!==null;)m.push(_),_=E();return m},P={nud:function(){var m={code:"S0211",token:this.value,position:this.position};if(f)return m.remaining=U(),m.type="error",N.push(m),m;throw m.stack=new Error().stack,m}},y=function(m,_){var Q=O[m];return _=_||0,Q?_>=Q.lbp&&(Q.lbp=_):(Q=Object.create(P),Q.id=Q.value=m,Q.lbp=_,O[m]=Q),Q},I=function(m){if(f){m.remaining=U(),N.push(m);var _=O["(error)"];return A=Object.create(_),A.error=m,A.type="(error)",A}else throw m.stack=new Error().stack,m},C=function(m,_){if(m&&A.id!==m){var Q;A.id==="(end)"?Q="S0203":Q="S0202";var ye={code:Q,position:A.position,token:A.value,value:m};return I(ye)}var _e=E(_);if(_e===null)return A=O["(end)"],A.position=g.length,A;var De=_e.value,T=_e.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[De],!M)return I({code:"S0204",stack:new Error().stack,position:_e.position,token:De});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return I({code:"S0205",stack:new Error().stack,position:_e.position,token:De})}return A=Object.create(M),A.value=De,A.type=T,A.position=_e.position,A},$=function(m){var _,Q=A;for(C(null,!0),_=Q.nud();m<A.lbp;)Q=A,C(),_=Q.led(_);return _},G=function(m){var _=y(m,0);_.nud=function(){return this}},z=function(m,_,Q){var ye=_||c[m],_e=y(m,ye);return _e.led=Q||function(De){return this.lhs=De,this.rhs=$(ye),this.type="binary",this},_e},ne=function(m,_,Q){var ye=y(m,_);return ye.led=Q,ye},se=function(m,_){var Q=y(m);return Q.nud=_||function(){return this.expression=$(70),this.type="unary",this},Q};G("(end)"),G("(name)"),G("(literal)"),G("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),z("."),z("+"),z("-"),z("*"),z("/"),z("%"),z("="),z("<"),z(">"),z("!="),z("<="),z(">="),z("&"),z("and"),z("or"),z("in"),G("and"),G("or"),G("in"),se("-"),z("~>"),z("??",c["??"],function(m){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(m))]},this.then=m,this.else=$(0),this}),ne("(error)",10,function(m){return this.lhs=m,this.error=A.error,this.remaining=U(),this.type="error",this}),se("*",function(){return this.type="wildcard",this}),se("**",function(){return this.type="descendant",this}),se("%",function(){return this.type="parent",this}),z("(",c["("],function(m){if(this.procedure=m,this.type="function",this.arguments=[],A.id!==")")for(;A.type==="operator"&&A.id==="?"?(this.type="partial",this.arguments.push(A),C("?")):this.arguments.push($(0)),A.id===",";)C(",");if(C(")",!0),m.type==="name"&&(m.value==="function"||m.value==="λ")){if(this.arguments.forEach(function(De,T){if(De.type!=="variable")return I({code:"S0208",stack:new Error().stack,position:De.position,token:De.value,value:T+1})}),this.type="lambda",A.id==="<"){for(var _=A.position,Q=1,ye="<";Q>0&&A.id!=="{"&&A.id!=="(end)";){var _e=C();_e.id===">"?Q--:_e.id==="<"&&Q++,ye+=_e.value}C(">");try{this.signature=n(ye)}catch(De){return De.position=_+De.offset,I(De)}}C("{"),this.body=$(0),C("}")}return this}),se("(",function(){for(var m=[];A.id!==")"&&(m.push($(0)),A.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=m,this}),se("[",function(){var m=[];if(A.id!=="]")for(;;){var _=$(0);if(A.id===".."){var Q={type:"binary",value:"..",position:A.position,lhs:_};C(".."),Q.rhs=$(0),_=Q}if(m.push(_),A.id!==",")break;C(",")}return C("]",!0),this.expressions=m,this.type="unary",this}),z("[",c["["],function(m){if(A.id==="]"){for(var _=m;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),m}else return this.lhs=m,this.rhs=$(c["]"]),this.type="binary",C("]",!0),this}),z("^",c["^"],function(m){C("(");for(var _=[];;){var Q={descending:!1};if(A.id==="<"?C("<"):A.id===">"&&(Q.descending=!0,C(">")),Q.expression=$(0),_.push(Q),A.id!==",")break;C(",")}return C(")"),this.lhs=m,this.rhs=_,this.type="binary",this});var ie=function(m){var _=[];if(A.id!=="}")for(;;){var Q=$(0);C(":");var ye=$(0);if(_.push([Q,ye]),A.id!==",")break;C(",")}return C("}",!0),typeof m>"u"?(this.lhs=_,this.type="unary"):(this.lhs=m,this.rhs=_,this.type="binary"),this};se("{",ie),z("{",c["{"],ie),ne(":=",c[":="],function(m){return m.type!=="variable"?I({code:"S0212",stack:new Error().stack,position:m.position,token:m.value}):(this.lhs=m,this.rhs=$(c[":="]-1),this.type="binary",this)}),z("@",c["@"],function(m){return this.lhs=m,this.rhs=$(c["@"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),z("#",c["#"],function(m){return this.lhs=m,this.rhs=$(c["#"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),z("?",c["?"],function(m){return this.type="condition",this.condition=m,this.then=$(0),A.id===":"&&(C(":"),this.else=$(0)),this}),z("?:",c["?:"],function(m){return this.type="condition",this.condition=JSON.parse(JSON.stringify(m)),this.then=m,this.else=$(0),this}),se("|",function(){return this.type="transform",this.pattern=$(0),C("|"),this.update=$(0),A.id===","&&(C(","),this.delete=$(0)),C("|"),this});var q=function(m){var _;if(m.type==="function"&&!m.predicate){var Q={type:"lambda",thunk:!0,arguments:[],position:m.position};Q.body=m,_=Q}else if(m.type==="condition")m.then=q(m.then),typeof m.else<"u"&&(m.else=q(m.else)),_=m;else if(m.type==="block"){var ye=m.expressions.length;ye>0&&(m.expressions[ye-1]=q(m.expressions[ye-1])),_=m}else _=m;return _},le=0,pe=0,Ue=[],ue=function(m,_){switch(m.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof m.ancestor>"u"||(Ue[_.index].slot.label=m.ancestor.label),m.ancestor=_,m.tuple=!0);break;case"parent":_.level++;break;case"block":m.expressions.length>0&&(m.tuple=!0,_=ue(m.expressions[m.expressions.length-1],_));break;case"path":m.tuple=!0;var Q=m.steps.length-1;for(_=ue(m.steps[Q--],_);_.level>0&&Q>=0;)_=ue(m.steps[Q--],_);break;default:throw{code:"S0217",token:m.type,position:m.position}}return _},me=function(m,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var Q=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&Q.push(_.slot),typeof m.seekingParent>"u"?m.seekingParent=Q:Array.prototype.push.apply(m.seekingParent,Q)}},ke=function(m){var _=m.steps.length-1,Q=m.steps[_],ye=typeof Q.seekingParent<"u"?Q.seekingParent:[];Q.type==="parent"&&ye.push(Q.slot);for(var _e=0;_e<ye.length;_e++){var De=ye[_e];for(_=m.steps.length-2;De.level>0;){if(_<0){typeof m.seekingParent>"u"?m.seekingParent=[De]:m.seekingParent.push(De);break}for(var T=m.steps[_--];_>=0&&T.focus&&m.steps[_].focus;)T=m.steps[_--];De=ue(T,De)}}},ce=function(m){var _;switch(m.type){case"binary":switch(m.value){case".":var Q=ce(m.lhs);Q.type==="path"?_=Q:_={type:"path",steps:[Q]},Q.type==="parent"&&(_.seekingParent=[Q.slot]);var ye=ce(m.rhs);ye.type==="path"?Array.prototype.push.apply(_.steps,ye.steps):(typeof ye.predicate<"u"&&(ye.stages=ye.predicate,delete ye.predicate),_.steps.push(ye)),_.steps.filter(function(Y){if(Y.type==="number"||Y.type==="value")throw{code:"S0213",stack:new Error().stack,position:Y.position,value:Y.value};return Y.type==="string"}).forEach(function(Y){Y.type="name"}),_.steps.filter(function(Y){return Y.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var _e=_.steps[0];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0);var De=_.steps[_.steps.length-1];De.type==="unary"&&De.value==="["&&(De.consarray=!0),ke(_);break;case"[":_=ce(m.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:m.position};typeof T[M]>"u"&&(T[M]=[]);var D=ce(m.rhs);typeof D.seekingParent<"u"&&(D.seekingParent.forEach(Y=>{Y.level===1?ue(T,Y):Y.level--}),me(T,D)),T[M].push({type:"filter",expr:D,position:m.position});break;case"{":if(_=ce(m.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:m.position};_.group={lhs:m.rhs.map(function(Y){return[ce(Y[0]),ce(Y[1])]}),position:m.position};break;case"^":_=ce(m.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var j={type:"sort",position:m.position};j.terms=m.rhs.map(function(Y){var ae=ce(Y.expression);return me(j,ae),{descending:Y.descending,expression:ae}}),_.steps.push(j),ke(_);break;case":=":_={type:"bind",value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),me(_,_.rhs);break;case"@":if(_=ce(m.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:m.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:m.position};m.keepArray&&(T.keepArray=!0),T.focus=m.rhs.value,T.tuple=!0;break;case"#":_=ce(m.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=m.rhs.value:T.stages.push({type:"index",value:m.rhs.value,position:m.position}),T.tuple=!0;break;case"~>":_={type:"apply",value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:m.type,value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),me(_,_.lhs),me(_,_.rhs)}break;case"unary":_={type:m.type,value:m.value,position:m.position},m.value==="["?_.expressions=m.expressions.map(function(Y){var ae=ce(Y);return me(_,ae),ae}):m.value==="{"?_.lhs=m.lhs.map(function(Y){var ae=ce(Y[0]);me(_,ae);var xe=ce(Y[1]);return me(_,xe),[ae,xe]}):(_.expression=ce(m.expression),m.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):me(_,_.expression));break;case"function":case"partial":_={type:m.type,name:m.name,value:m.value,position:m.position},_.arguments=m.arguments.map(function(Y){var ae=ce(Y);return me(_,ae),ae}),_.procedure=ce(m.procedure);break;case"lambda":_={type:m.type,arguments:m.arguments,signature:m.signature,position:m.position};var V=ce(m.body);_.body=q(V);break;case"condition":_={type:m.type,position:m.position},_.condition=ce(m.condition),me(_,_.condition),_.then=ce(m.then),me(_,_.then),typeof m.else<"u"&&(_.else=ce(m.else),me(_,_.else));break;case"transform":_={type:m.type,position:m.position},_.pattern=ce(m.pattern),_.update=ce(m.update),typeof m.delete<"u"&&(_.delete=ce(m.delete));break;case"block":_={type:m.type,position:m.position},_.expressions=m.expressions.map(function(Y){var ae=ce(Y);return me(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[m]},m.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},Ue.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=m;break;case"operator":if(m.value==="and"||m.value==="or"||m.value==="in")m.type="name",_=ce(m);else if(m.value==="?")_=m;else throw{code:"S0201",stack:new Error().stack,position:m.position,token:m.value};break;case"error":_=m,m.lhs&&(_=ce(m.lhs));break;default:var H="S0206";m.id==="(end)"&&(H="S0207");var F={code:H,position:m.position,token:m.value};if(f)return N.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return m.keepArray&&(_.keepArray=!0),_};E=b(g),C();var W=$(0);if(A.id!=="(end)"){var Pe={code:"S0201",position:A.position,token:A.value};I(Pe)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return N.length>0&&(W.errors=N),W};return k})();r.exports=o},{"./signature":5}],5:[function(s,r,i){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function h(b){for(var k=1,g=[],f=Object.create(null),A=f;k<b.length;){var E=b.charAt(k);if(E===":")break;var O=function(){g.push(f),A=f,f=Object.create(null)},N=function(z,ne,se,ie){for(var q=1,le=ne;le<z.length;)if(le++,E=z.charAt(le),E===ie){if(q--,q===0)break}else E===se&&q++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":A.context=!0,A.contextRegex=new RegExp(A.regex),A.regex+="?";break;case"?":case"+":A.regex+=E;break;case"(":var U=N(b,k,"(",")"),P=b.substring(k+1,U);if(P.indexOf("<")===-1)f.regex="["+P+"m]";else throw{code:"S0402",stack:new Error().stack,value:P,offset:k};f.type="("+P+")",k=U,O();break;case"<":if(A.type==="a"||A.type==="f"){var y=N(b,k,"<",">");A.subtype=b.substring(k+1,y),k=y}else throw{code:"S0401",stack:new Error().stack,value:A.type,offset:k};break}k++}var I="^"+g.map(function(z){return"("+z.regex+")"}).join("")+"$",C=new RegExp(I),$=function(z){var ne;if(n.isFunction(z))ne="f";else{var se=typeof z;switch(se){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":z===null?ne="l":Array.isArray(z)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},G=function(z,ne){for(var se="^",ie=0,q=0;q<g.length;q++){se+=g[q].regex;var le=ne.match(se);if(le===null)throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1}};return{definition:b,validate:function(z,ne){var se="";z.forEach(function(pe){se+=$(pe)});var ie=C.exec(se);if(ie){var q=[],le=0;return g.forEach(function(pe,Ue){var ue=z[le],me=ie[Ue+1];if(me==="")if(pe.context&&pe.contextRegex){var ke=$(ne);if(pe.contextRegex.test(ke))q.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else q.push(ue),le++;else me.split("").forEach(function(ce){if(ue=z[le],pe.type==="a"){if(ce==="m")ue=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&me!==pe.subtype)W=!1;else if(ce==="a"&&ue.length>0){var Pe=$(ue[0]);if(Pe!==pe.subtype.charAt(0))W=!1;else{var m=ue.filter(function(_){return $(_)!==Pe});W=m.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:ue,index:le+1,type:c[pe.subtype]};ce!=="a"&&(ue=[ue])}q.push(ue),le++}else q.push(ue),le++})}),q}G(z,se)}}}return h})();r.exports=o},{"./utils":6}],6:[function(s,r,i){const n=(()=>{function o(y){var I=!1;if(typeof y=="number"&&(I=!isNaN(y),I&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return I}function c(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return typeof C!="string"}).length===0),I}function h(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return!o(C)}).length===0),I}function b(y){return y.sequence===!0&&Array.isArray(y)}function k(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function g(y){var I=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return I}function f(y){return y&&y._jsonata_lambda===!0}var A=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&A in y&&"next"in y&&typeof y.next=="function"}function O(y,I){if(y===I)return!0;if(typeof y=="object"&&typeof I=="object"&&y!==null&&I!==null){if(Array.isArray(y)&&Array.isArray(I)){if(y.length!==I.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],I[C]))return!1;return!0}var $=Object.getOwnPropertyNames(y),G=Object.getOwnPropertyNames(I);if($.length!==G.length)return!1;for($=$.sort(),G=G.sort(),C=0;C<$.length;C++)if($[C]!==G[C])return!1;for(C=0;C<$.length;C++){var z=$[C];if(!O(y[z],I[z]))return!1}return!0}return!1}function N(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function U(y){var I=[];for(let C of y)I.push(C);return I}function P(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:h,isSequence:b,isFunction:k,isLambda:f,isIterable:E,getFunctionArity:g,isDeepEqual:O,stringToArray:U,isPromise:N,keys:P}})();r.exports=n},{}]},{},[3])(3)})})($n)),$n.exports}var Nc=Ic();const Fc=Jo(Nc);function Dn(t){return typeof t!="string"?null:t.trim()||null}function jc(t){if(t==null||t==="")return null;if(typeof t=="string")return Dn(t);if(typeof t!="object")return null;const e=t;return Dn(e.url)??Dn(e.blobUrl)}function En(t){return Array.isArray(t)&&t.length>0&&t.every(e=>typeof e=="number"&&Number.isFinite(e))}function ea(t,e){if(!En(t)||!En(e)||t.length!==e.length)return null;let s=0,r=0,i=0;for(let n=0;n<t.length;n++)s+=t[n]*e[n],r+=t[n]*t[n],i+=e[n]*e[n];return!r||!i?null:s/Math.sqrt(r*i)}function Rc(t,e,s,r=10,i=-1){if(!Array.isArray(t)||!Array.isArray(e)||!En(s))return[];const n=[];return t.forEach((o,c)=>{const h=ea(e[c],s);if(h===null||h<i)return;const b=o&&typeof o=="object"?o:{value:o};n.push({...b,_score:Math.round(h*1e4)/1e4})}),n.sort((o,c)=>c._score-o._score),n.slice(0,Math.max(0,r))}function zc(t){t.registerFunction("ucFirst",e=>Tr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",r="EUR")=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(r)}).format(i)}),t.registerFunction("percent",(e,s="fr-FR",r=0)=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(r)||0}).format(i)}),t.registerFunction("date",(e,s="fr-FR",r)=>{const i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e??"");let n={dateStyle:"medium"};if(r)try{n=JSON.parse(String(r))}catch{}return new Intl.DateTimeFormat(String(s),n).format(i)}),t.registerFunction("toChart",(e,s="label",r="value",i="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const h of n){if(!h||typeof h!="object")continue;const b=h;o.push(String(b[String(s)]??"")),c.push(Number(b[String(r)]??0))}return{labels:o,datasets:[{label:String(i||""),data:c}]}}),t.registerFunction("cosine",(e,s)=>ea(e,s)),t.registerFunction("rankBySimilarity",(e,s,r,i=10,n=-1)=>Rc(e,s,r,Number(i),Number(n))),t.registerFunction("mediaUrl",e=>jc(e))}const ta=new Map,sa=8e3;function Uc(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>sa)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${sa}).`);const e=ta.get(t);if(e)return e;try{const s=Fc(t);return zc(s),ta.set(t,s),s}catch(s){const r=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${r}`)}}function qc(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${Vc(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const r=t;for(const i of e.required)if(typeof i=="string"&&!(i in r))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${i}".`)}}function Vc(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const Bc=150,ra=10,Hc=200,Wc=16,ia=new WeakMap;let na=!1;function fs(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function mr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function Kc(t,e,s){if(t===window){window.scrollTo(e,s);return}const r=t;typeof r.scrollTo=="function"?r.scrollTo(e,s):(r.scrollLeft=e,r.scrollTop=s)}function Yc(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Gs(t){let e=ia.get(t);if(!e){const s=mr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},ia.set(t,e)}return e}function Ti(t){Gs(t).userEngaged=!0}function Li(t){const e=Gs(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Bc)}function oa(t,e){return e-t>=Hc}function vr(t){if(!fs())return;const e=Gs(t);if(e.restoring)return;const s=mr(t);if(oa(s.y,e.y)){Tn(t);return}e.x=s.x,e.y=s.y}function On(t){if(!fs())return;const e=Gs(t),s=Yc(t),r=e.x,i=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=mr(t);if(!(Math.abs(r-n)<=ra&&Math.abs(i-o)<=ra)){e.restoring=!0;try{Kc(t,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Gc(t,e={x:0,y:0}){if(!fs())return;const s=Gs(t);if(e==="current"){const r=mr(t);s.x=r.x,s.y=r.y;return}s.x=e.x??0,s.y=e.y??0}function Tn(t){const e=Gs(t);if(e.stickyFrames=Wc,e.raf)return;const s=()=>{e.raf=0,On(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function Ln(t){Tn(t)}function Zs(t){if(!fs())return;const e=Gs(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,r=()=>{if(e.restoring)return;const{y:E}=mr(t);if(oa(E,e.y)){Tn(t);return}if(e.userEngaged){vr(t),Li(t);return}vr(t)},i=E=>aa(E)===t,n=E=>{i(E)&&(vr(t),Ti(t))},o=E=>{i(E)&&Li(t)},c=E=>{i(E)&&(vr(t),Ti(t),Li(t))};s.addEventListener("scroll",r,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const h=mr(t);if(e.x=h.x,e.y=h.y,t===window){const E=new ResizeObserver(()=>Ln(window));E.observe(document.documentElement),e.resizeObserver=E;return}const b=t,k=new ResizeObserver(()=>Ln(b));k.observe(b);for(const E of Array.from(b.children))k.observe(E);e.resizeObserver=k;const g=()=>Ln(b),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const N of Array.from(O.addedNodes))N instanceof Element&&k.observe(N);g()});f.observe(b,{childList:!0,subtree:!0,characterData:!0});const A=b.getRootNode();A instanceof ShadowRoot&&A.host&&f.observe(A.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function aa(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&la(e))return e;return window}function la(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Mn(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&la(s)&&Zs(s);const e=aa(t);Zs(e),t.type==="wheel"?(vr(e),Ti(e),Li(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(vr(e),Ti(e))}function Mi(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Zs(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Zs(e)})}function In(t){Mi(t),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&Mi(i)}).observe(t,{childList:!0,subtree:!0})}function Nn(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(In(e.shadowRoot),Nn(e.shadowRoot))})}function Zc(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(r){const i=e.call(this,r);return In(i),i}}function ca(){if(typeof window>"u"||na||(na=!0,!fs()))return;Zs(window),Zc();const t={capture:!0,passive:!0};window.addEventListener("wheel",Mn,t),window.addEventListener("touchstart",Mn,t),window.addEventListener("pointerdown",Mn,t);const e=()=>{Mi(document),Nn(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(Mi(n),n.shadowRoot&&In(n.shadowRoot),Nn(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Jc=_l,Xc=_c,Qc=vi,eu=Tr,gs=Je,tu=ct,Br=at,su=Ds,ru=ps;ca(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Jc,Arrays:Xc,DataBindObserver:Qc,Format:eu,HTML:gs,LocationHandler:tu,Objects:Br,PublisherManager:be,api:su,URLPattern:ru,Endpoint:ki,DataProviderKey:Ss};var iu=Object.defineProperty,nu=Object.getOwnPropertyDescriptor,Hr=(t,e,s,r)=>{for(var i=r>1?void 0:r?nu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&iu(e,s,i),i};const Fn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const r=this.getAttribute("name"),i=this.getCheckAllPublisher(),n=this.getFormPublisher();if(i?.hasCheckAll.get()&&!this.checksAll()&&i&&n&&r){if(this.getFormPublisherValue()?.length)(this.checked===null||i.checkMode.get()=="noneChecked"||i.checkMode.get()==null)&&i.checkMode.set("someUnchecked");else{i.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=i.values.get();if(c&&c.length){let h=c.length;for(const b of c)o.indexOf(b)==-1&&(h-=1);h==c.length&&i.checkMode.set("allChecked"),h==0&&i.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=r=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),r=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),r=="noneChecked"&&(this.checked=null),r=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(r){if(this.value==r||(this.hasAttribute("value")&&!this.forceAutoFill&&(r=this.getAttribute("value")),this._value==r)||r==null||(this._value=r,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==r?!0:null),Array.isArray(n)||(n=[]),n.indexOf(r)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(r){if(this.setCheckedValue(r),this.checksAll()){const i=this.getCheckAllPublisher();i&&(this.checked===!0?i.checkMode.set("allChecked"):this.checked===null&&(i.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();if(i){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;i.isFormValid=!1,r.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(r){this._checked!=r&&(this._checked=r,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const r=this.checked===!0?this.radio?!0:null:!0;this.checked=r;const i=new Event("change");this.dispatchEvent(i)}getValueForFormPublisher(){let r=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:r;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(r)||(r=[]);const i=r.slice(0),n=i.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&i.push(this.value),this.checked===null&&n!==-1&&i.splice(n,1),i}setFormValueFromPublisher(r){if(this.unique||this.radio){this.checked=this.value==r?!0:null;return}Array.isArray(r)||(r=[]),!this.checksAll()&&(this.checked=r.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const r=this.formDataProvider,i=this.getAttribute("name");return!r||!i?null:be.get(r+"/"+i+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const r=this.getCheckAllPublisher();if(r&&(r.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const i=r.values.get().slice(0),n=i.indexOf(this.value);n!=-1&&(i.splice(n,1),r.values.set(i))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const i=this.getCheckAllPublisher();i&&(i.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&i.hasCheckAll.set(!0),i.values.get()||i.values.set([]),this.checksAll()||i.values.set([...i.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return Hr([u()],e.prototype,"value",1),Hr([u()],e.prototype,"forceAutoFill",2),Hr([u({type:Boolean})],e.prototype,"unique",2),Hr([u({type:Boolean})],e.prototype,"radio",2),Hr([u()],e.prototype,"checked",1),e};/**
72
+ */const ia="important",Wc=" !"+ia,$t=Os(class extends br{constructor(t){if(super(t),t.type!==Qs.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return r==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(Wc);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?ia:""):s[r]=i}}return Nt}});var Kc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,Jt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Kc(e,s,i),i};const Di=new Map,yr=t=>{class e extends t{constructor(...r){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.formDataProvider="",this._name="",this._value="",this.onFormValueAssign=async i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(r){return Ge.getAncestorAttributeValue(this,r)!=null}getAncestorAttributeValue(r){return Ge.getAncestorAttributeValue(this,r)||""}get name(){return this._name}set name(r){this.hasAttribute("name")&&!this.forceAutoFill&&(r=this.getAttribute("name")),this._name=r,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),this.formDataProvider?me.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&qt(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?qt(r,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),lt.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&r&&qt(r,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),r=this.getFormPublisher(),this._name&&r&&(qt(r,this._name).onAssign(this.onFormValueAssign),r.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),i&&(this.value=i)}handleBlur(){this.touched=!0}handleChange(r){this.value=r.target.value;const i=new Event("change");this.dispatchEvent(i)}addKeyboardNavigation(){const r=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!r)return;const i=r.split(" "),n=i[0];if(!n)return;for(const c of i){Di.has(c)||Di.set(c,[]);const h=Di.get(c);h?.indexOf(this)==-1&&h.push(this)}const o=Di.get(n);this.addEventListener("keydown",c=>{const h=c;if(!["ArrowDown","ArrowUp"].includes(h.key))return;const g="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",A=o?.filter(k=>{const E=k.shadowRoot?.querySelector(g);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let m=null;if(h.key=="ArrowDown"&&A){const k=A.indexOf(this);k==A.length-1?m=A[0]:m=A[k+1]}else if(h.key=="ArrowUp"&&A){const k=A.indexOf(this);k==0?m=A[A.length-1]:m=A[k-1]}const f=m?.shadowRoot?.querySelector(g);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),super.connectedCallback(),this.initFormPublisher(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback();const r=this.getFormPublisher();this._name&&r&&(qt(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return Jt([u({type:Boolean,reflect:!0})],e.prototype,"touched",2),Jt([u({type:Boolean})],e.prototype,"error",2),Jt([u({type:Boolean})],e.prototype,"autofocus",2),Jt([u({type:Boolean})],e.prototype,"required",2),Jt([u({type:Boolean})],e.prototype,"forceAutoFill",2),Jt([u({type:Boolean,reflect:!0})],e.prototype,"disabled",2),Jt([u({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Jt([u({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Jt([u({type:String})],e.prototype,"formDataProvider",2),Jt([u()],e.prototype,"name",1),Jt([u()],e.prototype,"value",1),e};let Yc=class dr{static areEqual(e,s){return e.length===s.length?e.every((r,i)=>r===s[i]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const r=(e[0]||{})[s];return e.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>dr.from(e.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>dr.from(e.map(s)),filter:s=>dr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of e){const o=n[s];if(!i.has(o)){const c=r.length;i.set(o,c);const h={items:[]};h[s]=o,r.push(h)}r[i.get(o)].items.push(n)}return dr.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(e.map(i=>i[s]))];return dr.from(r.map(i=>e.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>c=>n[o]!=c[o];return dr.from(e.filter(n=>s.every(i(n,r))))}})})})}}};var na=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wr={exports:{}},Zc=Wr.exports,aa;function Jc(){return aa||(aa=1,(function(t,e){var s=[].slice;(function(r,i){return e!==null?t.exports=i():r.UrlPattern=i()})(Zc,function(){var r,i,n,o,c,h,g,A,m,f,k,E,O,z,B;return m=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},g=function(S,y){var F,C,D;for(D=[],F=-1,C=S.length;++F<C;)D=D.concat(y(S[F]));return D},z=function(S,y){var F,C,D;for(D="",F=-1,C=S.length;++F<C;)D+=y(S[F]);return D},O=function(S){return new RegExp(S.toString()+"|").exec("").length-1},k=function(S,y){var F,C,D,Y,j;for(Y={},F=-1,D=S.length;++F<D;)C=S[F],j=y[F],j!=null&&(Y[C]!=null?(Array.isArray(Y[C])||(Y[C]=[Y[C]]),Y[C].push(j)):Y[C]=j);return Y},r={},r.Result=function(S,y){this.value=S,this.rest=y},r.Tagged=function(S,y){this.tag=S,this.value=y},r.tag=function(S,y){return function(F){var C,D;if(C=y(F),C!=null)return D=new r.Tagged(S,C.value),new r.Result(D,C.rest)}},r.regex=function(S){return function(y){var F,C;if(F=S.exec(y),F!=null)return C=F[0],new r.Result(C,y.slice(C.length))}},r.sequence=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var F,C,D,Y,j,ne;for(F=-1,C=S.length,ne=[],Y=y;++F<C;){if(D=S[F],j=D(Y),j==null)return;ne.push(j.value),Y=j.rest}return new r.Result(ne,Y)}},r.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(F){var C,D;if(D=r.sequence.apply(r,y)(F),D!=null)return C=D.value,D.value=C[S],D}},r.string=function(S){var y;return y=S.length,function(F){if(F.slice(0,y)===S)return new r.Result(S,F.slice(y))}},r.lazy=function(S){var y;return y=null,function(F){return y==null&&(y=S()),y(F)}},r.baseMany=function(S,y,F,C,D){var Y,j,ne,re;for(ne=D,re=F?"":[];!(y!=null&&(Y=y(ne),Y!=null)||(j=S(ne),j==null));)F?re+=j.value:re.push(j.value),ne=j.rest;if(!(C&&re.length===0))return new r.Result(re,ne)},r.many1=function(S){return function(y){return r.baseMany(S,null,!1,!0,y)}},r.concatMany1Till=function(S,y){return function(F){return r.baseMany(S,y,!0,!0,F)}},r.firstChoice=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var F,C,D,Y;for(F=-1,C=S.length;++F<C;)if(D=S[F],Y=D(y),Y!=null)return Y}},E=function(S){var y;return y={},y.wildcard=r.tag("wildcard",r.string(S.wildcardChar)),y.optional=r.tag("optional",r.pick(1,r.string(S.optionalSegmentStartChar),r.lazy(function(){return y.pattern}),r.string(S.optionalSegmentEndChar))),y.name=r.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=r.tag("named",r.pick(1,r.string(S.segmentNameStartChar),r.lazy(function(){return y.name}))),y.escapedChar=r.pick(1,r.string(S.escapeChar),r.regex(/^./)),y.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return y.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(S.segmentNameStartChar),r.string(S.optionalSegmentStartChar),r.string(S.optionalSegmentEndChar),y.wildcard))),y.token=r.lazy(function(){return r.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=r.many1(r.lazy(function(){return y.token})),y},A={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},h=function(S,y){if(Array.isArray(S))return z(S,function(F){return h(F,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return m(S.value);case"optional":return"(?:"+h(S.value,y)+")?"}},c=function(S,y){return y==null&&(y=A.segmentValueCharset),"^"+h(S,y)+"$"},o=function(S){if(Array.isArray(S))return g(S,o);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return o(S.value)}},f=function(S,y,F,C){var D,Y,j,ne;if(C==null&&(C=!1),ne=S[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if(D=F[y]||0,Y=Array.isArray(ne)?ne.length-1:0,D>Y){if(C)throw new Error("too few values provided for key `"+y+"`");return}return j=Array.isArray(ne)?ne[D]:ne,C&&(F[y]=D+1),j},n=function(S,y,F){var C,D;if(Array.isArray(S)){for(C=-1,D=S.length;++C<D;)if(n(S[C],y,F))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",F,!1)!=null;case"named":return f(y,S.value,F,!1)!=null;case"static":return!1;case"optional":return n(S.value,y,F)}},B=function(S,y,F){if(Array.isArray(S))return z(S,function(C){return B(C,y,F)});switch(S.tag){case"wildcard":return f(y,"_",F,!0);case"named":return f(y,S.value,F,!0);case"static":return S.value;case"optional":return n(S.value,y,F)?B(S.value,y,F):""}},i=function(S,y){var F,C,D,Y,j;if(S instanceof i){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(F=O(this.regex),y.length!==F)throw new Error("regex contains "+F+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(j=S.replace(/\s+/g,""),j!==S)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||A.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||A.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||A.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||A.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||A.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||A.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||A.wildcardChar},Y=E(C),D=Y.pattern(S),D==null)throw new Error("couldn't parse pattern");if(D.rest!=="")throw new Error("could only partially parse pattern");this.ast=D.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(S){var y,F;return F=this.regex.exec(S),F==null?null:(y=F.slice(1),this.names?k(this.names,y):y)},i.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return B(this.ast,S,{})},i.escapeForRegex=m,i.concatMap=g,i.stringConcatMap=z,i.regexGroupCount=O,i.keysAndValuesToObject=k,i.P=r,i.newParser=E,i.defaultOptions=A,i.astNodeToRegexString=c,i.astNodeToNames=o,i.getParam=f,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=B,i})})(Wr,Wr.exports)),Wr.exports}var Qc=Jc();const gs=oa(Qc);class Ei{constructor(e){this.path=Ei.normalizePath(e)}getDataProviderKey(){return new $s(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let h;try{h=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return h.pathname=h.pathname.replace(/\/+/g,"/"),h.href}const r=s.indexOf("?"),i=s.indexOf("#");let n=s.length;r>=0&&(n=Math.min(n,r)),i>=0&&(n=Math.min(n,i));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const Xc=50,eu=1e4,tu=100,Tn=new Map;function Oi(t){return mi(t)}function Kr(t){return t.split(".")[0]??t}function Ti(t){const e=t.split("."),s=e.shift();let r=me.get(s);return e.length&&(r=lt.traverse(r,e)),r}function su(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function ru(t){return Array.isArray(t)?t.length:0}function iu(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Kr(t),r=new Map;for(const[o,c]of Tn)r.set(Kr(o),new Set(c));r.set(s,new Set(e.map(Kr)));const i=new Set,n=o=>{if(i.has(o))return!0;i.add(o);for(const c of r.get(o)??[])if(n(c))return!0;return i.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function nu(t,e){Tn.set(t,new Set(e.map(s=>Kr(s))))}function ou(t){Tn.delete(t)}function au(t){return`${Kr(Oi(t))}/_state_`}function Li(t,e){const s=au(t);me.get(s).set(e)}function lu(t,e,s,r){const i=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:r},n=i.debounceMs??Xc,o=i.maxInputItems??eu,c=i.isEmpty??su,h=Oi(i.output),g=Object.entries(i.inputs).map(([ie,U])=>({alias:ie,path:Oi(U)})),A=g.map(ie=>ie.path),m=i.variables?Oi(i.variables):null;iu(h,A),nu(h,A);const f=Ti(h);let k,E=!1,O=0,z=null,B=!1,S="";const y=ie=>{E=!0,k=ie,f.set(ie),E=!1},F=()=>{E||B||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${h}".`),k!==void 0&&(E=!0,f.set(k),E=!1))};f.onAssign(F,!1);const C=()=>{const ie={};for(const{alias:U,path:le}of g){const pe=Ti(le).get(),qe=ru(pe);qe>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${qe} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[U]=pe}return ie},D=()=>m?Ti(m).get()??{}:{},Y=async()=>{if(B)return;const ie=++O;Li(h,{status:"loading",error:null});const U=C(),le=D(),pe=JSON.stringify({inputs:U,vars:le});if(pe===S&&k!==void 0){Li(h,{status:c(k)?"empty":"ready",error:null});return}const qe=typeof performance<"u"?performance.now():Date.now();try{const ue=await Promise.resolve(i.compute(U,le));if(B||ie!==O)return;const be=(typeof performance<"u"?performance.now():Date.now())-qe;be>tu&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(be)} ms) → "${h}".`),S=pe,y(ue),Li(h,{status:c(ue)?"empty":"ready",error:null})}catch(ue){if(B||ie!==O)return;const be=ue instanceof Error?ue.message:String(ue);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${h}" :`,be),Li(h,{status:"error",error:be})}},j=()=>{B||(z&&clearTimeout(z),z=setTimeout(()=>{z=null,Y()},n))},ne=[],re=ie=>{const U=Ti(ie),le=()=>j();U.onInternalMutation(le),ne.push({pub:U,handler:le})};for(const{path:ie}of g)re(ie);return m&&re(m),j(),{stop(){if(!B){B=!0,z&&clearTimeout(z);for(const{pub:ie,handler:U}of ne)ie.offInternalMutation(U);f.offAssign(F),ou(h)}},recompute(){S="",Y()}}}function Mi(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ln={exports:{}},la;function cu(){return la||(la=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(r,i,n){function o(g,A){if(!i[g]){if(!r[g]){var m=typeof Mi=="function"&&Mi;if(!A&&m)return m(g,!0);if(c)return c(g,!0);var f=new Error("Cannot find module '"+g+"'");throw f.code="MODULE_NOT_FOUND",f}var k=i[g]={exports:{}};r[g][0].call(k.exports,function(E){var O=r[g][1][E];return o(O||E)},k,k.exports,s,r,i,n)}return i[g].exports}for(var c=typeof Mi=="function"&&Mi,h=0;h<n.length;h++)o(n[h]);return o}return s})()({1:[function(s,r,i){const n=s("./utils"),o=(function(){const c=n.stringToArray,h=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],g=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],A=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],m=["Thousand","Million","Billion","Trillion"];function f(T,M){var $=function(q,V,I){var G="";if(q<=19)G=(V?" and ":"")+(I?g[q]:h[q]);else if(q<100){const Ce=Math.floor(q/10),ge=q%10;G=(V?" and ":"")+A[Ce-2],ge>0?G+="-"+$(ge,!1,I):I&&(G=G.substring(0,G.length-1)+"ieth")}else if(q<1e3){const Ce=Math.floor(q/100),ge=q%100;G=(V?", ":"")+h[Ce]+" Hundred",ge>0?G+=$(ge,!0,I):I&&(G+="th")}else{var ae=Math.floor(Math.log10(q)/3);ae>m.length&&(ae=m.length);const Ce=Math.pow(10,ae*3),ge=Math.floor(q/Ce),fe=q-ge*Ce;G=(V?", ":"")+$(ge,!1,!1)+" "+m[ae-1],fe>0?G+=$(fe,!0,I):I&&(G+="th")}return G},N=$(T,!1,M);return N}const k=Object.create(null);h.forEach(function(T,M){k[T.toLowerCase()]=M}),g.forEach(function(T,M){k[T.toLowerCase()]=M}),A.forEach(function(T,M){const $=T.toLowerCase();k[$]=(M+2)*10,k[$.substring(0,T.length-1)+"ieth"]=k[$]}),k.hundredth=100,m.forEach(function(T,M){const $=T.toLowerCase(),N=Math.pow(10,(M+1)*3);k[$]=N,k[$+"th"]=N});function E(T){const $=T.split(/,\s|\sand\s|[\s\\-]/).map(V=>k[V]);let N=[0];return $.forEach(V=>{if(V<100){let I=N.pop();I>=1e3&&(N.push(I),I=0),N.push(I+V)}else N.push(N.pop()*V)}),N.reduce((V,I)=>V+I,0)}const O=[[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"]],z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function B(T){for(var M=0;M<O.length;M++){const $=O[M];if(T>=$[0])return $[1]+B(T-$[0])}return""}function S(T){for(var M=0,$=1,N=T.length-1;N>=0;N--){const q=T[N],V=z[q];V<$?M-=V:($=V,M+=V)}return M}function y(T,M){for(var $=[],N=M.charCodeAt(0);T>0;)$.unshift(String.fromCharCode((T-1)%26+N)),T=Math.floor((T-1)/26);return $.join("")}function F(T,M){for(var $=M.charCodeAt(0),N=0,q=0;q<T.length;q++)N+=(T.charCodeAt(T.length-q-1)-$+1)*Math.pow(26,q);return N}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const $=re(M);return j(T,$)}const D={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},Y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function j(T,M){let $;const N=T<0;switch(T=Math.abs(T),M.primary){case D.LETTERS:$=y(T,M.case===Y.UPPER?"A":"a");break;case D.ROMAN:$=B(T),M.case===Y.UPPER&&($=$.toUpperCase());break;case D.WORDS:$=f(T,M.ordinal),M.case===Y.UPPER?$=$.toUpperCase():M.case===Y.LOWER&&($=$.toLowerCase());break;case D.DECIMAL:$=""+T;var q=M.mandatoryDigits-$.length;if(q>0){var V=new Array(q+1).join("0");$=V+$}if(M.zeroCode!==48&&($=c($).map(Ce=>String.fromCodePoint(Ce.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const Ce=Math.floor(($.length-1)/M.groupingSeparators.position);for(let ge=Ce;ge>0;ge--){const fe=$.length-ge*M.groupingSeparators.position;$=$.substr(0,fe)+M.groupingSeparators.character+$.substr(fe)}}else M.groupingSeparators.reverse().forEach(Ce=>{const ge=$.length-Ce.position;$=$.substr(0,ge)+Ce.character+$.substr(ge)});if(M.ordinal){var I={1:"st",2:"nd",3:"rd"},G=$[$.length-1],ae=I[G];(!ae||$.length>1&&$[$.length-2]==="1")&&(ae="th"),$=$+ae}break;case D.SEQUENCE:throw{code:"D3130",value:M.token}}return N&&($="-"+$),$}const ne=[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 re(T){const M={type:"integer",primary:D.DECIMAL,case:Y.LOWER,ordinal:!1};let $,N;const q=T.lastIndexOf(";");switch(q===-1?$=T:($=T.substring(0,q),N=T.substring(q+1),N[0]==="o"&&(M.ordinal=!0)),$){case"A":M.case=Y.UPPER;case"a":M.primary=D.LETTERS;break;case"I":M.case=Y.UPPER;case"i":M.primary=D.ROMAN;break;case"W":M.case=Y.UPPER,M.primary=D.WORDS;break;case"Ww":M.case=Y.TITLE,M.primary=D.WORDS;break;case"w":M.primary=D.WORDS;break;default:{let V=null,I=0,G=0,ae=[],Ce=0;if(c($).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let he=!1;for(let De=0;De<ne.length;De++){const de=ne[De];if(fe>=de&&fe<=de+9){if(he=!0,I++,Ce++,V===null)V=de;else if(de!==V)throw{code:"D3131"};break}}he||(fe===35?(Ce++,G++):ae.push({position:Ce,character:String.fromCodePoint(fe)}))}),I>0){M.primary=D.DECIMAL,M.zeroCode=V,M.mandatoryDigits=I,M.optionalDigits=G;const he=function(De){if(De.length===0)return 0;const de=De[0].character;for(let it=1;it<De.length;it++)if(De[it].character!==de)return 0;const ft=De.map(it=>it.position),Yt=function(it,St){return St===0?it:Yt(St,it%St)},_t=ft.reduce(Yt);for(let it=1;it<=ft.length;it++)if(ft.indexOf(it*_t)===-1)return 0;return _t}(ae);he>0?(M.regular=!0,M.groupingSeparators={position:he,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=D.SEQUENCE,M.token=$}}return M}const ie={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 U(T){var M=[];const $={type:"datetime",parts:M},N=function(he,De){if(De>he){let de=T.substring(he,De);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var q=0,V=0;V<T.length;){if(T.charAt(V)==="["){if(T.charAt(V+1)==="["){N(q,V),M.push({type:"literal",value:"["}),V+=2,q=V;continue}if(N(q,V),q=V,V=T.indexOf("]",q),V===-1)throw{code:"D3135"};let he=T.substring(q+1,V);he=he.split(/\s+/).join("");var I={type:"marker",component:he.charAt(0)},G=he.lastIndexOf(","),ae;if(G!==-1){const De=he.substring(G+1),de=De.indexOf("-");let ft,Yt;const _t=function(St){if(!(typeof St>"u"||St==="*"))return parseInt(St)};de===-1?ft=De:(ft=De.substring(0,de),Yt=De.substring(de+1));const it={min:_t(ft),max:_t(Yt)};I.width=it,ae=he.substring(1,G)}else ae=he.substring(1);if(ae.length===1)I.presentation1=ae;else if(ae.length>1){var Ce=ae.charAt(ae.length-1);"atco".indexOf(Ce)!==-1?(I.presentation2=Ce,Ce==="o"&&(I.ordinal=!0),I.presentation1=ae.substring(0,ae.length-1)):I.presentation1=ae}else I.presentation1=ie[I.component];if(typeof I.presentation1>"u")throw{code:"D3132",value:I.component};if(I.presentation1[0]==="n")I.names=Y.LOWER;else if(I.presentation1[0]==="N")I.presentation1[1]==="n"?I.names=Y.TITLE:I.names=Y.UPPER;else if("YMDdFWwXxHhmsf".indexOf(I.component)!==-1){var ge=I.presentation1;if(I.presentation2&&(ge+=";"+I.presentation2),I.integerFormat=re(ge),I.width&&I.width.min!==void 0&&I.integerFormat.mandatoryDigits<I.width.min&&(I.integerFormat.mandatoryDigits=I.width.min),I.component==="Y")if(I.n=-1,I.width&&I.width.max!==void 0)I.n=I.width.max,I.integerFormat.mandatoryDigits=I.n;else{var fe=I.integerFormat.mandatoryDigits+I.integerFormat.optionalDigits;fe>=2&&(I.n=fe)}const De=M[M.length-1];De&&De.integerFormat&&(De.integerFormat.parseWidth=De.integerFormat.mandatoryDigits)}(I.component==="Z"||I.component==="z")&&(I.integerFormat=re(I.presentation1)),M.push(I),q=V+1}V++}return N(q,V),$}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],qe=1e3*60*60*24,ue=function(T){const M=Date.UTC(T.year,T.month);var $=new Date(M).getUTCDay();return $===0&&($=7),$>4?M+(8-$)*qe:M-($-1)*qe},be=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?be(T+1,0):be(T,M+1)},previousMonth:function(){return M===0?be(T-1,11):be(T,M-1)},nextYear:function(){return be(T+1,M)},previousYear:function(){return be(T-1,M)}}},$e=function(T,M){return(M-T)/(qe*7)+1},ce=(T,M)=>{let $;switch(M){case"Y":$=T.getUTCFullYear();break;case"M":$=T.getUTCMonth()+1;break;case"D":$=T.getUTCDate();break;case"d":{const N=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),q=Date.UTC(T.getUTCFullYear(),0);$=(N-q)/qe+1;break}case"F":$=T.getUTCDay(),$===0&&($=7);break;case"W":{const N=be(T.getUTCFullYear(),0),q=ue(N),V=Date.UTC(N.year,T.getUTCMonth(),T.getUTCDate());let I=$e(q,V);if(I>52){const G=ue(N.nextYear());V>=G&&(I=1)}else if(I<1){const G=ue(N.previousYear());I=$e(G,V)}$=Math.floor(I);break}case"w":{const N=be(T.getUTCFullYear(),T.getUTCMonth()),q=ue(N),V=Date.UTC(N.year,N.month,T.getUTCDate());let I=$e(q,V);if(I>4){const G=ue(N.nextMonth());V>=G&&(I=1)}else if(I<1){const G=ue(N.previousMonth());I=$e(G,V)}$=Math.floor(I);break}case"X":{const N=be(T.getUTCFullYear(),0),q=ue(N),V=ue(N.nextYear()),I=T.getTime();I<q?$=N.year-1:I>=V?$=N.year+1:$=N.year;break}case"x":{const N=be(T.getUTCFullYear(),T.getUTCMonth()),q=ue(N),V=N.nextMonth(),I=ue(V),G=T.getTime();G<q?$=N.previousMonth().month+1:G>=I?$=V.month+1:$=N.month+1;break}case"H":$=T.getUTCHours();break;case"h":$=T.getUTCHours(),$=$%12,$===0&&($=12);break;case"P":$=T.getUTCHours()>=12?"pm":"am";break;case"m":$=T.getUTCMinutes();break;case"s":$=T.getUTCSeconds();break;case"f":$=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":$="ISO";break;case"E":$="ISO";break}return $};let W=null;function xe(T,M,$){var N=0,q=0;if(typeof $<"u"){const ge=parseInt($);N=Math.floor(ge/100),q=ge%100}var V=function(ge,fe){var he=ce(ge,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(he=he%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")he=pe[he-1];else if(fe.component==="F")he=le[he];else throw{code:"D3133",value:fe.component};fe.names===Y.UPPER?he=he.toUpperCase():fe.names===Y.LOWER&&(he=he.toLowerCase()),fe.width&&he.length>fe.width.max&&(he=he.substring(0,fe.width.max))}else he=j(he,fe.integerFormat);else if(fe.component==="f")he=j(he,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const De=N*100+q;if(fe.integerFormat.regular)he=j(De,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)he=j(N,fe.integerFormat),q!==0&&(he+=":"+C(q,"00"));else if(de===3||de===4)he=j(De,fe.integerFormat);else throw{code:"D3134",value:de}}De>=0&&(he="+"+he),fe.component==="z"&&(he="GMT"+he),De===0&&fe.presentation2==="t"&&(he="Z")}else fe.component==="P"&&fe.names===Y.UPPER&&(he=he.toUpperCase());return he};let I;typeof M>"u"?(W===null&&(W=U("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),I=W):I=U(M);const G=(60*N+q)*60*1e3,ae=new Date(T+G);let Ce="";return I.parts.forEach(function(ge){ge.type==="literal"?Ce+=ge.value:Ce+=V(ae,ge)}),Ce}function b(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function($){var N=Object.create(null);if($.type==="literal")N.regex=$.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if($.component==="Z"||$.component==="z"){let V;Array.isArray($.integerFormat.groupingSeparators)||(V=$.integerFormat.groupingSeparators),N.regex="",$.component==="z"&&(N.regex="GMT"),N.regex+="[-+][0-9]+",V&&(N.regex+=V.character+"[0-9]+"),N.parse=function(I){$.component==="z"&&(I=I.substring(3));let G=0,ae=0;return V?(G=Number.parseInt(I.substring(0,I.indexOf(V.character))),ae=Number.parseInt(I.substring(I.indexOf(V.character)+1))):I.length-1<=2?G=Number.parseInt(I):(G=Number.parseInt(I.substring(0,3)),ae=Number.parseInt(I.substring(3))),G*60+ae}}else if($.component==="f")N.regex="[0-9]+",N.parse=function(V){return parseFloat("0."+V.substring(0,3))*1e3};else if($.integerFormat)N=b($.integerFormat);else{N.regex="[a-zA-Z]+";var q=Object.create(null);if($.component==="M"||$.component==="x")pe.forEach(function(V,I){$.width&&$.width.max?q[V.substring(0,$.width.max)]=I+1:q[V]=I+1});else if($.component==="F")le.forEach(function(V,I){I>0&&($.width&&$.width.max?q[V.substring(0,$.width.max)]=I:q[V]=I)});else if($.component==="P")q={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:$.component};N.parse=function(V){return q[V]}}return N.component=$.component,N});else{M.type="integer";const $=T.case===Y.UPPER;switch(T.primary){case D.LETTERS:M.regex=$?"[A-Z]+":"[a-z]+",M.parse=function(N){return F(N,$?"A":"a")};break;case D.ROMAN:M.regex=$?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(N){return S($?N:N.toUpperCase())};break;case D.WORDS:M.regex="(?:"+n.keys(k).concat("and","[\\-, ]").join("|")+")+",M.parse=function(N){return E(N.toLowerCase())};break;case D.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(N){let q=N;return T.ordinal&&(q=N.substring(0,N.length-2)),T.regular?q=q.split(",").join(""):T.groupingSeparators.forEach(V=>{q=q.split(V.character).join("")}),T.zeroCode!==48&&(q=q.split("").map(V=>String.fromCodePoint(V.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(q)};break;case D.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const $=re(M);return b($).parse(T)}function ee(T,M){const $=U(M),N=b($),q="^"+N.parts.map(ae=>"("+ae.regex+")").join("")+"$";var I=new RegExp(q,"i").exec(T);if(I!==null){const de=Object.create(null);for(let d=1;d<I.length;d++){const v=N.parts[d-1];v.parse&&(de[v.component]=v.parse(I[d]))}if(Object.getOwnPropertyNames(de).length===0)return;let ft=0;const Yt=d=>{ft<<=1,ft+=d?1:0},_t=d=>!(~d&ft)&&!!(d&ft);"YXMxWwdD".split("").forEach(d=>Yt(de[d]));const St=!_t(161)&&_t(130),As=_t(84),Tr=!As&&_t(72);ft=0,"PHhmsf".split("").forEach(d=>Yt(de[d]));const Z=!_t(23)&&_t(47),es=(St?"YD":As?"XxwF":Tr?"XWF":"YMD")+(Z?"Phmsf":"Hmsf"),hi=this.environment.timestamp;let ps=!1,ur=!1;if(es.split("").forEach(d=>{if(typeof de[d]>"u")ps?(de[d]="MDd".indexOf(d)!==-1?1:0,ur=!0):de[d]=ce(hi,d);else if(ps=!0,ur)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,St){const d=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(d+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(As)throw{code:"D3136"};if(Tr)throw{code:"D3136"};Z&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var G=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(G-=(de.Z||de.z)*60*1e3),G}}var we=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 Pe(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!we.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return ee.call(this,T,M)}function Ee(T,M,$){if(!(typeof T>"u"))return xe.call(this,T,M,$)}return{formatInteger:C,parseInteger:_,fromMillis:Ee,toMillis:Pe}})();r.exports=o},{"./utils":6}],2:[function(s,r,i){(function(n){(function(){var o=s("./utils");const c=(()=>{var h=o.isNumeric,g=o.isArrayOfStrings,A=o.isArrayOfNumbers,m=o.isSequence,f=o.isFunction,k=o.isLambda,E=o.isPromise,O=o.getFunctionArity,z=o.isDeepEqual,B=o.stringToArray;function S(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function F(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function D(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function Y(a,l=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var x=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&h(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},x)}return p}}function j(a,l,p){if(!(typeof a>"u")){var x=B(a),P=x.length;if(P+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:P+l+p;return x.slice(l,L).join("")}return x.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function re(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function U(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return B(a).length}function pe(a){if(!(typeof a>"u")){var l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function qe(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var x;l=Math.trunc(l);var P=Math.abs(l)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=j(L,0,P)),l>0?x=a+L:x=L+a}else x=a;return x}}async function ue(a,l){var p=a.apply(this,[l]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function be(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var x=await ue(l,a);p=typeof x<"u"}return p}}async function $e(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var x=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await ue(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)x.push({match:L.match,index:L.start,groups:L.groups}),L=await ue(L.next),P++}return x}}async function ce(a,l,p,x){if(!(typeof a>"u")){var P=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(x<0)throw{code:"D3011",stack:new Error().stack,value:x,index:4};var L;typeof p=="string"?L=function(Ke){for(var nt="",Fe=0,Qe=p.indexOf("$",Fe);Qe!==-1&&Fe<p.length;){nt+=p.substring(Fe,Qe),Fe=Qe+1;var Zt=p.charAt(Fe);if(Zt==="$")nt+="$",Fe++;else if(Zt==="0")nt+=Ke.match,Fe++;else{var Pt;if(Ke.groups.length===0?Pt=1:Pt=Math.floor(Math.log(Ke.groups.length)*Math.LOG10E)+1,Qe=parseInt(p.substring(Fe,Fe+Pt),10),Pt>1&&Qe>Ke.groups.length&&(Qe=parseInt(p.substring(Fe,Fe+Pt-1),10)),isNaN(Qe))nt+="$";else{if(Ke.groups.length>0){var fs=Ke.groups[Qe-1];typeof fs<"u"&&(nt+=fs)}Fe+=Qe.toString().length}}Qe=p.indexOf("$",Fe)}return nt+=p.substring(Fe),nt}:L=p;var H="",K=0;if(typeof x>"u"||x>0){var _e=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof x>"u"||_e<x);)H+=a.substring(K,oe),H+=p,K=oe+l.length,_e++,oe=a.indexOf(l,K);H+=a.substring(K)}else{var je=await ue(l,a);if(typeof je<"u"){for(;typeof je<"u"&&(typeof x>"u"||_e<x);){H+=a.substring(K,je.start);var We=L.apply(P,[je]);if(E(We)&&(We=await We),typeof We=="string")H+=We;else throw{code:"D3012",stack:new Error().stack,value:We};K=je.start+je.match.length,_e++,je=await ue(je.next)}H+=a.substring(K)}else H=a}}else H=a;return H}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function xe(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function b(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function ee(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function we(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function Pe(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var x=[];if(typeof p>"u"||p>0)if(typeof l=="string")x=a.split(l,p);else{var P=0,L=await ue(l,a);if(typeof L<"u"){for(var H=0;typeof L<"u"&&(typeof p>"u"||P<p);)x.push(a.substring(H,L.start)),H=L.end,L=await ue(L.next),P++;(typeof p>"u"||P<p)&&x.push(a.substring(H))}else x.push(a)}return x}}function Ee(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var x={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=x;typeof p<"u"&&o.keys(p).forEach(function(ve){P[ve]=p[ve]});for(var L=[],H=P["zero-digit"].charCodeAt(0),K=H;K<H+10;K++)L.push(String.fromCharCode(K));var _e=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=l.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var je=function(ve){var Ze=(function(){for(var ct,Ut=0;Ut<ve.length;Ut++)if(ct=ve.charAt(Ut),_e.indexOf(ct)!==-1&&ct!==P["exponent-separator"])return ve.substring(0,Ut);return""})(),At=(function(){for(var ct,Ut=ve.length-1;Ut>=0;Ut--)if(ct=ve.charAt(Ut),_e.indexOf(ct)!==-1&&ct!==P["exponent-separator"])return ve.substring(Ut+1);return""})(),Ye=ve.substring(Ze.length,ve.length-At.length),Ft,Ks,It,hr,zt=ve.indexOf(P["exponent-separator"],Ze.length);zt===-1||zt>ve.length-At.length?(Ft=Ye,Ks=void 0):(Ft=Ye.substring(0,zt),Ks=Ye.substring(zt+1));var ts=Ft.indexOf(P["decimal-separator"]);return ts===-1?(It=Ft,hr=At):(It=Ft.substring(0,ts),hr=Ft.substring(ts+1)),{prefix:Ze,suffix:At,activePart:Ye,mantissaPart:Ft,exponentPart:Ks,integerPart:It,fractionalPart:hr,subpicture:ve}},We=function(ve){var Ze,At,Ye=ve.subpicture,Ft=Ye.indexOf(P["decimal-separator"]);Ft!==Ye.lastIndexOf(P["decimal-separator"])&&(Ze="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ze="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ze="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ze="D3084");var Ks=!1;for(At=0;At<ve.mantissaPart.length;At++){var It=ve.mantissaPart.charAt(At);if(L.indexOf(It)!==-1||It===P.digit){Ks=!0;break}}Ks||(Ze="D3085");var hr=ve.activePart.split("").map(function(ct){return _e.indexOf(ct)===-1?"p":"a"}).join("");hr.indexOf("p")!==-1&&(Ze="D3086"),Ft!==-1?(Ye.charAt(Ft-1)===P["grouping-separator"]||Ye.charAt(Ft+1)===P["grouping-separator"])&&(Ze="D3087"):ve.integerPart.charAt(ve.integerPart.length-1)===P["grouping-separator"]&&(Ze="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ze="D3089");var zt=ve.integerPart.indexOf(P.digit);zt!==-1&&ve.integerPart.substring(0,zt).split("").filter(function(ct){return L.indexOf(ct)>-1}).length>0&&(Ze="D3090"),zt=ve.fractionalPart.lastIndexOf(P.digit),zt!==-1&&ve.fractionalPart.substring(zt).split("").filter(function(ct){return L.indexOf(ct)>-1}).length>0&&(Ze="D3091");var ts=typeof ve.exponentPart=="string";if(ts&&ve.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ze="D3092"),ts&&(ve.exponentPart.length===0||ve.exponentPart.split("").filter(function(ct){return L.indexOf(ct)===-1}).length>0)&&(Ze="D3093"),Ze)throw{code:Ze,stack:new Error().stack}},Ke=function(ve){var Ze=function(mt,un){for(var fi=[],Cs=mt.indexOf(P["grouping-separator"]);Cs!==-1;){var hn=(un?mt.substring(0,Cs):mt.substring(Cs)).split("").filter(function(Fr){return L.indexOf(Fr)!==-1||Fr===P.digit}).length;fi.push(hn),Cs=ve.integerPart.indexOf(P["grouping-separator"],Cs+1)}return fi},At=Ze(ve.integerPart),Ye=function(mt){if(mt.length===0)return 0;for(var un=function(hn,Fr){return Fr===0?hn:un(Fr,hn%Fr)},fi=mt.reduce(un),Cs=1;Cs<=mt.length;Cs++)if(mt.indexOf(Cs*fi)===-1)return 0;return fi},Ft=Ye(At),Ks=Ze(ve.fractionalPart,!0),It=ve.integerPart.split("").filter(function(mt){return L.indexOf(mt)!==-1}).length,hr=It,zt=ve.fractionalPart.split(""),ts=zt.filter(function(mt){return L.indexOf(mt)!==-1}).length,ct=zt.filter(function(mt){return L.indexOf(mt)!==-1||mt===P.digit}).length,Ut=typeof ve.exponentPart=="string";It===0&&ct===0&&(Ut?(ts=1,ct=1):It=1),Ut&&It===0&&ve.integerPart.indexOf(P.digit)!==-1&&(It=1),It===0&&ts===0&&(ts=1);var Hl=0;return Ut&&(Hl=ve.exponentPart.split("").filter(function(mt){return L.indexOf(mt)!==-1}).length),{integerPartGroupingPositions:At,regularGrouping:Ft,minimumIntegerPartSize:It,scalingFactor:hr,prefix:ve.prefix,fractionalPartGroupingPositions:Ks,minimumFactionalPartSize:ts,maximumFactionalPartSize:ct,minimumExponentSize:Hl,suffix:ve.suffix,picture:ve.subpicture}},nt=oe.map(je);nt.forEach(We);var Fe=nt.map(Ke),Qe=P["minus-sign"],Zt=P["zero-digit"],Pt=P["decimal-separator"],fs=P["grouping-separator"];Fe.length===1&&(Fe.push(JSON.parse(JSON.stringify(Fe[0]))),Fe[1].prefix=Qe+Fe[1].prefix);var ot;a>=0?ot=Fe[0]:ot=Fe[1];var di;ot.picture.indexOf(P.percent)!==-1?di=a*100:ot.picture.indexOf(P["per-mille"])!==-1?di=a*1e3:di=a;var Ws,Mr;if(ot.minimumExponentSize===0)Ws=di;else{var tg=Math.pow(10,ot.scalingFactor),sg=Math.pow(10,ot.scalingFactor-1);if(Ws=di,Mr=0,Ws!==0){for(;Math.abs(Ws)<sg;)Ws*=10,Mr-=1;for(;Math.abs(Ws)>tg;)Ws/=10,Mr+=1}}var rg=I(Ws,ot.maximumFactionalPartSize),ql=function(ve,Ze){var At=Math.abs(ve).toFixed(Ze);return Zt!=="0"&&(At=At.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),At},ke=ql(rg,ot.maximumFactionalPartSize),xt=ke.indexOf(".");for(xt===-1?ke=ke+Pt:ke=ke.replace(".",Pt);ke.charAt(0)===Zt;)ke=ke.substring(1);for(;ke.charAt(ke.length-1)===Zt;)ke=ke.substring(0,ke.length-1);xt=ke.indexOf(Pt);var pi=ot.minimumIntegerPartSize-xt,Bl=ot.minimumFactionalPartSize-(ke.length-xt-1);if(ke=(pi>0?new Array(pi+1).join(Zt):"")+ke,ke=ke+(Bl>0?new Array(Bl+1).join(Zt):""),xt=ke.indexOf(Pt),ot.regularGrouping>0)for(var ig=Math.floor((xt-1)/ot.regularGrouping),ln=1;ln<=ig;ln++)ke=[ke.slice(0,xt-ln*ot.regularGrouping),fs,ke.slice(xt-ln*ot.regularGrouping)].join("");else ot.integerPartGroupingPositions.forEach(function(ve){ke=[ke.slice(0,xt-ve),fs,ke.slice(xt-ve)].join(""),xt++});if(xt=ke.indexOf(Pt),ot.fractionalPartGroupingPositions.forEach(function(ve){ke=[ke.slice(0,ve+xt+1),fs,ke.slice(ve+xt+1)].join("")}),xt=ke.indexOf(Pt),(ot.picture.indexOf(Pt)===-1||xt===ke.length-1)&&(ke=ke.substring(0,ke.length-1)),typeof Mr<"u"){var cn=ql(Mr,0);pi=ot.minimumExponentSize-cn.length,pi>0&&(cn=new Array(pi+1).join(Zt)+cn),ke=ke+P["exponent-separator"]+(Mr<0?Qe:"")+cn}return ke=ot.prefix+ke+ot.suffix,ke}}function M(a,l){if(!(typeof a>"u")){if(a=I(a),typeof l>"u"?l=10:l=I(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function $(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function N(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function q(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function I(a,l){var p;if(!(typeof a>"u")){if(l){var x=a.toString().split("e");a=+(x[0]+"e"+(x[1]?+x[1]+l:l))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(x=p.toString().split("e"),p=+(x[0]+"e"+(x[1]?+x[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function G(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function Ce(){return Math.random()}function ge(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=ge(a[0]);else if(a.length>1){var p=a.filter(function(x){return ge(x)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):h(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!ge(a)}function he(a,l,p,x){var P=[l],L=O(a);return L>=2&&P.push(p),L>=3&&P.push(x),P}async function De(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=he(l,a[x],x,a),L=await l.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=a[x],L=he(l,P,x,a),H=await l.apply(this,L);ge(H)&&p.push(P)}return p}}async function ft(a,l){if(!(typeof a>"u")){for(var p=!1,x,P=0;P<a.length;P++){var L=a[P],H=!0;if(typeof l<"u"){var K=he(l,L,P,a),_e=await l.apply(this,K);H=ge(_e)}if(H)if(!p)x=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return x}}function Yt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),x=0;x<p;x++){var P=l.map(L=>L[x]);a.push(P)}return a}async function _t(a,l,p){if(!(typeof a>"u")){var x,P=O(l);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(x=a[0],L=1):(x=p,L=0);L<a.length;){var H=[x,a[L]];P>=3&&H.push(L),P>=4&&H.push(a),x=await l.apply(this,H),L++}return x}}function it(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),x=0;x<a.length;x++){var P=it.call(this,a[x]);P.forEach(function(L){p[L]=!0})}l=it.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function St(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var x=0;x<a.length;x++){var P=St.call(this,a[x],l);typeof P<"u"&&(Array.isArray(P)?P.forEach(L=>p.push(L)):p.push(P))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,l)&&!f(a)&&(p=a[l]);return p}function As(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function Tr(a){return!(typeof a>"u")}function Lr(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=As.call(this,l,Lr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!k(a))for(const P of o.keys(a)){var x=Object.create(null);x[P]=a[P],l.push(x)}else l=a;return l}function Z(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const x of o.keys(p))l[x]=p[x]}),l}}function on(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),x=0;x<l;x++)p[l-x-1]=a[x];return p}}async function an(a,l){var p=this.createSequence();for(const L of o.keys(a)){var x=he(l,a[L],L,a),P=await l.apply(this,x);typeof P<"u"&&p.push(P)}return p}function es(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function hi(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function ps(a){if(a!==void 0)return a===null?"null":h(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ur(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!A(a)&&!g(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(H,K){return H>K}}else p=l;var x=async function(H,K){var _e=async function(je,We,Ke){We.length===0?Array.prototype.push.apply(je,Ke):Ke.length===0?Array.prototype.push.apply(je,We):await p(We[0],Ke[0])?(je.push(Ke[0]),await _e(je,We,Ke.slice(1))):(je.push(We[0]),await _e(je,We.slice(1),Ke))},oe=[];return await _e(oe,H,K),oe},P=async function(H){if(!Array.isArray(H)||H.length<=1)return H;var K=Math.floor(H.length/2),_e=H.slice(0,K),oe=H.slice(K);return _e=await P(_e),oe=await P(oe),await x(_e,oe)},L=await P(a);return L}}function d(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var x=Math.floor(Math.random()*(p+1));p!==x&&(l[p]=l[x]),l[x]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=m(a)?this.createSequence():[],p=0;p<a.length;p++){for(var x=a[p],P=!1,L=0;L<l.length;L++)if(z(x,l[L])){P=!0;break}P||l.push(x)}return l}}async function w(a,l){var p=Object.create(null);for(const H of o.keys(a)){var x=a[H],P=he(l,x,H,a),L=await l.apply(this,P);ge(L)&&(p[H]=x)}return o.keys(p).length===0&&(p=void 0),p}return{sum:S,count:y,max:F,min:C,average:D,string:Y,substring:j,substringBefore:ne,substringAfter:re,lowercase:ie,uppercase:U,length:le,trim:pe,pad:qe,match:$e,contains:be,replace:ce,split:Pe,join:Ee,formatNumber:T,formatBase:M,number:$,floor:q,ceil:V,round:I,abs:N,sqrt:G,power:ae,random:Ce,boolean:ge,not:fe,map:De,zip:Yt,filter:de,single:ft,foldLeft:_t,sift:w,keys:it,lookup:St,append:As,exists:Tr,spread:Lr,merge:Z,reverse:on,each:an,error:es,assert:hi,type:ps,sort:ur,shuffle:d,distinct:v,base64encode:W,base64decode:xe,encodeUrlComponent:b,encodeUrl:_,decodeUrlComponent:ee,decodeUrl:we}})();r.exports=c}).call(this)}).call(this,typeof na<"u"?na:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,r,i){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),h=s("./parser"),g=s("./signature"),A=(function(){var m=c.isNumeric,f=c.isArrayOfStrings,k=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,z=c.isLambda,B=c.isIterable,S=c.isPromise,y=c.getFunctionArity,F=c.isDeepEqual,C=es(null);async function D(d,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(d,v,w),d.type){case"path":a=await Y(d,v,w);break;case"binary":a=await le(d,v,w);break;case"unary":a=await pe(d,v,w);break;case"name":a=qe(d,v,w);break;case"string":case"number":case"value":a=ue(d);break;case"wildcard":a=be(d,v,w);break;case"descendant":a=ce(d,v,w);break;case"parent":a=w.lookup(d.slot.label);break;case"condition":a=await q(d,v,w);break;case"block":a=await V(d,v,w);break;case"bind":a=await N(d,v,w);break;case"regex":a=I(d,v,w);break;case"function":a=await he(d,v,w);break;case"variable":a=G(d,v,w);break;case"lambda":a=ft(d,v,w);break;case"partial":a=await Yt(d,v,w);break;case"apply":a=await fe(d,v,w);break;case"transform":a=Ce(d,v,w);break}if(Object.prototype.hasOwnProperty.call(d,"predicate"))for(var p=0;p<d.predicate.length;p++)a=await U(d.predicate[p].expr,a,w);d.type!=="path"&&Object.prototype.hasOwnProperty.call(d,"group")&&(a=await T(d.group,a,w));var x=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return x&&await x(d,v,w,a),a&&E(a)&&!a.tupleStream&&(d.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function Y(d,v,w){var a;Array.isArray(v)&&d.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,x=void 0,P=0;P<d.steps.length;P++){var L=d.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?l=await D(L,a,w):p?x=await ie(L,a,x,w):l=await ne(L,a,w,P===d.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(d.tuple)l=x;else for(l=w.base.createSequence(),P=0;P<x.length;P++)l.push(x[P]["@"]);return d.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(d,"group")&&(l=await T(d.group,p?x:l,w)),l}function j(d,v){var w=es(d);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(d,v,w,a){var l;if(d.type==="sort")return l=await ae(d,v,w),d.stages&&(l=await re(d.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var x=await D(d,v[p],w);if(d.stages)for(var P=0;P<d.stages.length;P++)x=await U(d.stages[P].expr,x,w);typeof x<"u"&&l.push(x)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(H){!Array.isArray(H)||H.cons?L.push(H):Array.prototype.forEach.call(H,K=>L.push(K))}),L}async function re(d,v,w){for(var a=v,l=0;l<d.length;l++){var p=d[l];switch(p.type){case"filter":a=await U(p.expr,a,w);break;case"index":for(var x=0;x<a.length;x++){var P=a[x];P[p.value]=x}break}}return a}async function ie(d,v,w,a){var l;if(d.type==="sort"){if(w)l=await ae(d,w,a);else{var p=await ae(d,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var x=0;x<p.length;x++){var P={"@":p[x]};P[d.index]=x,l.push(P)}}return d.stages&&(l=await re(d.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var H=0;H<w.length;H++){L=j(a,w[H]);var K=await D(d,w[H]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var _e=0;_e<K.length;_e++)P=Object.create(null),Object.assign(P,w[H]),K.tupleStream?Object.assign(P,K[_e]):(d.focus?(P[d.focus]=K[_e],P["@"]=w[H]["@"]):P["@"]=K[_e],d.index&&(P[d.index]=_e),d.ancestor&&(P[d.ancestor.label]=w[H]["@"])),l.push(P)}}return d.stages&&(l=await re(d.stages,l,a)),l}async function U(d,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),d.type==="number"){var l=Math.floor(d.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],x=p,P=w;v.tupleStream&&(x=p["@"],P=j(w,p));var L=await D(d,x,P);m(L)&&(L=[L]),k(L)?Array.prototype.forEach.call(L,function(K){var _e=Math.floor(K);_e<0&&(_e=v.length+_e),_e===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(d,v,w){var a,l=await D(d.lhs,v,w),p=d.value,x=async()=>await D(d.rhs,v,w);if(p==="and"||p==="or")try{return await we(l,x,p)}catch(L){throw L.position=d.position,L.token=p,L}var P=await x();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=xe(l,P,p);break;case"=":case"!=":a=b(l,P,p);break;case"<":case"<=":case">":case">=":a=_(l,P,p);break;case"&":a=Ee(l,P);break;case"..":a=$(l,P,w);break;case"in":a=ee(l,P);break}}catch(L){throw L.position=d.position,L.token=p,L}return a}async function pe(d,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(d.value){case"-":if(a=await D(d.expression,v,w),typeof a>"u")a=void 0;else if(m(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:d.position,token:d.value,value:a};break;case"[":a=[];let P=await Promise.all(d.expressions.map(async(L,H)=>(w.isParallelCall=H>0,[L,await D(L,v,w)])));for(let L of P){var[p,x]=L;typeof x<"u"&&(p.value==="["?a.push(x):a=o.append.call(l,a,x))}d.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(d,v,w);break}return a}function qe(d,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,d.value)}function ue(d){return d.value}function be(d,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var x=v[p];Array.isArray(x)?(x=$e(x),l=o.append.call(a,l,x)):l.push(x)}),l}function $e(d,v){return typeof v>"u"&&(v=[]),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){$e(w,v)}):v.push(d),v}function ce(d,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(d,v){Array.isArray(d)||v.push(d),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){W(w,v)}):d!==null&&typeof d=="object"&&!O(d)&&c.keys(d).forEach(function(w){W(d[w],v)})}function xe(d,v,w){var a;if(typeof d<"u"&&!m(d))throw{code:"T2001",stack:new Error().stack,value:d};if(typeof v<"u"&&!m(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u")return a;switch(w){case"+":a=d+v;break;case"-":a=d-v;break;case"*":a=d*v;break;case"/":a=d/v;break;case"%":a=d%v;break}return a}function b(d,v,w){var a,l=typeof d,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=F(d,v);break;case"!=":a=!F(d,v);break}return a}function _(d,v,w){var a,l=typeof d,p=typeof v,x=l==="undefined"||l==="string"||l==="number",P=p==="undefined"||p==="string"||p==="number";if(!x||!P)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:d};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:d,value2:v};switch(w){case"<":a=d<v;break;case"<=":a=d<=v;break;case">":a=d>v;break;case">=":a=d>=v;break}return a}}function ee(d,v){var w=!1;if(typeof d>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===d){w=!0;break}return w}async function we(d,v,w){var a,l=Pe(d);switch(w){case"and":a=l&&Pe(await v());break;case"or":a=l||Pe(await v());break}return a}function Pe(d){var v=o.boolean(d);return typeof v>"u"?!1:v}function Ee(d,v){var w,a="",l="";return typeof d<"u"&&(a=o.string(d)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(d,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),x={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=x.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var P=0;P<v.length;P++)for(var L=v[P],H=p?j(w,L):w,K=0;K<d.lhs.length;K++){var _e=d.lhs[K],oe=await D(_e[0],p?L["@"]:L,H);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:d.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:d.position,value:oe};var je={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:d.position,value:oe};l[oe].data=o.append.call(x,l[oe].data,L)}else l[oe]=je}}let We=await Promise.all(c.keys(l).map(async(nt,Fe)=>{let Qe=l[nt];var Zt=Qe.data,Pt=w;if(p){var fs=M(Qe.data,w);Zt=fs["@"],delete fs["@"],Pt=j(w,fs)}return w.isParallelCall=Fe>0,[nt,await D(d.lhs[Qe.exprIndex][1],Zt,Pt)]}));for(let nt of We){var[oe,Ke]=await nt;typeof Ke<"u"&&(a[oe]=Ke)}return a}function M(d,v){if(!Array.isArray(d))return d;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,d[0]);for(var l=1;l<d.length;l++)for(const p of c.keys(d[l]))w[p]=o.append.call(a,w[p],d[l][p]);return w}function $(d,v,w){var a;if(typeof d<"u"&&!Number.isInteger(d))throw{code:"T2003",stack:new Error().stack,value:d};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u"||d>v)return a;var l=v-d+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=d,x=0;p<=v;p++,x++)a[x]=p;return a.sequence=!0,a}async function N(d,v,w){var a=await D(d.rhs,v,w);return w.bind(d.lhs.value,a),a}async function q(d,v,w){var a,l=await D(d.condition,v,w);return o.boolean(l)?a=await D(d.then,v,w):typeof d.else<"u"&&(a=await D(d.else,v,w)),a}async function V(d,v,w){for(var a,l=es(w),p=0;p<d.expressions.length;p++)a=await D(d.expressions[p],v,l);return a}function I(d,v,w){var a=new w.base.RegexEngine(d.value),l=function(p,x){var P;a.lastIndex=x||0;var L=a.exec(p);if(L!==null){if(P={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var H=1;H<L.length;H++)P.groups.push(L[H]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:d.position,value:d.value.source};return K}}}return P};return l}function G(d,v,w){var a;return d.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(d.value),a}async function ae(d,v,w){var a,l=v,p=!!v.tupleStream,x=async function(L,H){for(var K=0,_e=0;K===0&&_e<d.terms.length;_e++){var oe=d.terms[_e],je=L,We=w;p&&(je=L["@"],We=j(w,L));var Ke=await D(oe.expression,je,We);je=H,We=w,p&&(je=H["@"],We=j(w,H));var nt=await D(oe.expression,je,We),Fe=typeof Ke,Qe=typeof nt;if(Fe==="undefined"){K=Qe==="undefined"?0:1;continue}if(Qe==="undefined"){K=-1;continue}if(!(Fe==="string"||Fe==="number")||!(Qe==="string"||Qe==="number"))throw{code:"T2008",stack:new Error().stack,position:d.position,value:Fe==="string"||Fe==="number"?nt:Ke};if(Fe!==Qe)throw{code:"T2007",stack:new Error().stack,position:d.position,value:Ke,value2:nt};Ke!==nt&&(Ke<nt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:v};return a=await o.sort.apply(P,[l,x]),a}function Ce(d,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:d.position};var x=await De(p,[l],null,w),P=await D(d.pattern,x,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var H=P[L],K=await D(d.update,H,w),_e=typeof K;if(_e!=="undefined"){if(_e!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:d.update.position,value:K};for(const Ke of c.keys(K))H[Ke]=K[Ke]}if(typeof d.delete<"u"){var oe=await D(d.delete,H,w);if(typeof oe<"u"){var je=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:d.delete.position,value:je};for(var We=0;We<oe.length;We++)typeof H=="object"&&H!==null&&delete H[oe[We]]}}}}return x}};return Z(a,"<(oa):o>")}var ge=h("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(d,v,w){var a,l=await D(d.lhs,v,w);if(d.rhs.type==="function")a=await he(d.rhs,v,w,{context:l});else{var p=await D(d.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:d.position,value:p};if(O(l)){var x=await D(ge,null,w);a=await De(x,[l,p],null,w)}else a=await De(p,[l],null,w)}return a}async function he(d,v,w,a){var l,p=await D(d.procedure,v,w);if(typeof p>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};var x=[];typeof a<"u"&&x.push(a.context);for(var P=0;P<d.arguments.length;P++){const H=await D(d.arguments[P],v,w);if(O(H)){const K=async function(..._e){return await De(H,_e,null,w)};K.arity=y(H),x.push(K)}else x.push(H)}var L=d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=d.position),l=await De(p,x,v,w)}catch(H){throw H.position||(H.position=d.position),H.token||(H.token=L),H}return l}async function De(d,v,w,a){var l;for(l=await de(d,v,w,a);z(l)&&l.thunk===!0;){var p=await D(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var x=[],P=0;P<l.body.arguments.length;P++)x.push(await D(l.body.arguments[P],l.input,l.environment));l=await de(p,x,w,a)}return l}async function de(d,v,w,a){var l;try{var p=v;if(d&&(p=_t(d.signature,v,w)),z(d))l=await it(d,p);else if(d&&d._jsonata_function===!0){var x={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=d.implementation.apply(x,p),B(l)&&(l=l.next().value),S(l)&&(l=await l)}else if(typeof d=="function")l=d.apply(w,p),S(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw d&&(typeof P.token>"u"&&typeof d.token<"u"&&(P.token=d.token),P.position=d.position||P.position),P}return l}function ft(d,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:d.arguments,signature:d.signature,body:d.body};return d.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await De(a,p,v,l?l.environment:w)},a}async function Yt(d,v,w){for(var a,l=[],p=0;p<d.arguments.length;p++){var x=d.arguments[p];x.type==="operator"&&x.value==="?"?l.push(x):l.push(await D(x,v,w))}var P=await D(d.procedure,v,w);if(typeof P>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};if(z(P))a=St(P,l,w);else if(P&&P._jsonata_function===!0)a=As(P.implementation,l,w);else if(typeof P=="function")a=As(P,l,w);else throw{code:"T1008",stack:new Error().stack,position:d.position,token:d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value};return a}function _t(d,v,w){if(typeof d>"u")return v;var a=d.validate(v,w);return a}async function it(d,v){var w,a=es(d.environment);return Array.prototype.forEach.call(d.arguments,function(l,p){a.bind(l.value,v[p])}),typeof d.body=="function"?w=await Tr(d.body,a):w=await D(d.body,d.input,a),w}function St(d,v,w){var a=es(d.environment||w),l=[];Array.prototype.forEach.call(d.arguments,function(x,P){var L=v[P];L&&L.type==="operator"&&L.value==="?"?l.push(x):a.bind(x.value,L)});var p={_jsonata_lambda:!0,input:d.input,environment:a,arguments:l,body:d.body};return p}function As(d,v,w){var a=Lr(d);a=a.map(function(P){return"$"+P.trim()});var l="function("+a.join(", ")+"){ _ }",p=h(l);p.body=d;var x=St(p,v,w);return x}async function Tr(d,v){var w=Lr(d),a=w.map(function(x){return v.lookup(x.trim())}),l={environment:v,createSequence:v.base.createSequence},p=d.apply(l,a);return S(p)&&(p=await p),p}function Lr(d){var v=d.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function Z(d,v){var w={_jsonata_function:!0,implementation:d};return typeof v<"u"&&(w.signature=g(v)),w}async function on(d,v){if(!(typeof d>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=h(d,!1)}catch(p){throw ps(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await D(a,w,this.environment)}catch(p){throw ps(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function an(d){if(!(typeof d>"u"))return JSON.parse(o.string(d))}function es(d){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:d&&(p=d.lookup(l)),p},timestamp:d?d.timestamp:null,async:d?d.async:!1,isParallelCall:d?d.isParallelCall:!1,global:d?d.global:{ancestry:[null]}};if(d){var a=d.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(d,w),w.base=d.base}return w}C.bind("sum",Z(o.sum,"<a<n>:n>")),C.bind("count",Z(o.count,"<a:n>")),C.bind("max",Z(o.max,"<a<n>:n>")),C.bind("min",Z(o.min,"<a<n>:n>")),C.bind("average",Z(o.average,"<a<n>:n>")),C.bind("string",Z(o.string,"<x-b?:s>")),C.bind("substring",Z(o.substring,"<s-nn?:s>")),C.bind("substringBefore",Z(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",Z(o.substringAfter,"<s-s:s>")),C.bind("lowercase",Z(o.lowercase,"<s-:s>")),C.bind("uppercase",Z(o.uppercase,"<s-:s>")),C.bind("length",Z(o.length,"<s-:n>")),C.bind("trim",Z(o.trim,"<s-:s>")),C.bind("pad",Z(o.pad,"<s-ns?:s>")),C.bind("match",Z(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",Z(o.contains,"<s-(sf):b>")),C.bind("replace",Z(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",Z(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",Z(o.join,"<a<s>s?:s>")),C.bind("formatNumber",Z(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",Z(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",Z(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",Z(n.parseInteger,"<s-s:n>")),C.bind("number",Z(o.number,"<(nsb)-:n>")),C.bind("floor",Z(o.floor,"<n-:n>")),C.bind("ceil",Z(o.ceil,"<n-:n>")),C.bind("round",Z(o.round,"<n-n?:n>")),C.bind("abs",Z(o.abs,"<n-:n>")),C.bind("sqrt",Z(o.sqrt,"<n-:n>")),C.bind("power",Z(o.power,"<n-n:n>")),C.bind("random",Z(o.random,"<:n>")),C.bind("boolean",Z(o.boolean,"<x-:b>")),C.bind("not",Z(o.not,"<x-:b>")),C.bind("map",Z(o.map,"<af>")),C.bind("zip",Z(o.zip,"<a+>")),C.bind("filter",Z(o.filter,"<af>")),C.bind("single",Z(o.single,"<af?>")),C.bind("reduce",Z(o.foldLeft,"<afj?:j>")),C.bind("sift",Z(o.sift,"<o-f?:o>")),C.bind("keys",Z(o.keys,"<x-:a<s>>")),C.bind("lookup",Z(o.lookup,"<x-s:x>")),C.bind("append",Z(o.append,"<xx:a>")),C.bind("exists",Z(o.exists,"<x:b>")),C.bind("spread",Z(o.spread,"<x-:a<o>>")),C.bind("merge",Z(o.merge,"<a<o>:o>")),C.bind("reverse",Z(o.reverse,"<a:a>")),C.bind("each",Z(o.each,"<o-f:a>")),C.bind("error",Z(o.error,"<s?:x>")),C.bind("assert",Z(o.assert,"<bs?:x>")),C.bind("type",Z(o.type,"<x:s>")),C.bind("sort",Z(o.sort,"<af?:a>")),C.bind("shuffle",Z(o.shuffle,"<a:a>")),C.bind("distinct",Z(o.distinct,"<x:x>")),C.bind("base64encode",Z(o.base64encode,"<s-:s>")),C.bind("base64decode",Z(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",Z(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",Z(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",Z(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",Z(o.decodeUrl,"<s-:s>")),C.bind("eval",Z(on,"<sx?:x>")),C.bind("toMillis",Z(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",Z(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",Z(an,"<(oa)-:o>"));var hi={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}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",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 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",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 ps(d){var v=hi[d.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return d[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(d[arguments[1]])}),d.message=w}}function ur(d,v){var w,a;try{w=h(d,v&&v.recover),a=w.errors,delete w.errors}catch(x){throw ps(x),x}var l=es(C),p=new Date;return l.bind("now",Z(function(x,P){return n.fromMillis(p.getTime(),x,P)},"<s?s?:s>")),l.bind("millis",Z(function(){return p.getTime()},"<:n>")),{evaluate:async function(x,P,L){if(typeof a<"u"){var H={code:"S0500",position:0};throw ps(H),H}const K=es(l);for(const oe of c.keys(P))K.bind(oe,P[oe]);if(K.bind("$",x),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...je){if(oe.length+je.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,je)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(x)&&!E(x)&&(x=K.createSequence(x),x.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var _e;try{return _e=await D(w,x,K),typeof L=="function"&&L(null,_e),_e}catch(oe){throw ps(oe),oe}},assign:function(x,P){l.bind(x,P)},registerFunction:function(x,P,L){var H=Z(P,L);l.bind(x,H)},ast:function(){return w},errors:function(){return a}}}return ur.parser=h,ur})();r.exports=A},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,r,i){var n=s("./signature");const o=(()=>{var c={".":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,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
73
+ `,r:"\r",t:" "},g=function(m){var f=0,k=m.length,E=function(B,S){var y={type:B,value:S,position:f};return y},O=function(){for(var B=f,S=0,y,F,C=function(Y){if(m.charAt(Y)==="/"&&S===0){for(var j=0;m.charAt(Y-(j+1))==="\\";)j++;if(j%2===0)return!0}return!1};f<k;){var D=m.charAt(f);if(C(f)){if(y=m.substring(B,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,D=m.charAt(f),B=f;D==="i"||D==="m";)f++,D=m.charAt(f);return F=m.substring(B,f)+"g",new RegExp(y,F)}(D==="("||D==="["||D==="{")&&m.charAt(f-1)!=="\\"&&S++,(D===")"||D==="]"||D==="}")&&m.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},z=function(B){if(f>=k)return null;for(var S=m.charAt(f);f<k&&`
74
+ \r\v`.indexOf(S)>-1;)f++,S=m.charAt(f);if(S==="/"&&m.charAt(f+1)==="*"){var y=f;for(f+=2,S=m.charAt(f);!(S==="*"&&m.charAt(f+1)==="/");)if(S=m.charAt(++f),f>=k)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,S=m.charAt(f),z(B)}if(B!==!0&&S==="/")return f++,E("regex",O());if(S==="."&&m.charAt(f+1)===".")return f+=2,E("operator","..");if(S===":"&&m.charAt(f+1)==="=")return f+=2,E("operator",":=");if(S==="!"&&m.charAt(f+1)==="=")return f+=2,E("operator","!=");if(S===">"&&m.charAt(f+1)==="=")return f+=2,E("operator",">=");if(S==="<"&&m.charAt(f+1)==="=")return f+=2,E("operator","<=");if(S==="*"&&m.charAt(f+1)==="*")return f+=2,E("operator","**");if(S==="~"&&m.charAt(f+1)===">")return f+=2,E("operator","~>");if(S==="?"&&m.charAt(f+1)===":")return f+=2,E("operator","?:");if(S==="?"&&m.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(c,S))return f++,E("operator",S);if(S==='"'||S==="'"){var F=S;f++;for(var C="";f<k;){if(S=m.charAt(f),S==="\\")if(f++,S=m.charAt(f),Object.prototype.hasOwnProperty.call(h,S))C+=h[S];else if(S==="u"){var D=m.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test(D)){var Y=parseInt(D,16);C+=String.fromCharCode(Y),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===F)return f++,E("string",C);C+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var j=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=j.exec(m.substring(f));if(ne!==null){var re=parseFloat(ne[0]);if(!isNaN(re)&&isFinite(re))return f+=ne[0].length,E("number",re);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(S==="`"){f++;var U=m.indexOf("`",f);if(U!==-1)return ie=m.substring(f,U),f=U+1,E("name",ie);throw f=k,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=m.charAt(le),le===k||`
75
+ \r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(m.charAt(f)==="$")return ie=m.substring(f+1,le),f=le,E("variable",ie);switch(ie=m.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===k&&ie===""?null:E("name",ie)}}else le++};return z},A=function(m,f){var k,E,O=Object.create(null),z=[],B=function(){var b=[];k.id!=="(end)"&&b.push({type:k.type,value:k.value,position:k.position});for(var _=E();_!==null;)b.push(_),_=E();return b},S={nud:function(){var b={code:"S0211",token:this.value,position:this.position};if(f)return b.remaining=B(),b.type="error",z.push(b),b;throw b.stack=new Error().stack,b}},y=function(b,_){var ee=O[b];return _=_||0,ee?_>=ee.lbp&&(ee.lbp=_):(ee=Object.create(S),ee.id=ee.value=b,ee.lbp=_,O[b]=ee),ee},F=function(b){if(f){b.remaining=B(),z.push(b);var _=O["(error)"];return k=Object.create(_),k.error=b,k.type="(error)",k}else throw b.stack=new Error().stack,b},C=function(b,_){if(b&&k.id!==b){var ee;k.id==="(end)"?ee="S0203":ee="S0202";var we={code:ee,position:k.position,token:k.value,value:b};return F(we)}var Pe=E(_);if(Pe===null)return k=O["(end)"],k.position=m.length,k;var Ee=Pe.value,T=Pe.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[Ee],!M)return F({code:"S0204",stack:new Error().stack,position:Pe.position,token:Ee});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return F({code:"S0205",stack:new Error().stack,position:Pe.position,token:Ee})}return k=Object.create(M),k.value=Ee,k.type=T,k.position=Pe.position,k},D=function(b){var _,ee=k;for(C(null,!0),_=ee.nud();b<k.lbp;)ee=k,C(),_=ee.led(_);return _},Y=function(b){var _=y(b,0);_.nud=function(){return this}},j=function(b,_,ee){var we=_||c[b],Pe=y(b,we);return Pe.led=ee||function(Ee){return this.lhs=Ee,this.rhs=D(we),this.type="binary",this},Pe},ne=function(b,_,ee){var we=y(b,_);return we.led=ee,we},re=function(b,_){var ee=y(b);return ee.nud=_||function(){return this.expression=D(70),this.type="unary",this},ee};Y("(end)"),Y("(name)"),Y("(literal)"),Y("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),j("."),j("+"),j("-"),j("*"),j("/"),j("%"),j("="),j("<"),j(">"),j("!="),j("<="),j(">="),j("&"),j("and"),j("or"),j("in"),Y("and"),Y("or"),Y("in"),re("-"),j("~>"),j("??",c["??"],function(b){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(b))]},this.then=b,this.else=D(0),this}),ne("(error)",10,function(b){return this.lhs=b,this.error=k.error,this.remaining=B(),this.type="error",this}),re("*",function(){return this.type="wildcard",this}),re("**",function(){return this.type="descendant",this}),re("%",function(){return this.type="parent",this}),j("(",c["("],function(b){if(this.procedure=b,this.type="function",this.arguments=[],k.id!==")")for(;k.type==="operator"&&k.id==="?"?(this.type="partial",this.arguments.push(k),C("?")):this.arguments.push(D(0)),k.id===",";)C(",");if(C(")",!0),b.type==="name"&&(b.value==="function"||b.value==="λ")){if(this.arguments.forEach(function(Ee,T){if(Ee.type!=="variable")return F({code:"S0208",stack:new Error().stack,position:Ee.position,token:Ee.value,value:T+1})}),this.type="lambda",k.id==="<"){for(var _=k.position,ee=1,we="<";ee>0&&k.id!=="{"&&k.id!=="(end)";){var Pe=C();Pe.id===">"?ee--:Pe.id==="<"&&ee++,we+=Pe.value}C(">");try{this.signature=n(we)}catch(Ee){return Ee.position=_+Ee.offset,F(Ee)}}C("{"),this.body=D(0),C("}")}return this}),re("(",function(){for(var b=[];k.id!==")"&&(b.push(D(0)),k.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=b,this}),re("[",function(){var b=[];if(k.id!=="]")for(;;){var _=D(0);if(k.id===".."){var ee={type:"binary",value:"..",position:k.position,lhs:_};C(".."),ee.rhs=D(0),_=ee}if(b.push(_),k.id!==",")break;C(",")}return C("]",!0),this.expressions=b,this.type="unary",this}),j("[",c["["],function(b){if(k.id==="]"){for(var _=b;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),b}else return this.lhs=b,this.rhs=D(c["]"]),this.type="binary",C("]",!0),this}),j("^",c["^"],function(b){C("(");for(var _=[];;){var ee={descending:!1};if(k.id==="<"?C("<"):k.id===">"&&(ee.descending=!0,C(">")),ee.expression=D(0),_.push(ee),k.id!==",")break;C(",")}return C(")"),this.lhs=b,this.rhs=_,this.type="binary",this});var ie=function(b){var _=[];if(k.id!=="}")for(;;){var ee=D(0);C(":");var we=D(0);if(_.push([ee,we]),k.id!==",")break;C(",")}return C("}",!0),typeof b>"u"?(this.lhs=_,this.type="unary"):(this.lhs=b,this.rhs=_,this.type="binary"),this};re("{",ie),j("{",c["{"],ie),ne(":=",c[":="],function(b){return b.type!=="variable"?F({code:"S0212",stack:new Error().stack,position:b.position,token:b.value}):(this.lhs=b,this.rhs=D(c[":="]-1),this.type="binary",this)}),j("@",c["@"],function(b){return this.lhs=b,this.rhs=D(c["@"]),this.rhs.type!=="variable"?F({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),j("#",c["#"],function(b){return this.lhs=b,this.rhs=D(c["#"]),this.rhs.type!=="variable"?F({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),j("?",c["?"],function(b){return this.type="condition",this.condition=b,this.then=D(0),k.id===":"&&(C(":"),this.else=D(0)),this}),j("?:",c["?:"],function(b){return this.type="condition",this.condition=JSON.parse(JSON.stringify(b)),this.then=b,this.else=D(0),this}),re("|",function(){return this.type="transform",this.pattern=D(0),C("|"),this.update=D(0),k.id===","&&(C(","),this.delete=D(0)),C("|"),this});var U=function(b){var _;if(b.type==="function"&&!b.predicate){var ee={type:"lambda",thunk:!0,arguments:[],position:b.position};ee.body=b,_=ee}else if(b.type==="condition")b.then=U(b.then),typeof b.else<"u"&&(b.else=U(b.else)),_=b;else if(b.type==="block"){var we=b.expressions.length;we>0&&(b.expressions[we-1]=U(b.expressions[we-1])),_=b}else _=b;return _},le=0,pe=0,qe=[],ue=function(b,_){switch(b.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof b.ancestor>"u"||(qe[_.index].slot.label=b.ancestor.label),b.ancestor=_,b.tuple=!0);break;case"parent":_.level++;break;case"block":b.expressions.length>0&&(b.tuple=!0,_=ue(b.expressions[b.expressions.length-1],_));break;case"path":b.tuple=!0;var ee=b.steps.length-1;for(_=ue(b.steps[ee--],_);_.level>0&&ee>=0;)_=ue(b.steps[ee--],_);break;default:throw{code:"S0217",token:b.type,position:b.position}}return _},be=function(b,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var ee=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&ee.push(_.slot),typeof b.seekingParent>"u"?b.seekingParent=ee:Array.prototype.push.apply(b.seekingParent,ee)}},$e=function(b){var _=b.steps.length-1,ee=b.steps[_],we=typeof ee.seekingParent<"u"?ee.seekingParent:[];ee.type==="parent"&&we.push(ee.slot);for(var Pe=0;Pe<we.length;Pe++){var Ee=we[Pe];for(_=b.steps.length-2;Ee.level>0;){if(_<0){typeof b.seekingParent>"u"?b.seekingParent=[Ee]:b.seekingParent.push(Ee);break}for(var T=b.steps[_--];_>=0&&T.focus&&b.steps[_].focus;)T=b.steps[_--];Ee=ue(T,Ee)}}},ce=function(b){var _;switch(b.type){case"binary":switch(b.value){case".":var ee=ce(b.lhs);ee.type==="path"?_=ee:_={type:"path",steps:[ee]},ee.type==="parent"&&(_.seekingParent=[ee.slot]);var we=ce(b.rhs);we.type==="path"?Array.prototype.push.apply(_.steps,we.steps):(typeof we.predicate<"u"&&(we.stages=we.predicate,delete we.predicate),_.steps.push(we)),_.steps.filter(function(G){if(G.type==="number"||G.type==="value")throw{code:"S0213",stack:new Error().stack,position:G.position,value:G.value};return G.type==="string"}).forEach(function(G){G.type="name"}),_.steps.filter(function(G){return G.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var Pe=_.steps[0];Pe.type==="unary"&&Pe.value==="["&&(Pe.consarray=!0);var Ee=_.steps[_.steps.length-1];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0),$e(_);break;case"[":_=ce(b.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:b.position};typeof T[M]>"u"&&(T[M]=[]);var $=ce(b.rhs);typeof $.seekingParent<"u"&&($.seekingParent.forEach(G=>{G.level===1?ue(T,G):G.level--}),be(T,$)),T[M].push({type:"filter",expr:$,position:b.position});break;case"{":if(_=ce(b.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:b.position};_.group={lhs:b.rhs.map(function(G){return[ce(G[0]),ce(G[1])]}),position:b.position};break;case"^":_=ce(b.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var N={type:"sort",position:b.position};N.terms=b.rhs.map(function(G){var ae=ce(G.expression);return be(N,ae),{descending:G.descending,expression:ae}}),_.steps.push(N),$e(_);break;case":=":_={type:"bind",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),be(_,_.rhs);break;case"@":if(_=ce(b.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:b.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:b.position};b.keepArray&&(T.keepArray=!0),T.focus=b.rhs.value,T.tuple=!0;break;case"#":_=ce(b.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=b.rhs.value:T.stages.push({type:"index",value:b.rhs.value,position:b.position}),T.tuple=!0;break;case"~>":_={type:"apply",value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:b.type,value:b.value,position:b.position},_.lhs=ce(b.lhs),_.rhs=ce(b.rhs),be(_,_.lhs),be(_,_.rhs)}break;case"unary":_={type:b.type,value:b.value,position:b.position},b.value==="["?_.expressions=b.expressions.map(function(G){var ae=ce(G);return be(_,ae),ae}):b.value==="{"?_.lhs=b.lhs.map(function(G){var ae=ce(G[0]);be(_,ae);var Ce=ce(G[1]);return be(_,Ce),[ae,Ce]}):(_.expression=ce(b.expression),b.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):be(_,_.expression));break;case"function":case"partial":_={type:b.type,name:b.name,value:b.value,position:b.position},_.arguments=b.arguments.map(function(G){var ae=ce(G);return be(_,ae),ae}),_.procedure=ce(b.procedure);break;case"lambda":_={type:b.type,arguments:b.arguments,signature:b.signature,position:b.position};var q=ce(b.body);_.body=U(q);break;case"condition":_={type:b.type,position:b.position},_.condition=ce(b.condition),be(_,_.condition),_.then=ce(b.then),be(_,_.then),typeof b.else<"u"&&(_.else=ce(b.else),be(_,_.else));break;case"transform":_={type:b.type,position:b.position},_.pattern=ce(b.pattern),_.update=ce(b.update),typeof b.delete<"u"&&(_.delete=ce(b.delete));break;case"block":_={type:b.type,position:b.position},_.expressions=b.expressions.map(function(G){var ae=ce(G);return be(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[b]},b.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},qe.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=b;break;case"operator":if(b.value==="and"||b.value==="or"||b.value==="in")b.type="name",_=ce(b);else if(b.value==="?")_=b;else throw{code:"S0201",stack:new Error().stack,position:b.position,token:b.value};break;case"error":_=b,b.lhs&&(_=ce(b.lhs));break;default:var V="S0206";b.id==="(end)"&&(V="S0207");var I={code:V,position:b.position,token:b.value};if(f)return z.push(I),{type:"error",error:I};throw I.stack=new Error().stack,I}return b.keepArray&&(_.keepArray=!0),_};E=g(m),C();var W=D(0);if(k.id!=="(end)"){var xe={code:"S0201",position:k.position,token:k.value};F(xe)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return z.length>0&&(W.errors=z),W};return A})();r.exports=o},{"./signature":5}],5:[function(s,r,i){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function h(g){for(var A=1,m=[],f=Object.create(null),k=f;A<g.length;){var E=g.charAt(A);if(E===":")break;var O=function(){m.push(f),k=f,f=Object.create(null)},z=function(j,ne,re,ie){for(var U=1,le=ne;le<j.length;)if(le++,E=j.charAt(le),E===ie){if(U--,U===0)break}else E===re&&U++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":k.context=!0,k.contextRegex=new RegExp(k.regex),k.regex+="?";break;case"?":case"+":k.regex+=E;break;case"(":var B=z(g,A,"(",")"),S=g.substring(A+1,B);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:A};f.type="("+S+")",A=B,O();break;case"<":if(k.type==="a"||k.type==="f"){var y=z(g,A,"<",">");k.subtype=g.substring(A+1,y),A=y}else throw{code:"S0401",stack:new Error().stack,value:k.type,offset:A};break}A++}var F="^"+m.map(function(j){return"("+j.regex+")"}).join("")+"$",C=new RegExp(F),D=function(j){var ne;if(n.isFunction(j))ne="f";else{var re=typeof j;switch(re){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":j===null?ne="l":Array.isArray(j)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},Y=function(j,ne){for(var re="^",ie=0,U=0;U<m.length;U++){re+=m[U].regex;var le=ne.match(re);if(le===null)throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:j[ie],index:ie+1}};return{definition:g,validate:function(j,ne){var re="";j.forEach(function(pe){re+=D(pe)});var ie=C.exec(re);if(ie){var U=[],le=0;return m.forEach(function(pe,qe){var ue=j[le],be=ie[qe+1];if(be==="")if(pe.context&&pe.contextRegex){var $e=D(ne);if(pe.contextRegex.test($e))U.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else U.push(ue),le++;else be.split("").forEach(function(ce){if(ue=j[le],pe.type==="a"){if(ce==="m")ue=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&be!==pe.subtype)W=!1;else if(ce==="a"&&ue.length>0){var xe=D(ue[0]);if(xe!==pe.subtype.charAt(0))W=!1;else{var b=ue.filter(function(_){return D(_)!==xe});W=b.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:ue,index:le+1,type:c[pe.subtype]};ce!=="a"&&(ue=[ue])}U.push(ue),le++}else U.push(ue),le++})}),U}Y(j,re)}}}return h})();r.exports=o},{"./utils":6}],6:[function(s,r,i){const n=(()=>{function o(y){var F=!1;if(typeof y=="number"&&(F=!isNaN(y),F&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return F}function c(y){var F=!1;return Array.isArray(y)&&(F=y.filter(function(C){return typeof C!="string"}).length===0),F}function h(y){var F=!1;return Array.isArray(y)&&(F=y.filter(function(C){return!o(C)}).length===0),F}function g(y){return y.sequence===!0&&Array.isArray(y)}function A(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function m(y){var F=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return F}function f(y){return y&&y._jsonata_lambda===!0}var k=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&k in y&&"next"in y&&typeof y.next=="function"}function O(y,F){if(y===F)return!0;if(typeof y=="object"&&typeof F=="object"&&y!==null&&F!==null){if(Array.isArray(y)&&Array.isArray(F)){if(y.length!==F.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],F[C]))return!1;return!0}var D=Object.getOwnPropertyNames(y),Y=Object.getOwnPropertyNames(F);if(D.length!==Y.length)return!1;for(D=D.sort(),Y=Y.sort(),C=0;C<D.length;C++)if(D[C]!==Y[C])return!1;for(C=0;C<D.length;C++){var j=D[C];if(!O(y[j],F[j]))return!1}return!0}return!1}function z(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function B(y){var F=[];for(let C of y)F.push(C);return F}function S(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:h,isSequence:g,isFunction:A,isLambda:f,isIterable:E,getFunctionArity:m,isDeepEqual:O,stringToArray:B,isPromise:z,keys:S}})();r.exports=n},{}]},{},[3])(3)})})(Ln)),Ln.exports}var uu=cu();const hu=oa(uu);function Mn(t){return typeof t!="string"?null:t.trim()||null}function du(t){if(t==null||t==="")return null;if(typeof t=="string")return Mn(t);if(typeof t!="object")return null;const e=t;return Mn(e.url)??Mn(e.blobUrl)}function Fn(t){return Array.isArray(t)&&t.length>0&&t.every(e=>typeof e=="number"&&Number.isFinite(e))}function ca(t,e){if(!Fn(t)||!Fn(e)||t.length!==e.length)return null;let s=0,r=0,i=0;for(let n=0;n<t.length;n++)s+=t[n]*e[n],r+=t[n]*t[n],i+=e[n]*e[n];return!r||!i?null:s/Math.sqrt(r*i)}function pu(t,e,s,r=10,i=-1){if(!Array.isArray(t)||!Array.isArray(e)||!Fn(s))return[];const n=[];return t.forEach((o,c)=>{const h=ca(e[c],s);if(h===null||h<i)return;const g=o&&typeof o=="object"?o:{value:o};n.push({...g,_score:Math.round(h*1e4)/1e4})}),n.sort((o,c)=>c._score-o._score),n.slice(0,Math.max(0,r))}function fu(t){t.registerFunction("ucFirst",e=>Ir.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",r="EUR")=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(r)}).format(i)}),t.registerFunction("percent",(e,s="fr-FR",r=0)=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(r)||0}).format(i)}),t.registerFunction("date",(e,s="fr-FR",r)=>{const i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e??"");let n={dateStyle:"medium"};if(r)try{n=JSON.parse(String(r))}catch{}return new Intl.DateTimeFormat(String(s),n).format(i)}),t.registerFunction("toChart",(e,s="label",r="value",i="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const h of n){if(!h||typeof h!="object")continue;const g=h;o.push(String(g[String(s)]??"")),c.push(Number(g[String(r)]??0))}return{labels:o,datasets:[{label:String(i||""),data:c}]}}),t.registerFunction("cosine",(e,s)=>ca(e,s)),t.registerFunction("rankBySimilarity",(e,s,r,i=10,n=-1)=>pu(e,s,r,Number(i),Number(n))),t.registerFunction("mediaUrl",e=>du(e))}const ua=new Map,ha=8e3;function mu(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>ha)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${ha}).`);const e=ua.get(t);if(e)return e;try{const s=hu(t);return fu(s),ua.set(t,s),s}catch(s){const r=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${r}`)}}function gu(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${bu(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const r=t;for(const i of e.required)if(typeof i=="string"&&!(i in r))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${i}".`)}}function bu(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const vu=150,da=10,yu=200,wu=16,pa=new WeakMap;let fa=!1;function bs(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function wr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function _u(t,e,s){if(t===window){window.scrollTo(e,s);return}const r=t;typeof r.scrollTo=="function"?r.scrollTo(e,s):(r.scrollLeft=e,r.scrollTop=s)}function Su(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Xs(t){let e=pa.get(t);if(!e){const s=wr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},pa.set(t,e)}return e}function Fi(t){Xs(t).userEngaged=!0}function Ii(t){const e=Xs(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},vu)}function ma(t,e){return e-t>=yu}function _r(t){if(!bs())return;const e=Xs(t);if(e.restoring)return;const s=wr(t);if(ma(s.y,e.y)){Nn(t);return}e.x=s.x,e.y=s.y}function In(t){if(!bs())return;const e=Xs(t),s=Su(t),r=e.x,i=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=wr(t);if(!(Math.abs(r-n)<=da&&Math.abs(i-o)<=da)){e.restoring=!0;try{_u(t,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Pu(t,e={x:0,y:0}){if(!bs())return;const s=Xs(t);if(e==="current"){const r=wr(t);s.x=r.x,s.y=r.y;return}s.x=e.x??0,s.y=e.y??0}function Nn(t){const e=Xs(t);if(e.stickyFrames=wu,e.raf)return;const s=()=>{e.raf=0,In(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function Rn(t){Nn(t)}function er(t){if(!bs())return;const e=Xs(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,r=()=>{if(e.restoring)return;const{y:E}=wr(t);if(ma(E,e.y)){Nn(t);return}if(e.userEngaged){_r(t),Ii(t);return}_r(t)},i=E=>ga(E)===t,n=E=>{i(E)&&(_r(t),Fi(t))},o=E=>{i(E)&&Ii(t)},c=E=>{i(E)&&(_r(t),Fi(t),Ii(t))};s.addEventListener("scroll",r,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const h=wr(t);if(e.x=h.x,e.y=h.y,t===window){const E=new ResizeObserver(()=>Rn(window));E.observe(document.documentElement),e.resizeObserver=E;return}const g=t,A=new ResizeObserver(()=>Rn(g));A.observe(g);for(const E of Array.from(g.children))A.observe(E);e.resizeObserver=A;const m=()=>Rn(g),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const z of Array.from(O.addedNodes))z instanceof Element&&A.observe(z);m()});f.observe(g,{childList:!0,subtree:!0,characterData:!0});const k=g.getRootNode();k instanceof ShadowRoot&&k.host&&f.observe(k.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function ga(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&ba(e))return e;return window}function ba(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function jn(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&ba(s)&&er(s);const e=ga(t);er(e),t.type==="wheel"?(_r(e),Fi(e),Ii(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(_r(e),Fi(e))}function Ni(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&er(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&er(e)})}function zn(t){Ni(t),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&Ni(i)}).observe(t,{childList:!0,subtree:!0})}function Un(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(zn(e.shadowRoot),Un(e.shadowRoot))})}function xu(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(r){const i=e.call(this,r);return zn(i),i}}function va(){if(typeof window>"u"||fa||(fa=!0,!bs()))return;er(window),xu();const t={capture:!0,passive:!0};window.addEventListener("wheel",jn,t),window.addEventListener("touchstart",jn,t),window.addEventListener("pointerdown",jn,t);const e=()=>{Ni(document),Un(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(Ni(n),n.shadowRoot&&zn(n.shadowRoot),Un(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Au=Yl,Cu=Yc,ku=_i,$u=Ir,vs=Ge,Du=ut,Gr=lt,Eu=Ts,Ou=gs;va(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Au,Arrays:Cu,DataBindObserver:ku,Format:$u,HTML:vs,LocationHandler:Du,Objects:Gr,PublisherManager:me,api:Eu,URLPattern:Ou,Endpoint:Ei,DataProviderKey:$s};var Tu=Object.defineProperty,Lu=Object.getOwnPropertyDescriptor,Yr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Lu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Tu(e,s,i),i};const qn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const r=this.getAttribute("name"),i=this.getCheckAllPublisher(),n=this.getFormPublisher();if(i?.hasCheckAll.get()&&!this.checksAll()&&i&&n&&r){if(this.getFormPublisherValue()?.length)(this.checked===null||i.checkMode.get()=="noneChecked"||i.checkMode.get()==null)&&i.checkMode.set("someUnchecked");else{i.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=i.values.get();if(c&&c.length){let h=c.length;for(const g of c)o.indexOf(g)==-1&&(h-=1);h==c.length&&i.checkMode.set("allChecked"),h==0&&i.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=r=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),r=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),r=="noneChecked"&&(this.checked=null),r=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(r){if(this.value==r||(this.hasAttribute("value")&&!this.forceAutoFill&&(r=this.getAttribute("value")),this._value==r)||r==null||(this._value=r,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==r?!0:null),Array.isArray(n)||(n=[]),n.indexOf(r)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(r){if(this.setCheckedValue(r),this.checksAll()){const i=this.getCheckAllPublisher();i&&(this.checked===!0?i.checkMode.set("allChecked"):this.checked===null&&(i.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();if(i){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;i.isFormValid=!1,r.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(r){this._checked!=r&&(this._checked=r,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const r=this.checked===!0?this.radio?!0:null:!0;this.checked=r;const i=new Event("change");this.dispatchEvent(i)}getValueForFormPublisher(){let r=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:r;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(r)||(r=[]);const i=r.slice(0),n=i.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&i.push(this.value),this.checked===null&&n!==-1&&i.splice(n,1),i}setFormValueFromPublisher(r){if(this.unique||this.radio){this.checked=this.value==r?!0:null;return}Array.isArray(r)||(r=[]),!this.checksAll()&&(this.checked=r.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const r=this.formDataProvider,i=this.getAttribute("name");return!r||!i?null:me.get(r+"/"+i+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const r=this.getCheckAllPublisher();if(r&&(r.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const i=r.values.get().slice(0),n=i.indexOf(this.value);n!=-1&&(i.splice(n,1),r.values.set(i))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const i=this.getCheckAllPublisher();i&&(i.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&i.hasCheckAll.set(!0),i.values.get()||i.values.set([]),this.checksAll()||i.values.set([...i.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Yr([u()],e.prototype,"value",1),Yr([u()],e.prototype,"forceAutoFill",2),Yr([u({type:Boolean})],e.prototype,"unique",2),Yr([u({type:Boolean})],e.prototype,"radio",2),Yr([u()],e.prototype,"checked",1),e};/**
76
76
  * @license
77
77
  * Copyright 2018 Google LLC
78
78
  * SPDX-License-Identifier: BSD-3-Clause
79
- */const te=t=>t??re,ss=ee`
79
+ */const te=t=>t??se,rs=X`
80
80
  /*SIZES*/
81
81
  :host {
82
82
  --sc-_fs: 1rem;
@@ -109,7 +109,7 @@
109
109
  :host([size="inherit"]) {
110
110
  --sc-_fs: 1em;
111
111
  }
112
- `;var ou=Object.defineProperty,au=Object.getOwnPropertyDescriptor,qe=(t,e,s,r)=>{for(var i=r>1?void 0:r?au(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ou(e,s,i),i};const lu="sonic-button";let Me=class extends Fn(br(nt(J))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?ct.onChange(this):ct.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),ct.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),ct.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?be.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&ct.updateComponentActiveState(this),t.has("location")&&ct.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=R`
112
+ `;var Mu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,He=(t,e,s,r)=>{for(var i=r>1?void 0:r?Fu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Mu(e,s,i),i};const Iu="sonic-button";let Ie=class extends qn(yr(J)){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?ut.onChange(this):ut.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),ut.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),ut.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?me.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){ut.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&ut.updateComponentActiveState(this),t.has("location")&&ut.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},e=R`
113
113
  <button
114
114
  part="button"
115
115
  class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
@@ -118,6 +118,7 @@
118
118
  aria-expanded=${te(this.sonicAriaExpanded)}
119
119
  aria-label=${te(this.ariaLabel)}
120
120
  aria-labelledby=${te(this.ariaLabelledby)}
121
+ aria-busy=${te(this.loading?"true":void 0)}
121
122
  ?disabled=${this.disabled}
122
123
  @click=${this.handleChange}
123
124
  @pointerdown=${this.handleRepeatStart}
@@ -143,7 +144,7 @@
143
144
  aria-labelledby=${te(this.ariaLabelledby)}
144
145
  @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
145
146
  >${e}</a
146
- >`:R`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};Me.styles=[ss,ee`
147
+ >`:R`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};Ie.styles=[rs,X`
147
148
  * {
148
149
  box-sizing: border-box;
149
150
  }
@@ -480,8 +481,9 @@
480
481
  position: relative;
481
482
  }
482
483
 
483
- :host([loading]) slot {
484
- opacity: 0 !important;
484
+ :host([loading]) slot,
485
+ :host([loading]) slot::slotted(*) {
486
+ visibility: hidden !important;
485
487
  pointer-events: none;
486
488
  }
487
489
  /*Loading*/
@@ -494,8 +496,8 @@
494
496
  align-items: center;
495
497
  justify-content: center;
496
498
  line-height: 0;
497
- height: var(--sc-btn-ff);
498
- width: var(--sc-btn-ff);
499
+ height: var(--sc-btn-fs);
500
+ width: var(--sc-btn-fs);
499
501
  animation: rotation 2s infinite linear;
500
502
  }
501
503
 
@@ -509,11 +511,11 @@
509
511
  transform: translate(-50%, -50%) rotate(359deg);
510
512
  }
511
513
  }
512
- `],qe([u({type:String,reflect:!0})],Me.prototype,"type",2),qe([u({type:String,reflect:!0})],Me.prototype,"variant",2),qe([u({type:String,reflect:!0})],Me.prototype,"size",2),qe([u({type:String,reflect:!0})],Me.prototype,"shape",2),qe([u({type:String})],Me.prototype,"direction",2),qe([u({type:String,reflect:!0})],Me.prototype,"alignItems",2),qe([u({type:String})],Me.prototype,"justify",2),qe([u({type:String,reflect:!0})],Me.prototype,"align",2),qe([u({type:String})],Me.prototype,"minWidth",2),qe([u({type:Boolean,reflect:!0})],Me.prototype,"icon",2),qe([u({type:String})],Me.prototype,"download",2),qe([u({type:String})],Me.prototype,"autoActive",2),qe([u({type:Boolean,reflect:!0})],Me.prototype,"loading",2),qe([Ae()],Me.prototype,"hasPrefix",2),qe([Ae()],Me.prototype,"hasSuffix",2),qe([Ir({flatten:!0,slot:"prefix"})],Me.prototype,"prefixes",2),qe([Ir({flatten:!0,slot:"suffix"})],Me.prototype,"suffixes",2),qe([u({type:String})],Me.prototype,"target",2),qe([u({type:String})],Me.prototype,"href",1),qe([u({type:String})],Me.prototype,"goBack",2),qe([u({type:Boolean})],Me.prototype,"pushState",2),qe([u({type:Boolean,reflect:!0})],Me.prototype,"active",2),qe([u({type:Boolean,reflect:!0})],Me.prototype,"autoRepeat",2),qe([u({type:String,attribute:"data-aria-controls"})],Me.prototype,"ariaControls",2),qe([u({type:Boolean,attribute:"data-aria-expanded"})],Me.prototype,"sonicAriaExpanded",2),qe([Ae()],Me.prototype,"location",2),Me=qe([X(lu)],Me);/**
514
+ `],He([u({type:String,reflect:!0})],Ie.prototype,"type",2),He([u({type:String,reflect:!0})],Ie.prototype,"variant",2),He([u({type:String,reflect:!0})],Ie.prototype,"size",2),He([u({type:String,reflect:!0})],Ie.prototype,"shape",2),He([u({type:String})],Ie.prototype,"direction",2),He([u({type:String,reflect:!0})],Ie.prototype,"alignItems",2),He([u({type:String})],Ie.prototype,"justify",2),He([u({type:String,reflect:!0})],Ie.prototype,"align",2),He([u({type:String})],Ie.prototype,"minWidth",2),He([u({type:Boolean,reflect:!0})],Ie.prototype,"icon",2),He([u({type:String})],Ie.prototype,"download",2),He([u({type:String})],Ie.prototype,"autoActive",2),He([u({type:Boolean,reflect:!0})],Ie.prototype,"loading",2),He([Ae()],Ie.prototype,"hasPrefix",2),He([Ae()],Ie.prototype,"hasSuffix",2),He([jr({flatten:!0,slot:"prefix"})],Ie.prototype,"prefixes",2),He([jr({flatten:!0,slot:"suffix"})],Ie.prototype,"suffixes",2),He([u({type:String})],Ie.prototype,"target",2),He([u({type:String})],Ie.prototype,"href",1),He([u({type:String})],Ie.prototype,"goBack",2),He([u({type:Boolean})],Ie.prototype,"pushState",2),He([u({type:Boolean,reflect:!0})],Ie.prototype,"active",2),He([u({type:Boolean,reflect:!0})],Ie.prototype,"autoRepeat",2),He([u({type:String,attribute:"data-aria-controls"})],Ie.prototype,"ariaControls",2),He([u({type:Boolean,attribute:"data-aria-expanded"})],Ie.prototype,"sonicAriaExpanded",2),He([Ae()],Ie.prototype,"location",2),Ie=He([Q(Iu)],Ie);/**
513
515
  * @license
514
516
  * Copyright 2017 Google LLC
515
517
  * SPDX-License-Identifier: BSD-3-Clause
516
- */const ua=(t,e,s)=>{const r=new Map;for(let i=e;i<=s;i++)r.set(t[i],i);return r},Ii=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let r;s===void 0?s=e:e!==void 0&&(r=e);const i=[],n=[];let o=0;for(const c of t)i[o]=r?r(c,o):o,n[o]=s(c,o),o++;return{values:n,keys:i}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,r]){const i=ic(t),{values:n,keys:o}=this.dt(e,s,r);if(!Array.isArray(i))return this.ut=o,n;const c=this.ut??=[],h=[];let b,k,g=0,f=i.length-1,A=0,E=n.length-1;for(;g<=f&&A<=E;)if(i[g]===null)g++;else if(i[f]===null)f--;else if(c[g]===o[A])h[A]=Ks(i[g],n[A]),g++,A++;else if(c[f]===o[E])h[E]=Ks(i[f],n[E]),f--,E--;else if(c[g]===o[E])h[E]=Ks(i[g],n[E]),Rr(t,h[E+1],i[g]),g++,E--;else if(c[f]===o[A])h[A]=Ks(i[f],n[A]),Rr(t,i[g],i[f]),f--,A++;else if(b===void 0&&(b=ua(o,A,E),k=ua(c,g,f)),b.has(c[g]))if(b.has(c[f])){const O=k.get(o[A]),N=O!==void 0?i[O]:null;if(N===null){const U=Rr(t,i[g]);Ks(U,n[A]),h[A]=U}else h[A]=Ks(N,n[A]),Rr(t,i[g],N),i[O]=null;A++}else _n(i[f]),f--;else _n(i[g]),g++;for(;A<=E;){const O=Rr(t,h[E+1]);Ks(O,n[A]),h[A++]=O}for(;g<=f;){const O=i[g++];O!==null&&_n(O)}return this.ut=o,rc(t,h),Nt}}),cu=new WeakMap;let ha=0;const jn=new Map,da=new WeakSet,pa=()=>new Promise((t=>requestAnimationFrame(t))),fa=(t,e)=>{const s=t-e;return s===0?void 0:s},ga=(t,e)=>{const s=t/e;return s===1?void 0:s},Rn={left:(t,e)=>{const s=fa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=fa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const r=ga(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleX(${r})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const r=ga(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleY(${r})`}}},uu={duration:333,easing:"ease-in-out"},hu=["left","top","width","height","opacity","color","background"],ba=new WeakMap;class du extends Pn{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Ys.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return re}getController(){return cu.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const r=this.u===void 0;return r&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=e.element,ba.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=hu,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),r=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const n=s[i]??(Rn[i]?void 0:r[i]),o=Number(n);e[i]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((r,i)=>{if(Array.isArray(r)){if(Array.isArray(i)&&i.length===r.length&&r.every(((n,o)=>n===i[o])))return!1}else if(i===r)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await pa;const s=this.O(),r=this.j(this.options.keyframeOptions,s),i=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,i,s);this.log("measured",[this.A,i,n,o]),e=this.calculateKeyframes(n,o)}else{const n=jn.get(this.options.inId);if(n){jn.delete(this.options.inId);const{from:o,to:c}=this.N(n,i,s);e=this.calculateKeyframes(o,c),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,ha++,e.forEach((h=>h.zIndex=ha))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,r)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&jn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await pa(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,n=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&n===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const r=ba.get(s);r&&!r.isDisabled()&&r&&e.push(r)}return e}get isHostRendered(){const e=da.has(this.u);return e||this.u.updateComplete.then((()=>{da.add(this.u)})),e}j(e,s=this.O()){const r={...uu};return s.forEach((i=>Object.assign(r,i.options.keyframeOptions))),Object.assign(r,e),r}N(e,s,r){e={...e},s={...s};const i=r.map((c=>c.animatingProperties)).filter((c=>c!==void 0));let n=1,o=1;return i.length>0&&(i.forEach((c=>{c.width&&(n/=c.width),c.height&&(o/=c.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,r=!1){const i={},n={};let o=!1;const c={};for(const h in s){const b=e[h],k=s[h];if(h in Rn){const g=Rn[h];if(b===void 0||k===void 0)continue;const f=g(b,k);f.transform!==void 0&&(c[h]=f.value,o=!0,i.transform=`${i.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(i,f.overrideFrom))}else b!==k&&b!==void 0&&k!==void 0&&(o=!0,i[h]=b,n[h]=k)}return i.transformOrigin=n.transformOrigin=r?"center center":"top left",this.animatingProperties=c,o?[i,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let r=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),r=!0,this.webAnimation=this.element.animate(e,s);const i=this.getController();i?.add(this);try{await this.webAnimation.finished}catch{}i?.remove(this)}return this.didFinish(r),r}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const pu=$s(du),fu={core:{cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
518
+ */const ya=(t,e,s)=>{const r=new Map;for(let i=e;i<=s;i++)r.set(t[i],i);return r},Ri=Os(class extends br{constructor(t){if(super(t),t.type!==Qs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let r;s===void 0?s=e:e!==void 0&&(r=e);const i=[],n=[];let o=0;for(const c of t)i[o]=r?r(c,o):o,n[o]=s(c,o),o++;return{values:n,keys:i}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,r]){const i=Tc(t),{values:n,keys:o}=this.dt(e,s,r);if(!Array.isArray(i))return this.ut=o,n;const c=this.ut??=[],h=[];let g,A,m=0,f=i.length-1,k=0,E=n.length-1;for(;m<=f&&k<=E;)if(i[m]===null)m++;else if(i[f]===null)f--;else if(c[m]===o[k])h[k]=Js(i[m],n[k]),m++,k++;else if(c[f]===o[E])h[E]=Js(i[f],n[E]),f--,E--;else if(c[m]===o[E])h[E]=Js(i[m],n[E]),Br(t,h[E+1],i[m]),m++,E--;else if(c[f]===o[k])h[k]=Js(i[f],n[k]),Br(t,i[m],i[f]),f--,k++;else if(g===void 0&&(g=ya(o,k,E),A=ya(c,m,f)),g.has(c[m]))if(g.has(c[f])){const O=A.get(o[k]),z=O!==void 0?i[O]:null;if(z===null){const B=Br(t,i[m]);Js(B,n[k]),h[k]=B}else h[k]=Js(z,n[k]),Br(t,i[m],z),i[O]=null;k++}else Cn(i[f]),f--;else Cn(i[m]),m++;for(;k<=E;){const O=Br(t,h[E+1]);Js(O,n[k]),h[k++]=O}for(;m<=f;){const O=i[m++];O!==null&&Cn(O)}return this.ut=o,Oc(t,h),Nt}}),Nu=new WeakMap;let wa=0;const Bn=new Map,_a=new WeakSet,Sa=()=>new Promise((t=>requestAnimationFrame(t))),Pa=(t,e)=>{const s=t-e;return s===0?void 0:s},xa=(t,e)=>{const s=t/e;return s===1?void 0:s},Hn={left:(t,e)=>{const s=Pa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=Pa(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const r=xa(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleX(${r})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const r=xa(t,e);return{value:r,overrideFrom:s,transform:r==null||isNaN(r)?void 0:`scaleY(${r})`}}},Ru={duration:333,easing:"ease-in-out"},ju=["left","top","width","height","opacity","color","background"],Aa=new WeakMap;class zu extends kn{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Qs.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return se}getController(){return Nu.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const r=this.u===void 0;return r&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((i=>this.t=!0)),this.element=e.element,Aa.set(this.element,this)),this.optionsOrCallback=s,(r||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=ju,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),r=getComputedStyle(this.element);return this.options.properties.forEach((i=>{const n=s[i]??(Hn[i]?void 0:r[i]),o=Number(n);e[i]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((r,i)=>{if(Array.isArray(r)){if(Array.isArray(i)&&i.length===r.length&&r.every(((n,o)=>n===i[o])))return!1}else if(i===r)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await Sa;const s=this.O(),r=this.j(this.options.keyframeOptions,s),i=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,i,s);this.log("measured",[this.A,i,n,o]),e=this.calculateKeyframes(n,o)}else{const n=Bn.get(this.options.inId);if(n){Bn.delete(this.options.inId);const{from:o,to:c}=this.N(n,i,s);e=this.calculateKeyframes(o,c),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,wa++,e.forEach((h=>h.zIndex=wa))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,r)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&Bn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Sa(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const r=this.m();this.log("stabilizing out");const i=this.A.left-r.left,n=this.A.top-r.top;getComputedStyle(this.element).position!=="static"||i===0&&n===0||(this.element.style.position="relative"),i!==0&&(this.element.style.left=i+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const r=Aa.get(s);r&&!r.isDisabled()&&r&&e.push(r)}return e}get isHostRendered(){const e=_a.has(this.u);return e||this.u.updateComplete.then((()=>{_a.add(this.u)})),e}j(e,s=this.O()){const r={...Ru};return s.forEach((i=>Object.assign(r,i.options.keyframeOptions))),Object.assign(r,e),r}N(e,s,r){e={...e},s={...s};const i=r.map((c=>c.animatingProperties)).filter((c=>c!==void 0));let n=1,o=1;return i.length>0&&(i.forEach((c=>{c.width&&(n/=c.width),c.height&&(o/=c.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,r=!1){const i={},n={};let o=!1;const c={};for(const h in s){const g=e[h],A=s[h];if(h in Hn){const m=Hn[h];if(g===void 0||A===void 0)continue;const f=m(g,A);f.transform!==void 0&&(c[h]=f.value,o=!0,i.transform=`${i.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(i,f.overrideFrom))}else g!==A&&g!==void 0&&A!==void 0&&(o=!0,i[h]=g,n[h]=A)}return i.transformOrigin=n.transformOrigin=r?"center center":"top left",this.animatingProperties=c,o?[i,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let r=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),r=!0,this.webAnimation=this.element.animate(e,s);const i=this.getController();i?.add(this);try{await this.webAnimation.finished}catch{}i?.remove(this)}return this.didFinish(r),r}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const Uu=Os(zu),qu={core:{cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
517
519
  <path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
518
520
  </svg>
519
521
  `,"check-circled-outline":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -549,7 +551,7 @@
549
551
  <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
550
552
  <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
551
553
  </svg>
552
- `}},Ni=new Map,ma={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};function gu(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const r=document.querySelector("[customIconLibraryPath]");e=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function bu(t,e){return t in ma?t!=="custom"?ma[t]:gu(e):null}const va=sessionStorage.getItem("sonicIconsCache"),bs=va?JSON.parse(va):{icons:{},names:[]},mu=100,Po=class Po{};Po.default={get:async e=>{const s=e.library;if(!e.name)return"";const r=e.name,i=fu;if(!s)return je(i.core[e.name]||"");const n=bu(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=i[s]||{};i[s]=c;const h=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(c[h])return je(c[h]);const b=(n.url||"").replace("$prefix",o).replace("$name",r);if(bs.icons[b]){const g=bs.icons[b];if(/^\s*<svg[\s>]/i.test(g||""))return c[h]=g,je(g);delete bs.icons[b]}if(!Ni.has(b)){const g=new Promise(async f=>{try{const A=await fetch(b);if(!A.ok){f("");return}try{const E=A.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await A.text(),N=/^\s*<svg[\s>]/i.test(O);f(N?O:"")}catch{f("")}}catch{cc(),f("")}});Ni.set(b,g)}const k=await Ni.get(b);if(Ni.delete(b),c[h]=k||"",k&&/^\s*<svg[\s>]/i.test(k)&&(bs.icons[b]=k,bs.names.push(b)),bs.names.length>mu){const g=bs.names.shift();delete bs.icons[g]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(bs)),k?je(k):""}return je(i.core[e.name]||"")}};let zn=Po;function vu(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function yu(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function wu(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Js(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=vu,t.__onConnected__=yu,t.__onDisconnected__=wu;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function _u(t){return t.trim().replace(/^this\./,"")}function Un(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let r=t;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function Pu(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Ot(t,e,s){let r=!1;const i=(c,h)=>{const b=_u(h),k=Un(t,b);return Pu(k,s)?(r=!0,""):`${k}`},n=e.replace(/\$\{([^}]+)\}/g,i).replace(/\{\$([^}]+)\}/g,i).trim();if(r||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Ut(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of e){let i;for(;(i=r.exec(t))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function ya(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Wr=new WeakMap,Kr=new Set;let yr=null;const xu=8;function Su(t){let e=Wr.get(t);return e||(e=new Map,Wr.set(t,e)),e}function Au(t,e){const s=new Set;for(const[r,i]of e){const n=Un(t,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function Cu(){yr=null;let t=0,e=!0;for(;e&&t<xu;){e=!1,t+=1;for(const s of Kr){const r=Wr.get(s);if(!r||r.size===0)continue;const i=Au(s,r);i.size!==0&&(e=!0,i.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Kr.size>0&&wa()}function wa(){yr===null&&(yr=requestAnimationFrame(Cu))}function ku(){Kr.size===0&&yr!==null&&(cancelAnimationFrame(yr),yr=null)}function Es(t,e,s,r,i){const n=String(r),o=Su(s);let c=o.get(n);return c||(c={lastValue:Un(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(i),Kr.add(s),wa(),()=>{const h=Wr.get(s);if(!h)return;const b=h.get(n);b&&(b.onChangeHandlers.delete(i),b.onChangeHandlers.size===0&&h.delete(n),h.size===0&&(Wr.delete(s),Kr.delete(s),ku()))}}const Fi={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},_a={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Os={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Pa={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Gt(t){const e=t.split(".").filter(i=>i.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let r=be.get(s);return r?(r=Br.traverse(r,e),r):null}function $u(t,e){const s=e?.reflect??!1,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ut(t),n=i.length>0;return function(o,c){if(!o)return;Js(o);const h=`__bind_state_${c}`,b=`__bind_${c}_publisher__`,k=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const g=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,A=`__bind_${c}_updating_from_publisher__`,E=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(o,c,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){g?.set?g.set.call(this,O):this[f]=O,!this[A]&&this[b]&&this[b].set(O)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0})}o.__onConnected__(g=>{const f=g[h]||(g[h]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const A=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,g[b]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const N=Gt(O);if(!N){f.currentPath=null,g[b]=null;return}const U=P=>{s&&k&&(g[k]=!0),g[c]=P,s&&k&&(g[k]=!1)};N.onAssign(U),f.unsubscribePublisher=()=>{N.offAssign(U),g[b]===N&&(g[b]=null)},f.currentPath=O,g[b]=N},E=()=>{if(n){const O=Ot(g,t,r);if(!O.ready){A(null);return}A(O.path);return}A(t)};if(n)for(const O of i){const N=Es(Fi.watcherStore,Fi.hooked,g,O,()=>E());f.cleanupWatchers.push(N)}E()}),o.__onDisconnected__(g=>{const f=g[h];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(A=>A()),f.cleanupWatchers=[],f.currentPath=null,g[b]=null)})}}function xa(t,e){const s=ya(t)?t.path:t;return $u(s,e)}function Sa(t,e){const s=t.path,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ut(s);return function(n,o){Js(n);const c=`__publish_${o}_publisher__`,h=`__publish_${o}_value__`,b=Object.getOwnPropertyDescriptor(n,o),k=b&&!b.get&&!b.set?b.value:void 0;Object.defineProperty(n,o,{get(){return b?.get?b.get.call(this):(!Object.prototype.hasOwnProperty.call(this,h)&&k!==void 0&&(this[h]=k),this[h])},set(g){b?.set?b.set.call(this,g):this[h]=g;const f=this[c];f&&f.set(g)},enumerable:b?.enumerable??!0,configurable:b?.configurable??!0}),n.__onConnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A]||(f[A]={cleanupWatchers:[]}),O=()=>{let N;if(i.length){const P=Ot(g,s,r);N=P.ready?P.path:null}else N=s;const U=N?Gt(N):void 0;if(f[c]=U??null,U&&o in g){const P=f[o];P!==void 0&&U.set(P)}};if(E.cleanupWatchers.forEach(N=>N()),E.cleanupWatchers=[],i.length)for(const N of i)E.cleanupWatchers.push(Es(_a.watcherStore,_a.hooked,f,N,O));O()}),n.__onDisconnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function Aa(t){return xa(t)}const Du={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function Eu(t,e){return e.some(s=>Du[s](t))}function Ou(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(i=>i!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<e;r++)if(Eu(t[r],s.skip))return!1}return!0}function Tu(...t){return Ca({},t)}function Ca(t,e){const s=e.map(i=>{const n=Ut(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(i,n,o){Js(i);const c=`__onAssign_state_${n}__`;let h;i.__onConnected__(b=>{const k=b[c]||(b[c]={cleanupWatchers:[],configurations:[]});k.cleanupWatchers.forEach(O=>O()),k.cleanupWatchers=[],k.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),k.configurations=[];const g=[],f=[];for(let O=0;O<e.length;O++){const N=s[O],U=new Set,P=y=>{g[O]=y,Ou(g,e.length,t)&&U.forEach(I=>I(...g))};f.push({publisher:null,onAssign:P,callbacks:U,unsubscribePublisher:null,pathConfig:N,index:O})}const A=(O,N)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),g[O.index]=null,O.publisher=null,!N)return;const U=Gt(N);U&&(U.onAssign(O.onAssign),O.unsubscribePublisher=()=>{U.offAssign(O.onAssign),O.publisher===U&&(O.publisher=null)},O.publisher=U)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const N=Ot(b,O.pathConfig.originalPath,r);if(!N.ready){A(O,null);continue}A(O,N.path)}else A(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const N of O.pathConfig.dynamicDependencies){const U=Es(Pa.watcherStore,Pa.hooked,b,N,()=>E());k.cleanupWatchers.push(U)}h=o.value.bind(b);for(const O of f)O.callbacks.add(h);E(),k.configurations=f}),i.__onDisconnected__(b=>{const k=b[c];k&&(k.cleanupWatchers.forEach(g=>g()),k.cleanupWatchers=[],k.configurations.forEach(g=>{g.unsubscribePublisher&&g.unsubscribePublisher(),g.callbacks.delete(h)}),k.configurations=[])})}}function Lu(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function Mu(...t){const e=t[t.length-1],s=e!==void 0&&!Lu(e),r=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return Ca({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function Iu(){return function(t,e,s){let r=0;const i=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...c){let h=new Set;const b=()=>{r++;const g=r;window.queueMicrotask(()=>{g===r&&this[e]()})};h.forEach(g=>{g.offAssign(b)}),$o();const k=i.apply(this,c);return h=Do()||new Set,h.forEach(g=>{g.onAssign(b,!1)}),this.__removeAutoSubscribe__=()=>{h.forEach(g=>{g.offAssign(b)})},k}}}function Nu(t){return function(e){Js(e);for(const s of t){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=be.get(i);n=Br.traverse(n,r),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function Fu(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function ju(t,e){const s=[];let r=!1;const i=Je.scopeAttributeNames(t.attributeName),n=()=>{for(const o of s)o.disconnect();if(s.length=0,!r)for(const o of Fu(t.component)){const c=new MutationObserver(h=>{r||(h.some(b=>b.type==="childList")&&n(),e())});c.observe(o,{attributes:!0,attributeFilter:i,childList:!0,subtree:!1}),s.push(c)}};return n(),()=>{r=!0;for(const o of s)o.disconnect();s.length=0}}function ka(t,e,s,r){const i=t,n=Je.getAncestorAttributeValue(t,e);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const Be=class Be{static subscribe(e,s,r,i={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:r,syncOptions:i,disconnectObservers:null};return n.disconnectObservers=ju(n,()=>{Be.subscriptions.has(n)&&(Be.pendingRefresh.add(n),Be.scheduleRefresh())}),Be.subscriptions.add(n),()=>{Be.unsubscribe(n)}}static unsubscribe(e){Be.subscriptions.has(e)&&(e.disconnectObservers?.(),e.disconnectObservers=null,Be.subscriptions.delete(e),Be.pendingRefresh.delete(e),Be.subscriptions.size===0&&Be.cancelScheduledRefresh())}static scheduleRefresh(){Be.pendingRefresh.size!==0&&Be.animationFrameId===null&&(Be.animationFrameId=requestAnimationFrame(()=>{Be.flushRefresh()}))}static cancelScheduledRefresh(){Be.animationFrameId!==null&&(cancelAnimationFrame(Be.animationFrameId),Be.animationFrameId=null),Be.pendingRefresh.clear()}static flushRefresh(){Be.animationFrameId=null;const e=Array.from(Be.pendingRefresh);Be.pendingRefresh.clear();for(const s of e)Be.subscriptions.has(s)&&s.component.isConnected&&ka(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};Be.subscriptions=new Set,Be.pendingRefresh=new Set,Be.animationFrameId=null;let qn=Be;function Vn(t,e){const s=e?.dynamic??!1,r=s;return function(i,n){if(!i||(Js(i),i.__onBeforeConnected__(c=>{ka(c,t,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(c=>{o=qn.subscribe(c,t,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var Ru=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,Xs=(t,e,s,r)=>{for(var i=r>1?void 0:r?zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ru(e,s,i),i};const Bn=t=>u(t),Uu="sonic-icon";let ms=class extends J{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await zn.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:re}};ms.styles=ee`
554
+ `}},ji=new Map,Ca={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};function Bu(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const r=document.querySelector("[customIconLibraryPath]");e=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function Hu(t,e){return t in Ca?t!=="custom"?Ca[t]:Bu(e):null}const ka=sessionStorage.getItem("sonicIconsCache"),ys=ka?JSON.parse(ka):{icons:{},names:[]},Vu=100,Oo=class Oo{};Oo.default={get:async e=>{const s=e.library;if(!e.name)return"";const r=e.name,i=qu;if(!s)return Be(i.core[e.name]||"");const n=Hu(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=i[s]||{};i[s]=c;const h=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(c[h])return Be(c[h]);const g=(n.url||"").replace("$prefix",o).replace("$name",r);if(ys.icons[g]){const m=ys.icons[g];if(/^\s*<svg[\s>]/i.test(m||""))return c[h]=m,Be(m);delete ys.icons[g]}if(!ji.has(g)){const m=new Promise(async f=>{try{const k=await fetch(g);if(!k.ok){f("");return}try{const E=k.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await k.text(),z=/^\s*<svg[\s>]/i.test(O);f(z?O:"")}catch{f("")}}catch{Nc(),f("")}});ji.set(g,m)}const A=await ji.get(g);if(ji.delete(g),c[h]=A||"",A&&/^\s*<svg[\s>]/i.test(A)&&(ys.icons[g]=A,ys.names.push(g)),ys.names.length>Vu){const m=ys.names.shift();delete ys.icons[m]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(ys)),A?Be(A):""}return Be(i.core[e.name]||"")}};let Vn=Oo;function Wu(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function Ku(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function Gu(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function tr(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=Wu,t.__onConnected__=Ku,t.__onDisconnected__=Gu;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function Yu(t){return t.trim().replace(/^this\./,"")}function Wn(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let r=t;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function Zu(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Ot(t,e,s){let r=!1;const i=(c,h)=>{const g=Yu(h),A=Wn(t,g);return Zu(A,s)?(r=!0,""):`${A}`},n=e.replace(/\$\{([^}]+)\}/g,i).replace(/\{\$([^}]+)\}/g,i).trim();if(r||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Bt(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of e){let i;for(;(i=r.exec(t))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function $a(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Zr=new WeakMap,Jr=new Set;let Sr=null;const Ju=8;function Qu(t){let e=Zr.get(t);return e||(e=new Map,Zr.set(t,e)),e}function Xu(t,e){const s=new Set;for(const[r,i]of e){const n=Wn(t,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function eh(){Sr=null;let t=0,e=!0;for(;e&&t<Ju;){e=!1,t+=1;for(const s of Jr){const r=Zr.get(s);if(!r||r.size===0)continue;const i=Xu(s,r);i.size!==0&&(e=!0,i.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Jr.size>0&&Da()}function Da(){Sr===null&&(Sr=requestAnimationFrame(eh))}function th(){Jr.size===0&&Sr!==null&&(cancelAnimationFrame(Sr),Sr=null)}function Ls(t,e,s,r,i){const n=String(r),o=Qu(s);let c=o.get(n);return c||(c={lastValue:Wn(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(i),Jr.add(s),Da(),()=>{const h=Zr.get(s);if(!h)return;const g=h.get(n);g&&(g.onChangeHandlers.delete(i),g.onChangeHandlers.size===0&&h.delete(n),h.size===0&&(Zr.delete(s),Jr.delete(s),th()))}}const zi={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},Ea={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Ms={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Oa={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Qt(t){const e=t.split(".").filter(i=>i.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let r=me.get(s);return r?(r=Gr.traverse(r,e),r):null}function sh(t,e){const s=e?.reflect??!1,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Bt(t),n=i.length>0;return function(o,c){if(!o)return;tr(o);const h=`__bind_state_${c}`,g=`__bind_${c}_publisher__`,A=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const m=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,k=`__bind_${c}_updating_from_publisher__`,E=m&&!m.get&&!m.set?m.value:void 0;Object.defineProperty(o,c,{get(){return m?.get?m.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){m?.set?m.set.call(this,O):this[f]=O,!this[k]&&this[g]&&this[g].set(O)},enumerable:m?.enumerable??!0,configurable:m?.configurable??!0})}o.__onConnected__(m=>{const f=m[h]||(m[h]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const k=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,m[g]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const z=Qt(O);if(!z){f.currentPath=null,m[g]=null;return}const B=S=>{s&&A&&(m[A]=!0),m[c]=S,s&&A&&(m[A]=!1)};z.onAssign(B),f.unsubscribePublisher=()=>{z.offAssign(B),m[g]===z&&(m[g]=null)},f.currentPath=O,m[g]=z},E=()=>{if(n){const O=Ot(m,t,r);if(!O.ready){k(null);return}k(O.path);return}k(t)};if(n)for(const O of i){const z=Ls(zi.watcherStore,zi.hooked,m,O,()=>E());f.cleanupWatchers.push(z)}E()}),o.__onDisconnected__(m=>{const f=m[h];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(k=>k()),f.cleanupWatchers=[],f.currentPath=null,m[g]=null)})}}function Ta(t,e){const s=$a(t)?t.path:t;return sh(s,e)}function La(t,e){const s=t.path,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Bt(s);return function(n,o){tr(n);const c=`__publish_${o}_publisher__`,h=`__publish_${o}_value__`,g=Object.getOwnPropertyDescriptor(n,o),A=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(n,o,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,h)&&A!==void 0&&(this[h]=A),this[h])},set(m){g?.set?g.set.call(this,m):this[h]=m;const f=this[c];f&&f.set(m)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0}),n.__onConnected__(m=>{const f=m,k=`__publish_state_${o}`,E=f[k]||(f[k]={cleanupWatchers:[]}),O=()=>{let z;if(i.length){const S=Ot(m,s,r);z=S.ready?S.path:null}else z=s;const B=z?Qt(z):void 0;if(f[c]=B??null,B&&o in m){const S=f[o];S!==void 0&&B.set(S)}};if(E.cleanupWatchers.forEach(z=>z()),E.cleanupWatchers=[],i.length)for(const z of i)E.cleanupWatchers.push(Ls(Ea.watcherStore,Ea.hooked,f,z,O));O()}),n.__onDisconnected__(m=>{const f=m,k=`__publish_state_${o}`,E=f[k];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function Ma(t){return Ta(t)}const rh={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function ih(t,e){return e.some(s=>rh[s](t))}function nh(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(i=>i!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<e;r++)if(ih(t[r],s.skip))return!1}return!0}function oh(...t){return Fa({},t)}function Fa(t,e){const s=e.map(i=>{const n=Bt(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(i,n,o){tr(i);const c=`__onAssign_state_${n}__`;let h;i.__onConnected__(g=>{const A=g[c]||(g[c]={cleanupWatchers:[],configurations:[]});A.cleanupWatchers.forEach(O=>O()),A.cleanupWatchers=[],A.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),A.configurations=[];const m=[],f=[];for(let O=0;O<e.length;O++){const z=s[O],B=new Set,S=y=>{m[O]=y,nh(m,e.length,t)&&B.forEach(F=>F(...m))};f.push({publisher:null,onAssign:S,callbacks:B,unsubscribePublisher:null,pathConfig:z,index:O})}const k=(O,z)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),m[O.index]=null,O.publisher=null,!z)return;const B=Qt(z);B&&(B.onAssign(O.onAssign),O.unsubscribePublisher=()=>{B.offAssign(O.onAssign),O.publisher===B&&(O.publisher=null)},O.publisher=B)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const z=Ot(g,O.pathConfig.originalPath,r);if(!z.ready){k(O,null);continue}k(O,z.path)}else k(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const z of O.pathConfig.dynamicDependencies){const B=Ls(Oa.watcherStore,Oa.hooked,g,z,()=>E());A.cleanupWatchers.push(B)}h=o.value.bind(g);for(const O of f)O.callbacks.add(h);E(),A.configurations=f}),i.__onDisconnected__(g=>{const A=g[c];A&&(A.cleanupWatchers.forEach(m=>m()),A.cleanupWatchers=[],A.configurations.forEach(m=>{m.unsubscribePublisher&&m.unsubscribePublisher(),m.callbacks.delete(h)}),A.configurations=[])})}}function ah(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function lh(...t){const e=t[t.length-1],s=e!==void 0&&!ah(e),r=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return Fa({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function ch(){return function(t,e,s){let r=0;const i=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...c){let h=new Set;const g=()=>{r++;const m=r;window.queueMicrotask(()=>{m===r&&this[e]()})};h.forEach(m=>{m.offAssign(g)}),No();const A=i.apply(this,c);return h=Ro()||new Set,h.forEach(m=>{m.onAssign(g,!1)}),this.__removeAutoSubscribe__=()=>{h.forEach(m=>{m.offAssign(g)})},A}}}function uh(t){return function(e){tr(e);for(const s of t){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=me.get(i);n=Gr.traverse(n,r),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function hh(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function dh(t){const e=t.parentNode||(t.getRootNode()?.host??null);return e instanceof Element?e:null}function Ia(t,e,s,r){const i=t,n=Ge.getAncestorAttributeValue(t,e);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const ye=class ye{static subscribe(e,s,r,i={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:r,syncOptions:i,watchedAncestors:[],parentForReparent:null};return ye.subscriptions.add(n),ye.bindSubscription(n),()=>{ye.unsubscribe(n)}}static bindSubscription(e){ye.unbindWatchers(e);const s=hh(e.component);e.watchedAncestors=s;for(const i of s)ye.addAttrSlot(i,e.attributeName,e);const r=dh(e.component);e.parentForReparent=r,r&&ye.addParentSlot(r,e),ye.pendingRefresh.add(e),ye.scheduleRefresh()}static unbindWatchers(e){for(const s of e.watchedAncestors)ye.removeAttrSlot(s,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(ye.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,s,r){let i=ye.attrSlots.get(e);i||(i=new Map,ye.attrSlots.set(e,i));let n=i.get(s);if(!n){const o=Ge.scopeAttributeNames(s),c=new Set,h=new MutationObserver(()=>{for(const g of c)ye.subscriptions.has(g)&&ye.pendingRefresh.add(g);ye.scheduleRefresh()});h.observe(e,{attributes:!0,attributeFilter:o}),n={observer:h,subscriptions:c},i.set(s,n)}n.subscriptions.add(r)}static removeAttrSlot(e,s,r){const i=ye.attrSlots.get(e);if(!i)return;const n=i.get(s);n&&(n.subscriptions.delete(r),!(n.subscriptions.size>0)&&(n.observer.disconnect(),i.delete(s)))}static addParentSlot(e,s){let r=ye.parentSlots.get(e);if(!r){const n=new Map,o=new MutationObserver(c=>{const h=new Set;for(const g of c)g.removedNodes.forEach(A=>{A instanceof Element&&h.add(A)}),g.addedNodes.forEach(A=>{A instanceof Element&&h.add(A)});for(const g of h){const A=n.get(g);if(A)for(const m of[...A])ye.subscriptions.has(m)&&ye.bindSubscription(m)}});o.observe(e,{childList:!0}),r={observer:o,byComponent:n},ye.parentSlots.set(e,r)}let i=r.byComponent.get(s.component);i||(i=new Set,r.byComponent.set(s.component,i)),i.add(s)}static removeParentSlot(e,s){const r=ye.parentSlots.get(e);if(!r)return;const i=r.byComponent.get(s.component);i&&(i.delete(s),i.size===0&&r.byComponent.delete(s.component)),!(r.byComponent.size>0)&&(r.observer.disconnect(),ye.parentSlots.delete(e))}static unsubscribe(e){ye.subscriptions.has(e)&&(ye.unbindWatchers(e),ye.subscriptions.delete(e),ye.pendingRefresh.delete(e),ye.subscriptions.size===0&&ye.cancelScheduledRefresh())}static scheduleRefresh(){ye.pendingRefresh.size!==0&&ye.animationFrameId===null&&(ye.animationFrameId=requestAnimationFrame(()=>{ye.flushRefresh()}))}static cancelScheduledRefresh(){ye.animationFrameId!==null&&(cancelAnimationFrame(ye.animationFrameId),ye.animationFrameId=null),ye.pendingRefresh.clear()}static flushRefresh(){ye.animationFrameId=null;const e=Array.from(ye.pendingRefresh);ye.pendingRefresh.clear();for(const s of e)ye.subscriptions.has(s)&&Ia(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};ye.subscriptions=new Set,ye.pendingRefresh=new Set,ye.animationFrameId=null,ye.attrSlots=new WeakMap,ye.parentSlots=new WeakMap;let Kn=ye;function Gn(t,e){const s=e?.dynamic??!1,r=s;return function(i,n){if(!i||(tr(i),i.__onBeforeConnected__(c=>{Ia(c,t,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(c=>{o=Kn.subscribe(c,t,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var ph=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,sr=(t,e,s,r)=>{for(var i=r>1?void 0:r?fh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ph(e,s,i),i};const Yn=t=>u(t),mh="sonic-icon";let ws=class extends J{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Vn.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:se}};ws.styles=X`
553
555
  :host {
554
556
  line-height: 0.1em;
555
557
  width: fit-content;
@@ -599,7 +601,7 @@
599
601
  :host([size="3xl"]) svg {
600
602
  --_sc-icon-size: 2.8em;
601
603
  }
602
- `,Xs([Ae()],ms.prototype,"iconText",2),Xs([Bn({type:String})],ms.prototype,"name",2),Xs([Bn({type:String})],ms.prototype,"prefix",2),Xs([Bn({type:String})],ms.prototype,"library",2),Xs([Vn("customIconLibraryPath",{dynamic:!0}),Ae()],ms.prototype,"customIconLibraryPath",2),Xs([Vn("customIconDefaultPrefix",{dynamic:!0}),Ae()],ms.prototype,"customIconDefaultPrefix",2),ms=Xs([X(Uu)],ms),ca();const Yr=ee`
604
+ `,sr([Ae()],ws.prototype,"iconText",2),sr([Yn({type:String})],ws.prototype,"name",2),sr([Yn({type:String})],ws.prototype,"prefix",2),sr([Yn({type:String})],ws.prototype,"library",2),sr([Gn("customIconLibraryPath",{dynamic:!0}),Ae()],ws.prototype,"customIconLibraryPath",2),sr([Gn("customIconDefaultPrefix",{dynamic:!0}),Ae()],ws.prototype,"customIconDefaultPrefix",2),ws=sr([Q(mh)],ws);function Zn(t){return t?t instanceof Object?t:Be(t):se}const Na=new WeakMap;function gh(t){const e=Na.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),Na.set(t,s),s}function bh(t){return t instanceof yn}function Jn(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?Jn(s):s instanceof CSSStyleSheet?[s]:bh(s)?[gh(s)]:[]):[]}va();const Qr=X`
603
605
  .custom-scroll {
604
606
  overflow: auto !important;
605
607
  overflow-y: overlay !important;
@@ -621,15 +623,125 @@
621
623
  border: solid 0.15rem transparent;
622
624
  }
623
625
  }
624
- `;var qu=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Zt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qu(e,s,i),i};const Bu={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},Hu="sonic-toast-item";let Ft=class extends J{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0,this._titleId=""}getAriaRole(){return this.status==="error"?"alert":"status"}getAriaLive(){return this.status==="error"?null:"polite"}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}getCloseButtonLabel(){const t={error:"Fermer le message d'erreur",warning:"Fermer l'avertissement",success:"Fermer le message de succès",info:"Fermer l'information"};return this.status&&t[this.status]||"Fermer la notification"}render(){if(this.dismissForever){const r=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(r)[this.id])return re}if(!this.visible)return re;const t=this.title?this.getTitleId():void 0,e=!this.title&&this.text?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
625
- class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
626
+ `;function Ra(t){try{const e=JSON.parse(localStorage.getItem(t)||"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function ja(t,e){return!!Ra(t)[e]}function za(t,e){const s=Ra(t);s[e]=!0;try{localStorage.setItem(t,JSON.stringify(s))}catch{}}const Ua="sonic-toast-dismissed";function qa(t){return ja(Ua,t)}function vh(t){za(Ua,t)}const yh=new Set(["en","fr","de","nl","es","it"]);function Ui(t,e){const s=(Ge.getLanguage()??"en").split("-")[0].toLowerCase();return yh.has(s)&&t[s]?t[s]:t.en}const _s={closeWindow:{en:"Close window",fr:"Fermer la fenêtre",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar ventana",it:"Chiudi finestra"},closeAlert:{en:"Close",fr:"Fermer",de:"Schließen",nl:"Sluiten",es:"Cerrar",it:"Chiudi"},showPassword:{en:"Show password",fr:"Afficher le mot de passe",de:"Passwort anzeigen",nl:"Wachtwoord tonen",es:"Mostrar contraseña",it:"Mostra password"},hidePassword:{en:"Hide password",fr:"Masquer le mot de passe",de:"Passwort ausblenden",nl:"Wachtwoord verbergen",es:"Ocultar contraseña",it:"Nascondi password"},closeToast:{en:"Close notification",fr:"Fermer la notification",de:"Benachrichtigung schließen",nl:"Melding sluiten",es:"Cerrar notificación",it:"Chiudi notifica"},closeToastError:{en:"Close error message",fr:"Fermer le message d'erreur",de:"Fehlermeldung schließen",nl:"Foutmelding sluiten",es:"Cerrar mensaje de error",it:"Chiudi messaggio di errore"},closeToastWarning:{en:"Close warning",fr:"Fermer l'avertissement",de:"Warnung schließen",nl:"Waarschuwing sluiten",es:"Cerrar advertencia",it:"Chiudi avviso"},closeToastSuccess:{en:"Close success message",fr:"Fermer le message de succès",de:"Erfolgsmeldung schließen",nl:"Succesmelding sluiten",es:"Cerrar mensaje de éxito",it:"Chiudi messaggio di successo"},closeToastInfo:{en:"Close information message",fr:"Fermer l'information",de:"Information schließen",nl:"Informatie sluiten",es:"Cerrar información",it:"Chiudi informazione"}},wh={error:_s.closeToastError,warning:_s.closeToastWarning,success:_s.closeToastSuccess,info:_s.closeToastInfo};function _h(t){const e=t?wh[t]:void 0;return Ui(e??_s.closeToast)}const qi={default:"info-empty",info:"info-empty",success:"check-circled-outline",warning:"warning-circled-outline",error:"warning-circled-outline"};function Qn(t){if(t)return t==="danger"?"error":t in qi?t:void 0}function Ba(t){return t==="error"?"alert":"status"}function Ha(t){return t==="error"?null:"polite"}const Va=X`
627
+ :host {
628
+ --sc-_color: var(--sc-base-content, #000);
629
+ color: var(--sc-_color);
630
+ }
631
+
632
+ :host([status="warning"]) {
633
+ --sc-_color: var(--sc-warning, var(--sc-base-content, #000));
634
+ }
635
+ :host([status="error"]) {
636
+ --sc-_color: var(--sc-danger, var(--sc-base-content, #000));
637
+ }
638
+ :host([status="info"]) {
639
+ --sc-_color: var(--sc-info, var(--sc-base-content, #000));
640
+ }
641
+ :host([status="success"]) {
642
+ --sc-_color: var(--sc-success, var(--sc-base-content, #000));
643
+ }
644
+
645
+ .inherit-color {
646
+ color: var(--sc-_color);
647
+ }
648
+ `,Xn=X`
649
+ :host {
650
+ --sc-_color: inherit;
651
+ color: var(--sc-_color);
652
+ }
653
+
654
+ :host([type="primary"]) {
655
+ --sc-_color: var(--sc-primary, var(--sc-base-content, #000));
656
+ }
657
+ :host([type="warning"]) {
658
+ --sc-_color: var(--sc-warning, var(--sc-base-content, #000));
659
+ }
660
+ :host([type="danger"]) {
661
+ --sc-_color: var(--sc-danger, var(--sc-base-content, #000));
662
+ }
663
+ :host([type="info"]) {
664
+ --sc-_color: var(--sc-info, var(--sc-base-content, #000));
665
+ }
666
+ :host([type="success"]) {
667
+ --sc-_color: var(--sc-success, var(--sc-base-content, #000));
668
+ }
669
+
670
+ .inherit-color {
671
+ color: var(--sc-_color);
672
+ }
673
+ `,Wa=X`
674
+ :host {
675
+ --sc-_color: inherit;
676
+ --sc-_bg: inherit;
677
+ color: var(--sc-_color);
678
+ background: var(--sc-_bg);
679
+ }
680
+
681
+ /*TYPES*/
682
+ :host([type="primary"]) {
683
+ --sc-_bg: var(--sc-primary, var(--sc-base-content, #000));
684
+ --sc-_color: var(--sc-primary-content, var(--sc-base, #fff));
685
+ }
686
+ :host([type="warning"]) {
687
+ --sc-_bg: var(--sc-warning, var(--sc-base-content, #000));
688
+ --sc-_color: var(--sc-warning-content, var(--sc-base, #fff));
689
+ }
690
+ :host([type="danger"]) {
691
+ --sc-_bg: var(--sc-danger, var(--sc-base-content, #000));
692
+ --sc-_color: var(--sc-danger-content, var(--sc-base, #fff));
693
+ }
694
+ :host([type="info"]) {
695
+ --sc-_bg: var(--sc-info, var(--sc-base-content, #000));
696
+ --sc-_color: var(--sc-info-content, var(--sc-base, #fff));
697
+ }
698
+ :host([type="success"]) {
699
+ --sc-_bg: var(--sc-success, var(--sc-base-content, #000));
700
+ --sc-_color: var(--sc-success-content, var(--sc-base, #fff));
701
+ }
702
+
703
+ /* dans un contexte de couleur - divider color*/
704
+ :host([type="primary"]),
705
+ :host([type="warning"]),
706
+ :host([type="danger"]),
707
+ :host([type="info"]),
708
+ :host([type="success"]) {
709
+ --sc-border-color: currentColor;
710
+ --sc-divider-opacity: 0.2;
711
+ }
712
+
713
+ :host([type="base"]) {
714
+ --sc-_bg: var(--sc-base, #fff);
715
+ --sc-_color: var(--sc-base-content, #000);
716
+ }
717
+ :host([type="default"]),
718
+ :host([type="light"]) {
719
+ --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
720
+ --sc-_color: var(--sc-base-content, #000);
721
+ }
722
+
723
+ :host([type="neutral"]) {
724
+ --sc-_bg: var(--sc-base-content, #000);
725
+ --sc-_color: var(--sc-base, #fff);
726
+ }
727
+
728
+ :host([type="invert"]) {
729
+ --sc-_bg: var(--sc-base-900, var(--sc-base-content, #000));
730
+ --sc-_color: var(--sc-base, #fff);
731
+ }
732
+
733
+ .inherit-bg {
734
+ color: inherit;
735
+ }
736
+ `;var Sh=Object.defineProperty,Ph=Object.getOwnPropertyDescriptor,Tt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ph(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Sh(e,s,i),i};const Ka=6e3,xh="sonic-toast-item";let bt=class extends J{constructor(){super(...arguments),this.label="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.useSlot=!1,this.visible=!0,this._titleId="",this._dismissed=!1,this._adoptedStyleSheets=[],this._hideRemaining=Ka,this._hideStartedAt=0,this._hovered=!1,this._focused=!1,this._hidden=!1,this._onMouseEnter=()=>{this._hovered=!0,this._syncHideTimer()},this._onMouseLeave=()=>{this._hovered=!1,this._syncHideTimer()},this._onFocusIn=()=>{this._focused=!0,this._syncHideTimer()},this._onFocusOut=t=>{this.contains(t.relatedTarget)||(this._focused=!1,this._syncHideTimer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("mouseenter",this._onMouseEnter),this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut)}disconnectedCallback(){this._clearHideTimer(),this.removeEventListener("mouseenter",this._onMouseEnter),this.removeEventListener("mouseleave",this._onMouseLeave),this.removeEventListener("focusin",this._onFocusIn),this.removeEventListener("focusout",this._onFocusOut),super.disconnectedCallback()}willUpdate(t){(t.has("dismissForever")||t.has("id"))&&(this._dismissed=this.dismissForever&&!!this.id&&qa(this.id)),super.willUpdate(t)}getAriaRole(){return Ba(Qn(this.status)??"default")}getAriaLive(){return Ha(Qn(this.status)??"default")}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}render(){if(this._dismissed||!this.visible)return se;const t=this.label?this.getTitleId():void 0,e=!this.label&&typeof this.text=="string"?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return R`<div
737
+ class="sonic-toast ${this.ghost?"ghost":""}"
626
738
  role=${this.getAriaRole()}
627
- aria-live=${s||re}
739
+ aria-live=${s||se}
628
740
  aria-atomic="true"
629
- aria-label=${e||re}
741
+ aria-label=${e||se}
630
742
  >
631
743
  <button
632
- aria-label=${this.getCloseButtonLabel()}
744
+ aria-label=${_h(this.status)}
633
745
  class="sonic-toast-close"
634
746
  @click=${()=>this.hide()}
635
747
  >
@@ -640,23 +752,21 @@
640
752
  style="max-height: ${this.maxHeight} ;"
641
753
  >
642
754
  ${this.status&&R`<sonic-icon
643
- name=${Bu[this.status]}
755
+ name=${qi[Qn(this.status)??"default"]}
644
756
  class="sonic-toast-icon"
645
- size="2xl"
757
+ size="xl"
646
758
  aria-hidden="true"
647
759
  ></sonic-icon>`}
648
760
 
649
761
  <div class="sonic-toast-text">
650
- ${this.title?R`<div class="sonic-toast-title" id=${t}>
651
- ${this.title}
762
+ ${this.label?R`<div class="sonic-toast-title" id=${t}>
763
+ ${Zn(this.label)}
652
764
  </div>`:""}
653
- ${this.text?je(this.text):""}
765
+ ${this.useSlot?se:Zn(this.text)}
654
766
  <slot></slot>
655
767
  </div>
656
-
657
- ${this.preserve?"":this.autoHide()}
658
768
  </div>
659
- </div>`}hide(){if(gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}};Ft.styles=[Yr,ee`
769
+ </div>`}updated(t){t.has("styleSheet")&&this.syncAdoptedStyleSheets(),(t.has("preserve")||t.has("visible")||t.has("_dismissed"))&&this._syncHideTimer()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Jn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}hide(){this._clearHideTimer(),this._hidden=!0,vs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever&&vh(this.id),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this._hidden=!1,this._hideRemaining=Ka,this.visible=!0,this._syncHideTimer()}_syncHideTimer(){if(!(!this.preserve&&this.visible&&!this._hidden&&!this._dismissed&&!this._hovered&&!this._focused)){this._pauseHideTimer();return}this._hideTimer||(this._hideStartedAt=Date.now(),this._hideTimer=setTimeout(()=>{this._hideTimer=void 0,this.hide()},this._hideRemaining))}_pauseHideTimer(){this._hideTimer&&(clearTimeout(this._hideTimer),this._hideTimer=void 0,this._hideRemaining=Math.max(0,this._hideRemaining-(Date.now()-this._hideStartedAt)))}_clearHideTimer(){clearTimeout(this._hideTimer),this._hideTimer=void 0}};bt.styles=[Qr,Va,X`
660
770
  * {
661
771
  box-sizing: border-box;
662
772
  }
@@ -664,7 +774,6 @@
664
774
  display: block;
665
775
  pointer-events: auto;
666
776
  position: relative;
667
- --sc-toast-status-color: transparent;
668
777
  --sc-toast-color: var(--sc-base-content, #000);
669
778
  --sc-toast-bg: var(--sc-base, #fff);
670
779
  --sc-toast-rounded: var(--sc-rounded-md);
@@ -685,14 +794,13 @@
685
794
  pointer-events: auto;
686
795
  overflow: hidden;
687
796
  line-height: 1.25;
688
- color: var(--sc-toast-color);
689
797
  box-shadow: var(--sc-toast-shadow);
690
798
  border-radius: var(--sc-toast-rounded);
691
799
  background: var(--sc-toast-bg);
692
800
  }
693
801
 
694
802
  .sonic-toast-content {
695
- padding: 1em 2.5rem 1em 1em;
803
+ padding: 0.8em 2.25rem 0.8em 0.8em;
696
804
  display: flex;
697
805
  gap: 0.5rem;
698
806
  overflow: auto;
@@ -700,6 +808,7 @@
700
808
  }
701
809
 
702
810
  .sonic-toast-text {
811
+ color: var(--sc-toast-color);
703
812
  align-self: center;
704
813
  margin-top: auto;
705
814
  margin-bottom: auto;
@@ -747,6 +856,7 @@
747
856
  border-radius: 50%;
748
857
  text-align: center;
749
858
  opacity: 0.5;
859
+ color: var(--sc-toast-color);
750
860
  background: rgba(0, 0, 0, 0);
751
861
  }
752
862
 
@@ -766,39 +876,21 @@
766
876
  /*Title*/
767
877
  .sonic-toast-title {
768
878
  font-weight: bold;
769
- font-size: 1.15rem;
770
- margin: 0.15em 0 0.25em;
879
+ font-size: 1.125rem;
880
+ margin: 0.15em 0 0.15em;
771
881
  line-height: 1.2;
772
882
  }
773
883
 
774
- /*STATUS*/
775
- .success {
776
- --sc-toast-status-color: var(
777
- --sc-success,
778
- var(--sc-base-content, #000)
779
- );
780
- }
781
-
782
- .error {
783
- --sc-toast-status-color: var(--sc-danger, var(--sc-base-content, #000));
784
- }
785
-
786
- .warning {
787
- --sc-toast-status-color: var(
788
- --sc-warning,
789
- var(--sc-base-content, #000)
790
- );
791
- }
792
-
793
- .info {
794
- --sc-toast-status-color: var(--sc-info, var(--sc-base-content, #000));
884
+ /*STATUS — accent via statusColor (--sc-_color) */
885
+ :host([status]) .sonic-toast {
886
+ border-top: 3px solid var(--sc-_color);
795
887
  }
796
888
 
797
- .success,
798
- .error,
799
- .info,
800
- .warning {
801
- border-top: 3px solid var(--sc-toast-status-color, currentColor);
889
+ :host([status="success"]) .sonic-toast:before,
890
+ :host([status="error"]) .sonic-toast:before,
891
+ :host([status="info"]) .sonic-toast:before,
892
+ :host([status="warning"]) .sonic-toast:before {
893
+ background-color: var(--sc-_color);
802
894
  }
803
895
 
804
896
  .sonic-toast:before {
@@ -813,20 +905,12 @@
813
905
  pointer-events: none;
814
906
  transition: 0.2s;
815
907
  border-radius: var(--sc-toast-rounded);
816
- background-color: var(--sc-toast-status-color);
817
908
  }
818
909
 
819
910
  .sonic-toast:hover:before {
820
911
  opacity: 0.025;
821
912
  }
822
913
 
823
- .info .sonic-toast-icon,
824
- .error .sonic-toast-icon,
825
- .success .sonic-toast-icon,
826
- .warning .sonic-toast-icon {
827
- color: var(--sc-toast-status-color, currentColor);
828
- }
829
-
830
914
  .sonic-toast-icon {
831
915
  position: sticky;
832
916
  top: 0;
@@ -836,7 +920,7 @@
836
920
  opacity: 0.85;
837
921
  pointer-events: none;
838
922
  }
839
- `],Zt([u({type:String})],Ft.prototype,"title",2),Zt([u({type:String})],Ft.prototype,"id",2),Zt([u({type:String})],Ft.prototype,"text",2),Zt([u({type:String})],Ft.prototype,"status",2),Zt([u({type:Boolean})],Ft.prototype,"ghost",2),Zt([u({type:Boolean})],Ft.prototype,"preserve",2),Zt([u({type:Boolean})],Ft.prototype,"dismissForever",2),Zt([u({type:String})],Ft.prototype,"maxHeight",2),Zt([Ae()],Ft.prototype,"visible",2),Zt([Ae()],Ft.prototype,"_titleId",2),Ft=Zt([X(Hu)],Ft);const Wu=ee`
923
+ `],Tt([u()],bt.prototype,"label",2),Tt([u({type:String})],bt.prototype,"id",2),Tt([u()],bt.prototype,"text",2),Tt([u({type:String,reflect:!0})],bt.prototype,"status",2),Tt([u({type:Boolean})],bt.prototype,"ghost",2),Tt([u({type:Boolean})],bt.prototype,"preserve",2),Tt([u({type:Boolean})],bt.prototype,"dismissForever",2),Tt([u({type:String})],bt.prototype,"maxHeight",2),Tt([u({type:Boolean})],bt.prototype,"useSlot",2),Tt([u({attribute:!1})],bt.prototype,"styleSheet",2),Tt([Ae()],bt.prototype,"visible",2),Tt([Ae()],bt.prototype,"_titleId",2),Tt([Ae()],bt.prototype,"_dismissed",2),bt=Tt([Q(xh)],bt);const Ah=X`
840
924
  :host {
841
925
  /* POLICES */
842
926
  /*
@@ -907,7 +991,7 @@
907
991
  --sc-contrast-content: #fff;
908
992
  --sc-contrast: #000000;
909
993
  }
910
- `,Ku=ee`
994
+ `,Ch=X`
911
995
  :host([theme="light"]) {
912
996
  /*Boutons*/
913
997
  --sc-primary: var(--sc-base-800);
@@ -936,7 +1020,7 @@
936
1020
  --sc-base-900: #0f172a;
937
1021
  --sc-base-content: var(--sc-base-700);
938
1022
  }
939
- `,$a=ee`
1023
+ `,Ga=X`
940
1024
  --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
941
1025
  --sc-info: var(--sc-dark-info, #3abff8);
942
1026
  --sc-danger: var(--sc-dark-danger, #f87272);
@@ -961,17 +1045,17 @@
961
1045
  --sc-base-800: var(--sc-dark-base-800, #d9dce0);
962
1046
  --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
963
1047
  --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
964
- `,Yu=ee`
1048
+ `,kh=X`
965
1049
  :host([theme="dark"]) {
966
- ${$a}
1050
+ ${Ga}
967
1051
  }
968
1052
 
969
1053
  @media (prefers-color-scheme: dark) {
970
1054
  :host([theme="auto"]) {
971
- ${$a}
1055
+ ${Ga}
972
1056
  }
973
1057
  }
974
- `;var Gu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,Gr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Gu(e,s,i),i};const Ju="sonic-theme";let jt=class extends J{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,jt.instance=this}static getPopContainer(){return jt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",t=>this.receiveMessage(t),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let i=0;i<e;i++){const n=t[i];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const r={variables:this.getCssVariables(),fonts:s};be.get("sonic-theme")?.set(r),document.querySelectorAll("iframe").forEach(i=>i.contentWindow?.postMessage({type:"SonicTheme",...r},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...jt.styles.map(i=>i.styleSheet),...Array.from(document.styleSheets)];for(const i of e)try{if(!i)continue;const n=i.cssRules;for(const o of n){if(!("style"in o))continue;const c=o.style;for(const h of c)t.includes(h)||h.indexOf("--sc")!==0||t.push(h)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),r={};return t.forEach(i=>r[i]=s.getPropertyValue(i)),r}render(){return R`<slot></slot>`}};jt.styles=[Ku,Yu,Wu,ee`
1058
+ `;var $h=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Xr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Dh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&$h(e,s,i),i};const Eh="sonic-theme";let Rt=class extends J{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,Rt.instance=this}static getPopContainer(){return Rt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",t=>this.receiveMessage(t),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let i=0;i<e;i++){const n=t[i];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const r={variables:this.getCssVariables(),fonts:s};me.get("sonic-theme")?.set(r),document.querySelectorAll("iframe").forEach(i=>i.contentWindow?.postMessage({type:"SonicTheme",...r},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...Rt.styles.map(i=>i.styleSheet),...Array.from(document.styleSheets)];for(const i of e)try{if(!i)continue;const n=i.cssRules;for(const o of n){if(!("style"in o))continue;const c=o.style;for(const h of c)t.includes(h)||h.indexOf("--sc")!==0||t.push(h)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),r={};return t.forEach(i=>r[i]=s.getPropertyValue(i)),r}render(){return R`<slot></slot>`}};Rt.styles=[Ch,kh,Ah,X`
975
1059
  :host([color]) {
976
1060
  color: var(--sc-base-content, #000);
977
1061
  }
@@ -996,46 +1080,48 @@
996
1080
  border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
997
1081
  }
998
1082
 
999
- ::slotted(.sonic-pop-content).is-open:not(.is-empty) {
1083
+ ::slotted(.sonic-pop-content).is-open {
1000
1084
  transform: translateY(0) scale(1);
1001
1085
  opacity: 1;
1002
1086
  pointer-events: auto;
1003
1087
  transition-property: scale, opacity;
1004
1088
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1005
1089
  }
1006
- `],Gr([u({type:String,reflect:!0})],jt.prototype,"theme",2),Gr([u({type:Boolean,reflect:!0})],jt.prototype,"background",2),Gr([u({type:Boolean,reflect:!0})],jt.prototype,"color",2),Gr([u({type:Boolean,reflect:!0})],jt.prototype,"font",2),jt=Gr([X(Ju)],jt);var Xu=Object.defineProperty,Qu=Object.getOwnPropertyDescriptor,Da=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xu(e,s,i),i};const eh="sonic-toast";let Ce=class extends J{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),Ce.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1007
- ${Ii(this.toasts,r=>r.id,r=>R`
1090
+ `],Xr([u({type:String,reflect:!0})],Rt.prototype,"theme",2),Xr([u({type:Boolean,reflect:!0})],Rt.prototype,"background",2),Xr([u({type:Boolean,reflect:!0})],Rt.prototype,"color",2),Xr([u({type:Boolean,reflect:!0})],Rt.prototype,"font",2),Rt=Xr([Q(Eh)],Rt);var Oh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,Ya=(t,e,s,r)=>{for(var i=r>1?void 0:r?Th(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Oh(e,s,i),i};let Za=!1;function Ja(t){if(t.label!==void 0)return t.label;if(t.title!==void 0)return Za||(Za=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),t.title}const Lh="sonic-toast";let Se=class extends J{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),Se.handleExistingToastDelegation(),this.toasts?R`<div style=${$t(s)}>
1091
+ ${Ri(this.toasts,r=>r.id,r=>R`
1008
1092
  <sonic-toast-item
1009
1093
  maxHeight=${e?"none":"10rem"}
1010
1094
  status=${te(r.status)}
1011
- title=${te(r.title)}
1095
+ .label=${Ja(r)}
1096
+ .text=${r.useSlot?void 0:r.text}
1097
+ .styleSheet=${r.styleSheet}
1098
+ ?useSlot=${r.useSlot}
1012
1099
  ?ghost=${r.ghost}
1013
1100
  ?dismissForever=${r.dismissForever}
1014
1101
  ?preserve=${r.preserve}
1015
1102
  id=${te(r.id)}
1016
1103
  @hide=${()=>this.removeItem(r)}
1017
- ${pu({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
1104
+ ${Uu({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
1018
1105
  >
1019
- <!-- Le texte est passé dans le slot et non pas en propriété pour contrer des problèmatiques de shadow-dom et d'appel exterieur (exemple: fancybox) -->
1020
- ${r.text?je(r.text):""}
1106
+ ${r.useSlot?Zn(r.text):se}
1021
1107
  </sonic-toast-item>
1022
1108
  `)}
1023
- </div>`:re}static removeAll(){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Ce.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Ce.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.status!==e))}static removeTemporaryItems(){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Ce.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Ce.instance||(Ce.instance=document.createElement("sonic-toast"),jt.getPopContainer().prepend(Ce.instance)),Ce.instance}static add(e){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Ce.getInstance(),r=e.id??new Date().valueOf(),n=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(e.text),o={id:r,text:e.text,title:e.title,status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever};if(e.dismissForever&&e.id){const c=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(c)[e.id])return null}if(s?.toasts.length){const c={...o};for(const h of s.toasts){const b={...h};if(c.id=b.id=0,at.shallowEqual(c,b))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Ce.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Ce.delegateToasts){Ce.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Ce.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!at.shallowEqual(s,e,!1))))}};Ce.delegateToasts=!1,Da([u({type:Array})],Ce.prototype,"toasts",2),Ce=Da([X(eh)],Ce),typeof window<"u"&&(window[cn+"Toast"]=window[cn+"Toast"]||Ce);function th(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Ce.removeItemsByStatus(s.data.status),s.data.type=="removeTemporaryItems"&&Ce.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Ce.delegateToasts=!0,Ce.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Ce.getInstance().toasts=[...Ce.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Ce.removeAll(),s.data.type=="removeToast"&&Ce.removeItem(s.data.toast),s.data.type=="addToast"&&Ce.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}th();var sh=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,Zr=(t,e,s,r)=>{for(var i=r>1?void 0:r?rh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sh(e,s,i),i};const ih=new Set,nh=new Set,oh=t=>{for(const e of nh)e(t)},Hn=new Set;let Wn=0;ln(async()=>{Wn++;const t=Wn,e=Array.from(Hn);for(;e.length>0;){if(t!=Wn)return;const s=e.splice(0,4);await Promise.all(s.map(r=>r.refetch()))}});const Kn=(t,e)=>{class s extends t{constructor(...i){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(i){super.props=i}set endPoint(i){this._endPoint=i,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Ds(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await be.getInstance().isLocalStrorageReady,!this.isConnected))return;const i=be.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,at.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",i)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||ih.add(this),oh(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Ce.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const c=o._sonic_http_response_,h=this.key.split(".");o=at.traverse(o,h,this.hasAttribute("preserveOtherKeys")),o&&at.isObject(o)&&c&&(o._sonic_http_response_=c)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),Hn.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Hn.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const i=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*i,window.innerHeight*i)+"px",threshold:.9};this.iObserver=new IntersectionObserver(h=>this.onIntersection(h),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(h=>h.nodeName.toLowerCase()!="style")[0];if(c?.nodeName.toLocaleLowerCase()=="slot"&&(c=[...c.children].filter(h=>h.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("div");const h=c.style;h.pointerEvents="none",h.width="1px",h.height="1px",this.lazyLoadPlaceHolder=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(i){for(const n of i)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Zr([u()],s.prototype,"noErrorsRecordings",2),Zr([u()],s.prototype,"props",1),Zr([u({type:String})],s.prototype,"endPoint",1),Zr([u()],s.prototype,"requestId",2),Zr([u({type:Number})],s.prototype,"refetchEveryMs",2),s};var ah=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,Qs=(t,e,s,r)=>{for(var i=r>1?void 0:r?lh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ah(e,s,i),i};const ji=t=>{class e extends t{constructor(...r){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();i&&(i.isFormValid=!1),r.reportValidity()}set type(r){this.hasAttribute("type")&&!this.forceAutoFill&&(r=this.getAttribute("type")),this._type=r,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}}return Qs([u()],e.prototype,"forceAutoFill",2),Qs([u({type:String})],e.prototype,"type",1),Qs([u()],e.prototype,"description",1),Qs([u()],e.prototype,"label",1),Qs([u({type:String,reflect:!0})],e.prototype,"status",2),Qs([u({type:Number})],e.prototype,"tabindex",2),Qs([u({type:String})],e.prototype,"autocomplete",2),e},Ea=Kn,ch=Fn,Oa=br,Ta=ji,Ts=nt,Yn=Ur;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Ea,FormCheckable:ch,FormElement:Oa,FormInput:Ta,Subscriber:Ts,TemplatesContainer:Yn};/**
1109
+ </div>`:se}static removeAll(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.status!==e))}static removeItemById(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:e},"*");return}const s=Se.getInstance();s&&(s.toasts=s.toasts.filter(r=>r.id!==e))}static removeTemporaryItems(){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=Se.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return Se.instance||(Se.instance=document.createElement("sonic-toast"),Rt.getPopContainer().prepend(Se.instance)),Se.instance}static add(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=Se.getInstance(),r=e.id??new Date().valueOf(),i=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof e.text=="string"&&i.test(e.text),o={id:r,text:e.text,label:Ja(e),status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever,styleSheet:e.styleSheet,useSlot:e.useSlot};if(e.dismissForever&&e.id&&qa(e.id))return null;if(s?.toasts.length){const c={...o};for(const h of s.toasts){const g={...h};if(c.id=g.id=0,lt.shallowEqual(c,g))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=Se.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(Se.delegateToasts){Se.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=Se.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!lt.shallowEqual(s,e,!1))))}};Se.delegateToasts=!1,Ya([u({type:Array})],Se.prototype,"toasts",2),Se=Ya([Q(Lh)],Se),typeof window<"u"&&(window[fn+"Toast"]=window[fn+"Toast"]||Se);function Mh(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&Se.removeItemsByStatus(s.data.status),s.data.type=="removeItemById"&&Se.removeItemById(s.data.id),s.data.type=="removeTemporaryItems"&&Se.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(Se.delegateToasts=!0,Se.handleExistingToastDelegation()),s.data.type=="addToasts"&&(Se.getInstance().toasts=[...Se.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&Se.removeAll(),s.data.type=="removeToast"&&Se.removeItem(s.data.toast),s.data.type=="addToast"&&Se.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Mh();var Fh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,ei=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ih(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Fh(e,s,i),i};const Nh=new Set,Rh=new Set,jh=t=>{for(const e of Rh)e(t)},eo=new Set;let to=0;pn(async()=>{to++;const t=to,e=Array.from(eo);for(;e.length>0;){if(t!=to)return;const s=e.splice(0,4);await Promise.all(s.map(r=>r.refetch()))}});const so=(t,e)=>{class s extends t{constructor(...i){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(i){super.props=i}set endPoint(i){this._endPoint=i,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Ts(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await me.getInstance().isLocalStrorageReady,!this.isConnected))return;const i=me.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,lt.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",i)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||Nh.add(this),jh(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&Se.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const c=o._sonic_http_response_,h=this.key.split(".");o=lt.traverse(o,h,this.hasAttribute("preserveOtherKeys")),o&&lt.isObject(o)&&c&&(o._sonic_http_response_=c)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),eo.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),eo.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const i=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*i,window.innerHeight*i)+"px",threshold:.9};this.iObserver=new IntersectionObserver(h=>this.onIntersection(h),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(h=>h.nodeName.toLowerCase()!="style")[0];if(c?.nodeName.toLocaleLowerCase()=="slot"&&(c=[...c.children].filter(h=>h.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("div");const h=c.style;h.pointerEvents="none",h.width="1px",h.height="1px",this.lazyLoadPlaceHolder=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(i){for(const n of i)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return ei([u()],s.prototype,"noErrorsRecordings",2),ei([u()],s.prototype,"props",1),ei([u({type:String})],s.prototype,"endPoint",1),ei([u()],s.prototype,"requestId",2),ei([u({type:Number})],s.prototype,"refetchEveryMs",2),s};var zh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,rr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Uh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&zh(e,s,i),i};const Bi=t=>{class e extends t{constructor(...r){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();i&&(i.isFormValid=!1),r.reportValidity()}set type(r){this.hasAttribute("type")&&!this.forceAutoFill&&(r=this.getAttribute("type")),this._type=r,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}}return rr([u()],e.prototype,"forceAutoFill",2),rr([u({type:String})],e.prototype,"type",1),rr([u()],e.prototype,"description",1),rr([u()],e.prototype,"label",1),rr([u({type:String,reflect:!0})],e.prototype,"status",2),rr([u({type:Number})],e.prototype,"tabindex",2),rr([u({type:String})],e.prototype,"autocomplete",2),e},Qa=so,qh=qn,Xa=yr,el=Bi,Fs=kt,ro=Vr;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Qa,FormCheckable:qh,FormElement:Xa,FormInput:el,Subscriber:Fs,TemplatesContainer:ro};/**
1024
1110
  * @license
1025
1111
  * Copyright 2020 Google LLC
1026
1112
  * SPDX-License-Identifier: BSD-3-Clause
1027
- */const rs=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?Nt:(this.vt=t,document.importNode(t.content,!0))}});var uh=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,La=(t,e,s,r)=>{for(var i=r>1?void 0:r?hh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&uh(e,s,i),i};const dh="sonic-fetch";let Ri=class extends Kn(nt(Yn(J))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return re;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?rs(t):re}render(){return R`
1113
+ */const is=Os(class extends br{constructor(t){if(super(t),t.type!==Qs.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?Nt:(this.vt=t,document.importNode(t.content,!0))}});var Bh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,tl=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Bh(e,s,i),i};const Vh="sonic-fetch";let Hi=class extends so(kt(ro(J))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return se;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?is(t):se}render(){return R`
1028
1114
  ${this.renderSkeleton()} ${this.renderLoader()}
1029
- ${this.isLoading?re:R`<slot></slot>`}
1030
- `}};Ri.styles=[ee`
1115
+ ${this.isLoading?se:R`<slot></slot>`}
1116
+ `}};Hi.styles=[X`
1031
1117
  :host {
1032
1118
  display: contents;
1033
1119
  }
1034
- `],La([u()],Ri.prototype,"loader",2),Ri=La([X(dh)],Ri);var ph=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,Ma=(t,e,s,r)=>{for(var i=r>1?void 0:r?fh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ph(e,s,i),i};const gh="sonic-if";let zi=class extends J{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?R` <slot></slot> `:re}};zi.styles=ee`
1120
+ `],tl([u()],Hi.prototype,"loader",2),Hi=tl([Q(Vh)],Hi);var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Is=(t,e,s,r)=>{for(var i=r>1?void 0:r?Kh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Wh(e,s,i),i};const Gh="sonic-if";function Yh(t,e){if(!e)return t;let s=t;for(const r of e.split(".").filter(Boolean)){if(s==null)return;s=s[r]}return s}let ns=class extends Fs(J){constructor(){super(...arguments),this.condition=!1,this.key="",this.equals="",this.not="",this.truthy=!1,this.gt="",this.lt=""}attrMode(){return!!(this.dataProvider&&(this.key||this.truthy||this.equals!==""||this.not!==""||this.gt!==""||this.lt!==""))}show(){if(!this.attrMode())return this.condition;const t=Yh(this.props,this.key);return this.equals!==""?String(t)===this.equals:this.not!==""?String(t)!==this.not:this.gt!==""?Number(t)>Number(this.gt):this.lt!==""?Number(t)<Number(this.lt):!!t}render(){return this.show()?R` <slot></slot> `:se}};ns.styles=X`
1035
1121
  :host {
1036
1122
  display: contents;
1037
1123
  }
1038
- `,Ma([u({type:Boolean})],zi.prototype,"condition",2),zi=Ma([X(gh)],zi);const bh=ee`
1124
+ `,Is([u({type:Boolean})],ns.prototype,"condition",2),Is([u({type:String})],ns.prototype,"key",2),Is([u({type:String})],ns.prototype,"equals",2),Is([u({type:String})],ns.prototype,"not",2),Is([u({type:Boolean})],ns.prototype,"truthy",2),Is([u({type:String})],ns.prototype,"gt",2),Is([u({type:String})],ns.prototype,"lt",2),ns=Is([Q(Gh)],ns);const Zh=X`
1039
1125
  :host([align="left"]) .sonic-loader--inline {
1040
1126
  margin-left: 0;
1041
1127
  }
@@ -1102,7 +1188,7 @@
1102
1188
  transform: translate(24px, 0);
1103
1189
  }
1104
1190
  }
1105
- `,mh=ee`
1191
+ `,Jh=X`
1106
1192
  @keyframes sonic-loader--fixed {
1107
1193
  0% {
1108
1194
  transform: scale(0);
@@ -1155,14 +1241,14 @@
1155
1241
  height: 5rem;
1156
1242
  animation: sonic-loader--fixed 1s 0s linear infinite;
1157
1243
  }
1158
- `;var vh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,Gn=(t,e,s,r)=>{for(var i=r>1?void 0:r?yh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vh(e,s,i),i};const wh="sonic-loader";let ut=class extends J{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(t){ut.loader||(ut.loader=document.createElement("sonic-loader"));const e=ut.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.noDelay&&e.setAttribute("noDelay",""),t.container||(t.container=jt.getPopContainer(),t.mode="fixed"),t.container.appendChild(e),ut.callCounter++}static hide(){ut.callCounter--,!(ut.callCounter>0)&&ut.loader&&ut.loader.remove()}render(){return R`<div
1244
+ `;var Qh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,io=(t,e,s,r)=>{for(var i=r>1?void 0:r?Xh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Qh(e,s,i),i};const ed="sonic-loader";let ht=class extends J{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(t){ht.loader||(ht.loader=document.createElement("sonic-loader"));const e=ht.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.noDelay&&e.setAttribute("noDelay",""),t.container||(t.container=Rt.getPopContainer(),t.mode="fixed"),t.container.appendChild(e),ht.callCounter++}static hide(){ht.callCounter--,!(ht.callCounter>0)&&ht.loader&&ht.loader.remove()}render(){return R`<div
1159
1245
  class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
1160
1246
  >
1161
1247
  <div></div>
1162
1248
  <div></div>
1163
1249
  <div></div>
1164
1250
  <div></div>
1165
- </div>`}};ut.styles=[bh,mh,ee`
1251
+ </div>`}};ht.styles=[Zh,Jh,X`
1166
1252
  :host {
1167
1253
  --sc-_loader-bg: var(--sc-primary, currentColor);
1168
1254
  pointer-events: none;
@@ -1190,7 +1276,7 @@
1190
1276
  opacity: 1;
1191
1277
  }
1192
1278
  }
1193
- `],ut.callCounter=0,Gn([u({type:String})],ut.prototype,"mode",2),Gn([u({type:Boolean})],ut.prototype,"noDelay",2),ut=Gn([X(wh)],ut);var _h=Object.getOwnPropertyDescriptor,Ph=(t,e,s,r)=>{for(var i=r>1?void 0:r?_h(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const xh="sonic-subscriber";let Ia=class extends nt(J){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return R`<slot></slot> `}};Ia=Ph([X(xh)],Ia);var Sh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Jt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ah(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Sh(e,s,i),i};const Ch="sonic-list";let qt=class extends Kn(nt(Ur(J))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return re;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?rs(t):re}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?rs(t):re}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1279
+ `],ht.callCounter=0,io([u({type:String})],ht.prototype,"mode",2),io([u({type:Boolean})],ht.prototype,"noDelay",2),ht=io([Q(ed)],ht);var td=Object.getOwnPropertyDescriptor,sd=(t,e,s,r)=>{for(var i=r>1?void 0:r?td(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const rd="sonic-subscriber";let sl=class extends kt(J){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return R`<slot></slot> `}};sl=sd([Q(rd)],sl);var id=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,Xt=(t,e,s,r)=>{for(var i=r>1?void 0:r?nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&id(e,s,i),i};const od="sonic-list";let Ht=class extends so(kt(Vr(J))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return se;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return R`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?is(t):se}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?is(t):se}renderLoadingState(){return R`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return R` <div
1194
1280
  style="color: var(--sc-base-400);
1195
1281
  font-size: 1.5em;
1196
1282
  margin: 4rem 0;
@@ -1201,7 +1287,7 @@
1201
1287
  ><span class="sonic-no-result-text"
1202
1288
  >${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
1203
1289
  >
1204
- </div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([r,i])=>({key:r,value:i})):at.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?t=[t]:t=[]),t=t.filter(r=>r!=null),e&&(t._sonic_http_response_=e),t}updated(t){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(t)}getAllRenderableElements(t){let e=[];function s(r){if(r.nodeType===Node.ELEMENT_NODE){const i=r.getBoundingClientRect();(i.width>0||i.height>0)&&e.push(r),r.childNodes.forEach(s),r.shadowRoot&&r.shadowRoot.childNodes.forEach(s)}}return s(t),e}getDisplayContentsSize(t){const e=this.getAllRenderableElements(t);if(e.length===0)return{width:0,height:0};const s=e.map(c=>c.getBoundingClientRect()),r=Math.min(...s.map(c=>c.left)),i=Math.max(...s.map(c=>c.right)),n=Math.min(...s.map(c=>c.top)),o=Math.max(...s.map(c=>c.bottom));return{width:i-r,height:o-n}}render(){return R`
1290
+ </div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([r,i])=>({key:r,value:i})):lt.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?t=[t]:t=[]),t=t.filter(r=>r!=null),e&&(t._sonic_http_response_=e),t}updated(t){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(t)}getAllRenderableElements(t){let e=[];function s(r){if(r.nodeType===Node.ELEMENT_NODE){const i=r.getBoundingClientRect();(i.width>0||i.height>0)&&e.push(r),r.childNodes.forEach(s),r.shadowRoot&&r.shadowRoot.childNodes.forEach(s)}}return s(t),e}getDisplayContentsSize(t){const e=this.getAllRenderableElements(t);if(e.length===0)return{width:0,height:0};const s=e.map(c=>c.getBoundingClientRect()),r=Math.min(...s.map(c=>c.left)),i=Math.max(...s.map(c=>c.right)),n=Math.min(...s.map(c=>c.top)),o=Math.max(...s.map(c=>c.bottom));return{width:i-r,height:o-n}}render(){return R`
1205
1291
  ${this.renderContent()}
1206
1292
  <div
1207
1293
  style="grid-column: 1 / -1;min-height:${this.isLoading?0:this.loadingSize.height}px; width:0;float:left;display: var(--list-loader-height-display);"
@@ -1213,24 +1299,24 @@
1213
1299
  dataProvider="${this.dataProvider}/list-item/${s}"
1214
1300
  >
1215
1301
  ${this.items(t,e)}
1216
- </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!at.isObject(this.props))return R`<div></div>`;const r=this.formatProps();if((r?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return rs(this.templateParts["no-items"])}const i=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),c=this.renderSeparator(),h=r?.length||0,b=r?.slice(this.offset,this.offset+this.limit);return R`
1217
- ${b?.map((k,g)=>{if(k==null)return re;let f=g,A=null;if(typeof k=="object"&&!Array.isArray(k)){o&&(f=k?.key);const y=k[this.templateKey];y&&typeof y=="string"&&(A=this.templateParts[y])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return re;const E=g>=h-1,O=g%2,N=this.publisher[f],U={key:f,even:O==0,odd:O==1,onlyChild:h==1,firstChild:g==0,lastChild:E};N._key_=f+"",N._metadata_={...N._metadata_.get(),...U};const P=this.handleProgrammaticTemplates(k,U,f);return P?R`${P}${E?re:c}`:(n++,A&&(n=-1),R`
1302
+ </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!lt.isObject(this.props))return R`<div></div>`;const r=this.formatProps();if((r?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return is(this.templateParts["no-items"])}const i=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),c=this.renderSeparator(),h=r?.length||0,g=r?.slice(this.offset,this.offset+this.limit);return R`
1303
+ ${g?.map((A,m)=>{if(A==null)return se;let f=m,k=null;if(typeof A=="object"&&!Array.isArray(A)){o&&(f=A?.key);const y=A[this.templateKey];y&&typeof y=="string"&&(k=this.templateParts[y])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return se;const E=m>=h-1,O=m%2,z=this.publisher[f],B={key:f,even:O==0,odd:O==1,onlyChild:h==1,firstChild:m==0,lastChild:E};z._key_=f+"",z._metadata_={...z._metadata_.get(),...B};const S=this.handleProgrammaticTemplates(A,B,f);return S?R`${S}${E?se:c}`:(n++,k&&(n=-1),R`
1218
1304
  <sonic-subscriber
1219
1305
  ?debug=${this.defferedDebug===!0}
1220
- .bindPublisher=${function(){return N}}
1306
+ .bindPublisher=${function(){return z}}
1221
1307
  .propertyMap?=${this.itemPropertyMap}
1222
1308
  dataProvider="${this.dataProvider}/list-item/${f}"
1223
1309
  >
1224
- ${rs(A||this.templateList[n%i])}
1310
+ ${is(k||this.templateList[n%i])}
1225
1311
  </sonic-subscriber>
1226
- ${E?re:c}
1312
+ ${E?se:c}
1227
1313
  `)})}
1228
- `}};Jt([u({type:Object})],qt.prototype,"itemPropertyMap",2),Jt([u({type:String})],qt.prototype,"templateKey",2),Jt([u({type:String})],qt.prototype,"idKey",2),Jt([u()],qt.prototype,"loader",2),Jt([u()],qt.prototype,"limit",2),Jt([u()],qt.prototype,"offset",2),Jt([u({type:Function,attribute:!1})],qt.prototype,"items",1),Jt([u({type:Function,attribute:!1})],qt.prototype,"noItems",2),Jt([u({type:Function,attribute:!1})],qt.prototype,"skeleton",2),Jt([u({type:Function,attribute:!1})],qt.prototype,"separator",2),qt=Jt([X(Ch)],qt);/**
1314
+ `}};Xt([u({type:Object})],Ht.prototype,"itemPropertyMap",2),Xt([u({type:String})],Ht.prototype,"templateKey",2),Xt([u({type:String})],Ht.prototype,"idKey",2),Xt([u()],Ht.prototype,"loader",2),Xt([u()],Ht.prototype,"limit",2),Xt([u()],Ht.prototype,"offset",2),Xt([u({type:Function,attribute:!1})],Ht.prototype,"items",1),Xt([u({type:Function,attribute:!1})],Ht.prototype,"noItems",2),Xt([u({type:Function,attribute:!1})],Ht.prototype,"skeleton",2),Xt([u({type:Function,attribute:!1})],Ht.prototype,"separator",2),Ht=Xt([Q(od)],Ht);/**
1229
1315
  * @license
1230
1316
  * Copyright 2021 Google LLC
1231
1317
  * SPDX-License-Identifier: BSD-3-Clause
1232
- */function*Na(t,e){if(t!==void 0){let s=0;for(const r of t)yield e(r,s++)}}var kh=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,ht=(t,e,s,r)=>{for(var i=r>1?void 0:r?$h(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&kh(e,s,i),i};const Dh="sonic-queue";let tt=class extends nt(J){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),r=this.filterPublisher?.get(),i=this.filteredFields.split(" ");for(const o in r){let c=r[o];Array.isArray(c)&&(c=c.filter(h=>h!==null)),!(this.filteredFields&&i.includes(o)||c==null||c.toString()==="")&&s.set(o,r[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,Gc(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)be.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await be.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)be.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=tt.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=gs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await be.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=be.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=gs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return fs()}ensureScrollSync(){if(!fs()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Zs(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!fs()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(r=>r.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(r=>requestAnimationFrame(()=>r())),await new Promise(r=>requestAnimationFrame(()=>r())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Zs(s),On(s)})()}updated(t){if(fs()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();On(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const g=this.props,f=g[g.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const g=[];g.resultCount=this.resultCount,g.lastFetchedData=t?.detail.fetchedData||{},this.props=g}r>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let i=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=i.split("?");let o=n.shift();const c=new URLSearchParams(n.join("?")),h=this.filterPublisher?.get(),b=this.filteredFields.split(" ");for(const g in h)this.filteredFields&&b.includes(g)||h[g]==null||h[g]==""||c.set(g,h[g]);this.searchHash||(this.searchHash=c.toString()),o=o+"?"+c.toString(),i=i+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(i);const k=[...this.props,{id:c.toString()+"/"+this.props.length,dataProvider:i,endPoint:o,offset:e,limit:this.limit}];k.resultCount=this.resultCount,k.lastFetchedData=t?.detail.fetchedData||{},this.props=k,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return re;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1233
- ${Na(this.props,(e,s)=>{const r=s==0?this.templates:this.templates?.filter(i=>i.getAttribute("data-value")!="no-item");return R`
1318
+ */function*rl(t,e){if(t!==void 0){let s=0;for(const r of t)yield e(r,s++)}}var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,dt=(t,e,s,r)=>{for(var i=r>1?void 0:r?ld(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ad(e,s,i),i};const cd="sonic-queue";let rt=class extends kt(J){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),r=this.filterPublisher?.get(),i=this.filteredFields.split(" ");for(const o in r){let c=r[o];Array.isArray(c)&&(c=c.filter(h=>h!==null)),!(this.filteredFields&&i.includes(o)||c==null||c.toString()==="")&&s.set(o,r[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,Pu(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)me.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await me.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)me.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=rt.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=vs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await me.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=me.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=vs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return bs()}ensureScrollSync(){if(!bs()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,er(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!bs()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(r=>r.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(r=>requestAnimationFrame(()=>r())),await new Promise(r=>requestAnimationFrame(()=>r())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();er(s),In(s)})()}updated(t){if(bs()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();In(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const r=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const m=this.props,f=m[m.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const m=[];m.resultCount=this.resultCount,m.lastFetchedData=t?.detail.fetchedData||{},this.props=m}r>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let i=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=i.split("?");let o=n.shift();const c=new URLSearchParams(n.join("?")),h=this.filterPublisher?.get(),g=this.filteredFields.split(" ");for(const m in h)this.filteredFields&&g.includes(m)||h[m]==null||h[m]==""||c.set(m,h[m]);this.searchHash||(this.searchHash=c.toString()),o=o+"?"+c.toString(),i=i+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(i);const A=[...this.props,{id:c.toString()+"/"+this.props.length,dataProvider:i,endPoint:o,offset:e,limit:this.limit}];A.resultCount=this.resultCount,A.lastFetchedData=t?.detail.fetchedData||{},this.props=A,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return se;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",R`
1319
+ ${rl(this.props,(e,s)=>{const r=s==0?this.templates:this.templates?.filter(i=>i.getAttribute("data-value")!="no-item");return R`
1234
1320
  <sonic-list
1235
1321
  fetch
1236
1322
  loader="${this.loader}"
@@ -1256,158 +1342,105 @@
1256
1342
  >
1257
1343
  </sonic-list>
1258
1344
  `})}
1259
- `}};tt.instanceCounter=0,ht([u({type:Array})],tt.prototype,"templates",2),ht([u({type:Function,attribute:!1})],tt.prototype,"items",2),ht([u({type:Function,attribute:!1})],tt.prototype,"noItems",2),ht([u({type:Function,attribute:!1})],tt.prototype,"skeleton",2),ht([u({type:Object})],tt.prototype,"itemPropertyMap",2),ht([u()],tt.prototype,"cache",2),ht([u()],tt.prototype,"targetRequestDuration",2),ht([u()],tt.prototype,"limit",2),ht([u()],tt.prototype,"lazyBoundsRatio",2),ht([u()],tt.prototype,"offset",2),ht([u()],tt.prototype,"resultCount",2),ht([u({type:Boolean})],tt.prototype,"noLazyload",2),ht([u({type:String})],tt.prototype,"loader",2),ht([u()],tt.prototype,"filteredFields",2),ht([u({type:String})],tt.prototype,"dataProviderExpression",2),ht([u({type:Boolean})],tt.prototype,"invalidateOnPageShow",2),ht([u({type:String})],tt.prototype,"idKey",2),tt=ht([X(Dh)],tt);var Eh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,wr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Oh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Eh(e,s,i),i};const Th="sonic-submit";let Ls=class extends nt(J){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=be.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,ut.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),ut.hide(),this.disabled=!1;return}const r=this.getAttribute("method")?.toLocaleLowerCase()||"post",i=this.hasAttribute("sendAsFormData"),n=e.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),c=o?be.getInstance().get(o):null;let h={};c&&(h=c.get());let b=null;const k=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||k,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete h.needsCaptchaValidation,i)b=await this.api?.submitFormData(g,E,r,h);else switch(r){case"put":b=await this.api?.put(g,E,h);break;case"patch":b=await this.api?.patch(g,E,h);break;case"delete":b=await this.api?.delete(g,E,h);break;case"get":const y=new URLSearchParams;if(E)for(const C in E)y.append(C,E[C]);const I="?"+y.toString();b=await this.api?.get(g+I,h);break;default:b=await this.api?.post(g,E,h);break}ut.hide(),b?b._sonic_http_response_&&!b._sonic_http_response_.ok&&Object.keys(b).length===1&&(b.messages=[{content:"Network Error",status:"error"}]):b={messages:[{content:"Network Error",status:"error"}]};const O=this.getAncestorAttributeValue("clearedDataOnSuccess");O&&O.split(" ").forEach(y=>be.get(y).set({}));const N=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",U=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[N]&&E[U]&&this.saveCredentials(E[N],E[U]),this.submitResultKey&&(b=at.traverse(b,this.submitResultKey.split("."),!0));const P=this.getAncestorAttributeValue("submitResultDataProvider");P&&be.get(P).set(b),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:b,bubbles:!0,composed:!0}))},A=c?.needsCaptchaValidation.get()?c:e.needsCaptchaValidation.get()?e:null;if(A){A.captchaToken.set("request_token");const E=O=>{O!="request_token"?(f(),A.captchaToken.offAssign(E)):(ut.hide(),this.disabled=!1)};A.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Ds(this.getApiConfiguration())}submitNativeForm(){const t=gs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...be.get(e).get()};delete s.needsCaptchaValidation;for(const i in s){if(i=="isFormValid")continue;let n=t.querySelector('input[name="'+i+'"], select[name="'+i+'"], textarea[name="'+i+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=i,t.appendChild(n));let o=s[i];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const r=document.createElement("input");r.name=this.name,r.style.display="none",r.value=this.value,r.type="submit",t.appendChild(r),r&&r.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return R`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Ls.styles=ee`
1345
+ `}};rt.instanceCounter=0,dt([u({type:Array})],rt.prototype,"templates",2),dt([u({type:Function,attribute:!1})],rt.prototype,"items",2),dt([u({type:Function,attribute:!1})],rt.prototype,"noItems",2),dt([u({type:Function,attribute:!1})],rt.prototype,"skeleton",2),dt([u({type:Object})],rt.prototype,"itemPropertyMap",2),dt([u()],rt.prototype,"cache",2),dt([u()],rt.prototype,"targetRequestDuration",2),dt([u()],rt.prototype,"limit",2),dt([u()],rt.prototype,"lazyBoundsRatio",2),dt([u()],rt.prototype,"offset",2),dt([u()],rt.prototype,"resultCount",2),dt([u({type:Boolean})],rt.prototype,"noLazyload",2),dt([u({type:String})],rt.prototype,"loader",2),dt([u()],rt.prototype,"filteredFields",2),dt([u({type:String})],rt.prototype,"dataProviderExpression",2),dt([u({type:Boolean})],rt.prototype,"invalidateOnPageShow",2),dt([u({type:String})],rt.prototype,"idKey",2),rt=dt([Q(cd)],rt);var ud=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,Pr=(t,e,s,r)=>{for(var i=r>1?void 0:r?hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ud(e,s,i),i};const dd="sonic-submit";let Ns=class extends kt(J){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=me.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,ht.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),ht.hide(),this.disabled=!1;return}const r=this.getAttribute("method")?.toLocaleLowerCase()||"post",i=this.hasAttribute("sendAsFormData"),n=e.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),c=o?me.getInstance().get(o):null;let h={};c&&(h=c.get());let g=null;const A=this.getAncestorAttributeValue("dataProvider"),m=this.endPoint||A,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete h.needsCaptchaValidation,i)g=await this.api?.submitFormData(m,E,r,h);else switch(r){case"put":g=await this.api?.put(m,E,h);break;case"patch":g=await this.api?.patch(m,E,h);break;case"delete":g=await this.api?.delete(m,E,h);break;case"get":const y=new URLSearchParams;if(E)for(const C in E)y.append(C,E[C]);const F="?"+y.toString();g=await this.api?.get(m+F,h);break;default:g=await this.api?.post(m,E,h);break}ht.hide(),g?g._sonic_http_response_&&!g._sonic_http_response_.ok&&Object.keys(g).length===1&&(g.messages=[{content:"Network Error",status:"error"}]):g={messages:[{content:"Network Error",status:"error"}]};const O=this.getAncestorAttributeValue("clearedDataOnSuccess");O&&O.split(" ").forEach(y=>me.get(y).set({}));const z=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",B=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[z]&&E[B]&&this.saveCredentials(E[z],E[B]),this.submitResultKey&&(g=lt.traverse(g,this.submitResultKey.split("."),!0));const S=this.getAncestorAttributeValue("submitResultDataProvider");S&&me.get(S).set(g),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:g,bubbles:!0,composed:!0}))},k=c?.needsCaptchaValidation.get()?c:e.needsCaptchaValidation.get()?e:null;if(k){k.captchaToken.set("request_token");const E=O=>{O!="request_token"?(f(),k.captchaToken.offAssign(E)):(ht.hide(),this.disabled=!1)};k.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Ts(this.getApiConfiguration())}submitNativeForm(){const t=vs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...me.get(e).get()};delete s.needsCaptchaValidation;for(const i in s){if(i=="isFormValid")continue;let n=t.querySelector('input[name="'+i+'"], select[name="'+i+'"], textarea[name="'+i+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=i,t.appendChild(n));let o=s[i];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const r=document.createElement("input");r.name=this.name,r.style.display="none",r.value=this.value,r.type="submit",t.appendChild(r),r&&r.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return R`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Ns.styles=X`
1260
1346
  [data-disabled] {
1261
1347
  opacity: 0.3;
1262
1348
  pointer-events: none;
1263
1349
  user-select: none;
1264
1350
  }
1265
- `,wr([u({type:String})],Ls.prototype,"submitResultKey",2),wr([u({type:Boolean})],Ls.prototype,"disabled",2),wr([u({type:String})],Ls.prototype,"endPoint",2),wr([u()],Ls.prototype,"name",2),wr([u()],Ls.prototype,"value",2),Ls=wr([X(Th)],Ls);var Lh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Jr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Mh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Lh(e,s,i),i};const Ih="sonic-router";let _r=class extends Ur(J){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){ct.onChange(this),super.connectedCallback()}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const r=new RegExp(this.regExpBasePath+e);if(r.test(this.cleanLocation)){const i=r.exec(this.cleanLocation)||[e];i.shift(),t.push(s([...i]))}else try{const n=new ps(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return R`${t}`;const e=[];for(const s of this.templatePartsList){const r=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+r).test(this.cleanLocation))e.push(s);else try{new ps(this.patternBasePath+r+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+r.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(r=>r.hasAttribute("data-fallback"));s&&e.push(s)}return R`${Ii(e,(s,r)=>r+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let r="";const i=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new ps("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");r=new ps(i).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(r=o.shift()?.replace(n,i)||"")}return R`<div
1351
+ `,Pr([u({type:String})],Ns.prototype,"submitResultKey",2),Pr([u({type:Boolean})],Ns.prototype,"disabled",2),Pr([u({type:String})],Ns.prototype,"endPoint",2),Pr([u()],Ns.prototype,"name",2),Pr([u()],Ns.prototype,"value",2),Ns=Pr([Q(dd)],Ns);var pd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,ti=(t,e,s,r)=>{for(var i=r>1?void 0:r?fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pd(e,s,i),i};const md="sonic-router";let xr=class extends Vr(J){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){ut.onChange(this),super.connectedCallback()}disconnectedCallback(){ut.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const r=new RegExp(this.regExpBasePath+e);if(r.test(this.cleanLocation)){const i=r.exec(this.cleanLocation)||[e];i.shift(),t.push(s([...i]))}else try{const n=new gs(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return R`${t}`;const e=[];for(const s of this.templatePartsList){const r=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+r).test(this.cleanLocation))e.push(s);else try{new gs(this.patternBasePath+r+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+r.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(r=>r.hasAttribute("data-fallback"));s&&e.push(s)}return R`${Ri(e,(s,r)=>r+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let r="";const i=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new gs("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");r=new gs(i).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(r=o.shift()?.replace(n,i)||"")}return R`<div
1266
1352
  style="display:contents"
1267
1353
  dataProvider="${r}"
1268
1354
  >
1269
- ${rs(s)}
1270
- </div>`}return rs(s)})}`}};Jr([u({type:String})],_r.prototype,"fallBackRoute",2),Jr([u({type:Object,attribute:!1})],_r.prototype,"routes",2),Jr([u({type:String})],_r.prototype,"basePath",2),Jr([u()],_r.prototype,"location",1),_r=Jr([X(Ih)],_r);var Nh=Object.getOwnPropertyDescriptor,Fh=(t,e,s,r)=>{for(var i=r>1?void 0:r?Nh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const jh="sonic-redirect";let Fa=class extends nt(J){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded")){ct.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=at.traverse(this.props,t);e&&!(at.isObject(e)&&e)&&ct.changeFromComponent(this)}};Fa=Fh([X(jh)],Fa);var Rh=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,Ui=(t,e,s,r)=>{for(var i=r>1?void 0:r?zh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Rh(e,s,i),i};const Uh="sonic-states";let Xr=class extends nt(Ur(J)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,r]of Object.entries(this.states)){if(s==="fallback"||!r)continue;const i=new RegExp(s);if(i.test(t)){const n=i.exec(t)||[s];n.shift(),e.push(r([...n]))}else try{const n=new ps("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(r(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(r({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&at.isObject(t)||t===void 0)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const r of this.templatePartsList){let i=r.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(n+""))s.push(r),r.removeAttribute("mode");else{const c=new ps(i);c.names.length>0&&c.match(n)&&(r.setAttribute("mode","patternMatching"),s.push(r))}}return R`${Ii(s,(r,i)=>i+new Date().getTime(),r=>{if(r?.hasAttribute("dataProviderExpression")){const i=r.getAttribute("dataProviderExpression");let n="",o=t,c=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=c,c=t),c==""&&(c=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const h=new ps(c);n=new ps(i).stringify(h.match(o))}else{const h=new RegExp(c),b=(o+"").match(h);b&&(n=b.shift()?.replace(h,i))}return R`<div
1355
+ ${is(s)}
1356
+ </div>`}return is(s)})}`}};ti([u({type:String})],xr.prototype,"fallBackRoute",2),ti([u({type:Object,attribute:!1})],xr.prototype,"routes",2),ti([u({type:String})],xr.prototype,"basePath",2),ti([u()],xr.prototype,"location",1),xr=ti([Q(md)],xr);var gd=Object.getOwnPropertyDescriptor,bd=(t,e,s,r)=>{for(var i=r>1?void 0:r?gd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const vd="sonic-redirect";let il=class extends kt(J){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded")){ut.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=lt.traverse(this.props,t);e&&!(lt.isObject(e)&&e)&&ut.changeFromComponent(this)}};il=bd([Q(vd)],il);var yd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,Vi=(t,e,s,r)=>{for(var i=r>1?void 0:r?wd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yd(e,s,i),i};const _d="sonic-states";let si=class extends kt(Vr(J)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,r]of Object.entries(this.states)){if(s==="fallback"||!r)continue;const i=new RegExp(s);if(i.test(t)){const n=i.exec(t)||[s];n.shift(),e.push(r([...n]))}else try{const n=new gs("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(r(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(r({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&lt.isObject(t)||t===void 0)&&(t="");const e=this.handleStates(t);if(e.length>0)return R`${e}`;const s=[];for(const r of this.templatePartsList){let i=r.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(n+""))s.push(r),r.removeAttribute("mode");else{const c=new gs(i);c.names.length>0&&c.match(n)&&(r.setAttribute("mode","patternMatching"),s.push(r))}}return R`${Ri(s,(r,i)=>i+new Date().getTime(),r=>{if(r?.hasAttribute("dataProviderExpression")){const i=r.getAttribute("dataProviderExpression");let n="",o=t,c=r.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=c,c=t),c==""&&(c=this.inverted?"*":"^$"),r.getAttribute("mode")=="patternMatching"){const h=new gs(c);n=new gs(i).stringify(h.match(o))}else{const h=new RegExp(c),g=(o+"").match(h);g&&(n=g.shift()?.replace(h,i))}return R`<div
1271
1357
  style="display:contents"
1272
1358
  dataProvider="${n}"
1273
1359
  >
1274
- ${rs(r)}
1275
- </div>`}return rs(r)})}`}};Ui([u()],Xr.prototype,"state",2),Ui([u({type:Boolean,reflect:!0})],Xr.prototype,"inverted",2),Ui([u({type:Object})],Xr.prototype,"states",2),Xr=Ui([X(Uh)],Xr);var qh=Object.getOwnPropertyDescriptor,Vh=(t,e,s,r)=>{for(var i=r>1?void 0:r?qh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Bh="sonic-scope";let ja=class extends J{createRenderRoot(){return this}render(){return R`<slot></slot>`}};ja=Vh([X(Bh)],ja);function Ra(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function za(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function Zn(t){const e=Ra(t);return e?Je.getApiConfiguration(e):null}function Jn(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const Hh=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Wh(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function Ua(t){let e=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const i=s;s=[],t().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function qa(t,e){if(Wh(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function Va(t,e){const s=Ra(t);if(!s)return()=>{};let r=!1;const i=()=>{r||Jn(Zn(t))&&(r=!0,e())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const c=new MutationObserver(()=>i());let h=s;for(;h;)h instanceof Element&&c.observe(h,{attributes:!0,attributeFilter:[...Hh]}),h=h.parentNode||h.host;return n.push(()=>c.disconnect()),()=>{r=!0,n.forEach(b=>b())}}class Ba{constructor(){this.bindings=new WeakMap}bind(e,s){const r={run:s};let i=this.bindings.get(e);return i||(i=new Set,this.bindings.set(e,i)),i.add(r),()=>{const n=this.bindings.get(e);n&&(n.delete(r),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let Ha=0;function Kh(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Wa(t,e){const s=e?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const c=function(...h){if(s==="before")return t(this).then(()=>o.apply(this,h));const b=o.apply(this,h);return Kh(b)?b.then(k=>t(this).then(()=>k)):t(this).then(()=>b)};n.value=c}}function Yh(t,e){return Wa(s=>t.refetch(s),e)}function Gh(t,e){return Wa(s=>t.send(s),e)}function qi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function Ka(t,e,s){const r=t.path,i=Ya(e)?void 0:e,n=Ya(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=i?.path,h=n?.triggerKey?.path,b=Ut(r),k=c?Ut(c):[],g=h?Ut(h):[],f=[...new Set([...b,...k,...g])],A=b.length>0,E=!!c,O=n?.refetchEveryMs??0,N=new Ba,U=new WeakMap,P=new WeakSet,y=new WeakMap;let I;const C=function($,G,z){if(z){const se=z.value;if(!se)return;C.registerResultHandler($,(ie,q)=>se.call(ie,q));return}if(!$)return;if(P.has($)){y.get($)?.add(G);return}P.add($),y.set($,new Set([G])),Js($);const ne=`__get_state_${G}`;$.__onConnected__(se=>{const ie=se;let q=ie[ne];q||(q={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=q),q.cleanupOperation?.(),q.cleanupOperation=null,q.cleanupWatchers.forEach(Pe=>Pe()),q.cleanupWatchers=[],q.requestGeneration++,q.refetchEveryMs=O,Pr(q);const le=()=>{Pr(q),!(!q.refetchEveryMs||q.refetchEveryMs<=0)&&(q.refetchTimeoutId=setTimeout(()=>{q.refetchTimeoutId=null,Ue().catch(()=>{})},q.refetchEveryMs))},pe=Pe=>{y.get($)?.forEach(m=>{ie[m]=Pe})},Ue=async()=>{const Pe=A?Ot(se,r,o):{ready:!0,path:r};if(!Pe.ready||!Pe.path){pe(void 0),le();return}let m=null;if(E&&c){const _e=Ot(se,c,o);if(!_e.ready||!_e.path){pe(void 0),le();return}const De=Gt(_e.path);m=za(De)}else m=Zn(se);if(!Jn(m)){if(!E&&!q.scopeWatchCleanup){const _e=Va(se,me);q.scopeWatchCleanup=_e,q.cleanupWatchers.push(()=>{_e(),q.scopeWatchCleanup=null})}le();return}const _=++q.requestGeneration,ye=await new Ds(m).getDetailed(Pe.path);return _!==q.requestGeneration||(y.get($)?.forEach(_e=>{ie[_e]=ye}),le(),U.get($)?.forEach(_e=>_e(se,ye))),ye},ue=Ua(Ue),me=()=>{ue().catch(()=>{})};q.cleanupOperation=N.bind(se,ue);const ke=()=>{if(Vi(q),!h)return;const Pe=Ot(se,h,o);if(!Pe.ready||!Pe.path)return;const m=Gt(Pe.path);if(!m)return;const _=me;m.onInvalidate(_),q.triggerPublisher=m,q.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;qi(q);const Pe=Ot(se,c,o);if(!Pe.ready||!Pe.path){pe(void 0);return}const m=Gt(Pe.path);if(!m){pe(void 0);return}const _=me;m.onInternalMutation(_),q.configPublisher=m,q.configMutationHandler=_},W=()=>{ke(),ce(),E||me()};if(E||g.length){for(const Pe of f){const m=Es(Os.watcherStore,Os.hooked,se,Pe,()=>W());q.cleanupWatchers.push(m)}W()}else{const Pe=()=>{if(A)for(const m of b){const _=Es(Os.watcherStore,Os.hooked,se,m,me);q.cleanupWatchers.push(_)}ke(),Ue().catch(()=>{})};q.cleanupWatchers.push(qa(se,Pe))}}),$.__onDisconnected__(se=>{const ie=se,q=ie[ne];q&&(q.cleanupOperation?.(),q.cleanupOperation=null,qi(q),Vi(q),Pr(q),q.cleanupWatchers.forEach(le=>le()),q.cleanupWatchers=[],q.requestGeneration++,y.get($)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=$=>N.run($),C.registerResultHandler=($,G)=>{let z=U.get($);z||(z=new Set,U.set($,z)),z.add(G),P.has($)||(I??=`__get_handler_${Ha++}`,C($,I))},C}function Ya(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function Ga(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function Za(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Vi(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function Pr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Zh(t){if(!(!t||typeof t.get!="function"))return t.get()}function Xn(t,e){return function(s,r,i,n){const o=s.path,c=r.path,h=Ga(i)?void 0:i,b=Ga(i)?i:n,k=h?.path,g=b?.triggerKey?.path,f=Ut(o),A=Ut(c),E=k?Ut(k):[],O=g?Ut(g):[],N=[...new Set([...f,...A,...E,...O])],U=f.length>0,P=!!k,y=b?.refetchEveryMs??0,I=b?.skipIfBodyMissing??!0,C=b?.autoPostOnBodyMutation??!0,$={skipEmptyPlaceholder:b?.skipEmptyPlaceholder},G=`__${t.toLowerCase()}_state_`,z=new Ba,ne=new WeakMap,se=new WeakSet,ie=new WeakMap;let q;const le=function(pe,Ue,ue){if(ue){const ke=ue.value;if(!ke)return;le.registerResultHandler(pe,(ce,W)=>ke.call(ce,W));return}if(!pe)return;if(se.has(pe)){ie.get(pe)?.add(Ue);return}se.add(pe),ie.set(pe,new Set([Ue])),Js(pe);const me=`${G}${Ue}`;pe.__onConnected__(ke=>{const ce=ke;let W=ce[me];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:I,autoPostOnBodyMutation:C},ce[me]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach(D=>D()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=I,W.autoPostOnBodyMutation=C,Pr(W);const Pe=()=>{Pr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},m=D=>{ie.get(pe)?.forEach(j=>{ce[j]=D})},_=async()=>{const D=U?Ot(ke,o,$):{ready:!0,path:o};if(!D.ready||!D.path){m(void 0),Pe();return}const j=Ot(ke,c,$);if(!j.ready||!j.path){m(void 0),Pe();return}const V=Gt(j.path),H=Zh(V);if(W.skipIfBodyMissing&&H==null){Pe();return}let F=null;if(P&&k){const ge=Ot(ke,k,$);if(!ge.ready||!ge.path){m(void 0),Pe();return}const fe=Gt(ge.path);F=za(fe)}else F=Zn(ke);if(!Jn(F)){if(!P&&!W.scopeWatchCleanup){const ge=Va(ke,ye);W.scopeWatchCleanup=ge,W.cleanupWatchers.push(()=>{ge(),W.scopeWatchCleanup=null})}Pe();return}const Y=++W.requestGeneration,ae=new Ds(F);let xe;try{xe=await e(ae,D.path,H)}catch(ge){throw Y===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe(ke,void 0)),ge}return Y!==W.requestGeneration||(m(xe),Pe(),ne.get(pe)?.forEach(ge=>ge(ke,xe))),xe},Q=Ua(_),ye=()=>{Q().catch(()=>{})};W.cleanupOperation=z.bind(ke,Q);const _e=()=>{if(Za(W),!W.autoPostOnBodyMutation)return;const D=Ot(ke,c,$);if(!D.ready||!D.path)return;const j=Gt(D.path);if(!j)return;const V=ye;j.onInternalMutation(V),W.bodyPublisher=j,W.bodyMutationHandler=V},De=()=>{if(Vi(W),!g)return;const D=Ot(ke,g,$);if(!D.ready||!D.path)return;const j=Gt(D.path);if(!j)return;const V=ye;j.onInvalidate(V),W.triggerPublisher=j,W.triggerInvalidateHandler=V},T=()=>{if(!P||!k)return;qi(W);const D=Ot(ke,k,$);if(!D.ready||!D.path){m(void 0);return}const j=Gt(D.path);if(!j){m(void 0);return}const V=ye;j.onInternalMutation(V),W.configPublisher=j,W.configMutationHandler=V},M=()=>{_e(),De(),T(),W.autoPostOnBodyMutation&&ye()};if(P||A.length||O.length){for(const D of N){const j=Es(Os.watcherStore,Os.hooked,ke,D,()=>M());W.cleanupWatchers.push(j)}M()}else{const D=()=>{if(U)for(const j of f){const V=Es(Os.watcherStore,Os.hooked,ke,j,ye);W.cleanupWatchers.push(V)}_e(),De(),W.autoPostOnBodyMutation&&ye()};W.cleanupWatchers.push(qa(ke,D))}}),pe.__onDisconnected__(ke=>{const ce=ke,W=ce[me];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,qi(W),Za(W),Vi(W),Pr(W),W.cleanupWatchers.forEach(Pe=>Pe()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(Pe=>{ce[Pe]=void 0}))})};return le.send=pe=>z.run(pe),le.registerResultHandler=(pe,Ue)=>{let ue=ne.get(pe);ue||(ue=new Set,ne.set(pe,ue)),ue.add(Ue),se.has(pe)||(q??=`__${t.toLowerCase()}_handler_${Ha++}`,le(pe,q))},le}}function Jh(t,e,s,r){return Xn("POST",(i,n,o)=>i.postDetailed(n,o))(t,e,s,r)}function Xh(t,e,s,r){return Xn("PUT",(i,n,o)=>i.putDetailed(n,o))(t,e,s,r)}function Qh(t,e,s,r){return Xn("PATCH",(i,n,o)=>i.patchDetailed(n,o))(t,e,s,r)}const ed=Sa,td=Aa,sd=Ka;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:xa,publish:Sa,subscribe:Aa,onAssing:Tu,handle:Mu,ancestorAttribute:Vn,autoSubscribe:Iu,autoFill:Nu,get:Ka,post:Jh,put:Xh,patch:Qh,refetch:Yh,send:Gh};var rd=Object.defineProperty,id=Object.getOwnPropertyDescriptor,Bi=(t,e,s,r)=>{for(var i=r>1?void 0:r?id(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&rd(e,s,i),i};const Ja=new ki("communes?limit=$limit&fields=nom,code"),Xa=new Ss(Ja.path),nd="sonic-example";let Qr=class extends J{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1360
+ ${is(r)}
1361
+ </div>`}return is(r)})}`}};Vi([u()],si.prototype,"state",2),Vi([u({type:Boolean,reflect:!0})],si.prototype,"inverted",2),Vi([u({type:Object})],si.prototype,"states",2),si=Vi([Q(_d)],si);var Sd=Object.getOwnPropertyDescriptor,Pd=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const xd="sonic-scope";let nl=class extends J{createRenderRoot(){return this}render(){return R`<slot></slot>`}};nl=Pd([Q(xd)],nl);function ol(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function al(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function no(t){const e=ol(t);return e?Ge.getApiConfiguration(e):null}function oo(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const Ad=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Cd(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function ll(t){let e=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const i=s;s=[],t().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function cl(t,e){if(Cd(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function ul(t,e){const s=ol(t);if(!s)return()=>{};let r=!1;const i=()=>{r||oo(no(t))&&(r=!0,e())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const c=new MutationObserver(()=>i());let h=s;for(;h;)h instanceof Element&&c.observe(h,{attributes:!0,attributeFilter:[...Ad]}),h=h.parentNode||h.host;return n.push(()=>c.disconnect()),()=>{r=!0,n.forEach(g=>g())}}class hl{constructor(){this.bindings=new WeakMap}bind(e,s){const r={run:s};let i=this.bindings.get(e);return i||(i=new Set,this.bindings.set(e,i)),i.add(r),()=>{const n=this.bindings.get(e);n&&(n.delete(r),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let dl=0;function kd(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function pl(t,e){const s=e?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const c=function(...h){if(s==="before")return t(this).then(()=>o.apply(this,h));const g=o.apply(this,h);return kd(g)?g.then(A=>t(this).then(()=>A)):t(this).then(()=>g)};n.value=c}}function $d(t,e){return pl(s=>t.refetch(s),e)}function Dd(t,e){return pl(s=>t.send(s),e)}function Wi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function fl(t,e,s){const r=t.path,i=ml(e)?void 0:e,n=ml(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=i?.path,h=n?.triggerKey?.path,g=Bt(r),A=c?Bt(c):[],m=h?Bt(h):[],f=[...new Set([...g,...A,...m])],k=g.length>0,E=!!c,O=n?.refetchEveryMs??0,z=new hl,B=new WeakMap,S=new WeakSet,y=new WeakMap;let F;const C=function(D,Y,j){if(j){const re=j.value;if(!re)return;C.registerResultHandler(D,(ie,U)=>re.call(ie,U));return}if(!D)return;if(S.has(D)){y.get(D)?.add(Y);return}S.add(D),y.set(D,new Set([Y])),tr(D);const ne=`__get_state_${Y}`;D.__onConnected__(re=>{const ie=re;let U=ie[ne];U||(U={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=U),U.cleanupOperation?.(),U.cleanupOperation=null,U.cleanupWatchers.forEach(xe=>xe()),U.cleanupWatchers=[],U.requestGeneration++,U.refetchEveryMs=O,Ar(U);const le=()=>{Ar(U),!(!U.refetchEveryMs||U.refetchEveryMs<=0)&&(U.refetchTimeoutId=setTimeout(()=>{U.refetchTimeoutId=null,qe().catch(()=>{})},U.refetchEveryMs))},pe=xe=>{y.get(D)?.forEach(b=>{ie[b]=xe})},qe=async()=>{const xe=k?Ot(re,r,o):{ready:!0,path:r};if(!xe.ready||!xe.path){pe(void 0),le();return}let b=null;if(E&&c){const Pe=Ot(re,c,o);if(!Pe.ready||!Pe.path){pe(void 0),le();return}const Ee=Qt(Pe.path);b=al(Ee)}else b=no(re);if(!oo(b)){if(!E&&!U.scopeWatchCleanup){const Pe=ul(re,be);U.scopeWatchCleanup=Pe,U.cleanupWatchers.push(()=>{Pe(),U.scopeWatchCleanup=null})}le();return}const _=++U.requestGeneration,we=await new Ts(b).getDetailed(xe.path);return _!==U.requestGeneration||(y.get(D)?.forEach(Pe=>{ie[Pe]=we}),le(),B.get(D)?.forEach(Pe=>Pe(re,we))),we},ue=ll(qe),be=()=>{ue().catch(()=>{})};U.cleanupOperation=z.bind(re,ue);const $e=()=>{if(Ki(U),!h)return;const xe=Ot(re,h,o);if(!xe.ready||!xe.path)return;const b=Qt(xe.path);if(!b)return;const _=be;b.onInvalidate(_),U.triggerPublisher=b,U.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;Wi(U);const xe=Ot(re,c,o);if(!xe.ready||!xe.path){pe(void 0);return}const b=Qt(xe.path);if(!b){pe(void 0);return}const _=be;b.onInternalMutation(_),U.configPublisher=b,U.configMutationHandler=_},W=()=>{$e(),ce(),E||be()};if(E||m.length){for(const xe of f){const b=Ls(Ms.watcherStore,Ms.hooked,re,xe,()=>W());U.cleanupWatchers.push(b)}W()}else{const xe=()=>{if(k)for(const b of g){const _=Ls(Ms.watcherStore,Ms.hooked,re,b,be);U.cleanupWatchers.push(_)}$e(),qe().catch(()=>{})};U.cleanupWatchers.push(cl(re,xe))}}),D.__onDisconnected__(re=>{const ie=re,U=ie[ne];U&&(U.cleanupOperation?.(),U.cleanupOperation=null,Wi(U),Ki(U),Ar(U),U.cleanupWatchers.forEach(le=>le()),U.cleanupWatchers=[],U.requestGeneration++,y.get(D)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=D=>z.run(D),C.registerResultHandler=(D,Y)=>{let j=B.get(D);j||(j=new Set,B.set(D,j)),j.add(Y),S.has(D)||(F??=`__get_handler_${dl++}`,C(D,F))},C}function ml(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function gl(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function bl(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Ki(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function Ar(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Ed(t){if(!(!t||typeof t.get!="function"))return t.get()}function ao(t,e){return function(s,r,i,n){const o=s.path,c=r.path,h=gl(i)?void 0:i,g=gl(i)?i:n,A=h?.path,m=g?.triggerKey?.path,f=Bt(o),k=Bt(c),E=A?Bt(A):[],O=m?Bt(m):[],z=[...new Set([...f,...k,...E,...O])],B=f.length>0,S=!!A,y=g?.refetchEveryMs??0,F=g?.skipIfBodyMissing??!0,C=g?.autoPostOnBodyMutation??!0,D={skipEmptyPlaceholder:g?.skipEmptyPlaceholder},Y=`__${t.toLowerCase()}_state_`,j=new hl,ne=new WeakMap,re=new WeakSet,ie=new WeakMap;let U;const le=function(pe,qe,ue){if(ue){const $e=ue.value;if(!$e)return;le.registerResultHandler(pe,(ce,W)=>$e.call(ce,W));return}if(!pe)return;if(re.has(pe)){ie.get(pe)?.add(qe);return}re.add(pe),ie.set(pe,new Set([qe])),tr(pe);const be=`${Y}${qe}`;pe.__onConnected__($e=>{const ce=$e;let W=ce[be];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:F,autoPostOnBodyMutation:C},ce[be]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach($=>$()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=F,W.autoPostOnBodyMutation=C,Ar(W);const xe=()=>{Ar(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},b=$=>{ie.get(pe)?.forEach(N=>{ce[N]=$})},_=async()=>{const $=B?Ot($e,o,D):{ready:!0,path:o};if(!$.ready||!$.path){b(void 0),xe();return}const N=Ot($e,c,D);if(!N.ready||!N.path){b(void 0),xe();return}const q=Qt(N.path),V=Ed(q);if(W.skipIfBodyMissing&&V==null){xe();return}let I=null;if(S&&A){const ge=Ot($e,A,D);if(!ge.ready||!ge.path){b(void 0),xe();return}const fe=Qt(ge.path);I=al(fe)}else I=no($e);if(!oo(I)){if(!S&&!W.scopeWatchCleanup){const ge=ul($e,we);W.scopeWatchCleanup=ge,W.cleanupWatchers.push(()=>{ge(),W.scopeWatchCleanup=null})}xe();return}const G=++W.requestGeneration,ae=new Ts(I);let Ce;try{Ce=await e(ae,$.path,V)}catch(ge){throw G===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe($e,void 0)),ge}return G!==W.requestGeneration||(b(Ce),xe(),ne.get(pe)?.forEach(ge=>ge($e,Ce))),Ce},ee=ll(_),we=()=>{ee().catch(()=>{})};W.cleanupOperation=j.bind($e,ee);const Pe=()=>{if(bl(W),!W.autoPostOnBodyMutation)return;const $=Ot($e,c,D);if(!$.ready||!$.path)return;const N=Qt($.path);if(!N)return;const q=we;N.onInternalMutation(q),W.bodyPublisher=N,W.bodyMutationHandler=q},Ee=()=>{if(Ki(W),!m)return;const $=Ot($e,m,D);if(!$.ready||!$.path)return;const N=Qt($.path);if(!N)return;const q=we;N.onInvalidate(q),W.triggerPublisher=N,W.triggerInvalidateHandler=q},T=()=>{if(!S||!A)return;Wi(W);const $=Ot($e,A,D);if(!$.ready||!$.path){b(void 0);return}const N=Qt($.path);if(!N){b(void 0);return}const q=we;N.onInternalMutation(q),W.configPublisher=N,W.configMutationHandler=q},M=()=>{Pe(),Ee(),T(),W.autoPostOnBodyMutation&&we()};if(S||k.length||O.length){for(const $ of z){const N=Ls(Ms.watcherStore,Ms.hooked,$e,$,()=>M());W.cleanupWatchers.push(N)}M()}else{const $=()=>{if(B)for(const N of f){const q=Ls(Ms.watcherStore,Ms.hooked,$e,N,we);W.cleanupWatchers.push(q)}Pe(),Ee(),W.autoPostOnBodyMutation&&we()};W.cleanupWatchers.push(cl($e,$))}}),pe.__onDisconnected__($e=>{const ce=$e,W=ce[be];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,Wi(W),bl(W),Ki(W),Ar(W),W.cleanupWatchers.forEach(xe=>xe()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(xe=>{ce[xe]=void 0}))})};return le.send=pe=>j.run(pe),le.registerResultHandler=(pe,qe)=>{let ue=ne.get(pe);ue||(ue=new Set,ne.set(pe,ue)),ue.add(qe),re.has(pe)||(U??=`__${t.toLowerCase()}_handler_${dl++}`,le(pe,U))},le}}function Od(t,e,s,r){return ao("POST",(i,n,o)=>i.postDetailed(n,o))(t,e,s,r)}function Td(t,e,s,r){return ao("PUT",(i,n,o)=>i.putDetailed(n,o))(t,e,s,r)}function Ld(t,e,s,r){return ao("PATCH",(i,n,o)=>i.patchDetailed(n,o))(t,e,s,r)}const Md=La,Fd=Ma,Id=fl;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:Ta,publish:La,subscribe:Ma,onAssing:oh,handle:lh,ancestorAttribute:Gn,autoSubscribe:ch,autoFill:uh,get:fl,post:Od,put:Td,patch:Ld,refetch:$d,send:Dd};var Nd=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,Gi=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nd(e,s,i),i};const vl=new Ei("communes?limit=$limit&fields=nom,code"),yl=new $s(vl.path),jd="sonic-example";let ri=class extends J{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
1276
1362
  · get: ${JSON.stringify(this.geoCommunesPayload?.result??null)} · HTTP
1277
1363
  ${this.geoCommunesPayload?.response?.status??"—"} · subscribe:
1278
1364
  ${JSON.stringify(this.geoCommunesResult??null)}</span
1279
- >`}};Bi([u({type:Number})],Qr.prototype,"limit",2),Bi([sd(Ja),ed(Xa)],Qr.prototype,"geoCommunesPayload",2),Bi([Ae(),td(Xa.result)],Qr.prototype,"geoCommunesResult",2),Qr=Bi([X(nd)],Qr);const od={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class ad{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const r in s.library)this.sduiDescriptor.library[r]=s.library[r];for(const r of s.transforms)this.transformAction(r)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const r=s.nodes;if(!r)return[];let i=[],n=0;for(const o of e)for(const c of r)this.nodeMatchesPattern(o,c)&&i.push({parent:s,child:c,index:n}),i=i.concat(this.getNodesMatchingPatterns([o],c)),n++;return i}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const r=e,i=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const h of n)if(!this.stringMatchesExpression(i[h],r[h]))return!1;const o=e.attributes,c=s.attributes;if(o&&!c)return!1;if(o){for(const h in o)if(!c||!this.stringMatchesExpression(c[h],o[h]))return!1}return!0}unwrap(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes)}wrap(e,s){const r={...e.ui};r.nodes||(r.nodes=[]);let i=0;for(const o of s)r.nodes?.push(o.child),i>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),i++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,r))}move(e,s){for(const r of s){r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1);let i=[];e.after&&(i=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(i=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=i[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,r.child)}}remap(e,s){for(const r of s){const i={...e.ui};i.attributes||(i.attributes={});const n=r.child.attributes;if(n)for(const g in n)Object.prototype.hasOwnProperty.call(i.attributes,"key")||(i.attributes[g]=n[g]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],c=r.child,h=i;for(const g of o)!Object.prototype.hasOwnProperty.call(i,g)&&c[g]&&(h[g]=c[g]);i.nodes||(i.nodes=[]);const b=r.child.nodes;if(b)for(const g of b)i.nodes.push(g);const k=r.parent.nodes?.indexOf(r.child)||-1;k!=-1&&(r.parent.nodes?.splice(k,1),r.parent.nodes?.splice(k,0,i))}}delete(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1)}insert(e,s){const r=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const i=s[0];i&&(r=="in"?(i.child.nodes||(i.child.nodes=[]),i.child.nodes.push({...e.ui})):i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child)+(r=="after"?1:0),0,{...e.ui}))}}var ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,Qn=(t,e,s,r)=>{for(var i=r>1?void 0:r?cd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ld(e,s,i),i};const ud="sonic-sdui";let Hi=class extends Ea(Ts(J)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){this.props==null&&(this.sduiDescriptor={});{const e=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==e)return;this.sduiDescriptor=e,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,od,this.sduiDescriptor.library),this.sduiDescriptor.library=t,await this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}async loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js){const t=await Promise.all(this.sduiDescriptor.js.map(s=>gs.loadJS(s))),e=this.sduiDescriptor.js.filter((s,r)=>!t[r]);if(e.length)throw new Error(`SDUI: échec chargement js[] — ${e.join(", ")}`)}this.sduiDescriptor.css&&await Promise.all(this.sduiDescriptor.css.map(t=>gs.loadCSS(t)))}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new ad().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:r}=this.handleLibrary(t,e);return this.handleAttributes(t,s),s=this.handleMarkup(t,s),r||(r=s),this.handleChildNodes(t,r,s),this.handleInnerHTML(t,r),t.prefix||t.suffix?this.handlePrefixSuffix(t,s):s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes)for(const r of t.nodes){const i=this.parseChild(r);let n=e;r.parentElementSelector&&(n=s.querySelector(r.parentElementSelector)||e),n.shadowRoot?n.shadowRoot.appendChild(i):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(i):n.appendChild(i)}}handleLibrary(t,e){let s,r;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const i=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;i&&(r=s.querySelector(i))}else s=document.createElement(e);return{element:s,contentElement:r}}handleAttributes(t,e){const s=t.attributes;for(const r in s){const i=s[r],n=Br.isObject(i)?JSON.stringify(i):i;e.setAttribute(r,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(r=>{e&&(e.innerHTML+=r)})}else e&&(e.innerHTML+=t.innerHTML)}};Qn([u()],Hi.prototype,"sduiKey",2),Qn([u()],Hi.prototype,"messagesKey",2),Hi=Qn([X(ud)],Hi);var hd=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,Qa=(t,e,s,r)=>{for(var i=r>1?void 0:r?dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&hd(e,s,i),i};let Wi=class extends Ts(J){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const r=t[s];if(typeof r=="string"){const i=r.split("."),n=i.shift();if(!n)continue;let o=be.get(n);o=Br.traverse(o,i);const c={publisher:o,subscriber:h=>{e[s]=h}};this.listeners.push(c),o.onAssign(c.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const i=new Lr({},e);e._proxies_.set(s,i);const n={publisher:i,subscriber:o=>{e[s]=o}};this.listeners.push(n),i.onAssign(n.subscriber),this.parseComposition(r,i)}}}render(){return R`<slot></slot>`}};Wi.styles=[ee`
1365
+ >`}};Gi([u({type:Number})],ri.prototype,"limit",2),Gi([Id(vl),Md(yl)],ri.prototype,"geoCommunesPayload",2),Gi([Ae(),Fd(yl.result)],ri.prototype,"geoCommunesResult",2),ri=Gi([Q(jd)],ri);const zd={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class Ud{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const r in s.library)this.sduiDescriptor.library[r]=s.library[r];for(const r of s.transforms)this.transformAction(r)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const r=s.nodes;if(!r)return[];let i=[],n=0;for(const o of e)for(const c of r)this.nodeMatchesPattern(o,c)&&i.push({parent:s,child:c,index:n}),i=i.concat(this.getNodesMatchingPatterns([o],c)),n++;return i}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const r=e,i=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const h of n)if(!this.stringMatchesExpression(i[h],r[h]))return!1;const o=e.attributes,c=s.attributes;if(o&&!c)return!1;if(o){for(const h in o)if(!c||!this.stringMatchesExpression(c[h],o[h]))return!1}return!0}unwrap(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes)}wrap(e,s){const r={...e.ui};r.nodes||(r.nodes=[]);let i=0;for(const o of s)r.nodes?.push(o.child),i>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),i++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,r))}move(e,s){for(const r of s){r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1);let i=[];e.after&&(i=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(i=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=i[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,r.child)}}remap(e,s){for(const r of s){const i={...e.ui};i.attributes||(i.attributes={});const n=r.child.attributes;if(n)for(const m in n)Object.prototype.hasOwnProperty.call(i.attributes,"key")||(i.attributes[m]=n[m]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],c=r.child,h=i;for(const m of o)!Object.prototype.hasOwnProperty.call(i,m)&&c[m]&&(h[m]=c[m]);i.nodes||(i.nodes=[]);const g=r.child.nodes;if(g)for(const m of g)i.nodes.push(m);const A=r.parent.nodes?.indexOf(r.child)||-1;A!=-1&&(r.parent.nodes?.splice(A,1),r.parent.nodes?.splice(A,0,i))}}delete(e,s){for(const r of s)r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child),1)}insert(e,s){const r=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const i=s[0];i&&(r=="in"?(i.child.nodes||(i.child.nodes=[]),i.child.nodes.push({...e.ui})):i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child)+(r=="after"?1:0),0,{...e.ui}))}}var qd=Object.defineProperty,Bd=Object.getOwnPropertyDescriptor,lo=(t,e,s,r)=>{for(var i=r>1?void 0:r?Bd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qd(e,s,i),i};const Hd="sonic-sdui";let Yi=class extends Qa(Fs(J)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){this.props==null&&(this.sduiDescriptor={});{const e=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==e)return;this.sduiDescriptor=e,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,zd,this.sduiDescriptor.library),this.sduiDescriptor.library=t,await this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}async loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js){const t=await Promise.all(this.sduiDescriptor.js.map(s=>vs.loadJS(s))),e=this.sduiDescriptor.js.filter((s,r)=>!t[r]);if(e.length)throw new Error(`SDUI: échec chargement js[] — ${e.join(", ")}`)}this.sduiDescriptor.css&&await Promise.all(this.sduiDescriptor.css.map(t=>vs.loadCSS(t)))}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new Ud().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:r}=this.handleLibrary(t,e);return this.handleAttributes(t,s),s=this.handleMarkup(t,s),r||(r=s),this.handleChildNodes(t,r,s),this.handleInnerHTML(t,r),t.prefix||t.suffix?this.handlePrefixSuffix(t,s):s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes)for(const r of t.nodes){const i=this.parseChild(r);let n=e;r.parentElementSelector&&(n=s.querySelector(r.parentElementSelector)||e),n.shadowRoot?n.shadowRoot.appendChild(i):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(i):n.appendChild(i)}}handleLibrary(t,e){let s,r;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const i=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;i&&(r=s.querySelector(i))}else s=document.createElement(e);return{element:s,contentElement:r}}handleAttributes(t,e){const s=t.attributes;for(const r in s){const i=s[r],n=Gr.isObject(i)?JSON.stringify(i):i;e.setAttribute(r,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(r=>{e&&(e.innerHTML+=r)})}else e&&(e.innerHTML+=t.innerHTML)}};lo([u()],Yi.prototype,"sduiKey",2),lo([u()],Yi.prototype,"messagesKey",2),Yi=lo([Q(Hd)],Yi);var Vd=Object.defineProperty,Wd=Object.getOwnPropertyDescriptor,wl=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vd(e,s,i),i};let Zi=class extends Fs(J){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const r=t[s];if(typeof r=="string"){const i=r.split("."),n=i.shift();if(!n)continue;let o=me.get(n);o=Gr.traverse(o,i);const c={publisher:o,subscriber:h=>{e[s]=h}};this.listeners.push(c),o.onAssign(c.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const i=new Nr({},e);e._proxies_.set(s,i);const n={publisher:i,subscriber:o=>{e[s]=o}};this.listeners.push(n),i.onAssign(n.subscriber),this.parseComposition(r,i)}}}render(){return R`<slot></slot>`}};Zi.styles=[X`
1280
1366
  :host {
1281
1367
  display: contents;
1282
1368
  }
1283
- `],Qa([u({type:Object})],Wi.prototype,"composition",1),Wi=Qa([X("sonic-mix")],Wi);var pd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,xr=(t,e,s,r)=>{for(var i=r>1?void 0:r?fd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&pd(e,s,i),i};let Ms=class extends J{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=Mc({inputs:{input:new Ss(this.inputProvider)},output:new Ss(this.outputProvider),variables:this.formDataProvider?new Ss(this.formDataProvider):void 0,compute:async({input:s},r)=>{const i=Uc(t),n={...r??{},input:s};let o;try{o=await i.evaluate({},n)}catch(c){const h=c instanceof Error?c.message:String(c);throw new Error(`[sonic-jsonata] Évaluation : ${h}`)}return qc(o,e),o}})}render(){return R`<slot></slot>`}};Ms.styles=[ee`
1369
+ `],wl([u({type:Object})],Zi.prototype,"composition",1),Zi=wl([Q("sonic-mix")],Zi);var Kd=Object.defineProperty,Gd=Object.getOwnPropertyDescriptor,Cr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Kd(e,s,i),i};let Rs=class extends J{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=lu({inputs:{input:new $s(this.inputProvider)},output:new $s(this.outputProvider),variables:this.formDataProvider?new $s(this.formDataProvider):void 0,compute:async({input:s},r)=>{const i=mu(t),n={...r??{},input:s};let o;try{o=await i.evaluate({},n)}catch(c){const h=c instanceof Error?c.message:String(c);throw new Error(`[sonic-jsonata] Évaluation : ${h}`)}return gu(o,e),o}})}render(){return R`<slot></slot>`}};Rs.styles=[X`
1284
1370
  :host {
1285
1371
  display: contents;
1286
1372
  }
1287
- `],xr([u({type:String})],Ms.prototype,"inputProvider",2),xr([u({type:String})],Ms.prototype,"outputProvider",2),xr([u({type:String})],Ms.prototype,"formDataProvider",2),xr([u({type:String})],Ms.prototype,"expression",2),xr([u({type:Object})],Ms.prototype,"outputSchema",2),Ms=xr([X("sonic-jsonata")],Ms);var gd=Object.getOwnPropertyDescriptor,bd=(t,e,s,r)=>{for(var i=r>1?void 0:r?gd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const md="sonic-value";let el=class extends Ts(J){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?R`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:R`${je(this.props.toString())}<slot name="prefix"></slot><slot></slot
1288
- ><slot name="suffix"></slot>`}};el=bd([X(md)],el);var vd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,eo=(t,e,s,r)=>{for(var i=r>1?void 0:r?yd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vd(e,s,i),i};const wd="sonic-t";let Ki=class extends J{render(){return this.key?R`${uc(this.key,this.unsafeHTML)}`:re}};eo([u({type:String})],Ki.prototype,"key",2),eo([u({type:Boolean})],Ki.prototype,"unsafeHTML",2),Ki=eo([X(wd)],Ki);var _d=Object.defineProperty,Pd=Object.getOwnPropertyDescriptor,ei=(t,e,s,r)=>{for(var i=r>1?void 0:r?Pd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&_d(e,s,i),i};const xd="sonic-badge";let er=class extends J{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1373
+ `],Cr([u({type:String})],Rs.prototype,"inputProvider",2),Cr([u({type:String})],Rs.prototype,"outputProvider",2),Cr([u({type:String})],Rs.prototype,"formDataProvider",2),Cr([u({type:String})],Rs.prototype,"expression",2),Cr([u({type:Object})],Rs.prototype,"outputSchema",2),Rs=Cr([Q("sonic-jsonata")],Rs);var Yd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,_l=(t,e,s,r)=>{for(var i=r>1?void 0:r?Zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Yd(e,s,i),i};const Jd="sonic-value";let co=class extends Fs(J){constructor(){super(...arguments),this.format=""}connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}formatted(){const t=this.props;if(typeof t=="object"||t===void 0)return"";const e=String(t);if(!this.format)return e;if(this.format.startsWith("intl:")){const s=this.format.slice(5).split(":"),r=s[0]||"fr-FR",i=s[1],n=s[2]||"EUR",o=Number(t);return Number.isFinite(o)?i==="currency"?new Intl.NumberFormat(r,{style:"currency",currency:n}).format(o):i==="percent"?new Intl.NumberFormat(r,{style:"percent"}).format(o):new Intl.NumberFormat(r).format(o):e}if(/^0+$/.test(this.format)){const s=Math.floor(Number(t));return Number.isFinite(s)?String(s).padStart(this.format.length,"0"):e}return e}render(){if(typeof this.props=="object"||this.props===void 0)return R`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`;const t=this.format?this.formatted():this.props.toString();return R`${Be(t)}<slot name="prefix"></slot><slot></slot
1374
+ ><slot name="suffix"></slot>`}};_l([u({type:String})],co.prototype,"format",2),co=_l([Q(Jd)],co);var Qd=Object.defineProperty,Xd=Object.getOwnPropertyDescriptor,uo=(t,e,s,r)=>{for(var i=r>1?void 0:r?Xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Qd(e,s,i),i};const ep="sonic-t";let Ji=class extends J{render(){return this.key?R`${Rc(this.key,this.unsafeHTML)}`:se}};uo([u({type:String})],Ji.prototype,"key",2),uo([u({type:Boolean})],Ji.prototype,"unsafeHTML",2),Ji=uo([Q(ep)],Ji);var tp=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,ii=(t,e,s,r)=>{for(var i=r>1?void 0:r?sp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&tp(e,s,i),i};const rp="sonic-badge";let ir=class extends J{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return R`
1289
1375
  <slot name="prefix"></slot>
1290
1376
  <slot></slot>
1291
1377
  <slot name="suffix"></slot>
1292
- `}};er.styles=[ss,ee`
1378
+ `}};ir.styles=[rs,Wa,X`
1293
1379
  :host {
1294
- --sc-badge-gap: 0.3em;
1295
- --sc-badge-py: 0.35em;
1296
- --sc-badge-px: 0.67em;
1297
-
1298
- --sc-badge-color: var(--sc-base-content, #000);
1299
- --sc-badge-bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
1300
-
1301
- /*--sc-badge-border-width: var(--sc-form-border-width, 0.1rem);*/
1302
- --sc-badge-border-width: 1px;
1303
- --sc-badge-border-color: transparent;
1304
- --sc-badge-border: var(--sc-badge-border-width) solid
1305
- var(--sc-badge-border-color);
1306
-
1307
- --sc-badge-rounded: 0.85em;
1308
- --sc-badge-fw: var(--sc-font-weight-base, 400);
1380
+ --sc-_gap: 0.3em;
1381
+ --sc-_py: 0.35em;
1382
+ --sc-_px: 0.67em;
1383
+ --sc-_rounded: 0.85em;
1384
+ --sc-_fw: var(--sc-font-weight-base, 400);
1385
+ --sc-_border-width: 1px;
1386
+ --sc-_border-color: transparent;
1309
1387
 
1310
1388
  display: inline-flex;
1311
1389
  align-items: center;
1390
+ gap: var(--sc-_gap);
1312
1391
  box-sizing: border-box;
1313
- line-height: var(--sc-_lh);
1314
- border-radius: var(--sc-badge-rounded);
1315
-
1316
- background: var(--sc-badge-bg);
1317
- color: var(--sc-badge-color);
1318
- font-family: var(--sc-badge-ff, var(--sc-font-family-base, sans-serif));
1319
- font-weight: var(--sc-badge-fw);
1320
- line-height: 1;
1321
-
1322
- padding-top: var(--sc-badge-py);
1323
- padding-bottom: var(--sc-badge-py);
1324
- padding-left: var(--sc-badge-px);
1325
- padding-right: var(--sc-badge-px);
1326
- /**Round pour lissage px */
1327
- min-height: round(calc(var(--sc-badge-px) * 2), 1px);
1328
- min-width: round(calc(var(--sc-badge-px) * 2), 1px);
1329
- border: var(--sc-badge-border);
1392
+ line-height: var(--sc-_lh, 1);
1393
+ border-radius: var(--sc-_rounded);
1394
+ font-family: var(--sc-font-family-base, sans-serif);
1395
+ font-weight: var(--sc-_fw);
1396
+ padding: var(--sc-_py) var(--sc-_px);
1397
+ min-height: round(calc(var(--sc-_px) * 2), 1px);
1398
+ min-width: round(calc(var(--sc-_px) * 2), 1px);
1399
+ border: var(--sc-_border-width) solid var(--sc-_border-color);
1330
1400
  -webkit-print-color-adjust: exact;
1331
1401
  }
1332
1402
 
1333
- /*TYPES*/
1334
- :host([type="primary"]) {
1335
- --sc-badge-color: var(--sc-primary-content, var(--sc-base, #fff));
1336
- --sc-badge-bg: var(--sc-primary, var(--sc-base-content, #000));
1337
- }
1338
- :host([type="warning"]) {
1339
- --sc-badge-color: var(--sc-warning-content, var(--sc-base, #fff));
1340
- --sc-badge-bg: var(--sc-warning, var(--sc-base-content, #000));
1341
- }
1342
- :host([type="danger"]) {
1343
- --sc-badge-color: var(--sc-danger-content, var(--sc-base, #fff));
1344
- --sc-badge-bg: var(--sc-danger, var(--sc-base-content, #000));
1345
- }
1346
- :host([type="info"]) {
1347
- --sc-badge-color: var(--sc-info-content, var(--sc-base, #fff));
1348
- --sc-badge-bg: var(--sc-info, var(--sc-base-content, #000));
1349
- }
1350
- :host([type="success"]) {
1351
- --sc-badge-color: var(--sc-success-content, var(--sc-base, #fff));
1352
- --sc-badge-bg: var(--sc-success, var(--sc-base-content, #000));
1353
- }
1354
- :host([type="neutral"]) {
1355
- --sc-badge-color: var(--sc-base, #fff);
1356
- --sc-badge-bg: var(--sc-base-content, #000);
1357
- }
1358
-
1359
- :host([contrast]),
1360
- :host([type="contrast"]) {
1361
- --sc-badge-color: var(--sc-contrast-content, #fff);
1362
- --sc-badge-bg: var(--sc-contrast, #000);
1363
- }
1364
-
1365
- /*SIZE*/
1366
- :host {
1367
- gap: var(--sc-badge-gap);
1368
- }
1369
-
1370
1403
  :host([size="2xs"]),
1371
1404
  :host([size="xs"]),
1372
1405
  :host([size="sm"]) {
1373
- --sc-badge-gap: 0.35em;
1406
+ --sc-_gap: 0.35em;
1374
1407
  }
1375
1408
 
1376
1409
  :host([size="lg"]),
1377
1410
  :host([size="xl"]) {
1378
1411
  --sc-_lh: 1.2;
1379
- --sc-badge-gap: 0.5em;
1412
+ --sc-_gap: 0.5em;
1380
1413
  }
1381
1414
 
1382
1415
  /*OUTLINE*/
1383
1416
  :host([variant="outline"][type]) {
1384
- border-width: var(--sc-badge-border-width) !important;
1385
- border-color: var(--sc-badge-bg);
1386
- color: var(--sc-badge-bg);
1417
+ border-width: var(--sc-_border-width) !important;
1418
+ border-color: var(--sc-_bg);
1419
+ color: var(--sc-_bg);
1387
1420
  background: transparent;
1388
1421
  }
1389
1422
 
1390
1423
  :host([variant="outline"][type="default"]) {
1391
- border-color: var(--sc-base-content, #000);
1392
- color: var(--sc-base-content, #000);
1424
+ border-color: var(--sc-_color);
1425
+ color: var(--sc-_color);
1393
1426
  background: transparent;
1394
1427
  }
1395
1428
 
1396
1429
  /*GHOST*/
1397
1430
  :host([variant="ghost"][type]) {
1398
- color: var(--sc-badge-bg);
1431
+ color: var(--sc-_bg);
1399
1432
  background: transparent;
1400
1433
  padding: 0;
1401
1434
  }
1402
1435
 
1403
1436
  @media (forced-colors: active) {
1404
1437
  :host([variant="ghost"][type]) {
1405
- padding: var(--sc-badge-py) var(--sc-badge-px);
1438
+ padding: var(--sc-_py) var(--sc-_px);
1406
1439
  }
1407
1440
  }
1408
-
1441
+ /* surcharge du default pour le ghost */
1409
1442
  :host([variant="ghost"][type="default"]) {
1410
- color: var(--sc-badge-color);
1443
+ color: var(--sc-_color);
1411
1444
  background: transparent;
1412
1445
  }
1413
1446
 
@@ -1429,28 +1462,43 @@
1429
1462
  slot[name="prefix"] {
1430
1463
  flex-shrink: 0;
1431
1464
  }
1432
- `],ei([u({type:String,reflect:!0})],er.prototype,"type",2),ei([u({type:String,reflect:!0})],er.prototype,"variant",2),ei([u({type:String,reflect:!0})],er.prototype,"size",2),ei([u({type:Boolean,reflect:!0})],er.prototype,"ellipsis",2),er=ei([X(xd)],er);class Sd{static fixBlankLink(e){const r=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{r?.shell.openExternal(e.href)})}}var Ad=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,Sr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Cd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ad(e,s,i),i};const kd="sonic-link";let Is=class extends J{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,ct.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(ct.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",t=>{t.key==="Enter"&&this.shadowRoot?.querySelector("a")?.click()}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,Sd.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),ct.changeFromComponent(this)}updated(t){t.has("href")&&this.setFocusable()}render(){return this.href?R`
1465
+ `],ii([u({type:String,reflect:!0})],ir.prototype,"type",2),ii([u({type:String,reflect:!0})],ir.prototype,"variant",2),ii([u({type:String,reflect:!0})],ir.prototype,"size",2),ii([u({type:Boolean,reflect:!0})],ir.prototype,"ellipsis",2),ir=ii([Q(rp)],ir);class ip{static fixBlankLink(e){const r=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{r?.shell.openExternal(e.href)})}}var np=Object.defineProperty,op=Object.getOwnPropertyDescriptor,kr=(t,e,s,r)=>{for(var i=r>1?void 0:r?op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&np(e,s,i),i};const ap="sonic-link";let js=class extends J{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,ut.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(ut.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){ut.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,ip.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),ut.changeFromComponent(this)}get blankRel(){return this.target==="_blank"?"noopener noreferrer":void 0}render(){return this.href?R`
1433
1466
  <a
1434
1467
  href="${this.href}"
1435
- aria-label=${this.ariaLabel||re}
1468
+ aria-label=${this.ariaLabel||se}
1436
1469
  target=${te(this.target)}
1470
+ rel=${te(this.blankRel)}
1437
1471
  @click=${this.pushState?this.handlePushState:null}
1438
1472
  >
1439
1473
  <slot></slot>
1440
1474
  </a>
1441
- `:R`<slot></slot>`}};Is.styles=[ee`
1475
+ `:R`<slot></slot>`}};js.styles=[X`
1442
1476
  a {
1443
1477
  color: inherit;
1444
- text-decoration: none;
1445
- display: contents;
1478
+ text-decoration: inherit;
1479
+ display: inline-flex;
1480
+ align-items: inherit;
1481
+ gap: inherit;
1482
+ min-width: 0;
1483
+ max-width: 100%;
1484
+ }
1485
+
1486
+ a:focus {
1487
+ outline: none;
1446
1488
  }
1447
- `],Sr([u({type:String})],Is.prototype,"href",2),Sr([u({type:String,attribute:"data-aria-label"})],Is.prototype,"ariaLabel",2),Sr([u({type:String})],Is.prototype,"autoActive",2),Sr([u({type:String})],Is.prototype,"target",1),Sr([u({type:Boolean})],Is.prototype,"pushState",2),Is=Sr([X(kd)],Is);var $d=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,Ar=(t,e,s,r)=>{for(var i=r>1?void 0:r?Dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&$d(e,s,i),i};const Ed="sonic-progress";let Ns=class extends J{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1489
+
1490
+ a:focus-visible {
1491
+ outline: 2px solid currentColor;
1492
+ outline-offset: 2px;
1493
+ border-radius: 2px;
1494
+ }
1495
+ `],kr([u({type:String})],js.prototype,"href",2),kr([u({type:String,attribute:"data-aria-label"})],js.prototype,"ariaLabel",2),kr([u({type:String})],js.prototype,"autoActive",2),kr([u({type:String})],js.prototype,"target",1),kr([u({type:Boolean,reflect:!0})],js.prototype,"pushState",2),js=kr([Q(ap)],js);var lp=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,$r=(t,e,s,r)=>{for(var i=r>1?void 0:r?cp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&lp(e,s,i),i};const up="sonic-progress";let zs=class extends J{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return R`
1448
1496
  <progress value=${te(this.value)} max=${this.max}></progress>
1449
1497
  <div class="slot-container">
1450
1498
  <slot></slot>
1451
1499
  <slot name="remaining"></slot>
1452
1500
  </div>
1453
- `}};Ns.styles=[ss,ee`
1501
+ `}};zs.styles=[rs,X`
1454
1502
  :host {
1455
1503
  --sc-progress-bg: var(
1456
1504
  --sc-input-bg,
@@ -1562,7 +1610,7 @@
1562
1610
  gap: 0.5em;
1563
1611
  margin-top: 0.15em;
1564
1612
  }
1565
- `],Ar([u({type:Number})],Ns.prototype,"value",2),Ar([u({type:Number})],Ns.prototype,"max",2),Ar([u({type:Boolean})],Ns.prototype,"invert",2),Ar([u({type:String,reflect:!0})],Ns.prototype,"type",2),Ar([u({type:String,reflect:!0})],Ns.prototype,"size",2),Ns=Ar([X(Ed)],Ns);const Od=ee`
1613
+ `],$r([u({type:Number})],zs.prototype,"value",2),$r([u({type:Number})],zs.prototype,"max",2),$r([u({type:Boolean})],zs.prototype,"invert",2),$r([u({type:String,reflect:!0})],zs.prototype,"type",2),$r([u({type:String,reflect:!0})],zs.prototype,"size",2),zs=$r([Q(up)],zs);const hp=X`
1566
1614
  .password-toggle {
1567
1615
  color: var(--sc-input-c);
1568
1616
  font-size: var(--sc-input-fs);
@@ -1573,7 +1621,7 @@
1573
1621
  :host([inlineContent]) .has-suffix .password-toggle {
1574
1622
  margin-right: 0;
1575
1623
  }
1576
- `,Yi=ee`
1624
+ `,Qi=X`
1577
1625
  :host {
1578
1626
  --sc-label-fs: var(--sc-_fs, 1rem);
1579
1627
  --sc-label-fw: var(--sc-label-font-weight, 500);
@@ -1587,14 +1635,14 @@
1587
1635
  margin-bottom: 0.22em;
1588
1636
  display: block;
1589
1637
  }
1590
- `,Gi=ee`
1638
+ `,Xi=X`
1591
1639
  .form-description {
1592
1640
  color: var(--sc-base-400, var(--sc-base-content, #000));
1593
1641
  font-size: 0.85em;
1594
1642
  margin-top: 0.2em;
1595
1643
  display: block;
1596
1644
  }
1597
- `,to=ee`
1645
+ `,ho=X`
1598
1646
  * {
1599
1647
  box-sizing: border-box;
1600
1648
  }
@@ -1953,15 +2001,15 @@
1953
2001
  * @license
1954
2002
  * Copyright 2018 Google LLC
1955
2003
  * SPDX-License-Identifier: BSD-3-Clause
1956
- */const so=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const s=t.element.classList;for(const r of this.st)r in e||(s.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(s.add(r),this.st.add(r)):(s.remove(r),this.st.delete(r)))}return Nt}});var Td=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,ze=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ld(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Td(e,s,i),i};const Md="sonic-input";let Ie=class extends ji(br(nt(J))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return R`
2004
+ */const po=Os(class extends br{constructor(t){if(super(t),t.type!==Qs.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in e)e[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(e)}const s=t.element.classList;for(const r of this.st)r in e||(s.remove(r),this.st.delete(r));for(const r in e){const i=!!e[r];i===this.st.has(r)||this.nt?.has(r)||(i?(s.add(r),this.st.add(r)):(s.remove(r),this.st.delete(r)))}return Nt}});var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Ue=(t,e,s,r)=>{for(var i=r>1?void 0:r?pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&dp(e,s,i),i};const fp="sonic-input";let Ne=class extends Bi(yr(J)){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs")||void 0,this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t||!this.sameValueAsName)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")||"0"))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return R`
1957
2005
  <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
1958
- >${this.label?je(this.label):""}<slot
2006
+ >${this.label?Be(this.label):""}<slot
1959
2007
  name="label"
1960
2008
  @slotchange=${this.hasSlotOrProps}
1961
2009
  ></slot
1962
2010
  ></label>
1963
2011
 
1964
- <div @click=${this.inlineContentFocus} class="form-control ${so(t)}">
2012
+ <div @click=${this.inlineContentFocus} class="form-control ${po(t)}">
1965
2013
  <div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
1966
2014
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1967
2015
  <input
@@ -1998,7 +2046,7 @@
1998
2046
  shape="circle"
1999
2047
  class="password-toggle"
2000
2048
  @click=${this.togglePasswordVisibility}
2001
- data-aria-label="Toggle password visibility"
2049
+ .ariaLabel=${Ui(this.isPassword?_s.showPassword:_s.hidePassword)}
2002
2050
  variant="unstyled"
2003
2051
  >
2004
2052
  <sonic-icon
@@ -2015,10 +2063,10 @@
2015
2063
  name="description"
2016
2064
  @slotchange=${this.hasSlotOrProps}
2017
2065
  class="${this.hasDescription?"form-description":"hidden"}"
2018
- >${this.description?R`${je(this.description)}`:re}</slot>
2066
+ >${this.description?R`${Be(this.description)}`:se}</slot>
2019
2067
  <slot name="list"></slot>
2020
2068
  </div>
2021
- `}};Ie.styles=[ss,to,Yi,Gi,Od,ee`
2069
+ `}};Ne.styles=[rs,ho,Qi,Xi,hp,X`
2022
2070
  :host([type="hidden"]) {
2023
2071
  appearance: none !important;
2024
2072
  display: none !important;
@@ -2026,7 +2074,7 @@
2026
2074
  :host > .form-control {
2027
2075
  position: relative;
2028
2076
  }
2029
- `],ze([u({type:String,reflect:!0})],Ie.prototype,"size",2),ze([u({type:String})],Ie.prototype,"inputmode",2),ze([u({type:String})],Ie.prototype,"list",2),ze([u({type:String})],Ie.prototype,"placeholder",2),ze([u({type:String})],Ie.prototype,"pattern",2),ze([u({type:String})],Ie.prototype,"min",2),ze([u({type:String})],Ie.prototype,"max",2),ze([u({type:Boolean,reflect:!0})],Ie.prototype,"readonly",2),ze([u({type:Number})],Ie.prototype,"step",2),ze([u({type:Number})],Ie.prototype,"minlength",2),ze([u({type:Number})],Ie.prototype,"maxlength",2),ze([u({type:String})],Ie.prototype,"src",2),ze([u({type:Boolean,reflect:!0})],Ie.prototype,"inlineContent",2),ze([u({type:Boolean})],Ie.prototype,"disableInlineContentFocus",2),ze([u({type:Boolean})],Ie.prototype,"showPasswordToggle",2),ze([u({type:Boolean})],Ie.prototype,"autoActive",2),ze([u({type:Boolean,reflect:!0})],Ie.prototype,"active",2),ze([bt({slot:"label",flatten:!0})],Ie.prototype,"slotLabelNodes",2),ze([bt({slot:"description",flatten:!0})],Ie.prototype,"slotDescriptionNodes",2),ze([bt({slot:"suffix",flatten:!0})],Ie.prototype,"slotSuffixNodes",2),ze([bt({slot:"prefix",flatten:!0})],Ie.prototype,"slotPrefixNodes",2),ze([Cs("input")],Ie.prototype,"input",2),ze([Ae()],Ie.prototype,"hasDescription",2),ze([Ae()],Ie.prototype,"hasLabel",2),ze([Ae()],Ie.prototype,"hasSuffix",2),ze([Ae()],Ie.prototype,"hasPrefix",2),ze([Ae()],Ie.prototype,"isPassword",2),Ie=ze([X(Md)],Ie);const tl=ee`
2077
+ `],Ue([u({type:String,reflect:!0})],Ne.prototype,"size",2),Ue([u({type:String})],Ne.prototype,"inputmode",2),Ue([u({type:String})],Ne.prototype,"list",2),Ue([u({type:String})],Ne.prototype,"placeholder",2),Ue([u({type:String})],Ne.prototype,"pattern",2),Ue([u({type:String})],Ne.prototype,"min",2),Ue([u({type:String})],Ne.prototype,"max",2),Ue([u({type:Boolean,reflect:!0})],Ne.prototype,"readonly",2),Ue([u({type:Number})],Ne.prototype,"step",2),Ue([u({type:Number})],Ne.prototype,"minlength",2),Ue([u({type:Number})],Ne.prototype,"maxlength",2),Ue([u({type:String})],Ne.prototype,"src",2),Ue([u({type:Boolean,reflect:!0})],Ne.prototype,"inlineContent",2),Ue([u({type:Boolean})],Ne.prototype,"disableInlineContentFocus",2),Ue([u({type:Boolean})],Ne.prototype,"showPasswordToggle",2),Ue([u({type:Boolean})],Ne.prototype,"autoActive",2),Ue([u({type:Boolean,reflect:!0})],Ne.prototype,"active",2),Ue([gt({slot:"label",flatten:!0})],Ne.prototype,"slotLabelNodes",2),Ue([gt({slot:"description",flatten:!0})],Ne.prototype,"slotDescriptionNodes",2),Ue([gt({slot:"suffix",flatten:!0})],Ne.prototype,"slotSuffixNodes",2),Ue([gt({slot:"prefix",flatten:!0})],Ne.prototype,"slotPrefixNodes",2),Ue([ms("input")],Ne.prototype,"input",2),Ue([Ae()],Ne.prototype,"hasDescription",2),Ue([Ae()],Ne.prototype,"hasLabel",2),Ue([Ae()],Ne.prototype,"hasSuffix",2),Ue([Ae()],Ne.prototype,"hasPrefix",2),Ue([Ae()],Ne.prototype,"isPassword",2),Ne=Ue([Q(fp)],Ne);const mp=["top","right","bottom","left"],gp=["start","center","end"];function Sl(t,e,s){const[r,i]=(t??"").split("-");return{side:mp.includes(r)?r:e,align:gp.includes(i)?i:s}}const Pl="popover"in HTMLElement.prototype,bp={top:"bottom",bottom:"top",left:"right",right:"left"};function xl(t,e=0){const s=Ge.getScrollableAncestor(t)?.getBoundingClientRect();return{minX:Math.max(0,s?.left||0)+e,minY:Math.max(0,s?.top||0)+e,maxX:Math.min(window.innerWidth,s?.right||window.innerWidth)-e,maxY:Math.min(window.innerHeight,s?.bottom||window.innerHeight)-e}}function en(t,e,s,r){return r==="start"?t:r==="end"?t+e-s:t+(e-s)/2}function Al(t,e,s,r,i){switch(s){case"top":return{x:en(t.left,t.width,e.width,r),y:t.top-e.height-i};case"bottom":return{x:en(t.left,t.width,e.width,r),y:t.bottom+i};case"left":return{x:t.left-e.width-i,y:en(t.top,t.height,e.height,r)};case"right":return{x:t.right+i,y:en(t.top,t.height,e.height,r)};default:return{x:t.left,y:t.top}}}function vp(t,e,s,r){switch(s){case"top":return t.y<r.minY;case"bottom":return t.y+e.height>r.maxY;case"left":return t.x<r.minX;case"right":return t.x+e.width>r.maxX;default:return!1}}function Cl({anchor:t,floating:e,side:s,align:r="center",gap:i=0,bounds:n}){let o=s,c=Al(t,e,o,r,i);return vp(c,e,o,n)&&(o=bp[o],c=Al(t,e,o,r,i)),{side:o,x:Math.min(Math.max(c.x,n.minX),n.maxX-e.width),y:Math.min(Math.max(c.y,n.minY),n.maxY-e.height)}}function kl(t){let e=0;const s=()=>{t(),e=requestAnimationFrame(s)};return s(),()=>cancelAnimationFrame(e)}const $l=X`
2030
2078
  /*OMBRE*/
2031
2079
  :host([shadow]) .shadowable,
2032
2080
  :host([shadow="md"]) .shadowable,
@@ -2045,7 +2093,7 @@
2045
2093
  :host([shadow="none"]) .shadowable {
2046
2094
  box-shadow: none;
2047
2095
  }
2048
- `;var Id=Object.defineProperty,Nd=Object.getOwnPropertyDescriptor,is=(t,e,s,r)=>{for(var i=r>1?void 0:r?Nd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Id(e,s,i),i};const Fd="sonic-pop";let dt=class extends J{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=t=>{t.key==="Escape"&&this.open&&(t.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent?.style?.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){Je.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const r=getComputedStyle(e);return r.position!=="relative"&&r.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];dt.pops.forEach(r=>{const i=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),o=Je.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&i||t.type=="click"&&(i&&o||!n)||r.hide()})}connectedCallback(){super.connectedCallback(),dt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),dt.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),dt.pops.delete(this),dt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(t){const e=t.split(" "),s=e[0];let r=e[1];const i=5,n=this.getBoundingClientRect(),c=Je.getScrollableAncestor(this.popContent)?.getBoundingClientRect(),h=Math.max(0,c?.left||0)+i,b=Math.max(0,c?.top||0)+i,k=Math.min(window.innerWidth,c?.right||window.innerWidth)-i,g=Math.min(window.innerHeight,c?.bottom||window.innerHeight)-i,f=n.left,A=n.top;let E=f,O=A,N=this.popContent?.getBoundingClientRect();const U=A-N.height,P=f-N.width,y=f+n.width,I=A+n.height,C=f+(n.width-N.width)*.5,$=A+(n.height-N.height)*.5;switch(s){case"bottom":O=I,r=="center"&&(E=C);break;case"top":O=U,r=="center"&&(E=C);break;case"left":E=P,r=="center"&&(O=$);break;case"right":E=y,r=="center"&&(O=$);break}this.lastContentX+=E-N.x,this.lastContentY+=O-N.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),N=this.popContent?.getBoundingClientRect(),N.x<h&&s=="left"&&(E=y),N.y<b&&s=="top"&&(O=I),N.x+N.width>k&&s=="right"&&(E=P),N.y+N.height>g&&s=="bottom"&&(O=U),this.lastContentX+=E-N.x,this.lastContentY+=O-N.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),N=this.popContent?.getBoundingClientRect(),N.x<h&&(this.lastContentX+=h-N.x),N.y<b&&(this.lastContentY+=b-N.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),N=this.popContent?.getBoundingClientRect(),N.x+N.width>k&&(this.lastContentX+=k-(N.x+N.width)),N.y+N.height>g&&(this.lastContentY+=g-(N.y+N.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return R`
2096
+ `;var yp=Object.defineProperty,wp=Object.getOwnPropertyDescriptor,os=(t,e,s,r)=>{for(var i=r>1?void 0:r?wp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yp(e,s,i),i};let Dl=!1;function _p(t){return t.includes(" ")?(Dl||(Dl=!0,console.warn(`[concorde] sonic-pop placement="${t}" est déprécié, utiliser placement="${t.replace(" ","-")}".`)),t.replace(" ","-")):t}const Sp="sonic-pop";let Le=class extends J{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.pendingShow=!1,this.ancestorsHavingZIndex=new Set}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open?this.hide():this.show())}show(){if(!this.popContent){this.pendingShow=!0,this.updateComplete.then(()=>{this.pendingShow&&this.show()});return}this.pendingShow=!1,!this.open&&(Le.supportsPopover||this.setMaxZindex(),clearTimeout(this.hideDisplayTimeout),this.popContent?.style?.removeProperty("display"),Le.supportsPopover&&!this.popContent.matches(":popover-open")&&this.popContent.showPopover(),this.open=!0,Le.pops.delete(this)&&Le.pops.add(this),this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.stopPositioning&&(this.lastContentX=0,this.lastContentY=0,this.stopPositioning=kl(()=>this.computePosition(this.placement))),this.dispatchEvent(new CustomEvent("show")))}hide(){if(this.pendingShow=!1,!this.popContent){this.dispatchEvent(new CustomEvent("hide"));return}Le.supportsPopover||this.resetZindexes(),Le.supportsPopover&&this.popContent?.matches(":popover-open")&&this.popContent.hidePopover(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.stopPositionLoop(),Le.supportsPopover||this.hideContentAfterTransition(),this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),this.dispatchEvent(new CustomEvent("hide"))}stopPositionLoop(){this.stopPositioning?.(),this.stopPositioning=void 0}hideContentAfterTransition(){clearTimeout(this.hideDisplayTimeout);const t=parseFloat(getComputedStyle(this.popContent).transitionDuration)*1e3;this.hideDisplayTimeout=setTimeout(()=>{this.open||(this.popContent.style.display="none")},t||0)}setMaxZindex(){Ge.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const r=getComputedStyle(e);return r.position!=="relative"&&r.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];Le.pops.forEach(r=>{if(!r.open)return;const i=e.includes(r),n=e.includes(r.querySelector('[slot="content"]')),o=Ge.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&i||t.type=="click"&&(i&&o||!n)||r.hide()})}connectedCallback(){super.connectedCallback(),Le.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",Le._handleKeyDown,!0)),Le.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),this.stopPositionLoop(),clearTimeout(this.hideDisplayTimeout),this.open&&(Le.supportsPopover||this.resetZindexes(),this.open=!1,this.triggerElement=null,this.popContent?.style.setProperty("display","none")),super.disconnectedCallback(),Le.pops.delete(this),Le.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",Le._handleKeyDown,!0))}computePosition(t){const{side:e,align:s}=Sl(_p(t),"bottom","start"),r=this.popContent.getBoundingClientRect(),{x:i,y:n}=Cl({anchor:this.getBoundingClientRect(),floating:r,side:e,align:s,bounds:xl(this.popContent,5)});this.lastContentX+=i-r.x,this.lastContentY+=n-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}static _handleKeyDown(t){if(t.key!=="Escape")return;const e=[...Le.pops].reverse().find(s=>s.open);e&&(t.stopPropagation(),e.hide())}render(){return R`
2049
2097
  <slot
2050
2098
  @click=${this.manual?()=>{}:this.toggle}
2051
2099
  @keydown=${this.manual?()=>{}:this.toggle}
@@ -2053,13 +2101,14 @@
2053
2101
  ></slot>
2054
2102
  <slot
2055
2103
  name="content"
2104
+ popover=${te(Le.supportsPopover?"manual":void 0)}
2056
2105
  tabindex="-1"
2057
2106
  part="content"
2058
2107
  style="display: none;"
2059
2108
  class="shadowable
2060
2109
  ${this.open?"is-open":""}"
2061
2110
  ></slot>
2062
- `}};dt.pops=new Set,dt.styles=[ee`
2111
+ `}};Le.pops=new Set,Le.supportsPopover=Pl,Le.styles=[X`
2063
2112
  :host {
2064
2113
  display: inline-block;
2065
2114
  vertical-align: middle;
@@ -2080,7 +2129,7 @@
2080
2129
  border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
2081
2130
  }
2082
2131
 
2083
- slot[name="content"].is-open:not(.is-empty) {
2132
+ slot[name="content"].is-open {
2084
2133
  transform: translateY(0) scale(1);
2085
2134
  opacity: 1;
2086
2135
  pointer-events: auto;
@@ -2088,25 +2137,54 @@
2088
2137
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
2089
2138
  }
2090
2139
 
2140
+ slot[name="content"][popover] {
2141
+ inset: auto;
2142
+ width: auto;
2143
+ height: auto;
2144
+ margin: 0;
2145
+ padding: 0;
2146
+ border: none;
2147
+ overflow: visible;
2148
+ color: inherit;
2149
+ /* display / overlay en allow-discrete : reste dans le top layer pendant le fondu de fermeture */
2150
+ transition-property: all, display, overlay;
2151
+ transition-behavior: normal, allow-discrete, allow-discrete;
2152
+ }
2153
+
2154
+ slot[name="content"][popover]:not(:popover-open) {
2155
+ display: none;
2156
+ }
2157
+
2158
+ slot[name="content"][popover].is-open {
2159
+ transition-property: scale, opacity, display, overlay;
2160
+ transition-behavior: normal, normal, allow-discrete, allow-discrete;
2161
+ }
2162
+
2163
+ @starting-style {
2164
+ slot[name="content"][popover].is-open:popover-open {
2165
+ transform: translateY(1rem) scale(0.95);
2166
+ opacity: 0;
2167
+ }
2168
+ }
2169
+
2091
2170
  :host([inline]) {
2092
2171
  vertical-align: baseline;
2093
2172
  }
2094
- `,tl],is([Ae()],dt.prototype,"open",2),is([Cs("slot:not([name=content])")],dt.prototype,"popBtn",2),is([Cs("slot[name=content]")],dt.prototype,"popContent",2),is([u({type:Boolean})],dt.prototype,"noToggle",2),is([u({type:Boolean,reflect:!0})],dt.prototype,"inline",2),is([u({type:Boolean})],dt.prototype,"manual",2),is([u({type:String,reflect:!0})],dt.prototype,"shadow",2),is([u({type:String})],dt.prototype,"placement",2),is([Ae()],dt.prototype,"triggerElement",2),dt=is([X(Fd)],dt);var jd=Object.getOwnPropertyDescriptor,Rd=(t,e,s,r)=>{for(var i=r>1?void 0:r?jd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const zd="sonic-menu-item";let sl=class extends Me{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};sl=Rd([X(zd)],sl);/**
2173
+ `,$l],os([Ae()],Le.prototype,"open",2),os([ms("slot:not([name=content])")],Le.prototype,"popBtn",2),os([ms("slot[name=content]")],Le.prototype,"popContent",2),os([u({type:Boolean})],Le.prototype,"noToggle",2),os([u({type:Boolean,reflect:!0})],Le.prototype,"inline",2),os([u({type:Boolean})],Le.prototype,"manual",2),os([u({type:String,reflect:!0})],Le.prototype,"shadow",2),os([u({type:String})],Le.prototype,"placement",2),os([Ae()],Le.prototype,"triggerElement",2),Le=os([Q(Sp)],Le);var Pp=Object.getOwnPropertyDescriptor,xp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Ap="sonic-menu-item";let El=class extends Ie{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};El=xp([Q(Ap)],El);/**
2095
2174
  * @license
2096
2175
  * Copyright 2021 Google LLC
2097
2176
  * SPDX-License-Identifier: BSD-3-Clause
2098
- */class rl{constructor(e,{target:s,config:r,callback:i,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=r,this.o=n??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var Ud=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,mt=(t,e,s,r)=>{for(var i=r>1?void 0:r?qd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ud(e,s,i),i};let pt=class extends Yn(Ta(Oa(Ts(J)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new rl(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{if(t==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=t,this.searchPublisher?.set(this.lastValidSearch))},this.updatePopContentVisibility=t=>{this.isPopVisible=(t?.length||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{const e=this.propertyName==="_self"?t:t[this.propertyName||this.name];this.formValuePublisher?.set(e)},this.findSearchedItem=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.searchParameter||this.name])==this.searchPublisher?.get(),this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.isSearchParameter()&&this.searchPublisher?.set(this.lastValidSearch)},this.updateActiveSelection=()=>{this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=this.searchPublisher?.get()&&this.formValuePublisher?.get()&&this.formValuePublisher?.set("")},this.handleFocusOut=t=>{setTimeout(()=>{const e=document.activeElement;if(!e){this.popElement.hide();return}const s=this.popElement.contains(e)||this.popElement.shadowRoot?.contains(e),r=this.contains(e)||this.shadowRoot?.contains(e);!s&&!r&&this.popElement.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){super.connectedCallback();const t=this.searchParameter||this.name,e=this.getAncestorAttributeValue("formDataProvider"),s=e+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const r=be.get;this.searchPublisher=r(this.searchDataProvider)[t],this.formValuePublisher=kt(r(e),this.name),this.countPublisher=r(this.queueDataProvider).resultCount,this.initCountPublisher=r(this.initQueueDataProvider).resultCount,this.value&&be.get(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.countPublisher?.onAssign(this.updateActiveSelection),this.searchPublisher?.onAssign(this.updatePopContentVisibility)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.countPublisher?.offAssign(this.updateActiveSelection);const t=be.get;t(this.initSearchDataProvider).delete(),t(this.initQueueDataProvider).delete(),t(this.searchDataProvider).delete(),t(this.queueDataProvider).delete(),this.searchPublisher?.offAssign(this.updatePopContentVisibility),this.popElement.removeEventListener("focusout",this.handleFocusOut)}queryQueueListItem(t,e,s){const r=be.get(t);let i,n=r.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){let c=be.get(o.dataProvider).get();if(Array.isArray(c)&&(i=c.find(e),i))break}return i?(s(i),!0):!1}setSelectionRange(t,e){this.querySelector("sonic-input")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(this.searchPublisher?.get()==""){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.searchPublisher?.set(this.lastValidSearch)}}getInputValue(){return this.isSearchParameter()?this.searchPublisher?.get():this.lastValidSearch}handleFocus(){this.popElement.show()}render(){return R`
2177
+ */class Ol{constructor(e,{target:s,config:r,callback:i,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=r,this.o=n??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var Cp=Object.defineProperty,kp=Object.getOwnPropertyDescriptor,pt=(t,e,s,r)=>{for(var i=r>1?void 0:r?kp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Cp(e,s,i),i};const $p="data-autocomplete-value",Dp="data-autocomplete-label";let et=class extends ro(el(Xa(J))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.serviceURL="",this.minSearchLength=3,this.key="",this.searchParameter="",this.propertyName="",this.items=null,this.hasInputPrefix=!1,this._resizeController=new Ol(this,{}),this.searchText="",this.searchDataProvider="",this.queueFilterDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.providersReady=!1,this.suppressPopOpen=!1,this.filterArmed=!1,this.updateSearchParameter=t=>{if(t==""||t==null){this.isSearchParameter()&&(this.lastValidSearch="",this.setSearchText(""));return}this.queryQueueListItem(this.queueDataProvider,s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==t,this.setSearchFromSelection)||!this.queryQueueListItem(this.initQueueDataProvider,r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==t,this.setSearchFromSelection)&&this.isSearchParameter()&&(this.lastValidSearch=t,this.setSearchText(String(t)))},this.onSearchPublisherAssign=t=>{const e=t==null?"":String(t);this.searchText!==e&&(this.searchText=e),this.syncQueueFilter(e),this.openPopIfNeeded(e)},this.handleSearchActivity=()=>{const t=String(this.searchPublisher?.get()??this.searchText??"");this.openPopIfNeeded(t,!0)},this.handleSearchKeyUp=t=>{t.ctrlKey||t.metaKey||t.altKey||["Escape","Tab","Enter","ArrowUp","ArrowDown"].includes(t.key)||this.handleSearchActivity()},this.handleSearchKeyDown=t=>{const e=t.composedPath(),s=e.some(o=>o?.tagName==="SONIC-MENU-ITEM");if(s&&(t.key==="Enter"||t.key===" ")){const o=e.find(c=>c?.tagName==="SONIC-MENU-ITEM");if(!o)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o);return}if(s)return;const r=String(this.searchPublisher?.get()??this.searchText??"");if(!this.shouldShowSuggestions(r))return;if(t.key==="Enter"){const o=this.getSuggestionItems();if(!o.length)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o[0]);return}if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;t.preventDefault(),t.stopPropagation(),this.suppressPopOpen=!1,this.popElement?.show(),requestAnimationFrame(()=>this.popElement?.show());const i=this.getSuggestionItems();if(!i.length)return;(t.key==="ArrowDown"?i[0]:i[i.length-1]).focus?.()},this.handleSuggestionPointerDown=t=>{const e=t.composedPath().find(s=>s?.tagName==="SONIC-MENU-ITEM");e&&(t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(e))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.setSearchText(this.lastValidSearch)},this.handleFocusOut=t=>{const e=t.relatedTarget;this.deepContains(this.popElement,e)||this.deepContains(this,e)||setTimeout(()=>{if(this.suppressPopOpen)return;const s=document.activeElement;!s||this.deepContains(this.popElement,s)||this.deepContains(this,s)||this.popElement?.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}searchFieldName(){return this.searchParameter||this.name}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}shouldShowSuggestions(t){return(t?.length||0)>=this.minSearchLength||this.minSearchLength===0}isSearchFocused(){const t=document.activeElement;if(!t)return!1;const e=this.renderRoot?.querySelector("sonic-input.form-element");return!!(e&&(t===e||e.contains(t)||e.shadowRoot?.contains(t)))}openPopIfNeeded(t,e=!1){if(!this.suppressPopOpen){if(!this.shouldShowSuggestions(t)){this.popElement?.hide();return}(e||this.isSearchFocused()||this.popElement?.open)&&(this.popElement?.show(),requestAnimationFrame(()=>{if(this.suppressPopOpen)return;const s=String(this.searchPublisher?.get()??this.searchText??"");this.shouldShowSuggestions(s)&&this.popElement?.show()}))}}setSearchText(t){const e=t==null||t===""?"":typeof t=="string"?t:String(t);this.searchText=e,this.searchPublisher&&this.searchPublisher.get()!==e&&this.searchPublisher.set(e),this.syncQueueFilter(e)}syncQueueFilter(t){if(!this.queueFilterPublisher)return;if(this.minSearchLength===0||t.length>=this.minSearchLength){(!this.filterArmed||this.queueFilterPublisher.get()!==t)&&this.queueFilterPublisher.set(t),this.filterArmed=!0;return}this.filterArmed&&(this.filterArmed=!1,this.clearSearchQueueResults())}clearSearchQueueResults(){if(!this.queueDataProvider)return;const t=me.get(this.queueDataProvider),e=t.get();if(Array.isArray(e))for(const s of e)s?.dataProvider&&me.getInstance().delete(s.dataProvider);t.set([])}applySuggestion(t,e){this.suppressPopOpen=!0;const s=t,r=e||(typeof s=="string"?s:String(s??""));this.formValuePublisher?.set(s),this.lastValidSearch=this.isSearchParameter()?s:r,this.setSearchText(this.isSearchParameter()?String(s??""):r),this.popElement?.hide(),requestAnimationFrame(()=>{this.suppressPopOpen=!1})}getSuggestionItems(){return[...this.renderRoot?.querySelectorAll("sonic-menu-item")??[]]}selectSuggestionItem(t){const e=t.getAttribute($p)??t.value??null,s=t.getAttribute(Dp)??(t.textContent||"").trim();e==null&&!s||this.applySuggestion(e??s,s)}setupProviders(){const t=this.searchFieldName(),e=this.formDataProvider||this.getAncestorAttributeValue("formDataProvider")||"",s=et.instanceCounter++,r=(e||"form")+"__"+(this.name||"field")+"__autocomplete__"+s;this.initSearchDataProvider=`${r}_init_search__`,this.initQueueDataProvider=`${r}_init_queue__`,this.searchDataProvider=`${r}_search__`,this.queueFilterDataProvider=`${r}_queue_filter__`,this.queueDataProvider=`${r}_queue__`;const i=me.get;this.searchPublisher=i(this.searchDataProvider)[t],this.queueFilterPublisher=i(this.queueFilterDataProvider)[t],this.formValuePublisher=qt(i(e),this.name),this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&i(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.searchPublisher?.onAssign(this.onSearchPublisherAssign);const n=this.searchPublisher?.get();n!=null&&n!==""&&(this.searchText=String(n),this.syncQueueFilter(this.searchText)),this.providersReady=!0}teardownProviders(){this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.searchPublisher?.offAssign(this.onSearchPublisherAssign);const t=me.get;this.initSearchDataProvider&&t(this.initSearchDataProvider).delete(),this.initQueueDataProvider&&t(this.initQueueDataProvider).delete(),this.searchDataProvider&&t(this.searchDataProvider).delete(),this.queueFilterDataProvider&&t(this.queueFilterDataProvider).delete(),this.queueDataProvider&&t(this.queueDataProvider).delete(),this.providersReady=!1}connectedCallback(){super.connectedCallback(),this.setupProviders(),this.addEventListener("keyup",this.handleSearchKeyUp),this.addEventListener("keydown",this.handleSearchKeyDown,!0)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.removeEventListener("keyup",this.handleSearchKeyUp),this.removeEventListener("keydown",this.handleSearchKeyDown,!0),this.teardownProviders(),this.popElement?.removeEventListener("focusout",this.handleFocusOut),super.disconnectedCallback()}queryQueueListItem(t,e,s){const r=me.get(t);let i;const n=r.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){const c=me.get(o.dataProvider).get();if(Array.isArray(c)&&(i=c.find(e),i))break}return i?(s(i),!0):!1}setSelectionRange(t,e){this.renderRoot?.querySelector("sonic-input.form-element")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(!this.searchText){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.setSearchText(this.lastValidSearch)}}deepContains(t,e){if(!t||!e)return!1;let s=e;for(;s;){if(s===t||t.contains(s))return!0;const r=s.getRootNode();if(r instanceof ShadowRoot)s=r.host;else break}return!1}handleFocus(){const t=String(this.searchText??"");this.shouldShowSuggestions(t)&&(this.suppressPopOpen=!1,this.popElement?.show())}render(){if(!this.providersReady||!this.searchDataProvider)return se;const t=this.templateList.concat(this.templatePartsList);return R`
2099
2178
  <sonic-pop manual style="display:block;" @hide=${this.handleHide}>
2100
2179
  <sonic-input
2101
2180
  class="form-element"
2102
- dataProvider="${this.initSearchDataProvider+Math.random()}"
2103
- noAutofill
2104
- formDataProvider="${this.searchDataProvider}"
2181
+ .formDataProvider=${this.searchDataProvider}
2182
+ .value=${this.searchText}
2105
2183
  type="search"
2106
- data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
2184
+ data-keyboard-nav=""
2107
2185
  label="${te(this.label)}"
2108
2186
  description="${te(this.description)}"
2109
- name="${te(this.searchParameter||this.name)}"
2187
+ name="${te(this.searchFieldName())}"
2110
2188
  ?required=${this.required}
2111
2189
  placeholder="${te(this.placeholder)}"
2112
2190
  ?readonly="${this.readonly}"
@@ -2115,7 +2193,7 @@
2115
2193
  inlineContent
2116
2194
  size=${this.size}
2117
2195
  @focus=${this.handleFocus}
2118
- value=${te(this.getInputValue())}
2196
+ @change=${this.handleSearchActivity}
2119
2197
  >
2120
2198
  <slot
2121
2199
  name="prefix"
@@ -2130,41 +2208,49 @@
2130
2208
  name="nav-arrow-down"
2131
2209
  .size=${this.size}
2132
2210
  ></sonic-icon>
2133
- `:re}
2211
+ `:se}
2134
2212
  </sonic-input>
2135
2213
  <sonic-menu
2136
2214
  slot="content"
2137
2215
  class="custom-scroll"
2138
- style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}; display:${this.isPopVisible?"block":"none"};"
2216
+ data-on-select="keep"
2217
+ style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}"
2218
+ @pointerdown=${this.handleSuggestionPointerDown}
2139
2219
  >
2140
2220
  <sonic-queue
2141
2221
  dataProvider="${this.queueDataProvider}"
2142
2222
  filteredFields=${this.filteredFields}
2143
2223
  dataProviderExpression="${this.dataProviderExpression}"
2144
- dataFilterProvider="${this.searchDataProvider}"
2145
- key="${this.key}"
2146
- .templates=${this.templateList.concat(this.templatePartsList)}
2147
- displayContents
2148
- >
2149
- </sonic-queue>
2150
- <sonic-queue
2151
- noLazyload
2152
- loader="no-loader"
2153
- dataProvider="${this.initQueueDataProvider}"
2154
- filteredFields=${this.filteredFields}
2155
- dataProviderExpression="${this.dataProviderExpression}"
2156
- dataFilterProvider="${this.initSearchDataProvider}"
2224
+ dataFilterProvider="${this.queueFilterDataProvider}"
2225
+ serviceURL=${te(this.serviceURL||void 0)}
2157
2226
  key="${this.key}"
2227
+ .templates=${t}
2228
+ .items=${this.items}
2158
2229
  displayContents
2159
2230
  >
2160
2231
  </sonic-queue>
2161
2232
  </sonic-menu>
2162
2233
  </sonic-pop>
2163
- `}};pt.styles=[Yr,ee`
2234
+ <!-- Lookup valeur initiale : hors menu, jamais displayContents (sinon visible). -->
2235
+ <sonic-queue
2236
+ class="init-queue"
2237
+ hidden
2238
+ noLazyload
2239
+ loader="no-loader"
2240
+ dataProvider="${this.initQueueDataProvider}"
2241
+ filteredFields=${this.filteredFields}
2242
+ dataProviderExpression="${this.dataProviderExpression}"
2243
+ dataFilterProvider="${this.initSearchDataProvider}"
2244
+ serviceURL=${te(this.serviceURL||void 0)}
2245
+ key="${this.key}"
2246
+ .templates=${t}
2247
+ .items=${this.items}
2248
+ >
2249
+ </sonic-queue>
2250
+ `}};et.styles=[Qr,X`
2164
2251
  :host {
2165
2252
  display: block;
2166
2253
  }
2167
- /**disable mouse if there is an attribute readonly */
2168
2254
  :host([readonly]),
2169
2255
  :host([disabled]) {
2170
2256
  pointer-events: none;
@@ -2181,7 +2267,16 @@
2181
2267
  min-width: 14rem;
2182
2268
  width: 100%;
2183
2269
  }
2184
- `],mt([u({type:String})],pt.prototype,"size",2),mt([u({type:String})],pt.prototype,"placeholder",2),mt([u()],pt.prototype,"filteredFields",2),mt([u({type:Boolean,reflect:!0})],pt.prototype,"readonly",2),mt([u({type:String})],pt.prototype,"dataProviderExpression",2),mt([u({type:Number})],pt.prototype,"minSearchLength",2),mt([u({type:Boolean})],pt.prototype,"select",2),mt([u({type:String})],pt.prototype,"key",2),mt([u({type:String})],pt.prototype,"searchParameter",2),mt([u({type:String})],pt.prototype,"propertyName",2),mt([bt({slot:"prefix",flatten:!0})],pt.prototype,"slotInputPrefixNodes",2),mt([Ae()],pt.prototype,"hasInputPrefix",2),mt([Cs("sonic-pop")],pt.prototype,"popElement",2),mt([Ae()],pt.prototype,"isPopVisible",2),mt([Ae()],pt.prototype,"lastValidSearch",2),pt=mt([X("sonic-input-autocomplete")],pt);var Vd=Object.defineProperty,Bd=Object.getOwnPropertyDescriptor,Dt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Bd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vd(e,s,i),i};const Hd="sonic-password-helper";let vt=class extends Ts(J){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},be.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&be.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?R`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:R`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?re:R`
2270
+
2271
+ .init-queue {
2272
+ display: none !important;
2273
+ position: absolute;
2274
+ width: 0;
2275
+ height: 0;
2276
+ overflow: hidden;
2277
+ pointer-events: none;
2278
+ }
2279
+ `],et.instanceCounter=0,pt([u({type:String})],et.prototype,"size",2),pt([u({type:String})],et.prototype,"placeholder",2),pt([u()],et.prototype,"filteredFields",2),pt([u({type:Boolean,reflect:!0})],et.prototype,"readonly",2),pt([u({type:String})],et.prototype,"dataProviderExpression",2),pt([u({type:String})],et.prototype,"serviceURL",2),pt([u({type:Number})],et.prototype,"minSearchLength",2),pt([u({type:Boolean})],et.prototype,"select",2),pt([u({type:String})],et.prototype,"key",2),pt([u({type:String})],et.prototype,"searchParameter",2),pt([u({type:String})],et.prototype,"propertyName",2),pt([u({type:Function,attribute:!1})],et.prototype,"items",2),pt([gt({slot:"prefix",flatten:!0})],et.prototype,"slotInputPrefixNodes",2),pt([Ae()],et.prototype,"hasInputPrefix",2),pt([ms("sonic-pop")],et.prototype,"popElement",2),pt([Ae()],et.prototype,"searchText",2),pt([Ae()],et.prototype,"searchDataProvider",2),et=pt([Q("sonic-input-autocomplete")],et);var Ep=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,Dt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ep(e,s,i),i};const Tp="sonic-password-helper";let vt=class extends Fs(J){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},me.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&me.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?R`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:R`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?se:R`
2185
2280
  <div>${this.wording_password_helper_decription}</div>
2186
2281
  <div>
2187
2282
  ${this.getIcon(this.hasEnoughChars)}
@@ -2202,11 +2297,11 @@
2202
2297
  ${this.getIcon(this.hasSpecialChar)}
2203
2298
  ${this.wording_password_helper_special_char}
2204
2299
  </div>
2205
- `}};Dt([u()],vt.prototype,"name",2),Dt([u()],vt.prototype,"minChars",2),Dt([Ae()],vt.prototype,"hasNoChar",2),Dt([Ae()],vt.prototype,"hasEnoughChars",2),Dt([Ae()],vt.prototype,"hasMinuscule",2),Dt([Ae()],vt.prototype,"hasMajuscule",2),Dt([Ae()],vt.prototype,"hasNumber",2),Dt([Ae()],vt.prototype,"hasSpecialChar",2),Dt([u()],vt.prototype,"wording_password_helper_decription",2),Dt([u()],vt.prototype,"wording_password_helper_min_length",2),Dt([u()],vt.prototype,"wording_password_helper_lower_case",2),Dt([u()],vt.prototype,"wording_password_helper_upper_case",2),Dt([u()],vt.prototype,"wording_password_helper_number",2),Dt([u()],vt.prototype,"wording_password_helper_special_char",2),vt=Dt([X(Hd)],vt);var Wd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,tr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Kd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Wd(e,s,i),i};const Yd="sonic-same-value-helper";let Fs=class extends Ts(J){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=be.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=kt(t,this.name).get()==kt(t,this.sameValueAs).get())},kt(t,this.name).onAssign(this.checkValue),kt(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=be.get(this.getAncestorAttributeValue("formDataProvider"));kt(t,this.name).offAssign(this.checkValue),kt(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?re:R`
2300
+ `}};Dt([u()],vt.prototype,"name",2),Dt([u()],vt.prototype,"minChars",2),Dt([Ae()],vt.prototype,"hasNoChar",2),Dt([Ae()],vt.prototype,"hasEnoughChars",2),Dt([Ae()],vt.prototype,"hasMinuscule",2),Dt([Ae()],vt.prototype,"hasMajuscule",2),Dt([Ae()],vt.prototype,"hasNumber",2),Dt([Ae()],vt.prototype,"hasSpecialChar",2),Dt([u()],vt.prototype,"wording_password_helper_decription",2),Dt([u()],vt.prototype,"wording_password_helper_min_length",2),Dt([u()],vt.prototype,"wording_password_helper_lower_case",2),Dt([u()],vt.prototype,"wording_password_helper_upper_case",2),Dt([u()],vt.prototype,"wording_password_helper_number",2),Dt([u()],vt.prototype,"wording_password_helper_special_char",2),vt=Dt([Q(Tp)],vt);var Lp=Object.defineProperty,Mp=Object.getOwnPropertyDescriptor,nr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Mp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Lp(e,s,i),i};const Fp="sonic-same-value-helper";let Us=class extends Fs(J){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=me.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=qt(t,this.name).get()==qt(t,this.sameValueAs).get())},qt(t,this.name).onAssign(this.checkValue),qt(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=me.get(this.getAncestorAttributeValue("formDataProvider"));qt(t,this.name).offAssign(this.checkValue),qt(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?se:R`
2206
2301
  <span>
2207
- ${this.areEqual?je(this.descriptionWhenEqual):je(this.descriptionWhenNotEqual)}
2302
+ ${this.areEqual?Be(this.descriptionWhenEqual):Be(this.descriptionWhenNotEqual)}
2208
2303
  </span>
2209
- `}};tr([u()],Fs.prototype,"name",2),tr([u()],Fs.prototype,"sameValueAs",2),tr([u()],Fs.prototype,"descriptionWhenEqual",2),tr([u()],Fs.prototype,"descriptionWhenNotEqual",2),tr([Ae()],Fs.prototype,"areEqual",2),tr([Ae()],Fs.prototype,"hasNoChar",2),Fs=tr([X(Yd)],Fs);var Gd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,vs=(t,e,s,r)=>{for(var i=r>1?void 0:r?Zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Gd(e,s,i),i};const Jd="sonic-checkbox";let Et=class extends Fn(ji(br(nt(J)))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return R`
2304
+ `}};nr([u()],Us.prototype,"name",2),nr([u()],Us.prototype,"sameValueAs",2),nr([u()],Us.prototype,"descriptionWhenEqual",2),nr([u()],Us.prototype,"descriptionWhenNotEqual",2),nr([Ae()],Us.prototype,"areEqual",2),nr([Ae()],Us.prototype,"hasNoChar",2),Us=nr([Q(Fp)],Us);var Ip=Object.defineProperty,Np=Object.getOwnPropertyDescriptor,Ss=(t,e,s,r)=>{for(var i=r>1?void 0:r?Np(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ip(e,s,i),i};const Rp="sonic-checkbox";let Et=class extends qn(Bi(yr(J))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return R`
2210
2305
  <label class="checkbox-container ${this.disabled?"disabled":""}">
2211
2306
 
2212
2307
  <span class="icon-container">
@@ -2228,13 +2323,13 @@
2228
2323
  </span>
2229
2324
 
2230
2325
  <div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
2231
- ${this.label?je(this.label):""}
2326
+ ${this.label?Be(this.label):""}
2232
2327
  <slot @slotchange=${this.hasSlotOrProps}></slot>
2233
- <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?R`${je(this.description)}`:""}</slot>
2328
+ <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?R`${Be(this.description)}`:""}</slot>
2234
2329
  </div>
2235
2330
  </label>
2236
2331
  </label>
2237
- `}};Et.styles=[ss,ee`
2332
+ `}};Et.styles=[rs,X`
2238
2333
  :host {
2239
2334
  --sc-checkbox-border-width: var(--sc-form-border-width);
2240
2335
  --sc-checkbox-border-color: var(
@@ -2356,7 +2451,7 @@
2356
2451
  .hidden {
2357
2452
  display: none;
2358
2453
  }
2359
- `],vs([u({type:Boolean,reflect:!0})],Et.prototype,"touched",2),vs([u({type:String})],Et.prototype,"iconName",2),vs([u({type:String})],Et.prototype,"indeterminateIconName",2),vs([u({type:Boolean})],Et.prototype,"showAsIndeterminate",2),vs([u({type:Boolean})],Et.prototype,"hasDescription",2),vs([u({type:Boolean})],Et.prototype,"hasLabel",2),vs([bt({flatten:!0})],Et.prototype,"slotLabelNodes",2),vs([bt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=vs([X(Jd)],Et);var Xd=Object.getOwnPropertyDescriptor,Qd=(t,e,s,r)=>{for(var i=r>1?void 0:r?Xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const ep="sonic-radio";let ro=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};ro.styles=[Et.styles,ee`
2454
+ `],Ss([u({type:Boolean,reflect:!0})],Et.prototype,"touched",2),Ss([u({type:String})],Et.prototype,"iconName",2),Ss([u({type:String})],Et.prototype,"indeterminateIconName",2),Ss([u({type:Boolean})],Et.prototype,"showAsIndeterminate",2),Ss([u({type:Boolean})],Et.prototype,"hasDescription",2),Ss([u({type:Boolean})],Et.prototype,"hasLabel",2),Ss([gt({flatten:!0})],Et.prototype,"slotLabelNodes",2),Ss([gt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=Ss([Q(Rp)],Et);var jp=Object.getOwnPropertyDescriptor,zp=(t,e,s,r)=>{for(var i=r>1?void 0:r?jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Up="sonic-radio";let fo=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};fo.styles=[Et.styles,X`
2360
2455
  :host input {
2361
2456
  border-radius: 50%;
2362
2457
  }
@@ -2372,7 +2467,7 @@
2372
2467
  width: 0.6em;
2373
2468
  width: round(0.6em, 1px);
2374
2469
  }
2375
- `],ro=Qd([X(ep)],ro);var tp=Object.getOwnPropertyDescriptor,sp=(t,e,s,r)=>{for(var i=r>1?void 0:r?tp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const rp="sonic-switch";let io=class extends Et{constructor(){super(),this.unique=!0}};io.styles=[Et.styles,ee`
2470
+ `],fo=zp([Q(Up)],fo);var qp=Object.getOwnPropertyDescriptor,Bp=(t,e,s,r)=>{for(var i=r>1?void 0:r?qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Hp="sonic-switch";let mo=class extends Et{constructor(){super(),this.unique=!0}};mo.styles=[Et.styles,X`
2376
2471
  sonic-icon {
2377
2472
  display: none;
2378
2473
  }
@@ -2437,17 +2532,17 @@
2437
2532
  input + sonic-icon {
2438
2533
  display: none;
2439
2534
  }
2440
- `],io=sp([X(rp)],io);var ip=Object.defineProperty,np=Object.getOwnPropertyDescriptor,ot=(t,e,s,r)=>{for(var i=r>1?void 0:r?np(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ip(e,s,i),i};const op="sonic-select";let Qe=class extends br(nt(J)){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return R`
2535
+ `],mo=Bp([Q(Hp)],mo);var Vp=Object.defineProperty,Wp=Object.getOwnPropertyDescriptor,at=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vp(e,s,i),i};const Kp="sonic-select";let tt=class extends yr(J){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return R`
2441
2536
  <label
2442
2537
  for="form-element"
2443
2538
  class="${this.hasLabel?"form-label":"hidden"}"
2444
- >${this.label?je(this.label):""}<slot
2539
+ >${this.label?Be(this.label):""}<slot
2445
2540
  name="label"
2446
2541
  @slotchange=${this.hasSlotOrProps}
2447
2542
  ></slot
2448
2543
  ></label>
2449
2544
 
2450
- <div class="form-control ${so(t)}">
2545
+ <div class="form-control ${po(t)}">
2451
2546
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2452
2547
  <div class="form-select-wrapper">
2453
2548
  <select
@@ -2465,7 +2560,7 @@
2465
2560
  aria-label=${te(this.ariaLabel)}
2466
2561
  aria-labelledby=${te(this.ariaLabelledby)}
2467
2562
  >
2468
- ${Ii(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return R`<option
2563
+ ${Ri(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return R`<option
2469
2564
  ?selected=${s}
2470
2565
  value="${e[this.valueKey]}"
2471
2566
  >
@@ -2486,9 +2581,9 @@
2486
2581
  name="description"
2487
2582
  @slotchange=${this.hasSlotOrProps}
2488
2583
  class="${this.hasDescription?"form-description":"hidden"}"
2489
- >${this.description?R`${je(this.description)}`:""}</slot
2584
+ >${this.description?R`${Be(this.description)}`:""}</slot
2490
2585
  >
2491
- `}};Qe.styles=[ss,to,Yi,Gi,ee`
2586
+ `}};tt.styles=[rs,ho,Qi,Xi,X`
2492
2587
  .form-element {
2493
2588
  appearance: none;
2494
2589
  white-space: nowrap;
@@ -2541,11 +2636,11 @@
2541
2636
  :host([multiple]) sonic-icon {
2542
2637
  display: none !important;
2543
2638
  }
2544
- `],ot([u({type:String})],Qe.prototype,"valueKey",2),ot([u({type:String})],Qe.prototype,"wordingKey",2),ot([u({type:Boolean})],Qe.prototype,"multiple",2),ot([u({type:String,reflect:!0})],Qe.prototype,"size",2),ot([u({type:Number})],Qe.prototype,"selectSize",2),ot([u({type:String,reflect:!0})],Qe.prototype,"status",2),ot([u({type:Array})],Qe.prototype,"options",1),ot([u({reflect:!0})],Qe.prototype,"value",1),ot([u({type:Boolean})],Qe.prototype,"forceAutoFill",2),ot([u()],Qe.prototype,"description",1),ot([u()],Qe.prototype,"label",1),ot([bt({slot:"label",flatten:!0})],Qe.prototype,"slotLabelNodes",2),ot([bt({slot:"description",flatten:!0})],Qe.prototype,"slotDescriptionNodes",2),ot([bt({slot:"suffix",flatten:!0})],Qe.prototype,"slotSuffixNodes",2),ot([bt({slot:"prefix",flatten:!0})],Qe.prototype,"slotPrefixNodes",2),ot([Ae()],Qe.prototype,"hasDescription",2),ot([Ae()],Qe.prototype,"hasLabel",2),ot([Ae()],Qe.prototype,"hasSuffix",2),ot([Ae()],Qe.prototype,"hasPrefix",2),Qe=ot([X(op)],Qe);var ap=Object.defineProperty,lp=Object.getOwnPropertyDescriptor,Tt=(t,e,s,r)=>{for(var i=r>1?void 0:r?lp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&ap(e,s,i),i};const cp="sonic-textarea";let yt=class extends ji(br(nt(J))){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return R`
2639
+ `],at([u({type:String})],tt.prototype,"valueKey",2),at([u({type:String})],tt.prototype,"wordingKey",2),at([u({type:Boolean})],tt.prototype,"multiple",2),at([u({type:String,reflect:!0})],tt.prototype,"size",2),at([u({type:Number})],tt.prototype,"selectSize",2),at([u({type:String,reflect:!0})],tt.prototype,"status",2),at([u({type:Array})],tt.prototype,"options",1),at([u({reflect:!0})],tt.prototype,"value",1),at([u({type:Boolean})],tt.prototype,"forceAutoFill",2),at([u()],tt.prototype,"description",1),at([u()],tt.prototype,"label",1),at([gt({slot:"label",flatten:!0})],tt.prototype,"slotLabelNodes",2),at([gt({slot:"description",flatten:!0})],tt.prototype,"slotDescriptionNodes",2),at([gt({slot:"suffix",flatten:!0})],tt.prototype,"slotSuffixNodes",2),at([gt({slot:"prefix",flatten:!0})],tt.prototype,"slotPrefixNodes",2),at([Ae()],tt.prototype,"hasDescription",2),at([Ae()],tt.prototype,"hasLabel",2),at([Ae()],tt.prototype,"hasSuffix",2),at([Ae()],tt.prototype,"hasPrefix",2),tt=at([Q(Kp)],tt);var Gp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Lt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Yp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Gp(e,s,i),i};const Zp="sonic-textarea";let yt=class extends Bi(yr(J)){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return R`
2545
2640
  <label
2546
2641
  for="${this.id||"form-element"}"
2547
2642
  class="${this.hasLabel?"form-label":"hidden"}"
2548
- >${this.label?je(this.label):""}<slot
2643
+ >${this.label?Be(this.label):""}<slot
2549
2644
  name="label"
2550
2645
  @slotchange=${this.hasSlotOrProps}
2551
2646
  ></slot
@@ -2583,16 +2678,16 @@ ${this.value}</textarea
2583
2678
  name="description"
2584
2679
  @slotchange=${this.hasSlotOrProps}
2585
2680
  class="${this.hasDescription?"form-description":"hidden"}"
2586
- >${this.description?R`${je(this.description)}`:""}</slot
2681
+ >${this.description?R`${Be(this.description)}`:""}</slot
2587
2682
  >
2588
- `}};yt.styles=[ss,to,Yi,Gi,Yr,ee`
2683
+ `}};yt.styles=[rs,ho,Qi,Xi,Qr,X`
2589
2684
  textarea {
2590
2685
  overflow-y: auto !important;
2591
2686
  font-size: inherit;
2592
2687
  }
2593
- `],Tt([u({type:String})],yt.prototype,"size",2),Tt([u({type:Number})],yt.prototype,"rows",2),Tt([u({type:Number})],yt.prototype,"cols",2),Tt([u({type:Number})],yt.prototype,"maxlength",2),Tt([u({type:Number})],yt.prototype,"minlength",2),Tt([u({type:String})],yt.prototype,"wrap",2),Tt([u({type:Boolean})],yt.prototype,"readonly",2),Tt([u({type:String})],yt.prototype,"placeholder",2),Tt([u({type:String})],yt.prototype,"resize",2),Tt([bt({slot:"label",flatten:!0})],yt.prototype,"slotLabelNodes",2),Tt([bt({slot:"description",flatten:!0})],yt.prototype,"slotDescriptionNodes",2),Tt([Ae()],yt.prototype,"hasDescription",2),Tt([Ae()],yt.prototype,"hasLabel",2),yt=Tt([X(cp)],yt);var up=Object.getOwnPropertyDescriptor,hp=(t,e,s,r)=>{for(var i=r>1?void 0:r?up(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};let no=class extends J{render(){return R`<slot></slot>`}};no.styles=[ee`
2688
+ `],Lt([u({type:String})],yt.prototype,"size",2),Lt([u({type:Number})],yt.prototype,"rows",2),Lt([u({type:Number})],yt.prototype,"cols",2),Lt([u({type:Number})],yt.prototype,"maxlength",2),Lt([u({type:Number})],yt.prototype,"minlength",2),Lt([u({type:String})],yt.prototype,"wrap",2),Lt([u({type:Boolean})],yt.prototype,"readonly",2),Lt([u({type:String})],yt.prototype,"placeholder",2),Lt([u({type:String})],yt.prototype,"resize",2),Lt([gt({slot:"label",flatten:!0})],yt.prototype,"slotLabelNodes",2),Lt([gt({slot:"description",flatten:!0})],yt.prototype,"slotDescriptionNodes",2),Lt([Ae()],yt.prototype,"hasDescription",2),Lt([Ae()],yt.prototype,"hasLabel",2),yt=Lt([Q(Zp)],yt);var Jp=Object.getOwnPropertyDescriptor,Qp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};let go=class extends J{render(){return R`<slot></slot>`}};go.styles=[X`
2594
2689
  :host {
2595
- font-size: 1.15rem;
2690
+ font-size: 1.125rem;
2596
2691
  line-height: 1.2;
2597
2692
  display: block;
2598
2693
  color: var(--sc-base-500, var(--sc-base-content, #000));
@@ -2607,7 +2702,7 @@ ${this.value}</textarea
2607
2702
  font-size: 1rem;
2608
2703
  }
2609
2704
  }
2610
- `],no=hp([X("sonic-legend-description")],no);var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,sr=(t,e,s,r)=>{for(var i=r>1?void 0:r?pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&dp(e,s,i),i};const fp="sonic-legend";let ys=class extends J{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return R`<legend part="legend">
2705
+ `],go=Qp([Q("sonic-legend-description")],go);var Xp=Object.defineProperty,ef=Object.getOwnPropertyDescriptor,or=(t,e,s,r)=>{for(var i=r>1?void 0:r?ef(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xp(e,s,i),i};const tf="sonic-legend";let Ps=class extends J{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return R`<legend part="legend">
2611
2706
  ${this.iconName?R`<div class="icon">
2612
2707
  <sonic-icon
2613
2708
  name=${this.iconName}
@@ -2617,16 +2712,16 @@ ${this.value}</textarea
2617
2712
  </div>`:""}
2618
2713
 
2619
2714
  <div class="legend-content">
2620
- ${je(this.label?this.label:"")}
2715
+ ${Be(this.label?this.label:"")}
2621
2716
  ${this.description?R`<sonic-legend-description
2622
- >${je(this.description)}</sonic-legend-description
2717
+ >${Be(this.description)}</sonic-legend-description
2623
2718
  >`:""}
2624
2719
  <slot></slot>
2625
2720
  </div>
2626
2721
  <slot name="suffix"></slot>
2627
- </legend>`}};ys.styles=[ee`
2722
+ </legend>`}};Ps.styles=[X`
2628
2723
  :host {
2629
- --sc-legend-font-size: 1.5rem;
2724
+ --sc-legend-font-size: 1.25rem;
2630
2725
  --sc-legend-font-weight: var(--sc-font-weight-base, 400);
2631
2726
  --sc-legend-font-style: var(--sc-headings-font-style, normal);
2632
2727
  --sc-legend-family: var(
@@ -2668,7 +2763,7 @@ ${this.value}</textarea
2668
2763
  .legend-content {
2669
2764
  flex-grow: 1;
2670
2765
  }
2671
- `],sr([u({type:Boolean})],ys.prototype,"forceAutoFill",2),sr([u()],ys.prototype,"description",1),sr([u()],ys.prototype,"label",1),sr([u({type:String})],ys.prototype,"iconName",2),sr([u({type:String})],ys.prototype,"iconLibrary",2),sr([u({type:String})],ys.prototype,"iconPrefix",2),ys=sr([X(fp)],ys);var gp=Object.defineProperty,bp=Object.getOwnPropertyDescriptor,ns=(t,e,s,r)=>{for(var i=r>1?void 0:r?bp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&gp(e,s,i),i};const mp="sonic-fieldset";let Vt=class extends nt(J){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset
2766
+ `],or([u({type:Boolean})],Ps.prototype,"forceAutoFill",2),or([u()],Ps.prototype,"description",1),or([u()],Ps.prototype,"label",1),or([u({type:String})],Ps.prototype,"iconName",2),or([u({type:String})],Ps.prototype,"iconLibrary",2),or([u({type:String})],Ps.prototype,"iconPrefix",2),Ps=or([Q(tf)],Ps);var sf=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,as=(t,e,s,r)=>{for(var i=r>1?void 0:r?rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sf(e,s,i),i};const nf="sonic-fieldset";let Vt=class extends kt(J){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return R`<fieldset
2672
2767
  form="${te(this.form)}"
2673
2768
  ?disabled="${this.disabled}"
2674
2769
  >
@@ -2678,9 +2773,9 @@ ${this.value}</textarea
2678
2773
  iconName=${te(this.iconName)}
2679
2774
  iconPrefix=${te(this.iconPrefix)}
2680
2775
  iconLibrary=${te(this.iconLibrary)}
2681
- ></sonic-legend>`:re}
2776
+ ></sonic-legend>`:se}
2682
2777
  <slot></slot>
2683
- </fieldset>`}};Vt.styles=[ee`
2778
+ </fieldset>`}};Vt.styles=[X`
2684
2779
  :host {
2685
2780
  --sc-fieldset-mt: 0;
2686
2781
  --sc-fieldset-mb: 1rem;
@@ -2729,9 +2824,9 @@ ${this.value}</textarea
2729
2824
  ::slotted(sonic-legend:last-child) {
2730
2825
  margin-bottom: 0;
2731
2826
  }
2732
- `],ns([u({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),ns([u({type:String})],Vt.prototype,"form",2),ns([u({type:String})],Vt.prototype,"label",2),ns([u({type:String})],Vt.prototype,"description",2),ns([u({type:String})],Vt.prototype,"iconName",2),ns([u({type:String})],Vt.prototype,"iconLibrary",2),ns([u({type:String})],Vt.prototype,"iconPrefix",2),ns([u({type:Boolean,reflect:!0})],Vt.prototype,"tight",2),ns([u({type:String,reflect:!0})],Vt.prototype,"variant",2),Vt=ns([X(mp)],Vt);var vp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,oo=(t,e,s,r)=>{for(var i=r>1?void 0:r?yp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vp(e,s,i),i};const wp="sonic-form-layout";let ti=class extends nt(J){constructor(){super(...arguments),this._resizeController=new rl(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this.oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return R`<div class=${so(t)}>
2827
+ `],as([u({type:Boolean,reflect:!0})],Vt.prototype,"disabled",2),as([u({type:String})],Vt.prototype,"form",2),as([u({type:String})],Vt.prototype,"label",2),as([u({type:String})],Vt.prototype,"description",2),as([u({type:String})],Vt.prototype,"iconName",2),as([u({type:String})],Vt.prototype,"iconLibrary",2),as([u({type:String})],Vt.prototype,"iconPrefix",2),as([u({type:Boolean,reflect:!0})],Vt.prototype,"tight",2),as([u({type:String,reflect:!0})],Vt.prototype,"variant",2),Vt=as([Q(nf)],Vt);var of=Object.defineProperty,af=Object.getOwnPropertyDescriptor,bo=(t,e,s,r)=>{for(var i=r>1?void 0:r?af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&of(e,s,i),i};const lf="sonic-form-layout";let ni=class extends kt(J){constructor(){super(...arguments),this._resizeController=new Ol(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this.oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return R`<div class=${po(t)}>
2733
2828
  <slot @slotchange=${this.onSlotChange}></slot>
2734
- </div>`}};ti.styles=[ee`
2829
+ </div>`}};ni.styles=[X`
2735
2830
  :host {
2736
2831
  display: block;
2737
2832
  }
@@ -2766,7 +2861,7 @@ ${this.value}</textarea
2766
2861
  ::slotted(sonic-divider) {
2767
2862
  --sc-divider-my: 0;
2768
2863
  }
2769
- `],oo([Ir({flatten:!0})],ti.prototype,"slottedElements",2),oo([u({type:Boolean})],ti.prototype,"oneFormElement",2),ti=oo([X(wp)],ti);var _p=Object.defineProperty,Pp=Object.getOwnPropertyDescriptor,ao=(t,e,s,r)=>{for(var i=r>1?void 0:r?Pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&_p(e,s,i),i};const xp="sonic-form-actions";let si=class extends J{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return R`<slot style=${$t(t)}></slot>`}};si.styles=[ee`
2864
+ `],bo([jr({flatten:!0})],ni.prototype,"slottedElements",2),bo([u({type:Boolean})],ni.prototype,"oneFormElement",2),ni=bo([Q(lf)],ni);var cf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,vo=(t,e,s,r)=>{for(var i=r>1?void 0:r?uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cf(e,s,i),i};const hf="sonic-form-actions";let oi=class extends J{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return R`<slot style=${$t(t)}></slot>`}};oi.styles=[X`
2770
2865
  :host {
2771
2866
  display: block;
2772
2867
  }
@@ -2775,8 +2870,8 @@ ${this.value}</textarea
2775
2870
  flex-wrap: wrap;
2776
2871
  gap: 0.3rem;
2777
2872
  }
2778
- `],ao([u({type:String})],si.prototype,"direction",2),ao([u({type:String})],si.prototype,"justify",2),si=ao([X(xp)],si);var Sp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,js=(t,e,s,r)=>{for(var i=r>1?void 0:r?Ap(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Sp(e,s,i),i};const Cp="sonic-group";let os=class extends J{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,r)=>{const i=s;r===0?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):r===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2779
- >${this.label?je(this.label):""}<slot
2873
+ `],vo([u({type:String})],oi.prototype,"direction",2),vo([u({type:String})],oi.prototype,"justify",2),oi=vo([Q(hf)],oi);var df=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,qs=(t,e,s,r)=>{for(var i=r>1?void 0:r?pf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&df(e,s,i),i};const ff="sonic-group";let ls=class extends J{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,r)=>{const i=s;r===0?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):r===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return R`<span class="${this.hasLabel?"form-label":"hidden"}"
2874
+ >${this.label?Be(this.label):""}<slot
2780
2875
  name="label"
2781
2876
  @slotchange=${this.hasSlotOrProps}
2782
2877
  ></slot
@@ -2787,8 +2882,8 @@ ${this.value}</textarea
2787
2882
  @slotchange=${this.hasSlotOrProps}
2788
2883
  class="${this.hasDescription?"form-description":"hidden"}"
2789
2884
  >
2790
- ${this.description?R`${je(this.description)}`:""}
2791
- </slot>`}};os.styles=[ss,Yi,Gi,ee`
2885
+ ${this.description?R`${Be(this.description)}`:""}
2886
+ </slot>`}};ls.styles=[rs,Qi,Xi,X`
2792
2887
  :host {
2793
2888
  display: inline-block;
2794
2889
  vertical-align: middle;
@@ -2808,23 +2903,51 @@ ${this.value}</textarea
2808
2903
  ::slotted(sonic-select) {
2809
2904
  flex-grow: 1;
2810
2905
  }
2811
- `],js([u({type:String})],os.prototype,"alignItems",2),js([u({type:String})],os.prototype,"label",2),js([u({type:String})],os.prototype,"description",2),js([bt({slot:"label",flatten:!0})],os.prototype,"slotLabelNodes",2),js([bt({slot:"description",flatten:!0})],os.prototype,"slotDescriptionNodes",2),js([Ae()],os.prototype,"hasDescription",2),js([Ae()],os.prototype,"hasLabel",2),os=js([X(Cp)],os);var kp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,as=(t,e,s,r)=>{for(var i=r>1?void 0:r?$p(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&kp(e,s,i),i};const Dp="sonic-image";let Bt=class extends J{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return R`<div part="image">
2812
- <picture part="picture"
2906
+ `],qs([u({type:String})],ls.prototype,"alignItems",2),qs([u({type:String})],ls.prototype,"label",2),qs([u({type:String})],ls.prototype,"description",2),qs([gt({slot:"label",flatten:!0})],ls.prototype,"slotLabelNodes",2),qs([gt({slot:"description",flatten:!0})],ls.prototype,"slotDescriptionNodes",2),qs([Ae()],ls.prototype,"hasDescription",2),qs([Ae()],ls.prototype,"hasLabel",2),ls=qs([Q(ff)],ls);const mf=X`
2907
+ :host {
2908
+ --sc-_rounded: 0;
2909
+ border-radius: var(--sc-_rounded);
2910
+ }
2911
+ :host([rounded]),
2912
+ :host([rounded="base"]) {
2913
+ --sc-_rounded: var(--sc-rounded);
2914
+ overflow: hidden;
2915
+ }
2916
+ :host([rounded="sm"]) {
2917
+ --sc-_rounded: var(--sc-rounded-sm);
2918
+ }
2919
+
2920
+ :host([rounded="md"]) {
2921
+ --sc-_rounded: var(--sc-rounded-md);
2922
+ }
2923
+
2924
+ :host([rounded="lg"]) {
2925
+ --sc-_rounded: var(--sc-rounded-lg);
2926
+ }
2927
+ :host([rounded="xl"]) {
2928
+ --sc-_rounded: var(--sc-rounded-xl);
2929
+ }
2930
+
2931
+ :host([rounded="full"]) {
2932
+ --sc-_rounded: 50% !important;
2933
+ }
2934
+ :host([rounded="none"]) {
2935
+ --sc-_rounded: 0 !important;
2936
+ }
2937
+ `;var gf=Object.defineProperty,bf=Object.getOwnPropertyDescriptor,cs=(t,e,s,r)=>{for(var i=r>1?void 0:r?bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&gf(e,s,i),i};const vf="sonic-image";let Wt=class extends J{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return R`<div>
2938
+ <picture
2813
2939
  ><img
2814
- part="img"
2815
2940
  src="${this.src}"
2816
2941
  loading="${this.loading}"
2817
2942
  alt="${this.alt}"
2818
2943
  style=${$t(t)}
2819
2944
  /></picture>
2820
- </div>`}};Bt.styles=[ee`
2945
+ </div>`}};Wt.styles=[mf,X`
2821
2946
  :host {
2822
- --sc-img-radius: 0;
2823
- --sc-img-bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
2824
- border-radius: var(--sc-img-radius);
2947
+ --sc-_bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
2948
+ background: var(--sc-_bg);
2825
2949
  display: block;
2826
2950
  width: 100%;
2827
- background: var(--sc-img-bg);
2828
2951
  }
2829
2952
 
2830
2953
  img {
@@ -2837,34 +2960,6 @@ ${this.value}</textarea
2837
2960
  visibility: hidden;
2838
2961
  }
2839
2962
 
2840
- /*Rounded*/
2841
- :host([rounded]) {
2842
- --sc-img-radius: var(--sc-rounded);
2843
- overflow: hidden;
2844
- }
2845
- :host([rounded="sm"]) {
2846
- --sc-img-radius: var(--sc-rounded-sm);
2847
- }
2848
-
2849
- :host([rounded="md"]) {
2850
- --sc-img-radius: var(--sc-rounded-md);
2851
- }
2852
-
2853
- :host([rounded="lg"]) {
2854
- --sc-img-radius: var(--sc-rounded-lg);
2855
- }
2856
- :host([rounded="xl"]) {
2857
- --sc-img-radius: var(--sc-rounded-xl);
2858
- }
2859
-
2860
- /*Cercle*/
2861
- :host([rounded="full"]) {
2862
- --sc-img-radius: 50% !important;
2863
- }
2864
- :host([rounded="none"]) {
2865
- --sc-img-radius: 0 !important;
2866
- }
2867
-
2868
2963
  :host([cover]),
2869
2964
  :host([cover]) > div,
2870
2965
  :host([cover]) img {
@@ -2884,14 +2979,15 @@ ${this.value}</textarea
2884
2979
 
2885
2980
  :host([transition="fade-scale-out"]) img {
2886
2981
  scale: 1.08;
2887
- transition: opacity 0.3s linear,
2982
+ transition:
2983
+ opacity 0.3s linear,
2888
2984
  scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
2889
2985
  }
2890
2986
  :host([transition]) img.loaded {
2891
2987
  opacity: 1;
2892
2988
  scale: 1;
2893
2989
  }
2894
- `],as([u({type:String})],Bt.prototype,"rounded",2),as([u({type:String})],Bt.prototype,"src",2),as([u({type:String})],Bt.prototype,"alt",2),as([u({type:String})],Bt.prototype,"loading",2),as([u({type:String,reflect:!0})],Bt.prototype,"transition",2),as([u({type:String})],Bt.prototype,"ratio",2),as([u({type:String})],Bt.prototype,"objectPosition",2),as([u({type:String})],Bt.prototype,"imageRendering",2),as([u({type:Boolean,reflect:!0})],Bt.prototype,"cover",2),Bt=as([X(Dp)],Bt);var Ep=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,Lt=(t,e,s,r)=>{for(var i=r>1?void 0:r?Op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ep(e,s,i),i};const il=t=>Ir(t),Tp="sonic-menu";let wt=class extends J{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let t=!1,e,s;this.scrollable&&(this.addEventListener("mousedown",r=>{t=!0,this.classList.add("active"),e=r.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",r=>{if(!t)return;r.preventDefault();const n=(r.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",r=>{r.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)}))}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={gap:this.gap,flexDirection:this.direction},r={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return R`<menu
2990
+ `],cs([u({type:String,reflect:!0})],Wt.prototype,"rounded",2),cs([u({type:String})],Wt.prototype,"src",2),cs([u({type:String})],Wt.prototype,"alt",2),cs([u({type:String})],Wt.prototype,"loading",2),cs([u({type:String,reflect:!0})],Wt.prototype,"transition",2),cs([u({type:String})],Wt.prototype,"ratio",2),cs([u({type:String})],Wt.prototype,"objectPosition",2),cs([u({type:String})],Wt.prototype,"imageRendering",2),cs([u({type:Boolean,reflect:!0})],Wt.prototype,"cover",2),Wt=cs([Q(vf)],Wt);var yf=Object.defineProperty,wf=Object.getOwnPropertyDescriptor,Mt=(t,e,s,r)=>{for(var i=r>1?void 0:r?wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yf(e,s,i),i};const Tl=t=>jr(t),_f="sonic-menu";let wt=class extends J{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let t=!1,e,s;this.scrollable&&(this.addEventListener("mousedown",r=>{t=!0,this.classList.add("active"),e=r.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",r=>{if(!t)return;r.preventDefault();const n=(r.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",r=>{r.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)}))}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={gap:this.gap,flexDirection:this.direction},r={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return R`<menu
2895
2991
  part="menu"
2896
2992
  class="shadowable"
2897
2993
  style=${$t(t)}
@@ -2922,7 +3018,7 @@ ${this.value}</textarea
2922
3018
  slot="content"
2923
3019
  ></slot>
2924
3020
  </sonic-pop>
2925
- </menu>`}};wt.styles=[ee`
3021
+ </menu>`}};wt.styles=[X`
2926
3022
  :host {
2927
3023
  display: block;
2928
3024
  --sc-menu-gap: 0.15rem;
@@ -3050,27 +3146,27 @@ ${this.value}</textarea
3050
3146
  rgba(0, 0, 0, 0) 100%
3051
3147
  );
3052
3148
  }
3053
- `,tl],Lt([u({type:String,reflect:!0})],wt.prototype,"size",2),Lt([u({type:String,reflect:!0})],wt.prototype,"direction",2),Lt([u({type:String})],wt.prototype,"gap",2),Lt([u({type:String,reflect:!0})],wt.prototype,"align",2),Lt([u({type:String,reflect:!0})],wt.prototype,"shadow",2),Lt([u({type:String})],wt.prototype,"moreShape",2),Lt([u({type:Boolean})],wt.prototype,"scrollable",2),Lt([u({type:String})],wt.prototype,"minWidth",2),Lt([Cs("menu")],wt.prototype,"menu",2),Lt([Cs("#menu-content")],wt.prototype,"menuContent",2),Lt([il({selector:"*"})],wt.prototype,"menuChildren",2),Lt([il({slot:"more",selector:"*"})],wt.prototype,"moreElements",2),Lt([Ae()],wt.prototype,"hasMoreElements",2),wt=Lt([X(Tp)],wt);var Lp=Object.defineProperty,Mp=Object.getOwnPropertyDescriptor,nl=(t,e,s,r)=>{for(var i=r>1?void 0:r?Mp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Lp(e,s,i),i};const Ip="sonic-modal-actions";let Zi=class extends J{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{gs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return R`<slot></slot>`}};Zi.styles=[ee`
3149
+ `,$l],Mt([u({type:String,reflect:!0})],wt.prototype,"size",2),Mt([u({type:String,reflect:!0})],wt.prototype,"direction",2),Mt([u({type:String})],wt.prototype,"gap",2),Mt([u({type:String,reflect:!0})],wt.prototype,"align",2),Mt([u({type:String,reflect:!0})],wt.prototype,"shadow",2),Mt([u({type:String})],wt.prototype,"moreShape",2),Mt([u({type:Boolean})],wt.prototype,"scrollable",2),Mt([u({type:String})],wt.prototype,"minWidth",2),Mt([ms("menu")],wt.prototype,"menu",2),Mt([ms("#menu-content")],wt.prototype,"menuContent",2),Mt([Tl({selector:"*"})],wt.prototype,"menuChildren",2),Mt([Tl({slot:"more",selector:"*"})],wt.prototype,"moreElements",2),Mt([Ae()],wt.prototype,"hasMoreElements",2),wt=Mt([Q(_f)],wt);var Sf=Object.defineProperty,Pf=Object.getOwnPropertyDescriptor,Ll=(t,e,s,r)=>{for(var i=r>1?void 0:r?Pf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Sf(e,s,i),i};const xf="sonic-modal-actions";let tn=class extends J{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{vs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return R`<slot></slot>`}};tn.styles=[X`
3054
3150
  :host {
3055
3151
  display: flex;
3056
3152
  gap: 0.5rem;
3057
3153
  margin-top: auto;
3058
3154
  padding-top: 1.5rem;
3059
3155
  }
3060
- `],nl([Ir({selector:"sonic-button"})],Zi.prototype,"buttons",2),Zi=nl([X(Ip)],Zi);var Np=Object.defineProperty,Fp=Object.getOwnPropertyDescriptor,Ji=(t,e,s,r)=>{for(var i=r>1?void 0:r?Fp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Np(e,s,i),i};const jp="sonic-modal-close";let ri=class extends J{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){super.connectedCallback(),this.lang=document.documentElement.lang?.split("-")[0]??"fr"}render(){return R`<sonic-button
3156
+ `],Ll([jr({selector:"sonic-button"})],tn.prototype,"buttons",2),tn=Ll([Q(xf)],tn);var Af=Object.defineProperty,Cf=Object.getOwnPropertyDescriptor,sn=(t,e,s,r)=>{for(var i=r>1?void 0:r?Cf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Af(e,s,i),i};const kf="sonic-modal-close";let ai=class extends J{constructor(){super(...arguments),this.translation={..._s.closeWindow}}render(){return R`<sonic-button
3061
3157
  noAutoFill
3062
- data-aria-label=${this.translation[this.lang]}
3063
3158
  reset=${te(this.reset)}
3064
3159
  shape="circle"
3160
+ .ariaLabel=${Ui(this.translation)}
3065
3161
  @click=${this.handleClick}
3066
3162
  type=${te(this.type)}
3067
3163
  ><sonic-icon name="cancel" size="lg"></sonic-icon
3068
- ></sonic-button>`}handleClick(){Je.getClosestElement(this,"sonic-modal").hide()}};Ji([u()],ri.prototype,"translation",2),Ji([u()],ri.prototype,"reset",2),Ji([u()],ri.prototype,"type",2),ri=Ji([X(jp)],ri);var Rp=Object.getOwnPropertyDescriptor,zp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Up="sonic-modal-content";let lo=class extends J{render(){return R`<slot></slot>`}};lo.styles=[ee`
3164
+ ></sonic-button>`}handleClick(){Ge.getClosestElement(this,"sonic-modal").hide()}};sn([u()],ai.prototype,"translation",2),sn([u()],ai.prototype,"reset",2),sn([u()],ai.prototype,"type",2),ai=sn([Q(kf)],ai);var $f=Object.getOwnPropertyDescriptor,Df=(t,e,s,r)=>{for(var i=r>1?void 0:r?$f(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Ef="sonic-modal-content";let yo=class extends J{render(){return R`<slot></slot>`}};yo.styles=[X`
3069
3165
  :host {
3070
3166
  display: block;
3071
3167
  width: 100%;
3072
3168
  }
3073
- `],lo=zp([X(Up)],lo);var qp=Object.getOwnPropertyDescriptor,Vp=(t,e,s,r)=>{for(var i=r>1?void 0:r?qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Bp="sonic-modal-subtitle";let co=class extends J{render(){return R`<slot></slot>`}};co.styles=[ee`
3169
+ `],yo=Df([Q(Ef)],yo);var Of=Object.getOwnPropertyDescriptor,Tf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Of(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Lf="sonic-modal-subtitle";let wo=class extends J{render(){return R`<slot></slot>`}};wo.styles=[X`
3074
3170
  :host {
3075
3171
  font-size: 1.25rem;
3076
3172
  display: block;
@@ -3082,7 +3178,7 @@ ${this.value}</textarea
3082
3178
  font-weight: var(--sc-headings-font-weight, 700);
3083
3179
  font-style: var(--sc-headings-font-style, normal);
3084
3180
  }
3085
- `],co=Vp([X(Bp)],co);var Hp=Object.getOwnPropertyDescriptor,Wp=(t,e,s,r)=>{for(var i=r>1?void 0:r?Hp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Kp="sonic-modal-title";let uo=class extends J{render(){return R`<slot></slot>`}};uo.styles=[ee`
3181
+ `],wo=Tf([Q(Lf)],wo);var Mf=Object.getOwnPropertyDescriptor,Ff=(t,e,s,r)=>{for(var i=r>1?void 0:r?Mf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const If="sonic-modal-title";let _o=class extends J{render(){return R`<slot></slot>`}};_o.styles=[X`
3086
3182
  :host {
3087
3183
  font-weight: bold;
3088
3184
  font-size: 1.5rem;
@@ -3095,7 +3191,7 @@ ${this.value}</textarea
3095
3191
  font-weight: var(--sc-headings-font-weight, 700);
3096
3192
  font-style: var(--sc-headings-font-style, normal);
3097
3193
  }
3098
- `],uo=Wp([X(Kp)],uo);const ol=new WeakMap;function Yp(t){const e=ol.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),ol.set(t,s),s}function Gp(t){return t instanceof fn}function al(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?al(s):s instanceof CSSStyleSheet?[s]:Gp(s)?[Yp(s)]:[]):[]}var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,Ge=(t,e,s,r)=>{for(var i=r>1?void 0:r?Jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Zp(e,s,i),i};const ll="sonic-modal";let Ee=class extends nt(J){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(ll);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),jt.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Ee.modals.push(this),ct.onChange(this),super.connectedCallback()}disconnectedCallback(){ct.offChange(this),Ee.modals.splice(Ee.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return R`
3194
+ `],_o=Ff([Q(If)],_o);var Nf=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Je=(t,e,s,r)=>{for(var i=r>1?void 0:r?Rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Nf(e,s,i),i};const Ml="sonic-modal";let Oe=class extends kt(J){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(Ml);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),Rt.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Oe.modals.push(this),ut.onChange(this),super.connectedCallback()}disconnectedCallback(){ut.offChange(this),Oe.modals.splice(Oe.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc-_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return R`
3099
3195
  <div
3100
3196
  id="backdrop"
3101
3197
  @click=${this.handleOverlayClick}
@@ -3112,24 +3208,24 @@ ${this.value}</textarea
3112
3208
  ${!this.forceAction&&!this.noCloseButton?R`<sonic-modal-close
3113
3209
  class="${this._animationState=="visible"?"animate-in":"animate-out"}"
3114
3210
  type=${te(this.closeButtonType)}
3115
- ></sonic-modal-close>`:re}
3211
+ ></sonic-modal-close>`:se}
3116
3212
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
3117
3213
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
3118
3214
  <slot></slot>
3119
- </div>`:re}
3215
+ </div>`:se}
3120
3216
  </dialog>
3121
- `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=al(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return re;let s;switch(e instanceof Object?s=e:s=je(e),t){case"title":return R`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return R`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return R`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return R`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return re}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&be.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Ee.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Ee.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:r,translateY:i,durationIn:n,durationOut:o,quadOut:c}=this._animationConfig,h=this._modalElement;if(!h)return e();const b=t==="in",k=b?n:o,g=!this.fullScreen&&b?100:0;this.fullScreen||(b?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(h.animate([{transform:b?i:"translateY(0)"},{transform:b?"translateY(0)":i}],{duration:k,easing:b?s:c,fill:"both",delay:g})),f.push(h.animate([{opacity:b?0:1},{opacity:b?1:0}],{duration:k,easing:r,fill:"both",delay:g}))),Promise.all(f.map(A=>A.finished)).then(()=>e())})}};Ee.styles=[Yr,ee`
3217
+ `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Jn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return se;let s;switch(e instanceof Object?s=e:s=Be(e),t){case"title":return R`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return R`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return R`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return R`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return se}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&me.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Oe.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Oe.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:r,translateY:i,durationIn:n,durationOut:o,quadOut:c}=this._animationConfig,h=this._modalElement;if(!h)return e();const g=t==="in",A=g?n:o,m=!this.fullScreen&&g?100:0;this.fullScreen||(g?this.style.setProperty("--sc-_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc-_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(h.animate([{transform:g?i:"translateY(0)"},{transform:g?"translateY(0)":i}],{duration:A,easing:g?s:c,fill:"both",delay:m})),f.push(h.animate([{opacity:g?0:1},{opacity:g?1:0}],{duration:A,easing:r,fill:"both",delay:m}))),Promise.all(f.map(k=>k.finished)).then(()=>e())})}};Oe.styles=[Qr,X`
3122
3218
  :host {
3123
3219
  --sc-modal-py: 2.5rem;
3124
3220
  --sc-modal-px: 1.5rem;
3125
3221
 
3126
- --sc_backdrop-bg: var(
3127
- --sc_overlay-bg,
3222
+ --sc-_backdrop-bg: var(
3223
+ --sc-_overlay-bg,
3128
3224
  var(--sc-base-200, rgba(0, 0, 0, 0.12))
3129
3225
  );
3130
- --sc_backdrop-opacity: 0;
3131
- --sc_rounded: var(--sc-rounded-lg);
3132
- --sc_z-index: 990;
3226
+ --sc-_backdrop-opacity: 0;
3227
+ --sc-_rounded: var(--sc-rounded-lg);
3228
+ --sc-_z-index: 990;
3133
3229
  }
3134
3230
 
3135
3231
  * {
@@ -3141,7 +3237,7 @@ ${this.value}</textarea
3141
3237
  color: var(--sc-base-content, #000);
3142
3238
  width: 100%;
3143
3239
  box-shadow: var(--sc-shadow-lg);
3144
- border-radius: var(--sc_rounded) var(--sc_rounded);
3240
+ border-radius: var(--sc-_rounded) var(--sc-_rounded);
3145
3241
  transform: translateZ(0);
3146
3242
  border: none;
3147
3243
  outline: none;
@@ -3152,16 +3248,16 @@ ${this.value}</textarea
3152
3248
  opacity: 0;
3153
3249
  position: fixed;
3154
3250
  inset: 0;
3155
- z-index: var(--sc_z-index);
3251
+ z-index: var(--sc-_z-index);
3156
3252
  }
3157
3253
 
3158
3254
  #backdrop {
3159
- opacity: var(--sc_backdrop-opacity, 0);
3160
- background: var(--sc_backdrop-bg);
3255
+ opacity: var(--sc-_backdrop-opacity, 0);
3256
+ background: var(--sc-_backdrop-bg);
3161
3257
  transition: opacity 0.15s linear;
3162
3258
  inset: 0;
3163
3259
  position: fixed;
3164
- z-index: var(--sc_z-index);
3260
+ z-index: var(--sc-_z-index);
3165
3261
  }
3166
3262
 
3167
3263
  #modal-content {
@@ -3177,12 +3273,12 @@ ${this.value}</textarea
3177
3273
  max-width: none !important;
3178
3274
  margin: auto 0 0 !important;
3179
3275
  width: 100% !important;
3180
- border-radius: var(--sc_rounded) var(--sc_rounded) 0 0 !important;
3276
+ border-radius: var(--sc-_rounded) var(--sc-_rounded) 0 0 !important;
3181
3277
  }
3182
3278
  }
3183
3279
 
3184
3280
  :host([fullScreen]) {
3185
- --sc_rounded: 0;
3281
+ --sc-_rounded: 0;
3186
3282
  }
3187
3283
  :host([fullScreen]) #modal {
3188
3284
  width: 100% !important;
@@ -3226,11 +3322,11 @@ ${this.value}</textarea
3226
3322
  /* Close button */
3227
3323
  ::slotted(sonic-modal-close),
3228
3324
  sonic-modal-close {
3229
- --sc_top: 0.25rem;
3230
- --sc_x: 0.25rem;
3325
+ --sc-_top: 0.25rem;
3326
+ --sc-_x: 0.25rem;
3231
3327
  position: sticky;
3232
3328
  display: block;
3233
- top: var(--sc_top);
3329
+ top: var(--sc-_top);
3234
3330
  margin-left: auto;
3235
3331
  margin-bottom: -1rem;
3236
3332
  margin-top: calc(-1 * var(--sc-modal-py) - 0.25rem);
@@ -3269,14 +3365,15 @@ ${this.value}</textarea
3269
3365
  transform: scale(0) !important;
3270
3366
  transition: 0.2s linear !important;
3271
3367
  }
3272
- `],Ee.modals=[],Ge([u({type:Boolean})],Ee.prototype,"forceAction",2),Ge([u({type:Boolean})],Ee.prototype,"noCloseButton",2),Ge([u({type:Boolean})],Ee.prototype,"removeOnHide",2),Ge([u({type:Boolean})],Ee.prototype,"removeHashOnHide",2),Ge([u({type:String,reflect:!0})],Ee.prototype,"align",2),Ge([u({type:String})],Ee.prototype,"paddingX",2),Ge([u({type:String})],Ee.prototype,"paddingY",2),Ge([u({type:String})],Ee.prototype,"maxWidth",2),Ge([u({type:String})],Ee.prototype,"maxHeight",2),Ge([u({type:String})],Ee.prototype,"zIndex",2),Ge([u({type:String})],Ee.prototype,"width",2),Ge([u({type:String})],Ee.prototype,"height",2),Ge([u({type:String})],Ee.prototype,"effect",2),Ge([u({attribute:!1})],Ee.prototype,"styleSheet",2),Ge([u({type:Object})],Ee.prototype,"options",2),Ge([u({type:Boolean,reflect:!0})],Ee.prototype,"fullScreen",2),Ge([u({type:Boolean,reflect:!0})],Ee.prototype,"visible",2),Ge([u({type:String})],Ee.prototype,"closeButtonType",2),Ge([Cs("#modal")],Ee.prototype,"_modalElement",2),Ge([u({type:Boolean})],Ee.prototype,"closeOnLocationChange",2),Ge([Ae()],Ee.prototype,"location",2),Ge([Ae()],Ee.prototype,"_animationState",2),Ee=Ge([X(ll)],Ee),typeof window<"u"&&(window.SonicModal=Ee);var Xp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,ls=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xp(e,s,i),i};const ef={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},tf="sonic-alert";let Ht=class extends J{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=new Date().getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}connectedCallback(){if(this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(t)[this.id]&&this.remove()}super.connectedCallback()}render(){return R`
3273
- <slot name="icon" class="${this.noIcon?"hidden":""}"
3274
- >${this.noIcon?re:R`<div>
3275
- ${this.status&&R`<sonic-icon name=${ef[this.status]}></sonic-icon>`}
3276
- </div>`}</slot
3277
- >
3368
+ `],Oe.modals=[],Je([u({type:Boolean})],Oe.prototype,"forceAction",2),Je([u({type:Boolean})],Oe.prototype,"noCloseButton",2),Je([u({type:Boolean})],Oe.prototype,"removeOnHide",2),Je([u({type:Boolean})],Oe.prototype,"removeHashOnHide",2),Je([u({type:String,reflect:!0})],Oe.prototype,"align",2),Je([u({type:String})],Oe.prototype,"paddingX",2),Je([u({type:String})],Oe.prototype,"paddingY",2),Je([u({type:String})],Oe.prototype,"maxWidth",2),Je([u({type:String})],Oe.prototype,"maxHeight",2),Je([u({type:String})],Oe.prototype,"zIndex",2),Je([u({type:String})],Oe.prototype,"width",2),Je([u({type:String})],Oe.prototype,"height",2),Je([u({type:String})],Oe.prototype,"effect",2),Je([u({attribute:!1})],Oe.prototype,"styleSheet",2),Je([u({type:Object})],Oe.prototype,"options",2),Je([u({type:Boolean,reflect:!0})],Oe.prototype,"fullScreen",2),Je([u({type:Boolean,reflect:!0})],Oe.prototype,"visible",2),Je([u({type:String})],Oe.prototype,"closeButtonType",2),Je([ms("#modal")],Oe.prototype,"_modalElement",2),Je([u({type:Boolean})],Oe.prototype,"closeOnLocationChange",2),Je([Ae()],Oe.prototype,"location",2),Je([Ae()],Oe.prototype,"_animationState",2),Oe=Je([Q(Ml)],Oe),typeof window<"u"&&(window.SonicModal=Oe);var jf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,us=(t,e,s,r)=>{for(var i=r>1?void 0:r?zf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&jf(e,s,i),i};const Uf="sonic-alert",Fl="sonic-alert-dismissed";let Kt=class extends J{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1,this.announce=!1}connectedCallback(){super.connectedCallback(),this.dismissForever&&this.id&&ja(Fl,this.id)&&this.remove()}willUpdate(t){(t.has("announce")||t.has("status"))&&this._syncAnnounceA11y()}_syncAnnounceA11y(){if(!this.announce){this.removeAttribute("role"),this.removeAttribute("aria-live");return}this.setAttribute("role",Ba(this.status));const t=Ha(this.status);t?this.setAttribute("aria-live",t):this.removeAttribute("aria-live")}render(){return R`
3369
+ ${this.noIcon?se:R`<slot name="icon">
3370
+ <sonic-icon
3371
+ aria-hidden="true"
3372
+ name=${qi[this.status]??qi.default}
3373
+ ></sonic-icon>
3374
+ </slot>`}
3278
3375
  <div class="content">
3279
- ${this.label?R`<span class="label">${je(this.label)}</span>`:re}
3376
+ ${this.label?R`<span class="label">${this.label}</span>`:se}
3280
3377
  <div>${this.text}<slot></slot></div>
3281
3378
  </div>
3282
3379
  ${this.dismissible?R`<sonic-button
@@ -3285,69 +3382,32 @@ ${this.value}</textarea
3285
3382
  variant="unstyled"
3286
3383
  shape="circle"
3287
3384
  icon
3385
+ .ariaLabel=${Ui(_s.closeAlert)}
3288
3386
  >
3289
3387
  <sonic-icon name="cancel"></sonic-icon>
3290
- </sonic-button>`:re}
3291
- `}close(){if(this.remove(),this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(e))}}};Ht.styles=[ss,ee`
3388
+ </sonic-button>`:se}
3389
+ `}close(){if(this.remove(),!!this.dismissForever){if(!this.id){console.warn("sonic-alert : dismissForever nécessite un id.");return}za(Fl,this.id)}}};Kt.styles=[rs,Va,X`
3292
3390
  :host {
3293
- --sc_color: var(--sc-base-content, #000);
3294
- --sc_rounded: var(--sc-rounded);
3295
- --sc_fw: var(--sc-font-weight-base, 400);
3296
- --sc_fst: var(--sc-font-style-base, normal);
3297
- --sc_label-fw: bold;
3298
-
3299
- font-weight: var(--sc_fw);
3300
- font-style: var(--sc_fst);
3301
- color: var(--sc_color);
3391
+ --sc-_rounded: var(--sc-rounded);
3302
3392
  position: relative;
3303
3393
  display: flex;
3304
3394
  gap: 0.4em;
3305
- border-radius: var(--sc_rounded);
3395
+ border-radius: var(--sc-_rounded);
3306
3396
  }
3307
3397
 
3308
3398
  .label {
3309
- font-weight: var(--sc_label-fw);
3399
+ font-weight: bold;
3310
3400
  margin-bottom: 0.15em;
3311
3401
  display: block;
3312
3402
  }
3313
3403
 
3314
- :host([status="warning"]) {
3315
- --sc_color: var(--sc-warning, var(--sc-base-content, #000));
3316
- }
3317
- :host([status="error"]) {
3318
- --sc_color: var(--sc-danger, var(--sc-base-content, #000));
3319
- }
3320
- :host([status="info"]) {
3321
- --sc_color: var(--sc-info, var(--sc-base-content, #000));
3322
- }
3323
- :host([status="success"]) {
3324
- --sc_color: var(--sc-success, var(--sc-base-content, #000));
3325
- }
3326
-
3327
3404
  /*background*/
3328
- :host([dismissible]),
3329
3405
  :host([background]) {
3330
- background: var(--sc-base, #fff);
3331
- padding: 0.8em 1.15em;
3332
- }
3333
- :host([dismissible]):before,
3334
- :host([background]):before {
3335
- background-color: currentColor;
3336
- content: "";
3337
- display: block;
3338
- position: absolute;
3339
- left: 0;
3340
- top: 0;
3341
- right: 0;
3342
- bottom: 0;
3343
- opacity: 0.08;
3344
- border-radius: var(--sc_rounded);
3345
- pointer-events: none;
3406
+ background: color-mix(in srgb, currentColor 8%, var(--sc-base, #fff));
3407
+ padding: 0.8em;
3346
3408
  }
3347
3409
 
3348
3410
  .content {
3349
- z-index: 2;
3350
- position: relative;
3351
3411
  flex: 1;
3352
3412
  }
3353
3413
 
@@ -3355,158 +3415,116 @@ ${this.value}</textarea
3355
3415
  display: block;
3356
3416
  }
3357
3417
 
3358
- .hidden {
3359
- display: none !important;
3360
- }
3361
-
3362
3418
  /*Rounded*/
3363
3419
  :host([size="2xs"]),
3364
3420
  :host([size="xs"]),
3365
3421
  :host([size="sm"]) {
3366
- --sc_rounded: var(--sc-rounded-sm);
3422
+ --sc-_rounded: var(--sc-rounded-sm);
3367
3423
  }
3368
3424
 
3369
3425
  /*Dismissible*/
3370
- :host([dismissible]) {
3426
+ .close-btn {
3427
+ flex-shrink: 0;
3428
+ align-self: flex-start;
3429
+ border-left: var(--sc-border-width, 1px) solid currentColor;
3430
+ padding-left: 0.5em;
3431
+ margin-left: 0.5em;
3432
+ }
3433
+ :host([dismissible][background]) {
3371
3434
  padding-right: 3rem;
3372
3435
  }
3373
- :host([dismissible]) .close-btn {
3436
+ :host([dismissible][background]) .close-btn {
3374
3437
  position: absolute;
3375
3438
  top: 0.4rem;
3376
3439
  right: 0.3rem;
3440
+ border-left: none;
3377
3441
  }
3378
- `],ls([u({type:String})],Ht.prototype,"label",2),ls([u({type:Boolean,reflect:!0})],Ht.prototype,"noIcon",2),ls([u({type:String})],Ht.prototype,"text",2),ls([u({type:String})],Ht.prototype,"id",2),ls([u({type:String,reflect:!0})],Ht.prototype,"size",2),ls([u({type:Boolean,reflect:!0})],Ht.prototype,"dismissible",2),ls([u({type:Boolean,reflect:!0})],Ht.prototype,"background",2),ls([u({type:String,reflect:!0})],Ht.prototype,"status",2),ls([u({type:Boolean,reflect:!0})],Ht.prototype,"dismissForever",2),Ht=ls([X(tf)],Ht);var sf=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,ii=(t,e,s,r)=>{for(var i=r>1?void 0:r?rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&sf(e,s,i),i};const nf="sonic-alert-messages";let rr=class extends nt(J){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3379
- ${Na(this.messages,t=>t.type=="public"?R`<sonic-alert
3442
+ `],us([u({type:String})],Kt.prototype,"label",2),us([u({type:Boolean,reflect:!0})],Kt.prototype,"noIcon",2),us([u({type:String})],Kt.prototype,"text",2),us([u({type:String,reflect:!0})],Kt.prototype,"size",2),us([u({type:Boolean,reflect:!0})],Kt.prototype,"dismissible",2),us([u({type:Boolean,reflect:!0})],Kt.prototype,"background",2),us([u({type:String,reflect:!0})],Kt.prototype,"status",2),us([u({type:Boolean,reflect:!0})],Kt.prototype,"dismissForever",2),us([u({type:Boolean,reflect:!0})],Kt.prototype,"announce",2),Kt=us([Q(Uf)],Kt);var qf=Object.defineProperty,Bf=Object.getOwnPropertyDescriptor,li=(t,e,s,r)=>{for(var i=r>1?void 0:r?Bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&qf(e,s,i),i};const Hf="sonic-alert-messages";let ar=class extends kt(J){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?R`<div class="container">
3443
+ ${rl(this.messages,t=>t.type=="public"?R`<sonic-alert
3444
+ announce
3380
3445
  status=${t.status||"default"}
3381
3446
  text=${te(t.content)}
3382
3447
  size=${this.size}
3383
3448
  ?noIcon=${this.noIcon}
3384
3449
  ?background=${this.background}
3385
- ></sonic-alert>`:re)}
3386
- </div>`:re}};rr.styles=[ee`
3450
+ ></sonic-alert>`:se)}
3451
+ </div>`:se}};ar.styles=[X`
3387
3452
  .container {
3388
3453
  display: grid;
3389
3454
  gap: 0.5em;
3390
3455
  grid-template-columns: minmax(0, 1fr);
3391
3456
  width: 100%;
3392
3457
  }
3393
- `],ii([u({type:String})],rr.prototype,"size",2),ii([u({type:Boolean})],rr.prototype,"background",2),ii([u({type:Boolean})],rr.prototype,"noIcon",2),ii([u({type:Array})],rr.prototype,"messages",2),rr=ii([X(nf)],rr);var of=Object.defineProperty,af=Object.getOwnPropertyDescriptor,cl=(t,e,s,r)=>{for(var i=r>1?void 0:r?af(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&of(e,s,i),i};const lf="sonic-toast-message-subscriber";let ho=class extends nt(J){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Ce.add({text:e.content||"",status:e.status})})}render(){return re}};cl([u({type:Array})],ho.prototype,"messages",1),ho=cl([X(lf)],ho);var cf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,ni=(t,e,s,r)=>{for(var i=r>1?void 0:r?uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&cf(e,s,i),i};const hf="sonic-tooltip";let ir=class extends J{constructor(){super(),this.label="",this.disabled=!1,this.focusable=!1,this.lastKeyWasTab=!1,this.handleKeyDown=t=>{t.key==="Tab"&&(this.lastKeyWasTab=!0)},this.handleMouseDown=()=>{this.lastKeyWasTab=!1,this.classList.remove("keyboard-focus")},this.handleFocusIn=()=>{this.lastKeyWasTab&&this.classList.add("keyboard-focus"),this.lastKeyWasTab=!1},this.handleFocusOut=()=>{this.classList.remove("keyboard-focus"),this.lastKeyWasTab=!1},this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("keydown",this.boundHandleKeyDown,!0),document.addEventListener("mousedown",this.boundHandleMouseDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),document.removeEventListener("keydown",this.boundHandleKeyDown,!0),document.removeEventListener("mousedown",this.boundHandleMouseDown,!0)}willUpdate(t){if(t.has("disabled")){const e=t.get("disabled")===!0;this.disabled?(this.setAttribute("tabindex","-1"),this.classList.remove("keyboard-focus")):!this.disabled&&e&&(this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex"))}t.has("focusable")&&(this.focusable&&!this.disabled?this.setAttribute("tabindex","0"):!this.focusable&&!this.disabled&&this.removeAttribute("tabindex")),super.willUpdate(t)}render(){const t=this.disabled||this.label==""?"disabled":"";return R`<div
3394
- data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}"
3395
- class="tooltip ${t}"
3396
- >
3397
- <slot></slot>
3398
- </div>`}};ir.styles=[ee`
3458
+ `],li([u({type:String})],ar.prototype,"size",2),li([u({type:Boolean})],ar.prototype,"background",2),li([u({type:Boolean})],ar.prototype,"noIcon",2),li([u({type:Array})],ar.prototype,"messages",2),ar=li([Q(Hf)],ar);var Vf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,Il=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Vf(e,s,i),i};const Kf="sonic-toast-message-subscriber";let So=class extends kt(J){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&Se.add({text:e.content||"",status:e.status})})}render(){return se}};Il([u({type:Array})],So.prototype,"messages",1),So=Il([Q(Kf)],So);var Gf=Object.defineProperty,Yf=Object.getOwnPropertyDescriptor,Dr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Yf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Gf(e,s,i),i};const Zf="sonic-tooltip",Nl=4;let jt=class extends J{constructor(){super(...arguments),this.disabled=!1,this.focusable=!1,this.showTooltip=()=>{this.isEffectivelyDisabled||!this.bubbleEl||this.bubbleEl.matches(":popover-open")||this.bubbleEl.showPopover()},this.hideTooltip=()=>{this.bubbleEl?.matches(":popover-open")&&this.bubbleEl.hidePopover()},this.handleBeforeToggle=t=>{if(t.newState==="open"){this.stopPositioning??=kl(()=>this.computePosition());return}this.endPositioning()}}get isEffectivelyDisabled(){return this.disabled||!this.formatLabel()}formatLabel(){return(this.label??"").replaceAll("&nbsp;"," ").trim().split(`
3459
+ `).map(t=>t.trim()).join(`
3460
+ `)}computePosition(){const t=this.bubbleEl;if(!t)return;const{side:e,align:s}=Sl(this.placement,"top","center"),{x:r,y:i}=Cl({anchor:this.getBoundingClientRect(),floating:t.getBoundingClientRect(),side:e,align:s,gap:Nl,bounds:xl(this,Nl)});Object.assign(t.style,{left:`${Math.round(r)}px`,top:`${Math.round(i)}px`})}endPositioning(){this.stopPositioning?.(),this.stopPositioning=void 0}syncTabIndex(){this.disabled?this.setAttribute("tabindex","-1"):this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex")}syncNativeTitle(){if(jt.supportsPopover||this.isEffectivelyDisabled){this.removeAttribute("title");return}this.setAttribute("title",this.formatLabel().replaceAll(`
3461
+ `," "))}connectedCallback(){super.connectedCallback(),jt.supportsPopover&&(this.addEventListener("focusin",this.showTooltip),this.addEventListener("focusout",this.hideTooltip))}disconnectedCallback(){this.endPositioning(),jt.supportsPopover&&(this.removeEventListener("focusin",this.showTooltip),this.removeEventListener("focusout",this.hideTooltip)),super.disconnectedCallback()}willUpdate(t){(!this.hasUpdated||t.has("disabled")||t.has("focusable"))&&this.syncTabIndex(),(!this.hasUpdated||t.has("label")||t.has("disabled"))&&this.syncNativeTitle(),t.has("disabled")&&this.disabled&&this.hideTooltip(),t.has("label")&&this.isEffectivelyDisabled&&this.hideTooltip(),super.willUpdate(t)}render(){if(!jt.supportsPopover)return R`<slot></slot>`;const t=this.isEffectivelyDisabled?"disabled":"",e=this.formatLabel();return R`
3462
+ <slot
3463
+ @mouseenter=${this.showTooltip}
3464
+ @mouseleave=${this.hideTooltip}
3465
+ ></slot>
3466
+ <span
3467
+ popover="hint"
3468
+ class="tooltip-bubble ${t}"
3469
+ @beforetoggle=${this.handleBeforeToggle}
3470
+ >${e}</span
3471
+ >
3472
+ `}};jt.supportsPopover=Pl,jt.styles=[X`
3399
3473
  :host {
3400
- position: relative;
3401
3474
  display: inline-flex;
3402
3475
  align-items: center;
3403
3476
  text-align: center;
3404
3477
  --sc-tooltip-fw: var(--sc-font-weight-base, 400);
3405
- --sc-tooltip-position: calc(100% + 0.25rem);
3406
3478
  }
3407
3479
 
3408
- .tooltip:before {
3409
- position: absolute;
3410
- content: attr(data-tooltip-text);
3411
- font-size: 0.85rem;
3412
- display: block;
3413
- opacity: 0;
3480
+ .tooltip-bubble {
3481
+ position: fixed;
3482
+ inset: auto;
3483
+ margin: 0;
3484
+ border: none;
3414
3485
  pointer-events: none;
3486
+ font-size: 0.85rem;
3415
3487
  background: var(--sc-base-content, #000);
3416
3488
  padding: 0.32rem 0.55rem;
3417
3489
  border-radius: var(--sc-rounded);
3418
3490
  color: var(--sc-base, #fff);
3419
- z-index: 999;
3420
3491
  line-height: 1.1;
3421
3492
  width: max-content;
3422
3493
  max-width: 18rem;
3423
3494
  white-space: pre-line;
3424
3495
  font-weight: var(--sc-tooltip-fw);
3425
- transition: 0.2s;
3426
- scale: 0.9;
3427
- will-change: opacity, transform;
3496
+ opacity: 0;
3497
+ transition:
3498
+ opacity 0.2s,
3499
+ display 0.2s allow-discrete,
3500
+ overlay 0.2s allow-discrete;
3428
3501
  }
3429
3502
 
3430
- :host(:focus-visible) .tooltip:before,
3431
- :host(.keyboard-focus) .tooltip:before,
3432
- .tooltip:hover:before {
3503
+ .tooltip-bubble:popover-open {
3433
3504
  opacity: 1;
3434
- scale: 1;
3435
- }
3436
-
3437
- .disabled:before {
3438
- opacity: 0 !important;
3439
- scale: 0.9 !important;
3440
- }
3441
-
3442
- :host(:not([placement])) .tooltip:before,
3443
- :host([placement="top"]) .tooltip:before {
3444
- bottom: var(--sc-tooltip-position);
3445
- left: 50%;
3446
- transform: translateX(-50%);
3447
- }
3448
-
3449
- :host([placement="top-end"]) .tooltip:before {
3450
- bottom: var(--sc-tooltip-position);
3451
- right: 0;
3452
- }
3453
- :host([placement="top-start"]) .tooltip:before {
3454
- bottom: var(--sc-tooltip-position);
3455
- left: 0;
3456
- }
3457
-
3458
- :host([placement="bottom"]) .tooltip:before {
3459
- top: var(--sc-tooltip-position);
3460
- left: 50%;
3461
- transform: translateX(-50%);
3462
- }
3463
-
3464
- :host([placement="bottom-start"]) .tooltip:before {
3465
- top: var(--sc-tooltip-position);
3466
- left: 0;
3467
- }
3468
- :host([placement="bottom-end"]) .tooltip:before {
3469
- top: var(--sc-tooltip-position);
3470
- right: 0;
3471
- }
3472
-
3473
- :host([placement="left"]) .tooltip:before {
3474
- top: 50%;
3475
- right: var(--sc-tooltip-position);
3476
- transform: translateY(-50%);
3477
- }
3478
-
3479
- :host([placement="left-start"]) .tooltip:before {
3480
- top: 0;
3481
- right: var(--sc-tooltip-position);
3482
- }
3483
-
3484
- :host([placement="left-end"]) .tooltip:before {
3485
- bottom: 0;
3486
- right: var(--sc-tooltip-position);
3487
3505
  }
3488
3506
 
3489
- :host([placement="right"]) .tooltip:before {
3490
- top: 50%;
3491
- transform: translateY(-50%);
3492
- left: var(--sc-tooltip-position);
3507
+ @starting-style {
3508
+ .tooltip-bubble:popover-open {
3509
+ opacity: 0;
3510
+ }
3493
3511
  }
3494
3512
 
3495
- :host([placement="right-start"]) .tooltip:before {
3496
- top: 0;
3497
- left: var(--sc-tooltip-position);
3513
+ .tooltip-bubble.disabled {
3514
+ display: none !important;
3498
3515
  }
3499
3516
 
3500
- :host([placement="right-end"]) .tooltip:before {
3501
- bottom: 0;
3502
- left: var(--sc-tooltip-position);
3517
+ @media (prefers-reduced-motion: reduce) {
3518
+ .tooltip-bubble {
3519
+ transition: none;
3520
+ }
3503
3521
  }
3504
- `],ni([u({type:String})],ir.prototype,"label",2),ni([u({type:String,reflect:!0})],ir.prototype,"placement",2),ni([u({type:Boolean})],ir.prototype,"disabled",2),ni([u({type:Boolean})],ir.prototype,"focusable",2),ir=ni([X(hf)],ir);var df=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,cs=(t,e,s,r)=>{for(var i=r>1?void 0:r?pf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&df(e,s,i),i};const ff="sonic-divider";let Wt=class extends J{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(t){super.firstUpdated(t),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return R`<div part="divider">
3522
+ `],Dr([u({type:String})],jt.prototype,"label",2),Dr([u({type:String,reflect:!0})],jt.prototype,"placement",2),Dr([u({type:Boolean})],jt.prototype,"disabled",2),Dr([u({type:Boolean})],jt.prototype,"focusable",2),Dr([ms(".tooltip-bubble")],jt.prototype,"bubbleEl",2),jt=Dr([Q(Zf)],jt);var Jf=Object.defineProperty,Qf=Object.getOwnPropertyDescriptor,hs=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Jf(e,s,i),i};const Xf="sonic-divider";let Gt=class extends J{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(t){super.firstUpdated(t),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return R`<div part="divider">
3505
3523
  <span class="text"
3506
- >${je(this.label?this.label:"")}<slot></slot
3524
+ >${Be(this.label?this.label:"")}<slot></slot
3507
3525
  ></span>
3508
- </div>`}};Wt.styles=[ee`
3509
- :host {
3526
+ </div>`}};Gt.styles=[X`
3527
+ :host {
3510
3528
  --sc-divider-my: 0.5rem;
3511
3529
  --sc-divider-mx: 0;
3512
3530
  --sc-divider-border-width: max(
@@ -3636,7 +3654,7 @@ ${this.value}</textarea
3636
3654
  :host([dashed]) {
3637
3655
  --sc-divider-border-style: dashed;
3638
3656
  }
3639
- `],cs([bt({flatten:!0})],Wt.prototype,"slotNodes",2),cs([Cs("div")],Wt.prototype,"divider",2),cs([u({type:String})],Wt.prototype,"label",2),cs([u({type:String,reflect:!0})],Wt.prototype,"size",2),cs([u({type:String,reflect:!0})],Wt.prototype,"align",2),cs([u({type:Boolean,reflect:!0})],Wt.prototype,"vertical",2),cs([u({type:Boolean,reflect:!0})],Wt.prototype,"noMargin",2),cs([u({type:Boolean,reflect:!0})],Wt.prototype,"dashed",2),cs([u({type:Boolean,reflect:!0})],Wt.prototype,"dotted",2),Wt=cs([X(ff)],Wt);var gf=Object.getOwnPropertyDescriptor,bf=(t,e,s,r)=>{for(var i=r>1?void 0:r?gf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const mf="sonic-card-header-description";let po=class extends J{render(){return R`<slot></slot>`}};po.styles=[ee`
3657
+ `],hs([gt({flatten:!0})],Gt.prototype,"slotNodes",2),hs([ms("div")],Gt.prototype,"divider",2),hs([u({type:String})],Gt.prototype,"label",2),hs([u({type:String,reflect:!0})],Gt.prototype,"size",2),hs([u({type:String,reflect:!0})],Gt.prototype,"align",2),hs([u({type:Boolean,reflect:!0})],Gt.prototype,"vertical",2),hs([u({type:Boolean,reflect:!0})],Gt.prototype,"noMargin",2),hs([u({type:Boolean,reflect:!0})],Gt.prototype,"dashed",2),hs([u({type:Boolean,reflect:!0})],Gt.prototype,"dotted",2),Gt=hs([Q(Xf)],Gt);var em=Object.getOwnPropertyDescriptor,tm=(t,e,s,r)=>{for(var i=r>1?void 0:r?em(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const sm="sonic-card-header-description";let Po=class extends J{render(){return R`<slot></slot>`}};Po.styles=[X`
3640
3658
  :host() {
3641
3659
  display: block;
3642
3660
  font-size: 0.7em;
@@ -3644,19 +3662,19 @@ ${this.value}</textarea
3644
3662
  font-family: var(--sc-font-family-base, sans-serif);
3645
3663
  font-weight: var(--sc-font-style-base, normal);
3646
3664
  }
3647
- `],po=bf([X(mf)],po);var vf=Object.defineProperty,yf=Object.getOwnPropertyDescriptor,fo=(t,e,s,r)=>{for(var i=r>1?void 0:r?yf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vf(e,s,i),i};const wf="sonic-card-header";let oi=class extends J{render(){return R`
3665
+ `],Po=tm([Q(sm)],Po);var rm=Object.defineProperty,im=Object.getOwnPropertyDescriptor,xo=(t,e,s,r)=>{for(var i=r>1?void 0:r?im(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&rm(e,s,i),i};const nm="sonic-card-header";let ci=class extends J{render(){return R`
3648
3666
  <div class="header-content">
3649
- ${je(this.label)}
3667
+ ${Be(this.label)}
3650
3668
  ${this.description?R`<sonic-card-header-description
3651
- >${je(this.description)}</sonic-card-header-description
3652
- >`:re}
3669
+ >${Be(this.description)}</sonic-card-header-description
3670
+ >`:se}
3653
3671
  <slot></slot>
3654
3672
  </div>
3655
3673
  <slot name="suffix"></slot>
3656
- `}};oi.styles=[ee`
3674
+ `}};ci.styles=[X`
3657
3675
  :host {
3658
3676
  --sc-card-header-mb: 1.35rem;
3659
- --sc-card-header-font-size: 1.875rem;
3677
+ --sc-card-header-font-size: 1.5rem;
3660
3678
  --sc-card-header-font-weight: var(--sc-headings-font-weight, 700);
3661
3679
  --sc-card-header-font-style: var(--sc-headings-font-style, normal);
3662
3680
  --sc-card-header-family: var(
@@ -3688,106 +3706,23 @@ ${this.value}</textarea
3688
3706
  flex-shrink: 0;
3689
3707
  }
3690
3708
 
3709
+ ::slotted([slot="suffix"]) {
3710
+ flex-shrink: 0;
3711
+ }
3712
+
3713
+ sonic-card-header-description,
3691
3714
  ::slotted(sonic-card-header-description) {
3692
- margin-top: 0.1em;
3715
+ margin-top: 0.12em;
3693
3716
  }
3694
- `],fo([u()],oi.prototype,"label",2),fo([u()],oi.prototype,"description",2),oi=fo([X(wf)],oi);var _f=Object.getOwnPropertyDescriptor,Pf=(t,e,s,r)=>{for(var i=r>1?void 0:r?_f(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const xf="sonic-card-main";let go=class extends J{render(){return R`<slot></slot>`}};go.styles=[ee`
3717
+ `],xo([u()],ci.prototype,"label",2),xo([u()],ci.prototype,"description",2),ci=xo([Q(nm)],ci);var om=Object.getOwnPropertyDescriptor,am=(t,e,s,r)=>{for(var i=r>1?void 0:r?om(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const lm="sonic-card-main";let Ao=class extends J{render(){return R`<slot></slot>`}};Ao.styles=[X`
3695
3718
  :host {
3696
3719
  display: block;
3697
3720
  }
3698
- `],go=Pf([X(xf)],go);var Sf=Object.getOwnPropertyDescriptor,Af=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Cf="sonic-card-footer";let bo=class extends J{render(){return R` <slot></slot> `}};bo.styles=[ee`
3721
+ `],Ao=am([Q(lm)],Ao);var cm=Object.getOwnPropertyDescriptor,um=(t,e,s,r)=>{for(var i=r>1?void 0:r?cm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const hm="sonic-card-footer";let Co=class extends J{render(){return R` <slot></slot> `}};Co.styles=[X`
3699
3722
  :host {
3700
3723
  display: block;
3701
3724
  }
3702
- `],bo=Af([X(Cf)],bo);const mo=ee`
3703
- :host {
3704
- --sc-_color: inherit;
3705
- color: var(--sc-_color);
3706
- }
3707
-
3708
- :host([type="primary"]) {
3709
- --sc-_color: var(--sc-primary, var(--sc-base-content, #000));
3710
- }
3711
- :host([type="warning"]) {
3712
- --sc-_color: var(--sc-warning, var(--sc-base-content, #000));
3713
- }
3714
- :host([type="danger"]) {
3715
- --sc-_color: var(--sc-danger, var(--sc-base-content, #000));
3716
- }
3717
- :host([type="info"]) {
3718
- --sc-_color: var(--sc-info, var(--sc-base-content, #000));
3719
- }
3720
- :host([type="success"]) {
3721
- --sc-_color: var(--sc-success, var(--sc-base-content, #000));
3722
- }
3723
-
3724
- .inherit-color {
3725
- color: var(--sc-_color);
3726
- }
3727
- `,kf=ee`
3728
- :host {
3729
- --sc-_color: inherit;
3730
- --sc-_bg: inherit;
3731
- color: var(--sc-_color);
3732
- background: var(--sc-_bg);
3733
- }
3734
-
3735
- /*TYPES*/
3736
- :host([type="primary"]) {
3737
- --sc-_bg: var(--sc-primary, var(--sc-base-content, #000));
3738
- --sc-_color: var(--sc-primary-content, var(--sc-base, #fff));
3739
- }
3740
- :host([type="warning"]) {
3741
- --sc-_bg: var(--sc-warning, var(--sc-base-content, #000));
3742
- --sc-_color: var(--sc-warning-content, var(--sc-base, #fff));
3743
- }
3744
- :host([type="danger"]) {
3745
- --sc-_bg: var(--sc-danger, var(--sc-base-content, #000));
3746
- --sc-_color: var(--sc-danger-content, var(--sc-base, #fff));
3747
- }
3748
- :host([type="info"]) {
3749
- --sc-_bg: var(--sc-info, var(--sc-base-content, #000));
3750
- --sc-_color: var(--sc-info-content, var(--sc-base, #fff));
3751
- }
3752
- :host([type="success"]) {
3753
- --sc-_bg: var(--sc-success, var(--sc-base-content, #000));
3754
- --sc-_color: var(--sc-success-content, var(--sc-base, #fff));
3755
- }
3756
-
3757
- /* dans un contexte de couleur - divider color*/
3758
- :host([type="primary"]),
3759
- :host([type="warning"]),
3760
- :host([type="danger"]),
3761
- :host([type="info"]),
3762
- :host([type="success"]) {
3763
- --sc-border-color: currentColor;
3764
- --sc-divider-opacity: 0.2;
3765
- }
3766
-
3767
- :host([type="base"]) {
3768
- --sc-_bg: var(--sc-base, #fff);
3769
- --sc-_color: var(--sc-base-content, #000);
3770
- }
3771
- :host([type="default"]),
3772
- :host([type="light"]) {
3773
- --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
3774
- --sc-_color: var(--sc-base-content, #000);
3775
- }
3776
-
3777
- :host([type="neutral"]) {
3778
- --sc-_bg: var(--sc-base-content, #000);
3779
- --sc-_color: var(--sc-base, #fff);
3780
- }
3781
-
3782
- :host([type="invert"]) {
3783
- --sc-_bg: var(--sc-base-900, var(--sc-base-content, #000));
3784
- --sc-_color: var(--sc-base, #fff);
3785
- }
3786
-
3787
- .inherit-bg {
3788
- color: inherit;
3789
- }
3790
- `;var $f=Object.defineProperty,Df=Object.getOwnPropertyDescriptor,ul=(t,e,s,r)=>{for(var i=r>1?void 0:r?Df(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&$f(e,s,i),i};const Ef="sonic-card";let Xi=class extends J{constructor(){super(...arguments),this.type="base"}render(){return R`<slot></slot> `}};Xi.styles=[kf,ee`
3725
+ `],Co=um([Q(hm)],Co);var dm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,Rl=(t,e,s,r)=>{for(var i=r>1?void 0:r?pm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&dm(e,s,i),i};const fm="sonic-card";let rn=class extends J{constructor(){super(...arguments),this.type="base"}render(){return R`<slot></slot> `}};rn.styles=[Wa,X`
3791
3726
  * {
3792
3727
  box-sizing: border-box;
3793
3728
  }
@@ -3817,7 +3752,7 @@ ${this.value}</textarea
3817
3752
  box-shadow: var(--sc-_shadow);
3818
3753
  color: var(--sc-_color);
3819
3754
  }
3820
- `],ul([u({type:String,reflect:!0})],Xi.prototype,"type",2),Xi=ul([X(Ef)],Xi);var Of=Object.defineProperty,Tf=Object.getOwnPropertyDescriptor,ai=(t,e,s,r)=>{for(var i=r>1?void 0:r?Tf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Of(e,s,i),i};const Lf="sonic-tr";let nr=class extends nt(J){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return R`<slot></slot>`}};nr.styles=[mo,ee`
3755
+ `],Rl([u({type:String,reflect:!0})],rn.prototype,"type",2),rn=Rl([Q(fm)],rn);var mm=Object.defineProperty,gm=Object.getOwnPropertyDescriptor,ui=(t,e,s,r)=>{for(var i=r>1?void 0:r?gm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&mm(e,s,i),i};const bm="sonic-tr";let lr=class extends kt(J){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return R`<slot></slot>`}};lr.styles=[Xn,X`
3821
3756
  :host {
3822
3757
  display: table-row;
3823
3758
  }
@@ -3835,14 +3770,14 @@ ${this.value}</textarea
3835
3770
  :host(:hover) {
3836
3771
  background: var(--sc-table-hover-bg) !important;
3837
3772
  }
3838
- `],ai([u({type:Object})],nr.prototype,"_metadata_",2),ai([u({type:Boolean,reflect:!0})],nr.prototype,"even",2),ai([u({type:Boolean,reflect:!0})],nr.prototype,"odd",2),ai([u({type:Boolean,reflect:!0})],nr.prototype,"last",2),nr=ai([X(Lf)],nr);var Mf=Object.defineProperty,If=Object.getOwnPropertyDescriptor,or=(t,e,s,r)=>{for(var i=r>1?void 0:r?If(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Mf(e,s,i),i};const Nf="sonic-th";let ws=class extends J{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3773
+ `],ui([u({type:Object})],lr.prototype,"_metadata_",2),ui([u({type:Boolean,reflect:!0})],lr.prototype,"even",2),ui([u({type:Boolean,reflect:!0})],lr.prototype,"odd",2),ui([u({type:Boolean,reflect:!0})],lr.prototype,"last",2),lr=ui([Q(bm)],lr);var vm=Object.defineProperty,ym=Object.getOwnPropertyDescriptor,cr=(t,e,s,r)=>{for(var i=r>1?void 0:r?ym(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&vm(e,s,i),i};const wm="sonic-th";let xs=class extends J{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<th
3839
3774
  part="th"
3840
3775
  style=${$t(t)}
3841
3776
  colspan=${te(this.colSpan)}
3842
3777
  rowspan=${te(this.rowSpan)}
3843
3778
  >
3844
3779
  <slot></slot>
3845
- </th> `}};ws.styles=[mo,ee`
3780
+ </th> `}};xs.styles=[Xn,X`
3846
3781
  :host {
3847
3782
  display: contents;
3848
3783
  background: var(--sc-table-bg);
@@ -3865,9 +3800,9 @@ ${this.value}</textarea
3865
3800
  :host([noBorder]) th {
3866
3801
  border-bottom: none;
3867
3802
  }
3868
- `],or([u({type:Number})],ws.prototype,"colSpan",2),or([u({type:Number})],ws.prototype,"rowSpan",2),or([u({type:String})],ws.prototype,"align",2),or([u({type:String})],ws.prototype,"minWidth",2),or([u({type:String})],ws.prototype,"maxWidth",2),or([u({type:String})],ws.prototype,"width",2),ws=or([X(Nf)],ws);var Ff=Object.defineProperty,jf=Object.getOwnPropertyDescriptor,Rs=(t,e,s,r)=>{for(var i=r>1?void 0:r?jf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ff(e,s,i),i};const Rf="sonic-td";let us=class extends J{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td part="td" style=${$t(t)} colspan=${te(this.colSpan)} rowspan=${te(this.rowSpan)}>
3803
+ `],cr([u({type:Number})],xs.prototype,"colSpan",2),cr([u({type:Number})],xs.prototype,"rowSpan",2),cr([u({type:String})],xs.prototype,"align",2),cr([u({type:String})],xs.prototype,"minWidth",2),cr([u({type:String})],xs.prototype,"maxWidth",2),cr([u({type:String})],xs.prototype,"width",2),xs=cr([Q(wm)],xs);var _m=Object.defineProperty,Sm=Object.getOwnPropertyDescriptor,Bs=(t,e,s,r)=>{for(var i=r>1?void 0:r?Sm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&_m(e,s,i),i};const Pm="sonic-td";let ds=class extends J{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return R`<td part="td" style=${$t(t)} colspan=${te(this.colSpan)} rowspan=${te(this.rowSpan)}>
3869
3804
  <slot></slot>
3870
- </td>`}};us.styles=[mo,ee`
3805
+ </td>`}};ds.styles=[Xn,X`
3871
3806
  :host {
3872
3807
  display: contents;
3873
3808
  }
@@ -3880,13 +3815,13 @@ ${this.value}</textarea
3880
3815
  border-right: var(--sc-table-td-border-r, none);
3881
3816
  border-left: var(--sc-table-td-border-l, none);
3882
3817
  }
3883
- `],Rs([u({type:Number})],us.prototype,"colSpan",2),Rs([u({type:Number})],us.prototype,"rowSpan",2),Rs([u({type:String})],us.prototype,"align",2),Rs([u({type:String})],us.prototype,"vAlign",2),Rs([u({type:String})],us.prototype,"minWidth",2),Rs([u({type:String})],us.prototype,"maxWidth",2),Rs([u({type:String})],us.prototype,"width",2),us=Rs([X(Rf)],us);var zf=Object.getOwnPropertyDescriptor,Uf=(t,e,s,r)=>{for(var i=r>1?void 0:r?zf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const qf="sonic-thead";let vo=class extends J{render(){return R`<slot></slot>`}};vo.styles=[ee`
3818
+ `],Bs([u({type:Number})],ds.prototype,"colSpan",2),Bs([u({type:Number})],ds.prototype,"rowSpan",2),Bs([u({type:String})],ds.prototype,"align",2),Bs([u({type:String})],ds.prototype,"vAlign",2),Bs([u({type:String})],ds.prototype,"minWidth",2),Bs([u({type:String})],ds.prototype,"maxWidth",2),Bs([u({type:String})],ds.prototype,"width",2),ds=Bs([Q(Pm)],ds);var xm=Object.getOwnPropertyDescriptor,Am=(t,e,s,r)=>{for(var i=r>1?void 0:r?xm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Cm="sonic-thead";let ko=class extends J{render(){return R`<slot></slot>`}};ko.styles=[X`
3884
3819
  :host {
3885
3820
  display: table-header-group;
3886
3821
  }
3887
- `],vo=Uf([X(qf)],vo);var Vf=Object.getOwnPropertyDescriptor,Bf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Hf="sonic-tbody";let yo=class extends J{render(){return R`<tbody part="tbody">
3822
+ `],ko=Am([Q(Cm)],ko);var km=Object.getOwnPropertyDescriptor,$m=(t,e,s,r)=>{for(var i=r>1?void 0:r?km(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Dm="sonic-tbody";let $o=class extends J{render(){return R`<tbody part="tbody">
3888
3823
  <slot></slot>
3889
- </tbody>`}};yo.styles=[ee`
3824
+ </tbody>`}};$o.styles=[X`
3890
3825
  :host {
3891
3826
  display: table-row-group;
3892
3827
  }
@@ -3903,20 +3838,20 @@ ${this.value}</textarea
3903
3838
  border-bottom: var(--sc-form-border-width) solid
3904
3839
  var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
3905
3840
  }
3906
- `],yo=Bf([X(Hf)],yo);var Wf=Object.getOwnPropertyDescriptor,Kf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Wf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Yf="sonic-tfoot";let wo=class extends J{render(){return R`<tfoot>
3841
+ `],$o=$m([Q(Dm)],$o);var Em=Object.getOwnPropertyDescriptor,Om=(t,e,s,r)=>{for(var i=r>1?void 0:r?Em(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Tm="sonic-tfoot";let Do=class extends J{render(){return R`<tfoot>
3907
3842
  <slot></slot>
3908
- </tfoot>`}};wo.styles=[ee`
3843
+ </tfoot>`}};Do.styles=[X`
3909
3844
  :host {
3910
3845
  display: contents;
3911
3846
  }
3912
- `],wo=Kf([X(Yf)],wo);var Gf=Object.getOwnPropertyDescriptor,Zf=(t,e,s,r)=>{for(var i=r>1?void 0:r?Gf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Jf="sonic-caption";let _o=class extends J{render(){return R`<slot></slot>`}};_o.styles=[ee`
3847
+ `],Do=Om([Q(Tm)],Do);var Lm=Object.getOwnPropertyDescriptor,Mm=(t,e,s,r)=>{for(var i=r>1?void 0:r?Lm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Fm="sonic-caption";let Eo=class extends J{render(){return R`<slot></slot>`}};Eo.styles=[X`
3913
3848
  :host {
3914
3849
  display: table-caption;
3915
3850
  font-size: 0.75rem;
3916
3851
  color: var(--sc-table-caption-color);
3917
3852
  padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3918
3853
  }
3919
- `],_o=Zf([X(Jf)],_o);var Xf=Object.defineProperty,Qf=Object.getOwnPropertyDescriptor,Cr=(t,e,s,r)=>{for(var i=r>1?void 0:r?Qf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Xf(e,s,i),i};const eg="sonic-table";let zs=class extends J{render(){const t={maxHeight:this.maxHeight};return R`
3854
+ `],Eo=Mm([Q(Fm)],Eo);var Im=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,Er=(t,e,s,r)=>{for(var i=r>1?void 0:r?Nm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Im(e,s,i),i};const Rm="sonic-table";let Hs=class extends J{render(){const t={maxHeight:this.maxHeight};return R`
3920
3855
  <div
3921
3856
  class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
3922
3857
  style=${$t(t)}
@@ -3925,7 +3860,7 @@ ${this.value}</textarea
3925
3860
  <slot></slot>
3926
3861
  </div>
3927
3862
  </div>
3928
- `}};zs.styles=[Yr,ss,ee`
3863
+ `}};Hs.styles=[Qr,rs,X`
3929
3864
  :host {
3930
3865
  --sc-table-fw: var(--sc-font-weight-base, 400);
3931
3866
  --sc-table-fst: var(--sc-font-style-base, normal);
@@ -3970,7 +3905,7 @@ ${this.value}</textarea
3970
3905
  --sc-table-td-border-b: var(--sc-table-bw) solid
3971
3906
  var(--sc-table-border-color);
3972
3907
  }
3973
- `],Cr([u({type:String,reflect:!0})],zs.prototype,"size",2),Cr([u({type:Boolean,reflect:!0})],zs.prototype,"bordered",2),Cr([u({type:Boolean,reflect:!0})],zs.prototype,"rounded",2),Cr([u({type:Boolean,reflect:!0})],zs.prototype,"noCustomScroll",2),Cr([u({type:String})],zs.prototype,"maxHeight",2),zs=Cr([X(eg)],zs);const hl="AES-CBC",tg=256;async function sg(){return crypto.subtle.generateKey({name:hl,length:tg},!0,["encrypt","decrypt"])}function rg(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function ig(t,e,s){const r=new TextEncoder().encode(t),i=await crypto.subtle.encrypt({name:hl,iv:s.buffer},e,r);return rg(i)}const ng=ee`
3908
+ `],Er([u({type:String,reflect:!0})],Hs.prototype,"size",2),Er([u({type:Boolean,reflect:!0})],Hs.prototype,"bordered",2),Er([u({type:Boolean,reflect:!0})],Hs.prototype,"rounded",2),Er([u({type:Boolean,reflect:!0})],Hs.prototype,"noCustomScroll",2),Er([u({type:String})],Hs.prototype,"maxHeight",2),Hs=Er([Q(Rm)],Hs);const jl="AES-CBC",jm=256;async function zm(){return crypto.subtle.generateKey({name:jl,length:jm},!0,["encrypt","decrypt"])}function Um(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function qm(t,e,s){const r=new TextEncoder().encode(t),i=await crypto.subtle.encrypt({name:jl,iv:s.buffer},e,r);return Um(i)}const Bm=X`
3974
3909
  @keyframes altcha-spinner {
3975
3910
  to {
3976
3911
  transform: rotate(360deg);
@@ -4193,7 +4128,7 @@ ${this.value}</textarea
4193
4128
  animation: altcha-spinner 0.75s infinite linear;
4194
4129
  transform-origin: center;
4195
4130
  }
4196
- `;var og=Object.defineProperty,ag=Object.getOwnPropertyDescriptor,Qi=(t,e,s,r)=>{for(var i=r>1?void 0:r?ag(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&og(e,s,i),i};const lg="supersoniks_altcha",cg="Si2\\]X8M4!n9DCLd";let dl=!1;const ug="sonic-captcha";let kr=class extends Ts(J){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!dl){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",dl=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=mi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await sg(),e=new TextEncoder().encode(cg),s=await ig(lg,t,e);this.key=s}render(){if(!this.key)return re;const e=gs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return R`
4131
+ `;var Hm=Object.defineProperty,Vm=Object.getOwnPropertyDescriptor,nn=(t,e,s,r)=>{for(var i=r>1?void 0:r?Vm(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Hm(e,s,i),i};const Wm="supersoniks_altcha",Km="Si2\\]X8M4!n9DCLd";let zl=!1;const Gm="sonic-captcha";let Or=class extends Fs(J){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!zl){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",zl=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=wi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await zm(),e=new TextEncoder().encode(Km),s=await qm(Wm,t,e);this.key=s}render(){if(!this.key)return se;const e=vs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return R`
4197
4132
  <form>
4198
4133
  <altcha-widget
4199
4134
  challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
@@ -4205,7 +4140,7 @@ ${this.value}</textarea
4205
4140
  ></altcha-widget>
4206
4141
  </form>
4207
4142
  <slot></slot>
4208
- `}};kr.styles=[ng,ee`
4143
+ `}};Or.styles=[Bm,X`
4209
4144
  :host {
4210
4145
  --altcha-border-width: var(--sc-border-width, 1px);
4211
4146
  --altcha-border-radius: var(--sc-rounded);
@@ -4224,4 +4159,4 @@ ${this.value}</textarea
4224
4159
  --altcha-color-footer-bg: var(--sc-base-100, #000);
4225
4160
  --altcha-max-width: 260px;
4226
4161
  }
4227
- `],Qi([u()],kr.prototype,"key",2),Qi([u()],kr.prototype,"action",2),Qi([u({type:Number})],kr.prototype,"zIndex",2),kr=Qi([X(ug)],kr),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class hg extends Pn{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return ya(e)?e.path:e}render(e){const s=this.normalizeInput(e),r=this.pathTemplate!==s;return r&&(this.pathTemplate=s,this.teardownWatchers()),(r||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),Nt}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const r=Ut(s);if(r.length>0)for(const i of r)this.cleanupWatchers.push(Es(Fi.watcherStore,Fi.hooked,e,i,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const r=Ut(s).length>0;let i=s;if(r)if(!e)i=null;else{const n=Ot(e,s);i=n.ready?n.path:null}if(i!==this.resolvedPath){if(!i){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=i,this.subscribe(i)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=gi(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const pl=$s(hg),dg=pl,pg=pl;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:mi,dataProvider:$l,sub:pg,subscribe:dg,get:kl,set:Dl};const fg=Ce,gg=Ee;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:fg,SonicModal:gg};const bg=window;bg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));
4162
+ `],nn([u()],Or.prototype,"key",2),nn([u()],Or.prototype,"action",2),nn([u({type:Number})],Or.prototype,"zIndex",2),Or=nn([Q(Gm)],Or),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class Ym extends kn{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return $a(e)?e.path:e}render(e){const s=this.normalizeInput(e),r=this.pathTemplate!==s;return r&&(this.pathTemplate=s,this.teardownWatchers()),(r||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),Nt}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const r=Bt(s);if(r.length>0)for(const i of r)this.cleanupWatchers.push(Ls(zi.watcherStore,zi.hooked,e,i,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const r=Bt(s).length>0;let i=s;if(r)if(!e)i=null;else{const n=Ot(e,s);i=n.ready?n.path:null}if(i!==this.resolvedPath){if(!i){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=i,this.subscribe(i)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=vi(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const Ul=Os(Ym),Zm=Ul,Jm=Ul;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:wi,dataProvider:sc,sub:Jm,subscribe:Zm,get:tc,set:rc};const Qm=Se,Xm=Oe;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Qm,SonicModal:Xm};const eg=window;eg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));