@supersoniks/concorde 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +1 -1
  3. package/concorde-core.es.js +1 -1
  4. package/dist/concorde-core.bundle.js +1 -1
  5. package/dist/concorde-core.es.js +1 -1
  6. package/docs/altcha-widget.js +2662 -0
  7. package/docs/assets/index--GpD7R7a.css +1 -0
  8. package/docs/assets/index-BnK6OS7w.js +12115 -0
  9. package/docs/crawl/core/components/functional/date/date.html +190 -0
  10. package/docs/crawl/core/components/functional/fetch/fetch.html +109 -0
  11. package/docs/crawl/core/components/functional/if/if.html +27 -0
  12. package/docs/crawl/core/components/functional/jsonata/jsonata.html +79 -0
  13. package/docs/crawl/core/components/functional/list/list.html +70 -0
  14. package/docs/crawl/core/components/functional/mix/mix.html +45 -0
  15. package/docs/crawl/core/components/functional/queue/queue.html +96 -0
  16. package/docs/crawl/core/components/functional/router/router.html +106 -0
  17. package/docs/crawl/core/components/functional/sdui/sdui.html +269 -0
  18. package/docs/crawl/core/components/functional/states/states.html +66 -0
  19. package/docs/crawl/core/components/functional/submit/submit.html +160 -0
  20. package/docs/crawl/core/components/functional/subscriber/subscriber.html +67 -0
  21. package/docs/crawl/core/components/functional/value/value.html +51 -0
  22. package/docs/crawl/core/components/ui/alert/alert.html +140 -0
  23. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +23 -0
  24. package/docs/crawl/core/components/ui/badge/badge.html +148 -0
  25. package/docs/crawl/core/components/ui/button/button.html +150 -0
  26. package/docs/crawl/core/components/ui/captcha/captcha.html +30 -0
  27. package/docs/crawl/core/components/ui/card/card.html +143 -0
  28. package/docs/crawl/core/components/ui/divider/divider.html +58 -0
  29. package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +73 -0
  30. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +135 -0
  31. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +79 -0
  32. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +62 -0
  33. package/docs/crawl/core/components/ui/form/input/input.html +109 -0
  34. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +38 -0
  35. package/docs/crawl/core/components/ui/form/radio/radio.html +56 -0
  36. package/docs/crawl/core/components/ui/form/select/select.html +73 -0
  37. package/docs/crawl/core/components/ui/form/switch/switch.html +56 -0
  38. package/docs/crawl/core/components/ui/form/textarea/textarea.html +59 -0
  39. package/docs/crawl/core/components/ui/group/group.html +82 -0
  40. package/docs/crawl/core/components/ui/icon/icon.html +133 -0
  41. package/docs/crawl/core/components/ui/image/image.html +186 -0
  42. package/docs/crawl/core/components/ui/link/link.html +42 -0
  43. package/docs/crawl/core/components/ui/loader/loader.html +50 -0
  44. package/docs/crawl/core/components/ui/menu/menu.html +322 -0
  45. package/docs/crawl/core/components/ui/modal/modal.html +117 -0
  46. package/docs/crawl/core/components/ui/pop/pop.html +178 -0
  47. package/docs/crawl/core/components/ui/progress/progress.html +58 -0
  48. package/docs/crawl/core/components/ui/table/table.html +413 -0
  49. package/docs/crawl/core/components/ui/toast/toast.html +122 -0
  50. package/docs/crawl/core/components/ui/tooltip/tooltip.html +79 -0
  51. package/docs/crawl/docs/_core-concept/dataFlow.html +177 -0
  52. package/docs/crawl/docs/_core-concept/overview.html +66 -0
  53. package/docs/crawl/docs/_core-concept/subscriber.html +75 -0
  54. package/docs/crawl/docs/_decorators/ancestor-attribute.html +116 -0
  55. package/docs/crawl/docs/_decorators/auto-subscribe.html +202 -0
  56. package/docs/crawl/docs/_decorators/bind.html +141 -0
  57. package/docs/crawl/docs/_decorators/get.html +149 -0
  58. package/docs/crawl/docs/_decorators/handle.html +165 -0
  59. package/docs/crawl/docs/_decorators/on-assign.html +355 -0
  60. package/docs/crawl/docs/_decorators/patch.html +78 -0
  61. package/docs/crawl/docs/_decorators/post.html +139 -0
  62. package/docs/crawl/docs/_decorators/publish.html +61 -0
  63. package/docs/crawl/docs/_decorators/put.html +78 -0
  64. package/docs/crawl/docs/_decorators/subscribe.html +109 -0
  65. package/docs/crawl/docs/_decorators/wait-for-ancestors.html +137 -0
  66. package/docs/crawl/docs/_directives/sub.html +93 -0
  67. package/docs/crawl/docs/_getting-started/ai-agents.html +173 -0
  68. package/docs/crawl/docs/_getting-started/concorde-manual-install.html +100 -0
  69. package/docs/crawl/docs/_getting-started/concorde-outside.html +58 -0
  70. package/docs/crawl/docs/_getting-started/create-a-component.html +111 -0
  71. package/docs/crawl/docs/_getting-started/my-first-component.html +189 -0
  72. package/docs/crawl/docs/_getting-started/my-first-subscriber.html +110 -0
  73. package/docs/crawl/docs/_getting-started/pubsub.html +62 -0
  74. package/docs/crawl/docs/_getting-started/start.html +76 -0
  75. package/docs/crawl/docs/_getting-started/theming.html +85 -0
  76. package/docs/crawl/docs/_misc/api-configuration.html +149 -0
  77. package/docs/crawl/docs/_misc/dataProviderKey.html +135 -0
  78. package/docs/crawl/docs/_misc/docs-mock-api.html +158 -0
  79. package/docs/crawl/docs/_misc/dynamic-path.html +180 -0
  80. package/docs/crawl/docs/_misc/endpoint.html +50 -0
  81. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +138 -0
  82. package/docs/crawl/docs/_misc/html-integration.html +48 -0
  83. package/docs/crawl/hubs/decorators.html +547 -0
  84. package/docs/crawl/hubs/form-components.html +359 -0
  85. package/docs/crawl/hubs/remote-data.html +452 -0
  86. package/docs/crawl/index.html +101 -0
  87. package/docs/css/docs.css +0 -0
  88. package/docs/docs-mock-api-sw.js +724 -0
  89. package/docs/docs-mock-api-sw.js.map +7 -0
  90. package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
  91. package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
  92. package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
  93. package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
  94. package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
  95. package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
  96. package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
  97. package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  98. package/docs/fonts/ClashGrotesk-Light.eot +0 -0
  99. package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
  100. package/docs/fonts/ClashGrotesk-Light.woff +0 -0
  101. package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
  102. package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
  103. package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
  104. package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
  105. package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
  106. package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
  107. package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
  108. package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
  109. package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
  110. package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
  111. package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
  112. package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
  113. package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  114. package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
  115. package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
  116. package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
  117. package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
  118. package/docs/img/concorde-icon.svg +5 -0
  119. package/docs/img/concorde-logo.svg +1 -0
  120. package/docs/img/concorde.png +0 -0
  121. package/docs/img/concorde_def.png +0 -0
  122. package/docs/img/concorde_seuil.png.webp +0 -0
  123. package/docs/img/concorde_seuil_invert.png +0 -0
  124. package/docs/img/paul_metrand.jpg +0 -0
  125. package/docs/img/paul_metrand_xs.jpg +0 -0
  126. package/docs/index.html +93 -0
  127. package/docs/llms-full.txt +5945 -0
  128. package/docs/llms.txt +104 -0
  129. package/docs/robots.txt +16 -0
  130. package/docs/sitemap.xml +237 -0
  131. package/docs/src/core/components/functional/date/date.md +290 -0
  132. package/docs/src/core/components/functional/fetch/fetch.md +125 -0
  133. package/docs/src/core/components/functional/if/if.md +9 -0
  134. package/docs/src/core/components/functional/jsonata/jsonata.md +56 -0
  135. package/docs/src/core/components/functional/list/list.md +65 -0
  136. package/docs/src/core/components/functional/mix/mix.md +41 -0
  137. package/docs/src/core/components/functional/queue/queue.md +72 -0
  138. package/docs/src/core/components/functional/router/router.md +94 -0
  139. package/docs/src/core/components/functional/sdui/default-library.json +108 -0
  140. package/docs/src/core/components/functional/sdui/example.json +99 -0
  141. package/docs/src/core/components/functional/sdui/sdui.md +356 -0
  142. package/docs/src/core/components/functional/states/states.md +87 -0
  143. package/docs/src/core/components/functional/submit/submit.md +114 -0
  144. package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
  145. package/docs/src/core/components/functional/value/value.md +35 -0
  146. package/docs/src/core/components/ui/alert/alert.md +177 -0
  147. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
  148. package/docs/src/core/components/ui/badge/badge.md +175 -0
  149. package/docs/src/core/components/ui/button/button.md +183 -0
  150. package/docs/src/core/components/ui/captcha/captcha.md +12 -0
  151. package/docs/src/core/components/ui/card/card.md +152 -0
  152. package/docs/src/core/components/ui/divider/divider.md +35 -0
  153. package/docs/src/core/components/ui/form/checkbox/checkbox.md +77 -0
  154. package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  155. package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  156. package/docs/src/core/components/ui/form/form-layout/form-layout.md +44 -0
  157. package/docs/src/core/components/ui/form/input/input.md +142 -0
  158. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +29 -0
  159. package/docs/src/core/components/ui/form/radio/radio.md +57 -0
  160. package/docs/src/core/components/ui/form/select/select.md +71 -0
  161. package/docs/src/core/components/ui/form/switch/switch.md +57 -0
  162. package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
  163. package/docs/src/core/components/ui/group/group.md +75 -0
  164. package/docs/src/core/components/ui/icon/icon.md +125 -0
  165. package/docs/src/core/components/ui/icon/icons.json +1 -0
  166. package/docs/src/core/components/ui/image/image.md +201 -0
  167. package/docs/src/core/components/ui/link/link.md +43 -0
  168. package/docs/src/core/components/ui/loader/loader.md +55 -0
  169. package/docs/src/core/components/ui/menu/menu.md +329 -0
  170. package/docs/src/core/components/ui/modal/modal.md +119 -0
  171. package/docs/src/core/components/ui/pop/pop.md +200 -0
  172. package/docs/src/core/components/ui/progress/progress.md +63 -0
  173. package/docs/src/core/components/ui/table/table.md +455 -0
  174. package/docs/src/core/components/ui/toast/toast.md +166 -0
  175. package/docs/src/core/components/ui/tooltip/tooltip.md +82 -0
  176. package/docs/src/docs/_core-concept/dataFlow.md +88 -0
  177. package/docs/src/docs/_core-concept/overview.md +57 -0
  178. package/docs/src/docs/_core-concept/subscriber.md +75 -0
  179. package/docs/src/docs/_decorators/ancestor-attribute.md +127 -0
  180. package/docs/src/docs/_decorators/auto-subscribe.md +202 -0
  181. package/docs/src/docs/_decorators/bind.md +167 -0
  182. package/docs/src/docs/_decorators/get.md +162 -0
  183. package/docs/src/docs/_decorators/handle.md +175 -0
  184. package/docs/src/docs/_decorators/on-assign.md +390 -0
  185. package/docs/src/docs/_decorators/patch.md +70 -0
  186. package/docs/src/docs/_decorators/post.md +146 -0
  187. package/docs/src/docs/_decorators/publish.md +55 -0
  188. package/docs/src/docs/_decorators/put.md +70 -0
  189. package/docs/src/docs/_decorators/subscribe.md +100 -0
  190. package/docs/src/docs/_decorators/wait-for-ancestors.md +163 -0
  191. package/docs/src/docs/_directives/sub.md +91 -0
  192. package/docs/src/docs/_getting-started/ai-agents.md +76 -0
  193. package/docs/src/docs/_getting-started/concorde-manual-install.md +133 -0
  194. package/docs/src/docs/_getting-started/concorde-outside.md +33 -0
  195. package/docs/src/docs/_getting-started/create-a-component.md +139 -0
  196. package/docs/src/docs/_getting-started/my-first-component.md +236 -0
  197. package/docs/src/docs/_getting-started/my-first-subscriber.md +120 -0
  198. package/docs/src/docs/_getting-started/pubsub.md +37 -0
  199. package/docs/src/docs/_getting-started/start.md +47 -0
  200. package/docs/src/docs/_getting-started/theming.md +91 -0
  201. package/docs/src/docs/_misc/api-configuration.md +81 -0
  202. package/docs/src/docs/_misc/dataProviderKey.md +168 -0
  203. package/docs/src/docs/_misc/docs-mock-api.md +63 -0
  204. package/docs/src/docs/_misc/dynamic-path.md +71 -0
  205. package/docs/src/docs/_misc/endpoint.md +45 -0
  206. package/docs/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  207. package/docs/src/docs/_misc/html-integration.md +15 -0
  208. package/docs/src/docs/search/docs-search.json +10137 -0
  209. package/docs/src/tag-list.json +1 -0
  210. package/docs/src/tsconfig-model.json +23 -0
  211. package/docs/src/tsconfig.json +1224 -0
  212. package/docs/svg/regular/plane.svg +1 -0
  213. package/docs/svg/solid/plane.svg +1 -0
  214. package/package.json +1 -1
