@supersoniks/concorde 5.1.0 → 5.1.2

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 (628) hide show
  1. package/.agents/skills/concorde-docs/SKILL.md +153 -0
  2. package/.agents/skills/{concorde-component-docs/template.md → concorde-docs/templates/component.md} +6 -2
  3. package/.agents/skills/concorde-docs/templates/decorator.md +43 -0
  4. package/.agents/skills/concorde-docs/templates/guide.md +25 -0
  5. package/.claude/launch.json +15 -0
  6. package/.claude/vite.http.config.mjs +7 -0
  7. package/.taste-skill/after/desktop-fold.jpg +0 -0
  8. package/.taste-skill/after/desktop-page-01.jpg +0 -0
  9. package/.taste-skill/after/desktop-page-02.jpg +0 -0
  10. package/.taste-skill/after/desktop-page-03.jpg +0 -0
  11. package/.taste-skill/after/mobile-fold.jpg +0 -0
  12. package/.taste-skill/after/mobile-page-01.jpg +0 -0
  13. package/.taste-skill/after/report.json +4103 -0
  14. package/.taste-skill/after/tablet-fold.jpg +0 -0
  15. package/.taste-skill/after/tablet-page-01.jpg +0 -0
  16. package/.taste-skill/after/tablet-page-02.jpg +0 -0
  17. package/.taste-skill/before/desktop-fold.jpg +0 -0
  18. package/.taste-skill/before/desktop-page-01.jpg +0 -0
  19. package/.taste-skill/before/desktop-page-02.jpg +0 -0
  20. package/.taste-skill/before/mobile-fold.jpg +0 -0
  21. package/.taste-skill/before/mobile-page-01.jpg +0 -0
  22. package/.taste-skill/before/report.json +2556 -0
  23. package/.taste-skill/before/tablet-fold.jpg +0 -0
  24. package/.taste-skill/before/tablet-page-01.jpg +0 -0
  25. package/.taste-skill/direction.json +510 -0
  26. package/.taste-skill/notes.md +84 -0
  27. package/.taste-skill/prod/desktop-fold.jpg +0 -0
  28. package/.taste-skill/prod/desktop-page-01.jpg +0 -0
  29. package/.taste-skill/prod/desktop-page-02.jpg +0 -0
  30. package/.taste-skill/prod/desktop-page-03.jpg +0 -0
  31. package/.taste-skill/prod/mobile-fold.jpg +0 -0
  32. package/.taste-skill/prod/mobile-page-01.jpg +0 -0
  33. package/.taste-skill/prod/mobile-page-02.jpg +0 -0
  34. package/.taste-skill/prod/report.json +1973 -0
  35. package/.taste-skill/prod/tablet-fold.jpg +0 -0
  36. package/.taste-skill/prod/tablet-page-01.jpg +0 -0
  37. package/.taste-skill/prod/tablet-page-02.jpg +0 -0
  38. package/.tmp-cem/custom-elements.json +2013 -2013
  39. package/AUDIT.md +228 -0
  40. package/PLAN-AMELIORATION.md +220 -0
  41. package/PLAN-DOCS-AGENTS.md +80 -0
  42. package/README.md +3 -3
  43. package/ai/skills/concorde/SKILL.md +1 -1
  44. package/ai/skills/concorde-get-set-dp/SKILL.md +3 -3
  45. package/ai/skills/concorde-theme/SKILL.md +1 -1
  46. package/build-infos.json +1 -1
  47. package/concorde-core.bundle.js +16 -16
  48. package/concorde-core.es.js +235 -233
  49. package/dist/concorde-core.bundle.js +16 -16
  50. package/dist/concorde-core.es.js +235 -233
  51. package/dist/img/archive/concorde-001-2cv.webp +0 -0
  52. package/dist/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
  53. package/dist/img/archive/concorde-red-arrows-2002.webm +0 -0
  54. package/dist/img/archive/credits.json +28 -0
  55. package/docs/.htaccess +75 -0
  56. package/docs/404.html +15 -0
  57. package/docs/404.md +5 -0
  58. package/docs/assets/index-BgG6FFPt.js +11765 -0
  59. package/docs/assets/index-x89XINSG.css +1 -0
  60. package/docs/core/components/functional/date/date.html +211 -0
  61. package/docs/core/components/functional/date/date.md +150 -0
  62. package/docs/core/components/functional/fetch/fetch.html +180 -0
  63. package/docs/core/components/functional/fetch/fetch.md +108 -0
  64. package/docs/core/components/functional/if/if.html +65 -0
  65. package/docs/core/components/functional/if/if.md +34 -0
  66. package/docs/core/components/functional/jsonata/jsonata.html +110 -0
  67. package/docs/core/components/functional/jsonata/jsonata.md +61 -0
  68. package/docs/core/components/functional/list/list.html +198 -0
  69. package/docs/core/components/functional/list/list.md +121 -0
  70. package/docs/core/components/functional/mix/mix.html +78 -0
  71. package/docs/core/components/functional/mix/mix.md +46 -0
  72. package/docs/core/components/functional/queue/queue.html +155 -0
  73. package/docs/core/components/functional/queue/queue.md +51 -0
  74. package/docs/core/components/functional/router/router.html +154 -0
  75. package/docs/core/components/functional/router/router.md +93 -0
  76. package/docs/core/components/functional/sdui/sdui-extension-points.html +127 -0
  77. package/docs/core/components/functional/sdui/sdui-extension-points.md +94 -0
  78. package/docs/core/components/functional/sdui/sdui.html +397 -0
  79. package/docs/core/components/functional/sdui/sdui.md +307 -0
  80. package/docs/core/components/functional/states/states.html +141 -0
  81. package/docs/core/components/functional/states/states.md +112 -0
  82. package/docs/core/components/functional/submit/submit.html +178 -0
  83. package/docs/core/components/functional/submit/submit.md +106 -0
  84. package/docs/{crawl/core → core}/components/functional/subscriber/subscriber.html +6 -5
  85. package/docs/core/components/functional/subscriber/subscriber.md +91 -0
  86. package/docs/core/components/functional/translation/translation.html +60 -0
  87. package/docs/core/components/functional/translation/translation.md +38 -0
  88. package/docs/core/components/functional/value/value.html +81 -0
  89. package/docs/core/components/functional/value/value.md +47 -0
  90. package/docs/core/components/ui/alert/alert.html +201 -0
  91. package/docs/core/components/ui/alert/alert.md +186 -0
  92. package/docs/core/components/ui/alert-messages/alert-messages.html +132 -0
  93. package/docs/core/components/ui/alert-messages/alert-messages.md +85 -0
  94. package/docs/core/components/ui/badge/badge.html +197 -0
  95. package/docs/core/components/ui/badge/badge.md +181 -0
  96. package/docs/core/components/ui/button/button.html +309 -0
  97. package/docs/core/components/ui/button/button.md +216 -0
  98. package/docs/core/components/ui/captcha/captcha.html +80 -0
  99. package/docs/core/components/ui/captcha/captcha.md +56 -0
  100. package/docs/core/components/ui/card/card.html +254 -0
  101. package/docs/core/components/ui/card/card.md +215 -0
  102. package/docs/core/components/ui/divider/divider.html +144 -0
  103. package/docs/core/components/ui/divider/divider.md +126 -0
  104. package/docs/core/components/ui/form/checkbox/checkbox.html +200 -0
  105. package/docs/core/components/ui/form/checkbox/checkbox.md +125 -0
  106. package/docs/core/components/ui/form/fieldset/fieldset.html +238 -0
  107. package/docs/core/components/ui/form/fieldset/fieldset.md +161 -0
  108. package/docs/core/components/ui/form/form-actions/form-actions.html +122 -0
  109. package/docs/core/components/ui/form/form-actions/form-actions.md +98 -0
  110. package/docs/core/components/ui/form/form-layout/form-layout.html +115 -0
  111. package/docs/core/components/ui/form/form-layout/form-layout.md +109 -0
  112. package/docs/core/components/ui/form/input/input.html +235 -0
  113. package/docs/core/components/ui/form/input/input.md +142 -0
  114. package/docs/core/components/ui/form/radio/radio.html +144 -0
  115. package/docs/core/components/ui/form/radio/radio.md +78 -0
  116. package/docs/core/components/ui/form/select/select.html +178 -0
  117. package/docs/core/components/ui/form/select/select.md +86 -0
  118. package/docs/core/components/ui/form/switch/switch.html +146 -0
  119. package/docs/core/components/ui/form/switch/switch.md +80 -0
  120. package/docs/core/components/ui/form/textarea/textarea.html +162 -0
  121. package/docs/core/components/ui/form/textarea/textarea.md +82 -0
  122. package/docs/core/components/ui/group/group.html +113 -0
  123. package/docs/core/components/ui/group/group.md +77 -0
  124. package/docs/core/components/ui/icon/icon.html +223 -0
  125. package/docs/core/components/ui/icon/icon.md +214 -0
  126. package/docs/core/components/ui/image/image.html +194 -0
  127. package/docs/core/components/ui/image/image.md +167 -0
  128. package/docs/core/components/ui/link/link.html +101 -0
  129. package/docs/core/components/ui/link/link.md +81 -0
  130. package/docs/core/components/ui/loader/loader.html +114 -0
  131. package/docs/core/components/ui/loader/loader.md +87 -0
  132. package/docs/{crawl/core → core}/components/ui/menu/menu.html +189 -116
  133. package/docs/core/components/ui/menu/menu.md +370 -0
  134. package/docs/core/components/ui/modal/modal.html +324 -0
  135. package/docs/core/components/ui/modal/modal.md +211 -0
  136. package/docs/core/components/ui/pop/pop.html +250 -0
  137. package/docs/core/components/ui/pop/pop.md +216 -0
  138. package/docs/core/components/ui/progress/progress.html +132 -0
  139. package/docs/core/components/ui/progress/progress.md +109 -0
  140. package/docs/core/components/ui/table/table.html +333 -0
  141. package/docs/core/components/ui/table/table.md +267 -0
  142. package/docs/core/components/ui/theme/theme.html +116 -0
  143. package/docs/core/components/ui/theme/theme.md +97 -0
  144. package/docs/core/components/ui/toast/toast.html +185 -0
  145. package/docs/core/components/ui/toast/toast.md +147 -0
  146. package/docs/core/components/ui/tooltip/tooltip.html +112 -0
  147. package/docs/core/components/ui/tooltip/tooltip.md +89 -0
  148. package/docs/docs/decorators/ancestor-attribute.html +71 -0
  149. package/docs/docs/decorators/ancestor-attribute.md +59 -0
  150. package/docs/docs/decorators/auto-subscribe.html +61 -0
  151. package/docs/docs/decorators/auto-subscribe.md +40 -0
  152. package/docs/docs/decorators/bind.html +86 -0
  153. package/docs/docs/decorators/bind.md +77 -0
  154. package/docs/docs/decorators/get.html +166 -0
  155. package/docs/docs/decorators/get.md +160 -0
  156. package/docs/docs/decorators/handle.html +139 -0
  157. package/docs/docs/decorators/handle.md +119 -0
  158. package/docs/docs/decorators/on-assign.html +72 -0
  159. package/docs/docs/decorators/on-assign.md +63 -0
  160. package/docs/docs/decorators/patch.html +76 -0
  161. package/docs/docs/decorators/patch.md +44 -0
  162. package/docs/docs/decorators/post.html +150 -0
  163. package/docs/docs/decorators/post.md +134 -0
  164. package/docs/docs/decorators/publish.html +74 -0
  165. package/docs/docs/decorators/publish.md +56 -0
  166. package/docs/docs/decorators/put.html +83 -0
  167. package/docs/docs/decorators/put.md +51 -0
  168. package/docs/docs/decorators/subscribe.html +91 -0
  169. package/docs/docs/decorators/subscribe.md +87 -0
  170. package/docs/docs/decorators/wait-for-ancestors.html +82 -0
  171. package/docs/docs/decorators/wait-for-ancestors.md +76 -0
  172. package/docs/docs/directives/sub.html +79 -0
  173. package/docs/docs/directives/sub.md +75 -0
  174. package/docs/docs/directives/t.html +91 -0
  175. package/docs/docs/directives/t.md +73 -0
  176. package/docs/{crawl/docs/_getting-started → docs/getting-started}/ai-agents.html +12 -11
  177. package/{src/docs/_getting-started → docs/docs/getting-started}/ai-agents.md +3 -3
  178. package/docs/docs/getting-started/components.html +27 -0
  179. package/docs/docs/getting-started/components.md +5 -0
  180. package/docs/{crawl/docs/_getting-started → docs/getting-started}/create-a-component.html +11 -14
  181. package/docs/{src/docs/_getting-started → docs/getting-started}/create-a-component.md +3 -6
  182. package/docs/{crawl/docs/_core-concept → docs/getting-started}/dataFlow.html +26 -29
  183. package/docs/{src/docs/_core-concept → docs/getting-started}/dataFlow.md +17 -18
  184. package/docs/docs/getting-started/installation.html +69 -0
  185. package/docs/docs/getting-started/installation.md +36 -0
  186. package/docs/{crawl/docs/_getting-started → docs/getting-started}/my-first-component.html +13 -22
  187. package/docs/{src/docs/_getting-started → docs/getting-started}/my-first-component.md +5 -14
  188. package/docs/docs/getting-started/start.html +47 -0
  189. package/{src/docs/_getting-started → docs/docs/getting-started}/start.md +1 -13
  190. package/docs/docs/getting-started/theming.html +334 -0
  191. package/{src/docs/_getting-started → docs/docs/getting-started}/theming.md +2 -2
  192. package/docs/docs/index.html +99 -0
  193. package/docs/{crawl/docs/_misc → docs/misc}/api-configuration.html +18 -18
  194. package/docs/{src/docs/_misc → docs/misc}/api-configuration.md +10 -12
  195. package/docs/{crawl/docs/_misc → docs/misc}/dataProviderKey.html +12 -11
  196. package/{src/docs/_misc → docs/docs/misc}/dataProviderKey.md +4 -4
  197. package/docs/{crawl/docs/_misc → docs/misc}/docs-mock-api.html +25 -28
  198. package/docs/{src/docs/_misc → docs/misc}/docs-mock-api.md +12 -13
  199. package/docs/{crawl/docs/_misc → docs/misc}/dynamic-path.html +16 -15
  200. package/{src/docs/_misc → docs/docs/misc}/dynamic-path.md +8 -8
  201. package/docs/{crawl/docs/_misc → docs/misc}/endpoint.html +16 -15
  202. package/{src/docs/_misc → docs/docs/misc}/endpoint.md +8 -8
  203. package/docs/{crawl/docs/_misc → docs/misc}/html-integration.html +12 -15
  204. package/docs/{src/docs/_misc → docs/misc}/html-integration.md +4 -5
  205. package/docs/docs-mock-api-sw.js +60 -223
  206. package/docs/docs-mock-api-sw.js.map +4 -4
  207. package/docs/hubs/decorators.html +443 -0
  208. package/docs/hubs/form-components.html +404 -0
  209. package/docs/hubs/remote-data.html +371 -0
  210. package/docs/img/archive/concorde-001-2cv.webp +0 -0
  211. package/docs/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
  212. package/docs/img/archive/concorde-red-arrows-2002.webm +0 -0
  213. package/docs/img/archive/credits.json +28 -0
  214. package/docs/img/concorde/plane_01.jpg +0 -0
  215. package/docs/img/concorde/plane_02.jpg +0 -0
  216. package/docs/img/concorde/plane_03.jpg +0 -0
  217. package/docs/img/concorde/plane_04.jpg +0 -0
  218. package/docs/img/concorde/plane_05.jpg +0 -0
  219. package/docs/img/concorde/plane_06.jpg +0 -0
  220. package/docs/img/concorde/plane_07.jpg +0 -0
  221. package/docs/img/concorde/plane_08.jpg +0 -0
  222. package/docs/img/concorde/plane_09.jpg +0 -0
  223. package/docs/img/concorde/plane_10.jpg +0 -0
  224. package/docs/img/concorde/plane_11.jpg +0 -0
  225. package/docs/img/concorde/plane_12.jpg +0 -0
  226. package/docs/img/concorde/plane_13.jpg +0 -0
  227. package/docs/index.html +96 -67
  228. package/docs/index.md +22 -0
  229. package/docs/llms-full.txt +3329 -3295
  230. package/docs/llms.txt +94 -92
  231. package/docs/robots.txt +11 -10
  232. package/docs/sitemap.xml +78 -78
  233. package/docs/src/core/components/functional/date/date.md +91 -231
  234. package/docs/src/core/components/functional/fetch/fetch.md +66 -83
  235. package/docs/src/core/components/functional/if/if.md +28 -3
  236. package/docs/src/core/components/functional/jsonata/jsonata.md +42 -37
  237. package/docs/src/core/components/functional/list/list.md +99 -43
  238. package/docs/src/core/components/functional/mix/mix.md +31 -26
  239. package/docs/src/core/components/functional/queue/queue.md +40 -61
  240. package/docs/src/core/components/functional/router/router.md +64 -65
  241. package/docs/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
  242. package/docs/src/core/components/functional/sdui/component-catalog.json +3103 -0
  243. package/docs/src/core/components/functional/sdui/example.json +19 -86
  244. package/docs/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
  245. package/docs/src/core/components/functional/sdui/sdui.md +196 -245
  246. package/docs/src/core/components/functional/states/states.md +86 -61
  247. package/docs/src/core/components/functional/submit/submit.md +64 -72
  248. package/docs/src/core/components/functional/translation/translation.md +38 -0
  249. package/docs/src/core/components/functional/value/value.md +34 -22
  250. package/docs/src/core/components/ui/alert/alert.md +139 -74
  251. package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  252. package/docs/src/core/components/ui/badge/badge.md +137 -83
  253. package/docs/src/core/components/ui/button/button.md +139 -105
  254. package/docs/src/core/components/ui/captcha/captcha.md +50 -6
  255. package/docs/src/core/components/ui/card/card.md +183 -65
  256. package/docs/src/core/components/ui/divider/divider.md +104 -13
  257. package/docs/src/core/components/ui/form/checkbox/checkbox.md +90 -42
  258. package/docs/src/core/components/ui/form/fieldset/fieldset.md +135 -103
  259. package/docs/src/core/components/ui/form/form-actions/form-actions.md +71 -50
  260. package/docs/src/core/components/ui/form/form-layout/form-layout.md +99 -34
  261. package/docs/src/core/components/ui/form/input/input.md +95 -95
  262. package/docs/src/core/components/ui/form/radio/radio.md +55 -34
  263. package/docs/src/core/components/ui/form/select/select.md +60 -45
  264. package/docs/src/core/components/ui/form/switch/switch.md +57 -34
  265. package/docs/src/core/components/ui/form/textarea/textarea.md +55 -38
  266. package/docs/src/core/components/ui/group/group.md +49 -47
  267. package/docs/src/core/components/ui/icon/icon.md +132 -43
  268. package/docs/src/core/components/ui/image/image.md +132 -72
  269. package/docs/src/core/components/ui/link/link.md +46 -8
  270. package/docs/src/core/components/ui/loader/loader.md +55 -23
  271. package/docs/src/core/components/ui/menu/menu.md +155 -114
  272. package/docs/src/core/components/ui/modal/modal.md +154 -62
  273. package/docs/src/core/components/ui/pop/pop.md +185 -65
  274. package/docs/src/core/components/ui/progress/progress.md +76 -30
  275. package/docs/src/core/components/ui/table/table.md +146 -334
  276. package/docs/src/core/components/ui/theme/theme.md +97 -0
  277. package/docs/src/core/components/ui/toast/toast.md +80 -99
  278. package/docs/src/core/components/ui/tooltip/tooltip.md +52 -45
  279. package/docs/src/docs/decorators/ancestor-attribute.md +59 -0
  280. package/docs/src/docs/decorators/auto-subscribe.md +40 -0
  281. package/docs/src/docs/decorators/bind.md +77 -0
  282. package/docs/src/docs/decorators/get.md +160 -0
  283. package/docs/src/docs/decorators/handle.md +119 -0
  284. package/docs/src/docs/decorators/on-assign.md +63 -0
  285. package/docs/src/docs/decorators/patch.md +44 -0
  286. package/docs/src/docs/decorators/post.md +134 -0
  287. package/docs/src/docs/decorators/publish.md +56 -0
  288. package/docs/src/docs/decorators/put.md +51 -0
  289. package/docs/src/docs/decorators/subscribe.md +87 -0
  290. package/docs/src/docs/decorators/wait-for-ancestors.md +76 -0
  291. package/docs/src/docs/directives/sub.md +75 -0
  292. package/docs/src/docs/directives/t.md +73 -0
  293. package/docs/src/docs/{_getting-started → getting-started}/ai-agents.md +3 -3
  294. package/docs/src/docs/getting-started/components.md +5 -0
  295. package/{src/docs/_getting-started → docs/src/docs/getting-started}/create-a-component.md +3 -6
  296. package/{src/docs/_core-concept → docs/src/docs/getting-started}/dataFlow.md +17 -18
  297. package/docs/src/docs/getting-started/installation.md +36 -0
  298. package/{src/docs/_getting-started → docs/src/docs/getting-started}/my-first-component.md +5 -14
  299. package/docs/src/docs/getting-started/start.md +35 -0
  300. package/docs/src/docs/getting-started/theming.md +253 -0
  301. package/{src/docs/_misc → docs/src/docs/misc}/api-configuration.md +10 -12
  302. package/docs/src/docs/{_misc → misc}/dataProviderKey.md +4 -4
  303. package/{src/docs/_misc → docs/src/docs/misc}/docs-mock-api.md +12 -13
  304. package/docs/src/docs/{_misc → misc}/dynamic-path.md +8 -8
  305. package/docs/src/docs/{_misc → misc}/endpoint.md +8 -8
  306. package/{src/docs/_misc → docs/src/docs/misc}/html-integration.md +4 -5
  307. package/docs/src/docs/search/docs-search.json +3729 -2949
  308. package/docs/src/tsconfig.json +176 -5
  309. package/index.html +94 -67
  310. package/package.json +11 -4
  311. package/public/docs-mock-api-sw.js +58 -223
  312. package/public/docs-mock-api-sw.js.map +4 -4
  313. package/public/img/archive/concorde-001-2cv.webp +0 -0
  314. package/public/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
  315. package/public/img/archive/concorde-red-arrows-2002.webm +0 -0
  316. package/public/img/archive/credits.json +28 -0
  317. package/public/img/concorde/plane_01.jpg +0 -0
  318. package/public/img/concorde/plane_02.jpg +0 -0
  319. package/public/img/concorde/plane_03.jpg +0 -0
  320. package/public/img/concorde/plane_04.jpg +0 -0
  321. package/public/img/concorde/plane_05.jpg +0 -0
  322. package/public/img/concorde/plane_06.jpg +0 -0
  323. package/public/img/concorde/plane_07.jpg +0 -0
  324. package/public/img/concorde/plane_08.jpg +0 -0
  325. package/public/img/concorde/plane_09.jpg +0 -0
  326. package/public/img/concorde/plane_10.jpg +0 -0
  327. package/public/img/concorde/plane_11.jpg +0 -0
  328. package/public/img/concorde/plane_12.jpg +0 -0
  329. package/public/img/concorde/plane_13.jpg +0 -0
  330. package/public/robots.txt +11 -10
  331. package/scripts/docs-markdown-vite-plugin.ts +37 -0
  332. package/scripts/docs-public-url.mjs +50 -0
  333. package/scripts/docs.htaccess +75 -0
  334. package/scripts/generate-crawl-docs.mjs +207 -116
  335. package/scripts/generate-crawl-docs.test.mjs +124 -0
  336. package/scripts/post-build-docs.js +34 -50
  337. package/scripts/post-build.mjs +0 -0
  338. package/src/core/components/functional/date/date.md +91 -231
  339. package/src/core/components/functional/fetch/fetch.md +66 -83
  340. package/src/core/components/functional/if/if.md +28 -3
  341. package/src/core/components/functional/if/if.ts +0 -0
  342. package/src/core/components/functional/jsonata/jsonata.md +42 -37
  343. package/src/core/components/functional/list/list.demo.ts +0 -0
  344. package/src/core/components/functional/list/list.md +99 -43
  345. package/src/core/components/functional/mix/mix.md +31 -26
  346. package/src/core/components/functional/queue/queue.demo.ts +10 -7
  347. package/src/core/components/functional/queue/queue.md +40 -61
  348. package/src/core/components/functional/router/router.demo.ts +16 -16
  349. package/src/core/components/functional/router/router.md +64 -65
  350. package/src/core/components/functional/router/router.ts +0 -0
  351. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +0 -0
  352. package/src/core/components/functional/sdui/component-catalog.gaps.json +1 -1
  353. package/src/core/components/functional/sdui/component-catalog.json +1 -1
  354. package/src/core/components/functional/sdui/example.json +19 -86
  355. package/src/core/components/functional/sdui/sdui-extension-points.md +1 -1
  356. package/src/core/components/functional/sdui/sdui.md +187 -358
  357. package/src/core/components/functional/sdui/types.ts +0 -0
  358. package/src/core/components/functional/states/states.demo.ts +21 -22
  359. package/src/core/components/functional/states/states.md +86 -61
  360. package/src/core/components/functional/states/states.ts +1 -1
  361. package/src/core/components/functional/submit/submit.md +64 -72
  362. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  363. package/src/core/components/functional/translation/translation.md +38 -0
  364. package/src/core/components/functional/value/value.md +34 -22
  365. package/src/core/components/functional/value/value.ts +0 -0
  366. package/src/core/components/ui/_css/size.ts +0 -0
  367. package/src/core/components/ui/alert/alert.md +48 -58
  368. package/src/core/components/ui/badge/badge.md +27 -34
  369. package/src/core/components/ui/button/button.md +139 -106
  370. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  371. package/src/core/components/ui/captcha/captcha.md +17 -32
  372. package/src/core/components/ui/card/card.md +6 -6
  373. package/src/core/components/ui/divider/divider.md +8 -11
  374. package/src/core/components/ui/form/checkbox/checkbox.md +90 -42
  375. package/src/core/components/ui/form/fieldset/fieldset.md +31 -75
  376. package/src/core/components/ui/form/form-actions/form-actions.md +14 -16
  377. package/src/core/components/ui/form/form-layout/form-layout.md +19 -29
  378. package/src/core/components/ui/form/input/input.md +95 -95
  379. package/src/core/components/ui/form/radio/radio.md +55 -34
  380. package/src/core/components/ui/form/select/select.md +60 -45
  381. package/src/core/components/ui/form/switch/switch.md +57 -34
  382. package/src/core/components/ui/form/textarea/textarea.md +55 -38
  383. package/src/core/components/ui/group/group.md +35 -33
  384. package/src/core/components/ui/icon/icon.md +4 -4
  385. package/src/core/components/ui/image/image.md +41 -107
  386. package/src/core/components/ui/link/link.md +6 -6
  387. package/src/core/components/ui/loader/loader.md +30 -55
  388. package/src/core/components/ui/menu/menu.md +27 -27
  389. package/src/core/components/ui/modal/modal.md +72 -96
  390. package/src/core/components/ui/modal/modal.ts +14 -11
  391. package/src/core/components/ui/pop/pop.md +80 -158
  392. package/src/core/components/ui/progress/progress.md +2 -2
  393. package/src/core/components/ui/table/table.md +91 -255
  394. package/src/core/components/ui/theme/theme.md +11 -36
  395. package/src/core/components/ui/toast/toast.md +48 -117
  396. package/src/core/components/ui/tooltip/tooltip.md +27 -62
  397. package/src/core/mixins/Subscriber.ts +0 -0
  398. package/src/core/utils/DataBindObserver.ts +0 -0
  399. package/src/core/utils/LocationHandler.spec.ts +80 -0
  400. package/src/core/utils/LocationHandler.ts +5 -9
  401. package/src/core/utils/Objects.ts +0 -0
  402. package/src/core/utils/route.ts +0 -0
  403. package/src/docs/code.ts +88 -75
  404. package/src/docs/components/docs-demo-sources.ts +70 -147
  405. package/src/docs/components/docs-lit-demo.ts +20 -40
  406. package/src/docs/components/docs-source-link.ts +0 -82
  407. package/src/docs/decorators/ancestor-attribute.md +59 -0
  408. package/src/docs/decorators/auto-subscribe.md +40 -0
  409. package/src/docs/decorators/bind.md +77 -0
  410. package/src/docs/decorators/get.md +160 -0
  411. package/src/docs/decorators/handle.md +119 -0
  412. package/src/docs/decorators/on-assign.md +63 -0
  413. package/src/docs/decorators/patch.md +44 -0
  414. package/src/docs/decorators/post.md +134 -0
  415. package/src/docs/decorators/publish.md +56 -0
  416. package/src/docs/decorators/put.md +51 -0
  417. package/src/docs/decorators/subscribe.md +87 -0
  418. package/src/docs/decorators/wait-for-ancestors.md +76 -0
  419. package/src/docs/directives/sub.md +75 -0
  420. package/src/docs/directives/t.md +73 -0
  421. package/src/docs/docs-location.spec.ts +46 -0
  422. package/src/docs/docs-location.ts +123 -32
  423. package/src/docs/docs.ts +6 -2
  424. package/src/docs/example/decorators-demo-bind-demos.ts +81 -116
  425. package/src/docs/example/decorators-demo-geo.ts +30 -19
  426. package/src/docs/example/decorators-demo-post.ts +88 -186
  427. package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +165 -268
  428. package/src/docs/example/decorators-demo.ts +85 -98
  429. package/src/docs/example/docs-api-config-demos.ts +19 -20
  430. package/src/docs/example/docs-boarding-pass-demo.ts +134 -0
  431. package/src/docs/example/docs-flight-demos.ts +147 -0
  432. package/src/docs/example/docs-jsonata-demos.ts +52 -52
  433. package/src/docs/example/docs-list-demos.ts +43 -123
  434. package/src/docs/example/docs-provider-keys.ts +33 -28
  435. package/src/docs/example/docs-queue-demos.ts +37 -77
  436. package/src/docs/example/docs-router-demos.ts +20 -25
  437. package/src/docs/example/docs-submit-demos.ts +48 -48
  438. package/src/docs/example/docs-toggle-demos.ts +4 -3
  439. package/src/docs/example/users.ts +0 -0
  440. package/src/docs/getting-started/ai-agents.md +76 -0
  441. package/src/docs/getting-started/components.md +5 -0
  442. package/src/docs/getting-started/create-a-component.md +136 -0
  443. package/src/docs/getting-started/dataFlow.md +87 -0
  444. package/src/docs/getting-started/installation.md +36 -0
  445. package/src/docs/getting-started/my-first-component.md +227 -0
  446. package/src/docs/getting-started/start.md +35 -0
  447. package/src/docs/getting-started/theming.md +253 -0
  448. package/src/docs/header/header.ts +240 -71
  449. package/src/docs/home/catalog.ts +44 -0
  450. package/src/docs/home/home.ts +520 -0
  451. package/src/docs/home/mach-stage.ts +389 -0
  452. package/src/docs/layout.ts +12 -11
  453. package/src/docs/misc/api-configuration.md +79 -0
  454. package/src/docs/misc/dataProviderKey.md +168 -0
  455. package/src/docs/misc/docs-mock-api.md +62 -0
  456. package/src/docs/misc/dynamic-path.md +71 -0
  457. package/src/docs/misc/endpoint.md +45 -0
  458. package/src/docs/misc/html-integration.md +14 -0
  459. package/src/docs/mock-api/api-config-mock.ts +5 -0
  460. package/src/docs/mock-api/fixtures.ts +0 -278
  461. package/src/docs/mock-api/flights.ts +89 -0
  462. package/src/docs/mock-api/router.ts +3 -4
  463. package/src/docs/mock-api/urls.ts +1 -2
  464. package/src/docs/navigation/components-index.ts +56 -0
  465. package/src/docs/navigation/navigation.ts +219 -232
  466. package/src/docs/navigation/pager.ts +67 -0
  467. package/src/docs/navigation/toc.ts +101 -0
  468. package/src/docs/search/docs-search.json +2419 -4374
  469. package/src/docs/search/markdown-renderer.ts +33 -7
  470. package/src/docs/search/page.ts +9 -6
  471. package/src/docs/search/search.ts +154 -122
  472. package/src/docs/shiki/index.ts +109 -0
  473. package/src/docs/tailwind/css/base/scrollbar.css +22 -0
  474. package/src/docs/tailwind/css/base/theme.css +96 -0
  475. package/src/docs/tailwind/css/base/typography.css +4 -0
  476. package/src/docs/tailwind/css/docs/boarding-pass.css +65 -0
  477. package/src/docs/tailwind/css/docs/content.css +32 -0
  478. package/src/docs/tailwind/css/docs/page.css +10 -0
  479. package/src/docs/tailwind/css/docs.css +9 -0
  480. package/src/docs/tailwind/css/home/hero.css +210 -0
  481. package/src/docs/tailwind/css/home/motion.css +84 -0
  482. package/src/docs/tailwind/css/home/sections.css +416 -0
  483. package/src/docs/tailwind/css/tailwind.css +7 -185
  484. package/src/tsconfig.json +23 -2
  485. package/src/tsconfig.tsbuildinfo +1 -1
  486. package/tailwind.config.js +8 -4
  487. package/vite.config.mts +11 -2
  488. package/.agents/skills/concorde-component-docs/SKILL.md +0 -194
  489. package/.github/workflows/ci.yml +0 -21
  490. package/.github-export-ignore +0 -30
  491. package/CONTRIBUTING.md +0 -59
  492. package/DEV.md +0 -54
  493. package/LICENSE +0 -21
  494. package/OPEN_SOURCE_CHECKPOINT.md +0 -133
  495. package/concorde-3d.bundle.js +0 -3960
  496. package/concorde-3d.es.js +0 -33433
  497. package/concorde-hugging-face-infer.bundle.js +0 -32
  498. package/concorde-hugging-face-infer.es.js +0 -2952
  499. package/concorde-interactive.bundle.js +0 -1157
  500. package/concorde-interactive.es.js +0 -10734
  501. package/concorde-shader.bundle.js +0 -116
  502. package/concorde-shader.es.js +0 -8353
  503. package/concorde-webgpu.bundle.js +0 -307
  504. package/concorde-webgpu.es.js +0 -8627
  505. package/docs/assets/index-D8MVWqY6.js +0 -12251
  506. package/docs/assets/index-DiD0qYvE.css +0 -1
  507. package/docs/crawl/core/components/functional/date/date.html +0 -190
  508. package/docs/crawl/core/components/functional/fetch/fetch.html +0 -109
  509. package/docs/crawl/core/components/functional/if/if.html +0 -27
  510. package/docs/crawl/core/components/functional/jsonata/jsonata.html +0 -79
  511. package/docs/crawl/core/components/functional/list/list.html +0 -70
  512. package/docs/crawl/core/components/functional/mix/mix.html +0 -45
  513. package/docs/crawl/core/components/functional/queue/queue.html +0 -96
  514. package/docs/crawl/core/components/functional/router/router.html +0 -106
  515. package/docs/crawl/core/components/functional/sdui/sdui.html +0 -269
  516. package/docs/crawl/core/components/functional/states/states.html +0 -66
  517. package/docs/crawl/core/components/functional/submit/submit.html +0 -160
  518. package/docs/crawl/core/components/functional/value/value.html +0 -51
  519. package/docs/crawl/core/components/ui/alert/alert.html +0 -110
  520. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +0 -23
  521. package/docs/crawl/core/components/ui/badge/badge.html +0 -119
  522. package/docs/crawl/core/components/ui/button/button.html +0 -149
  523. package/docs/crawl/core/components/ui/captcha/captcha.html +0 -30
  524. package/docs/crawl/core/components/ui/card/card.html +0 -99
  525. package/docs/crawl/core/components/ui/divider/divider.html +0 -58
  526. package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +0 -73
  527. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +0 -135
  528. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +0 -79
  529. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +0 -62
  530. package/docs/crawl/core/components/ui/form/input/input.html +0 -109
  531. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +0 -38
  532. package/docs/crawl/core/components/ui/form/radio/radio.html +0 -56
  533. package/docs/crawl/core/components/ui/form/select/select.html +0 -73
  534. package/docs/crawl/core/components/ui/form/switch/switch.html +0 -56
  535. package/docs/crawl/core/components/ui/form/textarea/textarea.html +0 -59
  536. package/docs/crawl/core/components/ui/group/group.html +0 -82
  537. package/docs/crawl/core/components/ui/icon/icon.html +0 -133
  538. package/docs/crawl/core/components/ui/image/image.html +0 -110
  539. package/docs/crawl/core/components/ui/link/link.html +0 -42
  540. package/docs/crawl/core/components/ui/loader/loader.html +0 -50
  541. package/docs/crawl/core/components/ui/modal/modal.html +0 -117
  542. package/docs/crawl/core/components/ui/pop/pop.html +0 -102
  543. package/docs/crawl/core/components/ui/progress/progress.html +0 -58
  544. package/docs/crawl/core/components/ui/table/table.html +0 -413
  545. package/docs/crawl/core/components/ui/toast/toast.html +0 -122
  546. package/docs/crawl/core/components/ui/tooltip/tooltip.html +0 -79
  547. package/docs/crawl/docs/_core-concept/overview.html +0 -66
  548. package/docs/crawl/docs/_core-concept/subscriber.html +0 -75
  549. package/docs/crawl/docs/_decorators/ancestor-attribute.html +0 -116
  550. package/docs/crawl/docs/_decorators/auto-subscribe.html +0 -202
  551. package/docs/crawl/docs/_decorators/bind.html +0 -141
  552. package/docs/crawl/docs/_decorators/get.html +0 -149
  553. package/docs/crawl/docs/_decorators/handle.html +0 -165
  554. package/docs/crawl/docs/_decorators/on-assign.html +0 -355
  555. package/docs/crawl/docs/_decorators/patch.html +0 -78
  556. package/docs/crawl/docs/_decorators/post.html +0 -139
  557. package/docs/crawl/docs/_decorators/publish.html +0 -61
  558. package/docs/crawl/docs/_decorators/put.html +0 -78
  559. package/docs/crawl/docs/_decorators/subscribe.html +0 -109
  560. package/docs/crawl/docs/_decorators/wait-for-ancestors.html +0 -137
  561. package/docs/crawl/docs/_directives/sub.html +0 -93
  562. package/docs/crawl/docs/_getting-started/concorde-manual-install.html +0 -100
  563. package/docs/crawl/docs/_getting-started/concorde-outside.html +0 -58
  564. package/docs/crawl/docs/_getting-started/my-first-subscriber.html +0 -110
  565. package/docs/crawl/docs/_getting-started/pubsub.html +0 -62
  566. package/docs/crawl/docs/_getting-started/start.html +0 -76
  567. package/docs/crawl/docs/_getting-started/theming.html +0 -85
  568. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +0 -138
  569. package/docs/crawl/hubs/decorators.html +0 -547
  570. package/docs/crawl/hubs/form-components.html +0 -359
  571. package/docs/crawl/hubs/remote-data.html +0 -452
  572. package/docs/crawl/index.html +0 -101
  573. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -29
  574. package/docs/src/docs/_core-concept/overview.md +0 -57
  575. package/docs/src/docs/_core-concept/subscriber.md +0 -75
  576. package/docs/src/docs/_decorators/ancestor-attribute.md +0 -127
  577. package/docs/src/docs/_decorators/auto-subscribe.md +0 -202
  578. package/docs/src/docs/_decorators/bind.md +0 -167
  579. package/docs/src/docs/_decorators/get.md +0 -162
  580. package/docs/src/docs/_decorators/handle.md +0 -175
  581. package/docs/src/docs/_decorators/on-assign.md +0 -390
  582. package/docs/src/docs/_decorators/patch.md +0 -70
  583. package/docs/src/docs/_decorators/post.md +0 -146
  584. package/docs/src/docs/_decorators/publish.md +0 -55
  585. package/docs/src/docs/_decorators/put.md +0 -70
  586. package/docs/src/docs/_decorators/subscribe.md +0 -100
  587. package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -163
  588. package/docs/src/docs/_directives/sub.md +0 -91
  589. package/docs/src/docs/_getting-started/concorde-manual-install.md +0 -133
  590. package/docs/src/docs/_getting-started/concorde-outside.md +0 -33
  591. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -120
  592. package/docs/src/docs/_getting-started/pubsub.md +0 -37
  593. package/docs/src/docs/_getting-started/start.md +0 -47
  594. package/docs/src/docs/_getting-started/theming.md +0 -91
  595. package/docs/src/docs/_misc/formelement-subscriber-removal.md +0 -115
  596. package/docs/src/tsconfig.declarations.json +0 -22
  597. package/docs/src/tsconfig.emit.json +0 -23
  598. package/gitlab/job_github_mirror.sh +0 -39
  599. package/scripts/github-export.mjs +0 -150
  600. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -29
  601. package/src/css.d.ts +0 -19
  602. package/src/docs/_core-concept/overview.md +0 -57
  603. package/src/docs/_core-concept/subscriber.md +0 -75
  604. package/src/docs/_decorators/ancestor-attribute.md +0 -128
  605. package/src/docs/_decorators/auto-subscribe.md +0 -202
  606. package/src/docs/_decorators/bind.md +0 -167
  607. package/src/docs/_decorators/get.md +0 -162
  608. package/src/docs/_decorators/handle.md +0 -175
  609. package/src/docs/_decorators/on-assign.md +0 -390
  610. package/src/docs/_decorators/patch.md +0 -70
  611. package/src/docs/_decorators/post.md +0 -146
  612. package/src/docs/_decorators/publish.md +0 -55
  613. package/src/docs/_decorators/put.md +0 -70
  614. package/src/docs/_decorators/subscribe.md +0 -100
  615. package/src/docs/_decorators/wait-for-ancestors.md +0 -163
  616. package/src/docs/_directives/sub.md +0 -91
  617. package/src/docs/_getting-started/concorde-manual-install.md +0 -133
  618. package/src/docs/_getting-started/concorde-outside.md +0 -33
  619. package/src/docs/_getting-started/my-first-subscriber.md +0 -120
  620. package/src/docs/_getting-started/pubsub.md +0 -37
  621. package/src/docs/_misc/formelement-subscriber-removal.md +0 -115
  622. package/src/docs/example/docs-input-autocomplete-demos.ts +0 -110
  623. package/src/docs/example/docs-joke-demos.ts +0 -297
  624. package/src/docs/prism/index.ts +0 -6
  625. package/src/docs/prism/prism.css +0 -158
  626. package/src/docs/prism/prism.js +0 -1022
  627. package/src/tsconfig.declarations.json +0 -22
  628. package/src/tsconfig.emit.json +0 -23