@@ -0,0 +1,2662 @@
1
+ var Ci = Object.defineProperty;
2
+ var jr = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var Ai = (e, t, r) => t in e ? Ci(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
+ var ae = (e, t, r) => Ai(e, typeof t != "symbol" ? t + "" : t, r), qr = (e, t, r) => t.has(e) || jr("Cannot " + r);
7
+ var Z = (e, t, r) => (qr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), jt = (e, t, r) => t.has(e) ? jr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), qt = (e, t, r, i) => (qr(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r);
8
+ const Ii = "5";
9
+ var ln;
10
+ typeof window < "u" && ((ln = window.__svelte ?? (window.__svelte = {})).v ?? (ln.v = /* @__PURE__ */ new Set())).add(Ii);
11
+ const Ri = 1, Si = 4, Ti = 8, Ni = 16, Di = 1, Li = 2, Xt = "[", on = "[!", an = "]", Je = {}, G = Symbol(), Pi = "http://www.w3.org/1999/xhtml", Br = !1;
12
+ function sn(e) {
13
+ throw new Error("https://svelte.dev/e/lifecycle_outside_component");
14
+ }
15
+ var fn = Array.isArray, Fi = Array.prototype.indexOf, Oi = Array.from, bt = Object.keys, Et = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, Mi = Object.getOwnPropertyDescriptors, Vi = Object.prototype, Ui = Array.prototype, un = Object.getPrototypeOf, Hr = Object.isExtensible;
16
+ function cn(e) {
17
+ for (var t = 0; t < e.length; t++)
18
+ e[t]();
19
+ }
20
+ const fe = 2, dn = 4, Rt = 8, zt = 16, ye = 32, Me = 64, $t = 128, ee = 256, kt = 512, K = 1024, ve = 2048, Ve = 4096, Ke = 8192, St = 16384, ji = 32768, Qt = 65536, qi = 1 << 19, vn = 1 << 20, Ht = 1 << 21, ut = Symbol("$state"), hn = Symbol("legacy props"), Bi = Symbol("");
21
+ function Hi(e) {
22
+ throw new Error("https://svelte.dev/e/effect_in_teardown");
23
+ }
24
+ function Yi() {
25
+ throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
26
+ }
27
+ function Wi(e) {
28
+ throw new Error("https://svelte.dev/e/effect_orphan");
29
+ }
30
+ function Zi() {
31
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
32
+ }
33
+ function Gi() {
34
+ throw new Error("https://svelte.dev/e/hydration_failed");
35
+ }
36
+ function Ji(e) {
37
+ throw new Error("https://svelte.dev/e/props_invalid_value");
38
+ }
39
+ function Ki() {
40
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
41
+ }
42
+ function Xi() {
43
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
44
+ }
45
+ function zi() {
46
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
47
+ }
48
+ function Tt(e) {
49
+ console.warn("https://svelte.dev/e/hydration_mismatch");
50
+ }
51
+ let D = !1;
52
+ function Ge(e) {
53
+ D = e;
54
+ }
55
+ let P;
56
+ function Ie(e) {
57
+ if (e === null)
58
+ throw Tt(), Je;
59
+ return P = e;
60
+ }
61
+ function Xe() {
62
+ return Ie(
63
+ /** @type {TemplateNode} */
64
+ /* @__PURE__ */ Te(P)
65
+ );
66
+ }
67
+ function X(e) {
68
+ if (D) {
69
+ if (/* @__PURE__ */ Te(P) !== null)
70
+ throw Tt(), Je;
71
+ P = e;
72
+ }
73
+ }
74
+ function Qi() {
75
+ for (var e = 0, t = P; ; ) {
76
+ if (t.nodeType === 8) {
77
+ var r = (
78
+ /** @type {Comment} */
79
+ t.data
80
+ );
81
+ if (r === an) {
82
+ if (e === 0) return t;
83
+ e -= 1;
84
+ } else (r === Xt || r === on) && (e += 1);
85
+ }
86
+ var i = (
87
+ /** @type {TemplateNode} */
88
+ /* @__PURE__ */ Te(t)
89
+ );
90
+ t.remove(), t = i;
91
+ }
92
+ }
93
+ let el = !1;
94
+ function xe(e) {
95
+ if (typeof e != "object" || e === null || ut in e)
96
+ return e;
97
+ const t = un(e);
98
+ if (t !== Vi && t !== Ui)
99
+ return e;
100
+ var r = /* @__PURE__ */ new Map(), i = fn(e), l = /* @__PURE__ */ J(0), o = I, a = (s) => {
101
+ var f = I;
102
+ he(o);
103
+ var d = s();
104
+ return he(f), d;
105
+ };
106
+ return i && r.set("length", /* @__PURE__ */ J(
107
+ /** @type {any[]} */
108
+ e.length
109
+ )), new Proxy(
110
+ /** @type {any} */
111
+ e,
112
+ {
113
+ defineProperty(s, f, d) {
114
+ (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && Ki();
115
+ var h = r.get(f);
116
+ return h === void 0 ? (h = a(() => /* @__PURE__ */ J(d.value)), r.set(f, h)) : L(
117
+ h,
118
+ a(() => xe(d.value))
119
+ ), !0;
120
+ },
121
+ deleteProperty(s, f) {
122
+ var d = r.get(f);
123
+ if (d === void 0)
124
+ f in s && (r.set(
125
+ f,
126
+ a(() => /* @__PURE__ */ J(G))
127
+ ), Bt(l));
128
+ else {
129
+ if (i && typeof f == "string") {
130
+ var h = (
131
+ /** @type {Source<number>} */
132
+ r.get("length")
133
+ ), v = Number(f);
134
+ Number.isInteger(v) && v < h.v && L(h, v);
135
+ }
136
+ L(d, G), Bt(l);
137
+ }
138
+ return !0;
139
+ },
140
+ get(s, f, d) {
141
+ var m;
142
+ if (f === ut)
143
+ return e;
144
+ var h = r.get(f), v = f in s;
145
+ if (h === void 0 && (!v || (m = Fe(s, f)) != null && m.writable) && (h = a(() => /* @__PURE__ */ J(xe(v ? s[f] : G))), r.set(f, h)), h !== void 0) {
146
+ var g = c(h);
147
+ return g === G ? void 0 : g;
148
+ }
149
+ return Reflect.get(s, f, d);
150
+ },
151
+ getOwnPropertyDescriptor(s, f) {
152
+ var d = Reflect.getOwnPropertyDescriptor(s, f);
153
+ if (d && "value" in d) {
154
+ var h = r.get(f);
155
+ h && (d.value = c(h));
156
+ } else if (d === void 0) {
157
+ var v = r.get(f), g = v == null ? void 0 : v.v;
158
+ if (v !== void 0 && g !== G)
159
+ return {
160
+ enumerable: !0,
161
+ configurable: !0,
162
+ value: g,
163
+ writable: !0
164
+ };
165
+ }
166
+ return d;
167
+ },
168
+ has(s, f) {
169
+ var g;
170
+ if (f === ut)
171
+ return !0;
172
+ var d = r.get(f), h = d !== void 0 && d.v !== G || Reflect.has(s, f);
173
+ if (d !== void 0 || R !== null && (!h || (g = Fe(s, f)) != null && g.writable)) {
174
+ d === void 0 && (d = a(() => /* @__PURE__ */ J(h ? xe(s[f]) : G)), r.set(f, d));
175
+ var v = c(d);
176
+ if (v === G)
177
+ return !1;
178
+ }
179
+ return h;
180
+ },
181
+ set(s, f, d, h) {
182
+ var V;
183
+ var v = r.get(f), g = f in s;
184
+ if (i && f === "length")
185
+ for (var m = d; m < /** @type {Source<number>} */
186
+ v.v; m += 1) {
187
+ var x = r.get(m + "");
188
+ x !== void 0 ? L(x, G) : m in s && (x = a(() => /* @__PURE__ */ J(G)), r.set(m + "", x));
189
+ }
190
+ v === void 0 ? (!g || (V = Fe(s, f)) != null && V.writable) && (v = a(() => /* @__PURE__ */ J(void 0)), L(
191
+ v,
192
+ a(() => xe(d))
193
+ ), r.set(f, v)) : (g = v.v !== G, L(
194
+ v,
195
+ a(() => xe(d))
196
+ ));
197
+ var N = Reflect.getOwnPropertyDescriptor(s, f);
198
+ if (N != null && N.set && N.set.call(h, d), !g) {
199
+ if (i && typeof f == "string") {
200
+ var O = (
201
+ /** @type {Source<number>} */
202
+ r.get("length")
203
+ ), j = Number(f);
204
+ Number.isInteger(j) && j >= O.v && L(O, j + 1);
205
+ }
206
+ Bt(l);
207
+ }
208
+ return !0;
209
+ },
210
+ ownKeys(s) {
211
+ c(l);
212
+ var f = Reflect.ownKeys(s).filter((v) => {
213
+ var g = r.get(v);
214
+ return g === void 0 || g.v !== G;
215
+ });
216
+ for (var [d, h] of r)
217
+ h.v !== G && !(d in s) && f.push(d);
218
+ return f;
219
+ },
220
+ setPrototypeOf() {
221
+ Xi();
222
+ }
223
+ }
224
+ );
225
+ }
226
+ function Bt(e, t = 1) {
227
+ L(e, e.v + t);
228
+ }
229
+ var Yr, gn, _n, mn;
230
+ function Yt() {
231
+ if (Yr === void 0) {
232
+ Yr = window, gn = /Firefox/.test(navigator.userAgent);
233
+ var e = Element.prototype, t = Node.prototype, r = Text.prototype;
234
+ _n = Fe(t, "firstChild").get, mn = Fe(t, "nextSibling").get, Hr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Hr(r) && (r.__t = void 0);
235
+ }
236
+ }
237
+ function er(e = "") {
238
+ return document.createTextNode(e);
239
+ }
240
+ // @__NO_SIDE_EFFECTS__
241
+ function oe(e) {
242
+ return _n.call(e);
243
+ }
244
+ // @__NO_SIDE_EFFECTS__
245
+ function Te(e) {
246
+ return mn.call(e);
247
+ }
248
+ function z(e, t) {
249
+ if (!D)
250
+ return /* @__PURE__ */ oe(e);
251
+ var r = (
252
+ /** @type {TemplateNode} */
253
+ /* @__PURE__ */ oe(P)
254
+ );
255
+ return r === null && (r = P.appendChild(er())), Ie(r), r;
256
+ }
257
+ function Wr(e, t) {
258
+ if (!D) {
259
+ var r = (
260
+ /** @type {DocumentFragment} */
261
+ /* @__PURE__ */ oe(
262
+ /** @type {Node} */
263
+ e
264
+ )
265
+ );
266
+ return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Te(r) : r;
267
+ }
268
+ return P;
269
+ }
270
+ function we(e, t = 1, r = !1) {
271
+ let i = D ? P : e;
272
+ for (var l; t--; )
273
+ l = i, i = /** @type {TemplateNode} */
274
+ /* @__PURE__ */ Te(i);
275
+ if (!D)
276
+ return i;
277
+ var o = i == null ? void 0 : i.nodeType;
278
+ if (r && o !== 3) {
279
+ var a = er();
280
+ return i === null ? l == null || l.after(a) : i.before(a), Ie(a), a;
281
+ }
282
+ return Ie(i), /** @type {TemplateNode} */
283
+ i;
284
+ }
285
+ function tl(e) {
286
+ e.textContent = "";
287
+ }
288
+ function wn(e) {
289
+ return e === this.v;
290
+ }
291
+ function rl(e, t) {
292
+ return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
293
+ }
294
+ function pn(e) {
295
+ return !rl(e, this.v);
296
+ }
297
+ // @__NO_SIDE_EFFECTS__
298
+ function tr(e) {
299
+ var t = fe | ve, r = I !== null && (I.f & fe) !== 0 ? (
300
+ /** @type {Derived} */
301
+ I
302
+ ) : null;
303
+ return R === null || r !== null && (r.f & ee) !== 0 ? t |= ee : R.f |= vn, {
304
+ ctx: Y,
305
+ deps: null,
306
+ effects: null,
307
+ equals: wn,
308
+ f: t,
309
+ fn: e,
310
+ reactions: null,
311
+ rv: 0,
312
+ v: (
313
+ /** @type {V} */
314
+ null
315
+ ),
316
+ wv: 0,
317
+ parent: r ?? R
318
+ };
319
+ }
320
+ // @__NO_SIDE_EFFECTS__
321
+ function st(e) {
322
+ const t = /* @__PURE__ */ tr(e);
323
+ return Ln(t), t;
324
+ }
325
+ function yn(e) {
326
+ var t = e.effects;
327
+ if (t !== null) {
328
+ e.effects = null;
329
+ for (var r = 0; r < t.length; r += 1)
330
+ Re(
331
+ /** @type {Effect} */
332
+ t[r]
333
+ );
334
+ }
335
+ }
336
+ function nl(e) {
337
+ for (var t = e.parent; t !== null; ) {
338
+ if ((t.f & fe) === 0)
339
+ return (
340
+ /** @type {Effect} */
341
+ t
342
+ );
343
+ t = t.parent;
344
+ }
345
+ return null;
346
+ }
347
+ function bn(e) {
348
+ var t, r = R;
349
+ Se(nl(e));
350
+ try {
351
+ yn(e), t = Mn(e);
352
+ } finally {
353
+ Se(r);
354
+ }
355
+ return t;
356
+ }
357
+ function En(e) {
358
+ var t = bn(e), r = (Ce || (e.f & ee) !== 0) && e.deps !== null ? Ve : K;
359
+ ue(e, r), e.equals(t) || (e.v = t, e.wv = Fn());
360
+ }
361
+ function il(e) {
362
+ R === null && I === null && Wi(), I !== null && (I.f & ee) !== 0 && R === null && Yi(), gt && Hi();
363
+ }
364
+ function ll(e, t) {
365
+ var r = t.last;
366
+ r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
367
+ }
368
+ function Ue(e, t, r, i = !0) {
369
+ var l = R, o = {
370
+ ctx: Y,
371
+ deps: null,
372
+ nodes_start: null,
373
+ nodes_end: null,
374
+ f: e | ve,
375
+ first: null,
376
+ fn: t,
377
+ last: null,
378
+ next: null,
379
+ parent: l,
380
+ prev: null,
381
+ teardown: null,
382
+ transitions: null,
383
+ wv: 0
384
+ };
385
+ if (r)
386
+ try {
387
+ ir(o), o.f |= ji;
388
+ } catch (f) {
389
+ throw Re(o), f;
390
+ }
391
+ else t !== null && Dt(o);
392
+ var a = r && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & (vn | $t)) === 0;
393
+ if (!a && i && (l !== null && ll(o, l), I !== null && (I.f & fe) !== 0)) {
394
+ var s = (
395
+ /** @type {Derived} */
396
+ I
397
+ );
398
+ (s.effects ?? (s.effects = [])).push(o);
399
+ }
400
+ return o;
401
+ }
402
+ function $n(e) {
403
+ const t = Ue(Rt, null, !1);
404
+ return ue(t, K), t.teardown = e, t;
405
+ }
406
+ function Wt(e) {
407
+ il();
408
+ var t = R !== null && (R.f & ye) !== 0 && Y !== null && !Y.m;
409
+ if (t) {
410
+ var r = (
411
+ /** @type {ComponentContext} */
412
+ Y
413
+ );
414
+ (r.e ?? (r.e = [])).push({
415
+ fn: e,
416
+ effect: R,
417
+ reaction: I
418
+ });
419
+ } else {
420
+ var i = rr(e);
421
+ return i;
422
+ }
423
+ }
424
+ function ol(e) {
425
+ const t = Ue(Me, e, !0);
426
+ return () => {
427
+ Re(t);
428
+ };
429
+ }
430
+ function al(e) {
431
+ const t = Ue(Me, e, !0);
432
+ return (r = {}) => new Promise((i) => {
433
+ r.outro ? Gt(t, () => {
434
+ Re(t), i(void 0);
435
+ }) : (Re(t), i(void 0));
436
+ });
437
+ }
438
+ function rr(e) {
439
+ return Ue(dn, e, !1);
440
+ }
441
+ function nr(e) {
442
+ return Ue(Rt, e, !0);
443
+ }
444
+ function Pe(e, t = [], r = tr) {
445
+ const i = t.map(r);
446
+ return kn(() => e(...i.map(c)));
447
+ }
448
+ function kn(e, t = 0) {
449
+ return Ue(Rt | zt | t, e, !0);
450
+ }
451
+ function Zt(e, t = !0) {
452
+ return Ue(Rt | ye, e, !0, t);
453
+ }
454
+ function xn(e) {
455
+ var t = e.teardown;
456
+ if (t !== null) {
457
+ const r = gt, i = I;
458
+ Gr(!0), he(null);
459
+ try {
460
+ t.call(null);
461
+ } finally {
462
+ Gr(r), he(i);
463
+ }
464
+ }
465
+ }
466
+ function Cn(e, t = !1) {
467
+ var r = e.first;
468
+ for (e.first = e.last = null; r !== null; ) {
469
+ var i = r.next;
470
+ (r.f & Me) !== 0 ? r.parent = null : Re(r, t), r = i;
471
+ }
472
+ }
473
+ function sl(e) {
474
+ for (var t = e.first; t !== null; ) {
475
+ var r = t.next;
476
+ (t.f & ye) === 0 && Re(t), t = r;
477
+ }
478
+ }
479
+ function Re(e, t = !0) {
480
+ var r = !1;
481
+ (t || (e.f & qi) !== 0) && e.nodes_start !== null && (An(
482
+ e.nodes_start,
483
+ /** @type {TemplateNode} */
484
+ e.nodes_end
485
+ ), r = !0), Cn(e, t && !r), It(e, 0), ue(e, St);
486
+ var i = e.transitions;
487
+ if (i !== null)
488
+ for (const o of i)
489
+ o.stop();
490
+ xn(e);
491
+ var l = e.parent;
492
+ l !== null && l.first !== null && In(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
493
+ }
494
+ function An(e, t) {
495
+ for (; e !== null; ) {
496
+ var r = e === t ? null : (
497
+ /** @type {TemplateNode} */
498
+ /* @__PURE__ */ Te(e)
499
+ );
500
+ e.remove(), e = r;
501
+ }
502
+ }
503
+ function In(e) {
504
+ var t = e.parent, r = e.prev, i = e.next;
505
+ r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
506
+ }
507
+ function Gt(e, t) {
508
+ var r = [];
509
+ Rn(e, r, !0), fl(r, () => {
510
+ Re(e), t && t();
511
+ });
512
+ }
513
+ function fl(e, t) {
514
+ var r = e.length;
515
+ if (r > 0) {
516
+ var i = () => --r || t();
517
+ for (var l of e)
518
+ l.out(i);
519
+ } else
520
+ t();
521
+ }
522
+ function Rn(e, t, r) {
523
+ if ((e.f & Ke) === 0) {
524
+ if (e.f ^= Ke, e.transitions !== null)
525
+ for (const a of e.transitions)
526
+ (a.is_global || r) && t.push(a);
527
+ for (var i = e.first; i !== null; ) {
528
+ var l = i.next, o = (i.f & Qt) !== 0 || (i.f & ye) !== 0;
529
+ Rn(i, t, o ? r : !1), i = l;
530
+ }
531
+ }
532
+ }
533
+ function Zr(e) {
534
+ Sn(e, !0);
535
+ }
536
+ function Sn(e, t) {
537
+ if ((e.f & Ke) !== 0) {
538
+ e.f ^= Ke, (e.f & K) === 0 && (e.f ^= K), _t(e) && (ue(e, ve), Dt(e));
539
+ for (var r = e.first; r !== null; ) {
540
+ var i = r.next, l = (r.f & Qt) !== 0 || (r.f & ye) !== 0;
541
+ Sn(r, l ? t : !1), r = i;
542
+ }
543
+ if (e.transitions !== null)
544
+ for (const o of e.transitions)
545
+ (o.is_global || t) && o.in();
546
+ }
547
+ }
548
+ const ul = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
549
+ let dt = [], vt = [];
550
+ function Tn() {
551
+ var e = dt;
552
+ dt = [], cn(e);
553
+ }
554
+ function Nn() {
555
+ var e = vt;
556
+ vt = [], cn(e);
557
+ }
558
+ function Dn(e) {
559
+ dt.length === 0 && queueMicrotask(Tn), dt.push(e);
560
+ }
561
+ function cl(e) {
562
+ vt.length === 0 && ul(Nn), vt.push(e);
563
+ }
564
+ function dl() {
565
+ dt.length > 0 && Tn(), vt.length > 0 && Nn();
566
+ }
567
+ let pt = !1, xt = !1, Ct = null, Oe = !1, gt = !1;
568
+ function Gr(e) {
569
+ gt = e;
570
+ }
571
+ let ct = [];
572
+ let I = null, de = !1;
573
+ function he(e) {
574
+ I = e;
575
+ }
576
+ let R = null;
577
+ function Se(e) {
578
+ R = e;
579
+ }
580
+ let H = null;
581
+ function Ln(e) {
582
+ I !== null && I.f & Ht && (H === null ? H = [e] : H.push(e));
583
+ }
584
+ let B = null, Q = 0, ie = null;
585
+ function vl(e) {
586
+ ie = e;
587
+ }
588
+ let Pn = 1, At = 0, Ce = !1;
589
+ function Fn() {
590
+ return ++Pn;
591
+ }
592
+ function _t(e) {
593
+ var v;
594
+ var t = e.f;
595
+ if ((t & ve) !== 0)
596
+ return !0;
597
+ if ((t & Ve) !== 0) {
598
+ var r = e.deps, i = (t & ee) !== 0;
599
+ if (r !== null) {
600
+ var l, o, a = (t & kt) !== 0, s = i && R !== null && !Ce, f = r.length;
601
+ if (a || s) {
602
+ var d = (
603
+ /** @type {Derived} */
604
+ e
605
+ ), h = d.parent;
606
+ for (l = 0; l < f; l++)
607
+ o = r[l], (a || !((v = o == null ? void 0 : o.reactions) != null && v.includes(d))) && (o.reactions ?? (o.reactions = [])).push(d);
608
+ a && (d.f ^= kt), s && h !== null && (h.f & ee) === 0 && (d.f ^= ee);
609
+ }
610
+ for (l = 0; l < f; l++)
611
+ if (o = r[l], _t(
612
+ /** @type {Derived} */
613
+ o
614
+ ) && En(
615
+ /** @type {Derived} */
616
+ o
617
+ ), o.wv > e.wv)
618
+ return !0;
619
+ }
620
+ (!i || R !== null && !Ce) && ue(e, K);
621
+ }
622
+ return !1;
623
+ }
624
+ function hl(e, t) {
625
+ for (var r = t; r !== null; ) {
626
+ if ((r.f & $t) !== 0)
627
+ try {
628
+ r.fn(e);
629
+ return;
630
+ } catch {
631
+ r.f ^= $t;
632
+ }
633
+ r = r.parent;
634
+ }
635
+ throw pt = !1, e;
636
+ }
637
+ function Jr(e) {
638
+ return (e.f & St) === 0 && (e.parent === null || (e.parent.f & $t) === 0);
639
+ }
640
+ function Nt(e, t, r, i) {
641
+ if (pt) {
642
+ if (r === null && (pt = !1), Jr(t))
643
+ throw e;
644
+ return;
645
+ }
646
+ if (r !== null && (pt = !0), hl(e, t), Jr(t))
647
+ throw e;
648
+ }
649
+ function On(e, t, r = !0) {
650
+ var i = e.reactions;
651
+ if (i !== null)
652
+ for (var l = 0; l < i.length; l++) {
653
+ var o = i[l];
654
+ H != null && H.includes(e) || ((o.f & fe) !== 0 ? On(
655
+ /** @type {Derived} */
656
+ o,
657
+ t,
658
+ !1
659
+ ) : t === o && (r ? ue(o, ve) : (o.f & K) !== 0 && ue(o, Ve), Dt(
660
+ /** @type {Effect} */
661
+ o
662
+ )));
663
+ }
664
+ }
665
+ function Mn(e) {
666
+ var m;
667
+ var t = B, r = Q, i = ie, l = I, o = Ce, a = H, s = Y, f = de, d = e.f;
668
+ B = /** @type {null | Value[]} */
669
+ null, Q = 0, ie = null, Ce = (d & ee) !== 0 && (de || !Oe || I === null), I = (d & (ye | Me)) === 0 ? e : null, H = null, Kr(e.ctx), de = !1, At++, e.f |= Ht;
670
+ try {
671
+ var h = (
672
+ /** @type {Function} */
673
+ (0, e.fn)()
674
+ ), v = e.deps;
675
+ if (B !== null) {
676
+ var g;
677
+ if (It(e, Q), v !== null && Q > 0)
678
+ for (v.length = Q + B.length, g = 0; g < B.length; g++)
679
+ v[Q + g] = B[g];
680
+ else
681
+ e.deps = v = B;
682
+ if (!Ce)
683
+ for (g = Q; g < v.length; g++)
684
+ ((m = v[g]).reactions ?? (m.reactions = [])).push(e);
685
+ } else v !== null && Q < v.length && (It(e, Q), v.length = Q);
686
+ if (Yn() && ie !== null && !de && v !== null && (e.f & (fe | Ve | ve)) === 0)
687
+ for (g = 0; g < /** @type {Source[]} */
688
+ ie.length; g++)
689
+ On(
690
+ ie[g],
691
+ /** @type {Effect} */
692
+ e
693
+ );
694
+ return l !== null && l !== e && (At++, ie !== null && (i === null ? i = ie : i.push(.../** @type {Source[]} */
695
+ ie))), h;
696
+ } finally {
697
+ B = t, Q = r, ie = i, I = l, Ce = o, H = a, Kr(s), de = f, e.f ^= Ht;
698
+ }
699
+ }
700
+ function gl(e, t) {
701
+ let r = t.reactions;
702
+ if (r !== null) {
703
+ var i = Fi.call(r, e);
704
+ if (i !== -1) {
705
+ var l = r.length - 1;
706
+ l === 0 ? r = t.reactions = null : (r[i] = r[l], r.pop());
707
+ }
708
+ }
709
+ r === null && (t.f & fe) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
710
+ // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
711
+ // allows us to skip the expensive work of disconnecting and immediately reconnecting it
712
+ (B === null || !B.includes(t)) && (ue(t, Ve), (t.f & (ee | kt)) === 0 && (t.f ^= kt), yn(
713
+ /** @type {Derived} **/
714
+ t
715
+ ), It(
716
+ /** @type {Derived} **/
717
+ t,
718
+ 0
719
+ ));
720
+ }
721
+ function It(e, t) {
722
+ var r = e.deps;
723
+ if (r !== null)
724
+ for (var i = t; i < r.length; i++)
725
+ gl(e, r[i]);
726
+ }
727
+ function ir(e) {
728
+ var t = e.f;
729
+ if ((t & St) === 0) {
730
+ ue(e, K);
731
+ var r = R, i = Y, l = Oe;
732
+ R = e, Oe = !0;
733
+ try {
734
+ (t & zt) !== 0 ? sl(e) : Cn(e), xn(e);
735
+ var o = Mn(e);
736
+ e.teardown = typeof o == "function" ? o : null, e.wv = Pn;
737
+ var a = e.deps, s;
738
+ Br && el && e.f & ve;
739
+ } catch (f) {
740
+ Nt(f, e, r, i || e.ctx);
741
+ } finally {
742
+ Oe = l, R = r;
743
+ }
744
+ }
745
+ }
746
+ function _l() {
747
+ try {
748
+ Zi();
749
+ } catch (e) {
750
+ if (Ct !== null)
751
+ Nt(e, Ct, null);
752
+ else
753
+ throw e;
754
+ }
755
+ }
756
+ function Vn() {
757
+ var e = Oe;
758
+ try {
759
+ var t = 0;
760
+ for (Oe = !0; ct.length > 0; ) {
761
+ t++ > 1e3 && _l();
762
+ var r = ct, i = r.length;
763
+ ct = [];
764
+ for (var l = 0; l < i; l++) {
765
+ var o = wl(r[l]);
766
+ ml(o);
767
+ }
768
+ ht.clear();
769
+ }
770
+ } finally {
771
+ xt = !1, Oe = e, Ct = null;
772
+ }
773
+ }
774
+ function ml(e) {
775
+ var t = e.length;
776
+ if (t !== 0)
777
+ for (var r = 0; r < t; r++) {
778
+ var i = e[r];
779
+ if ((i.f & (St | Ke)) === 0)
780
+ try {
781
+ _t(i) && (ir(i), i.deps === null && i.first === null && i.nodes_start === null && (i.teardown === null ? In(i) : i.fn = null));
782
+ } catch (l) {
783
+ Nt(l, i, null, i.ctx);
784
+ }
785
+ }
786
+ }
787
+ function Dt(e) {
788
+ xt || (xt = !0, queueMicrotask(Vn));
789
+ for (var t = Ct = e; t.parent !== null; ) {
790
+ t = t.parent;
791
+ var r = t.f;
792
+ if ((r & (Me | ye)) !== 0) {
793
+ if ((r & K) === 0) return;
794
+ t.f ^= K;
795
+ }
796
+ }
797
+ ct.push(t);
798
+ }
799
+ function wl(e) {
800
+ for (var t = [], r = e; r !== null; ) {
801
+ var i = r.f, l = (i & (ye | Me)) !== 0, o = l && (i & K) !== 0;
802
+ if (!o && (i & Ke) === 0) {
803
+ if ((i & dn) !== 0)
804
+ t.push(r);
805
+ else if (l)
806
+ r.f ^= K;
807
+ else
808
+ try {
809
+ _t(r) && ir(r);
810
+ } catch (f) {
811
+ Nt(f, r, null, r.ctx);
812
+ }
813
+ var a = r.first;
814
+ if (a !== null) {
815
+ r = a;
816
+ continue;
817
+ }
818
+ }
819
+ var s = r.parent;
820
+ for (r = r.next; r === null && s !== null; )
821
+ r = s.next, s = s.parent;
822
+ }
823
+ return t;
824
+ }
825
+ function k(e) {
826
+ for (var t; ; ) {
827
+ if (dl(), ct.length === 0)
828
+ return (
829
+ /** @type {T} */
830
+ t
831
+ );
832
+ xt = !0, Vn();
833
+ }
834
+ }
835
+ async function pl() {
836
+ await Promise.resolve(), k();
837
+ }
838
+ function c(e) {
839
+ var t = e.f, r = (t & fe) !== 0;
840
+ if (I !== null && !de) {
841
+ if (!(H != null && H.includes(e))) {
842
+ var i = I.deps;
843
+ e.rv < At && (e.rv = At, B === null && i !== null && i[Q] === e ? Q++ : B === null ? B = [e] : (!Ce || !B.includes(e)) && B.push(e));
844
+ }
845
+ } else if (r && /** @type {Derived} */
846
+ e.deps === null && /** @type {Derived} */
847
+ e.effects === null) {
848
+ var l = (
849
+ /** @type {Derived} */
850
+ e
851
+ ), o = l.parent;
852
+ o !== null && (o.f & ee) === 0 && (l.f ^= ee);
853
+ }
854
+ return r && (l = /** @type {Derived} */
855
+ e, _t(l) && En(l)), gt && ht.has(e) ? ht.get(e) : e.v;
856
+ }
857
+ function ze(e) {
858
+ var t = de;
859
+ try {
860
+ return de = !0, e();
861
+ } finally {
862
+ de = t;
863
+ }
864
+ }
865
+ const yl = -7169;
866
+ function ue(e, t) {
867
+ e.f = e.f & yl | t;
868
+ }
869
+ const ht = /* @__PURE__ */ new Map();
870
+ function Un(e, t) {
871
+ var r = {
872
+ f: 0,
873
+ // TODO ideally we could skip this altogether, but it causes type errors
874
+ v: e,
875
+ reactions: null,
876
+ equals: wn,
877
+ rv: 0,
878
+ wv: 0
879
+ };
880
+ return r;
881
+ }
882
+ // @__NO_SIDE_EFFECTS__
883
+ function J(e, t) {
884
+ const r = Un(e);
885
+ return Ln(r), r;
886
+ }
887
+ // @__NO_SIDE_EFFECTS__
888
+ function jn(e, t = !1) {
889
+ const r = Un(e);
890
+ return t || (r.equals = pn), r;
891
+ }
892
+ function L(e, t, r = !1) {
893
+ I !== null && !de && Yn() && (I.f & (fe | zt)) !== 0 && !(H != null && H.includes(e)) && zi();
894
+ let i = r ? xe(t) : t;
895
+ return bl(e, i);
896
+ }
897
+ function bl(e, t) {
898
+ if (!e.equals(t)) {
899
+ var r = e.v;
900
+ gt ? ht.set(e, t) : ht.set(e, r), e.v = t, (e.f & fe) !== 0 && ((e.f & ve) !== 0 && bn(
901
+ /** @type {Derived} */
902
+ e
903
+ ), ue(e, (e.f & ee) === 0 ? K : Ve)), e.wv = Fn(), qn(e, ve), R !== null && (R.f & K) !== 0 && (R.f & (ye | Me)) === 0 && (ie === null ? vl([e]) : ie.push(e));
904
+ }
905
+ return t;
906
+ }
907
+ function qn(e, t) {
908
+ var r = e.reactions;
909
+ if (r !== null)
910
+ for (var i = r.length, l = 0; l < i; l++) {
911
+ var o = r[l], a = o.f;
912
+ (a & ve) === 0 && (ue(o, t), (a & (K | ee)) !== 0 && ((a & fe) !== 0 ? qn(
913
+ /** @type {Derived} */
914
+ o,
915
+ Ve
916
+ ) : Dt(
917
+ /** @type {Effect} */
918
+ o
919
+ )));
920
+ }
921
+ }
922
+ let Y = null;
923
+ function Kr(e) {
924
+ Y = e;
925
+ }
926
+ function Bn(e, t = !1, r) {
927
+ var i = Y = {
928
+ p: Y,
929
+ c: null,
930
+ d: !1,
931
+ e: null,
932
+ m: !1,
933
+ s: e,
934
+ x: null,
935
+ l: null
936
+ };
937
+ $n(() => {
938
+ i.d = !0;
939
+ });
940
+ }
941
+ function Hn(e) {
942
+ const t = Y;
943
+ if (t !== null) {
944
+ e !== void 0 && (t.x = e);
945
+ const a = t.e;
946
+ if (a !== null) {
947
+ var r = R, i = I;
948
+ t.e = null;
949
+ try {
950
+ for (var l = 0; l < a.length; l++) {
951
+ var o = a[l];
952
+ Se(o.effect), he(o.reaction), rr(o.fn);
953
+ }
954
+ } finally {
955
+ Se(r), he(i);
956
+ }
957
+ }
958
+ Y = t.p, t.m = !0;
959
+ }
960
+ return e || /** @type {T} */
961
+ {};
962
+ }
963
+ function Yn() {
964
+ return !0;
965
+ }
966
+ const El = ["touchstart", "touchmove"];
967
+ function $l(e) {
968
+ return El.includes(e);
969
+ }
970
+ let Xr = !1;
971
+ function Wn() {
972
+ Xr || (Xr = !0, document.addEventListener(
973
+ "reset",
974
+ (e) => {
975
+ Promise.resolve().then(() => {
976
+ var t;
977
+ if (!e.defaultPrevented)
978
+ for (
979
+ const r of
980
+ /**@type {HTMLFormElement} */
981
+ e.target.elements
982
+ )
983
+ (t = r.__on_r) == null || t.call(r);
984
+ });
985
+ },
986
+ // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
987
+ { capture: !0 }
988
+ ));
989
+ }
990
+ function Zn(e) {
991
+ var t = I, r = R;
992
+ he(null), Se(null);
993
+ try {
994
+ return e();
995
+ } finally {
996
+ he(t), Se(r);
997
+ }
998
+ }
999
+ function kl(e, t, r, i = r) {
1000
+ e.addEventListener(t, () => Zn(r));
1001
+ const l = e.__on_r;
1002
+ l ? e.__on_r = () => {
1003
+ l(), i(!0);
1004
+ } : e.__on_r = () => i(!0), Wn();
1005
+ }
1006
+ const Gn = /* @__PURE__ */ new Set(), Jt = /* @__PURE__ */ new Set();
1007
+ function xl(e, t, r, i = {}) {
1008
+ function l(o) {
1009
+ if (i.capture || ft.call(t, o), !o.cancelBubble)
1010
+ return Zn(() => r == null ? void 0 : r.call(this, o));
1011
+ }
1012
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Dn(() => {
1013
+ t.addEventListener(e, l, i);
1014
+ }) : t.addEventListener(e, l, i), l;
1015
+ }
1016
+ function Cl(e, t, r, i, l) {
1017
+ var o = { capture: i, passive: l }, a = xl(e, t, r, o);
1018
+ (t === document.body || t === window || t === document) && $n(() => {
1019
+ t.removeEventListener(e, a, o);
1020
+ });
1021
+ }
1022
+ function Al(e) {
1023
+ for (var t = 0; t < e.length; t++)
1024
+ Gn.add(e[t]);
1025
+ for (var r of Jt)
1026
+ r(e);
1027
+ }
1028
+ function ft(e) {
1029
+ var V;
1030
+ var t = this, r = (
1031
+ /** @type {Node} */
1032
+ t.ownerDocument
1033
+ ), i = e.type, l = ((V = e.composedPath) == null ? void 0 : V.call(e)) || [], o = (
1034
+ /** @type {null | Element} */
1035
+ l[0] || e.target
1036
+ ), a = 0, s = e.__root;
1037
+ if (s) {
1038
+ var f = l.indexOf(s);
1039
+ if (f !== -1 && (t === document || t === /** @type {any} */
1040
+ window)) {
1041
+ e.__root = t;
1042
+ return;
1043
+ }
1044
+ var d = l.indexOf(t);
1045
+ if (d === -1)
1046
+ return;
1047
+ f <= d && (a = f);
1048
+ }
1049
+ if (o = /** @type {Element} */
1050
+ l[a] || e.target, o !== t) {
1051
+ Et(e, "currentTarget", {
1052
+ configurable: !0,
1053
+ get() {
1054
+ return o || r;
1055
+ }
1056
+ });
1057
+ var h = I, v = R;
1058
+ he(null), Se(null);
1059
+ try {
1060
+ for (var g, m = []; o !== null; ) {
1061
+ var x = o.assignedSlot || o.parentNode || /** @type {any} */
1062
+ o.host || null;
1063
+ try {
1064
+ var N = o["__" + i];
1065
+ if (N != null && (!/** @type {any} */
1066
+ o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1067
+ // -> the target could not have been disabled because it emits the event in the first place
1068
+ e.target === o))
1069
+ if (fn(N)) {
1070
+ var [O, ...j] = N;
1071
+ O.apply(o, [e, ...j]);
1072
+ } else
1073
+ N.call(o, e);
1074
+ } catch (W) {
1075
+ g ? m.push(W) : g = W;
1076
+ }
1077
+ if (e.cancelBubble || x === t || x === null)
1078
+ break;
1079
+ o = x;
1080
+ }
1081
+ if (g) {
1082
+ for (let W of m)
1083
+ queueMicrotask(() => {
1084
+ throw W;
1085
+ });
1086
+ throw g;
1087
+ }
1088
+ } finally {
1089
+ e.__root = t, delete e.currentTarget, he(h), Se(v);
1090
+ }
1091
+ }
1092
+ }
1093
+ function lr(e) {
1094
+ var t = document.createElement("template");
1095
+ return t.innerHTML = e, t.content;
1096
+ }
1097
+ function Ae(e, t) {
1098
+ var r = (
1099
+ /** @type {Effect} */
1100
+ R
1101
+ );
1102
+ r.nodes_start === null && (r.nodes_start = e, r.nodes_end = t);
1103
+ }
1104
+ // @__NO_SIDE_EFFECTS__
1105
+ function ge(e, t) {
1106
+ var r = (t & Di) !== 0, i = (t & Li) !== 0, l, o = !e.startsWith("<!>");
1107
+ return () => {
1108
+ if (D)
1109
+ return Ae(P, null), P;
1110
+ l === void 0 && (l = lr(o ? e : "<!>" + e), r || (l = /** @type {Node} */
1111
+ /* @__PURE__ */ oe(l)));
1112
+ var a = (
1113
+ /** @type {TemplateNode} */
1114
+ i || gn ? document.importNode(l, !0) : l.cloneNode(!0)
1115
+ );
1116
+ if (r) {
1117
+ var s = (
1118
+ /** @type {TemplateNode} */
1119
+ /* @__PURE__ */ oe(a)
1120
+ ), f = (
1121
+ /** @type {TemplateNode} */
1122
+ a.lastChild
1123
+ );
1124
+ Ae(s, f);
1125
+ } else
1126
+ Ae(a, a);
1127
+ return a;
1128
+ };
1129
+ }
1130
+ // @__NO_SIDE_EFFECTS__
1131
+ function Il(e, t, r = "svg") {
1132
+ var i = !e.startsWith("<!>"), l = `<${r}>${i ? e : "<!>" + e}</${r}>`, o;
1133
+ return () => {
1134
+ if (D)
1135
+ return Ae(P, null), P;
1136
+ if (!o) {
1137
+ var a = (
1138
+ /** @type {DocumentFragment} */
1139
+ lr(l)
1140
+ ), s = (
1141
+ /** @type {Element} */
1142
+ /* @__PURE__ */ oe(a)
1143
+ );
1144
+ o = /** @type {Element} */
1145
+ /* @__PURE__ */ oe(s);
1146
+ }
1147
+ var f = (
1148
+ /** @type {TemplateNode} */
1149
+ o.cloneNode(!0)
1150
+ );
1151
+ return Ae(f, f), f;
1152
+ };
1153
+ }
1154
+ function ne(e, t) {
1155
+ if (D) {
1156
+ R.nodes_end = P, Xe();
1157
+ return;
1158
+ }
1159
+ e !== null && e.before(
1160
+ /** @type {Node} */
1161
+ t
1162
+ );
1163
+ }
1164
+ function Jn(e, t) {
1165
+ return Kn(e, t);
1166
+ }
1167
+ function Rl(e, t) {
1168
+ Yt(), t.intro = t.intro ?? !1;
1169
+ const r = t.target, i = D, l = P;
1170
+ try {
1171
+ for (var o = (
1172
+ /** @type {TemplateNode} */
1173
+ /* @__PURE__ */ oe(r)
1174
+ ); o && (o.nodeType !== 8 || /** @type {Comment} */
1175
+ o.data !== Xt); )
1176
+ o = /** @type {TemplateNode} */
1177
+ /* @__PURE__ */ Te(o);
1178
+ if (!o)
1179
+ throw Je;
1180
+ Ge(!0), Ie(
1181
+ /** @type {Comment} */
1182
+ o
1183
+ ), Xe();
1184
+ const a = Kn(e, { ...t, anchor: o });
1185
+ if (P === null || P.nodeType !== 8 || /** @type {Comment} */
1186
+ P.data !== an)
1187
+ throw Tt(), Je;
1188
+ return Ge(!1), /** @type {Exports} */
1189
+ a;
1190
+ } catch (a) {
1191
+ if (a === Je)
1192
+ return t.recover === !1 && Gi(), Yt(), tl(r), Ge(!1), Jn(e, t);
1193
+ throw a;
1194
+ } finally {
1195
+ Ge(i), Ie(l);
1196
+ }
1197
+ }
1198
+ const We = /* @__PURE__ */ new Map();
1199
+ function Kn(e, { target: t, anchor: r, props: i = {}, events: l, context: o, intro: a = !0 }) {
1200
+ Yt();
1201
+ var s = /* @__PURE__ */ new Set(), f = (v) => {
1202
+ for (var g = 0; g < v.length; g++) {
1203
+ var m = v[g];
1204
+ if (!s.has(m)) {
1205
+ s.add(m);
1206
+ var x = $l(m);
1207
+ t.addEventListener(m, ft, { passive: x });
1208
+ var N = We.get(m);
1209
+ N === void 0 ? (document.addEventListener(m, ft, { passive: x }), We.set(m, 1)) : We.set(m, N + 1);
1210
+ }
1211
+ }
1212
+ };
1213
+ f(Oi(Gn)), Jt.add(f);
1214
+ var d = void 0, h = al(() => {
1215
+ var v = r ?? t.appendChild(er());
1216
+ return Zt(() => {
1217
+ if (o) {
1218
+ Bn({});
1219
+ var g = (
1220
+ /** @type {ComponentContext} */
1221
+ Y
1222
+ );
1223
+ g.c = o;
1224
+ }
1225
+ l && (i.$$events = l), D && Ae(
1226
+ /** @type {TemplateNode} */
1227
+ v,
1228
+ null
1229
+ ), d = e(v, i) || {}, D && (R.nodes_end = P), o && Hn();
1230
+ }), () => {
1231
+ var x;
1232
+ for (var g of s) {
1233
+ t.removeEventListener(g, ft);
1234
+ var m = (
1235
+ /** @type {number} */
1236
+ We.get(g)
1237
+ );
1238
+ --m === 0 ? (document.removeEventListener(g, ft), We.delete(g)) : We.set(g, m);
1239
+ }
1240
+ Jt.delete(f), v !== r && ((x = v.parentNode) == null || x.removeChild(v));
1241
+ };
1242
+ });
1243
+ return Kt.set(d, h), d;
1244
+ }
1245
+ let Kt = /* @__PURE__ */ new WeakMap();
1246
+ function Sl(e, t) {
1247
+ const r = Kt.get(e);
1248
+ return r ? (Kt.delete(e), r(t)) : Promise.resolve();
1249
+ }
1250
+ function ke(e, t, [r, i] = [0, 0]) {
1251
+ D && r === 0 && Xe();
1252
+ var l = e, o = null, a = null, s = G, f = r > 0 ? Qt : 0, d = !1;
1253
+ const h = (g, m = !0) => {
1254
+ d = !0, v(m, g);
1255
+ }, v = (g, m) => {
1256
+ if (s === (s = g)) return;
1257
+ let x = !1;
1258
+ if (D && i !== -1) {
1259
+ if (r === 0) {
1260
+ const O = (
1261
+ /** @type {Comment} */
1262
+ l.data
1263
+ );
1264
+ O === Xt ? i = 0 : O === on ? i = 1 / 0 : (i = parseInt(O.substring(1)), i !== i && (i = s ? 1 / 0 : -1));
1265
+ }
1266
+ const N = i > r;
1267
+ !!s === N && (l = Qi(), Ie(l), Ge(!1), x = !0, i = -1);
1268
+ }
1269
+ s ? (o ? Zr(o) : m && (o = Zt(() => m(l))), a && Gt(a, () => {
1270
+ a = null;
1271
+ })) : (a ? Zr(a) : m && (a = Zt(() => m(l, [r + 1, i]))), o && Gt(o, () => {
1272
+ o = null;
1273
+ })), x && Ge(!0);
1274
+ };
1275
+ kn(() => {
1276
+ d = !1, t(h), d || v(null, null);
1277
+ }, f), D && (l = P);
1278
+ }
1279
+ function Ze(e, t, r = !1, i = !1, l = !1) {
1280
+ var o = e, a = "";
1281
+ Pe(() => {
1282
+ var s = (
1283
+ /** @type {Effect} */
1284
+ R
1285
+ );
1286
+ if (a === (a = t() ?? "")) {
1287
+ D && Xe();
1288
+ return;
1289
+ }
1290
+ if (s.nodes_start !== null && (An(
1291
+ s.nodes_start,
1292
+ /** @type {TemplateNode} */
1293
+ s.nodes_end
1294
+ ), s.nodes_start = s.nodes_end = null), a !== "") {
1295
+ if (D) {
1296
+ P.data;
1297
+ for (var f = Xe(), d = f; f !== null && (f.nodeType !== 8 || /** @type {Comment} */
1298
+ f.data !== ""); )
1299
+ d = f, f = /** @type {TemplateNode} */
1300
+ /* @__PURE__ */ Te(f);
1301
+ if (f === null)
1302
+ throw Tt(), Je;
1303
+ Ae(P, d), o = Ie(f);
1304
+ return;
1305
+ }
1306
+ var h = a + "";
1307
+ r ? h = `<svg>${h}</svg>` : i && (h = `<math>${h}</math>`);
1308
+ var v = lr(h);
1309
+ if ((r || i) && (v = /** @type {Element} */
1310
+ /* @__PURE__ */ oe(v)), Ae(
1311
+ /** @type {TemplateNode} */
1312
+ /* @__PURE__ */ oe(v),
1313
+ /** @type {TemplateNode} */
1314
+ v.lastChild
1315
+ ), r || i)
1316
+ for (; /* @__PURE__ */ oe(v); )
1317
+ o.before(
1318
+ /** @type {Node} */
1319
+ /* @__PURE__ */ oe(v)
1320
+ );
1321
+ else
1322
+ o.before(v);
1323
+ }
1324
+ });
1325
+ }
1326
+ function Tl(e, t, r, i, l) {
1327
+ var s;
1328
+ D && Xe();
1329
+ var o = (s = t.$$slots) == null ? void 0 : s[r], a = !1;
1330
+ o === !0 && (o = t.children, a = !0), o === void 0 || o(e, a ? () => i : i);
1331
+ }
1332
+ const zr = [...`
1333
+ \r\f \v\uFEFF`];
1334
+ function Nl(e, t, r) {
1335
+ var i = "" + e;
1336
+ if (r) {
1337
+ for (var l in r)
1338
+ if (r[l])
1339
+ i = i ? i + " " + l : l;
1340
+ else if (i.length)
1341
+ for (var o = l.length, a = 0; (a = i.indexOf(l, a)) >= 0; ) {
1342
+ var s = a + o;
1343
+ (a === 0 || zr.includes(i[a - 1])) && (s === i.length || zr.includes(i[s])) ? i = (a === 0 ? "" : i.substring(0, a)) + i.substring(s + 1) : a = s;
1344
+ }
1345
+ }
1346
+ return i === "" ? null : i;
1347
+ }
1348
+ function Dl(e, t, r, i, l, o) {
1349
+ var a = e.__className;
1350
+ if (D || a !== r || a === void 0) {
1351
+ var s = Nl(r, i, o);
1352
+ (!D || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : e.className = s), e.__className = r;
1353
+ } else if (o && l !== o)
1354
+ for (var f in o) {
1355
+ var d = !!o[f];
1356
+ (l == null || d !== !!l[f]) && e.classList.toggle(f, d);
1357
+ }
1358
+ return o;
1359
+ }
1360
+ const Ll = Symbol("is custom element"), Pl = Symbol("is html");
1361
+ function Qr(e) {
1362
+ if (D) {
1363
+ var t = !1, r = () => {
1364
+ if (!t) {
1365
+ if (t = !0, e.hasAttribute("value")) {
1366
+ var i = e.value;
1367
+ se(e, "value", null), e.value = i;
1368
+ }
1369
+ if (e.hasAttribute("checked")) {
1370
+ var l = e.checked;
1371
+ se(e, "checked", null), e.checked = l;
1372
+ }
1373
+ }
1374
+ };
1375
+ e.__on_r = r, cl(r), Wn();
1376
+ }
1377
+ }
1378
+ function Fl(e, t) {
1379
+ var r = Xn(e);
1380
+ r.value === (r.value = // treat null and undefined the same for the initial value
1381
+ t ?? void 0) || // @ts-expect-error
1382
+ // `progress` elements always need their value set when it's `0`
1383
+ e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
1384
+ }
1385
+ function se(e, t, r, i) {
1386
+ var l = Xn(e);
1387
+ D && (l[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || l[t] !== (l[t] = r) && (t === "loading" && (e[Bi] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ol(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1388
+ }
1389
+ function Xn(e) {
1390
+ return (
1391
+ /** @type {Record<string | symbol, unknown>} **/
1392
+ // @ts-expect-error
1393
+ e.__attributes ?? (e.__attributes = {
1394
+ [Ll]: e.nodeName.includes("-"),
1395
+ [Pl]: e.namespaceURI === Pi
1396
+ })
1397
+ );
1398
+ }
1399
+ var en = /* @__PURE__ */ new Map();
1400
+ function Ol(e) {
1401
+ var t = en.get(e.nodeName);
1402
+ if (t) return t;
1403
+ en.set(e.nodeName, t = []);
1404
+ for (var r, i = e, l = Element.prototype; l !== i; ) {
1405
+ r = Mi(i);
1406
+ for (var o in r)
1407
+ r[o].set && t.push(o);
1408
+ i = un(i);
1409
+ }
1410
+ return t;
1411
+ }
1412
+ function Ml(e, t, r = t) {
1413
+ kl(e, "change", (i) => {
1414
+ var l = i ? e.defaultChecked : e.checked;
1415
+ r(l);
1416
+ }), // If we are hydrating and the value has since changed,
1417
+ // then use the update value from the input instead.
1418
+ (D && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
1419
+ ze(t) == null) && r(e.checked), nr(() => {
1420
+ var i = t();
1421
+ e.checked = !!i;
1422
+ });
1423
+ }
1424
+ function tn(e, t) {
1425
+ return e === t || (e == null ? void 0 : e[ut]) === t;
1426
+ }
1427
+ function rn(e = {}, t, r, i) {
1428
+ return rr(() => {
1429
+ var l, o;
1430
+ return nr(() => {
1431
+ l = o, o = [], ze(() => {
1432
+ e !== r(...o) && (t(e, ...o), l && tn(r(...l), e) && t(null, ...l));
1433
+ });
1434
+ }), () => {
1435
+ Dn(() => {
1436
+ o && tn(r(...o), e) && t(null, ...o);
1437
+ });
1438
+ };
1439
+ }), e;
1440
+ }
1441
+ function zn(e) {
1442
+ Y === null && sn(), Wt(() => {
1443
+ const t = ze(e);
1444
+ if (typeof t == "function") return (
1445
+ /** @type {() => void} */
1446
+ t
1447
+ );
1448
+ });
1449
+ }
1450
+ function Vl(e) {
1451
+ Y === null && sn(), zn(() => () => ze(e));
1452
+ }
1453
+ let wt = !1;
1454
+ function Ul(e) {
1455
+ var t = wt;
1456
+ try {
1457
+ return wt = !1, [e(), wt];
1458
+ } finally {
1459
+ wt = t;
1460
+ }
1461
+ }
1462
+ function nn(e) {
1463
+ var t;
1464
+ return ((t = e.ctx) == null ? void 0 : t.d) ?? !1;
1465
+ }
1466
+ function A(e, t, r, i) {
1467
+ var Ne;
1468
+ var l = (r & Ri) !== 0, o = !0, a = (r & Ti) !== 0, s = (r & Ni) !== 0, f = !1, d;
1469
+ a ? [d, f] = Ul(() => (
1470
+ /** @type {V} */
1471
+ e[t]
1472
+ )) : d = /** @type {V} */
1473
+ e[t];
1474
+ var h = ut in e || hn in e, v = a && (((Ne = Fe(e, t)) == null ? void 0 : Ne.set) ?? (h && t in e && ((F) => e[t] = F))) || void 0, g = (
1475
+ /** @type {V} */
1476
+ i
1477
+ ), m = !0, x = !1, N = () => (x = !0, m && (m = !1, s ? g = ze(
1478
+ /** @type {() => V} */
1479
+ i
1480
+ ) : g = /** @type {V} */
1481
+ i), g);
1482
+ d === void 0 && i !== void 0 && (v && o && Ji(), d = N(), v && v(d));
1483
+ var O;
1484
+ if (O = () => {
1485
+ var F = (
1486
+ /** @type {V} */
1487
+ e[t]
1488
+ );
1489
+ return F === void 0 ? N() : (m = !0, x = !1, F);
1490
+ }, (r & Si) === 0)
1491
+ return O;
1492
+ if (v) {
1493
+ var j = e.$$legacy;
1494
+ return function(F, U) {
1495
+ return arguments.length > 0 ? ((!U || j || f) && v(U ? O() : F), F) : O();
1496
+ };
1497
+ }
1498
+ var V = !1, W = /* @__PURE__ */ jn(d), M = /* @__PURE__ */ tr(() => {
1499
+ var F = O(), U = c(W);
1500
+ return V ? (V = !1, U) : W.v = F;
1501
+ });
1502
+ return a && c(M), l || (M.equals = pn), function(F, U) {
1503
+ if (arguments.length > 0) {
1504
+ const _e = U ? c(M) : a ? xe(F) : F;
1505
+ if (!M.equals(_e)) {
1506
+ if (V = !0, L(W, _e), x && g !== void 0 && (g = _e), nn(M))
1507
+ return F;
1508
+ ze(() => c(M));
1509
+ }
1510
+ return F;
1511
+ }
1512
+ return nn(M) ? M.v : c(M);
1513
+ };
1514
+ }
1515
+ function jl(e) {
1516
+ return new ql(e);
1517
+ }
1518
+ var pe, le;
1519
+ class ql {
1520
+ /**
1521
+ * @param {ComponentConstructorOptions & {
1522
+ * component: any;
1523
+ * }} options
1524
+ */
1525
+ constructor(t) {
1526
+ /** @type {any} */
1527
+ jt(this, pe);
1528
+ /** @type {Record<string, any>} */
1529
+ jt(this, le);
1530
+ var o;
1531
+ var r = /* @__PURE__ */ new Map(), i = (a, s) => {
1532
+ var f = /* @__PURE__ */ jn(s);
1533
+ return r.set(a, f), f;
1534
+ };
1535
+ const l = new Proxy(
1536
+ { ...t.props || {}, $$events: {} },
1537
+ {
1538
+ get(a, s) {
1539
+ return c(r.get(s) ?? i(s, Reflect.get(a, s)));
1540
+ },
1541
+ has(a, s) {
1542
+ return s === hn ? !0 : (c(r.get(s) ?? i(s, Reflect.get(a, s))), Reflect.has(a, s));
1543
+ },
1544
+ set(a, s, f) {
1545
+ return L(r.get(s) ?? i(s, f), f), Reflect.set(a, s, f);
1546
+ }
1547
+ }
1548
+ );
1549
+ qt(this, le, (t.hydrate ? Rl : Jn)(t.component, {
1550
+ target: t.target,
1551
+ anchor: t.anchor,
1552
+ props: l,
1553
+ context: t.context,
1554
+ intro: t.intro ?? !1,
1555
+ recover: t.recover
1556
+ })), (!((o = t == null ? void 0 : t.props) != null && o.$$host) || t.sync === !1) && k(), qt(this, pe, l.$$events);
1557
+ for (const a of Object.keys(Z(this, le)))
1558
+ a === "$set" || a === "$destroy" || a === "$on" || Et(this, a, {
1559
+ get() {
1560
+ return Z(this, le)[a];
1561
+ },
1562
+ /** @param {any} value */
1563
+ set(s) {
1564
+ Z(this, le)[a] = s;
1565
+ },
1566
+ enumerable: !0
1567
+ });
1568
+ Z(this, le).$set = /** @param {Record<string, any>} next */
1569
+ (a) => {
1570
+ Object.assign(l, a);
1571
+ }, Z(this, le).$destroy = () => {
1572
+ Sl(Z(this, le));
1573
+ };
1574
+ }
1575
+ /** @param {Record<string, any>} props */
1576
+ $set(t) {
1577
+ Z(this, le).$set(t);
1578
+ }
1579
+ /**
1580
+ * @param {string} event
1581
+ * @param {(...args: any[]) => any} callback
1582
+ * @returns {any}
1583
+ */
1584
+ $on(t, r) {
1585
+ Z(this, pe)[t] = Z(this, pe)[t] || [];
1586
+ const i = (...l) => r.call(this, ...l);
1587
+ return Z(this, pe)[t].push(i), () => {
1588
+ Z(this, pe)[t] = Z(this, pe)[t].filter(
1589
+ /** @param {any} fn */
1590
+ (l) => l !== i
1591
+ );
1592
+ };
1593
+ }
1594
+ $destroy() {
1595
+ Z(this, le).$destroy();
1596
+ }
1597
+ }
1598
+ pe = new WeakMap(), le = new WeakMap();
1599
+ let Qn;
1600
+ typeof HTMLElement == "function" && (Qn = class extends HTMLElement {
1601
+ /**
1602
+ * @param {*} $$componentCtor
1603
+ * @param {*} $$slots
1604
+ * @param {*} use_shadow_dom
1605
+ */
1606
+ constructor(t, r, i) {
1607
+ super();
1608
+ /** The Svelte component constructor */
1609
+ ae(this, "$$ctor");
1610
+ /** Slots */
1611
+ ae(this, "$$s");
1612
+ /** @type {any} The Svelte component instance */
1613
+ ae(this, "$$c");
1614
+ /** Whether or not the custom element is connected */
1615
+ ae(this, "$$cn", !1);
1616
+ /** @type {Record<string, any>} Component props data */
1617
+ ae(this, "$$d", {});
1618
+ /** `true` if currently in the process of reflecting component props back to attributes */
1619
+ ae(this, "$$r", !1);
1620
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
1621
+ ae(this, "$$p_d", {});
1622
+ /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
1623
+ ae(this, "$$l", {});
1624
+ /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
1625
+ ae(this, "$$l_u", /* @__PURE__ */ new Map());
1626
+ /** @type {any} The managed render effect for reflecting attributes */
1627
+ ae(this, "$$me");
1628
+ this.$$ctor = t, this.$$s = r, i && this.attachShadow({ mode: "open" });
1629
+ }
1630
+ /**
1631
+ * @param {string} type
1632
+ * @param {EventListenerOrEventListenerObject} listener
1633
+ * @param {boolean | AddEventListenerOptions} [options]
1634
+ */
1635
+ addEventListener(t, r, i) {
1636
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
1637
+ const l = this.$$c.$on(t, r);
1638
+ this.$$l_u.set(r, l);
1639
+ }
1640
+ super.addEventListener(t, r, i);
1641
+ }
1642
+ /**
1643
+ * @param {string} type
1644
+ * @param {EventListenerOrEventListenerObject} listener
1645
+ * @param {boolean | AddEventListenerOptions} [options]
1646
+ */
1647
+ removeEventListener(t, r, i) {
1648
+ if (super.removeEventListener(t, r, i), this.$$c) {
1649
+ const l = this.$$l_u.get(r);
1650
+ l && (l(), this.$$l_u.delete(r));
1651
+ }
1652
+ }
1653
+ async connectedCallback() {
1654
+ if (this.$$cn = !0, !this.$$c) {
1655
+ let t = function(l) {
1656
+ return (o) => {
1657
+ const a = document.createElement("slot");
1658
+ l !== "default" && (a.name = l), ne(o, a);
1659
+ };
1660
+ };
1661
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
1662
+ return;
1663
+ const r = {}, i = Bl(this);
1664
+ for (const l of this.$$s)
1665
+ l in i && (l === "default" && !this.$$d.children ? (this.$$d.children = t(l), r.default = !0) : r[l] = t(l));
1666
+ for (const l of this.attributes) {
1667
+ const o = this.$$g_p(l.name);
1668
+ o in this.$$d || (this.$$d[o] = yt(o, l.value, this.$$p_d, "toProp"));
1669
+ }
1670
+ for (const l in this.$$p_d)
1671
+ !(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
1672
+ this.$$c = jl({
1673
+ component: this.$$ctor,
1674
+ target: this.shadowRoot || this,
1675
+ props: {
1676
+ ...this.$$d,
1677
+ $$slots: r,
1678
+ $$host: this
1679
+ }
1680
+ }), this.$$me = ol(() => {
1681
+ nr(() => {
1682
+ var l;
1683
+ this.$$r = !0;
1684
+ for (const o of bt(this.$$c)) {
1685
+ if (!((l = this.$$p_d[o]) != null && l.reflect)) continue;
1686
+ this.$$d[o] = this.$$c[o];
1687
+ const a = yt(
1688
+ o,
1689
+ this.$$d[o],
1690
+ this.$$p_d,
1691
+ "toAttribute"
1692
+ );
1693
+ a == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, a);
1694
+ }
1695
+ this.$$r = !1;
1696
+ });
1697
+ });
1698
+ for (const l in this.$$l)
1699
+ for (const o of this.$$l[l]) {
1700
+ const a = this.$$c.$on(l, o);
1701
+ this.$$l_u.set(o, a);
1702
+ }
1703
+ this.$$l = {};
1704
+ }
1705
+ }
1706
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
1707
+ // and setting attributes through setAttribute etc, this is helpful
1708
+ /**
1709
+ * @param {string} attr
1710
+ * @param {string} _oldValue
1711
+ * @param {string} newValue
1712
+ */
1713
+ attributeChangedCallback(t, r, i) {
1714
+ var l;
1715
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = yt(t, i, this.$$p_d, "toProp"), (l = this.$$c) == null || l.$set({ [t]: this.$$d[t] }));
1716
+ }
1717
+ disconnectedCallback() {
1718
+ this.$$cn = !1, Promise.resolve().then(() => {
1719
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
1720
+ });
1721
+ }
1722
+ /**
1723
+ * @param {string} attribute_name
1724
+ */
1725
+ $$g_p(t) {
1726
+ return bt(this.$$p_d).find(
1727
+ (r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
1728
+ ) || t;
1729
+ }
1730
+ });
1731
+ function yt(e, t, r, i) {
1732
+ var o;
1733
+ const l = (o = r[e]) == null ? void 0 : o.type;
1734
+ if (t = l === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e])
1735
+ return t;
1736
+ if (i === "toAttribute")
1737
+ switch (l) {
1738
+ case "Object":
1739
+ case "Array":
1740
+ return t == null ? null : JSON.stringify(t);
1741
+ case "Boolean":
1742
+ return t ? "" : null;
1743
+ case "Number":
1744
+ return t ?? null;
1745
+ default:
1746
+ return t;
1747
+ }
1748
+ else
1749
+ switch (l) {
1750
+ case "Object":
1751
+ case "Array":
1752
+ return t && JSON.parse(t);
1753
+ case "Boolean":
1754
+ return t;
1755
+ // conversion already handled above
1756
+ case "Number":
1757
+ return t != null ? +t : t;
1758
+ default:
1759
+ return t;
1760
+ }
1761
+ }
1762
+ function Bl(e) {
1763
+ const t = {};
1764
+ return e.childNodes.forEach((r) => {
1765
+ t[
1766
+ /** @type {Element} node */
1767
+ r.slot || "default"
1768
+ ] = !0;
1769
+ }), t;
1770
+ }
1771
+ function Hl(e, t, r, i, l, o) {
1772
+ let a = class extends Qn {
1773
+ constructor() {
1774
+ super(e, r, l), this.$$p_d = t;
1775
+ }
1776
+ static get observedAttributes() {
1777
+ return bt(t).map(
1778
+ (s) => (t[s].attribute || s).toLowerCase()
1779
+ );
1780
+ }
1781
+ };
1782
+ return bt(t).forEach((s) => {
1783
+ Et(a.prototype, s, {
1784
+ get() {
1785
+ return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
1786
+ },
1787
+ set(f) {
1788
+ var v;
1789
+ f = yt(s, f, t), this.$$d[s] = f;
1790
+ var d = this.$$c;
1791
+ if (d) {
1792
+ var h = (v = Fe(d, s)) == null ? void 0 : v.get;
1793
+ h ? d[s] = f : d.$set({ [s]: f });
1794
+ }
1795
+ }
1796
+ });
1797
+ }), i.forEach((s) => {
1798
+ Et(a.prototype, s, {
1799
+ get() {
1800
+ var f;
1801
+ return (f = this.$$c) == null ? void 0 : f[s];
1802
+ }
1803
+ });
1804
+ }), e.element = /** @type {any} */
1805
+ a, a;
1806
+ }
1807
+ const ei = new TextEncoder();
1808
+ function Yl(e) {
1809
+ return [...new Uint8Array(e)].map((t) => t.toString(16).padStart(2, "0")).join("");
1810
+ }
1811
+ async function Wl(e, t = "SHA-256", r = 1e5) {
1812
+ const i = Date.now().toString(16);
1813
+ e || (e = Math.round(Math.random() * r));
1814
+ const l = await ti(i, e, t);
1815
+ return {
1816
+ algorithm: t,
1817
+ challenge: l,
1818
+ salt: i,
1819
+ signature: ""
1820
+ };
1821
+ }
1822
+ async function ti(e, t, r) {
1823
+ if (typeof crypto > "u" || !("subtle" in crypto) || !("digest" in crypto.subtle))
1824
+ throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");
1825
+ return Yl(
1826
+ await crypto.subtle.digest(
1827
+ r.toUpperCase(),
1828
+ ei.encode(e + t)
1829
+ )
1830
+ );
1831
+ }
1832
+ function Zl(e, t, r = "SHA-256", i = 1e6, l = 0) {
1833
+ const o = new AbortController(), a = Date.now();
1834
+ return {
1835
+ promise: (async () => {
1836
+ for (let f = l; f <= i; f += 1) {
1837
+ if (o.signal.aborted)
1838
+ return null;
1839
+ if (await ti(t, f, r) === e)
1840
+ return {
1841
+ number: f,
1842
+ took: Date.now() - a
1843
+ };
1844
+ }
1845
+ return null;
1846
+ })(),
1847
+ controller: o
1848
+ };
1849
+ }
1850
+ function Gl() {
1851
+ try {
1852
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
1853
+ } catch {
1854
+ }
1855
+ }
1856
+ function Jl(e) {
1857
+ const t = atob(e), r = new Uint8Array(t.length);
1858
+ for (let i = 0; i < t.length; i++)
1859
+ r[i] = t.charCodeAt(i);
1860
+ return r;
1861
+ }
1862
+ function Kl(e, t = 12) {
1863
+ const r = new Uint8Array(t);
1864
+ for (let i = 0; i < t; i++)
1865
+ r[i] = e % 256, e = Math.floor(e / 256);
1866
+ return r;
1867
+ }
1868
+ async function Xl(e, t = "", r = 1e6, i = 0) {
1869
+ const l = "AES-GCM", o = new AbortController(), a = Date.now(), s = async () => {
1870
+ for (let h = i; h <= r; h += 1) {
1871
+ if (o.signal.aborted || !f || !d)
1872
+ return null;
1873
+ try {
1874
+ const v = await crypto.subtle.decrypt(
1875
+ {
1876
+ name: l,
1877
+ iv: Kl(h)
1878
+ },
1879
+ f,
1880
+ d
1881
+ );
1882
+ if (v)
1883
+ return {
1884
+ clearText: new TextDecoder().decode(v),
1885
+ took: Date.now() - a
1886
+ };
1887
+ } catch {
1888
+ }
1889
+ }
1890
+ return null;
1891
+ };
1892
+ let f = null, d = null;
1893
+ try {
1894
+ d = Jl(e);
1895
+ const h = await crypto.subtle.digest(
1896
+ "SHA-256",
1897
+ ei.encode(t)
1898
+ );
1899
+ f = await crypto.subtle.importKey(
1900
+ "raw",
1901
+ h,
1902
+ l,
1903
+ !1,
1904
+ ["decrypt"]
1905
+ );
1906
+ } catch {
1907
+ return {
1908
+ promise: Promise.reject(),
1909
+ controller: o
1910
+ };
1911
+ }
1912
+ return {
1913
+ promise: s(),
1914
+ controller: o
1915
+ };
1916
+ }
1917
+ var y = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.VERIFIED = "verified", e.VERIFYING = "verifying", e.UNVERIFIED = "unverified", e.EXPIRED = "expired", e))(y || {}), zl = /* @__PURE__ */ Il('<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor" class="altcha-spinner"></path></svg>'), Ql = /* @__PURE__ */ ge('<span role="status" aria-live="polite"><!></span> <input type="hidden">', 1), eo = /* @__PURE__ */ ge('<span role="status" aria-live="polite"><!></span>'), to = /* @__PURE__ */ ge("<label><!></label>"), ro = /* @__PURE__ */ ge('<div><a target="_blank" class="altcha-logo"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'), no = /* @__PURE__ */ ge("<div><!></div>"), io = /* @__PURE__ */ ge("<div><!></div>"), lo = /* @__PURE__ */ ge('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'), oo = /* @__PURE__ */ ge('<div class="altcha-footer"><div><!></div></div>'), ao = /* @__PURE__ */ ge('<div class="altcha-anchor-arrow"></div>'), so = /* @__PURE__ */ ge('<!> <div class="altcha"><div class="altcha-main"><!> <div><input type="checkbox"></div> <div class="altcha-label"><!></div> <!></div> <!> <!> <!></div>', 1);
1918
+ function fo(e, t) {
1919
+ var Mr, Vr;
1920
+ Bn(t, !0);
1921
+ let r = A(t, "auto", 7, void 0), i = A(t, "blockspam", 7, void 0), l = A(t, "challengeurl", 7, void 0), o = A(t, "challengejson", 7, void 0), a = A(t, "customfetch", 7, void 0), s = A(t, "debug", 7, !1), f = A(t, "delay", 7, 0), d = A(t, "expire", 7, void 0), h = A(t, "floating", 7, void 0), v = A(t, "floatinganchor", 7, void 0), g = A(t, "floatingoffset", 7, void 0), m = A(t, "floatingpersist", 7, !1), x = A(t, "hidefooter", 7, !1), N = A(t, "hidelogo", 7, !1), O = A(t, "id", 7, void 0), j = A(t, "name", 7, "altcha"), V = A(t, "maxnumber", 7, 1e6), W = A(t, "mockerror", 7, !1), M = A(t, "obfuscated", 7, void 0), Ne = A(t, "plugins", 7, void 0), F = A(t, "refetchonexpire", 7, !0), U = A(t, "spamfilter", 7, !1), _e = A(t, "strings", 7, void 0), te = A(t, "test", 7, !1), be = A(t, "verifyurl", 7, void 0), je = A(t, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), Qe = A(t, "workerurl", 7, void 0);
1922
+ const or = ["SHA-256", "SHA-384", "SHA-512"], ar = "Visit Altcha.org", sr = "https://altcha.org/", et = (n, u) => {
1923
+ t.$$host.dispatchEvent(new CustomEvent(n, { detail: u }));
1924
+ }, fr = (Vr = (Mr = document.documentElement.lang) == null ? void 0 : Mr.split("-")) == null ? void 0 : Vr[0], Lt = /* @__PURE__ */ st(() => {
1925
+ var n;
1926
+ return l() && new URL(l(), location.origin).host.endsWith(".altcha.org") && !!((n = l()) != null && n.includes("apiKey=ckey_"));
1927
+ }), Pt = /* @__PURE__ */ st(() => o() ? Er(o()) : void 0), ur = /* @__PURE__ */ st(() => _e() ? Er(_e()) : {}), re = /* @__PURE__ */ st(() => {
1928
+ var n;
1929
+ return {
1930
+ ariaLinkLabel: ar,
1931
+ error: "Verification failed. Try again later.",
1932
+ expired: "Verification expired. Try again.",
1933
+ footer: `Protected by <a href="${sr}" target="_blank" aria-label="${((n = c(ur)) == null ? void 0 : n.ariaLinkLabel) || ar}">ALTCHA</a>`,
1934
+ label: "I'm not a robot",
1935
+ verified: "Verified",
1936
+ verifying: "Verifying...",
1937
+ waitAlert: "Verifying... please wait.",
1938
+ ...c(ur)
1939
+ };
1940
+ }), cr = /* @__PURE__ */ st(() => `${O() || j()}_checkbox`);
1941
+ let qe = /* @__PURE__ */ J(!1), C = /* @__PURE__ */ J(xe(y.UNVERIFIED)), q = /* @__PURE__ */ J(void 0), tt = /* @__PURE__ */ J(null), Be = null, w = null, He = /* @__PURE__ */ J(null), ce = null, Ee = [], De = /* @__PURE__ */ J(null);
1942
+ Wt(() => {
1943
+ fi(c(He));
1944
+ }), Wt(() => {
1945
+ ui(c(C));
1946
+ }), Vl(() => {
1947
+ ri(), w && (w.removeEventListener("submit", wr), w.removeEventListener("reset", pr), w.removeEventListener("focusin", mr), w = null), ce && (clearTimeout(ce), ce = null), document.removeEventListener("click", gr), document.removeEventListener("scroll", _r), window.removeEventListener("resize", br);
1948
+ }), zn(() => {
1949
+ var n;
1950
+ S("mounted", "1.5.1"), S("workers", je()), ai(), S("plugins", Ee.length ? Ee.map((u) => u.constructor.pluginName).join(", ") : "none"), te() && S("using test mode"), d() && Ft(d()), r() !== void 0 && S("auto", r()), h() !== void 0 && $r(h()), w = (n = c(q)) == null ? void 0 : n.closest("form"), w && (w.addEventListener("submit", wr, { capture: !0 }), w.addEventListener("reset", pr), (r() === "onfocus" || m() === "focus") && w.addEventListener("focusin", mr)), r() === "onload" && (M() ? rt() : $e()), c(Lt) && (x() || N()) && S("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
1951
+ et("load");
1952
+ });
1953
+ });
1954
+ function dr(n, u) {
1955
+ return btoa(JSON.stringify({
1956
+ algorithm: n.algorithm,
1957
+ challenge: n.challenge,
1958
+ number: u.number,
1959
+ salt: n.salt,
1960
+ signature: n.signature,
1961
+ test: te() ? !0 : void 0,
1962
+ took: u.took
1963
+ }));
1964
+ }
1965
+ function ri() {
1966
+ for (const n of Ee)
1967
+ n.destroy();
1968
+ }
1969
+ function vr() {
1970
+ l() && F() && c(C) === y.VERIFIED ? $e() : it(y.EXPIRED, c(re).expired);
1971
+ }
1972
+ async function ni() {
1973
+ var n;
1974
+ if (W())
1975
+ throw S("mocking error"), new Error("Mocked error.");
1976
+ if (c(Pt))
1977
+ return S("using provided json data"), c(Pt);
1978
+ if (te())
1979
+ return S("generating test challenge", { test: te() }), Wl(typeof te() != "boolean" ? +te() : void 0);
1980
+ {
1981
+ if (!l() && w) {
1982
+ const $ = w.getAttribute("action");
1983
+ $ != null && $.includes("/form/") && l($ + "/altcha");
1984
+ }
1985
+ if (!l())
1986
+ throw new Error("Attribute challengeurl not set.");
1987
+ S("fetching challenge from", l());
1988
+ const u = {
1989
+ headers: U() !== !1 ? { "x-altcha-spam-filter": "1" } : {}
1990
+ }, _ = await hr()(l(), u);
1991
+ if (!_ || !(_ instanceof Response))
1992
+ throw new Error("Fetch function did not return a response.");
1993
+ if (_.status !== 200)
1994
+ throw new Error(`Server responded with ${_.status}.`);
1995
+ const b = _.headers.get("X-Altcha-Config"), T = await _.json(), E = new URLSearchParams((n = T.salt.split("?")) == null ? void 0 : n[1]), p = E.get("expires") || E.get("expire");
1996
+ if (p) {
1997
+ const $ = new Date(+p * 1e3), me = isNaN($.getTime()) ? 0 : $.getTime() - Date.now();
1998
+ me > 0 && Ft(me);
1999
+ }
2000
+ if (b)
2001
+ try {
2002
+ const $ = JSON.parse(b);
2003
+ $ && typeof $ == "object" && ("sentinel" in $ ? alert("This version of the widget is not compatible with Sentinel. Upgrade to version 2.x.x.") : ($.verifyurl && ($.verifyurl = new URL($.verifyurl, new URL(l())).toString()), Cr($)));
2004
+ } catch ($) {
2005
+ S("unable to configure from X-Altcha-Config", $);
2006
+ }
2007
+ return T;
2008
+ }
2009
+ }
2010
+ function ii(n) {
2011
+ var _;
2012
+ const u = w == null ? void 0 : w.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
2013
+ return ((_ = u == null ? void 0 : u.value) == null ? void 0 : _.slice(u.value.indexOf("@"))) || void 0;
2014
+ }
2015
+ function hr() {
2016
+ let n = fetch;
2017
+ if (a())
2018
+ if (S("using customfetch"), typeof a() == "string") {
2019
+ if (n = globalThis[a()] || null, !n)
2020
+ throw new Error(`Custom fetch function not found: ${a()}`);
2021
+ } else
2022
+ n = a();
2023
+ return n;
2024
+ }
2025
+ function li() {
2026
+ return U() === "ipAddress" ? {
2027
+ blockedCountries: void 0,
2028
+ classifier: void 0,
2029
+ disableRules: void 0,
2030
+ email: !1,
2031
+ expectedCountries: void 0,
2032
+ expectedLanguages: void 0,
2033
+ fields: !1,
2034
+ ipAddress: void 0,
2035
+ text: void 0,
2036
+ timeZone: void 0
2037
+ } : typeof U() == "object" ? U() : {
2038
+ blockedCountries: void 0,
2039
+ classifier: void 0,
2040
+ disableRules: void 0,
2041
+ email: void 0,
2042
+ expectedCountries: void 0,
2043
+ expectedLanguages: void 0,
2044
+ fields: void 0,
2045
+ ipAddress: void 0,
2046
+ text: void 0,
2047
+ timeZone: void 0
2048
+ };
2049
+ }
2050
+ function oi(n) {
2051
+ return [
2052
+ ...(w == null ? void 0 : w.querySelectorAll(n != null && n.length ? n.map((_) => `input[name="${_}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
2053
+ ].reduce(
2054
+ (_, b) => {
2055
+ const T = b.name, E = b.value;
2056
+ return T && E && (_[T] = /\n/.test(E) ? E.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
2057
+ `) : E), _;
2058
+ },
2059
+ {}
2060
+ );
2061
+ }
2062
+ function ai() {
2063
+ const n = Ne() !== void 0 ? Ne().split(",") : void 0;
2064
+ for (const u of globalThis.altchaPlugins)
2065
+ (!n || n.includes(u.pluginName)) && Ee.push(new u({
2066
+ el: c(q),
2067
+ clarify: rt,
2068
+ dispatch: et,
2069
+ getConfiguration: Ar,
2070
+ getFloatingAnchor: Ir,
2071
+ getState: Rr,
2072
+ log: S,
2073
+ reset: it,
2074
+ solve: xr,
2075
+ setState: Le,
2076
+ setFloatingAnchor: Tr,
2077
+ verify: $e
2078
+ }));
2079
+ }
2080
+ function S(...n) {
2081
+ (s() || n.some((u) => u instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${j()}]`, ...n);
2082
+ }
2083
+ function si() {
2084
+ [y.UNVERIFIED, y.ERROR, y.EXPIRED].includes(c(C)) ? U() !== !1 && (w == null ? void 0 : w.reportValidity()) === !1 ? L(qe, !1) : M() ? rt() : $e() : L(qe, !0);
2085
+ }
2086
+ function gr(n) {
2087
+ const u = n.target;
2088
+ h() && u && !c(q).contains(u) && (c(C) === y.VERIFIED && m() === !1 || c(C) === y.VERIFIED && m() === "focus" && !(w != null && w.matches(":focus-within")) || r() === "off" && c(C) === y.UNVERIFIED) && Sr();
2089
+ }
2090
+ function _r() {
2091
+ h() && c(C) !== y.UNVERIFIED && nt();
2092
+ }
2093
+ function fi(n) {
2094
+ for (const u of Ee)
2095
+ typeof u.onErrorChange == "function" && u.onErrorChange(c(He));
2096
+ }
2097
+ function mr(n) {
2098
+ c(C) === y.UNVERIFIED ? $e() : h() && m() === "focus" && c(C) === y.VERIFIED && Ot();
2099
+ }
2100
+ function wr(n) {
2101
+ w && r() === "onsubmit" ? c(C) === y.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), $e().then(() => {
2102
+ di();
2103
+ })) : c(C) !== y.VERIFIED && (n.preventDefault(), n.stopPropagation(), c(C) === y.VERIFYING && yr()) : w && h() && r() === "off" && c(C) === y.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), Ot());
2104
+ }
2105
+ function pr() {
2106
+ it();
2107
+ }
2108
+ function yr() {
2109
+ c(C) === y.VERIFYING && c(re).waitAlert && alert(c(re).waitAlert);
2110
+ }
2111
+ function ui(n) {
2112
+ for (const u of Ee)
2113
+ typeof u.onStateChange == "function" && u.onStateChange(c(C));
2114
+ h() && c(C) !== y.UNVERIFIED && requestAnimationFrame(() => {
2115
+ nt();
2116
+ }), L(qe, c(C) === y.VERIFIED);
2117
+ }
2118
+ function br() {
2119
+ h() && nt();
2120
+ }
2121
+ function Er(n) {
2122
+ return JSON.parse(n);
2123
+ }
2124
+ async function ci(n) {
2125
+ if (!be())
2126
+ throw new Error("Attribute verifyurl not set.");
2127
+ S("requesting server verification from", be());
2128
+ const u = { payload: n };
2129
+ if (U() !== !1) {
2130
+ const {
2131
+ blockedCountries: T,
2132
+ classifier: E,
2133
+ disableRules: p,
2134
+ email: $,
2135
+ expectedLanguages: me,
2136
+ expectedCountries: Ut,
2137
+ fields: ot,
2138
+ ipAddress: at,
2139
+ text: xi,
2140
+ timeZone: Ur
2141
+ } = li();
2142
+ u.blockedCountries = T, u.classifier = E, u.disableRules = p, u.email = $ === !1 ? void 0 : ii($), u.expectedCountries = Ut, u.expectedLanguages = me || (fr ? [fr] : void 0), u.fields = ot === !1 ? void 0 : oi(ot), u.ipAddress = at === !1 ? void 0 : at || "auto", u.text = xi, u.timeZone = Ur === !1 ? void 0 : Ur || Gl();
2143
+ }
2144
+ const _ = await hr()(be(), {
2145
+ body: JSON.stringify(u),
2146
+ headers: { "content-type": "application/json" },
2147
+ method: "POST"
2148
+ });
2149
+ if (!_ || !(_ instanceof Response))
2150
+ throw new Error("Fetch function did not return a response.");
2151
+ if (_.status !== 200)
2152
+ throw new Error(`Server responded with ${_.status}.`);
2153
+ const b = await _.json();
2154
+ if (b != null && b.payload && L(De, b.payload, !0), et("serververification", b), i() && b.classification === "BAD")
2155
+ throw new Error("SpamFilter returned negative classification.");
2156
+ }
2157
+ function di() {
2158
+ w && "requestSubmit" in w ? w.requestSubmit() : w != null && w.reportValidity() && w.submit();
2159
+ }
2160
+ function Ft(n) {
2161
+ S("expire", n), ce && (clearTimeout(ce), ce = null), n < 1 ? vr() : ce = setTimeout(vr, n);
2162
+ }
2163
+ function $r(n) {
2164
+ S("floating", n), h() !== n && (c(q).style.left = "", c(q).style.top = ""), h(n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : h()), h() ? (r() || r("onsubmit"), document.addEventListener("scroll", _r), document.addEventListener("click", gr), window.addEventListener("resize", br)) : r() === "onsubmit" && r(void 0);
2165
+ }
2166
+ function kr(n) {
2167
+ if (!n.algorithm)
2168
+ throw new Error("Invalid challenge. Property algorithm is missing.");
2169
+ if (n.signature === void 0)
2170
+ throw new Error("Invalid challenge. Property signature is missing.");
2171
+ if (!or.includes(n.algorithm.toUpperCase()))
2172
+ throw new Error(`Unknown algorithm value. Allowed values: ${or.join(", ")}`);
2173
+ if (!n.challenge || n.challenge.length < 40)
2174
+ throw new Error("Challenge is too short. Min. 40 chars.");
2175
+ if (!n.salt || n.salt.length < 10)
2176
+ throw new Error("Salt is too short. Min. 10 chars.");
2177
+ }
2178
+ async function xr(n) {
2179
+ let u = null;
2180
+ if ("Worker" in window) {
2181
+ try {
2182
+ u = await vi(n, n.maxNumber || n.maxnumber || V());
2183
+ } catch (_) {
2184
+ S(_);
2185
+ }
2186
+ if ((u == null ? void 0 : u.number) !== void 0 || "obfuscated" in n)
2187
+ return { data: n, solution: u };
2188
+ }
2189
+ if ("obfuscated" in n) {
2190
+ const _ = await Xl(n.obfuscated, n.key, n.maxNumber || n.maxnumber);
2191
+ return { data: n, solution: await _.promise };
2192
+ }
2193
+ return {
2194
+ data: n,
2195
+ solution: await Zl(n.challenge, n.salt, n.algorithm, n.maxNumber || n.maxnumber || V()).promise
2196
+ };
2197
+ }
2198
+ async function vi(n, u = typeof te() == "number" ? te() : n.maxNumber || n.maxnumber || V(), _ = Math.ceil(je())) {
2199
+ const b = [];
2200
+ _ = Math.min(16, u, Math.max(1, _));
2201
+ for (let p = 0; p < _; p++)
2202
+ b.push(altchaCreateWorker(Qe()));
2203
+ const T = Math.ceil(u / _), E = await Promise.all(b.map((p, $) => {
2204
+ const me = $ * T;
2205
+ return new Promise((Ut) => {
2206
+ p.addEventListener("message", (ot) => {
2207
+ if (ot.data)
2208
+ for (const at of b)
2209
+ at !== p && at.postMessage({ type: "abort" });
2210
+ Ut(ot.data);
2211
+ }), p.postMessage({
2212
+ payload: n,
2213
+ max: me + T,
2214
+ start: me,
2215
+ type: "work"
2216
+ });
2217
+ });
2218
+ }));
2219
+ for (const p of b)
2220
+ p.terminate();
2221
+ return E.find((p) => !!p) || null;
2222
+ }
2223
+ async function rt() {
2224
+ if (!M()) {
2225
+ Le(y.ERROR);
2226
+ return;
2227
+ }
2228
+ const n = Ee.find((u) => u.constructor.pluginName === "obfuscation");
2229
+ if (!n || !("clarify" in n)) {
2230
+ Le(y.ERROR), S("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
2231
+ return;
2232
+ }
2233
+ if ("clarify" in n && typeof n.clarify == "function")
2234
+ return n.clarify();
2235
+ }
2236
+ function Cr(n) {
2237
+ n.obfuscated !== void 0 && M(n.obfuscated), n.auto !== void 0 && (r(n.auto), r() === "onload" && (M() ? rt() : $e())), n.blockspam !== void 0 && i(!!n.blockspam), n.customfetch !== void 0 && a(n.customfetch), n.floatinganchor !== void 0 && v(n.floatinganchor), n.delay !== void 0 && f(n.delay), n.floatingoffset !== void 0 && g(n.floatingoffset), n.floating !== void 0 && $r(n.floating), n.expire !== void 0 && (Ft(n.expire), d(n.expire)), n.challenge && (o(typeof n.challenge == "string" ? n.challenge : JSON.stringify(n.challenge)), kr(c(Pt))), n.challengeurl !== void 0 && l(n.challengeurl), n.debug !== void 0 && s(!!n.debug), n.hidefooter !== void 0 && x(!!n.hidefooter), n.hidelogo !== void 0 && N(!!n.hidelogo), n.maxnumber !== void 0 && V(+n.maxnumber), n.mockerror !== void 0 && W(!!n.mockerror), n.name !== void 0 && j(n.name), n.refetchonexpire !== void 0 && F(!!n.refetchonexpire), n.spamfilter !== void 0 && U(typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && _e(typeof n.strings == "string" ? n.strings : JSON.stringify(n.strings)), n.test !== void 0 && te(typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && be(n.verifyurl), n.workers !== void 0 && je(+n.workers), n.workerurl !== void 0 && Qe(n.workerurl);
2238
+ }
2239
+ function Ar() {
2240
+ return {
2241
+ auto: r(),
2242
+ blockspam: i(),
2243
+ challengeurl: l(),
2244
+ debug: s(),
2245
+ delay: f(),
2246
+ expire: d(),
2247
+ floating: h(),
2248
+ floatinganchor: v(),
2249
+ floatingoffset: g(),
2250
+ hidefooter: x(),
2251
+ hidelogo: N(),
2252
+ name: j(),
2253
+ maxnumber: V(),
2254
+ mockerror: W(),
2255
+ obfuscated: M(),
2256
+ refetchonexpire: F(),
2257
+ spamfilter: U(),
2258
+ strings: c(re),
2259
+ test: te(),
2260
+ verifyurl: be(),
2261
+ workers: je(),
2262
+ workerurl: Qe()
2263
+ };
2264
+ }
2265
+ function Ir() {
2266
+ return Be;
2267
+ }
2268
+ function hi(n) {
2269
+ return Ee.find((u) => u.constructor.pluginName === n);
2270
+ }
2271
+ function Rr() {
2272
+ return c(C);
2273
+ }
2274
+ function Sr() {
2275
+ c(q).style.display = "none";
2276
+ }
2277
+ function nt(n = 20) {
2278
+ if (c(q))
2279
+ if (Be || (Be = (v() ? document.querySelector(v()) : w == null ? void 0 : w.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || w), Be) {
2280
+ const u = parseInt(g(), 10) || 12, _ = Be.getBoundingClientRect(), b = c(q).getBoundingClientRect(), T = document.documentElement.clientHeight, E = document.documentElement.clientWidth, p = h() === "auto" ? _.bottom + b.height + u + n > T : h() === "top", $ = Math.max(n, Math.min(E - n - b.width, _.left + _.width / 2 - b.width / 2));
2281
+ if (p ? c(q).style.top = `${_.top - (b.height + u)}px` : c(q).style.top = `${_.bottom + u}px`, c(q).style.left = `${$}px`, c(q).setAttribute("data-floating", p ? "top" : "bottom"), c(tt)) {
2282
+ const me = c(tt).getBoundingClientRect();
2283
+ c(tt).style.left = _.left - $ + _.width / 2 - me.width / 2 + "px";
2284
+ }
2285
+ } else
2286
+ S("unable to find floating anchor element");
2287
+ }
2288
+ function it(n = y.UNVERIFIED, u = null) {
2289
+ ce && (clearTimeout(ce), ce = null), L(qe, !1), L(De, null), Le(n, u);
2290
+ }
2291
+ function Tr(n) {
2292
+ Be = n;
2293
+ }
2294
+ function Le(n, u = null) {
2295
+ L(C, n, !0), L(He, u, !0), et("statechange", {
2296
+ payload: c(De),
2297
+ state: c(C)
2298
+ });
2299
+ }
2300
+ function Ot() {
2301
+ c(q).style.display = "block", h() && nt();
2302
+ }
2303
+ async function $e() {
2304
+ return it(y.VERIFYING), await new Promise((n) => setTimeout(n, f() || 0)), ni().then((n) => (kr(n), S("challenge", n), xr(n))).then(({ data: n, solution: u }) => {
2305
+ if (S("solution", u), !u || n && "challenge" in n && !("clearText" in u))
2306
+ if ((u == null ? void 0 : u.number) !== void 0 && "challenge" in n) {
2307
+ if (be())
2308
+ return ci(dr(n, u));
2309
+ L(De, dr(n, u), !0), S("payload", c(De));
2310
+ } else
2311
+ throw S("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
2312
+ }).then(() => {
2313
+ Le(y.VERIFIED), S("verified"), pl().then(() => {
2314
+ et("verified", { payload: c(De) });
2315
+ });
2316
+ }).catch((n) => {
2317
+ S(n), Le(y.ERROR, n.message);
2318
+ });
2319
+ }
2320
+ var Nr = so(), Dr = Wr(Nr);
2321
+ Tl(Dr, t, "default", {});
2322
+ var lt = we(Dr, 2), Mt = z(lt), Lr = z(Mt);
2323
+ {
2324
+ var gi = (n) => {
2325
+ var u = zl();
2326
+ ne(n, u);
2327
+ };
2328
+ ke(Lr, (n) => {
2329
+ c(C) === y.VERIFYING && n(gi);
2330
+ });
2331
+ }
2332
+ var mt = we(Lr, 2);
2333
+ let Pr;
2334
+ var Ye = z(mt);
2335
+ Qr(Ye), Ye.__change = si, X(mt);
2336
+ var Vt = we(mt, 2), _i = z(Vt);
2337
+ {
2338
+ var mi = (n) => {
2339
+ var u = Ql(), _ = Wr(u), b = z(_);
2340
+ Ze(b, () => c(re).verified), X(_);
2341
+ var T = we(_, 2);
2342
+ Qr(T), Pe(() => {
2343
+ se(T, "name", j()), Fl(T, c(De));
2344
+ }), ne(n, u);
2345
+ }, wi = (n, u) => {
2346
+ {
2347
+ var _ = (T) => {
2348
+ var E = eo(), p = z(E);
2349
+ Ze(p, () => c(re).verifying), X(E), ne(T, E);
2350
+ }, b = (T) => {
2351
+ var E = to(), p = z(E);
2352
+ Ze(p, () => c(re).label), X(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2353
+ };
2354
+ ke(
2355
+ n,
2356
+ (T) => {
2357
+ c(C) === y.VERIFYING ? T(_) : T(b, !1);
2358
+ },
2359
+ u
2360
+ );
2361
+ }
2362
+ };
2363
+ ke(_i, (n) => {
2364
+ c(C) === y.VERIFIED ? n(mi) : n(wi, !1);
2365
+ });
2366
+ }
2367
+ X(Vt);
2368
+ var pi = we(Vt, 2);
2369
+ {
2370
+ var yi = (n) => {
2371
+ var u = ro(), _ = z(u);
2372
+ se(_, "href", sr), X(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2373
+ };
2374
+ ke(pi, (n) => {
2375
+ (N() !== !0 || c(Lt)) && n(yi);
2376
+ });
2377
+ }
2378
+ X(Mt);
2379
+ var Fr = we(Mt, 2);
2380
+ {
2381
+ var bi = (n) => {
2382
+ var u = lo(), _ = we(z(u), 2);
2383
+ {
2384
+ var b = (E) => {
2385
+ var p = no(), $ = z(p);
2386
+ Ze($, () => c(re).expired), X(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2387
+ }, T = (E) => {
2388
+ var p = io(), $ = z(p);
2389
+ Ze($, () => c(re).error), X(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2390
+ };
2391
+ ke(_, (E) => {
2392
+ c(C) === y.EXPIRED ? E(b) : E(T, !1);
2393
+ });
2394
+ }
2395
+ X(u), ne(n, u);
2396
+ };
2397
+ ke(Fr, (n) => {
2398
+ (c(He) || c(C) === y.EXPIRED) && n(bi);
2399
+ });
2400
+ }
2401
+ var Or = we(Fr, 2);
2402
+ {
2403
+ var Ei = (n) => {
2404
+ var u = oo(), _ = z(u), b = z(_);
2405
+ Ze(b, () => c(re).footer), X(_), X(u), ne(n, u);
2406
+ };
2407
+ ke(Or, (n) => {
2408
+ c(re).footer && (x() !== !0 || c(Lt)) && n(Ei);
2409
+ });
2410
+ }
2411
+ var $i = we(Or, 2);
2412
+ {
2413
+ var ki = (n) => {
2414
+ var u = ao();
2415
+ rn(u, (_) => L(tt, _), () => c(tt)), ne(n, u);
2416
+ };
2417
+ ke($i, (n) => {
2418
+ h() && n(ki);
2419
+ });
2420
+ }
2421
+ return X(lt), rn(lt, (n) => L(q, n), () => c(q)), Pe(
2422
+ (n) => {
2423
+ se(lt, "data-state", c(C)), se(lt, "data-floating", h()), Pr = Dl(mt, 1, "altcha-checkbox", null, Pr, n), se(Ye, "id", c(cr)), Ye.required = r() !== "onsubmit" && (!h() || r() !== "off");
2424
+ },
2425
+ [
2426
+ () => ({
2427
+ "altcha-hidden": c(C) === y.VERIFYING
2428
+ })
2429
+ ]
2430
+ ), Cl("invalid", Ye, yr), Ml(Ye, () => c(qe), (n) => L(qe, n)), ne(e, Nr), Hn({
2431
+ clarify: rt,
2432
+ configure: Cr,
2433
+ getConfiguration: Ar,
2434
+ getFloatingAnchor: Ir,
2435
+ getPlugin: hi,
2436
+ getState: Rr,
2437
+ hide: Sr,
2438
+ repositionFloating: nt,
2439
+ reset: it,
2440
+ setFloatingAnchor: Tr,
2441
+ setState: Le,
2442
+ show: Ot,
2443
+ verify: $e,
2444
+ get auto() {
2445
+ return r();
2446
+ },
2447
+ set auto(n = void 0) {
2448
+ r(n), k();
2449
+ },
2450
+ get blockspam() {
2451
+ return i();
2452
+ },
2453
+ set blockspam(n = void 0) {
2454
+ i(n), k();
2455
+ },
2456
+ get challengeurl() {
2457
+ return l();
2458
+ },
2459
+ set challengeurl(n = void 0) {
2460
+ l(n), k();
2461
+ },
2462
+ get challengejson() {
2463
+ return o();
2464
+ },
2465
+ set challengejson(n = void 0) {
2466
+ o(n), k();
2467
+ },
2468
+ get customfetch() {
2469
+ return a();
2470
+ },
2471
+ set customfetch(n = void 0) {
2472
+ a(n), k();
2473
+ },
2474
+ get debug() {
2475
+ return s();
2476
+ },
2477
+ set debug(n = !1) {
2478
+ s(n), k();
2479
+ },
2480
+ get delay() {
2481
+ return f();
2482
+ },
2483
+ set delay(n = 0) {
2484
+ f(n), k();
2485
+ },
2486
+ get expire() {
2487
+ return d();
2488
+ },
2489
+ set expire(n = void 0) {
2490
+ d(n), k();
2491
+ },
2492
+ get floating() {
2493
+ return h();
2494
+ },
2495
+ set floating(n = void 0) {
2496
+ h(n), k();
2497
+ },
2498
+ get floatinganchor() {
2499
+ return v();
2500
+ },
2501
+ set floatinganchor(n = void 0) {
2502
+ v(n), k();
2503
+ },
2504
+ get floatingoffset() {
2505
+ return g();
2506
+ },
2507
+ set floatingoffset(n = void 0) {
2508
+ g(n), k();
2509
+ },
2510
+ get floatingpersist() {
2511
+ return m();
2512
+ },
2513
+ set floatingpersist(n = !1) {
2514
+ m(n), k();
2515
+ },
2516
+ get hidefooter() {
2517
+ return x();
2518
+ },
2519
+ set hidefooter(n = !1) {
2520
+ x(n), k();
2521
+ },
2522
+ get hidelogo() {
2523
+ return N();
2524
+ },
2525
+ set hidelogo(n = !1) {
2526
+ N(n), k();
2527
+ },
2528
+ get id() {
2529
+ return O();
2530
+ },
2531
+ set id(n = void 0) {
2532
+ O(n), k();
2533
+ },
2534
+ get name() {
2535
+ return j();
2536
+ },
2537
+ set name(n = "altcha") {
2538
+ j(n), k();
2539
+ },
2540
+ get maxnumber() {
2541
+ return V();
2542
+ },
2543
+ set maxnumber(n = 1e6) {
2544
+ V(n), k();
2545
+ },
2546
+ get mockerror() {
2547
+ return W();
2548
+ },
2549
+ set mockerror(n = !1) {
2550
+ W(n), k();
2551
+ },
2552
+ get obfuscated() {
2553
+ return M();
2554
+ },
2555
+ set obfuscated(n = void 0) {
2556
+ M(n), k();
2557
+ },
2558
+ get plugins() {
2559
+ return Ne();
2560
+ },
2561
+ set plugins(n = void 0) {
2562
+ Ne(n), k();
2563
+ },
2564
+ get refetchonexpire() {
2565
+ return F();
2566
+ },
2567
+ set refetchonexpire(n = !0) {
2568
+ F(n), k();
2569
+ },
2570
+ get spamfilter() {
2571
+ return U();
2572
+ },
2573
+ set spamfilter(n = !1) {
2574
+ U(n), k();
2575
+ },
2576
+ get strings() {
2577
+ return _e();
2578
+ },
2579
+ set strings(n = void 0) {
2580
+ _e(n), k();
2581
+ },
2582
+ get test() {
2583
+ return te();
2584
+ },
2585
+ set test(n = !1) {
2586
+ te(n), k();
2587
+ },
2588
+ get verifyurl() {
2589
+ return be();
2590
+ },
2591
+ set verifyurl(n = void 0) {
2592
+ be(n), k();
2593
+ },
2594
+ get workers() {
2595
+ return je();
2596
+ },
2597
+ set workers(n = Math.min(16, navigator.hardwareConcurrency || 8)) {
2598
+ je(n), k();
2599
+ },
2600
+ get workerurl() {
2601
+ return Qe();
2602
+ },
2603
+ set workerurl(n = void 0) {
2604
+ Qe(n), k();
2605
+ }
2606
+ });
2607
+ }
2608
+ Al(["change"]);
2609
+ customElements.define("altcha-widget", Hl(
2610
+ fo,
2611
+ {
2612
+ blockspam: { type: "Boolean" },
2613
+ debug: { type: "Boolean" },
2614
+ delay: { type: "Number" },
2615
+ expire: { type: "Number" },
2616
+ floatingoffset: { type: "Number" },
2617
+ hidefooter: { type: "Boolean" },
2618
+ hidelogo: { type: "Boolean" },
2619
+ maxnumber: { type: "Number" },
2620
+ mockerror: { type: "Boolean" },
2621
+ refetchonexpire: { type: "Boolean" },
2622
+ test: { type: "Boolean" },
2623
+ workers: { type: "Number" },
2624
+ auto: {},
2625
+ challengeurl: {},
2626
+ challengejson: {},
2627
+ customfetch: {},
2628
+ floating: {},
2629
+ floatinganchor: {},
2630
+ floatingpersist: {},
2631
+ id: {},
2632
+ name: {},
2633
+ obfuscated: {},
2634
+ plugins: {},
2635
+ spamfilter: {},
2636
+ strings: {},
2637
+ verifyurl: {},
2638
+ workerurl: {}
2639
+ },
2640
+ ["default"],
2641
+ [
2642
+ "clarify",
2643
+ "configure",
2644
+ "getConfiguration",
2645
+ "getFloatingAnchor",
2646
+ "getPlugin",
2647
+ "getState",
2648
+ "hide",
2649
+ "repositionFloating",
2650
+ "reset",
2651
+ "setFloatingAnchor",
2652
+ "setState",
2653
+ "show",
2654
+ "verify"
2655
+ ],
2656
+ !1
2657
+ ));
2658
+ globalThis.altchaCreateWorker = (e) => new Worker(new URL(e || "./worker.js", import.meta.url));
2659
+ globalThis.altchaPlugins = globalThis.altchaPlugins || [];
2660
+ export {
2661
+ fo as Altcha
2662
+ };