@@ -1,1157 +0,0 @@
1
- (function(){"use strict";var Re,de;const lr=new Map;function vi(r){lr.set(r.id,r)}function Gr(r){lr.delete(r)}function ss(r,e){const t=lr.get(r);t&&t.dispatch({...e,t:e.t??performance.now()})}/**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const Ms=globalThis,cr=Ms.ShadowRoot&&(Ms.ShadyCSS===void 0||Ms.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ur=Symbol(),Yr=new WeakMap;let hr=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==ur)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(cr&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Yr.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Yr.set(t,e))}return e}toString(){return this.cssText}};const mi=r=>new hr(typeof r=="string"?r:r+"",void 0,ur),je=(r,...e)=>{const t=r.length===1?r[0]:e.reduce(((s,n,a)=>s+(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.")})(n)+r[a+1]),r[0]);return new hr(t,r,ur)},yi=(r,e)=>{if(cr)r.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const s=document.createElement("style"),n=Ms.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=t.cssText,r.appendChild(s)}},Kr=cr?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return mi(t)})(r):r;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:bi,defineProperty:wi,getOwnPropertyDescriptor:_i,getOwnPropertyNames:Ai,getOwnPropertySymbols:ki,getPrototypeOf:Si}=Object,Rs=globalThis,Jr=Rs.trustedTypes,xi=Jr?Jr.emptyScript:"",Ci=Rs.reactiveElementPolyfillSupport,ps=(r,e)=>r,Is={toAttribute(r,e){switch(e){case Boolean:r=r?xi:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},fr=(r,e)=>!bi(r,e),Zr={attribute:!0,type:String,converter:Is,reflect:!1,useDefault:!1,hasChanged:fr};Symbol.metadata??=Symbol("metadata"),Rs.litPropertyMetadata??=new WeakMap;let rs=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,t=Zr){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(e,s,t);n!==void 0&&wi(this.prototype,e,n)}}static getPropertyDescriptor(e,t,s){const{get:n,set:a}=_i(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:n,set(o){const h=n?.call(this);a?.call(this,o),this.requestUpdate(e,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Zr}static _$Ei(){if(this.hasOwnProperty(ps("elementProperties")))return;const e=Si(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ps("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ps("properties"))){const t=this.properties,s=[...Ai(t),...ki(t)];for(const n of s)this.createProperty(n,t[n])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,n]of t)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const n=this._$Eu(t,s);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const n of s)t.unshift(Kr(n))}else e!==void 0&&t.push(Kr(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s: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,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yi(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,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,s);if(n!==void 0&&s.reflect===!0){const a=(s.converter?.toAttribute!==void 0?s.converter:Is).toAttribute(t,s.type);this._$Em=e,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(e,t){const s=this.constructor,n=s._$Eh.get(e);if(n!==void 0&&this._$Em!==n){const a=s.getPropertyOptions(n),o=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:Is;this._$Em=n;const h=o.fromAttribute(t,a.type);this[n]=h??this._$Ej?.get(n)??h,this._$Em=null}}requestUpdate(e,t,s){if(e!==void 0){const n=this.constructor,a=this[e];if(s??=n.getPropertyOptions(e),!((s.hasChanged??fr)(a,t)||s.useDefault&&s.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:n,wrapped:a},o){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),a!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}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[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,a]of s){const{wrapped:o}=a,h=this[n];o!==!0||this._$AL.has(n)||h===void 0||this.C(n,void 0,a,h)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};rs.elementStyles=[],rs.shadowRootOptions={mode:"open"},rs[ps("elementProperties")]=new Map,rs[ps("finalized")]=new Map,Ci?.({ReactiveElement:rs}),(Rs.reactiveElementVersions??=[]).push("2.1.1");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const dr=globalThis,Ns=dr.trustedTypes,Xr=Ns?Ns.createPolicy("lit-html",{createHTML:r=>r}):void 0,Qr="$lit$",Mt=`lit$${Math.random().toFixed(9).slice(2)}$`,en="?"+Mt,Ei=`<${en}>`,Bt=document,gs=()=>Bt.createComment(""),vs=r=>r===null||typeof r!="object"&&typeof r!="function",pr=Array.isArray,Pi=r=>pr(r)||typeof r?.[Symbol.iterator]=="function",gr=`[
14
- \f\r]`,ms=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tn=/-->/g,sn=/>/g,Ht=RegExp(`>|${gr}(?:([^\\s"'>=/]+)(${gr}*=${gr}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),rn=/'/g,nn=/"/g,on=/^(?:script|style|textarea|title)$/i,Ti=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),qe=Ti(1),bt=Symbol.for("lit-noChange"),be=Symbol.for("lit-nothing"),an=new WeakMap,Vt=Bt.createTreeWalker(Bt,129);function ln(r,e){if(!pr(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xr!==void 0?Xr.createHTML(e):e}const $i=(r,e)=>{const t=r.length-1,s=[];let n,a=e===2?"<svg>":e===3?"<math>":"",o=ms;for(let h=0;h<t;h++){const d=r[h];let C,$,k=-1,w=0;for(;w<d.length&&(o.lastIndex=w,$=o.exec(d),$!==null);)w=o.lastIndex,o===ms?$[1]==="!--"?o=tn:$[1]!==void 0?o=sn:$[2]!==void 0?(on.test($[2])&&(n=RegExp("</"+$[2],"g")),o=Ht):$[3]!==void 0&&(o=Ht):o===Ht?$[0]===">"?(o=n??ms,k=-1):$[1]===void 0?k=-2:(k=o.lastIndex-$[2].length,C=$[1],o=$[3]===void 0?Ht:$[3]==='"'?nn:rn):o===nn||o===rn?o=Ht:o===tn||o===sn?o=ms:(o=Ht,n=void 0);const E=o===Ht&&r[h+1].startsWith("/>")?" ":"";a+=o===ms?d+Ei:k>=0?(s.push(C),d.slice(0,k)+Qr+d.slice(k)+Mt+E):d+Mt+(k===-2?h:E)}return[ln(r,a+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let vr=class gi{constructor({strings:e,_$litType$:t},s){let n;this.parts=[];let a=0,o=0;const h=e.length-1,d=this.parts,[C,$]=$i(e,t);if(this.el=gi.createElement(C,s),Vt.currentNode=this.el.content,t===2||t===3){const k=this.el.content.firstChild;k.replaceWith(...k.childNodes)}for(;(n=Vt.nextNode())!==null&&d.length<h;){if(n.nodeType===1){if(n.hasAttributes())for(const k of n.getAttributeNames())if(k.endsWith(Qr)){const w=$[o++],E=n.getAttribute(k).split(Mt),L=/([.?@])?(.*)/.exec(w);d.push({type:1,index:a,name:L[2],strings:E,ctor:L[1]==="."?Oi:L[1]==="?"?Li:L[1]==="@"?Fi:Us}),n.removeAttribute(k)}else k.startsWith(Mt)&&(d.push({type:6,index:a}),n.removeAttribute(k));if(on.test(n.tagName)){const k=n.textContent.split(Mt),w=k.length-1;if(w>0){n.textContent=Ns?Ns.emptyScript:"";for(let E=0;E<w;E++)n.append(k[E],gs()),Vt.nextNode(),d.push({type:2,index:++a});n.append(k[w],gs())}}}else if(n.nodeType===8)if(n.data===en)d.push({type:2,index:a});else{let k=-1;for(;(k=n.data.indexOf(Mt,k+1))!==-1;)d.push({type:7,index:a}),k+=Mt.length-1}a++}}static createElement(e,t){const s=Bt.createElement("template");return s.innerHTML=e,s}};function ns(r,e,t=r,s){if(e===bt)return e;let n=s!==void 0?t._$Co?.[s]:t._$Cl;const a=vs(e)?void 0:e._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(r),n._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=n:t._$Cl=n),n!==void 0&&(e=ns(r,n._$AS(r,e.values),n,s)),e}let Di=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,n=(e?.creationScope??Bt).importNode(t,!0);Vt.currentNode=n;let a=Vt.nextNode(),o=0,h=0,d=s[0];for(;d!==void 0;){if(o===d.index){let C;d.type===2?C=new is(a,a.nextSibling,this,e):d.type===1?C=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(C=new Mi(a,this,e)),this._$AV.push(C),d=s[++h]}o!==d?.index&&(a=Vt.nextNode(),o++)}return Vt.currentNode=Bt,n}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class is{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,n){this.type=2,this._$AH=be,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ns(this,e,t),vs(e)?e===be||e==null||e===""?(this._$AH!==be&&this._$AR(),this._$AH=be):e!==this._$AH&&e!==bt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Pi(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!==be&&vs(this._$AH)?this._$AA.nextSibling.data=e:this.T(Bt.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,n=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=vr.createElement(ln(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===n)this._$AH.p(t);else{const a=new Di(n,this),o=a.u(this.options);a.p(t),this.T(o),this._$AH=a}}_$AC(e){let t=an.get(e.strings);return t===void 0&&an.set(e.strings,t=new vr(e)),t}k(e){pr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,n=0;for(const a of e)n===t.length?t.push(s=new is(this.O(gs()),this.O(gs()),this,this.options)):s=t[n],s._$AI(a),n++;n<t.length&&(this._$AR(s&&s._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class Us{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,n,a){this.type=1,this._$AH=be,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=a,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=be}_$AI(e,t=this,s,n){const a=this.strings;let o=!1;if(a===void 0)e=ns(this,e,t,0),o=!vs(e)||e!==this._$AH&&e!==bt,o&&(this._$AH=e);else{const h=e;let d,C;for(e=a[0],d=0;d<a.length-1;d++)C=ns(this,h[s+d],t,d),C===bt&&(C=this._$AH[d]),o||=!vs(C)||C!==this._$AH[d],C===be?e=be:e!==be&&(e+=(C??"")+a[d+1]),this._$AH[d]=C}o&&!n&&this.j(e)}j(e){e===be?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Oi extends Us{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===be?void 0:e}}class Li extends Us{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==be)}}class Fi extends Us{constructor(e,t,s,n,a){super(e,t,s,n,a),this.type=5}_$AI(e,t=this){if((e=ns(this,e,t,0)??be)===bt)return;const s=this._$AH,n=e===be&&s!==be||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,a=e!==be&&(s===be||n);n&&this.element.removeEventListener(this.name,this,s),a&&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 Mi{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){ns(this,e)}}const Ri={I:is},Ii=dr.litHtmlPolyfillSupport;Ii?.(vr,is),(dr.litHtmlVersions??=[]).push("3.3.1");const Ni=(r,e,t)=>{const s=t?.renderBefore??e;let n=s._$litPart$;if(n===void 0){const a=t?.renderBefore??null;s._$litPart$=n=new is(e.insertBefore(gs(),a),a,void 0,t??{})}return n._$AI(r),n};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */const mr=globalThis;let We=class extends rs{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 t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ni(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return bt}};We._$litElement$=!0,We.finalized=!0,mr.litElementHydrateSupport?.({LitElement:We});const Ui=mr.litElementPolyfillSupport;Ui?.({LitElement:We}),(mr.litElementVersions??=[]).push("4.2.1");/**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */const at=r=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(r,e)})):customElements.define(r,e)};/**
24
- * @license
25
- * Copyright 2017 Google LLC
26
- * SPDX-License-Identifier: BSD-3-Clause
27
- */const ji={attribute:!0,type:String,converter:Is,reflect:!1,hasChanged:fr},zi=(r=ji,e,t)=>{const{kind:s,metadata:n}=t;let a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),a.set(t.name,r),s==="accessor"){const{name:o}=t;return{set(h){const d=e.get.call(this);e.set.call(this,h),this.requestUpdate(o,d,r)},init(h){return h!==void 0&&this.C(o,void 0,r,h),h}}}if(s==="setter"){const{name:o}=t;return function(h){const d=this[o];e.call(this,h),this.requestUpdate(o,d,r)}}throw Error("Unsupported decorator location: "+s)};function O(r){return(e,t)=>typeof t=="object"?zi(r,e,t):((s,n,a)=>{const o=n.hasOwnProperty(a);return n.constructor.createProperty(a,s),o?Object.getOwnPropertyDescriptor(n,a):void 0})(r,e,t)}/**
28
- * @license
29
- * Copyright 2017 Google LLC
30
- * SPDX-License-Identifier: BSD-3-Clause
31
- */function ft(r){return O({...r,state:!0,attribute:!1})}/**
32
- * @license
33
- * Copyright 2017 Google LLC
34
- * SPDX-License-Identifier: BSD-3-Clause
35
- */const cn=(r,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(r,e,t),t);/**
36
- * @license
37
- * Copyright 2017 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- */function qi(r,e){return(t,s,n)=>{const a=o=>o.renderRoot?.querySelector(r)??null;return cn(t,s,{get(){return a(this)}})}}/**
40
- * @license
41
- * Copyright 2021 Google LLC
42
- * SPDX-License-Identifier: BSD-3-Clause
43
- */function un(r){return(e,t)=>{const{slot:s,selector:n}=r??{},a="slot"+(s?`[name=${s}]`:":not([name])");return cn(e,t,{get(){const o=this.renderRoot?.querySelector(a),h=o?.assignedElements(r)??[];return n===void 0?h:h.filter((d=>d.matches(n)))}})}}var hn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function js(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yr={exports:{}},dn;function Bi(){return dn||(dn=1,(function(r,e){(function(t){r.exports=t()})(function(){return(function(){function t(s,n,a){function o(C,$){if(!n[C]){if(!s[C]){var k=typeof js=="function"&&js;if(!$&&k)return k(C,!0);if(h)return h(C,!0);var w=new Error("Cannot find module '"+C+"'");throw w.code="MODULE_NOT_FOUND",w}var E=n[C]={exports:{}};s[C][0].call(E.exports,function(L){var R=s[C][1][L];return o(R||L)},E,E.exports,t,s,n,a)}return n[C].exports}for(var h=typeof js=="function"&&js,d=0;d<a.length;d++)o(a[d]);return o}return t})()({1:[function(t,s,n){const a=t("./utils"),o=(function(){const h=a.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],C=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],$=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],k=["Thousand","Million","Billion","Trillion"];function w(S,D){var P=function(q,j,F){var B="";if(q<=19)B=(j?" and ":"")+(F?C[q]:d[q]);else if(q<100){const fe=Math.floor(q/10),le=q%10;B=(j?" and ":"")+$[fe-2],le>0?B+="-"+P(le,!1,F):F&&(B=B.substring(0,B.length-1)+"ieth")}else if(q<1e3){const fe=Math.floor(q/100),le=q%100;B=(j?", ":"")+d[fe]+" Hundred",le>0?B+=P(le,!0,F):F&&(B+="th")}else{var Y=Math.floor(Math.log10(q)/3);Y>k.length&&(Y=k.length);const fe=Math.pow(10,Y*3),le=Math.floor(q/fe),Q=q-le*fe;B=(j?", ":"")+P(le,!1,!1)+" "+k[Y-1],Q>0?B+=P(Q,!0,F):F&&(B+="th")}return B},I=P(S,!1,D);return I}const E=Object.create(null);d.forEach(function(S,D){E[S.toLowerCase()]=D}),C.forEach(function(S,D){E[S.toLowerCase()]=D}),$.forEach(function(S,D){const P=S.toLowerCase();E[P]=(D+2)*10,E[P.substring(0,S.length-1)+"ieth"]=E[P]}),E.hundredth=100,k.forEach(function(S,D){const P=S.toLowerCase(),I=Math.pow(10,(D+1)*3);E[P]=I,E[P+"th"]=I});function L(S){const P=S.split(/,\s|\sand\s|[\s\\-]/).map(j=>E[j]);let I=[0];return P.forEach(j=>{if(j<100){let F=I.pop();F>=1e3&&(I.push(F),F=0),I.push(F+j)}else I.push(I.pop()*j)}),I.reduce((j,F)=>j+F,0)}const R=[[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"]],X={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function Z(S){for(var D=0;D<R.length;D++){const P=R[D];if(S>=P[0])return P[1]+Z(S-P[0])}return""}function A(S){for(var D=0,P=1,I=S.length-1;I>=0;I--){const q=S[I],j=X[q];j<P?D-=j:(P=j,D+=j)}return D}function m(S,D){for(var P=[],I=D.charCodeAt(0);S>0;)P.unshift(String.fromCharCode((S-1)%26+I)),S=Math.floor((S-1)/26);return P.join("")}function M(S,D){for(var P=D.charCodeAt(0),I=0,q=0;q<S.length;q++)I+=(S.charCodeAt(S.length-q-1)-P+1)*Math.pow(26,q);return I}function _(S,D){if(typeof S>"u")return;S=Math.floor(S);const P=oe(D);return N(S,P)}const T={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},V={UPPER:"upper",LOWER:"lower",TITLE:"title"};function N(S,D){let P;const I=S<0;switch(S=Math.abs(S),D.primary){case T.LETTERS:P=m(S,D.case===V.UPPER?"A":"a");break;case T.ROMAN:P=Z(S),D.case===V.UPPER&&(P=P.toUpperCase());break;case T.WORDS:P=w(S,D.ordinal),D.case===V.UPPER?P=P.toUpperCase():D.case===V.LOWER&&(P=P.toLowerCase());break;case T.DECIMAL:P=""+S;var q=D.mandatoryDigits-P.length;if(q>0){var j=new Array(q+1).join("0");P=j+P}if(D.zeroCode!==48&&(P=h(P).map(fe=>String.fromCodePoint(fe.codePointAt(0)+D.zeroCode-48)).join("")),D.regular){const fe=Math.floor((P.length-1)/D.groupingSeparators.position);for(let le=fe;le>0;le--){const Q=P.length-le*D.groupingSeparators.position;P=P.substr(0,Q)+D.groupingSeparators.character+P.substr(Q)}}else D.groupingSeparators.reverse().forEach(fe=>{const le=P.length-fe.position;P=P.substr(0,le)+fe.character+P.substr(le)});if(D.ordinal){var F={1:"st",2:"nd",3:"rd"},B=P[P.length-1],Y=F[B];(!Y||P.length>1&&P[P.length-2]==="1")&&(Y="th"),P=P+Y}break;case T.SEQUENCE:throw{code:"D3130",value:D.token}}return I&&(P="-"+P),P}const ee=[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 oe(S){const D={type:"integer",primary:T.DECIMAL,case:V.LOWER,ordinal:!1};let P,I;const q=S.lastIndexOf(";");switch(q===-1?P=S:(P=S.substring(0,q),I=S.substring(q+1),I[0]==="o"&&(D.ordinal=!0)),P){case"A":D.case=V.UPPER;case"a":D.primary=T.LETTERS;break;case"I":D.case=V.UPPER;case"i":D.primary=T.ROMAN;break;case"W":D.case=V.UPPER,D.primary=T.WORDS;break;case"Ww":D.case=V.TITLE,D.primary=T.WORDS;break;case"w":D.primary=T.WORDS;break;default:{let j=null,F=0,B=0,Y=[],fe=0;if(h(P).map(Q=>Q.codePointAt(0)).reverse().forEach(Q=>{let K=!1;for(let ue=0;ue<ee.length;ue++){const J=ee[ue];if(Q>=J&&Q<=J+9){if(K=!0,F++,fe++,j===null)j=J;else if(J!==j)throw{code:"D3131"};break}}K||(Q===35?(fe++,B++):Y.push({position:fe,character:String.fromCodePoint(Q)}))}),F>0){D.primary=T.DECIMAL,D.zeroCode=j,D.mandatoryDigits=F,D.optionalDigits=B;const K=function(ue){if(ue.length===0)return 0;const J=ue[0].character;for(let Ie=1;Ie<ue.length;Ie++)if(ue[Ie].character!==J)return 0;const He=ue.map(Ie=>Ie.position),ut=function(Ie,Ke){return Ke===0?Ie:ut(Ke,Ie%Ke)},Ye=He.reduce(ut);for(let Ie=1;Ie<=He.length;Ie++)if(He.indexOf(Ie*Ye)===-1)return 0;return Ye}(Y);K>0?(D.regular=!0,D.groupingSeparators={position:K,character:Y[0].character}):(D.regular=!1,D.groupingSeparators=Y)}else D.primary=T.SEQUENCE,D.token=P}}return D}const Se={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 ve(S){var D=[];const P={type:"datetime",parts:D},I=function(K,ue){if(ue>K){let J=S.substring(K,ue);J=J.split("]]").join("]"),D.push({type:"literal",value:J})}};for(var q=0,j=0;j<S.length;){if(S.charAt(j)==="["){if(S.charAt(j+1)==="["){I(q,j),D.push({type:"literal",value:"["}),j+=2,q=j;continue}if(I(q,j),q=j,j=S.indexOf("]",q),j===-1)throw{code:"D3135"};let K=S.substring(q+1,j);K=K.split(/\s+/).join("");var F={type:"marker",component:K.charAt(0)},B=K.lastIndexOf(","),Y;if(B!==-1){const ue=K.substring(B+1),J=ue.indexOf("-");let He,ut;const Ye=function(Ke){if(!(typeof Ke>"u"||Ke==="*"))return parseInt(Ke)};J===-1?He=ue:(He=ue.substring(0,J),ut=ue.substring(J+1));const Ie={min:Ye(He),max:Ye(ut)};F.width=Ie,Y=K.substring(1,B)}else Y=K.substring(1);if(Y.length===1)F.presentation1=Y;else if(Y.length>1){var fe=Y.charAt(Y.length-1);"atco".indexOf(fe)!==-1?(F.presentation2=fe,fe==="o"&&(F.ordinal=!0),F.presentation1=Y.substring(0,Y.length-1)):F.presentation1=Y}else F.presentation1=Se[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=V.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=V.TITLE:F.names=V.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var le=F.presentation1;if(F.presentation2&&(le+=";"+F.presentation2),F.integerFormat=oe(le),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 Q=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;Q>=2&&(F.n=Q)}const ue=D[D.length-1];ue&&ue.integerFormat&&(ue.integerFormat.parseWidth=ue.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=oe(F.presentation1)),D.push(F),q=j+1}j++}return I(q,j),P}const pe=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Le=["January","February","March","April","May","June","July","August","September","October","November","December"],nt=1e3*60*60*24,ce=function(S){const D=Date.UTC(S.year,S.month);var P=new Date(D).getUTCDay();return P===0&&(P=7),P>4?D+(8-P)*nt:D-(P-1)*nt},ge=function(S,D){return{year:S,month:D,nextMonth:function(){return D===11?ge(S+1,0):ge(S,D+1)},previousMonth:function(){return D===0?ge(S-1,11):ge(S,D-1)},nextYear:function(){return ge(S+1,D)},previousYear:function(){return ge(S-1,D)}}},tt=function(S,D){return(D-S)/(nt*7)+1},re=(S,D)=>{let P;switch(D){case"Y":P=S.getUTCFullYear();break;case"M":P=S.getUTCMonth()+1;break;case"D":P=S.getUTCDate();break;case"d":{const I=Date.UTC(S.getUTCFullYear(),S.getUTCMonth(),S.getUTCDate()),q=Date.UTC(S.getUTCFullYear(),0);P=(I-q)/nt+1;break}case"F":P=S.getUTCDay(),P===0&&(P=7);break;case"W":{const I=ge(S.getUTCFullYear(),0),q=ce(I),j=Date.UTC(I.year,S.getUTCMonth(),S.getUTCDate());let F=tt(q,j);if(F>52){const B=ce(I.nextYear());j>=B&&(F=1)}else if(F<1){const B=ce(I.previousYear());F=tt(B,j)}P=Math.floor(F);break}case"w":{const I=ge(S.getUTCFullYear(),S.getUTCMonth()),q=ce(I),j=Date.UTC(I.year,I.month,S.getUTCDate());let F=tt(q,j);if(F>4){const B=ce(I.nextMonth());j>=B&&(F=1)}else if(F<1){const B=ce(I.previousMonth());F=tt(B,j)}P=Math.floor(F);break}case"X":{const I=ge(S.getUTCFullYear(),0),q=ce(I),j=ce(I.nextYear()),F=S.getTime();F<q?P=I.year-1:F>=j?P=I.year+1:P=I.year;break}case"x":{const I=ge(S.getUTCFullYear(),S.getUTCMonth()),q=ce(I),j=I.nextMonth(),F=ce(j),B=S.getTime();B<q?P=I.previousMonth().month+1:B>=F?P=j.month+1:P=I.month+1;break}case"H":P=S.getUTCHours();break;case"h":P=S.getUTCHours(),P=P%12,P===0&&(P=12);break;case"P":P=S.getUTCHours()>=12?"pm":"am";break;case"m":P=S.getUTCMinutes();break;case"s":P=S.getUTCSeconds();break;case"f":P=S.getUTCMilliseconds();break;case"Z":case"z":break;case"C":P="ISO";break;case"E":P="ISO";break}return P};let Fe=null;function kt(S,D,P){var I=0,q=0;if(typeof P<"u"){const le=parseInt(P);I=Math.floor(le/100),q=le%100}var j=function(le,Q){var K=re(le,Q.component);if("YMDdFWwXxHhms".indexOf(Q.component)!==-1)if(Q.component==="Y"&&Q.n!==-1&&(K=K%Math.pow(10,Q.n)),Q.names){if(Q.component==="M"||Q.component==="x")K=Le[K-1];else if(Q.component==="F")K=pe[K];else throw{code:"D3133",value:Q.component};Q.names===V.UPPER?K=K.toUpperCase():Q.names===V.LOWER&&(K=K.toLowerCase()),Q.width&&K.length>Q.width.max&&(K=K.substring(0,Q.width.max))}else K=N(K,Q.integerFormat);else if(Q.component==="f")K=N(K,Q.integerFormat);else if(Q.component==="Z"||Q.component==="z"){const ue=I*100+q;if(Q.integerFormat.regular)K=N(ue,Q.integerFormat);else{const J=Q.integerFormat.mandatoryDigits;if(J===1||J===2)K=N(I,Q.integerFormat),q!==0&&(K+=":"+_(q,"00"));else if(J===3||J===4)K=N(ue,Q.integerFormat);else throw{code:"D3134",value:J}}ue>=0&&(K="+"+K),Q.component==="z"&&(K="GMT"+K),ue===0&&Q.presentation2==="t"&&(K="Z")}else Q.component==="P"&&Q.names===V.UPPER&&(K=K.toUpperCase());return K};let F;typeof D>"u"?(Fe===null&&(Fe=ve("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=Fe):F=ve(D);const B=(60*I+q)*60*1e3,Y=new Date(S+B);let fe="";return F.parts.forEach(function(le){le.type==="literal"?fe+=le.value:fe+=j(Y,le)}),fe}function p(S){var D=Object.create(null);if(S.type==="datetime")D.type="datetime",D.parts=S.parts.map(function(P){var I=Object.create(null);if(P.type==="literal")I.regex=P.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(P.component==="Z"||P.component==="z"){let j;Array.isArray(P.integerFormat.groupingSeparators)||(j=P.integerFormat.groupingSeparators),I.regex="",P.component==="z"&&(I.regex="GMT"),I.regex+="[-+][0-9]+",j&&(I.regex+=j.character+"[0-9]+"),I.parse=function(F){P.component==="z"&&(F=F.substring(3));let B=0,Y=0;return j?(B=Number.parseInt(F.substring(0,F.indexOf(j.character))),Y=Number.parseInt(F.substring(F.indexOf(j.character)+1))):F.length-1<=2?B=Number.parseInt(F):(B=Number.parseInt(F.substring(0,3)),Y=Number.parseInt(F.substring(3))),B*60+Y}}else if(P.component==="f")I.regex="[0-9]+",I.parse=function(j){return parseFloat("0."+j.substring(0,3))*1e3};else if(P.integerFormat)I=p(P.integerFormat);else{I.regex="[a-zA-Z]+";var q=Object.create(null);if(P.component==="M"||P.component==="x")Le.forEach(function(j,F){P.width&&P.width.max?q[j.substring(0,P.width.max)]=F+1:q[j]=F+1});else if(P.component==="F")pe.forEach(function(j,F){F>0&&(P.width&&P.width.max?q[j.substring(0,P.width.max)]=F:q[j]=F)});else if(P.component==="P")q={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:P.component};I.parse=function(j){return q[j]}}return I.component=P.component,I});else{D.type="integer";const P=S.case===V.UPPER;switch(S.primary){case T.LETTERS:D.regex=P?"[A-Z]+":"[a-z]+",D.parse=function(I){return M(I,P?"A":"a")};break;case T.ROMAN:D.regex=P?"[MDCLXVI]+":"[mdclxvi]+",D.parse=function(I){return A(P?I:I.toUpperCase())};break;case T.WORDS:D.regex="(?:"+a.keys(E).concat("and","[\\-, ]").join("|")+")+",D.parse=function(I){return L(I.toLowerCase())};break;case T.DECIMAL:D.regex="[0-9]",S.parseWidth?D.regex+=`{${S.parseWidth}}`:D.regex+="+",S.ordinal&&(D.regex+="(?:th|st|nd|rd)"),D.parse=function(I){let q=I;return S.ordinal&&(q=I.substring(0,I.length-2)),S.regular?q=q.split(",").join(""):S.groupingSeparators.forEach(j=>{q=q.split(j.character).join("")}),S.zeroCode!==48&&(q=q.split("").map(j=>String.fromCodePoint(j.codePointAt(0)-S.zeroCode+48)).join("")),parseInt(q)};break;case T.SEQUENCE:throw{code:"D3130",value:S.token}}}return D}function b(S,D){if(typeof S>"u")return;const P=oe(D);return p(P).parse(S)}function W(S,D){const P=ve(D),I=p(P),q="^"+I.parts.map(Y=>"("+Y.regex+")").join("")+"$";var F=new RegExp(q,"i").exec(S);if(F!==null){const J=Object.create(null);for(let c=1;c<F.length;c++){const f=I.parts[c-1];f.parse&&(J[f.component]=f.parse(F[c]))}if(Object.getOwnPropertyNames(J).length===0)return;let He=0;const ut=c=>{He<<=1,He+=c?1:0},Ye=c=>!(~c&He)&&!!(c&He);"YXMxWwdD".split("").forEach(c=>ut(J[c]));const Ke=!Ye(161)&&Ye(130),Ot=Ye(84),us=!Ot&&Ye(72);He=0,"PHhmsf".split("").forEach(c=>ut(J[c]));const H=!Ye(23)&&Ye(47),mt=(Ke?"YD":Ot?"XxwF":us?"XWF":"YMD")+(H?"Phmsf":"Hmsf"),Ds=this.environment.timestamp;let St=!1,Qt=!1;if(mt.split("").forEach(c=>{if(typeof J[c]>"u")St?(J[c]="MDd".indexOf(c)!==-1?1:0,Qt=!0):J[c]=re(Ds,c);else if(St=!0,Qt)throw{code:"D3136"}}),J.M>0?J.M-=1:J.M=0,Ke){const c=Date.UTC(J.Y,0),f=(J.d-1)*1e3*60*60*24,g=new Date(c+f);J.M=g.getUTCMonth(),J.D=g.getUTCDate()}if(Ot)throw{code:"D3136"};if(us)throw{code:"D3136"};H&&(J.H=J.h===12?0:J.h,J.P===1&&(J.H+=12));var B=Date.UTC(J.Y,J.M,J.D,J.H,J.m,J.s,J.f);return(J.Z||J.z)&&(B-=(J.Z||J.z)*60*1e3),B}}var he=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 xe(S,D){if(!(typeof S>"u"))if(typeof D>"u"){if(!he.test(S))throw{stack:new Error().stack,code:"D3110",value:S};return Date.parse(S)}else return W.call(this,S,D)}function _e(S,D,P){if(!(typeof S>"u"))return kt.call(this,S,D,P)}return{formatInteger:_,parseInteger:b,fromMillis:_e,toMillis:xe}})();s.exports=o},{"./utils":6}],2:[function(t,s,n){(function(a){(function(){var o=t("./utils");const h=(()=>{var d=o.isNumeric,C=o.isArrayOfStrings,$=o.isArrayOfNumbers,k=o.isSequence,w=o.isFunction,E=o.isLambda,L=o.isPromise,R=o.getFunctionArity,X=o.isDeepEqual,Z=o.stringToArray;function A(i){if(!(typeof i>"u")){var l=0;return i.forEach(function(u){l+=u}),l}}function m(i){return typeof i>"u"?0:i.length}function M(i){if(!(typeof i>"u"||i.length===0))return Math.max.apply(Math,i)}function _(i){if(!(typeof i>"u"||i.length===0))return Math.min.apply(Math,i)}function T(i){if(!(typeof i>"u"||i.length===0)){var l=0;return i.forEach(function(u){l+=u}),l/i.length}}function V(i,l=!1){if(!(typeof i>"u")){var u;if(typeof i=="string")u=i;else if(w(i))u="";else{if(typeof i=="number"&&!isFinite(i))throw{code:"D3001",value:i,stack:new Error().stack};var y=l?2:0;Array.isArray(i)&&i.outerWrapper&&(i=i[0]),u=JSON.stringify(i,function(v,x){return typeof x<"u"&&x!==null&&d(x)?x.toPrecision&&!Number.isInteger(x)?Number(x.toPrecision(15)):x:x&&w(x)?"":x},y)}return u}}function N(i,l,u){if(!(typeof i>"u")){var y=Z(i),v=y.length;if(v+l<0&&(l=0),typeof u<"u"){if(u<=0)return"";var x=l>=0?l+u:v+l+u;return y.slice(l,x).join("")}return y.slice(l).join("")}}function ee(i,l){if(!(typeof i>"u")){var u=i.indexOf(l);return u>-1?i.substr(0,u):i}}function oe(i,l){if(!(typeof i>"u")){var u=i.indexOf(l);return u>-1?i.substr(u+l.length):i}}function Se(i){if(!(typeof i>"u"))return i.toLowerCase()}function ve(i){if(!(typeof i>"u"))return i.toUpperCase()}function pe(i){if(!(typeof i>"u"))return Z(i).length}function Le(i){if(!(typeof i>"u")){var l=i.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 nt(i,l,u){if(!(typeof i>"u")){(typeof u>"u"||u.length===0)&&(u=" ");var y;l=Math.trunc(l);var v=Math.abs(l)-pe(i);if(v>0){var x=new Array(v+1).join(u);u.length>1&&(x=N(x,0,v)),l>0?y=i+x:y=x+i}else y=i;return y}}async function ce(i,l){var u=i.apply(this,[l]);if(L(u)&&(u=await u),u&&!(typeof u.start=="number"||u.end==="number"||Array.isArray(u.groups)||w(u.next)))throw{code:"T1010",stack:new Error().stack};return u}async function ge(i,l){if(!(typeof i>"u"||typeof l>"u")){var u;if(typeof l=="string")u=i.indexOf(l)!==-1;else{var y=await ce(l,i);u=typeof y<"u"}return u}}async function tt(i,l,u){if(!(typeof i>"u")){if(u<0)throw{stack:new Error().stack,value:u,code:"D3040",index:3};var y=this.createSequence();if(typeof u>"u"||u>0){var v=0,x=await ce(l,i);if(typeof x<"u")for(;typeof x<"u"&&(typeof u>"u"||v<u);)y.push({match:x.match,index:x.start,groups:x.groups}),x=await ce(x.next),v++}return y}}async function re(i,l,u,y){if(!(typeof i>"u")){var v=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(y<0)throw{code:"D3011",stack:new Error().stack,value:y,index:4};var x;typeof u=="string"?x=function(Te){for(var Ne="",ye=0,Me=u.indexOf("$",ye);Me!==-1&&ye<u.length;){Ne+=u.substring(ye,Me),ye=Me+1;var ht=u.charAt(ye);if(ht==="$")Ne+="$",ye++;else if(ht==="0")Ne+=Te.match,ye++;else{var Je;if(Te.groups.length===0?Je=1:Je=Math.floor(Math.log(Te.groups.length)*Math.LOG10E)+1,Me=parseInt(u.substring(ye,ye+Je),10),Je>1&&Me>Te.groups.length&&(Me=parseInt(u.substring(ye,ye+Je-1),10)),isNaN(Me))Ne+="$";else{if(Te.groups.length>0){var xt=Te.groups[Me-1];typeof xt<"u"&&(Ne+=xt)}ye+=Me.toString().length}}Me=u.indexOf("$",ye)}return Ne+=u.substring(ye),Ne}:x=u;var U="",z=0;if(typeof y>"u"||y>0){var ne=0;if(typeof l=="string"){for(var G=i.indexOf(l,z);G!==-1&&(typeof y>"u"||ne<y);)U+=i.substring(z,G),U+=u,z=G+l.length,ne++,G=i.indexOf(l,z);U+=i.substring(z)}else{var Ae=await ce(l,i);if(typeof Ae<"u"){for(;typeof Ae<"u"&&(typeof y>"u"||ne<y);){U+=i.substring(z,Ae.start);var Pe=x.apply(v,[Ae]);if(L(Pe)&&(Pe=await Pe),typeof Pe=="string")U+=Pe;else throw{code:"D3012",stack:new Error().stack,value:Pe};z=Ae.start+Ae.match.length,ne++,Ae=await ce(Ae.next)}U+=i.substring(z)}else U=i}}else U=i;return U}}function Fe(i){if(!(typeof i>"u")){var l=typeof window<"u"?window.btoa:function(u){return new a.Buffer.from(u,"binary").toString("base64")};return l(i)}}function kt(i){if(!(typeof i>"u")){var l=typeof window<"u"?window.atob:function(u){return new a.Buffer.from(u,"base64").toString("binary")};return l(i)}}function p(i){if(!(typeof i>"u")){var l;try{l=encodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrlComponent"}}return l}}function b(i){if(!(typeof i>"u")){var l;try{l=encodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"encodeUrl"}}return l}}function W(i){if(!(typeof i>"u")){var l;try{l=decodeURIComponent(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrlComponent"}}return l}}function he(i){if(!(typeof i>"u")){var l;try{l=decodeURI(i)}catch{throw{code:"D3140",stack:new Error().stack,value:i,functionName:"decodeUrl"}}return l}}async function xe(i,l,u){if(!(typeof i>"u")){if(u<0)throw{code:"D3020",stack:new Error().stack,value:u,index:3};var y=[];if(typeof u>"u"||u>0)if(typeof l=="string")y=i.split(l,u);else{var v=0,x=await ce(l,i);if(typeof x<"u"){for(var U=0;typeof x<"u"&&(typeof u>"u"||v<u);)y.push(i.substring(U,x.start)),U=x.end,x=await ce(x.next),v++;(typeof u>"u"||v<u)&&y.push(i.substring(U))}else y.push(i)}return y}}function _e(i,l){if(!(typeof i>"u"))return typeof l>"u"&&(l=""),i.join(l)}function S(i,l,u){if(!(typeof i>"u")){var y={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},v=y;typeof u<"u"&&o.keys(u).forEach(function(te){v[te]=u[te]});for(var x=[],U=v["zero-digit"].charCodeAt(0),z=U;z<U+10;z++)x.push(String.fromCharCode(z));var ne=x.concat([v["decimal-separator"],v["exponent-separator"],v["grouping-separator"],v.digit,v["pattern-separator"]]),G=l.split(v["pattern-separator"]);if(G.length>2)throw{code:"D3080",stack:new Error().stack};var Ae=function(te){var Oe=(function(){for(var ze,ot=0;ot<te.length;ot++)if(ze=te.charAt(ot),ne.indexOf(ze)!==-1&&ze!==v["exponent-separator"])return te.substring(0,ot);return""})(),Xe=(function(){for(var ze,ot=te.length-1;ot>=0;ot--)if(ze=te.charAt(ot),ne.indexOf(ze)!==-1&&ze!==v["exponent-separator"])return te.substring(ot+1);return""})(),$e=te.substring(Oe.length,te.length-Xe.length),st,qt,rt,es,it=te.indexOf(v["exponent-separator"],Oe.length);it===-1||it>te.length-Xe.length?(st=$e,qt=void 0):(st=$e.substring(0,it),qt=$e.substring(it+1));var yt=st.indexOf(v["decimal-separator"]);return yt===-1?(rt=st,es=Xe):(rt=st.substring(0,yt),es=st.substring(yt+1)),{prefix:Oe,suffix:Xe,activePart:$e,mantissaPart:st,exponentPart:qt,integerPart:rt,fractionalPart:es,subpicture:te}},Pe=function(te){var Oe,Xe,$e=te.subpicture,st=$e.indexOf(v["decimal-separator"]);st!==$e.lastIndexOf(v["decimal-separator"])&&(Oe="D3081"),$e.indexOf(v.percent)!==$e.lastIndexOf(v.percent)&&(Oe="D3082"),$e.indexOf(v["per-mille"])!==$e.lastIndexOf(v["per-mille"])&&(Oe="D3083"),$e.indexOf(v.percent)!==-1&&$e.indexOf(v["per-mille"])!==-1&&(Oe="D3084");var qt=!1;for(Xe=0;Xe<te.mantissaPart.length;Xe++){var rt=te.mantissaPart.charAt(Xe);if(x.indexOf(rt)!==-1||rt===v.digit){qt=!0;break}}qt||(Oe="D3085");var es=te.activePart.split("").map(function(ze){return ne.indexOf(ze)===-1?"p":"a"}).join("");es.indexOf("p")!==-1&&(Oe="D3086"),st!==-1?($e.charAt(st-1)===v["grouping-separator"]||$e.charAt(st+1)===v["grouping-separator"])&&(Oe="D3087"):te.integerPart.charAt(te.integerPart.length-1)===v["grouping-separator"]&&(Oe="D3088"),$e.indexOf(v["grouping-separator"]+v["grouping-separator"])!==-1&&(Oe="D3089");var it=te.integerPart.indexOf(v.digit);it!==-1&&te.integerPart.substring(0,it).split("").filter(function(ze){return x.indexOf(ze)>-1}).length>0&&(Oe="D3090"),it=te.fractionalPart.lastIndexOf(v.digit),it!==-1&&te.fractionalPart.substring(it).split("").filter(function(ze){return x.indexOf(ze)>-1}).length>0&&(Oe="D3091");var yt=typeof te.exponentPart=="string";if(yt&&te.exponentPart.length>0&&($e.indexOf(v.percent)!==-1||$e.indexOf(v["per-mille"])!==-1)&&(Oe="D3092"),yt&&(te.exponentPart.length===0||te.exponentPart.split("").filter(function(ze){return x.indexOf(ze)===-1}).length>0)&&(Oe="D3093"),Oe)throw{code:Oe,stack:new Error().stack}},Te=function(te){var Oe=function(Ve,or){for(var Fs=[],Lt=Ve.indexOf(v["grouping-separator"]);Lt!==-1;){var ar=(or?Ve.substring(0,Lt):Ve.substring(Lt)).split("").filter(function(ds){return x.indexOf(ds)!==-1||ds===v.digit}).length;Fs.push(ar),Lt=te.integerPart.indexOf(v["grouping-separator"],Lt+1)}return Fs},Xe=Oe(te.integerPart),$e=function(Ve){if(Ve.length===0)return 0;for(var or=function(ar,ds){return ds===0?ar:or(ds,ar%ds)},Fs=Ve.reduce(or),Lt=1;Lt<=Ve.length;Lt++)if(Ve.indexOf(Lt*Fs)===-1)return 0;return Fs},st=$e(Xe),qt=Oe(te.fractionalPart,!0),rt=te.integerPart.split("").filter(function(Ve){return x.indexOf(Ve)!==-1}).length,es=rt,it=te.fractionalPart.split(""),yt=it.filter(function(Ve){return x.indexOf(Ve)!==-1}).length,ze=it.filter(function(Ve){return x.indexOf(Ve)!==-1||Ve===v.digit}).length,ot=typeof te.exponentPart=="string";rt===0&&ze===0&&(ot?(yt=1,ze=1):rt=1),ot&&rt===0&&te.integerPart.indexOf(v.digit)!==-1&&(rt=1),rt===0&&yt===0&&(yt=1);var pi=0;return ot&&(pi=te.exponentPart.split("").filter(function(Ve){return x.indexOf(Ve)!==-1}).length),{integerPartGroupingPositions:Xe,regularGrouping:st,minimumIntegerPartSize:rt,scalingFactor:es,prefix:te.prefix,fractionalPartGroupingPositions:qt,minimumFactionalPartSize:yt,maximumFactionalPartSize:ze,minimumExponentSize:pi,suffix:te.suffix,picture:te.subpicture}},Ne=G.map(Ae);Ne.forEach(Pe);var ye=Ne.map(Te),Me=v["minus-sign"],ht=v["zero-digit"],Je=v["decimal-separator"],xt=v["grouping-separator"];ye.length===1&&(ye.push(JSON.parse(JSON.stringify(ye[0]))),ye[1].prefix=Me+ye[1].prefix);var Ue;i>=0?Ue=ye[0]:Ue=ye[1];var Os;Ue.picture.indexOf(v.percent)!==-1?Os=i*100:Ue.picture.indexOf(v["per-mille"])!==-1?Os=i*1e3:Os=i;var zt,fs;if(Ue.minimumExponentSize===0)zt=Os;else{var $l=Math.pow(10,Ue.scalingFactor),Dl=Math.pow(10,Ue.scalingFactor-1);if(zt=Os,fs=0,zt!==0){for(;Math.abs(zt)<Dl;)zt*=10,fs-=1;for(;Math.abs(zt)>$l;)zt/=10,fs+=1}}var Ol=F(zt,Ue.maximumFactionalPartSize),fi=function(te,Oe){var Xe=Math.abs(te).toFixed(Oe);return ht!=="0"&&(Xe=Xe.split("").map(function($e){return $e>="0"&&$e<="9"?x[$e.charCodeAt(0)-48]:$e}).join("")),Xe},ae=fi(Ol,Ue.maximumFactionalPartSize),Ze=ae.indexOf(".");for(Ze===-1?ae=ae+Je:ae=ae.replace(".",Je);ae.charAt(0)===ht;)ae=ae.substring(1);for(;ae.charAt(ae.length-1)===ht;)ae=ae.substring(0,ae.length-1);Ze=ae.indexOf(Je);var Ls=Ue.minimumIntegerPartSize-Ze,di=Ue.minimumFactionalPartSize-(ae.length-Ze-1);if(ae=(Ls>0?new Array(Ls+1).join(ht):"")+ae,ae=ae+(di>0?new Array(di+1).join(ht):""),Ze=ae.indexOf(Je),Ue.regularGrouping>0)for(var Ll=Math.floor((Ze-1)/Ue.regularGrouping),nr=1;nr<=Ll;nr++)ae=[ae.slice(0,Ze-nr*Ue.regularGrouping),xt,ae.slice(Ze-nr*Ue.regularGrouping)].join("");else Ue.integerPartGroupingPositions.forEach(function(te){ae=[ae.slice(0,Ze-te),xt,ae.slice(Ze-te)].join(""),Ze++});if(Ze=ae.indexOf(Je),Ue.fractionalPartGroupingPositions.forEach(function(te){ae=[ae.slice(0,te+Ze+1),xt,ae.slice(te+Ze+1)].join("")}),Ze=ae.indexOf(Je),(Ue.picture.indexOf(Je)===-1||Ze===ae.length-1)&&(ae=ae.substring(0,ae.length-1)),typeof fs<"u"){var ir=fi(fs,0);Ls=Ue.minimumExponentSize-ir.length,Ls>0&&(ir=new Array(Ls+1).join(ht)+ir),ae=ae+v["exponent-separator"]+(fs<0?Me:"")+ir}return ae=Ue.prefix+ae+Ue.suffix,ae}}function D(i,l){if(!(typeof i>"u")){if(i=F(i),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var u=i.toString(l);return u}}function P(i){var l;if(!(typeof i>"u")){if(typeof i=="number")l=i;else if(typeof i=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(i)&&!isNaN(parseFloat(i))&&isFinite(i))l=parseFloat(i);else if(typeof i=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(i))l=Number(i);else if(i===!0)l=1;else if(i===!1)l=0;else throw{code:"D3030",value:i,stack:new Error().stack,index:1};return l}}function I(i){var l;if(!(typeof i>"u"))return l=Math.abs(i),l}function q(i){var l;if(!(typeof i>"u"))return l=Math.floor(i),l}function j(i){var l;if(!(typeof i>"u"))return l=Math.ceil(i),l}function F(i,l){var u;if(!(typeof i>"u")){if(l){var y=i.toString().split("e");i=+(y[0]+"e"+(y[1]?+y[1]+l:l))}u=Math.round(i);var v=u-i;return Math.abs(v)===.5&&Math.abs(u%2)===1&&(u=u-1),l&&(y=u.toString().split("e"),u=+(y[0]+"e"+(y[1]?+y[1]-l:-l))),Object.is(u,-0)&&(u=0),u}}function B(i){var l;if(!(typeof i>"u")){if(i<0)throw{stack:new Error().stack,code:"D3060",index:1,value:i};return l=Math.sqrt(i),l}}function Y(i,l){var u;if(!(typeof i>"u")){if(u=Math.pow(i,l),!isFinite(u))throw{stack:new Error().stack,code:"D3061",index:1,value:i,exp:l};return u}}function fe(){return Math.random()}function le(i){if(!(typeof i>"u")){var l=!1;if(Array.isArray(i)){if(i.length===1)l=le(i[0]);else if(i.length>1){var u=i.filter(function(y){return le(y)});l=u.length>0}}else typeof i=="string"?i.length>0&&(l=!0):d(i)?i!==0&&(l=!0):i!==null&&typeof i=="object"&&!w(i)?o.keys(i).length>0&&(l=!0):typeof i=="boolean"&&i===!0&&(l=!0);return l}}function Q(i){if(!(typeof i>"u"))return!le(i)}function K(i,l,u,y){var v=[l],x=R(i);return x>=2&&v.push(u),x>=3&&v.push(y),v}async function ue(i,l){if(!(typeof i>"u")){for(var u=this.createSequence(),y=0;y<i.length;y++){var v=K(l,i[y],y,i),x=await l.apply(this,v);typeof x<"u"&&u.push(x)}return u}}async function J(i,l){if(!(typeof i>"u")){for(var u=this.createSequence(),y=0;y<i.length;y++){var v=i[y],x=K(l,v,y,i),U=await l.apply(this,x);le(U)&&u.push(v)}return u}}async function He(i,l){if(!(typeof i>"u")){for(var u=!1,y,v=0;v<i.length;v++){var x=i[v],U=!0;if(typeof l<"u"){var z=K(l,x,v,i),ne=await l.apply(this,z);U=le(ne)}if(U)if(!u)y=x,u=!0;else throw{stack:new Error().stack,code:"D3138",index:v}}if(!u)throw{stack:new Error().stack,code:"D3139"};return y}}function ut(){for(var i=[],l=Array.prototype.slice.call(arguments),u=Math.min.apply(Math,l.map(function(x){return Array.isArray(x)?x.length:0})),y=0;y<u;y++){var v=l.map(x=>x[y]);i.push(v)}return i}async function Ye(i,l,u){if(!(typeof i>"u")){var y,v=R(l);if(v<2)throw{stack:new Error().stack,code:"D3050",index:1};var x;for(typeof u>"u"&&i.length>0?(y=i[0],x=1):(y=u,x=0);x<i.length;){var U=[y,i[x]];v>=3&&U.push(x),v>=4&&U.push(i),y=await l.apply(this,U),x++}return y}}function Ie(i){var l=this.createSequence();if(Array.isArray(i)){for(var u=Object.create(null),y=0;y<i.length;y++){var v=Ie.call(this,i[y]);v.forEach(function(x){u[x]=!0})}l=Ie.call(this,u)}else i!==null&&typeof i=="object"&&!w(i)&&o.keys(i).forEach(x=>l.push(x));return l}function Ke(i,l){var u;if(Array.isArray(i)){u=this.createSequence();for(var y=0;y<i.length;y++){var v=Ke.call(this,i[y],l);typeof v<"u"&&(Array.isArray(v)?v.forEach(x=>u.push(x)):u.push(v))}}else i!==null&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,l)&&!w(i)&&(u=i[l]);return u}function Ot(i,l){if(typeof i>"u")return l;if(typeof l>"u")return i;Array.isArray(i)||(i=this.createSequence(i)),Array.isArray(l)||(l=[l]);const u=i.length+l.length;if(this.options&&u>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:u};return i.concat(l)}function us(i){return!(typeof i>"u")}function hs(i){var l=this.createSequence();if(Array.isArray(i))for(var u=0;u<i.length;u++)l=Ot.call(this,l,hs.call(this,i[u]));else if(i!==null&&typeof i=="object"&&!E(i))for(const v of o.keys(i)){var y=Object.create(null);y[v]=i[v],l.push(y)}else l=i;return l}function H(i){if(!(typeof i>"u")){var l=Object.create(null);return i.forEach(function(u){for(const y of o.keys(u))l[y]=u[y]}),l}}function sr(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var l=i.length,u=new Array(l),y=0;y<l;y++)u[l-y-1]=i[y];return u}}async function rr(i,l){var u=this.createSequence();for(const x of o.keys(i)){var y=K(l,i[x],x,i),v=await l.apply(this,y);typeof v<"u"&&u.push(v)}return u}function mt(i){throw{code:"D3137",stack:new Error().stack,message:i||"$error() function evaluated"}}function Ds(i,l){if(!i)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function St(i){if(i!==void 0)return i===null?"null":d(i)?"number":typeof i=="string"?"string":typeof i=="boolean"?"boolean":Array.isArray(i)?"array":w(i)?"function":"object"}async function Qt(i,l){if(!(typeof i>"u")){if(i.length<=1)return i;var u;if(typeof l>"u"){if(!$(i)&&!C(i))throw{stack:new Error().stack,code:"D3070",index:1};u=async function(U,z){return U>z}}else u=l;var y=async function(U,z){var ne=async function(Ae,Pe,Te){Pe.length===0?Array.prototype.push.apply(Ae,Te):Te.length===0?Array.prototype.push.apply(Ae,Pe):await u(Pe[0],Te[0])?(Ae.push(Te[0]),await ne(Ae,Pe,Te.slice(1))):(Ae.push(Pe[0]),await ne(Ae,Pe.slice(1),Te))},G=[];return await ne(G,U,z),G},v=async function(U){if(!Array.isArray(U)||U.length<=1)return U;var z=Math.floor(U.length/2),ne=U.slice(0,z),G=U.slice(z);return ne=await v(ne),G=await v(G),await y(ne,G)},x=await v(i);return x}}function c(i){if(!(typeof i>"u")){if(i.length<=1)return i;for(var l=new Array(i.length),u=0;u<i.length;u++){var y=Math.floor(Math.random()*(u+1));u!==y&&(l[u]=l[y]),l[y]=i[u]}return l}}function f(i){if(!(typeof i>"u")){if(!Array.isArray(i)||i.length<=1)return i;for(var l=k(i)?this.createSequence():[],u=0;u<i.length;u++){for(var y=i[u],v=!1,x=0;x<l.length;x++)if(X(y,l[x])){v=!0;break}v||l.push(y)}return l}}async function g(i,l){var u=Object.create(null);for(const U of o.keys(i)){var y=i[U],v=K(l,y,U,i),x=await l.apply(this,v);le(x)&&(u[U]=y)}return o.keys(u).length===0&&(u=void 0),u}return{sum:A,count:m,max:M,min:_,average:T,string:V,substring:N,substringBefore:ee,substringAfter:oe,lowercase:Se,uppercase:ve,length:pe,trim:Le,pad:nt,match:tt,contains:ge,replace:re,split:xe,join:_e,formatNumber:S,formatBase:D,number:P,floor:q,ceil:j,round:F,abs:I,sqrt:B,power:Y,random:fe,boolean:le,not:Q,map:ue,zip:ut,filter:J,single:He,foldLeft:Ye,sift:g,keys:Ie,lookup:Ke,append:Ot,exists:us,spread:hs,merge:H,reverse:sr,each:rr,error:mt,assert:Ds,type:St,sort:Qt,shuffle:c,distinct:f,base64encode:Fe,base64decode:kt,encodeUrlComponent:p,encodeUrl:b,decodeUrlComponent:W,decodeUrl:he}})();s.exports=h}).call(this)}).call(this,typeof hn<"u"?hn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,s,n){var a=t("./datetime"),o=t("./functions"),h=t("./utils"),d=t("./parser"),C=t("./signature"),$=(function(){var k=h.isNumeric,w=h.isArrayOfStrings,E=h.isArrayOfNumbers,L=h.isSequence,R=h.isFunction,X=h.isLambda,Z=h.isIterable,A=h.isPromise,m=h.getFunctionArity,M=h.isDeepEqual,_=mt(null);async function T(c,f,g){var i;g.base.depth++,g.base.guardrails();var l=g.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(c,f,g),c.type){case"path":i=await V(c,f,g);break;case"binary":i=await pe(c,f,g);break;case"unary":i=await Le(c,f,g);break;case"name":i=nt(c,f,g);break;case"string":case"number":case"value":i=ce(c);break;case"wildcard":i=ge(c,f,g);break;case"descendant":i=re(c,f,g);break;case"parent":i=g.lookup(c.slot.label);break;case"condition":i=await q(c,f,g);break;case"block":i=await j(c,f,g);break;case"bind":i=await I(c,f,g);break;case"regex":i=F(c,f,g);break;case"function":i=await K(c,f,g);break;case"variable":i=B(c,f,g);break;case"lambda":i=He(c,f,g);break;case"partial":i=await ut(c,f,g);break;case"apply":i=await Q(c,f,g);break;case"transform":i=fe(c,f,g);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var u=0;u<c.predicate.length;u++)i=await ve(c.predicate[u].expr,i,g);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(i=await S(c.group,i,g));var y=g.lookup(Symbol.for("jsonata.__evaluate_exit"));return y&&await y(c,f,g,i),i&&L(i)&&!i.tupleStream&&(c.keepArray&&(i.keepSingleton=!0),i.length===0?i=void 0:i.length===1&&(i=i.keepSingleton?i:i[0])),g.base.depth--,i}async function V(c,f,g){var i;Array.isArray(f)&&c.steps[0].type!=="variable"?i=f:i=g.base.createSequence(f);for(var l,u=!1,y=void 0,v=0;v<c.steps.length;v++){var x=c.steps[v];if(x.tuple&&(u=!0),v===0&&x.consarray?l=await T(x,i,g):u?y=await Se(x,i,y,g):l=await ee(x,i,g,v===c.steps.length-1),!u&&(typeof l>"u"||l.length===0))break;typeof x.focus>"u"&&(i=l)}if(u)if(c.tuple)l=y;else for(l=g.base.createSequence(),v=0;v<y.length;v++)l.push(y[v]["@"]);return c.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=g.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(l=await S(c.group,u?y:l,g)),l}function N(c,f){var g=mt(c);for(const i of h.keys(f))g.bind(i,f[i]);return g}async function ee(c,f,g,i){var l;if(c.type==="sort")return l=await Y(c,f,g),c.stages&&(l=await oe(c.stages,l,g)),l;l=g.base.createSequence();for(var u=0;u<f.length;u++){var y=await T(c,f[u],g);if(c.stages)for(var v=0;v<c.stages.length;v++)y=await ve(c.stages[v].expr,y,g);typeof y<"u"&&l.push(y)}var x=g.base.createSequence();return i&&l.length===1&&Array.isArray(l[0])&&!L(l[0])?x=l[0]:Array.prototype.forEach.call(l,function(U){!Array.isArray(U)||U.cons?x.push(U):Array.prototype.forEach.call(U,z=>x.push(z))}),x}async function oe(c,f,g){for(var i=f,l=0;l<c.length;l++){var u=c[l];switch(u.type){case"filter":i=await ve(u.expr,i,g);break;case"index":for(var y=0;y<i.length;y++){var v=i[y];v[u.value]=y}break}}return i}async function Se(c,f,g,i){var l;if(c.type==="sort"){if(g)l=await Y(c,g,i);else{var u=await Y(c,f,i);l=i.base.createSequence(),l.tupleStream=!0;for(var y=0;y<u.length;y++){var v={"@":u[y]};v[c.index]=y,l.push(v)}}return c.stages&&(l=await oe(c.stages,l,i)),l}l=i.base.createSequence(),l.tupleStream=!0;var x=i;g===void 0&&(g=f.map(G=>({"@":G})));for(var U=0;U<g.length;U++){x=N(i,g[U]);var z=await T(c,g[U]["@"],x);if(typeof z<"u"){Array.isArray(z)||(z=[z]);for(var ne=0;ne<z.length;ne++)v=Object.create(null),Object.assign(v,g[U]),z.tupleStream?Object.assign(v,z[ne]):(c.focus?(v[c.focus]=z[ne],v["@"]=g[U]["@"]):v["@"]=z[ne],c.index&&(v[c.index]=ne),c.ancestor&&(v[c.ancestor.label]=g[U]["@"])),l.push(v)}}return c.stages&&(l=await oe(c.stages,l,i)),l}async function ve(c,f,g){var i=g.base.createSequence();if(f&&f.tupleStream&&(i.tupleStream=!0),Array.isArray(f)||(f=g.base.createSequence(f)),c.type==="number"){var l=Math.floor(c.value);l<0&&(l=f.length+l);var u=await f[l];typeof u<"u"&&(Array.isArray(u)?i=u:i.push(u))}else for(l=0;l<f.length;l++){var u=f[l],y=u,v=g;f.tupleStream&&(y=u["@"],v=N(g,u));var x=await T(c,y,v);k(x)&&(x=[x]),E(x)?Array.prototype.forEach.call(x,function(z){var ne=Math.floor(z);ne<0&&(ne=f.length+ne),ne===l&&i.push(u)}):o.boolean(x)&&i.push(u)}return i}async function pe(c,f,g){var i,l=await T(c.lhs,f,g),u=c.value,y=async()=>await T(c.rhs,f,g);if(u==="and"||u==="or")try{return await he(l,y,u)}catch(x){throw x.position=c.position,x.token=u,x}var v=await y();try{switch(u){case"+":case"-":case"*":case"/":case"%":i=kt(l,v,u);break;case"=":case"!=":i=p(l,v,u);break;case"<":case"<=":case">":case">=":i=b(l,v,u);break;case"&":i=_e(l,v);break;case"..":i=P(l,v,g);break;case"in":i=W(l,v);break}}catch(x){throw x.position=c.position,x.token=u,x}return i}async function Le(c,f,g){var i,l={options:g.base.options,createSequence:g.base.createSequence};switch(c.value){case"-":if(i=await T(c.expression,f,g),typeof i>"u")i=void 0;else if(k(i))i=-i;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:i};break;case"[":i=[];let v=await Promise.all(c.expressions.map(async(x,U)=>(g.isParallelCall=U>0,[x,await T(x,f,g)])));for(let x of v){var[u,y]=x;typeof y<"u"&&(u.value==="["?i.push(y):i=o.append.call(l,i,y))}c.consarray&&Object.defineProperty(i,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":i=await S(c,f,g);break}return i}function nt(c,f,g){var i={createSequence:g.base.createSequence};return o.lookup.call(i,f,c.value)}function ce(c){return c.value}function ge(c,f,g){var i={options:g.base.options,createSequence:g.base.createSequence},l=i.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!R(f)&&h.keys(f).forEach(function(u){var y=f[u];Array.isArray(y)?(y=tt(y),l=o.append.call(i,l,y)):l.push(y)}),l}function tt(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(g){tt(g,f)}):f.push(c),f}function re(c,f,g){var i,l=g.base.createSequence();return typeof f<"u"&&(Fe(f,l),l.length===1?i=l[0]:i=l),i}function Fe(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(g){Fe(g,f)}):c!==null&&typeof c=="object"&&!R(c)&&h.keys(c).forEach(function(g){Fe(c[g],f)})}function kt(c,f,g){var i;if(typeof c<"u"&&!k(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!k(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return i;switch(g){case"+":i=c+f;break;case"-":i=c-f;break;case"*":i=c*f;break;case"/":i=c/f;break;case"%":i=c%f;break}return i}function p(c,f,g){var i,l=typeof c,u=typeof f;if(l==="undefined"||u==="undefined")return!1;switch(g){case"=":i=M(c,f);break;case"!=":i=!M(c,f);break}return i}function b(c,f,g){var i,l=typeof c,u=typeof f,y=l==="undefined"||l==="string"||l==="number",v=u==="undefined"||u==="string"||u==="number";if(!y||!v)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?f:c};if(!(l==="undefined"||u==="undefined")){if(l!==u)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(g){case"<":i=c<f;break;case"<=":i=c<=f;break;case">":i=c>f;break;case">=":i=c>=f;break}return i}}function W(c,f){var g=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var i=0;i<f.length;i++)if(f[i]===c){g=!0;break}return g}async function he(c,f,g){var i,l=xe(c);switch(g){case"and":i=l&&xe(await f());break;case"or":i=l||xe(await f());break}return i}function xe(c){var f=o.boolean(c);return typeof f>"u"?!1:f}function _e(c,f){var g,i="",l="";return typeof c<"u"&&(i=o.string(c)),typeof f<"u"&&(l=o.string(f)),g=i.concat(l),g}async function S(c,f,g){var i=Object.create(null),l=Object.create(null),u=!!(f&&f.tupleStream),y={options:g.base.options,createSequence:g.base.createSequence};Array.isArray(f)||(g.base.options,f=y.createSequence(f)),f.length===0&&!u&&f.push(void 0);for(var v=0;v<f.length;v++)for(var x=f[v],U=u?N(g,x):g,z=0;z<c.lhs.length;z++){var ne=c.lhs[z],G=await T(ne[0],u?x["@"]:x,U);if(typeof G!="string"&&G!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:G};if(G!==void 0){if(G==="_jsonata_lambda"||G==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:G};var Ae={data:x,exprIndex:z};if(Object.prototype.hasOwnProperty.call(l,G)){if(l[G].exprIndex!==z)throw{code:"D1009",stack:new Error().stack,position:c.position,value:G};l[G].data=o.append.call(y,l[G].data,x)}else l[G]=Ae}}let Pe=await Promise.all(h.keys(l).map(async(Ne,ye)=>{let Me=l[Ne];var ht=Me.data,Je=g;if(u){var xt=D(Me.data,g);ht=xt["@"],delete xt["@"],Je=N(g,xt)}return g.isParallelCall=ye>0,[Ne,await T(c.lhs[Me.exprIndex][1],ht,Je)]}));for(let Ne of Pe){var[G,Te]=await Ne;typeof Te<"u"&&(i[G]=Te)}return i}function D(c,f){if(!Array.isArray(c))return c;var g=Object.create(null),i={options:f.base.options,createSequence:f.base.createSequence};Object.assign(g,c[0]);for(var l=1;l<c.length;l++)for(const u of h.keys(c[l]))g[u]=o.append.call(i,g[u],c[l][u]);return g}function P(c,f,g){var i;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return i;var l=f-c+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(g.base.options&&l>g.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};i=new Array(l);for(var u=c,y=0;u<=f;u++,y++)i[y]=u;return i.sequence=!0,i}async function I(c,f,g){var i=await T(c.rhs,f,g);return g.bind(c.lhs.value,i),i}async function q(c,f,g){var i,l=await T(c.condition,f,g);return o.boolean(l)?i=await T(c.then,f,g):typeof c.else<"u"&&(i=await T(c.else,f,g)),i}async function j(c,f,g){for(var i,l=mt(g),u=0;u<c.expressions.length;u++)i=await T(c.expressions[u],f,l);return i}function F(c,f,g){var i=new g.base.RegexEngine(c.value),l=function(u,y){var v;i.lastIndex=y||0;var x=i.exec(u);if(x!==null){if(v={match:x[0],start:x.index,end:x.index+x[0].length,groups:[]},x.length>1)for(var U=1;U<x.length;U++)v.groups.push(x[U]);v.next=function(){if(!(i.lastIndex>=u.length)){var z=l(u,i.lastIndex);if(z&&z.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return z}}}return v};return l}function B(c,f,g){var i;return c.value===""?i=f&&f.outerWrapper?f[0]:f:i=g.lookup(c.value),i}async function Y(c,f,g){var i,l=f,u=!!f.tupleStream,y=async function(x,U){for(var z=0,ne=0;z===0&&ne<c.terms.length;ne++){var G=c.terms[ne],Ae=x,Pe=g;u&&(Ae=x["@"],Pe=N(g,x));var Te=await T(G.expression,Ae,Pe);Ae=U,Pe=g,u&&(Ae=U["@"],Pe=N(g,U));var Ne=await T(G.expression,Ae,Pe),ye=typeof Te,Me=typeof Ne;if(ye==="undefined"){z=Me==="undefined"?0:1;continue}if(Me==="undefined"){z=-1;continue}if(!(ye==="string"||ye==="number")||!(Me==="string"||Me==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:ye==="string"||ye==="number"?Ne:Te};if(ye!==Me)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Te,value2:Ne};Te!==Ne&&(Te<Ne?z=-1:z=1,G.descending===!0&&(z=-z))}return z===1},v={environment:g,input:f};return i=await o.sort.apply(v,[l,y]),i}function fe(c,f,g){var i=async function(l){if(!(typeof l>"u")){var u=g.lookup("clone");if(!R(u))throw{code:"T2013",stack:new Error().stack,position:c.position};var y=await ue(u,[l],null,g),v=await T(c.pattern,y,g);if(typeof v<"u"){Array.isArray(v)||(v=[v]);for(var x=0;x<v.length;x++){var U=v[x],z=await T(c.update,U,g),ne=typeof z;if(ne!=="undefined"){if(ne!=="object"||z===null||Array.isArray(z))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:z};for(const Te of h.keys(z))U[Te]=z[Te]}if(typeof c.delete<"u"){var G=await T(c.delete,U,g);if(typeof G<"u"){var Ae=G;if(Array.isArray(G)||(G=[G]),!w(G))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:Ae};for(var Pe=0;Pe<G.length;Pe++)typeof U=="object"&&U!==null&&delete U[G[Pe]]}}}}return y}};return H(i,"<(oa):o>")}var le=d("function($f, $g) { function($x){ $g($f($x)) } }");async function Q(c,f,g){var i,l=await T(c.lhs,f,g);if(c.rhs.type==="function")i=await K(c.rhs,f,g,{context:l});else{var u=await T(c.rhs,f,g);if(!R(u))throw{code:"T2006",stack:new Error().stack,position:c.position,value:u};if(R(l)){var y=await T(le,null,g);i=await ue(y,[l,u],null,g)}else i=await ue(u,[l],null,g)}return i}async function K(c,f,g,i){var l,u=await T(c.procedure,f,g);if(typeof u>"u"&&c.procedure.type==="path"&&g.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var y=[];typeof i<"u"&&y.push(i.context);for(var v=0;v<c.arguments.length;v++){const U=await T(c.arguments[v],f,g);if(R(U)){const z=async function(...ne){return await ue(U,ne,null,g)};z.arity=m(U),y.push(z)}else y.push(U)}var x=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof u=="object"&&(u.token=x,u.position=c.position),l=await ue(u,y,f,g)}catch(U){throw U.position||(U.position=c.position),U.token||(U.token=x),U}return l}async function ue(c,f,g,i){var l;for(l=await J(c,f,g,i);X(l)&&l.thunk===!0;){var u=await T(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(u.token=l.body.procedure.value),u.position=l.body.procedure.position;for(var y=[],v=0;v<l.body.arguments.length;v++)y.push(await T(l.body.arguments[v],l.input,l.environment));l=await J(u,y,g,i)}return l}async function J(c,f,g,i){var l;try{var u=f;if(c&&(u=Ye(c.signature,f,g)),X(c))l=await Ie(c,u);else if(c&&c._jsonata_function===!0){var y={environment:i,input:g,options:i.base.options,createSequence:i.base.createSequence};l=c.implementation.apply(y,u),Z(l)&&(l=l.next().value),A(l)&&(l=await l)}else if(typeof c=="function")l=c.apply(g,u),A(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(v){throw c&&(typeof v.token>"u"&&typeof c.token<"u"&&(v.token=c.token),v.position=c.position||v.position),v}return l}function He(c,f,g){var i={_jsonata_lambda:!0,input:f,environment:g,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(i.thunk=!0),i.apply=async function(l,u){return await ue(i,u,f,l?l.environment:g)},i}async function ut(c,f,g){for(var i,l=[],u=0;u<c.arguments.length;u++){var y=c.arguments[u];y.type==="operator"&&y.value==="?"?l.push(y):l.push(await T(y,f,g))}var v=await T(c.procedure,f,g);if(typeof v>"u"&&c.procedure.type==="path"&&g.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(X(v))i=Ke(v,l,g);else if(v&&v._jsonata_function===!0)i=Ot(v.implementation,l,g);else if(typeof v=="function")i=Ot(v,l,g);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return i}function Ye(c,f,g){if(typeof c>"u")return f;var i=c.validate(f,g);return i}async function Ie(c,f){var g,i=mt(c.environment);return Array.prototype.forEach.call(c.arguments,function(l,u){i.bind(l.value,f[u])}),typeof c.body=="function"?g=await us(c.body,i):g=await T(c.body,c.input,i),g}function Ke(c,f,g){var i=mt(c.environment||g),l=[];Array.prototype.forEach.call(c.arguments,function(y,v){var x=f[v];x&&x.type==="operator"&&x.value==="?"?l.push(y):i.bind(y.value,x)});var u={_jsonata_lambda:!0,input:c.input,environment:i,arguments:l,body:c.body};return u}function Ot(c,f,g){var i=hs(c);i=i.map(function(v){return"$"+v.trim()});var l="function("+i.join(", ")+"){ _ }",u=d(l);u.body=c;var y=Ke(u,f,g);return y}async function us(c,f){var g=hs(c),i=g.map(function(y){return f.lookup(y.trim())}),l={environment:f,createSequence:f.base.createSequence},u=c.apply(l,i);return A(u)&&(u=await u),u}function hs(c){var f=c.toString(),g=/\(([^)]*)\)/.exec(f)[1],i=g.split(",");return i}function H(c,f){var g={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(g.signature=C(f)),g}async function sr(c,f){if(!(typeof c>"u")){var g=this.input;typeof f<"u"&&(g=f,Array.isArray(g)&&!L(g)&&(g=this.createSequence(g),g.outerWrapper=!0));try{var i=d(c,!1)}catch(u){throw St(u),{stack:new Error().stack,code:"D3120",value:u.message,error:u}}try{var l=await T(i,g,this.environment)}catch(u){throw St(u),{stack:new Error().stack,code:"D3121",value:u.message,error:u}}return l}}function rr(c){if(!(typeof c>"u"))return JSON.parse(o.string(c))}function mt(c){var f=Object.create(null);const g={bind:function(l,u){f[l]=u},lookup:function(l){var u;return Object.prototype.hasOwnProperty.call(f,l)?u=f[l]:c&&(u=c.lookup(l)),u},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var i=c.lookup(Symbol.for("jsonata.__createFrame_push"));i&&i(c,g),g.base=c.base}return g}_.bind("sum",H(o.sum,"<a<n>:n>")),_.bind("count",H(o.count,"<a:n>")),_.bind("max",H(o.max,"<a<n>:n>")),_.bind("min",H(o.min,"<a<n>:n>")),_.bind("average",H(o.average,"<a<n>:n>")),_.bind("string",H(o.string,"<x-b?:s>")),_.bind("substring",H(o.substring,"<s-nn?:s>")),_.bind("substringBefore",H(o.substringBefore,"<s-s:s>")),_.bind("substringAfter",H(o.substringAfter,"<s-s:s>")),_.bind("lowercase",H(o.lowercase,"<s-:s>")),_.bind("uppercase",H(o.uppercase,"<s-:s>")),_.bind("length",H(o.length,"<s-:n>")),_.bind("trim",H(o.trim,"<s-:s>")),_.bind("pad",H(o.pad,"<s-ns?:s>")),_.bind("match",H(o.match,"<s-f<s:o>n?:a<o>>")),_.bind("contains",H(o.contains,"<s-(sf):b>")),_.bind("replace",H(o.replace,"<s-(sf)(sf)n?:s>")),_.bind("split",H(o.split,"<s-(sf)n?:a<s>>")),_.bind("join",H(o.join,"<a<s>s?:s>")),_.bind("formatNumber",H(o.formatNumber,"<n-so?:s>")),_.bind("formatBase",H(o.formatBase,"<n-n?:s>")),_.bind("formatInteger",H(a.formatInteger,"<n-s:s>")),_.bind("parseInteger",H(a.parseInteger,"<s-s:n>")),_.bind("number",H(o.number,"<(nsb)-:n>")),_.bind("floor",H(o.floor,"<n-:n>")),_.bind("ceil",H(o.ceil,"<n-:n>")),_.bind("round",H(o.round,"<n-n?:n>")),_.bind("abs",H(o.abs,"<n-:n>")),_.bind("sqrt",H(o.sqrt,"<n-:n>")),_.bind("power",H(o.power,"<n-n:n>")),_.bind("random",H(o.random,"<:n>")),_.bind("boolean",H(o.boolean,"<x-:b>")),_.bind("not",H(o.not,"<x-:b>")),_.bind("map",H(o.map,"<af>")),_.bind("zip",H(o.zip,"<a+>")),_.bind("filter",H(o.filter,"<af>")),_.bind("single",H(o.single,"<af?>")),_.bind("reduce",H(o.foldLeft,"<afj?:j>")),_.bind("sift",H(o.sift,"<o-f?:o>")),_.bind("keys",H(o.keys,"<x-:a<s>>")),_.bind("lookup",H(o.lookup,"<x-s:x>")),_.bind("append",H(o.append,"<xx:a>")),_.bind("exists",H(o.exists,"<x:b>")),_.bind("spread",H(o.spread,"<x-:a<o>>")),_.bind("merge",H(o.merge,"<a<o>:o>")),_.bind("reverse",H(o.reverse,"<a:a>")),_.bind("each",H(o.each,"<o-f:a>")),_.bind("error",H(o.error,"<s?:x>")),_.bind("assert",H(o.assert,"<bs?:x>")),_.bind("type",H(o.type,"<x:s>")),_.bind("sort",H(o.sort,"<af?:a>")),_.bind("shuffle",H(o.shuffle,"<a:a>")),_.bind("distinct",H(o.distinct,"<x:x>")),_.bind("base64encode",H(o.base64encode,"<s-:s>")),_.bind("base64decode",H(o.base64decode,"<s-:s>")),_.bind("encodeUrlComponent",H(o.encodeUrlComponent,"<s-:s>")),_.bind("encodeUrl",H(o.encodeUrl,"<s-:s>")),_.bind("decodeUrlComponent",H(o.decodeUrlComponent,"<s-:s>")),_.bind("decodeUrl",H(o.decodeUrl,"<s-:s>")),_.bind("eval",H(sr,"<sx?:x>")),_.bind("toMillis",H(a.toMillis,"<s-s?:n>")),_.bind("fromMillis",H(a.fromMillis,"<n-s?s?:s>")),_.bind("clone",H(rr,"<(oa)-:o>"));var Ds={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 St(c){var f=Ds[c.code];if(typeof f<"u"){var g=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});g=g.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=g}}function Qt(c,f){var g,i;try{g=d(c,f&&f.recover),i=g.errors,delete g.errors}catch(y){throw St(y),y}var l=mt(_),u=new Date;return l.bind("now",H(function(y,v){return a.fromMillis(u.getTime(),y,v)},"<s?s?:s>")),l.bind("millis",H(function(){return u.getTime()},"<:n>")),{evaluate:async function(y,v,x){if(typeof i<"u"){var U={code:"S0500",position:0};throw St(U),U}const z=mt(l);for(const G of h.keys(v))z.bind(G,v[G]);if(z.bind("$",y),u=new Date,z.timestamp=u,z.options=f,z.createSequence=function(){var G=[];return f&&f.sequence&&(G.push=function(...Ae){if(G.length+Ae.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(G,Ae)}),G.sequence=!0,arguments.length===1&&G.push(arguments[0]),G},Array.isArray(y)&&!L(y)&&(y=z.createSequence(y),y.outerWrapper=!0),f&&(f.timeout||f.stack)){const G=Date.now();z.guardrails=function(){if(f.stack>0&&z.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-G>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else z.guardrails=function(){};z.base=z,z.depth=0,f&&f.RegexEngine?z.RegexEngine=f.RegexEngine:z.RegexEngine=RegExp;var ne;try{return ne=await T(g,y,z),typeof x=="function"&&x(null,ne),ne}catch(G){throw St(G),G}},assign:function(y,v){l.bind(y,v)},registerFunction:function(y,v,x){var U=H(v,x);l.bind(y,U)},ast:function(){return g},errors:function(){return i}}}return Qt.parser=d,Qt})();s.exports=$},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,s,n){var a=t("./signature");const o=(()=>{var h={".":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},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
44
- `,r:"\r",t:" "},C=function(k){var w=0,E=k.length,L=function(Z,A){var m={type:Z,value:A,position:w};return m},R=function(){for(var Z=w,A=0,m,M,_=function(V){if(k.charAt(V)==="/"&&A===0){for(var N=0;k.charAt(V-(N+1))==="\\";)N++;if(N%2===0)return!0}return!1};w<E;){var T=k.charAt(w);if(_(w)){if(m=k.substring(Z,w),m==="")throw{code:"S0301",stack:new Error().stack,position:w};for(w++,T=k.charAt(w),Z=w;T==="i"||T==="m";)w++,T=k.charAt(w);return M=k.substring(Z,w)+"g",new RegExp(m,M)}(T==="("||T==="["||T==="{")&&k.charAt(w-1)!=="\\"&&A++,(T===")"||T==="]"||T==="}")&&k.charAt(w-1)!=="\\"&&A--,w++}throw{code:"S0302",stack:new Error().stack,position:w}},X=function(Z){if(w>=E)return null;for(var A=k.charAt(w);w<E&&`
45
- \r\v`.indexOf(A)>-1;)w++,A=k.charAt(w);if(A==="/"&&k.charAt(w+1)==="*"){var m=w;for(w+=2,A=k.charAt(w);!(A==="*"&&k.charAt(w+1)==="/");)if(A=k.charAt(++w),w>=E)throw{code:"S0106",stack:new Error().stack,position:m};return w+=2,A=k.charAt(w),X(Z)}if(Z!==!0&&A==="/")return w++,L("regex",R());if(A==="."&&k.charAt(w+1)===".")return w+=2,L("operator","..");if(A===":"&&k.charAt(w+1)==="=")return w+=2,L("operator",":=");if(A==="!"&&k.charAt(w+1)==="=")return w+=2,L("operator","!=");if(A===">"&&k.charAt(w+1)==="=")return w+=2,L("operator",">=");if(A==="<"&&k.charAt(w+1)==="=")return w+=2,L("operator","<=");if(A==="*"&&k.charAt(w+1)==="*")return w+=2,L("operator","**");if(A==="~"&&k.charAt(w+1)===">")return w+=2,L("operator","~>");if(A==="?"&&k.charAt(w+1)===":")return w+=2,L("operator","?:");if(A==="?"&&k.charAt(w+1)==="?")return w+=2,L("operator","??");if(Object.prototype.hasOwnProperty.call(h,A))return w++,L("operator",A);if(A==='"'||A==="'"){var M=A;w++;for(var _="";w<E;){if(A=k.charAt(w),A==="\\")if(w++,A=k.charAt(w),Object.prototype.hasOwnProperty.call(d,A))_+=d[A];else if(A==="u"){var T=k.substr(w+1,4);if(/^[0-9a-fA-F]+$/.test(T)){var V=parseInt(T,16);_+=String.fromCharCode(V),w+=4}else throw{code:"S0104",stack:new Error().stack,position:w}}else throw{code:"S0103",stack:new Error().stack,position:w,token:A};else{if(A===M)return w++,L("string",_);_+=A}w++}throw{code:"S0101",stack:new Error().stack,position:w}}var N=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ee=N.exec(k.substring(w));if(ee!==null){var oe=parseFloat(ee[0]);if(!isNaN(oe)&&isFinite(oe))return w+=ee[0].length,L("number",oe);throw{code:"S0102",stack:new Error().stack,position:w,token:ee[0]}}var Se;if(A==="`"){w++;var ve=k.indexOf("`",w);if(ve!==-1)return Se=k.substring(w,ve),w=ve+1,L("name",Se);throw w=E,{code:"S0105",stack:new Error().stack,position:w}}for(var pe=w,Le;;)if(Le=k.charAt(pe),pe===E||`
46
- \r\v`.indexOf(Le)>-1||Object.prototype.hasOwnProperty.call(h,Le)){if(k.charAt(w)==="$")return Se=k.substring(w+1,pe),w=pe,L("variable",Se);switch(Se=k.substring(w,pe),w=pe,Se){case"or":case"in":case"and":return L("operator",Se);case"true":return L("value",!0);case"false":return L("value",!1);case"null":return L("value",null);default:return w===E&&Se===""?null:L("name",Se)}}else pe++};return X},$=function(k,w){var E,L,R=Object.create(null),X=[],Z=function(){var p=[];E.id!=="(end)"&&p.push({type:E.type,value:E.value,position:E.position});for(var b=L();b!==null;)p.push(b),b=L();return p},A={nud:function(){var p={code:"S0211",token:this.value,position:this.position};if(w)return p.remaining=Z(),p.type="error",X.push(p),p;throw p.stack=new Error().stack,p}},m=function(p,b){var W=R[p];return b=b||0,W?b>=W.lbp&&(W.lbp=b):(W=Object.create(A),W.id=W.value=p,W.lbp=b,R[p]=W),W},M=function(p){if(w){p.remaining=Z(),X.push(p);var b=R["(error)"];return E=Object.create(b),E.error=p,E.type="(error)",E}else throw p.stack=new Error().stack,p},_=function(p,b){if(p&&E.id!==p){var W;E.id==="(end)"?W="S0203":W="S0202";var he={code:W,position:E.position,token:E.value,value:p};return M(he)}var xe=L(b);if(xe===null)return E=R["(end)"],E.position=k.length,E;var _e=xe.value,S=xe.type,D;switch(S){case"name":case"variable":D=R["(name)"];break;case"operator":if(D=R[_e],!D)return M({code:"S0204",stack:new Error().stack,position:xe.position,token:_e});break;case"string":case"number":case"value":D=R["(literal)"];break;case"regex":S="regex",D=R["(regex)"];break;default:return M({code:"S0205",stack:new Error().stack,position:xe.position,token:_e})}return E=Object.create(D),E.value=_e,E.type=S,E.position=xe.position,E},T=function(p){var b,W=E;for(_(null,!0),b=W.nud();p<E.lbp;)W=E,_(),b=W.led(b);return b},V=function(p){var b=m(p,0);b.nud=function(){return this}},N=function(p,b,W){var he=b||h[p],xe=m(p,he);return xe.led=W||function(_e){return this.lhs=_e,this.rhs=T(he),this.type="binary",this},xe},ee=function(p,b,W){var he=m(p,b);return he.led=W,he},oe=function(p,b){var W=m(p);return W.nud=b||function(){return this.expression=T(70),this.type="unary",this},W};V("(end)"),V("(name)"),V("(literal)"),V("(regex)"),m(":"),m(";"),m(","),m(")"),m("]"),m("}"),m(".."),N("."),N("+"),N("-"),N("*"),N("/"),N("%"),N("="),N("<"),N(">"),N("!="),N("<="),N(">="),N("&"),N("and"),N("or"),N("in"),V("and"),V("or"),V("in"),oe("-"),N("~>"),N("??",h["??"],function(p){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(p))]},this.then=p,this.else=T(0),this}),ee("(error)",10,function(p){return this.lhs=p,this.error=E.error,this.remaining=Z(),this.type="error",this}),oe("*",function(){return this.type="wildcard",this}),oe("**",function(){return this.type="descendant",this}),oe("%",function(){return this.type="parent",this}),N("(",h["("],function(p){if(this.procedure=p,this.type="function",this.arguments=[],E.id!==")")for(;E.type==="operator"&&E.id==="?"?(this.type="partial",this.arguments.push(E),_("?")):this.arguments.push(T(0)),E.id===",";)_(",");if(_(")",!0),p.type==="name"&&(p.value==="function"||p.value==="λ")){if(this.arguments.forEach(function(_e,S){if(_e.type!=="variable")return M({code:"S0208",stack:new Error().stack,position:_e.position,token:_e.value,value:S+1})}),this.type="lambda",E.id==="<"){for(var b=E.position,W=1,he="<";W>0&&E.id!=="{"&&E.id!=="(end)";){var xe=_();xe.id===">"?W--:xe.id==="<"&&W++,he+=xe.value}_(">");try{this.signature=a(he)}catch(_e){return _e.position=b+_e.offset,M(_e)}}_("{"),this.body=T(0),_("}")}return this}),oe("(",function(){for(var p=[];E.id!==")"&&(p.push(T(0)),E.id===";");)_(";");return _(")",!0),this.type="block",this.expressions=p,this}),oe("[",function(){var p=[];if(E.id!=="]")for(;;){var b=T(0);if(E.id===".."){var W={type:"binary",value:"..",position:E.position,lhs:b};_(".."),W.rhs=T(0),b=W}if(p.push(b),E.id!==",")break;_(",")}return _("]",!0),this.expressions=p,this.type="unary",this}),N("[",h["["],function(p){if(E.id==="]"){for(var b=p;b&&b.type==="binary"&&b.value==="[";)b=b.lhs;return b.keepArray=!0,_("]"),p}else return this.lhs=p,this.rhs=T(h["]"]),this.type="binary",_("]",!0),this}),N("^",h["^"],function(p){_("(");for(var b=[];;){var W={descending:!1};if(E.id==="<"?_("<"):E.id===">"&&(W.descending=!0,_(">")),W.expression=T(0),b.push(W),E.id!==",")break;_(",")}return _(")"),this.lhs=p,this.rhs=b,this.type="binary",this});var Se=function(p){var b=[];if(E.id!=="}")for(;;){var W=T(0);_(":");var he=T(0);if(b.push([W,he]),E.id!==",")break;_(",")}return _("}",!0),typeof p>"u"?(this.lhs=b,this.type="unary"):(this.lhs=p,this.rhs=b,this.type="binary"),this};oe("{",Se),N("{",h["{"],Se),ee(":=",h[":="],function(p){return p.type!=="variable"?M({code:"S0212",stack:new Error().stack,position:p.position,token:p.value}):(this.lhs=p,this.rhs=T(h[":="]-1),this.type="binary",this)}),N("@",h["@"],function(p){return this.lhs=p,this.rhs=T(h["@"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),N("#",h["#"],function(p){return this.lhs=p,this.rhs=T(h["#"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),N("?",h["?"],function(p){return this.type="condition",this.condition=p,this.then=T(0),E.id===":"&&(_(":"),this.else=T(0)),this}),N("?:",h["?:"],function(p){return this.type="condition",this.condition=JSON.parse(JSON.stringify(p)),this.then=p,this.else=T(0),this}),oe("|",function(){return this.type="transform",this.pattern=T(0),_("|"),this.update=T(0),E.id===","&&(_(","),this.delete=T(0)),_("|"),this});var ve=function(p){var b;if(p.type==="function"&&!p.predicate){var W={type:"lambda",thunk:!0,arguments:[],position:p.position};W.body=p,b=W}else if(p.type==="condition")p.then=ve(p.then),typeof p.else<"u"&&(p.else=ve(p.else)),b=p;else if(p.type==="block"){var he=p.expressions.length;he>0&&(p.expressions[he-1]=ve(p.expressions[he-1])),b=p}else b=p;return b},pe=0,Le=0,nt=[],ce=function(p,b){switch(p.type){case"name":case"wildcard":b.level--,b.level===0&&(typeof p.ancestor>"u"||(nt[b.index].slot.label=p.ancestor.label),p.ancestor=b,p.tuple=!0);break;case"parent":b.level++;break;case"block":p.expressions.length>0&&(p.tuple=!0,b=ce(p.expressions[p.expressions.length-1],b));break;case"path":p.tuple=!0;var W=p.steps.length-1;for(b=ce(p.steps[W--],b);b.level>0&&W>=0;)b=ce(p.steps[W--],b);break;default:throw{code:"S0217",token:p.type,position:p.position}}return b},ge=function(p,b){if(typeof b.seekingParent<"u"||b.type==="parent"){var W=typeof b.seekingParent<"u"?b.seekingParent:[];b.type==="parent"&&W.push(b.slot),typeof p.seekingParent>"u"?p.seekingParent=W:Array.prototype.push.apply(p.seekingParent,W)}},tt=function(p){var b=p.steps.length-1,W=p.steps[b],he=typeof W.seekingParent<"u"?W.seekingParent:[];W.type==="parent"&&he.push(W.slot);for(var xe=0;xe<he.length;xe++){var _e=he[xe];for(b=p.steps.length-2;_e.level>0;){if(b<0){typeof p.seekingParent>"u"?p.seekingParent=[_e]:p.seekingParent.push(_e);break}for(var S=p.steps[b--];b>=0&&S.focus&&p.steps[b].focus;)S=p.steps[b--];_e=ce(S,_e)}}},re=function(p){var b;switch(p.type){case"binary":switch(p.value){case".":var W=re(p.lhs);W.type==="path"?b=W:b={type:"path",steps:[W]},W.type==="parent"&&(b.seekingParent=[W.slot]);var he=re(p.rhs);he.type==="path"?Array.prototype.push.apply(b.steps,he.steps):(typeof he.predicate<"u"&&(he.stages=he.predicate,delete he.predicate),b.steps.push(he)),b.steps.filter(function(B){if(B.type==="number"||B.type==="value")throw{code:"S0213",stack:new Error().stack,position:B.position,value:B.value};return B.type==="string"}).forEach(function(B){B.type="name"}),b.steps.filter(function(B){return B.keepArray===!0}).length>0&&(b.keepSingletonArray=!0);var xe=b.steps[0];xe.type==="unary"&&xe.value==="["&&(xe.consarray=!0);var _e=b.steps[b.steps.length-1];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0),tt(b);break;case"[":b=re(p.lhs);var S=b,D="predicate";if(b.type==="path"&&(S=b.steps[b.steps.length-1],D="stages"),typeof S.group<"u")throw{code:"S0209",stack:new Error().stack,position:p.position};typeof S[D]>"u"&&(S[D]=[]);var P=re(p.rhs);typeof P.seekingParent<"u"&&(P.seekingParent.forEach(B=>{B.level===1?ce(S,B):B.level--}),ge(S,P)),S[D].push({type:"filter",expr:P,position:p.position});break;case"{":if(b=re(p.lhs),typeof b.group<"u")throw{code:"S0210",stack:new Error().stack,position:p.position};b.group={lhs:p.rhs.map(function(B){return[re(B[0]),re(B[1])]}),position:p.position};break;case"^":b=re(p.lhs),b.type!=="path"&&(b={type:"path",steps:[b]});var I={type:"sort",position:p.position};I.terms=p.rhs.map(function(B){var Y=re(B.expression);return ge(I,Y),{descending:B.descending,expression:Y}}),b.steps.push(I),tt(b);break;case":=":b={type:"bind",value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),ge(b,b.rhs);break;case"@":if(b=re(p.lhs),S=b,b.type==="path"&&(S=b.steps[b.steps.length-1]),typeof S.stages<"u"||typeof S.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:p.position};if(S.type==="sort")throw{code:"S0216",stack:new Error().stack,position:p.position};p.keepArray&&(S.keepArray=!0),S.focus=p.rhs.value,S.tuple=!0;break;case"#":b=re(p.lhs),S=b,b.type==="path"?S=b.steps[b.steps.length-1]:(b={type:"path",steps:[b]},typeof S.predicate<"u"&&(S.stages=S.predicate,delete S.predicate)),typeof S.stages>"u"?S.index=p.rhs.value:S.stages.push({type:"index",value:p.rhs.value,position:p.position}),S.tuple=!0;break;case"~>":b={type:"apply",value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),b.keepArray=b.lhs.keepArray||b.rhs.keepArray;break;default:b={type:p.type,value:p.value,position:p.position},b.lhs=re(p.lhs),b.rhs=re(p.rhs),ge(b,b.lhs),ge(b,b.rhs)}break;case"unary":b={type:p.type,value:p.value,position:p.position},p.value==="["?b.expressions=p.expressions.map(function(B){var Y=re(B);return ge(b,Y),Y}):p.value==="{"?b.lhs=p.lhs.map(function(B){var Y=re(B[0]);ge(b,Y);var fe=re(B[1]);return ge(b,fe),[Y,fe]}):(b.expression=re(p.expression),p.value==="-"&&b.expression.type==="number"?(b=b.expression,b.value=-b.value):ge(b,b.expression));break;case"function":case"partial":b={type:p.type,name:p.name,value:p.value,position:p.position},b.arguments=p.arguments.map(function(B){var Y=re(B);return ge(b,Y),Y}),b.procedure=re(p.procedure);break;case"lambda":b={type:p.type,arguments:p.arguments,signature:p.signature,position:p.position};var q=re(p.body);b.body=ve(q);break;case"condition":b={type:p.type,position:p.position},b.condition=re(p.condition),ge(b,b.condition),b.then=re(p.then),ge(b,b.then),typeof p.else<"u"&&(b.else=re(p.else),ge(b,b.else));break;case"transform":b={type:p.type,position:p.position},b.pattern=re(p.pattern),b.update=re(p.update),typeof p.delete<"u"&&(b.delete=re(p.delete));break;case"block":b={type:p.type,position:p.position},b.expressions=p.expressions.map(function(B){var Y=re(B);return ge(b,Y),(Y.consarray||Y.type==="path"&&Y.steps[0].consarray)&&(b.consarray=!0),Y});break;case"name":b={type:"path",steps:[p]},p.keepArray&&(b.keepSingletonArray=!0);break;case"parent":b={type:"parent",slot:{label:"!"+pe++,level:1,index:Le++}},nt.push(b);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":b=p;break;case"operator":if(p.value==="and"||p.value==="or"||p.value==="in")p.type="name",b=re(p);else if(p.value==="?")b=p;else throw{code:"S0201",stack:new Error().stack,position:p.position,token:p.value};break;case"error":b=p,p.lhs&&(b=re(p.lhs));break;default:var j="S0206";p.id==="(end)"&&(j="S0207");var F={code:j,position:p.position,token:p.value};if(w)return X.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return p.keepArray&&(b.keepArray=!0),b};L=C(k),_();var Fe=T(0);if(E.id!=="(end)"){var kt={code:"S0201",position:E.position,token:E.value};M(kt)}if(Fe=re(Fe),Fe.type==="parent"||typeof Fe.seekingParent<"u")throw{code:"S0217",token:Fe.type,position:Fe.position};return X.length>0&&(Fe.errors=X),Fe};return $})();s.exports=o},{"./signature":5}],5:[function(t,s,n){var a=t("./utils");const o=(()=>{var h={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(C){for(var $=1,k=[],w=Object.create(null),E=w;$<C.length;){var L=C.charAt($);if(L===":")break;var R=function(){k.push(w),E=w,w=Object.create(null)},X=function(N,ee,oe,Se){for(var ve=1,pe=ee;pe<N.length;)if(pe++,L=N.charAt(pe),L===Se){if(ve--,ve===0)break}else L===oe&&ve++;return pe};switch(L){case"s":case"n":case"b":case"l":case"o":w.regex="["+L+"m]",w.type=L,R();break;case"a":w.regex="[asnblfom]",w.type=L,w.array=!0,R();break;case"f":w.regex="f",w.type=L,R();break;case"j":w.regex="[asnblom]",w.type=L,R();break;case"x":w.regex="[asnblfom]",w.type=L,R();break;case"-":E.context=!0,E.contextRegex=new RegExp(E.regex),E.regex+="?";break;case"?":case"+":E.regex+=L;break;case"(":var Z=X(C,$,"(",")"),A=C.substring($+1,Z);if(A.indexOf("<")===-1)w.regex="["+A+"m]";else throw{code:"S0402",stack:new Error().stack,value:A,offset:$};w.type="("+A+")",$=Z,R();break;case"<":if(E.type==="a"||E.type==="f"){var m=X(C,$,"<",">");E.subtype=C.substring($+1,m),$=m}else throw{code:"S0401",stack:new Error().stack,value:E.type,offset:$};break}$++}var M="^"+k.map(function(N){return"("+N.regex+")"}).join("")+"$",_=new RegExp(M),T=function(N){var ee;if(a.isFunction(N))ee="f";else{var oe=typeof N;switch(oe){case"string":ee="s";break;case"number":ee="n";break;case"boolean":ee="b";break;case"object":N===null?ee="l":Array.isArray(N)?ee="a":ee="o";break;case"undefined":default:ee="m"}}return ee},V=function(N,ee){for(var oe="^",Se=0,ve=0;ve<k.length;ve++){oe+=k[ve].regex;var pe=ee.match(oe);if(pe===null)throw{code:"T0410",stack:new Error().stack,value:N[Se],index:Se+1};Se=pe[0].length}throw{code:"T0410",stack:new Error().stack,value:N[Se],index:Se+1}};return{definition:C,validate:function(N,ee){var oe="";N.forEach(function(Le){oe+=T(Le)});var Se=_.exec(oe);if(Se){var ve=[],pe=0;return k.forEach(function(Le,nt){var ce=N[pe],ge=Se[nt+1];if(ge==="")if(Le.context&&Le.contextRegex){var tt=T(ee);if(Le.contextRegex.test(tt))ve.push(ee);else throw{code:"T0411",stack:new Error().stack,value:ee,index:pe+1}}else ve.push(ce),pe++;else ge.split("").forEach(function(re){if(ce=N[pe],Le.type==="a"){if(re==="m")ce=void 0;else{var Fe=!0;if(typeof Le.subtype<"u"){if(re!=="a"&&ge!==Le.subtype)Fe=!1;else if(re==="a"&&ce.length>0){var kt=T(ce[0]);if(kt!==Le.subtype.charAt(0))Fe=!1;else{var p=ce.filter(function(b){return T(b)!==kt});Fe=p.length===0}}}if(!Fe)throw{code:"T0412",stack:new Error().stack,value:ce,index:pe+1,type:h[Le.subtype]};re!=="a"&&(ce=[ce])}ve.push(ce),pe++}else ve.push(ce),pe++})}),ve}V(N,oe)}}}return d})();s.exports=o},{"./utils":6}],6:[function(t,s,n){const a=(()=>{function o(m){var M=!1;if(typeof m=="number"&&(M=!isNaN(m),M&&!isFinite(m)))throw{code:"D1001",value:m,stack:new Error().stack};return M}function h(m){var M=!1;return Array.isArray(m)&&(M=m.filter(function(_){return typeof _!="string"}).length===0),M}function d(m){var M=!1;return Array.isArray(m)&&(M=m.filter(function(_){return!o(_)}).length===0),M}function C(m){return m.sequence===!0&&Array.isArray(m)}function $(m){return m&&(m._jsonata_function===!0||m._jsonata_lambda===!0)||typeof m=="function"}function k(m){var M=typeof m.arity=="number"?m.arity:typeof m.implementation=="function"?m.implementation.length:typeof m.length=="number"?m.length:m.arguments.length;return M}function w(m){return m&&m._jsonata_lambda===!0}var E=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function L(m){return typeof m=="object"&&m!==null&&E in m&&"next"in m&&typeof m.next=="function"}function R(m,M){if(m===M)return!0;if(typeof m=="object"&&typeof M=="object"&&m!==null&&M!==null){if(Array.isArray(m)&&Array.isArray(M)){if(m.length!==M.length)return!1;for(var _=0;_<m.length;_++)if(!R(m[_],M[_]))return!1;return!0}var T=Object.getOwnPropertyNames(m),V=Object.getOwnPropertyNames(M);if(T.length!==V.length)return!1;for(T=T.sort(),V=V.sort(),_=0;_<T.length;_++)if(T[_]!==V[_])return!1;for(_=0;_<T.length;_++){var N=T[_];if(!R(m[N],M[N]))return!1}return!0}return!1}function X(m){return typeof m=="object"&&m!==null&&"then"in m&&typeof m.then=="function"}function Z(m){var M=[];for(let _ of m)M.push(_);return M}function A(m){return typeof m=="object"&&m!==null?Object.keys(m):[]}return{isNumeric:o,isArrayOfStrings:h,isArrayOfNumbers:d,isSequence:C,isFunction:$,isLambda:w,isIterable:L,getFunctionArity:k,isDeepEqual:R,stringToArray:Z,isPromise:X,keys:A}})();s.exports=a},{}]},{},[3])(3)})})(yr)),yr.exports}var Hi=Bi();const Vi=fn(Hi);class pn{constructor(e){this.path=e}toString(){return this.path}}function gn(r){return new Proxy(r,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const s=e.path?`${e.path}.${String(t)}`:String(t);return gn(new pn(s))}})}const Wi=/\$\{|\{\$/;function Gi(r){return Wi.test(r)}function br(r){const e=typeof r=="string"?r:r.path;if(Gi(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const zs=function(r){return this instanceof zs?gn(new pn(r)):new zs(r)},wr="1";function Yi(r){const e=r.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let Be=class Qe{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const s=t.indexOf("=");return e[t.substring(0,s).trim()]=t.substring(s+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let s=e;for(;s;){if(!t(s))return;s=s.parentNode||s.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let s=e;for(;s;){if(s instanceof Element&&s.nodeType===1){const n=window.getComputedStyle(s);if(Qe.overflowMatches(n,t))return s}s=Qe.nextComposedAncestor(s)}return null}static getScrollableAncestor(e){return Qe.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Qe.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const s of Qe.scopeAttributeNames(t))if(e.hasAttribute(s))return e.getAttribute(s)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let s=e;for(;s;){if(s instanceof HTMLElement){const a=Qe.readScopeAttributeOnElement(s,t);if(a!=null)return a}const n=s.parentNode||s.host;if(!n)break;s=n}return null}static getApiConfiguration(e){const t=Qe.getAncestorAttributeValue(e,"token"),s=Qe.getAncestorAttributeValue(e,"addHTTPResponse")!=null,n=Qe.getAncestorAttributeValue(e,"serviceURL");let a=null,o=null;const h=Qe.getAncestorAttributeValue(e,"tokenProvider"),d=Qe.getAncestorAttributeValue(e,"eventsApiToken");t||(a=Qe.getAncestorAttributeValue(e,"userName"),o=Qe.getAncestorAttributeValue(e,"password"));const C=Qe.getAncestorAttributeValue(e,"credentials")||void 0,$=e.getAttribute("cache"),k=e.hasAttribute("blockUntilDone"),w=e.hasAttribute("keepAlive");return{serviceURL:n,token:t,userName:a,password:o,authToken:d,tokenProvider:h,addHTTPResponse:s,credentials:C,cache:$,blockUntilDone:k,keepAlive:w}}static getClosestElement(e,t){let s=e;for(;s&&!(s.nodeName&&s.nodeName.toLowerCase()===t);){const n=s.parentNode||s.host;if(!n){s=null;break}s=n}return s?.nodeName?s:null}static getClosestForm(e){return Qe.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const s=new Set(t.map(o=>o.toLowerCase())),n=[];let a=e.parentNode||e.host;for(;a;)a instanceof Element&&s.has(a.tagName.toLowerCase())&&n.push(a),a=a.parentNode||a.host;return n}static getAncestorsBySelectors(e,t){const s=[];let n=e.parentNode||e.host;for(;n;){if(n instanceof Element)for(const a of t)try{if(n.matches(a)){s.push(n);break}}catch{}n=n.parentNode||n.host}return s}static async loadJS(e){if(!Yi(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,s=Array.from(document.scripts).find(a=>a.src===t);if(s)return s.dataset.concordeLoaded===wr?!0:new Promise(a=>{let o=!1;const h=C=>{o||(o=!0,C&&(s.dataset.concordeLoaded=wr),a(C))};s.addEventListener("load",()=>h(!0),{once:!0}),s.addEventListener("error",()=>h(!1),{once:!0});const d=s.readyState;if(d==="complete"||d==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||h(!0)})})});const n=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(a=>{const o=document.createElement("script");o.src=e,n&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded=wr,a(!0)},o.onerror=()=>a(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(t=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=e,s.onload=()=>t(!0),s.onerror=()=>t(!0),document.head.appendChild(s)})}};const vn=r=>{const e=document.documentElement;new MutationObserver(s=>{for(const n of s)n.type==="attributes"&&n.attributeName==="lang"&&r()}).observe(e,{attributes:!0,attributeFilter:["lang"]})};let lt=class Ft{static shallowEqual(e,t,s=!0){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length&&s)return!1;for(const o of n){const h=e[o],d=t[o];if(s?h!==d:h!=d)return!1}return!0}static deepEqual(e,t,s=!0){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length&&s)return!1;for(const o of n){const h=e[o],d=t[o],C=Ft.isObject(h)&&Ft.isObject(d),$=s?h!==d:h!=d;if(C&&!Ft.deepEqual(h,d)||!C&&$)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return Ft.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,s=!1){for(const n of t){const a=e[n];if(a===void 0)return;s&&Ft.isObject(a)?e=Object.assign(Array.isArray(a)?[]:{},e,a):e=e[n]}return e}static traverseDotNotation(e,t,s=!1){return Ft.traverse(e,t.split("."),s)}static getURLSearchArray(e,t=""){let s=[];for(let n in e){const a=e[n];t&&(n=t+"["+n+"]"),Ft.isObject(a)?s=[...s,...this.getURLSearchArray(a,n)]:s.push(`${n}=${a}`)}return s}static getURLSearchString(e){return Ft.getURLSearchArray(e,"").join("&")}};const ys=lt.traverseDotNotation;let Ki=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},mn="sonic";typeof __SONIC_PREFIX__<"u"&&(mn=__SONIC_PREFIX__);let yn=mn.replace(/-([a-z])/g,r=>r[1].toUpperCase());const _r=yn.charAt(0).toUpperCase()+yn.slice(1);function Ji(r){return!1}function qs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Rt(r){return typeof r=="object"&&r!==null}let os="sonic";typeof __SONIC_PREFIX__>"u"&&(os="sonic");const Ar=os=="sonic"?"publisher-proxies-data":os+"-publisher-proxies-data",jt=class jt{constructor(e,t,s){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=t||null,this._parentKey_=s,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(),jt.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(t=>t()),this._is_savable_&&!De.changed){De.changed=!0,De.saveId++;const t=De.saveId;setTimeout(()=>De.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const s=this.get();this._assignListeners_.forEach(n=>{n(s)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(s=>{s[e]!==t&&(s[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(s=>{const n=Object.getOwnPropertyDescriptor(s,e);n&&!n.set&&!n.writable||(s.propertyMap&&s.propertyMap[e]&&(e=s.propertyMap[e]),typeof s[e]<"u"&&s[e]!==t&&(s[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&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 t in this._value_){let s=t;const n=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(s=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==n&&(e[s]=n)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const s=this._value_[t];e[t]!==s&&(e[t]=s)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||Rt(this._value_)&&Rt(e)&&e&&qs(this._value_)&&qs(e)&&this._value_.__value===e.__value||!Rt(e)&&e===this._value_.__value)return!0;this._value_=Rt(e)?e:{__value:e},this._cachedGet_=void 0;const s=qs(this._value_);if(this._parentKey_&&this.parent){const n=qs(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_]:n});else{const a=[];a[Number(this._parentKey_)]=n,this.parent.set(a)}else this.parent._value_[this._parentKey_]=n}if(s)return this._proxies_.forEach((n,a)=>{a!="_parent_"&&(n.set(null),this._publishDynamicFilling_(a,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,a)=>{const o=this._value_[a];a!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(a))&&(n.set(null),this._publishDynamicFilling_(a,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Rt(this._value_))for(const n in this._value_){const a=e[n],h=Rt(a)?a:{__value:a};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,a);continue}this._proxies_.get(n)?.set(h,!0),this._publishDynamicFilling_(n,a)}return!0}get(){if(Zi(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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+os+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+os+"-publisher-proxy>"}};jt.instances=new Map,jt.instancesCounter=0;let Bs=jt;const Hs=[];function Zi(r){Hs.length>0&&Hs[0].add(r)}function Xi(){Hs.unshift(new Set)}function Qi(){return Hs.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 s=localStorage.getItem(Ar),n=null;if(s&&(n=await this.decompress(s,"gzip")),n)try{this.localStorageData=JSON.parse(n)}catch{this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem(Ar,s),this.localStorageData={};const a=1e3*60*60*12;for(const o in this.localStorageData){const h=this.localStorageData[o],d=new Date().getTime()-(h.expirationDelayMs||a);h.lastModifiationMS<d&&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 t=me.instances.get(e);return t||(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,t){return me.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+Be.getLanguage()]?.data||e.get())}get(e,t){const s=t?.localStorageMode==="enabled",n=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=kr({});this.set(e,h)}const a=this.publishers.get(e);return s&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(a._expiration_delay_=t.expirationDelayMs),a._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(a,e)),n&&(a._invalidate_on_page_show_=n),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}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 t=Array.from(this.publishers.keys());let s=!1;for(const n of t){const a=this.publishers.get(n);if(!a?._is_savable_)continue;const o=a?.get();o&&(this.localStorageData[n+"¤lang_"+Be.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:a._expiration_delay_,data:o},s=!0)}if(s){const n=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ar,n)}if(me.saving=!1,me.changed){me.saveId++;const n=me.saveId;setTimeout(()=>this.saveToLocalStorage(n),1e3)}}catch{me.saving=!1}}async compress(e,t){const s=new TextEncoder().encode(e),n=window,a=new n.CompressionStream(t),o=a.writable.getWriter();o.write(s),o.close();const h=await new Response(a.readable).arrayBuffer(),d=new Uint8Array(h);let C="";for(let $=0;$<d.length;$++)C+=String.fromCharCode(d[$]);return btoa(C)}async decompress(e,t){const s=atob(e),a=Uint8Array.from(s,$=>$.charCodeAt(0)).buffer,o=window,h=new o.DecompressionStream(t),d=h.writable.getWriter();d.write(a),d.close();const C=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(C)}};me.buildDate="Sat Oct 03 2026 09:31:33 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 De=me;if(typeof window<"u"){const r=window,e=_r+"PublisherManager",t=r[e]||De;if(r[e]||(r[e]=De),t!==De){const s=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const n of s)Object.defineProperty(De,n,{configurable:!0,get(){return t[n]},set(a){t[n]=a}})}}const eo=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 to(r,e){return{get:function(t,s){if(typeof s=="string"&&eo.has(s))return r[s];if(s==Symbol.toPrimitive)return()=>e().get();if(!r._proxies_.has(s)){const n=r._value_[s],a=kr(Rt(n)?n:{__value:n},r,s);a._proxies_.set("_parent_",e()),r._proxies_.set(s,a)}return r._proxies_.get(s)},set:function(t,s,n){if(s=="_value_")return r._value_=n,!0;if(s=="_cachedGet_")return r._cachedGet_=n,!0;if(s=="_assignmentId_")return r._assignmentId_=n,!0;if(s=="_is_savable_")return r._is_savable_=n,!0;if(s=="_expiration_delay_")return r._expiration_delay_=n,!0;if(s=="_invalidate_on_page_show_")return r._invalidate_on_page_show_=n,!0;if(s=="_instanceCounter_")return r._instanceCounter_=n,!0;if(!r._proxies_.has(s)){const o=kr({},r,s);o._proxies_.set("_parent_",e()),r._proxies_.set(s,o)}return r._value_[s]!==n&&(r._value_[s]=n,r._publishDynamicFilling_(s,n),r._proxies_.get(s)?.set(Rt(n)?n:{__value:n})),!0},deleteProperty:function(t,s){return r._publishDynamicFilling_(s,null),r._proxies_.get(s)?.set(null),delete r._value_[s]},has:function(t,s){return s in r._value_&&s!="_lockInternalMutationPublishing_"},defineProperty:function(t,s,n){return n&&"value"in n&&(r._value_[s]=n.value),!0},getOwnPropertyDescriptor:function(t,s){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return r._value_.__value?Object.keys(r._value_.__value):Object.keys(r._value_)}}}function kr(r,e=null,t){const s=new Bs(r,e,t);let n=null;const a=to(s,()=>n);return n=new Proxy(s,a),n}class so extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Bs.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(os+"-publisher-proxy",so)}catch{}const Sr=(r,e)=>{if(typeof r=="function"){const t=r;return Xi(),t(),Qi()}if(typeof r=="string"){const t=r.split("."),s=t.shift()||"";let n=De.get(s,e);n=lt.traverse(n,t);const a=new Set;return a.add(n),a}return new Set([r])};function bn(r){const e=br(r);return Sr(e).values().next().value?.get()}function wn(r,e,t){const s=br(r);return Sr(s,t).values().next().value}function _n(r,e){return Ji()?wn(r,void 0,e):wn(r)}function An(r,e){const t=br(r);Sr(t).values().next().value?.set(e)}function kn(r){let e=(Number(r)>>>0)+1831565813;e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61);const t=e>>>0;return{value:((t^t>>>14)>>>0)/4294967296,seed:t}}function ro(r,e){const t=kn(r),s=Math.max(1,Math.floor(Number(e)||1));return{value:Math.floor(t.value*s),seed:t.seed}}function no(r,e,t){const s=Number(r),n=Number(e),a=Number(t);return Math.min(a,Math.max(n,s))}function io(r){const e=Math.max(0,Math.min(1e4,Math.floor(Number(r)||0)));return Array.from({length:e},(t,s)=>s)}function oo(r,e,t){const s=String(e??"").split(".").filter(Boolean);if(!s.length)return t;const n=h=>Array.isArray(h)?h.slice():h&&typeof h=="object"?{...h}:h,a=n(r??{});let o=a;for(let h=0;h<s.length-1;h++){const d=s[h],C=o[d];o[d]=n(C??(/^\d+$/.test(s[h+1])?[]:{})),o=o[d]}return o[s[s.length-1]]=t,a}function ao(r,e,t=0){const s=Math.max(0,Math.min(256,Math.floor(Number(r)||0))),n=Math.max(0,Math.min(256,Math.floor(Number(e)||0))),a=Number(t)||0;return Array.from({length:n},()=>Array.from({length:s},()=>a))}function lo(r){if(!Array.isArray(r)||!r.length)return[];const e=r,t=e.length,s=Array.isArray(e[0])?e[0].length:0,n=Array.from({length:s},()=>Array.from({length:t},()=>0));for(let a=0;a<t;a++){const o=e[a];if(Array.isArray(o))for(let h=0;h<s;h++)n[h][t-1-a]=Number(o[h])||0}return n}function co(r){r.registerFunction("rand",kn),r.registerFunction("randInt",ro),r.registerFunction("clamp",no),r.registerFunction("range",io),r.registerFunction("set",oo),r.registerFunction("matrix",ao),r.registerFunction("rotate",lo)}var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,Ct=(r,e,t,s)=>{for(var n=s>1?void 0:s?ho(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&uo(e,t,n),n};const fo="sonic-store",po=256*1024,go=8;let dt=class extends We{constructor(){super(...arguments),this.id="",this.dataProvider="",this.initial=null,this.reducer="",this.maxStateBytes=po,this.budgetMs=go,this.history=0,this.state=null,this.queue=[],this.draining=!1,this.compiled=null,this.historyStack=[],this.lastError=null,this.bootAction=""}connectedCallback(){super.connectedCallback(),this.bootstrap()}disconnectedCallback(){this.id&&Gr(this.id),super.disconnectedCallback()}updated(r){if(r.has("id")||r.has("reducer")||r.has("initial")||r.has("dataProvider")){const e=r.get("id");typeof e=="string"&&e&&e!==this.id&&Gr(e),this.bootstrap()}}dpId(){return(this.dataProvider||this.id||"").trim()}bootstrap(){if(!this.id)return;this.compileReducer(),this.state=this.clone(this.initial),this.historyStack=[],this.lastError=null,this.publish();const r={id:this.id,dispatch:t=>this.enqueue(t),getState:()=>this.state,reset:()=>this.reset()};vi(r);const e=(this.bootAction||"").trim();e&&this.enqueue({type:e,t:performance.now()})}compileReducer(){this.compiled=null;const r=(this.reducer||"").trim();if(r){if(r.length>32768){this.fail("reducer trop long (max 32 Ko)");return}try{const e=Vi(r);co(e),e.assign("random",()=>{throw new Error("$random interdit dans un reducer (utiliser $rand)")}),e.assign("now",()=>{throw new Error("$now interdit dans un reducer (utiliser $action.t)")}),this.compiled=e}catch(e){this.fail(e instanceof Error?e.message:String(e))}}}enqueue(r){if(r.type==="@reset"){this.reset();return}if(r.type==="@undo"){this.undo();return}this.queue.push(r),this.drain()}async drain(){if(!this.draining){this.draining=!0;try{for(;this.queue.length;){const r=this.queue.shift();await this.apply(r)}}finally{this.draining=!1}}}async apply(r){if(!this.compiled)return;const e=performance.now(),t={width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0,now:r.t??e},s={state:this.state,action:{type:r.type,payload:r.payload??null,t:r.t??e,dt:r.dt??null},env:t};try{const a=await this.compiled.evaluate(this.state,{state:this.state,action:s.action,env:t}),o=performance.now()-e;if(o>this.budgetMs){this.fail(`budget ${this.budgetMs}ms dépassé (${o.toFixed(1)}ms)`);return}if(a===void 0)return;const h=JSON.stringify(a);if(h!==void 0&&h.length>this.maxStateBytes){this.fail(`état trop gros (max ${this.maxStateBytes} octets)`);return}this.history>0&&(this.historyStack.push(this.clone(this.state)),this.historyStack.length>this.history&&this.historyStack.shift()),this.state=a,this.lastError=null,this.publish()}catch(n){this.fail(n instanceof Error?n.message:String(n))}}reset(){this.state=this.clone(this.initial),this.historyStack=[],this.lastError=null,this.publish()}undo(){this.historyStack.length&&(this.state=this.historyStack.pop(),this.publish())}publish(){const r=this.dpId();if(!r)return;const e=this.state&&typeof this.state=="object"?{...this.state,lastError:this.lastError}:{value:this.state,lastError:this.lastError};An(r,e)}fail(r){this.lastError=r,this.dispatchEvent(new CustomEvent("error",{detail:{message:r},bubbles:!0,composed:!0})),this.publish()}clone(r){if(r===null||typeof r!="object")return r;try{return JSON.parse(JSON.stringify(r))}catch{return r}}dispatchAction(r){ss(this.id,r)}render(){return qe``}};dt.styles=je`
47
- :host {
48
- display: contents;
49
- }
50
- `,Ct([O({type:String})],dt.prototype,"id",2),Ct([O({type:String})],dt.prototype,"dataProvider",2),Ct([O({type:Object})],dt.prototype,"initial",2),Ct([O({type:String})],dt.prototype,"reducer",2),Ct([O({type:Number,attribute:"max-state-bytes"})],dt.prototype,"maxStateBytes",2),Ct([O({type:Number,attribute:"budget-ms"})],dt.prototype,"budgetMs",2),Ct([O({type:Number})],dt.prototype,"history",2),Ct([O({type:String,attribute:"boot-action"})],dt.prototype,"bootAction",2),dt=Ct([at(fo)],dt);var vo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,Wt=(r,e,t,s)=>{for(var n=s>1?void 0:s?mo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&vo(e,t,n),n};const yo="sonic-keyboard";let Et=class extends We{constructor(){super(...arguments),this.target="",this.keymap={},this.scope="document",this.repeat={},this.keyup=!1,this.dispatchEventFlag=!1,this.held=new Map,this.onVis=()=>{document.hidden&&this.releaseAll()},this.onKeyDown=r=>{const e=r;if(e.repeat||this.isEditableTarget(e.target))return;const t=e.code||e.key,s=this.keymap?.[t]??this.keymap?.[e.key];if(!s)return;e.preventDefault();const n=this.toAction(s);this.emit(n);const a=this.repeat?.[n.type];if(a){const[o,h]=a,d={type:n.type,payload:n.payload,timer:window.setTimeout(()=>{this.emit({type:n.type,payload:n.payload}),d.interval=window.setInterval(()=>{this.emit({type:n.type,payload:n.payload})},Math.max(16,h))},Math.max(0,o))};this.held.set(t,d)}else this.held.set(t,{type:n.type,payload:n.payload})},this.onKeyUp=r=>{const e=r,t=e.code||e.key,s=this.held.get(t);s&&(s.timer&&clearTimeout(s.timer),s.interval&&clearInterval(s.interval),this.held.delete(t),this.keyup&&this.emit({type:`${s.type}:up`,payload:s.payload}))},this.releaseAll=()=>{for(const[,r]of this.held)r.timer&&clearTimeout(r.timer),r.interval&&clearInterval(r.interval);this.held.clear()}}connectedCallback(){super.connectedCallback(),this.scope==="focus"&&(this.hasAttribute("tabindex")||(this.tabIndex=0)),this.bindTarget().addEventListener("keydown",this.onKeyDown),this.bindTarget().addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.releaseAll),document.addEventListener("visibilitychange",this.onVis)}disconnectedCallback(){this.bindTarget().removeEventListener("keydown",this.onKeyDown),this.bindTarget().removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.releaseAll),document.removeEventListener("visibilitychange",this.onVis),this.releaseAll(),super.disconnectedCallback()}updated(r){r.has("scope")&&this.scope==="focus"&&!this.hasAttribute("tabindex")&&(this.tabIndex=0)}bindTarget(){return this.scope==="focus"?this:window}isEditableTarget(r){if(!(r instanceof HTMLElement))return!1;const e=r.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"||r.isContentEditable?!0:!!r.closest("input,textarea,select,[contenteditable=true]")}toAction(r){return typeof r=="string"?{type:r}:{type:r.type,payload:r.payload}}emit(r){this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return this.scope==="focus"?qe`<slot></slot>`:qe``}};Et.styles=je`
51
- :host {
52
- display: contents;
53
- }
54
- :host([scope="focus"]) {
55
- display: block;
56
- outline: none;
57
- }
58
- :host([scope="focus"]:focus) {
59
- outline: 2px solid var(--sc-primary, #3b82f6);
60
- outline-offset: 2px;
61
- }
62
- `,Wt([O({type:String})],Et.prototype,"target",2),Wt([O({type:Object})],Et.prototype,"keymap",2),Wt([O({type:String})],Et.prototype,"scope",2),Wt([O({type:Object})],Et.prototype,"repeat",2),Wt([O({type:Boolean})],Et.prototype,"keyup",2),Wt([O({type:Boolean,attribute:"dispatch-event"})],Et.prototype,"dispatchEventFlag",2),Et=Wt([at(yo)],Et);var bo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,It=(r,e,t,s)=>{for(var n=s>1?void 0:s?wo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&bo(e,t,n),n};const _o="sonic-gamepad",Ao={"dpad-up":12,"dpad-down":13,"dpad-left":14,"dpad-right":15,a:0,b:1,x:2,y:3,start:9,select:8,"ls-x-":{axis:0,dir:-1},"ls-x+":{axis:0,dir:1},"ls-y-":{axis:1,dir:-1},"ls-y+":{axis:1,dir:1}};let wt=class extends We{constructor(){super(...arguments),this.target="",this.keymap={"dpad-left":"left","dpad-right":"right","dpad-up":"rotate","dpad-down":"soft-drop",a:"rotate",b:"drop",start:"pause"},this.deadzone=.25,this.repeat={},this.dataProvider="",this.dispatchEventFlag=!1,this.connected=!1,this.raf=0,this.prev=new Map,this.heldTimers=new Map,this.onConnect=()=>this.scan(),this.onDisconnect=()=>this.scan()}connectedCallback(){super.connectedCallback(),window.addEventListener("gamepadconnected",this.onConnect),window.addEventListener("gamepaddisconnected",this.onDisconnect),this.scan()}disconnectedCallback(){window.removeEventListener("gamepadconnected",this.onConnect),window.removeEventListener("gamepaddisconnected",this.onDisconnect),this.stopLoop(),this.clearHolds(),super.disconnectedCallback()}scan(){const e=[...navigator.getGamepads?.()??[]].some(Boolean);this.connected=e,this.publishStatus(),e?this.startLoop():this.stopLoop()}publishStatus(){if(!this.dataProvider)return;const e=[...navigator.getGamepads?.()??[]].find(Boolean);An(this.dataProvider,{connected:this.connected,id:e?.id??null})}startLoop(){if(this.raf)return;const r=()=>{this.raf=requestAnimationFrame(r),this.poll()};this.raf=requestAnimationFrame(r)}stopLoop(){this.raf&&cancelAnimationFrame(this.raf),this.raf=0}poll(){const e=[...navigator.getGamepads?.()??[]].find(Boolean);if(!e){this.scan();return}for(const[t,s]of Object.entries(this.keymap||{})){const n=Ao[t];if(n==null)continue;let a=!1;if(typeof n=="number")a=!!e.buttons[n]?.pressed;else{const h=e.axes[n.axis]??0;a=n.dir<0?h<-this.deadzone:h>this.deadzone}const o=this.prev.get(t)??!1;a&&!o?(this.fire(s),this.startRepeat(t,s)):!a&&o&&this.stopRepeat(t),this.prev.set(t,a)}}startRepeat(r,e){const t=typeof e=="string"?{type:e}:e,s=this.repeat?.[t.type];if(!s)return;const[n,a]=s,o={};o.timer=window.setTimeout(()=>{this.fire(e),o.interval=window.setInterval(()=>this.fire(e),Math.max(16,a))},Math.max(0,n)),this.heldTimers.set(r,o)}stopRepeat(r){const e=this.heldTimers.get(r);e&&(e.timer&&clearTimeout(e.timer),e.interval&&clearInterval(e.interval),this.heldTimers.delete(r))}clearHolds(){for(const r of[...this.heldTimers.keys()])this.stopRepeat(r)}fire(r){const e=typeof r=="string"?{type:r}:{type:r.type,payload:r.payload};this.target&&ss(this.target,e),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:e,bubbles:!0,composed:!0}))}render(){return qe``}};wt.styles=je`
63
- :host {
64
- display: contents;
65
- }
66
- `,It([O({type:String})],wt.prototype,"target",2),It([O({type:Object})],wt.prototype,"keymap",2),It([O({type:Number})],wt.prototype,"deadzone",2),It([O({type:Object})],wt.prototype,"repeat",2),It([O({type:String})],wt.prototype,"dataProvider",2),It([O({type:Boolean,attribute:"dispatch-event"})],wt.prototype,"dispatchEventFlag",2),It([ft()],wt.prototype,"connected",2),wt=It([at(_o)],wt);var ko=Object.defineProperty,So=Object.getOwnPropertyDescriptor,Gt=(r,e,t,s)=>{for(var n=s>1?void 0:s?So(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&ko(e,t,n),n};const xo="sonic-gesture";let Pt=class extends We{constructor(){super(...arguments),this.target="",this.swipeThreshold=40,this.longPressMs=450,this.doubleTapMs=280,this.drag=!1,this.dispatchEventFlag=!1,this.startX=0,this.startY=0,this.startT=0,this.longTimer=null,this.lastTap=0,this.pointerId=null,this.onDown=r=>{this.pointerId==null&&(this.pointerId=r.pointerId,this.setPointerCapture(r.pointerId),this.startX=r.clientX,this.startY=r.clientY,this.startT=performance.now(),this.longTimer=window.setTimeout(()=>{this.emit({type:"long-press"}),this.longTimer=null},this.longPressMs))},this.onMove=r=>{if(this.pointerId!==r.pointerId)return;const e=r.clientX-this.startX,t=r.clientY-this.startY;if(Math.hypot(e,t)>10&&this.longTimer!=null&&(clearTimeout(this.longTimer),this.longTimer=null),this.drag){const s=this.getBoundingClientRect();this.emit({type:"drag",payload:{dx:s.width?e/s.width:0,dy:s.height?t/s.height:0}})}},this.onUp=r=>{if(this.pointerId!==r.pointerId)return;this.longTimer!=null&&(clearTimeout(this.longTimer),this.longTimer=null);const e=r.clientX-this.startX,t=r.clientY-this.startY,s=Math.hypot(e,t),n=performance.now()-this.startT;if(this.pointerId=null,s>=this.swipeThreshold){const a=Math.abs(e)>Math.abs(t)?e>0?"swipe-right":"swipe-left":t>0?"swipe-down":"swipe-up";this.emit({type:a});return}if(n<this.longPressMs){const a=performance.now();a-this.lastTap<this.doubleTapMs?(this.emit({type:"double-tap"}),this.lastTap=0):(this.emit({type:"tap"}),this.lastTap=a)}}}emit(r){this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerdown",this.onDown),this.addEventListener("pointermove",this.onMove),this.addEventListener("pointerup",this.onUp),this.addEventListener("pointercancel",this.onUp)}disconnectedCallback(){this.removeEventListener("pointerdown",this.onDown),this.removeEventListener("pointermove",this.onMove),this.removeEventListener("pointerup",this.onUp),this.removeEventListener("pointercancel",this.onUp),this.longTimer!=null&&clearTimeout(this.longTimer),super.disconnectedCallback()}render(){return qe`<slot></slot>`}};Pt.styles=je`
67
- :host {
68
- display: block;
69
- touch-action: none;
70
- user-select: none;
71
- }
72
- `,Gt([O({type:String})],Pt.prototype,"target",2),Gt([O({type:Number,attribute:"swipe-threshold"})],Pt.prototype,"swipeThreshold",2),Gt([O({type:Number,attribute:"long-press-ms"})],Pt.prototype,"longPressMs",2),Gt([O({type:Number,attribute:"double-tap-ms"})],Pt.prototype,"doubleTapMs",2),Gt([O({type:Boolean})],Pt.prototype,"drag",2),Gt([O({type:Boolean,attribute:"dispatch-event"})],Pt.prototype,"dispatchEventFlag",2),Pt=Gt([at(xo)],Pt);var Co=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,as=(r,e,t,s)=>{for(var n=s>1?void 0:s?Eo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Co(e,t,n),n};const Po="sonic-action";let Nt=class extends We{constructor(){super(...arguments),this.target="",this.type="",this.payload=null,this.holdRepeat="",this.dispatchEventFlag=!1,this.holdTimer=null,this.holdInterval=null,this.onPointerDown=r=>{if(r.button!=null&&r.button!==0)return;this.emit();const e=this.holdRepeat.split(",").map(t=>Number(t.trim()));if(e.length===2&&e.every(t=>Number.isFinite(t))){const[t,s]=e;this.holdTimer=window.setTimeout(()=>{this.emit(),this.holdInterval=window.setInterval(()=>this.emit(),Math.max(16,s))},Math.max(0,t))}},this.onPointerUp=()=>this.clearHold()}clearHold(){this.holdTimer!=null&&clearTimeout(this.holdTimer),this.holdInterval!=null&&clearInterval(this.holdInterval),this.holdTimer=null,this.holdInterval=null}emit(){if(!this.type)return;const r={type:this.type,payload:this.payload};this.target&&ss(this.target,r),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:r,bubbles:!0,composed:!0}))}render(){return qe`<slot
73
- @pointerdown=${this.onPointerDown}
74
- @pointerup=${this.onPointerUp}
75
- @pointercancel=${this.onPointerUp}
76
- @pointerleave=${this.onPointerUp}
77
- ></slot>`}};Nt.styles=je`
78
- :host {
79
- display: contents;
80
- }
81
- `,as([O({type:String})],Nt.prototype,"target",2),as([O({type:String})],Nt.prototype,"type",2),as([O({type:Object})],Nt.prototype,"payload",2),as([O({type:String,attribute:"hold-repeat"})],Nt.prototype,"holdRepeat",2),as([O({type:Boolean,attribute:"dispatch-event"})],Nt.prototype,"dispatchEventFlag",2),Nt=as([at(Po)],Nt);var To=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,Yt=(r,e,t,s)=>{for(var n=s>1?void 0:s?$o(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&To(e,t,n),n};const Do="sonic-ticker";let Tt=class extends We{constructor(){super(...arguments),this.target="",this.interval=500,this.intervalKey="",this.runningKey="",this.mode="interval",this.dispatchEventFlag=!1,this.timer=null,this.raf=0,this.last=0,this.acc=0,this.onVis=()=>{document.hidden?this.stop():this.restart()}}connectedCallback(){super.connectedCallback(),document.addEventListener("visibilitychange",this.onVis),this.restart()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.onVis),this.stop(),super.disconnectedCallback()}updated(r){(r.has("interval")||r.has("mode")||r.has("target")||r.has("intervalKey")||r.has("runningKey"))&&this.restart()}stop(){this.timer!=null&&(clearInterval(this.timer),this.timer=null),this.raf&&(cancelAnimationFrame(this.raf),this.raf=0),this.acc=0}restart(){if(this.stop(),!(!this.target||document.hidden)){if(this.last=performance.now(),this.mode==="raf"){const r=e=>{if(this.raf=requestAnimationFrame(r),!this.isRunning()){this.last=e;return}const t=Math.min(100,e-this.last);this.last=e,this.acc+=t;const s=this.currentInterval();for(;this.acc>=s;)this.acc-=s,this.emit(s)};this.raf=requestAnimationFrame(r);return}this.timer=window.setInterval(()=>{if(!this.isRunning())return;const r=performance.now(),e=Math.min(1e3,r-this.last);this.last=r,this.emit(e)},this.currentInterval())}}currentInterval(){let r=this.interval;if(this.intervalKey&&this.target)try{const e=bn(this.target),t=this.path(e,this.intervalKey);typeof t=="number"&&Number.isFinite(t)&&(r=t)}catch{}return Math.max(16,r)}isRunning(){if(!this.runningKey||!this.target)return!0;try{const r=bn(this.target);return!!this.path(r,this.runningKey)}catch{return!0}}path(r,e){if(!r||typeof r!="object")return;let t=r;for(const s of e.split(".").filter(Boolean)){if(t==null)return;t=t[s]}return t}emit(r){const e={type:"tick",payload:{dt:r},dt:r};this.target&&ss(this.target,e),this.dispatchEventFlag&&this.dispatchEvent(new CustomEvent("sonic-action",{detail:e,bubbles:!0,composed:!0}))}render(){return qe``}};Tt.styles=je`
82
- :host {
83
- display: contents;
84
- }
85
- `,Yt([O({type:String})],Tt.prototype,"target",2),Yt([O({type:Number})],Tt.prototype,"interval",2),Yt([O({type:String,attribute:"interval-key"})],Tt.prototype,"intervalKey",2),Yt([O({type:String,attribute:"running-key"})],Tt.prototype,"runningKey",2),Yt([O({type:String})],Tt.prototype,"mode",2),Yt([O({type:Boolean,attribute:"dispatch-event"})],Tt.prototype,"dispatchEventFlag",2),Tt=Yt([at(Do)],Tt);let Ut=(Re=class{static listen(){if(!Re.listening)return;const e=document.location?.href.replace(document.location.origin,"");Re.prevURL&&Re.prevURL!=e&&(Re.prevURL=e,Re.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Re.listen)}static offChange(e){const t=Re.listeners.indexOf(e);t!=-1&&(Re.listeners.splice(t,1),Re.listeners.length==0&&(Re.listening=!1))}static onChange(e){Re.listening||(Re.listening=!0,Re.listen()),Re.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,s=document.referrer;if(t!=null){const C=document.location.origin,$=(t||C).toString(),w=s.indexOf("http")==0?new URL(s).origin!=C:!1,E=s=="",L=history.length<3,R=E&&L,X=$!=document.location.href;if(w&&X||R){const A=history.state||{};A.concorde=A.concorde||{},A.concorde.hasDoneHistoryBack=!0,history.pushState(A,document.title),history.back(),document.location.replace($)}else history.back();return}let n=e.getAttribute("to")||"";if(n||(n=e.href?.toString()||""),!n)return;if(n.indexOf("#")==0){document.location.hash=n.substring(1);return}const a=new URL(n,document.location.href),o=a.pathname.split("/"),h=[];let d="";for(const C of o)C!=d&&h.push(C),d=C;n="/"+h.join("/")+a.search+(a.hash?a.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",n):e.hasAttribute("replaceState")?history.replaceState(null,"",n):document.location.href=n}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const s=new URL(t,document.location.href),n=new URL(e.location||"",document.location.origin);let a=!1;e.autoActive=="strict"?a=s.pathname==n.pathname&&s.hash==n.hash&&s.search==n.search:e.autoActive=="strict-path-only"?a=s.pathname==n.pathname&&s.hash==n.hash:a=n.href.indexOf(s.href)==0,a?e.setAttribute("active","true"):e.removeAttribute("active")}}},Re.listeners=[],Re.listening=!1,Re.prevURL=document.location?.href.replace(document.location.origin,""),Re);/**
86
- * @license
87
- * Copyright 2017 Google LLC
88
- * SPDX-License-Identifier: BSD-3-Clause
89
- */const bs={ATTRIBUTE:1,CHILD:2},Vs=r=>(...e)=>({_$litDirective$:r,values:e});let Ws=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
90
- * @license
91
- * Copyright 2018 Google LLC
92
- * SPDX-License-Identifier: BSD-3-Clause
93
- */const Sn="important",Oo=" !"+Sn,xn=Vs(class extends Ws{constructor(r){if(super(r),r.type!==bs.ATTRIBUTE||r.name!=="style"||r.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(r){return Object.keys(r).reduce(((e,t)=>{const s=r[t];return s==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(r,[e]){const{style:t}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const s of this.ft)e[s]==null&&(this.ft.delete(s),s.includes("-")?t.removeProperty(s):t[s]=null);for(const s in e){const n=e[s];if(n!=null){this.ft.add(s);const a=typeof n=="string"&&n.endsWith(Oo);s.includes("-")||a?t.setProperty(s,a?n.slice(0,-11):n,a?Sn:""):t[s]=n}}return bt}});var Lo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,pt=(r,e,t,s)=>{for(var n=s>1?void 0:s?Fo(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Lo(e,t,n),n};const Gs=new Map,Cn=r=>{class e extends r{constructor(...s){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 n=>{this.setFormValueFromPublisher(n)},this.onFormDataInValidate=()=>{const n=this.getFormPublisher();n&&n.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(s){return Be.getAncestorAttributeValue(this,s)!=null}getAncestorAttributeValue(s){return Be.getAncestorAttributeValue(this,s)||""}get name(){return this._name}set name(s){this.hasAttribute("name")&&!this.forceAutoFill&&(s=this.getAttribute("name")),this._name=s,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?De.get(this.formDataProvider):null}setFormPublisherValue(s){const n=this.getFormPublisher();n&&ys(n,this.name).set(s)}getFormPublisherValue(){const s=this.getFormPublisher();return s?ys(s,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(s){this.value=s}get value(){return this._value}set value(s){s==null&&(s=""),lt.isObject(s)&&Object.prototype.hasOwnProperty.call(s,"__value")&&s._value==null&&(s=""),this._value!=s&&(this._value=s,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let s=this.getFormPublisher();const n=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&s&&ys(s,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),s=this.getFormPublisher(),this._name&&s&&(ys(s,this._name).onAssign(this.onFormValueAssign),s.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),n&&(this.value=n)}handleBlur(){this.touched=!0}handleChange(s){this.value=s.target.value;const n=new Event("change");this.dispatchEvent(n)}addKeyboardNavigation(){const s=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!s)return;const n=s.split(" "),a=n[0];if(!a)return;for(const h of n){Gs.has(h)||Gs.set(h,[]);const d=Gs.get(h);d?.indexOf(this)==-1&&d.push(this)}const o=Gs.get(a);this.addEventListener("keydown",h=>{const d=h;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const C="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",$=o?.filter(E=>{const L=E.shadowRoot?.querySelector(C);if(!L)return!1;const R=window.getComputedStyle(L);return R.display!=="none"&&R.display!==""&&R.pointerEvents!="none"&&R.visibility!=="hidden"&&L.getBoundingClientRect().width>0});let k=null;if(d.key=="ArrowDown"&&$){const E=$.indexOf(this);E==$.length-1?k=$[0]:k=$[E+1]}else if(d.key=="ArrowUp"&&$){const E=$.indexOf(this);E==0?k=$[$.length-1]:k=$[E-1]}const w=k?.shadowRoot?.querySelector(C);w&&w.focus&&(w.focus(),h.preventDefault(),h.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 s=this.getFormPublisher();this._name&&s&&(ys(s,this._name).offAssign(this.onFormValueAssign),s.offFormInvalidate(this.onFormDataInValidate))}}return pt([O({type:Boolean,reflect:!0})],e.prototype,"touched",2),pt([O({type:Boolean})],e.prototype,"error",2),pt([O({type:Boolean})],e.prototype,"autofocus",2),pt([O({type:Boolean})],e.prototype,"required",2),pt([O({type:Boolean})],e.prototype,"forceAutoFill",2),pt([O({type:Boolean,reflect:!0})],e.prototype,"disabled",2),pt([O({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),pt([O({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),pt([O({type:String})],e.prototype,"formDataProvider",2),pt([O()],e.prototype,"name",1),pt([O()],e.prototype,"value",1),e};let Mo=class ts{static areEqual(e,t){return e.length===t.length?e.every((s,n)=>s===t[n]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(s=>t=t.concat(s)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const s=(e[0]||{})[t];return e.every(n=>(n||{})[t]==s)}})})}),value:()=>({forKey:t=>ts.from(e.map(s=>s[t]))}),copy:()=>({fromKey:t=>({toKey:s=>{e.forEach(n=>{n[s]=Array.isArray(n[t])?[...n[t]]:typeof n[t]=="object"&&n[t]!=null?{...n[t]}:n[t]})}})})}),map:t=>ts.from(e.map(t)),filter:t=>ts.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const s=[],n=new Map;for(const a of e){const o=a[t];if(!n.has(o)){const h=s.length;n.set(o,h);const d={items:[]};d[t]=o,s.push(d)}s[n.get(o)].items.push(a)}return ts.from(s)}}),without:()=>({duplicates:()=>({forKey:t=>{const s=[...new Set(e.map(n=>n[t]))];return ts.from(s.map(n=>e.find(a=>a[t]==n)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:s=>{const n=(a,o)=>h=>a[o]!=h[o];return ts.from(e.filter(a=>t.every(n(a,s))))}})})})}}},xr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",s="long"){t||(t=Be.getLanguage());const n=(C,$)=>[Math.floor(C/$),C%$];function a(C,$,k){return new Intl.NumberFormat(C,{style:"unit",unit:$,unitDisplay:k}).format}const[o,h]=n(e,60),d=[];return o&&d.push(a(t,"hour",s)(o)),h&&d.push(a(t,"minute",s)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}},Ys=(de=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(de.observedElements.keys()).forEach(e=>de.unObserve(e)))}static observe(e){if(!e||!de.enabled||de.observedElements.has(e))return;const t=new MutationObserver(de.onMutation),s={};s.childList=!0,s.subtree=!0,s.attributes=!0,s.attributeFilter=["data-bind"],t.observe(e,s),e.querySelectorAll("[data-bind]").forEach(n=>de.addPublisherListeners(n)),de.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(s=>de.removePublisherListeners(s)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.addPublisherListeners(t)):e.childNodes.forEach(t=>de.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.removePublisherListeners(t)):e.childNodes.forEach(t=>de.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":de.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(s=>{de.onAdded(s)}),t.removedNodes.forEach(s=>{de.onRemoved(s)});break}}static removePublisherListeners(e){const t=de.publisherListeners.get(e);t&&(de.publisherListeners.delete(e),t.forEach(s=>{s.publisher?.offAssign(s.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(s=>s.replace("$","")):t=[e],t=t.filter(s=>s.length>0),{expression:e.replace("\\",""),variables:t.map(s=>s.split(/\b\.\b/).map(n=>n.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,n=>n.substring(1).toUpperCase()),bindedVariablesDescriptor:de.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const s of t)if(s!="_self_"){if(!e)return null;e=e[s]}return e}static addPublisherListeners(e){de.removePublisherListeners(e);const t=Be.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const s=De.getInstance().get(t),n=de.getDataBindItems(e),a=[];n.forEach(o=>{const h=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const C of h.variables){const $=C;let k=s;k=de.getSubPublisher(s,$);const w=e,E={publisher:k,onAssign:()=>{const L=h.variables.map(Z=>de.getSubPublisher(s,Z)?.get());let R=h.expression,X=!1;if(L.length==1&&h.variables[0].join(".")==R.substring(1)){let Z=L[0];Z===null&&(Z=""),w[d]=Z;return}for(let Z=0;Z<L.length;Z++){let A=L[Z];const m=h.variables[Z];A===null&&(X=!0,A=void 0),R=R.replace("$"+m.join("."),A)}if(R.indexOf("|")!=-1){const Z=R.indexOf("|");if(Z==0)R=xr.js(R.substring(1));else{const A=R.substring(0,Z),m=R.substring(Z+1),M=xr[A];R=X?"":M?M(m):R}}else R=X?"":R;w[d]=R}};k?.onAssign(E.onAssign),a.push(E)}}),de.publisherListeners.set(e,a)}},de.observedElements=new Map,de.enabled=!0,de.publisherListeners=new Map,de);Ys.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ys);function En(r){if(r==null||typeof r!="object"||Array.isArray(r))return r;const e={...r};return delete e._sonic_http_response_,e}const we=class we{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){we.tokens.delete(this.serviceURL);return}we.invalidTokens.includes(e)||we.tokens.set(this.serviceURL,e)}get token(){return we.invalidTokens.includes(this._token)?we.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(we.invalidTokens.includes(e)||(we.invalidTokens.push(e),this.token=null))}async handleResult(e,t){we.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const s=e.headers.get("content-type")?.toLowerCase(),n=e.status;let a={};if(!s||s.indexOf("text/")==0)a={text:await e.text()};else try{a=await e.json()}catch{a={}}if(this.addHTTPResponse&&lt.isObject(a)&&(a._sonic_http_response_=e),n===498&&!we.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");a=h}else a=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return _n("sonic-api").lastResponse.set({http:e,processed:a}),a}async auth(){if(this.token)return;if(we.tokens.has(this.serviceURL)){this.token=we.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 t=new URL(this.serviceURL),s=t.protocol+"//"+t.host,n=await fetch(this.computeURL(this.tokenProvider,{serviceHost:s}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const a=await n.json();a.token?this.token=a.token:we.failledTokenUpdates.set(this.serviceURL,!0)}catch{we.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const s=De.get(e),n=new URLSearchParams(t.split("?")[1]||""),a=s.get();let o=[];Array.isArray(a)?o=a:o=[a];const h=[];let d=Number.POSITIVE_INFINITY,C=0,$=0;if(n.has("limit")&&(d=parseInt(n.get("limit")||"0"),$++),n.has("offset")&&(C=parseInt(n.get("offset")||"0"),$++),$>0&&(n.delete("limit"),n.delete("offset")),n.size===0)return o.slice(C,C+d);for(const[k,w]of n.entries()){const E=w.split(",").map(L=>L.trim());for(const L of E)for(const R of o)if(typeof R!="object")isNaN(+R)?R.toString().toLowerCase().includes(w.toLowerCase())&&h.push(R):R===w&&h.push(R);else{const X=R;if(!X[k])continue;isNaN(+X[k])?X[k]?.toString().toLowerCase().includes(L.toLowerCase())&&h.push(R):X[k]===L&&h.push(R)}}return h.slice(C,C+d)}firstCallDone(){return new Promise(e=>{if(!we.firstCallDoneFlags.has(this.serviceURL))we.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(we.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const s=/dataProvider\((.*?)\)(.*?)$/;if(s.test(e)){this.blockUntilDone&&(await this.firstCallDone(),we.firstCallDoneFlags.set(this.serviceURL,"loading"));const C=e.match(s);if(!C)throw new Error("dataProvider path is not valid");return await this.localGet(C[1],C[2])}const n={apiMethod:"get",path:e,additionalHeaders:t},a=await this.createHeaders(t),o=this.computeURL(e),h=JSON.stringify({url:o,headers:a,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),we.firstCallDoneFlags.set(this.serviceURL,"loading")),!we.loadingGetPromises.has(h)){const C=new Promise(async $=>{try{const k=await fetch(o,{headers:a,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),w=await this.handleResult(k,n);$({processed:w,response:this.lastResult})}catch{we.firstCallDoneFlags.set(this.serviceURL,"error"),$(null)}});we.loadingGetPromises.set(h,C)}const d=await we.loadingGetPromises.get(h);return we.loadingGetPromises.delete(h),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,t){const s=/dataProvider\((.*?)\)(.*?)$/.test(e),n=await this.get(e,t);if(n==null)return;const a=En(n),o=this.computeURL(e);if(s)return{request:new Request(o,{method:"GET"}),result:a};const h=await this.createHeaders(t);return{request:new Request(o,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:a}}async sendDetailed(e,t,s,n){const a=await this.send(e,t,s,n);if(a==null)return;const o=En(a),h=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...n});return{request:new Request(h,{method:s,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,t,s){return this.sendDetailed(e,t,"POST",s)}async putDetailed(e,t,s){return this.sendDetailed(e,t,"PUT",s)}async patchDetailed(e,t,s){return this.sendDetailed(e,t,"PATCH",s)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=Be.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let s="";e.startsWith("http")?s=e:s=this.serviceURL+"/"+e,s.startsWith("http")||(s=window.location.origin+s);const n=new URL(s);for(const a in t)n.searchParams.set(a,t[a]);return n.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,s="POST",n){const a={apiMethod:"send",path:e,additionalHeaders:n,method:s,data:t},o=await this.createHeaders(n);o.Accept="application/json",o["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:s,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,a)}async submitFormData(e,t,s="POST",n){const a={apiMethod:"submitFormData",path:e,additionalHeaders:n,method:s,data:t},o=await this.createHeaders(n);o.Accept="application/json";const h=new FormData,d=t;for(const $ in d)h.set($,d[$]);const C=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:s,body:h,keepalive:this.keepAlive});return await this.handleResult(C,a)}async put(e,t,s){return this.send(e,t,"PUT",s)}async post(e,t,s){return this.send(e,t,"POST",s)}async patch(e,t,s){return this.send(e,t,"PATCH",s)}async delete(e,t,s){return this.send(e,t,"delete",s)}};we.loadingGetPromises=new Map,we.tokens=new Map,we.invalidTokens=[],we.failledTokenUpdates=new Map,we.firstCallDoneFlags=new Map;let ws=we;Be.getApiConfiguration(document.body||document.documentElement);const Ro=async(r,e)=>{};var _s={exports:{}},Io=_s.exports,Pn;function No(){return Pn||(Pn=1,(function(r,e){var t=[].slice;(function(s,n){return e!==null?r.exports=n():s.UrlPattern=n()})(Io,function(){var s,n,a,o,h,d,C,$,k,w,E,L,R,X,Z;return k=function(A){return A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},C=function(A,m){var M,_,T;for(T=[],M=-1,_=A.length;++M<_;)T=T.concat(m(A[M]));return T},X=function(A,m){var M,_,T;for(T="",M=-1,_=A.length;++M<_;)T+=m(A[M]);return T},R=function(A){return new RegExp(A.toString()+"|").exec("").length-1},E=function(A,m){var M,_,T,V,N;for(V={},M=-1,T=A.length;++M<T;)_=A[M],N=m[M],N!=null&&(V[_]!=null?(Array.isArray(V[_])||(V[_]=[V[_]]),V[_].push(N)):V[_]=N);return V},s={},s.Result=function(A,m){this.value=A,this.rest=m},s.Tagged=function(A,m){this.tag=A,this.value=m},s.tag=function(A,m){return function(M){var _,T;if(_=m(M),_!=null)return T=new s.Tagged(A,_.value),new s.Result(T,_.rest)}},s.regex=function(A){return function(m){var M,_;if(M=A.exec(m),M!=null)return _=M[0],new s.Result(_,m.slice(_.length))}},s.sequence=function(){var A;return A=1<=arguments.length?t.call(arguments,0):[],function(m){var M,_,T,V,N,ee;for(M=-1,_=A.length,ee=[],V=m;++M<_;){if(T=A[M],N=T(V),N==null)return;ee.push(N.value),V=N.rest}return new s.Result(ee,V)}},s.pick=function(){var A,m;return A=arguments[0],m=2<=arguments.length?t.call(arguments,1):[],function(M){var _,T;if(T=s.sequence.apply(s,m)(M),T!=null)return _=T.value,T.value=_[A],T}},s.string=function(A){var m;return m=A.length,function(M){if(M.slice(0,m)===A)return new s.Result(A,M.slice(m))}},s.lazy=function(A){var m;return m=null,function(M){return m==null&&(m=A()),m(M)}},s.baseMany=function(A,m,M,_,T){var V,N,ee,oe;for(ee=T,oe=M?"":[];!(m!=null&&(V=m(ee),V!=null)||(N=A(ee),N==null));)M?oe+=N.value:oe.push(N.value),ee=N.rest;if(!(_&&oe.length===0))return new s.Result(oe,ee)},s.many1=function(A){return function(m){return s.baseMany(A,null,!1,!0,m)}},s.concatMany1Till=function(A,m){return function(M){return s.baseMany(A,m,!0,!0,M)}},s.firstChoice=function(){var A;return A=1<=arguments.length?t.call(arguments,0):[],function(m){var M,_,T,V;for(M=-1,_=A.length;++M<_;)if(T=A[M],V=T(m),V!=null)return V}},L=function(A){var m;return m={},m.wildcard=s.tag("wildcard",s.string(A.wildcardChar)),m.optional=s.tag("optional",s.pick(1,s.string(A.optionalSegmentStartChar),s.lazy(function(){return m.pattern}),s.string(A.optionalSegmentEndChar))),m.name=s.regex(new RegExp("^["+A.segmentNameCharset+"]+")),m.named=s.tag("named",s.pick(1,s.string(A.segmentNameStartChar),s.lazy(function(){return m.name}))),m.escapedChar=s.pick(1,s.string(A.escapeChar),s.regex(/^./)),m.static=s.tag("static",s.concatMany1Till(s.firstChoice(s.lazy(function(){return m.escapedChar}),s.regex(/^./)),s.firstChoice(s.string(A.segmentNameStartChar),s.string(A.optionalSegmentStartChar),s.string(A.optionalSegmentEndChar),m.wildcard))),m.token=s.lazy(function(){return s.firstChoice(m.wildcard,m.optional,m.named,m.static)}),m.pattern=s.many1(s.lazy(function(){return m.token})),m},$={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(A,m){if(Array.isArray(A))return X(A,function(M){return d(M,m)});switch(A.tag){case"wildcard":return"(.*?)";case"named":return"(["+m+"]+)";case"static":return k(A.value);case"optional":return"(?:"+d(A.value,m)+")?"}},h=function(A,m){return m==null&&(m=$.segmentValueCharset),"^"+d(A,m)+"$"},o=function(A){if(Array.isArray(A))return C(A,o);switch(A.tag){case"wildcard":return["_"];case"named":return[A.value];case"static":return[];case"optional":return o(A.value)}},w=function(A,m,M,_){var T,V,N,ee;if(_==null&&(_=!1),ee=A[m],ee==null){if(_)throw new Error("no values provided for key `"+m+"`");return}if(T=M[m]||0,V=Array.isArray(ee)?ee.length-1:0,T>V){if(_)throw new Error("too few values provided for key `"+m+"`");return}return N=Array.isArray(ee)?ee[T]:ee,_&&(M[m]=T+1),N},a=function(A,m,M){var _,T;if(Array.isArray(A)){for(_=-1,T=A.length;++_<T;)if(a(A[_],m,M))return!0;return!1}switch(A.tag){case"wildcard":return w(m,"_",M,!1)!=null;case"named":return w(m,A.value,M,!1)!=null;case"static":return!1;case"optional":return a(A.value,m,M)}},Z=function(A,m,M){if(Array.isArray(A))return X(A,function(_){return Z(_,m,M)});switch(A.tag){case"wildcard":return w(m,"_",M,!0);case"named":return w(m,A.value,M,!0);case"static":return A.value;case"optional":return a(A.value,m,M)?Z(A.value,m,M):""}},n=function(A,m){var M,_,T,V,N;if(A instanceof n){this.isRegex=A.isRegex,this.regex=A.regex,this.ast=A.ast,this.names=A.names;return}if(this.isRegex=A instanceof RegExp,!(typeof A=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=A,m!=null){if(!Array.isArray(m))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(M=R(this.regex),m.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+m.length);this.names=m}return}if(A==="")throw new Error("argument must not be the empty string");if(N=A.replace(/\s+/g,""),N!==A)throw new Error("argument must not contain whitespace");if(_={escapeChar:m?.escapeChar||$.escapeChar,segmentNameStartChar:m?.segmentNameStartChar||$.segmentNameStartChar,segmentNameCharset:m?.segmentNameCharset||$.segmentNameCharset,segmentValueCharset:m?.segmentValueCharset||$.segmentValueCharset,optionalSegmentStartChar:m?.optionalSegmentStartChar||$.optionalSegmentStartChar,optionalSegmentEndChar:m?.optionalSegmentEndChar||$.optionalSegmentEndChar,wildcardChar:m?.wildcardChar||$.wildcardChar},V=L(_),T=V.pattern(A),T==null)throw new Error("couldn't parse pattern");if(T.rest!=="")throw new Error("could only partially parse pattern");this.ast=T.value,this.regex=new RegExp(h(this.ast,_.segmentValueCharset)),this.names=o(this.ast)},n.prototype.match=function(A){var m,M;return M=this.regex.exec(A),M==null?null:(m=M.slice(1),this.names?E(this.names,m):m)},n.prototype.stringify=function(A){if(A==null&&(A={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(A!==Object(A))throw new Error("argument must be an object or undefined");return Z(this.ast,A,{})},n.escapeForRegex=k,n.concatMap=C,n.stringConcatMap=X,n.regexGroupCount=R,n.keysAndValuesToObject=E,n.P=s,n.newParser=L,n.defaultOptions=$,n.astNodeToRegexString=h,n.astNodeToNames=o,n.getParam=w,n.astNodeContainsSegmentsForProvidedParams=a,n.stringify=Z,n})})(_s,_s.exports)),_s.exports}var Uo=No();const jo=fn(Uo);class Cr{constructor(e){this.path=Cr.normalizePath(e)}getDataProviderKey(){return new zs(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let d;try{d=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const s=t.indexOf("?"),n=t.indexOf("#");let a=t.length;s>=0&&(a=Math.min(a,s)),n>=0&&(a=Math.min(a,n));let o=t.slice(0,a);const h=t.slice(a);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&h)throw new RangeError("Endpoint: path cannot be empty");return o+h}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 zo=150,Tn=10,qo=200,Bo=16,$n=new WeakMap;let Dn=!1;function Ks(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function As(r){if(r===window)return{x:window.scrollX,y:window.scrollY};const e=r;return{x:e.scrollLeft,y:e.scrollTop}}function Ho(r,e,t){if(r===window){window.scrollTo(e,t);return}const s=r;typeof s.scrollTo=="function"?s.scrollTo(e,t):(s.scrollLeft=e,s.scrollTop=t)}function Vo(r){if(r===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=r;return Math.max(0,e.scrollHeight-e.clientHeight)}function ls(r){let e=$n.get(r);if(!e){const t=As(r);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},$n.set(r,e)}return e}function Js(r){ls(r).userEngaged=!0}function Zs(r){const e=ls(r);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},zo)}function On(r,e){return e-r>=qo}function cs(r){if(!Ks())return;const e=ls(r);if(e.restoring)return;const t=As(r);if(On(t.y,e.y)){Er(r);return}e.x=t.x,e.y=t.y}function Wo(r){if(!Ks())return;const e=ls(r),t=Vo(r),s=e.x,n=t>0?Math.min(e.y,t):e.y,{x:a,y:o}=As(r);if(!(Math.abs(s-a)<=Tn&&Math.abs(n-o)<=Tn)){e.restoring=!0;try{Ho(r,s,n)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Er(r){const e=ls(r);if(e.stickyFrames=Bo,e.raf)return;const t=()=>{e.raf=0,Wo(r),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function Pr(r){Er(r)}function ks(r){if(!Ks())return;const e=ls(r);if(e.watching)return;e.watching=!0;const t=r===window?window:r,s=()=>{if(e.restoring)return;const{y:L}=As(r);if(On(L,e.y)){Er(r);return}if(e.userEngaged){cs(r),Zs(r);return}cs(r)},n=L=>Ln(L)===r,a=L=>{n(L)&&(cs(r),Js(r))},o=L=>{n(L)&&Zs(r)},h=L=>{n(L)&&(cs(r),Js(r),Zs(r))};t.addEventListener("scroll",s,{passive:!0}),t.addEventListener("touchstart",a,{passive:!0}),t.addEventListener("touchend",o,{passive:!0}),t.addEventListener("touchcancel",o,{passive:!0}),t.addEventListener("wheel",h,{passive:!0}),t.addEventListener("pointerdown",a,{passive:!0}),t.addEventListener("pointerup",o,{passive:!0}),t.addEventListener("pointercancel",o,{passive:!0});const d=As(r);if(e.x=d.x,e.y=d.y,r===window){const L=new ResizeObserver(()=>Pr(window));L.observe(document.documentElement),e.resizeObserver=L;return}const C=r,$=new ResizeObserver(()=>Pr(C));$.observe(C);for(const L of Array.from(C.children))$.observe(L);e.resizeObserver=$;const k=()=>Pr(C),w=new MutationObserver(L=>{for(const R of L)if(R.type==="childList")for(const X of Array.from(R.addedNodes))X instanceof Element&&$.observe(X);k()});w.observe(C,{childList:!0,subtree:!0,characterData:!0});const E=C.getRootNode();E instanceof ShadowRoot&&E.host&&w.observe(E.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=w}function Ln(r){for(const e of r.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Fn(e))return e;return window}function Fn(r){if(!(r instanceof HTMLElement)||r===document.documentElement||r===document.body)return!1;const e=getComputedStyle(r).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Tr(r){for(const t of r.composedPath())t===window||t===document||t instanceof HTMLElement&&Fn(t)&&ks(t);const e=Ln(r);ks(e),r.type==="wheel"?(cs(e),Js(e),Zs(e)):(r.type==="touchstart"||r.type==="pointerdown")&&(cs(e),Js(e))}function Xs(r){r instanceof Element&&r.classList?.contains("custom-scroll")&&ks(r),r.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&ks(e)})}function $r(r){Xs(r),new MutationObserver(t=>{for(const s of t)for(const n of Array.from(s.addedNodes))n instanceof Element&&Xs(n)}).observe(r,{childList:!0,subtree:!0})}function Dr(r){r.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&($r(e.shadowRoot),Dr(e.shadowRoot))})}function Go(){const r=Element.prototype;if(r.__safariScrollGuardPatched)return;r.__safariScrollGuardPatched=!0;const e=r.attachShadow;r.attachShadow=function(s){const n=e.call(this,s);return $r(n),n}}function Mn(){if(typeof window>"u"||Dn||(Dn=!0,!Ks()))return;ks(window),Go();const r={capture:!0,passive:!0};window.addEventListener("wheel",Tr,r),window.addEventListener("touchstart",Tr,r),window.addEventListener("pointerdown",Tr,r);const e=()=>{Xs(document),Dr(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(s=>{for(const n of s)for(const a of Array.from(n.addedNodes))a instanceof Element&&(Xs(a),a.shadowRoot&&$r(a.shadowRoot),Dr(a))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Yo=Ki,Ko=Mo,Jo=Ys,Zo=xr,Rn=Be,Xo=Ut,Qo=lt,ea=ws,ta=jo;Mn(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Yo,Arrays:Ko,DataBindObserver:Jo,Format:Zo,HTML:Rn,LocationHandler:Xo,Objects:Qo,PublisherManager:De,api:ea,URLPattern:ta,Endpoint:Cr,DataProviderKey:zs};var sa=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Ss=(r,e,t,s)=>{for(var n=s>1?void 0:s?ra(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&sa(e,t,n),n};const In=r=>{class e extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const s=this.getAttribute("name"),n=this.getCheckAllPublisher(),a=this.getFormPublisher();if(n?.hasCheckAll.get()&&!this.checksAll()&&n&&a&&s){if(this.getFormPublisherValue()?.length)(this.checked===null||n.checkMode.get()=="noneChecked"||n.checkMode.get()==null)&&n.checkMode.set("someUnchecked");else{n.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),h=n.values.get();if(h&&h.length){let d=h.length;for(const C of h)o.indexOf(C)==-1&&(d-=1);d==h.length&&n.checkMode.set("allChecked"),d==0&&n.checkMode.set("noneChecked")}h.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=s=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),s=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),s=="noneChecked"&&(this.checked=null),s=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(s){if(this.value==s||(this.hasAttribute("value")&&!this.forceAutoFill&&(s=this.getAttribute("value")),this._value==s)||s==null||(this._value=s,!this.value))return;if(this.getFormPublisher()&&this.name){let a=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=a==s?!0:null),Array.isArray(a)||(a=[]),a.indexOf(s)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(s){if(this.setCheckedValue(s),this.checksAll()){const n=this.getCheckAllPublisher();n&&(this.checked===!0?n.checkMode.set("allChecked"):this.checked===null&&(n.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const n=this.getFormPublisher();if(n){const a=this.getFormPublisherValue();if((this.unique||this.radio)&&a!==null&&a!==void 0&&a.toString().length>0)return;n.isFormValid=!1,s.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(s){this._checked!=s&&(this._checked=s,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const s=this.checked===!0?this.radio?!0:null:!0;this.checked=s;const n=new Event("change");this.dispatchEvent(n)}getValueForFormPublisher(){let s=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:s;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(s)||(s=[]);const n=s.slice(0),a=n.indexOf(this.value);return this.checked===!0&&a===-1&&!this.checksAll()&&n.push(this.value),this.checked===null&&a!==-1&&n.splice(a,1),n}setFormValueFromPublisher(s){if(this.unique||this.radio){this.checked=this.value==s?!0:null;return}Array.isArray(s)||(s=[]),!this.checksAll()&&(this.checked=s.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const s=this.formDataProvider,n=this.getAttribute("name");return!s||!n?null:De.get(s+"/"+n+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const s=this.getCheckAllPublisher();if(s&&(s.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const n=s.values.get().slice(0),a=n.indexOf(this.value);a!=-1&&(n.splice(a,1),s.values.set(n))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const a=this.getFormPublisherValue();a&&Array.isArray(a)&&a.indexOf(this.value)!==-1&&(this.checked=!0)}const n=this.getCheckAllPublisher();n&&(n.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&n.hasCheckAll.set(!0),n.values.get()||n.values.set([]),this.checksAll()||n.values.set([...n.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Ss([O()],e.prototype,"value",1),Ss([O()],e.prototype,"forceAutoFill",2),Ss([O({type:Boolean})],e.prototype,"unique",2),Ss([O({type:Boolean})],e.prototype,"radio",2),Ss([O()],e.prototype,"checked",1),e};/**
94
- * @license
95
- * Copyright 2018 Google LLC
96
- * SPDX-License-Identifier: BSD-3-Clause
97
- */const gt=r=>r??be,na=je`
98
- /*SIZES*/
99
- :host {
100
- --sc-_fs: 1rem;
101
- --sc-_lh: 1.15;
102
- font-size: var(--sc-_fs);
103
- line-height: var(--sc-_lh);
104
- }
105
-
106
- :host([size="2xs"]) {
107
- --sc-_fs: 0.625rem;
108
- }
109
- :host([size="xs"]) {
110
- --sc-_fs: 0.75rem;
111
- }
112
- :host([size="sm"]) {
113
- --sc-_fs: 0.875rem;
114
- }
115
- :host([size="md"]) {
116
- --sc-_fs: 1rem;
117
- }
118
- :host([size="lg"]) {
119
- --sc-_fs: 1.125rem;
120
- }
121
- :host([size="xl"]) {
122
- --sc-_fs: 1.25rem;
123
- }
124
- :host([size="2xl"]) {
125
- --sc-_fs: 1.5rem;
126
- }
127
- :host([size="inherit"]) {
128
- --sc-_fs: 1em;
129
- }
130
- `;var ia=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,Ce=(r,e,t,s)=>{for(var n=s>1?void 0:s?oa(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&ia(e,t,n),n};const aa="sonic-button";let ke=class extends In(Cn(We)){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(r){this._href=r??"";const e=this._href.toString();e&&e.indexOf("http")!=0?Ut.onChange(this):Ut.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(r){r.preventDefault(),Ut.changeFromComponent(this)}handleChange(r){if(!(r?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(r?.preventDefault(),r?.stopPropagation(),Ut.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),t=e?De.get(e):this.getFormPublisher();t&&t.set({})}}handleRepeatStart(r){this.autoRepeat&&(this.handleChange(r),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(r){if(this.name){if(r?this.setAttribute("active","true"):this.removeAttribute("active"),r==this._checked)return;super.setCheckedValue(r)}}disconnectedCallback(){Ut.offChange(this),super.disconnectedCallback()}willUpdate(r){(r.has("href")||r.has("autoActive"))&&Ut.updateComponentActiveState(this),r.has("location")&&Ut.updateComponentActiveState(this)}render(){const r={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,textAlign:this.align,minWidth:this.minWidth},e=qe`
131
- <button
132
- part="button"
133
- class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
134
- style=${xn(r)}
135
- aria-controls=${gt(this.ariaControls)}
136
- aria-expanded=${gt(this.sonicAriaExpanded)}
137
- aria-label=${gt(this.ariaLabel)}
138
- aria-labelledby=${gt(this.ariaLabelledby)}
139
- aria-busy=${gt(this.loading?"true":void 0)}
140
- ?disabled=${this.disabled}
141
- @click=${this.handleChange}
142
- @pointerdown=${this.handleRepeatStart}
143
- >
144
- <slot
145
- @slotchange=${this.onSlotChange}
146
- part="prefix"
147
- name="prefix"
148
- ></slot>
149
- <slot part="main" class="main-slot"></slot>
150
- <slot
151
- @slotchange=${this.onSlotChange}
152
- part="suffix"
153
- name="suffix"
154
- ></slot>
155
- ${this.loading==!0?qe`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
156
- </button>
157
- `;return this.href?qe`<a
158
- href="${this.href}"
159
- download=${gt(this.download)}
160
- target=${gt(this.target)}
161
- aria-label=${gt(this.ariaLabel)}
162
- aria-labelledby=${gt(this.ariaLabelledby)}
163
- @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
164
- >${e}</a
165
- >`:qe`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};ke.styles=[na,je`
166
- * {
167
- box-sizing: border-box;
168
- }
169
- :host {
170
- --sc-btn-gap: 0.35em;
171
- --sc-btn-py: 0.25em;
172
- --sc-btn-px: 1.1em;
173
- --sc-btn-fs: var(--sc-_fs, 1rem);
174
- --sc-btn-ff: var(
175
- --sc-btn-font-family,
176
- var(--sc-font-family-base, sans-serif)
177
- );
178
- --sc-btn-fw: var(--sc-btn-font-weight, 500);
179
-
180
- --sc-btn-height: var(--sc-form-height, 2.5em);
181
- --btn-color: var(--sc-btn-color, var(--sc-base-content, #000));
182
- --btn-bg: var(--sc-btn-bg, var(--sc-base-100, rgba(0, 0, 0, 0.07)));
183
-
184
- --sc-btn-border-style: solid;
185
- --sc-btn-border-width: var(--sc-form-border-width);
186
- --sc-btn-border-color: transparent;
187
-
188
- --btn-outline-bg-hover: var(
189
- --sc-btn-outline-bg-hover,
190
- var(--sc-base-100, rgba(0, 0, 0, 0.07))
191
- );
192
- --sc-btn-ghost-bg-hover: var(--sc-base-100, rgba(0, 0, 0, 0.07));
193
-
194
- --sc-btn-active-color: var(--sc-base, #fff);
195
- --sc-btn-hover-filter: brightness(0.98);
196
- --sc-btn-active-filter: brightness(0.97);
197
- --sc-btn-active-bg: var(--sc-base-content, #000);
198
-
199
- /* min permet une sécurité si btn-rounded 999px par exemple */
200
- --sc-item-rounded-tr: min(
201
- calc(var(--sc-form-height, 2.5em) / 2),
202
- var(--sc-btn-rounded)
203
- );
204
- --sc-item-rounded-tl: min(
205
- calc(var(--sc-form-height, 2.5em) / 2),
206
- var(--sc-btn-rounded)
207
- );
208
- --sc-item-rounded-bl: min(
209
- calc(var(--sc-form-height, 2.5em) / 2),
210
- var(--sc-btn-rounded)
211
- );
212
- --sc-item-rounded-br: min(
213
- calc(var(--sc-form-height, 2.5em) / 2),
214
- var(--sc-btn-rounded)
215
- );
216
-
217
- display: inline-flex;
218
- vertical-align: middle;
219
- box-sizing: border-box;
220
- -webkit-print-color-adjust: exact;
221
- }
222
-
223
- :host a {
224
- display: contents;
225
- color: unset;
226
- }
227
-
228
- :host button {
229
- display: flex;
230
- flex: 1;
231
- box-sizing: border-box;
232
- align-items: center;
233
- justify-content: center;
234
-
235
- font-family: var(--sc-btn-ff);
236
- font-weight: var(--sc-btn-fw);
237
- font-size: var(--sc-btn-fs);
238
-
239
- cursor: pointer;
240
- text-align: center;
241
- line-height: 1.1;
242
- border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
243
- var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
244
-
245
- background: var(--btn-bg);
246
- color: var(--btn-color);
247
-
248
- padding-top: var(--sc-btn-py);
249
- padding-bottom: var(--sc-btn-py);
250
- padding-left: var(--sc-btn-px);
251
- padding-right: var(--sc-btn-px);
252
-
253
- border: var(--sc-btn-border-width) var(--sc-btn-border-style)
254
- var(--sc-btn-border-color);
255
- min-height: var(--sc-btn-height);
256
- }
257
-
258
- :host button.has-prefix-or-suffix {
259
- gap: var(--sc-btn-gap);
260
- }
261
-
262
- :host button:focus-visible,
263
- :host button:hover {
264
- filter: var(--sc-btn-hover-filter);
265
- }
266
-
267
- :host button:active {
268
- filter: var(--sc-btn-active-filter);
269
- }
270
-
271
- /*TYPES*/
272
- :host([type="default"]) button {
273
- --btn-color: var(--sc-base-content, #000);
274
- --btn-bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
275
- }
276
-
277
- :host([type="primary"]) button {
278
- --btn-color: var(--sc-primary-content, var(--sc-base, #fff));
279
- --btn-bg: var(--sc-primary, var(--sc-base-content, #000));
280
- }
281
- :host([type="warning"]) button {
282
- --btn-color: var(--sc-warning-content, var(--sc-base, #fff));
283
- --btn-bg: var(--sc-warning, var(--sc-base-content, #000));
284
- }
285
- :host([type="danger"]) button {
286
- --btn-color: var(--sc-danger-content, var(--sc-base, #fff));
287
- --btn-bg: var(--sc-danger, var(--sc-base-content, #000));
288
- }
289
- :host([type="info"]) button {
290
- --btn-color: var(--sc-info-content, var(--sc-base, #fff));
291
- --btn-bg: var(--sc-info, var(--sc-base-content, #000));
292
- }
293
- :host([type="success"]) button {
294
- --btn-color: var(--sc-success-content, var(--sc-base, #fff));
295
- --btn-bg: var(--sc-success, var(--sc-base-content, #000));
296
- }
297
- :host([type="neutral"]) button {
298
- --btn-color: var(--sc-base, #fff);
299
- --btn-bg: var(--sc-base-content, #000);
300
- }
301
- :host([type="custom"]) button {
302
- --btn-color: var(--sc-btn-custom-color);
303
- --btn-bg: var(--sc-btn-custom-bg);
304
- }
305
-
306
- /*UNSTYLED*/
307
- :host([variant="unstyled"]) {
308
- display: inline-flex;
309
- }
310
-
311
- :host([variant="unstyled"]) button {
312
- all: unset;
313
- cursor: pointer;
314
- width: 100%;
315
- flex: 1;
316
- box-sizing: border-box;
317
- --sc-btn-height: auto;
318
- }
319
-
320
- /*GESTION DU FOCUS*/
321
- :host(:not([disabled])) button:focus-visible {
322
- box-shadow: 0 0 0 0.18rem var(--sc-base-300, rgba(0, 0, 0, 0.18));
323
- border-color: var(--sc-base-300, rgba(0, 0, 0, 0.18)) !important;
324
- outline: none;
325
- }
326
-
327
- /*GHOST*/
328
- :host([variant="ghost"][type]) button {
329
- color: var(--btn-bg);
330
- background: transparent;
331
- }
332
-
333
- :host([variant="ghost"][type="default"]) button {
334
- color: var(--btn-color);
335
- background: transparent;
336
- }
337
-
338
- /*:host([variant="ghost"]) button:focus-visible,*/
339
- :host([variant="ghost"]) button:hover {
340
- background: var(--sc-btn-ghost-bg-hover);
341
- filter: none;
342
- }
343
-
344
- :host([active][variant="ghost"]) button {
345
- background: var(--sc-btn-ghost-bg-hover);
346
- filter: none;
347
- }
348
-
349
- :host([active][variant="ghost"]) button:hover {
350
- filter: var(--sc-btn-hover-filter);
351
- }
352
-
353
- /*OUTLINE*/
354
- :host([variant="outline"][type]) button {
355
- border-color: var(--btn-bg);
356
- color: var(--btn-bg);
357
- background: transparent;
358
- }
359
-
360
- :host([variant="outline"][type="default"]) button {
361
- border-color: var(--sc-base-content, #000);
362
- color: var(--sc-base-content, #000);
363
- background: transparent;
364
- }
365
-
366
- /*:host([variant="outline"]) button:focus-visible,*/
367
- :host([variant="outline"]) button:hover {
368
- background: var(--btn-outline-bg-hover);
369
- }
370
-
371
- /*OUTLINE*/
372
- :host([variant="link"]:not([size])) {
373
- vertical-align: baseline;
374
- margin-left: 0.25em;
375
- margin-right: 0.25em;
376
- }
377
-
378
- :host([variant="link"]:not([size])) {
379
- font-size: inherit;
380
- }
381
-
382
- :host([variant="link"]) button {
383
- text-decoration: underline;
384
- padding: 0;
385
- background: none;
386
- border: none;
387
- font-size: inherit;
388
- min-height: 0;
389
- color: inherit;
390
- }
391
-
392
- :host([variant="link"][type]) button {
393
- color: var(--btn-bg);
394
- }
395
- :host([variant="link"][type="default"]) button {
396
- color: inherit;
397
- }
398
-
399
- :host([variant="link"]) button:focus-visible,
400
- :host([variant="link"]) button:hover {
401
- text-decoration: none;
402
- }
403
-
404
- /* Alignement */
405
- :host([align="left"]) button {
406
- text-align: left !important;
407
- }
408
-
409
- :host([align="right"]) button {
410
- text-align: right;
411
- }
412
-
413
- /*SHAPE*/
414
- :host([shape="circle"]) button {
415
- border-radius: 50%;
416
- }
417
- :host([shape="circle"]) .main-slot {
418
- line-height: 1;
419
- }
420
-
421
- :host([shape="circle"]) button,
422
- :host([shape="square"]) button {
423
- width: var(--sc-btn-height);
424
- height: var(--sc-btn-height);
425
- /*overflow: hidden;*/ /* fix bug #42622 */
426
- padding: 0;
427
- align-items: center;
428
- justify-content: 0;
429
- text-align: center !important;
430
- }
431
-
432
- :host([shape="block"]),
433
- :host([shape="block"]) button {
434
- width: 100%;
435
- }
436
-
437
- :host([disabled]) {
438
- opacity: 0.3;
439
- pointer-events: none;
440
- user-select: none;
441
- }
442
-
443
- /*ACTIVE*/
444
-
445
- :host([active]:not([variant="ghost"]):not([variant="unstyled"])) button {
446
- background: var(--sc-btn-active-bg);
447
- color: var(--sc-btn-active-color);
448
- border-color: var(--sc-btn-active-bg);
449
- }
450
-
451
- .main-slot {
452
- flex-grow: 1;
453
- min-width: 0;
454
- display: block;
455
- }
456
-
457
- :host([minWidth]:not([shape="block"])) .main-slot {
458
- flex-grow: 0;
459
- }
460
-
461
- slot[name="suffix"],
462
- slot[name="prefix"] {
463
- flex-shrink: 0;
464
- min-width: 0;
465
- }
466
-
467
- /*ALIGNEMENT DES ICONES
468
- permet de tous les avoir alignés dans un menu
469
- */
470
- ::slotted(sonic-icon) {
471
- min-width: 1em;
472
- text-align: center;
473
- }
474
-
475
- /*BOUTON Avec icone seulement*/
476
- :host([icon]) ::slotted(:only-child),
477
- :host([icon]) ::slotted(sonic-icon) {
478
- font-size: 1.2em;
479
- vertical-align: middle;
480
- }
481
-
482
- /*Tooltip ne joue pas sur le layout*/
483
- sonic-tooltip {
484
- display: contents;
485
- }
486
-
487
- /*OUTLINE*/
488
- :host(:not([active])) ::slotted([swap="on"]) {
489
- display: none !important;
490
- }
491
-
492
- :host([active]) ::slotted([swap="off"]) {
493
- display: none !important;
494
- }
495
-
496
- /*Loading*/
497
- :host([loading]) {
498
- pointer-events: none;
499
- position: relative;
500
- }
501
-
502
- :host([loading]) slot,
503
- :host([loading]) slot::slotted(*) {
504
- visibility: hidden !important;
505
- pointer-events: none;
506
- }
507
- /*Loading*/
508
- :host([loading]) .loader {
509
- position: absolute;
510
- top: 50%;
511
- left: 50%;
512
- transform: translate(-50%, -50%);
513
- display: flex;
514
- align-items: center;
515
- justify-content: center;
516
- line-height: 0;
517
- height: var(--sc-btn-fs);
518
- width: var(--sc-btn-fs);
519
- animation: rotation 2s infinite linear;
520
- }
521
-
522
- @keyframes rotation {
523
- from {
524
- transform-origin: 50% 50%;
525
- transform: translate(-50%, -50%) rotate(0deg);
526
- }
527
- to {
528
- transform-origin: 50% 50%;
529
- transform: translate(-50%, -50%) rotate(359deg);
530
- }
531
- }
532
- `],Ce([O({type:String,reflect:!0})],ke.prototype,"type",2),Ce([O({type:String,reflect:!0})],ke.prototype,"variant",2),Ce([O({type:String,reflect:!0})],ke.prototype,"size",2),Ce([O({type:String,reflect:!0})],ke.prototype,"shape",2),Ce([O({type:String})],ke.prototype,"direction",2),Ce([O({type:String,reflect:!0})],ke.prototype,"alignItems",2),Ce([O({type:String})],ke.prototype,"justify",2),Ce([O({type:String,reflect:!0})],ke.prototype,"align",2),Ce([O({type:String})],ke.prototype,"minWidth",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"icon",2),Ce([O({type:String})],ke.prototype,"download",2),Ce([O({type:String})],ke.prototype,"autoActive",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"loading",2),Ce([ft()],ke.prototype,"hasPrefix",2),Ce([ft()],ke.prototype,"hasSuffix",2),Ce([un({flatten:!0,slot:"prefix"})],ke.prototype,"prefixes",2),Ce([un({flatten:!0,slot:"suffix"})],ke.prototype,"suffixes",2),Ce([O({type:String})],ke.prototype,"target",2),Ce([O({type:String})],ke.prototype,"href",1),Ce([O({type:String})],ke.prototype,"goBack",2),Ce([O({type:Boolean})],ke.prototype,"pushState",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"active",2),Ce([O({type:Boolean,reflect:!0})],ke.prototype,"autoRepeat",2),Ce([O({type:String,attribute:"data-aria-controls"})],ke.prototype,"ariaControls",2),Ce([O({type:Boolean,attribute:"data-aria-expanded"})],ke.prototype,"sonicAriaExpanded",2),Ce([ft()],ke.prototype,"location",2),ke=Ce([at(aa)],ke);/**
533
- * @license
534
- * Copyright 2020 Google LLC
535
- * SPDX-License-Identifier: BSD-3-Clause
536
- */const{I:la}=Ri,ca=r=>r.strings===void 0,Nn=()=>document.createComment(""),xs=(r,e,t)=>{const s=r._$AA.parentNode,n=e===void 0?r._$AB:e._$AA;if(t===void 0){const a=s.insertBefore(Nn(),n),o=s.insertBefore(Nn(),n);t=new la(a,o,r,r.options)}else{const a=t._$AB.nextSibling,o=t._$AM,h=o!==r;if(h){let d;t._$AQ?.(r),t._$AM=r,t._$AP!==void 0&&(d=r._$AU)!==o._$AU&&t._$AP(d)}if(a!==n||h){let d=t._$AA;for(;d!==a;){const C=d.nextSibling;s.insertBefore(d,n),d=C}}}return t},Kt=(r,e,t=r)=>(r._$AI(e,t),r),ua={},ha=(r,e=ua)=>r._$AH=e,fa=r=>r._$AH,Or=r=>{r._$AR(),r._$AA.remove()};/**
537
- * @license
538
- * Copyright 2017 Google LLC
539
- * SPDX-License-Identifier: BSD-3-Clause
540
- */const Un=(r,e,t)=>{const s=new Map;for(let n=e;n<=t;n++)s.set(r[n],n);return s},da=Vs(class extends Ws{constructor(r){if(super(r),r.type!==bs.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);const n=[],a=[];let o=0;for(const h of r)n[o]=s?s(h,o):o,a[o]=t(h,o),o++;return{values:a,keys:n}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,s]){const n=fa(r),{values:a,keys:o}=this.dt(e,t,s);if(!Array.isArray(n))return this.ut=o,a;const h=this.ut??=[],d=[];let C,$,k=0,w=n.length-1,E=0,L=a.length-1;for(;k<=w&&E<=L;)if(n[k]===null)k++;else if(n[w]===null)w--;else if(h[k]===o[E])d[E]=Kt(n[k],a[E]),k++,E++;else if(h[w]===o[L])d[L]=Kt(n[w],a[L]),w--,L--;else if(h[k]===o[L])d[L]=Kt(n[k],a[L]),xs(r,d[L+1],n[k]),k++,L--;else if(h[w]===o[E])d[E]=Kt(n[w],a[E]),xs(r,n[k],n[w]),w--,E++;else if(C===void 0&&(C=Un(o,E,L),$=Un(h,k,w)),C.has(h[k]))if(C.has(h[w])){const R=$.get(o[E]),X=R!==void 0?n[R]:null;if(X===null){const Z=xs(r,n[k]);Kt(Z,a[E]),d[E]=Z}else d[E]=Kt(X,a[E]),xs(r,n[k],X),n[R]=null;E++}else Or(n[w]),w--;else Or(n[k]),k++;for(;E<=L;){const R=xs(r,d[L+1]);Kt(R,a[E]),d[E++]=R}for(;k<=w;){const R=n[k++];R!==null&&Or(R)}return this.ut=o,ha(r,d),bt}});/**
541
- * @license
542
- * Copyright 2017 Google LLC
543
- * SPDX-License-Identifier: BSD-3-Clause
544
- */const Cs=(r,e)=>{const t=r._$AN;if(t===void 0)return!1;for(const s of t)s._$AO?.(e,!1),Cs(s,e);return!0},Qs=r=>{let e,t;do{if((e=r._$AM)===void 0)break;t=e._$AN,t.delete(r),r=e}while(t?.size===0)},jn=r=>{for(let e;e=r._$AM;r=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(r))break;t.add(r),va(e)}};function pa(r){this._$AN!==void 0?(Qs(this),this._$AM=r,jn(this)):this._$AM=r}function ga(r,e=!1,t=0){const s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(s))for(let a=t;a<s.length;a++)Cs(s[a],!1),Qs(s[a]);else s!=null&&(Cs(s,!1),Qs(s));else Cs(this,r)}const va=r=>{r.type==bs.CHILD&&(r._$AP??=ga,r._$AQ??=pa)};class zn extends Ws{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,s){super._$AT(e,t,s),jn(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(Cs(this,e),Qs(this))}setValue(e){if(ca(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}const ma=new WeakMap;let qn=0;const Lr=new Map,Bn=new WeakSet,Hn=()=>new Promise((r=>requestAnimationFrame(r))),Vn=(r,e)=>{const t=r-e;return t===0?void 0:t},Wn=(r,e)=>{const t=r/e;return t===1?void 0:t},Fr={left:(r,e)=>{const t=Vn(r,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateX(${t}px)`}},top:(r,e)=>{const t=Vn(r,e);return{value:t,transform:t==null||isNaN(t)?void 0:`translateY(${t}px)`}},width:(r,e)=>{let t;e===0&&(e=1,t={width:"1px"});const s=Wn(r,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(r,e)=>{let t;e===0&&(e=1,t={height:"1px"});const s=Wn(r,e);return{value:s,overrideFrom:t,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},ya={duration:333,easing:"ease-in-out"},ba=["left","top","width","height","opacity","color","background"],Gn=new WeakMap;class wa extends zn{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===bs.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 be}getController(){return ma.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[t]){const s=this.u===void 0;return s&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((n=>this.t=!0)),this.element=e.element,Gn.set(this.element,this)),this.optionsOrCallback=t,(s||typeof t!="function")&&this.p(t),this.render(t)}p(e){e=e??{};const t=this.getController();t!==void 0&&((e={...t.defaultOptions,...e}).keyframeOptions={...t.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=ba,this.options=e}m(){const e={},t=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((n=>{const a=t[n]??(Fr[n]?void 0:s[n]),o=Number(a);e[n]=isNaN(o)?a+"":o})),e}v(){let e,t=!0;return this.options.guard&&(e=this.options.guard(),t=((s,n)=>{if(Array.isArray(s)){if(Array.isArray(n)&&n.length===s.length&&s.every(((a,o)=>a===n[o])))return!1}else if(n===s)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&t&&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 Hn;const t=this.O(),s=this.j(this.options.keyframeOptions,t),n=this.m();if(this.A!==void 0){const{from:a,to:o}=this.N(this.A,n,t);this.log("measured",[this.A,n,a,o]),e=this.calculateKeyframes(a,o)}else{const a=Lr.get(this.options.inId);if(a){Lr.delete(this.options.inId);const{from:o,to:h}=this.N(a,n,t);e=this.calculateKeyframes(o,h),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,qn++,e.forEach((d=>d.zIndex=qn))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,s)}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&&Lr.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Hn(),this.i?.isConnected){const t=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,t),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const n=this.A.left-s.left,a=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||n===0&&a===0||(this.element.style.position="relative"),n!==0&&(this.element.style.left=n+"px"),a!==0&&(this.element.style.top=a+"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 t=this.element.parentNode;t;t=t?.parentNode){const s=Gn.get(t);s&&!s.isDisabled()&&s&&e.push(s)}return e}get isHostRendered(){const e=Bn.has(this.u);return e||this.u.updateComplete.then((()=>{Bn.add(this.u)})),e}j(e,t=this.O()){const s={...ya};return t.forEach((n=>Object.assign(s,n.options.keyframeOptions))),Object.assign(s,e),s}N(e,t,s){e={...e},t={...t};const n=s.map((h=>h.animatingProperties)).filter((h=>h!==void 0));let a=1,o=1;return n.length>0&&(n.forEach((h=>{h.width&&(a/=h.width),h.height&&(o/=h.height)})),e.left!==void 0&&t.left!==void 0&&(e.left=a*e.left,t.left=a*t.left),e.top!==void 0&&t.top!==void 0&&(e.top=o*e.top,t.top=o*t.top)),{from:e,to:t}}calculateKeyframes(e,t,s=!1){const n={},a={};let o=!1;const h={};for(const d in t){const C=e[d],$=t[d];if(d in Fr){const k=Fr[d];if(C===void 0||$===void 0)continue;const w=k(C,$);w.transform!==void 0&&(h[d]=w.value,o=!0,n.transform=`${n.transform??""} ${w.transform}`,w.overrideFrom!==void 0&&Object.assign(n,w.overrideFrom))}else C!==$&&C!==void 0&&$!==void 0&&(o=!0,n[d]=C,a[d]=$)}return n.transformOrigin=a.transformOrigin=s?"center center":"top left",this.animatingProperties=h,o?[n,a]:void 0}async animate(e,t=this.options.keyframeOptions){this.start(),this.frames=e;let s=!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,t]),s=!0,this.webAnimation=this.element.animate(e,t);const n=this.getController();n?.add(this);try{await this.webAnimation.finished}catch{}n?.remove(this)}return this.didFinish(s),s}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,t){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,t)}}const _a=Vs(wa),Aa={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">
545
- <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"/>
546
- </svg>
547
- `,"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">
548
- <path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
549
- <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"/>
550
- </svg>
551
- `,check:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
552
- <path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
553
- </svg>
554
- `,"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
555
- <path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
556
- <path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
557
- <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"/>
558
- </svg>
559
- `,loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
560
- <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />
561
- </svg>
562
- `,"more-horiz":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
563
- <path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
564
- <path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
565
- <path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
566
- </svg>
567
- `,"more-vert":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
568
- <path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
569
- <path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
570
- <path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
571
- </svg>
572
- `,"nav-arrow-down":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
573
- <path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
574
- </svg>
575
- `,"warning-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">
576
- <path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
577
- <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
578
- <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"/>
579
- </svg>
580
- `}};/**
581
- * @license
582
- * Copyright 2017 Google LLC
583
- * SPDX-License-Identifier: BSD-3-Clause
584
- */class Mr extends Ws{constructor(e){if(super(e),this.it=be,e.type!==bs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===be||e==null)return this._t=void 0,this.it=e;if(e===bt)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 t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Mr.directiveName="unsafeHTML",Mr.resultType=1;const Jt=Vs(Mr),er=new Map,Yn={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 ka(r){let e=r.customLibraryPath,t=r.customLibraryDefaultPrefix;if(e==null){const s=document.querySelector("[customIconLibraryPath]");e=s?.getAttribute("customIconLibraryPath")??"",t==null&&(t=s?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:t||""}}function Sa(r,e){return r in Yn?r!=="custom"?Yn[r]:ka(e):null}const Kn=sessionStorage.getItem("sonicIconsCache"),$t=Kn?JSON.parse(Kn):{icons:{},names:[]},xa=100,Wr=class Wr{};Wr.default={get:async e=>{const t=e.library;if(!e.name)return"";const s=e.name,n=Aa;if(!t)return Jt(n.core[e.name]||"");const a=Sa(t,e);if(a){if(t==="custom"&&!a.url)return"";const o=e.prefix||a.defaultPrefix||"",h=n[t]||{};n[t]=h;const d=t==="custom"?`${a.url}|${o}-${s}`:`${o}-${s}`;if(h[d])return Jt(h[d]);const C=(a.url||"").replace("$prefix",o).replace("$name",s);if($t.icons[C]){const k=$t.icons[C];if(/^\s*<svg[\s>]/i.test(k||""))return h[d]=k,Jt(k);delete $t.icons[C]}if(!er.has(C)){const k=new Promise(async w=>{try{const E=await fetch(C);if(!E.ok){w("");return}try{const L=E.headers.get("content-type")||"";if(!L.includes("image/svg+xml")&&!L.includes("svg")){w("");return}const R=await E.text(),X=/^\s*<svg[\s>]/i.test(R);w(X?R:"")}catch{w("")}}catch{Ro(),w("")}});er.set(C,k)}const $=await er.get(C);if(er.delete(C),h[d]=$||"",$&&/^\s*<svg[\s>]/i.test($)&&($t.icons[C]=$,$t.names.push(C)),$t.names.length>xa){const k=$t.names.shift();delete $t.icons[k]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify($t)),$?Jt($):""}return Jt(n.core[e.name]||"")}};let Rr=Wr;function Ca(r){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(r)}function Ea(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function Pa(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Ta(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onBeforeConnected__=Ca,r.__onConnected__=Ea,r.__onDisconnected__=Pa;const e=r.connectedCallback;r.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(s=>s(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(s=>s(this))};const t=r.disconnectedCallback;r.disconnectedCallback=function(){t?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(s=>s(this))}}function $a(r){const e=[];let t=r;for(;t;)t instanceof Element&&e.push(t),t=t.parentNode||(t.host??null);return e}function Da(r){const e=r.parentNode||(r.getRootNode()?.host??null);return e instanceof Element?e:null}function Jn(r,e,t,s){const n=r,a=Be.getAncestorAttributeValue(r,e);!s.assignNull&&a===null||Object.is(n[t],a)||(n[t]=a)}const se=class se{static subscribe(e,t,s,n={assignNull:!0}){const a={component:e,attributeName:t,propertyKey:s,syncOptions:n,watchedAncestors:[],parentForReparent:null};return se.subscriptions.add(a),se.bindSubscription(a),()=>{se.unsubscribe(a)}}static bindSubscription(e){se.unbindWatchers(e);const t=$a(e.component);e.watchedAncestors=t;for(const n of t)se.addAttrSlot(n,e.attributeName,e);const s=Da(e.component);e.parentForReparent=s,s&&se.addParentSlot(s,e),se.pendingRefresh.add(e),se.scheduleRefresh()}static unbindWatchers(e){for(const t of e.watchedAncestors)se.removeAttrSlot(t,e.attributeName,e);e.watchedAncestors=[],e.parentForReparent&&(se.removeParentSlot(e.parentForReparent,e),e.parentForReparent=null)}static addAttrSlot(e,t,s){let n=se.attrSlots.get(e);n||(n=new Map,se.attrSlots.set(e,n));let a=n.get(t);if(!a){const o=Be.scopeAttributeNames(t),h=new Set,d=new MutationObserver(()=>{for(const C of h)se.subscriptions.has(C)&&se.pendingRefresh.add(C);se.scheduleRefresh()});d.observe(e,{attributes:!0,attributeFilter:o}),a={observer:d,subscriptions:h},n.set(t,a)}a.subscriptions.add(s)}static removeAttrSlot(e,t,s){const n=se.attrSlots.get(e);if(!n)return;const a=n.get(t);a&&(a.subscriptions.delete(s),!(a.subscriptions.size>0)&&(a.observer.disconnect(),n.delete(t)))}static addParentSlot(e,t){let s=se.parentSlots.get(e);if(!s){const a=new Map,o=new MutationObserver(h=>{const d=new Set;for(const C of h)C.removedNodes.forEach($=>{$ instanceof Element&&d.add($)}),C.addedNodes.forEach($=>{$ instanceof Element&&d.add($)});for(const C of d){const $=a.get(C);if($)for(const k of[...$])se.subscriptions.has(k)&&se.bindSubscription(k)}});o.observe(e,{childList:!0}),s={observer:o,byComponent:a},se.parentSlots.set(e,s)}let n=s.byComponent.get(t.component);n||(n=new Set,s.byComponent.set(t.component,n)),n.add(t)}static removeParentSlot(e,t){const s=se.parentSlots.get(e);if(!s)return;const n=s.byComponent.get(t.component);n&&(n.delete(t),n.size===0&&s.byComponent.delete(t.component)),!(s.byComponent.size>0)&&(s.observer.disconnect(),se.parentSlots.delete(e))}static unsubscribe(e){se.subscriptions.has(e)&&(se.unbindWatchers(e),se.subscriptions.delete(e),se.pendingRefresh.delete(e),se.subscriptions.size===0&&se.cancelScheduledRefresh())}static scheduleRefresh(){se.pendingRefresh.size!==0&&se.animationFrameId===null&&(se.animationFrameId=requestAnimationFrame(()=>{se.flushRefresh()}))}static cancelScheduledRefresh(){se.animationFrameId!==null&&(cancelAnimationFrame(se.animationFrameId),se.animationFrameId=null),se.pendingRefresh.clear()}static flushRefresh(){se.animationFrameId=null;const e=Array.from(se.pendingRefresh);se.pendingRefresh.clear();for(const t of e)se.subscriptions.has(t)&&Jn(t.component,t.attributeName,t.propertyKey,t.syncOptions)}};se.subscriptions=new Set,se.pendingRefresh=new Set,se.animationFrameId=null,se.attrSlots=new WeakMap,se.parentSlots=new WeakMap;let Ir=se;function Zn(r,e){const t=e?.dynamic??!1,s=t;return function(n,a){if(!n||(Ta(n),n.__onBeforeConnected__(h=>{Jn(h,r,a,{assignNull:s})}),!t))return;let o=null;n.__onConnected__(h=>{o=Ir.subscribe(h,r,a,{assignNull:!0})}),n.__onDisconnected__(()=>{o?.(),o=null})}}var Oa=Object.defineProperty,La=Object.getOwnPropertyDescriptor,Zt=(r,e,t,s)=>{for(var n=s>1?void 0:s?La(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Oa(e,t,n),n};const Nr=r=>O(r),Fa="sonic-icon";let Dt=class extends We{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Rr.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(r){(r.has("name")||r.has("prefix")||r.has("library")||this.library==="custom"&&(r.has("customIconLibraryPath")||r.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(r)}render(){return this.iconText?this.iconText:be}};Dt.styles=je`
585
- :host {
586
- line-height: 0.1em;
587
- width: fit-content;
588
- height: fit-content;
589
- vertical-align: -0.125em;
590
- flex-shrink: 0;
591
- }
592
-
593
- svg {
594
- height: var(--_sc-icon-size, 1em);
595
- width: calc(var(--_sc-icon-size, 1em) * 1.4);
596
- overflow: visible;
597
- }
598
-
599
- svg:not([fill="none"]) {
600
- fill: currentColor;
601
- }
602
-
603
- svg[fill="none"] {
604
- stroke-width: 2;
605
- }
606
-
607
- :host([size="2xs"]) svg {
608
- --_sc-icon-size: 0.625em;
609
- }
610
-
611
- :host([size="xs"]) svg {
612
- --_sc-icon-size: 0.75em;
613
- }
614
-
615
- :host([size="sm"]) svg {
616
- --_sc-icon-size: 0.875em;
617
- }
618
-
619
- :host([size="lg"]) svg {
620
- --_sc-icon-size: 1.25em;
621
- }
622
-
623
- :host([size="xl"]) svg {
624
- --_sc-icon-size: 1.5em;
625
- }
626
-
627
- :host([size="2xl"]) svg {
628
- --_sc-icon-size: 2em;
629
- }
630
-
631
- :host([size="3xl"]) svg {
632
- --_sc-icon-size: 2.8em;
633
- }
634
- `,Zt([ft()],Dt.prototype,"iconText",2),Zt([Nr({type:String})],Dt.prototype,"name",2),Zt([Nr({type:String})],Dt.prototype,"prefix",2),Zt([Nr({type:String})],Dt.prototype,"library",2),Zt([Zn("customIconLibraryPath",{dynamic:!0}),ft()],Dt.prototype,"customIconLibraryPath",2),Zt([Zn("customIconDefaultPrefix",{dynamic:!0}),ft()],Dt.prototype,"customIconDefaultPrefix",2),Dt=Zt([at(Fa)],Dt);function Ur(r){return r?r instanceof Object?r:Jt(r):be}const Xn=new WeakMap;function Ma(r){const e=Xn.get(r);if(e)return e;const t=new CSSStyleSheet;return t.replaceSync(r.cssText),Xn.set(r,t),t}function Ra(r){return r instanceof hr}function Qn(r){return r?(Array.isArray(r)?r:[r]).flatMap(t=>Array.isArray(t)?Qn(t):t instanceof CSSStyleSheet?[t]:Ra(t)?[Ma(t)]:[]):[]}Mn();const Ia=je`
635
- .custom-scroll {
636
- overflow: auto !important;
637
- overflow-y: overlay !important;
638
- }
639
-
640
- @media (hover: hover) {
641
- .custom-scroll::-webkit-scrollbar {
642
- width: 0.5rem;
643
- height: 0.5rem;
644
- border: solid 0.15rem transparent;
645
- border-radius: var(--sc-rounded);
646
- background: transparent;
647
- }
648
-
649
- .custom-scroll::-webkit-scrollbar-thumb {
650
- box-shadow: inset 0 0 2rem 2rem
651
- var(--sc-scrollbar-bg, var(--sc-base-400, var(--sc-base-content, #000)));
652
- border-radius: var(--sc-rounded);
653
- border: solid 0.15rem transparent;
654
- }
655
- }
656
- `;function ei(r){try{const e=JSON.parse(localStorage.getItem(r)||"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function Na(r,e){return!!ei(r)[e]}function Ua(r,e){const t=ei(r);t[e]=!0;try{localStorage.setItem(r,JSON.stringify(t))}catch{}}const ti="sonic-toast-dismissed";function si(r){return Na(ti,r)}function ja(r){Ua(ti,r)}const za=new Set(["en","fr","de","nl","es","it"]);function qa(r,e){const t=(Be.getLanguage()??"en").split("-")[0].toLowerCase();return za.has(t)&&r[t]?r[t]:r.en}const Es={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"}},Ba={error:Es.closeToastError,warning:Es.closeToastWarning,success:Es.closeToastSuccess,info:Es.closeToastInfo};function Ha(r){const e=r?Ba[r]:void 0;return qa(e??Es.closeToast)}const ri={default:"info-empty",info:"info-empty",success:"check-circled-outline",warning:"warning-circled-outline",error:"warning-circled-outline"};function jr(r){if(r)return r==="danger"?"error":r in ri?r:void 0}function Va(r){return r==="error"?"alert":"status"}function Wa(r){return r==="error"?null:"polite"}const Ga=je`
657
- :host {
658
- --sc-_color: var(--sc-base-content, #000);
659
- color: var(--sc-_color);
660
- }
661
-
662
- :host([status="warning"]) {
663
- --sc-_color: var(--sc-warning, var(--sc-base-content, #000));
664
- }
665
- :host([status="error"]) {
666
- --sc-_color: var(--sc-danger, var(--sc-base-content, #000));
667
- }
668
- :host([status="info"]) {
669
- --sc-_color: var(--sc-info, var(--sc-base-content, #000));
670
- }
671
- :host([status="success"]) {
672
- --sc-_color: var(--sc-success, var(--sc-base-content, #000));
673
- }
674
-
675
- .inherit-color {
676
- color: var(--sc-_color);
677
- }
678
- `;je`
679
- :host {
680
- --sc-_color: inherit;
681
- color: var(--sc-_color);
682
- }
683
-
684
- :host([type="primary"]) {
685
- --sc-_color: var(--sc-primary, var(--sc-base-content, #000));
686
- }
687
- :host([type="warning"]) {
688
- --sc-_color: var(--sc-warning, var(--sc-base-content, #000));
689
- }
690
- :host([type="danger"]) {
691
- --sc-_color: var(--sc-danger, var(--sc-base-content, #000));
692
- }
693
- :host([type="info"]) {
694
- --sc-_color: var(--sc-info, var(--sc-base-content, #000));
695
- }
696
- :host([type="success"]) {
697
- --sc-_color: var(--sc-success, var(--sc-base-content, #000));
698
- }
699
-
700
- .inherit-color {
701
- color: var(--sc-_color);
702
- }
703
- `,je`
704
- :host {
705
- --sc-_color: inherit;
706
- --sc-_bg: inherit;
707
- color: var(--sc-_color);
708
- background: var(--sc-_bg);
709
- }
710
-
711
- /*TYPES*/
712
- :host([type="primary"]) {
713
- --sc-_bg: var(--sc-primary, var(--sc-base-content, #000));
714
- --sc-_color: var(--sc-primary-content, var(--sc-base, #fff));
715
- }
716
- :host([type="warning"]) {
717
- --sc-_bg: var(--sc-warning, var(--sc-base-content, #000));
718
- --sc-_color: var(--sc-warning-content, var(--sc-base, #fff));
719
- }
720
- :host([type="danger"]) {
721
- --sc-_bg: var(--sc-danger, var(--sc-base-content, #000));
722
- --sc-_color: var(--sc-danger-content, var(--sc-base, #fff));
723
- }
724
- :host([type="info"]) {
725
- --sc-_bg: var(--sc-info, var(--sc-base-content, #000));
726
- --sc-_color: var(--sc-info-content, var(--sc-base, #fff));
727
- }
728
- :host([type="success"]) {
729
- --sc-_bg: var(--sc-success, var(--sc-base-content, #000));
730
- --sc-_color: var(--sc-success-content, var(--sc-base, #fff));
731
- }
732
-
733
- /* dans un contexte de couleur - divider color*/
734
- :host([type="primary"]),
735
- :host([type="warning"]),
736
- :host([type="danger"]),
737
- :host([type="info"]),
738
- :host([type="success"]) {
739
- --sc-border-color: currentColor;
740
- --sc-divider-opacity: 0.2;
741
- }
742
-
743
- :host([type="base"]) {
744
- --sc-_bg: var(--sc-base, #fff);
745
- --sc-_color: var(--sc-base-content, #000);
746
- }
747
- :host([type="default"]),
748
- :host([type="light"]) {
749
- --sc-_bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
750
- --sc-_color: var(--sc-base-content, #000);
751
- }
752
-
753
- :host([type="neutral"]) {
754
- --sc-_bg: var(--sc-base-content, #000);
755
- --sc-_color: var(--sc-base, #fff);
756
- }
757
-
758
- :host([type="invert"]) {
759
- --sc-_bg: var(--sc-base-900, var(--sc-base-content, #000));
760
- --sc-_color: var(--sc-base, #fff);
761
- }
762
-
763
- .inherit-bg {
764
- color: inherit;
765
- }
766
- `;var Ya=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,et=(r,e,t,s)=>{for(var n=s>1?void 0:s?Ka(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&Ya(e,t,n),n};const ni=6e3,Ja="sonic-toast-item";let Ge=class extends We{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=ni,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=r=>{this.contains(r.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(r){(r.has("dismissForever")||r.has("id"))&&(this._dismissed=this.dismissForever&&!!this.id&&si(this.id)),super.willUpdate(r)}getAriaRole(){return Va(jr(this.status)??"default")}getAriaLive(){return Wa(jr(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 be;const r=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,t=this.getAriaLive();return qe`<div
767
- class="sonic-toast ${this.ghost?"ghost":""}"
768
- role=${this.getAriaRole()}
769
- aria-live=${t||be}
770
- aria-atomic="true"
771
- aria-label=${e||be}
772
- >
773
- <button
774
- aria-label=${Ha(this.status)}
775
- class="sonic-toast-close"
776
- @click=${()=>this.hide()}
777
- >
778
- <sonic-icon name="cancel" size="lg"></sonic-icon>
779
- </button>
780
- <div
781
- class="sonic-toast-content custom-scroll"
782
- style="max-height: ${this.maxHeight} ;"
783
- >
784
- ${this.status&&qe`<sonic-icon
785
- name=${ri[jr(this.status)??"default"]}
786
- class="sonic-toast-icon"
787
- size="xl"
788
- aria-hidden="true"
789
- ></sonic-icon>`}
790
-
791
- <div class="sonic-toast-text">
792
- ${this.label?qe`<div class="sonic-toast-title" id=${r}>
793
- ${Ur(this.label)}
794
- </div>`:""}
795
- ${this.useSlot?be:Ur(this.text)}
796
- <slot></slot>
797
- </div>
798
- </div>
799
- </div>`}updated(r){r.has("styleSheet")&&this.syncAdoptedStyleSheets(),(r.has("preserve")||r.has("visible")||r.has("_dismissed"))&&this._syncHideTimer()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const r=Qn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(t=>!this._adoptedStyleSheets.includes(t));this.renderRoot.adoptedStyleSheets=[...e,...r],this._adoptedStyleSheets=r}hide(){this._clearHideTimer(),this._hidden=!0,Rn.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever&&ja(this.id),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this._hidden=!1,this._hideRemaining=ni,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}};Ge.styles=[Ia,Ga,je`
800
- * {
801
- box-sizing: border-box;
802
- }
803
- :host {
804
- display: block;
805
- pointer-events: auto;
806
- position: relative;
807
- --sc-toast-color: var(--sc-base-content, #000);
808
- --sc-toast-bg: var(--sc-base, #fff);
809
- --sc-toast-rounded: var(--sc-rounded-md);
810
- --sc-toast-shadow: var(--sc-shadow-lg);
811
- }
812
-
813
- .fixed-area {
814
- position: fixed;
815
- bottom: 1.25rem;
816
- right: 1.25rem;
817
- z-index: 10000;
818
- display: flex;
819
- flex-direction: column-reverse;
820
- }
821
-
822
- .sonic-toast {
823
- position: relative;
824
- pointer-events: auto;
825
- overflow: hidden;
826
- line-height: 1.25;
827
- box-shadow: var(--sc-toast-shadow);
828
- border-radius: var(--sc-toast-rounded);
829
- background: var(--sc-toast-bg);
830
- }
831
-
832
- .sonic-toast-content {
833
- padding: 0.8em 2.25rem 0.8em 0.8em;
834
- display: flex;
835
- gap: 0.5rem;
836
- overflow: auto;
837
- position: relative;
838
- }
839
-
840
- .sonic-toast-text {
841
- color: var(--sc-toast-color);
842
- align-self: center;
843
- margin-top: auto;
844
- margin-bottom: auto;
845
- max-width: 70ch;
846
- line-height: 1.2;
847
- }
848
-
849
- ::slotted(a:not(.btn)),
850
- .sonic-toast-text a {
851
- color: inherit !important;
852
- text-decoration: underline !important;
853
- text-underline-offset: 0.15rem;
854
- }
855
-
856
- ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6)),
857
- .sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6) {
858
- margin: 0 0 0.3em !important;
859
- }
860
-
861
- ::slotted(li),
862
- .sonic-toast-text li {
863
- margin-bottom: 0.15em !important;
864
- }
865
-
866
- ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child),
867
- .sonic-toast-text
868
- > :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child {
869
- margin-bottom: 0 !important;
870
- }
871
-
872
- /*BUTTON CLOSE*/
873
- .sonic-toast-close {
874
- all: unset;
875
- position: absolute;
876
- z-index: 4;
877
- pointer-events: initial;
878
- right: 0.5em;
879
- top: 0.5em;
880
- width: 1.5rem;
881
- height: 1.5rem;
882
- cursor: pointer;
883
- display: inline-flex;
884
- align-items: center;
885
- justify-content: center;
886
- border-radius: 50%;
887
- text-align: center;
888
- opacity: 0.5;
889
- color: var(--sc-toast-color);
890
- background: rgba(0, 0, 0, 0);
891
- }
892
-
893
- .sonic-toast-close:focus,
894
- .sonic-toast-close:hover {
895
- opacity: 1;
896
- background: rgba(0, 0, 0, 0.075);
897
- }
898
-
899
- .sonic-toast-close svg {
900
- width: 1rem;
901
- height: 1rem;
902
- object-fit: contain;
903
- object-position: center center;
904
- }
905
-
906
- /*Title*/
907
- .sonic-toast-title {
908
- font-weight: bold;
909
- font-size: 1.125rem;
910
- margin: 0.15em 0 0.15em;
911
- line-height: 1.2;
912
- }
913
-
914
- /*STATUS — accent via statusColor (--sc-_color) */
915
- :host([status]) .sonic-toast {
916
- border-top: 3px solid var(--sc-_color);
917
- }
918
-
919
- :host([status="success"]) .sonic-toast:before,
920
- :host([status="error"]) .sonic-toast:before,
921
- :host([status="info"]) .sonic-toast:before,
922
- :host([status="warning"]) .sonic-toast:before {
923
- background-color: var(--sc-_color);
924
- }
925
-
926
- .sonic-toast:before {
927
- content: "";
928
- display: block;
929
- position: absolute;
930
- left: 0;
931
- top: 0;
932
- right: 0;
933
- bottom: 0;
934
- opacity: 0.05;
935
- pointer-events: none;
936
- transition: 0.2s;
937
- border-radius: var(--sc-toast-rounded);
938
- }
939
-
940
- .sonic-toast:hover:before {
941
- opacity: 0.025;
942
- }
943
-
944
- .sonic-toast-icon {
945
- position: sticky;
946
- top: 0;
947
- }
948
-
949
- .ghost {
950
- opacity: 0.85;
951
- pointer-events: none;
952
- }
953
- `],et([O()],Ge.prototype,"label",2),et([O({type:String})],Ge.prototype,"id",2),et([O()],Ge.prototype,"text",2),et([O({type:String,reflect:!0})],Ge.prototype,"status",2),et([O({type:Boolean})],Ge.prototype,"ghost",2),et([O({type:Boolean})],Ge.prototype,"preserve",2),et([O({type:Boolean})],Ge.prototype,"dismissForever",2),et([O({type:String})],Ge.prototype,"maxHeight",2),et([O({type:Boolean})],Ge.prototype,"useSlot",2),et([O({attribute:!1})],Ge.prototype,"styleSheet",2),et([ft()],Ge.prototype,"visible",2),et([ft()],Ge.prototype,"_titleId",2),et([ft()],Ge.prototype,"_dismissed",2),Ge=et([at(Ja)],Ge);const Za=je`
954
- :host {
955
- /* POLICES */
956
- /*
957
- --sc-font-family-base: "Inter var", "Inter", -apple-system, system-ui,
958
- BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
959
- sans-serif;
960
- --sc-font-weight-base: 400;
961
- --sc-font-style-base: normal;
962
-
963
- --sc-headings-font-family: var(--sc-font-family-base, sans-serif);
964
- --sc-headings-font-style: var(--sc-font-style-base, normal);
965
- --sc-headings-line-height: 1.1;
966
- --sc-headings-font-weight: 700;
967
- */
968
-
969
- /* ROUNDED*/
970
- --sc-rounded-sm: calc(var(--sc-rounded, 0px) * 0.5);
971
- --sc-rounded: 0.375rem;
972
- --sc-rounded-md: calc(var(--sc-rounded, 0px) * 1.8);
973
- --sc-rounded-lg: calc(var(--sc-rounded, 0px) * 3);
974
- --sc-rounded-xl: calc(var(--sc-rounded, 0px) * 7);
975
-
976
- /* BOUTONS */
977
- /*
978
- --sc-btn-font-family: var(--sc-font-family-base, sans-serif); *
979
- --sc-btn-font-weight: 500;
980
- */
981
-
982
- /* Placeholder */
983
- /*--sc-placeholder-bg: rgba(17, 24, 39, 0.05); */
984
-
985
- /* 4 for rounded full*/
986
- --sc-btn-rounded-intensity: 1.4;
987
- --sc-rounded-size-intensity: calc((1em - 1rem) * 0.4);
988
- --sc-btn-rounded: calc(
989
- (var(--sc-rounded, 0px) + var(--sc-rounded-size-intensity)) *
990
- var(--sc-btn-rounded-intensity)
991
- );
992
-
993
- /* OMBRES */
994
- --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1),
995
- 0 1px 2px -1px rgb(0 0 0 / 0.1);
996
- --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
997
- 0 2px 4px -2px rgb(0 0 0 / 0.1);
998
- --sc-shadow-lg: 0 10px 15px 0px rgb(0 0 0 / 0.1),
999
- 0 4px 6px -4px rgb(0 0 0 / 0.1);
1000
- --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
1001
- 0 8px 10px -6px rgb(0 0 0 / 0.1);
1002
- --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
1003
-
1004
- /* Forms */
1005
- --sc-border-width: max(1px, 0.12rem);
1006
- --sc-border-color: var(--sc-base-100, var(--sc-base-content, #000));
1007
- /*--sc-form-height: 2.5em; */ /*ok*/
1008
- --sc-form-border-width: var(--sc-border-width);
1009
- --sc-input-bg: var(--sc-base-100, rgba(0, 0, 0, 0.07));
1010
- --sc-input-border-color: var(--sc-input-bg);
1011
- --sc-input-rounded-intensity: 1.4;
1012
- --sc-input-rounded: calc(
1013
- (var(--sc-rounded, 0px) + var(--sc-rounded-size-intensity)) *
1014
- var(--sc-input-rounded-intensity)
1015
- );
1016
- /*formulaires*/
1017
- --sc-input-color: var(--sc-base-content, #000);
1018
-
1019
- /* CONTRAST */
1020
- /* -- ex : Text on images */
1021
- --sc-contrast-content: #fff;
1022
- --sc-contrast: #000000;
1023
- }
1024
- `,Xa=je`
1025
- :host([theme="light"]) {
1026
- /*Boutons*/
1027
- --sc-primary: var(--sc-base-800);
1028
- --sc-info: #2563eb;
1029
- --sc-danger: #f43f5e;
1030
- --sc-warning: #f97316;
1031
- --sc-success: #14b8a6;
1032
-
1033
- --sc-primary-content: var(--sc-base, #fff);
1034
- --sc-info-content: var(--sc-base, #fff);
1035
- --sc-danger-content: var(--sc-base, #fff);
1036
- --sc-warning-content: var(--sc-base, #fff);
1037
- --sc-success-content: var(--sc-base, #fff);
1038
-
1039
- /*Bases*/
1040
- --sc-base: #fff;
1041
- --sc-base-50: #f8fafc;
1042
- --sc-base-100: #f1f5f9;
1043
- --sc-base-200: #e2e8f0;
1044
- --sc-base-300: #cbd5e1;
1045
- --sc-base-400: #94a3b8;
1046
- --sc-base-500: #64748b;
1047
- --sc-base-600: #475569;
1048
- --sc-base-700: #334155;
1049
- --sc-base-800: #1e293b;
1050
- --sc-base-900: #0f172a;
1051
- --sc-base-content: var(--sc-base-700);
1052
- }
1053
- `,ii=je`
1054
- --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
1055
- --sc-info: var(--sc-dark-info, #3abff8);
1056
- --sc-danger: var(--sc-dark-danger, #f87272);
1057
- --sc-warning: var(--sc-dark-warning, #fbbd23);
1058
- --sc-success: var(--sc-dark-success, #36d399);
1059
-
1060
- --sc-primary-content: var(--sc-dark-primary-content, #002b3d);
1061
- --sc-info-content: var(--sc-dark-info-content, #002b3d);
1062
- --sc-danger-content: var(--sc-dark-danger-content, #382800);
1063
- --sc-warning-content: var(--sc-dark-warning-content, #382800);
1064
- --sc-success-content: var(--sc-dark-success-content, #003320);
1065
-
1066
- --sc-base: var(--sc-dark-base, #1d2634);
1067
- --sc-base-50: var(--sc-dark-base-50, #1f2937);
1068
- --sc-base-100: var(--sc-dark-base-100, #252c36);
1069
- --sc-base-200: var(--sc-dark-base-200, #2c3543);
1070
- --sc-base-300: var(--sc-dark-base-300, #38414e);
1071
- --sc-base-400: var(--sc-dark-base-400, #515964);
1072
- --sc-base-500: var(--sc-dark-base-500, #828891);
1073
- --sc-base-600: var(--sc-dark-base-600, #b4b8be);
1074
- --sc-base-700: var(--sc-dark-base-700, #cdd0d5);
1075
- --sc-base-800: var(--sc-dark-base-800, #d9dce0);
1076
- --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
1077
- --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
1078
- `,Qa=je`
1079
- :host([theme="dark"]) {
1080
- ${ii}
1081
- }
1082
-
1083
- @media (prefers-color-scheme: dark) {
1084
- :host([theme="auto"]) {
1085
- ${ii}
1086
- }
1087
- }
1088
- `;var el=Object.defineProperty,tl=Object.getOwnPropertyDescriptor,Ps=(r,e,t,s)=>{for(var n=s>1?void 0:s?tl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&el(e,t,n),n};const sl="sonic-theme";let vt=class extends We{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const r=document.styleSheets,e=r.length,t=[];for(let n=0;n<e;n++){const a=r[n];a.href&&(a.href.includes("googleapis")||a.href.includes("typekit.net"))&&t.push(a.href)}const s={variables:this.getCssVariables(),fonts:t};De.get("sonic-theme")?.set(s),document.querySelectorAll("iframe").forEach(n=>n.contentWindow?.postMessage({type:"SonicTheme",...s},"*"))}receiveMessage(r){const e=r.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],e=[...vt.styles.map(n=>n.styleSheet),...Array.from(document.styleSheets)];for(const n of e)try{if(!n)continue;const a=n.cssRules;for(const o of a){if(!("style"in o))continue;const h=o.style;for(const d of h)r.includes(d)||d.indexOf("--sc")!==0||r.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const t=window.getComputedStyle(this),s={};return r.forEach(n=>s[n]=t.getPropertyValue(n)),s}render(){return qe`<slot></slot>`}};vt.styles=[Xa,Qa,Za,je`
1089
- :host([color]) {
1090
- color: var(--sc-base-content, #000);
1091
- }
1092
-
1093
- :host([font]) {
1094
- font-family: var(--sc-font-family-base, sans-serif);
1095
- font-weight: var(--sc-font-weight-base, 400);
1096
- font-style: var(--sc-font-style-base, normal);
1097
- }
1098
- ::slotted(.sonic-pop-content) {
1099
- max-width: 100vw;
1100
- background-color: var(--sc-base, #fff);
1101
- position: fixed;
1102
- z-index: 99999;
1103
- display: block;
1104
- transform: translateY(1rem) scale(0.95);
1105
- pointer-events: none;
1106
- transition-duration: 0.15s;
1107
- transition-timing-function: ease;
1108
-
1109
- transition-property: scale, opacity;
1110
- border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
1111
- }
1112
-
1113
- ::slotted(.sonic-pop-content).is-open {
1114
- transform: translateY(0) scale(1);
1115
- opacity: 1;
1116
- pointer-events: auto;
1117
- transition-property: scale, opacity;
1118
- transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1119
- }
1120
- `],Ps([O({type:String,reflect:!0})],vt.prototype,"theme",2),Ps([O({type:Boolean,reflect:!0})],vt.prototype,"background",2),Ps([O({type:Boolean,reflect:!0})],vt.prototype,"color",2),Ps([O({type:Boolean,reflect:!0})],vt.prototype,"font",2),vt=Ps([at(sl)],vt);var rl=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,oi=(r,e,t,s)=>{for(var n=s>1?void 0:s?nl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&rl(e,t,n),n};let ai=!1;function li(r){if(r.label!==void 0)return r.label;if(r.title!==void 0)return ai||(ai=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),r.title}const il="sonic-toast";let ie=class extends We{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const r=window.parent!=window;let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return r||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"45ch",flexDirection:"column-reverse"}),ie.handleExistingToastDelegation(),this.toasts?qe`<div style=${xn(e)}>
1121
- ${da(this.toasts,t=>t.id,t=>qe`
1122
- <sonic-toast-item
1123
- maxHeight=${r?"none":"10rem"}
1124
- status=${gt(t.status)}
1125
- .label=${li(t)}
1126
- .text=${t.useSlot?void 0:t.text}
1127
- .styleSheet=${t.styleSheet}
1128
- ?useSlot=${t.useSlot}
1129
- ?ghost=${t.ghost}
1130
- ?dismissForever=${t.dismissForever}
1131
- ?preserve=${t.preserve}
1132
- id=${gt(t.id)}
1133
- @hide=${()=>this.removeItem(t)}
1134
- ${_a({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})}
1135
- >
1136
- ${t.useSlot?Ur(t.text):be}
1137
- </sonic-toast-item>
1138
- `)}
1139
- </div>`:be}static removeAll(){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const r=ie.getInstance();r&&(r.toasts=r.toasts.filter(e=>e.ghost))}static removeItemsByStatus(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:r},"*");return}const e=ie.getInstance();e&&(e.toasts=e.toasts.filter(t=>t.status!==r))}static removeItemById(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:r},"*");return}const e=ie.getInstance();e&&(e.toasts=e.toasts.filter(t=>t.id!==r))}static removeTemporaryItems(){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const r=ie.getInstance();r&&(r.toasts=r.toasts.filter(e=>e.preserve))}static getInstance(){return ie.instance||(ie.instance=document.createElement("sonic-toast"),vt.getPopContainer().prepend(ie.instance)),ie.instance}static add(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:r},"*");return}const e=ie.getInstance(),t=r.id??new Date().valueOf(),s=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof r.text=="string"&&s.test(r.text),a={id:t,text:r.text,label:li(r),status:r.status,preserve:n?!0:r.preserve,ghost:r.ghost,dismissForever:r.dismissForever,styleSheet:r.styleSheet,useSlot:r.useSlot};if(r.dismissForever&&r.id&&si(r.id))return null;if(e?.toasts.length){const o={...a};for(const h of e.toasts){const d={...h};if(o.id=d.id=0,lt.shallowEqual(o,d))return null}}return e&&(e.toasts=[...e.toasts,a]),a}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const r=ie.getInstance();window.parent.postMessage({type:"addToasts",toasts:r.toasts},"*"),r.toasts=[]}static removeItem(r){if(ie.delegateToasts){ie.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:r},"*");return}const e=ie.getInstance();e&&e.removeItem(r)}removeItem(r){r&&(this.toasts=this.toasts.filter(e=>(e={...e},delete e.id,!lt.shallowEqual(e,r,!1))))}};ie.delegateToasts=!1,oi([O({type:Array})],ie.prototype,"toasts",2),ie=oi([at(il)],ie),typeof window<"u"&&(window[_r+"Toast"]=window[_r+"Toast"]||ie);function ol(){const r=t=>{t.data.type=="querySonicToastAvailability"&&t.source.postMessage({type:"sonicToastAvailable"},"*"),t.data.type=="removeItemsByStatus"&&ie.removeItemsByStatus(t.data.status),t.data.type=="removeItemById"&&ie.removeItemById(t.data.id),t.data.type=="removeTemporaryItems"&&ie.removeTemporaryItems(),t.data.type=="sonicToastAvailable"&&(ie.delegateToasts=!0,ie.handleExistingToastDelegation()),t.data.type=="addToasts"&&(ie.getInstance().toasts=[...ie.getInstance().toasts,...t.data.toasts]),t.data.type=="removeAllToasts"&&ie.removeAll(),t.data.type=="removeToast"&&ie.removeItem(t.data.toast),t.data.type=="addToast"&&ie.add(t.data.toast)},e=window.parent!=window;if(window.addEventListener("message",r,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const t of document.querySelectorAll("iframe"))t.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}ol();var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,Ts=(r,e,t,s)=>{for(var n=s>1?void 0:s?ll(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&al(e,t,n),n};const cl=new Set,ul=new Set,hl=r=>{for(const e of ul)e(r)},zr=new Set;let qr=0;vn(async()=>{qr++;const r=qr,e=Array.from(zr);for(;e.length>0;){if(r!=qr)return;const t=e.splice(0,4);await Promise.all(t.map(s=>s.refetch()))}});const fl=(r,e)=>{class t extends r{constructor(...n){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(n){super.props=n}set endPoint(n){this._endPoint=n,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 ws(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await De.getInstance().isLocalStrorageReady,!this.isConnected))return;const n=De.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||"",n)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||cl.add(this),hl(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&ie.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 h=o._sonic_http_response_,d=this.key.split(".");o=lt.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&lt.isObject(o)&&h&&(o._sonic_http_response_=h)}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(),zr.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"),zr.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 n=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),a={root:null,rootMargin:Math.max(window.innerWidth*n,window.innerHeight*n)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),a);let h=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(h?.nodeName.toLocaleLowerCase()=="slot"&&(h=[...h.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!h||h.nodeName.toLocaleLowerCase()=="template"){h=document.createElement("div");const d=h.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=h,this.appendChild(h)}h?this.iObserver.observe(h):this.isFirstLoad&&this._fetchData()}onIntersection(n){for(const a of n)if(a.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Ts([O()],t.prototype,"noErrorsRecordings",2),Ts([O()],t.prototype,"props",1),Ts([O({type:String})],t.prototype,"endPoint",1),Ts([O()],t.prototype,"requestId",2),Ts([O({type:Number})],t.prototype,"refetchEveryMs",2),t};var dl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,Xt=(r,e,t,s)=>{for(var n=s>1?void 0:s?pl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&dl(e,t,n),n};const gl=r=>{class e extends r{constructor(...s){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const n=this.getFormPublisher();n&&(n.isFormValid=!1),s.reportValidity()}set type(s){this.hasAttribute("type")&&!this.forceAutoFill&&(s=this.getAttribute("type")),this._type=s,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(s){this.hasAttribute("description")&&!this.forceAutoFill&&(s=this.getAttribute("description")),this._description=s,this.requestUpdate()}get label(){return this._label}set label(s){this.hasAttribute("label")&&!this.forceAutoFill&&(s=this.getAttribute("label")),this._label=s,this.requestUpdate()}}return Xt([O()],e.prototype,"forceAutoFill",2),Xt([O({type:String})],e.prototype,"type",1),Xt([O()],e.prototype,"description",1),Xt([O()],e.prototype,"label",1),Xt([O({type:String,reflect:!0})],e.prototype,"status",2),Xt([O({type:Number})],e.prototype,"tabindex",2),Xt([O({type:String})],e.prototype,"autocomplete",2),e},Br=new Map,ci=r=>{if(!r)return null;const e=Be.getApiConfiguration(r),t=Be.getAncestorAttributeValue(r,"wordingProvider"),s=Be.getAncestorAttributeValue(r,"wordingVersionProvider"),n={apiConfiguration:e,wordingProvider:t,wordingVersionProvider:s};let a=null;for(const[o,h]of Br)if(lt.deepEqual(o,n)){a=h;break}return a||(a={api:new ws(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:t,callIndex:0,wordingVersionProvider:s,apiCallKey:n},Br.set(n,a)),a},ui="",Ee=class Ee extends zn{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=t=>{const s=this.useUnsafeHTML?Jt(t):t;this.setValue(s)},this.node=e.options.host}unsubscribe(){Ee.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,t=!1){return this.useUnsafeHTML=t,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),bt}static async callApi(e,t,s=!0,n){if(await De.getInstance().isLocalStrorageReady,Ee.firstCall){Ee.firstCall=!1,vn(Ee.reloadWordings);const $=Object.keys(Ee.publisher.get());for(const k of $)Ee.publisher.get()[k]===ui&&delete Ee.publisher[k]}if(e){const $=Be.getAncestorAttributeValue(e,"wordingVersionProvider");$&&_n($).onAssign(Ee.handleVersionProvider(e))}let a=Ee.publisher.get()["wording_"+t]!=null;const o=n||ci(e);if(!o)return;if(a&&t!==""){o.translatedKeys.add(t);return}o.callIndex++;const h=o.callIndex,d=o.wordingProvider??"";if(!d&&s){window.setTimeout(async()=>{Ee.callApi(null,t,!1,o)},1e3);return}const C=o.api;window.queueMicrotask(async()=>{if(a=Ee.publisher["wording_"+t].get()!=null,!a&&t!==""&&(o.keysToTranslate.add(t),Ee.publisher["wording_"+t].set(ui)),h!==o.callIndex)return;const $=Array.from(o.keysToTranslate);if(!$.length)return;const k=d.split("?"),w=k.shift(),E=(k.length>0?k.join("?")+"&":"")+"labels[]="+$.join("&labels[]="),L=w+"?"+E;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const R=await C.get(L);for(const X in R)Ee.publisher["wording_"+X].set(R[X])})}static reloadWordings(){for(const e of Br.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&Ee.callApi(null,"",!1,e)}static handleVersionProvider(e){const t=ci(e),s=a=>{};if(!t)return s;if(Ee.versionProviderHandlers.has(t))return Ee.versionProviderHandlers.get(t)||s;const n=function(a){if(!t.wordingVersionProvider)return;const h=Ee.publisher.get().__wording_versions__??[];if(a==null)return;const d=h.find(C=>C.serviceURL===t.api.serviceURL)||{serviceURL:t.api.serviceURL,version:0};h.includes(d)||h.push(d),a!==d.version&&(d.version=a,Ee.publisher.set({__wording_versions__:h}),Ee.reloadWordings())};return Ee.versionProviderHandlers.set(t,n),n}subscribe(e){this.unsubscribe(),Ee.publisher["wording_"+e].onAssign(this.onAssign),Ee.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};Ee.publisher=De.get("sonic-wording",{localStorageMode:"enabled"}),Ee.firstCall=!0,Ee.versionProviderHandlers=new Map;let $s=Ee;var vl=Object.defineProperty,ml=Object.getOwnPropertyDescriptor,_t=(r,e,t,s)=>{for(var n=s>1?void 0:s?ml(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&vl(e,t,n),n};let tr=!1,Hr=new Set;const yl=(r,e)=>{var n;const t=(n=class extends r{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=h=>{this.props=h}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return Be.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){if(typeof o=="string"&&["{","["].includes(o.trim().charAt(0)))try{o=JSON.parse(o)}catch{}o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter($=>$.tagName!="STYLE"),C=this.displayContents?"contents":d.length==0?"none":null;C?this.style.display=C:this.style.removeProperty("display")}connectedCallback(){if(n.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let h=!0;const d=new IntersectionObserver(C=>{for(const $ of C)if(h&&$.isIntersecting){h=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.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)),$s.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(),tr=!tr)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{tr||this.removeDebugger(),document.body.appendChild(this.debug),Hr.add(this.debug)}),this.addEventListener("mouseout",()=>{tr||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
1140
- <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
1141
- Variable disponible dans la console<br>
1142
- ctrl + Clique : épingler / désépingler
1143
- </div>
1144
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Hr.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Hr=new Set}getApiConfiguration(){return Be.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const h of o)h.indexOf("wording_")==0&&$s.callApi(this,h.substring(8));$s.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return Ys.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=De.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let h=this.dataProvider;if(!h&&this._props&&(this.dataProvider=h="__subscriber__"+n.instanceCounter),h){this.bindPublisher&&o.set(h,this.bindPublisher());let d=o.get(h,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=h,this.hasAttribute("subDataProvider")){const C=this.getAttribute("subDataProvider");this.dataProvider=h+"/"+C,d=lt.traverse(d,C.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}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))}},n.instanceCounter=0,n);return _t([O({type:Number})],t.prototype,"collectDependenciesVersion",2),_t([O({type:Boolean})],t.prototype,"displayContents",2),_t([O({type:Boolean})],t.prototype,"noAutoFill",2),_t([O({type:Boolean})],t.prototype,"forceAutoFill",2),_t([O({type:Object})],t.prototype,"propertyMap",2),_t([O({type:String,attribute:"data-title"})],t.prototype,"title",2),_t([O({reflect:!0})],t.prototype,"dataProvider",2),_t([O()],t.prototype,"bindPublisher",2),_t([O()],t.prototype,"props",1),_t([ft()],t.prototype,"shouldRenderLazy",2),t};var bl=Object.defineProperty,wl=(r,e,t,s)=>{for(var n=void 0,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=o(e,t,n)||n);return n&&bl(e,t,n),n};const _l=r=>{class e extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const s=this.templates||[...this.querySelectorAll("template")];for(const n of s)n.hasAttribute(this.templateValueAttribute)&&(this.templateParts[n.getAttribute(this.templateValueAttribute)]=n,this.templatePartsList.push(n)),n.hasAttribute("skeleton")&&(this.templateParts.skeleton=n),n.hasAttribute("no-result")&&(this.templateParts["no-result"]=n),n.hasAttribute("no-item")&&(this.templateParts["no-item"]=n);this.templateList=s.filter(n=>!n.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=s),super.connectedCallback()}}return wl([O({type:Array})],e.prototype,"templates"),e},Al=fl,kl=In,Sl=Cn,xl=gl,hi=yl,Cl=_l;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Al,FormCheckable:kl,FormElement:Sl,FormInput:xl,Subscriber:hi,TemplatesContainer:Cl};var El=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor,At=(r,e,t,s)=>{for(var n=s>1?void 0:s?Pl(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(s?o(e,t,n):o(n))||n);return s&&n&&El(e,t,n),n};const Tl="sonic-matrix";function Vr(r,e){if(!e)return r;let t=r;for(const s of e.split(".").filter(Boolean)){if(t==null)return;t=t[s]}return t}let ct=class extends hi(We){constructor(){super(...arguments),this.key="grid",this.cols=0,this.palette={0:"transparent",1:"#00f0f0",2:"#0000f0",3:"#f0a000",4:"#f0f000",5:"#00f000",6:"#a000f0",7:"#f00000"},this.cell="24",this.gap=1,this.radius=2,this.ghostKey="",this.labelKey="",this.lastSig=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","img")}updated(){this.draw()}readGrid(){const r=this.props,e=r?Vr(r,this.key):void 0;if(Array.isArray(e)&&Array.isArray(e[0]))return e;if(Array.isArray(e)&&this.cols>0){const t=e,s=[];for(let n=0;n<t.length;n+=this.cols)s.push(t.slice(n,n+this.cols).map(a=>Number(a)||0));return s}return[]}readGhost(){if(!this.ghostKey)return null;const r=this.props,e=r?Vr(r,this.ghostKey):void 0;return Array.isArray(e)&&Array.isArray(e[0])?e:null}colorFor(r,e=!1){const t=this.palette?.[String(r)]??this.palette?.[r]??"#888";return!e||t==="transparent"||t.startsWith("var(")?t:`${t}66`}draw(){const r=this.readGrid(),e=this.readGhost(),t=r.length,s=t?r[0].length:0;if(!s||!t||!this.canvas)return;const n=JSON.stringify({grid:r,ghost:e,palette:this.palette,cell:this.cell,gap:this.gap});if(n===this.lastSig)return;this.lastSig=n;const a=this.clientWidth||s*24,o=this.cell==="auto"?Math.max(1,Math.floor(a/s)):Math.max(1,Number(this.cell)||24),h=Math.max(0,this.gap),d=Math.min(2,window.devicePixelRatio||1),C=s*o,$=t*o;this.canvas.width=Math.floor(C*d),this.canvas.height=Math.floor($*d),this.canvas.style.width=`${C}px`,this.canvas.style.height=`${$}px`;const k=this.canvas.getContext("2d");if(!k)return;k.setTransform(d,0,0,d,0,0),k.clearRect(0,0,C,$);const w=(E,L)=>{for(let R=0;R<E.length;R++){const X=E[R];for(let Z=0;Z<X.length;Z++){const A=Number(X[Z])||0;if(!A&&!L||!A)continue;k.fillStyle=this.colorFor(A,L);const m=Z*o+h,M=R*o+h,_=o-h*2;if(this.radius>0){const T=Math.min(this.radius,_/2);k.beginPath(),k.roundRect(m,M,_,_,T),k.fill()}else k.fillRect(m,M,_,_)}}};if(e&&w(e,!0),w(r,!1),this.labelKey){const E=this.props,L=E?Vr(E,this.labelKey):void 0;L!=null&&this.setAttribute("aria-label",String(L))}}render(){return qe`<canvas></canvas>`}};ct.styles=je`
1145
- :host {
1146
- display: block;
1147
- width: 100%;
1148
- max-width: 100%;
1149
- line-height: 0;
1150
- }
1151
- canvas {
1152
- display: block;
1153
- width: 100%;
1154
- height: auto;
1155
- image-rendering: pixelated;
1156
- }
1157
- `,At([O({type:String})],ct.prototype,"key",2),At([O({type:Number})],ct.prototype,"cols",2),At([O({type:Object})],ct.prototype,"palette",2),At([O({type:String})],ct.prototype,"cell",2),At([O({type:Number})],ct.prototype,"gap",2),At([O({type:Number})],ct.prototype,"radius",2),At([O({type:String,attribute:"ghost-key"})],ct.prototype,"ghostKey",2),At([O({type:String,attribute:"label-key"})],ct.prototype,"labelKey",2),At([qi("canvas")],ct.prototype,"canvas",2),ct=At([at(Tl)],ct)})();