@riverbankcms/sdk 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +54 -0
  2. package/dist/client/bookings.d.mts +2 -0
  3. package/dist/client/bookings.d.ts +2 -0
  4. package/dist/client/bookings.js +2956 -104
  5. package/dist/client/bookings.js.map +1 -1
  6. package/dist/client/bookings.mjs +2929 -70
  7. package/dist/client/bookings.mjs.map +1 -1
  8. package/dist/client/client.d.mts +2 -2
  9. package/dist/client/client.d.ts +2 -2
  10. package/dist/client/client.js +80 -11
  11. package/dist/client/client.js.map +1 -1
  12. package/dist/client/client.mjs +87 -11
  13. package/dist/client/client.mjs.map +1 -1
  14. package/dist/client/hooks.d.mts +2 -2
  15. package/dist/client/hooks.d.ts +2 -2
  16. package/dist/client/rendering/client.js +3070 -259
  17. package/dist/client/rendering/client.js.map +1 -1
  18. package/dist/client/rendering/client.mjs +3212 -395
  19. package/dist/client/rendering/client.mjs.map +1 -1
  20. package/dist/client/spam-protection.d.mts +55 -0
  21. package/dist/client/spam-protection.d.ts +55 -0
  22. package/dist/client/spam-protection.js +2915 -0
  23. package/dist/client/spam-protection.js.map +1 -0
  24. package/dist/client/spam-protection.mjs +2893 -0
  25. package/dist/client/spam-protection.mjs.map +1 -0
  26. package/dist/client/{usePage-Db9kzA41.d.ts → usePage-BYmJCCm1.d.ts} +14 -2
  27. package/dist/client/{usePage-C9tJpuKa.d.mts → usePage-DZtrWajy.d.mts} +14 -2
  28. package/dist/server/{Layout-Ce7PU9I5.d.ts → Layout-Yluyb6sK.d.ts} +1 -1
  29. package/dist/server/{Layout-WllR8Zug.d.mts → Layout-qWLdVm5-.d.mts} +1 -1
  30. package/dist/server/chunk-2IZ6S225.js +122 -0
  31. package/dist/server/chunk-2IZ6S225.js.map +1 -0
  32. package/dist/server/chunk-4CV4JOE5.js +27 -0
  33. package/dist/server/chunk-4CV4JOE5.js.map +1 -0
  34. package/dist/server/{chunk-AET56TQX.mjs → chunk-5LRR64Y6.mjs} +32 -5
  35. package/dist/server/chunk-5LRR64Y6.mjs.map +1 -0
  36. package/dist/server/{chunk-HMENX4Y7.js → chunk-6Z4MQG47.js} +370 -49
  37. package/dist/server/chunk-6Z4MQG47.js.map +1 -0
  38. package/dist/server/{chunk-5JT452F2.mjs → chunk-JNU7ZS2V.mjs} +340 -19
  39. package/dist/server/chunk-JNU7ZS2V.mjs.map +1 -0
  40. package/dist/server/{chunk-VODFQMUW.js → chunk-NBTRDLCM.js} +32 -5
  41. package/dist/server/chunk-NBTRDLCM.js.map +1 -0
  42. package/dist/server/chunk-NFEGQTCC.mjs +27 -0
  43. package/dist/server/chunk-PPHZV6YD.mjs +122 -0
  44. package/dist/server/chunk-PPHZV6YD.mjs.map +1 -0
  45. package/dist/server/{components-RPzRQve6.d.mts → components-DNHfSCML.d.mts} +3 -3
  46. package/dist/server/{components--LT61IKp.d.ts → components-Di5ME6He.d.ts} +3 -3
  47. package/dist/server/components.d.mts +5 -5
  48. package/dist/server/components.d.ts +5 -5
  49. package/dist/server/components.js +1 -0
  50. package/dist/server/components.js.map +1 -1
  51. package/dist/server/components.mjs +1 -0
  52. package/dist/server/config-validation.js +1 -0
  53. package/dist/server/config-validation.js.map +1 -1
  54. package/dist/server/config-validation.mjs +1 -0
  55. package/dist/server/config.js +1 -0
  56. package/dist/server/config.js.map +1 -1
  57. package/dist/server/config.mjs +1 -0
  58. package/dist/server/config.mjs.map +1 -1
  59. package/dist/server/data.d.mts +2 -2
  60. package/dist/server/data.d.ts +2 -2
  61. package/dist/server/data.js +1 -0
  62. package/dist/server/data.js.map +1 -1
  63. package/dist/server/data.mjs +1 -0
  64. package/dist/server/env.d.mts +91 -5
  65. package/dist/server/env.d.ts +91 -5
  66. package/dist/server/env.js +9 -2
  67. package/dist/server/env.js.map +1 -1
  68. package/dist/server/env.mjs +8 -1
  69. package/dist/server/{index-BL66CU6d.d.mts → index--Oyunk_B.d.mts} +2 -2
  70. package/dist/server/{index-CJk9iQQW.d.ts → index-C9Ra8dza.d.ts} +2 -2
  71. package/dist/server/{index-Bkva0WAj.d.mts → index-Clm3skz_.d.mts} +1 -1
  72. package/dist/server/{index-CSBWKA3r.d.ts → index-DLvNddi-.d.ts} +1 -1
  73. package/dist/server/index.d.mts +215 -4
  74. package/dist/server/index.d.ts +215 -4
  75. package/dist/server/index.js +301 -3
  76. package/dist/server/index.js.map +1 -1
  77. package/dist/server/index.mjs +301 -3
  78. package/dist/server/index.mjs.map +1 -1
  79. package/dist/server/{loadContent-CXUWMuzY.d.ts → loadContent-D7LQwI0o.d.ts} +3 -3
  80. package/dist/server/{loadContent-F_tAS0Nl.d.mts → loadContent-DVfuBLiZ.d.mts} +3 -3
  81. package/dist/server/{loadPage-6I7F6GRF.js → loadPage-AXNAERDS.js} +2 -1
  82. package/dist/server/loadPage-AXNAERDS.js.map +1 -0
  83. package/dist/server/{loadPage-i2r-X5b9.d.ts → loadPage-BmYJCe_V.d.ts} +2 -2
  84. package/dist/server/{loadPage-CxlYLe5K.d.mts → loadPage-BucnLHmE.d.mts} +2 -2
  85. package/dist/server/{loadPage-JI2SML4M.mjs → loadPage-XR7ORQ2E.mjs} +2 -1
  86. package/dist/server/loadPage-XR7ORQ2E.mjs.map +1 -0
  87. package/dist/server/metadata.d.mts +4 -4
  88. package/dist/server/metadata.d.ts +4 -4
  89. package/dist/server/metadata.js +1 -0
  90. package/dist/server/metadata.js.map +1 -1
  91. package/dist/server/metadata.mjs +1 -0
  92. package/dist/server/navigation.d.mts +2 -2
  93. package/dist/server/navigation.d.ts +2 -2
  94. package/dist/server/navigation.js +1 -0
  95. package/dist/server/navigation.js.map +1 -1
  96. package/dist/server/navigation.mjs +1 -0
  97. package/dist/server/next/revalidate.js +5 -4
  98. package/dist/server/next/revalidate.js.map +1 -1
  99. package/dist/server/next/revalidate.mjs +3 -2
  100. package/dist/server/next/revalidate.mjs.map +1 -1
  101. package/dist/server/next/tags.d.mts +3 -0
  102. package/dist/server/next/tags.d.ts +3 -0
  103. package/dist/server/next/tags.js +3 -1
  104. package/dist/server/next/tags.js.map +1 -1
  105. package/dist/server/next/tags.mjs +2 -0
  106. package/dist/server/next/tags.mjs.map +1 -1
  107. package/dist/server/next.d.mts +5 -5
  108. package/dist/server/next.d.ts +5 -5
  109. package/dist/server/next.js +5 -4
  110. package/dist/server/next.js.map +1 -1
  111. package/dist/server/next.mjs +3 -2
  112. package/dist/server/next.mjs.map +1 -1
  113. package/dist/server/rendering/server.d.mts +4 -4
  114. package/dist/server/rendering/server.d.ts +4 -4
  115. package/dist/server/rendering/server.js +1 -0
  116. package/dist/server/rendering/server.js.map +1 -1
  117. package/dist/server/rendering/server.mjs +1 -0
  118. package/dist/server/rendering.d.mts +7 -7
  119. package/dist/server/rendering.d.ts +7 -7
  120. package/dist/server/rendering.js +1 -0
  121. package/dist/server/rendering.js.map +1 -1
  122. package/dist/server/rendering.mjs +1 -0
  123. package/dist/server/routing.d.mts +3 -3
  124. package/dist/server/routing.d.ts +3 -3
  125. package/dist/server/routing.js +4 -2
  126. package/dist/server/routing.js.map +1 -1
  127. package/dist/server/routing.mjs +3 -1
  128. package/dist/server/routing.mjs.map +1 -1
  129. package/dist/server/server.d.mts +5 -5
  130. package/dist/server/server.d.ts +5 -5
  131. package/dist/server/server.js +3 -2
  132. package/dist/server/server.js.map +1 -1
  133. package/dist/server/server.mjs +2 -1
  134. package/dist/server/theme-bridge.js +1 -0
  135. package/dist/server/theme-bridge.js.map +1 -1
  136. package/dist/server/theme-bridge.mjs +1 -0
  137. package/dist/server/theme-bridge.mjs.map +1 -1
  138. package/dist/server/theme.js +3 -1
  139. package/dist/server/theme.js.map +1 -1
  140. package/dist/server/theme.mjs +2 -0
  141. package/dist/server/theme.mjs.map +1 -1
  142. package/dist/server/{types-DnkRh0UL.d.ts → types-BRQyLrQU.d.ts} +14 -2
  143. package/dist/server/{types-Dsu9wsUh.d.mts → types-BSV6Vc-P.d.mts} +2 -2
  144. package/dist/server/{types-MF2AWoKv.d.mts → types-C-LShyIg.d.mts} +14 -2
  145. package/dist/server/{types-CVykEqXN.d.ts → types-Dt98DeYa.d.ts} +2 -2
  146. package/dist/server/webhooks.d.mts +8 -2
  147. package/dist/server/webhooks.d.ts +8 -2
  148. package/dist/server/webhooks.js +3 -2
  149. package/dist/server/webhooks.js.map +1 -1
  150. package/dist/server/webhooks.mjs +2 -1
  151. package/package.json +7 -1
  152. package/dist/client/resolver-BhueZVxZ.d.mts +0 -61
  153. package/dist/client/resolver-BhueZVxZ.d.ts +0 -61
  154. package/dist/client/usePage--fGlyrgj.d.mts +0 -6439
  155. package/dist/client/usePage-BBcFCxOU.d.ts +0 -6297
  156. package/dist/client/usePage-BC8Q2E3t.d.mts +0 -6431
  157. package/dist/client/usePage-BTPnCuWC.d.mts +0 -6511
  158. package/dist/client/usePage-BXjk8BhD.d.mts +0 -6704
  159. package/dist/client/usePage-BafOS9UT.d.mts +0 -6512
  160. package/dist/client/usePage-BcjWPXvh.d.mts +0 -6388
  161. package/dist/client/usePage-BiOReg0_.d.ts +0 -6704
  162. package/dist/client/usePage-Bnx-kA6x.d.mts +0 -6670
  163. package/dist/client/usePage-BvKAa3Zw.d.mts +0 -366
  164. package/dist/client/usePage-BvKAa3Zw.d.ts +0 -366
  165. package/dist/client/usePage-BydHcMYB.d.mts +0 -6297
  166. package/dist/client/usePage-C3ZKNwY7.d.mts +0 -6393
  167. package/dist/client/usePage-CE7X5NcN.d.ts +0 -6439
  168. package/dist/client/usePage-CHEybPMD.d.ts +0 -6429
  169. package/dist/client/usePage-CrKw1H6Y.d.ts +0 -6338
  170. package/dist/client/usePage-CyYpOJud.d.ts +0 -6388
  171. package/dist/client/usePage-D4fxZbRR.d.mts +0 -6429
  172. package/dist/client/usePage-DMI8ImsU.d.mts +0 -6338
  173. package/dist/client/usePage-DoPI6b8V.d.ts +0 -6511
  174. package/dist/client/usePage-DpRNZUtP.d.ts +0 -6431
  175. package/dist/client/usePage-QNWArrVO.d.ts +0 -6670
  176. package/dist/client/usePage-fBgPB6Oq.d.ts +0 -6512
  177. package/dist/client/usePage-gpVaeWDy.d.ts +0 -6393
  178. package/dist/server/chunk-5JT452F2.mjs.map +0 -1
  179. package/dist/server/chunk-AET56TQX.mjs.map +0 -1
  180. package/dist/server/chunk-HMENX4Y7.js.map +0 -1
  181. package/dist/server/chunk-LQUKXIW7.mjs +0 -13
  182. package/dist/server/chunk-LQUKXIW7.mjs.map +0 -1
  183. package/dist/server/chunk-VODFQMUW.js.map +0 -1
  184. package/dist/server/chunk-WYNEYDXO.js +0 -13
  185. package/dist/server/chunk-WYNEYDXO.js.map +0 -1
  186. package/dist/server/loadPage-6I7F6GRF.js.map +0 -1
  187. /package/dist/server/{loadPage-JI2SML4M.mjs.map → chunk-NFEGQTCC.mjs.map} +0 -0
@@ -7,27 +7,2785 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __esm = (fn2, res) => function __init() {
11
+ return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
12
+ };
10
13
  var __export = (target, all) => {
11
14
  for (var name in all)
12
15
  __defProp(target, name, { get: all[name], enumerable: true });
13
16
  };
14
- var __copyProps = (to, from, except, desc) => {
17
+ var __copyProps = (to2, from, except, desc) => {
15
18
  if (from && typeof from === "object" || typeof from === "function") {
16
19
  for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ if (!__hasOwnProp.call(to2, key) && key !== except)
21
+ __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to2;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+
35
+ // ../../node_modules/.pnpm/altcha@1.5.1/node_modules/altcha/dist/altcha.js
36
+ var altcha_exports = {};
37
+ __export(altcha_exports, {
38
+ Altcha: () => ha
39
+ });
40
+ function Si(e2) {
41
+ let t2;
42
+ try {
43
+ if (t2 = qr && (self.URL || self.webkitURL).createObjectURL(qr), !t2) throw "";
44
+ const r3 = new Worker(t2, {
45
+ name: e2 == null ? void 0 : e2.name
46
+ });
47
+ return r3.addEventListener("error", () => {
48
+ (self.URL || self.webkitURL).revokeObjectURL(t2);
49
+ }), r3;
50
+ } catch {
51
+ return new Worker(
52
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(ln),
53
+ {
54
+ name: e2 == null ? void 0 : e2.name
55
+ }
56
+ );
57
+ } finally {
58
+ t2 && (self.URL || self.webkitURL).revokeObjectURL(t2);
59
+ }
60
+ }
61
+ function un(e2) {
62
+ throw new Error("https://svelte.dev/e/lifecycle_outside_component");
63
+ }
64
+ function hn(e2) {
65
+ for (var t2 = 0; t2 < e2.length; t2++)
66
+ e2[t2]();
67
+ }
68
+ function Gi(e2) {
69
+ throw new Error("https://svelte.dev/e/effect_in_teardown");
70
+ }
71
+ function Zi() {
72
+ throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
73
+ }
74
+ function Ji(e2) {
75
+ throw new Error("https://svelte.dev/e/effect_orphan");
76
+ }
77
+ function Ki() {
78
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
79
+ }
80
+ function zi() {
81
+ throw new Error("https://svelte.dev/e/hydration_failed");
82
+ }
83
+ function Xi(e2) {
84
+ throw new Error("https://svelte.dev/e/props_invalid_value");
85
+ }
86
+ function Qi() {
87
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
88
+ }
89
+ function eo() {
90
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
91
+ }
92
+ function to() {
93
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
94
+ }
95
+ function Tt(e2) {
96
+ console.warn("https://svelte.dev/e/hydration_mismatch");
97
+ }
98
+ function Ze(e2) {
99
+ L = e2;
100
+ }
101
+ function Re(e2) {
102
+ if (e2 === null)
103
+ throw Tt(), Je;
104
+ return P = e2;
105
+ }
106
+ function ze() {
107
+ return Re(
108
+ /** @type {TemplateNode} */
109
+ /* @__PURE__ */ Te(P)
110
+ );
111
+ }
112
+ function z(e2) {
113
+ if (L) {
114
+ if (/* @__PURE__ */ Te(P) !== null)
115
+ throw Tt(), Je;
116
+ P = e2;
117
+ }
118
+ }
119
+ function ro() {
120
+ for (var e2 = 0, t2 = P; ; ) {
121
+ if (t2.nodeType === 8) {
122
+ var r3 = (
123
+ /** @type {Comment} */
124
+ t2.data
125
+ );
126
+ if (r3 === fn) {
127
+ if (e2 === 0) return t2;
128
+ e2 -= 1;
129
+ } else (r3 === zt || r3 === sn) && (e2 += 1);
130
+ }
131
+ var i2 = (
132
+ /** @type {TemplateNode} */
133
+ /* @__PURE__ */ Te(t2)
134
+ );
135
+ t2.remove(), t2 = i2;
136
+ }
137
+ }
138
+ function ke(e2) {
139
+ if (typeof e2 != "object" || e2 === null || ut in e2)
140
+ return e2;
141
+ const t2 = dn(e2);
142
+ if (t2 !== Bi && t2 !== qi)
143
+ return e2;
144
+ var r3 = /* @__PURE__ */ new Map(), i2 = cn(e2), o2 = /* @__PURE__ */ J(0), a2 = R, l2 = (s2) => {
145
+ var f2 = R;
146
+ ve(a2);
147
+ var d2 = s2();
148
+ return ve(f2), d2;
149
+ };
150
+ return i2 && r3.set("length", /* @__PURE__ */ J(
151
+ /** @type {any[]} */
152
+ e2.length
153
+ )), new Proxy(
154
+ /** @type {any} */
155
+ e2,
156
+ {
157
+ defineProperty(s2, f2, d2) {
158
+ (!("value" in d2) || d2.configurable === false || d2.enumerable === false || d2.writable === false) && Qi();
159
+ var v2 = r3.get(f2);
160
+ return v2 === void 0 ? (v2 = l2(() => /* @__PURE__ */ J(d2.value)), r3.set(f2, v2)) : D(
161
+ v2,
162
+ l2(() => ke(d2.value))
163
+ ), true;
164
+ },
165
+ deleteProperty(s2, f2) {
166
+ var d2 = r3.get(f2);
167
+ if (d2 === void 0)
168
+ f2 in s2 && (r3.set(
169
+ f2,
170
+ l2(() => /* @__PURE__ */ J(Z))
171
+ ), qt(o2));
172
+ else {
173
+ if (i2 && typeof f2 == "string") {
174
+ var v2 = (
175
+ /** @type {Source<number>} */
176
+ r3.get("length")
177
+ ), h2 = Number(f2);
178
+ Number.isInteger(h2) && h2 < v2.v && D(v2, h2);
179
+ }
180
+ D(d2, Z), qt(o2);
181
+ }
182
+ return true;
183
+ },
184
+ get(s2, f2, d2) {
185
+ var m2;
186
+ if (f2 === ut)
187
+ return e2;
188
+ var v2 = r3.get(f2), h2 = f2 in s2;
189
+ if (v2 === void 0 && (!h2 || (m2 = Oe(s2, f2)) != null && m2.writable) && (v2 = l2(() => /* @__PURE__ */ J(ke(h2 ? s2[f2] : Z))), r3.set(f2, v2)), v2 !== void 0) {
190
+ var g2 = c(v2);
191
+ return g2 === Z ? void 0 : g2;
192
+ }
193
+ return Reflect.get(s2, f2, d2);
194
+ },
195
+ getOwnPropertyDescriptor(s2, f2) {
196
+ var d2 = Reflect.getOwnPropertyDescriptor(s2, f2);
197
+ if (d2 && "value" in d2) {
198
+ var v2 = r3.get(f2);
199
+ v2 && (d2.value = c(v2));
200
+ } else if (d2 === void 0) {
201
+ var h2 = r3.get(f2), g2 = h2 == null ? void 0 : h2.v;
202
+ if (h2 !== void 0 && g2 !== Z)
203
+ return {
204
+ enumerable: true,
205
+ configurable: true,
206
+ value: g2,
207
+ writable: true
208
+ };
209
+ }
210
+ return d2;
211
+ },
212
+ has(s2, f2) {
213
+ var g2;
214
+ if (f2 === ut)
215
+ return true;
216
+ var d2 = r3.get(f2), v2 = d2 !== void 0 && d2.v !== Z || Reflect.has(s2, f2);
217
+ if (d2 !== void 0 || I !== null && (!v2 || (g2 = Oe(s2, f2)) != null && g2.writable)) {
218
+ d2 === void 0 && (d2 = l2(() => /* @__PURE__ */ J(v2 ? ke(s2[f2]) : Z)), r3.set(f2, d2));
219
+ var h2 = c(d2);
220
+ if (h2 === Z)
221
+ return false;
222
+ }
223
+ return v2;
224
+ },
225
+ set(s2, f2, d2, v2) {
226
+ var U2;
227
+ var h2 = r3.get(f2), g2 = f2 in s2;
228
+ if (i2 && f2 === "length")
229
+ for (var m2 = d2; m2 < /** @type {Source<number>} */
230
+ h2.v; m2 += 1) {
231
+ var k = r3.get(m2 + "");
232
+ k !== void 0 ? D(k, Z) : m2 in s2 && (k = l2(() => /* @__PURE__ */ J(Z)), r3.set(m2 + "", k));
233
+ }
234
+ h2 === void 0 ? (!g2 || (U2 = Oe(s2, f2)) != null && U2.writable) && (h2 = l2(() => /* @__PURE__ */ J(void 0)), D(
235
+ h2,
236
+ l2(() => ke(d2))
237
+ ), r3.set(f2, h2)) : (g2 = h2.v !== Z, D(
238
+ h2,
239
+ l2(() => ke(d2))
240
+ ));
241
+ var N = Reflect.getOwnPropertyDescriptor(s2, f2);
242
+ if (N != null && N.set && N.set.call(v2, d2), !g2) {
243
+ if (i2 && typeof f2 == "string") {
244
+ var F2 = (
245
+ /** @type {Source<number>} */
246
+ r3.get("length")
247
+ ), V2 = Number(f2);
248
+ Number.isInteger(V2) && V2 >= F2.v && D(F2, V2 + 1);
249
+ }
250
+ qt(o2);
251
+ }
252
+ return true;
253
+ },
254
+ ownKeys(s2) {
255
+ c(o2);
256
+ var f2 = Reflect.ownKeys(s2).filter((h2) => {
257
+ var g2 = r3.get(h2);
258
+ return g2 === void 0 || g2.v !== Z;
259
+ });
260
+ for (var [d2, v2] of r3)
261
+ v2.v !== Z && !(d2 in s2) && f2.push(d2);
262
+ return f2;
263
+ },
264
+ setPrototypeOf() {
265
+ eo();
266
+ }
267
+ }
268
+ );
269
+ }
270
+ function qt(e2, t2 = 1) {
271
+ D(e2, e2.v + t2);
272
+ }
273
+ function Wt() {
274
+ if (Yr === void 0) {
275
+ Yr = window, mn = /Firefox/.test(navigator.userAgent);
276
+ var e2 = Element.prototype, t2 = Node.prototype, r3 = Text.prototype;
277
+ wn = Oe(t2, "firstChild").get, pn = Oe(t2, "nextSibling").get, Wr(e2) && (e2.__click = void 0, e2.__className = void 0, e2.__attributes = null, e2.__style = void 0, e2.__e = void 0), Wr(r3) && (r3.__t = void 0);
278
+ }
279
+ }
280
+ function er(e2 = "") {
281
+ return document.createTextNode(e2);
282
+ }
283
+ // @__NO_SIDE_EFFECTS__
284
+ function ae(e2) {
285
+ return wn.call(e2);
286
+ }
287
+ // @__NO_SIDE_EFFECTS__
288
+ function Te(e2) {
289
+ return pn.call(e2);
290
+ }
291
+ function X(e2, t2) {
292
+ if (!L)
293
+ return /* @__PURE__ */ ae(e2);
294
+ var r3 = (
295
+ /** @type {TemplateNode} */
296
+ /* @__PURE__ */ ae(P)
297
+ );
298
+ return r3 === null && (r3 = P.appendChild(er())), Re(r3), r3;
299
+ }
300
+ function Gr(e2, t2) {
301
+ if (!L) {
302
+ var r3 = (
303
+ /** @type {DocumentFragment} */
304
+ /* @__PURE__ */ ae(
305
+ /** @type {Node} */
306
+ e2
307
+ )
308
+ );
309
+ return r3 instanceof Comment && r3.data === "" ? /* @__PURE__ */ Te(r3) : r3;
310
+ }
311
+ return P;
312
+ }
313
+ function we(e2, t2 = 1, r3 = false) {
314
+ let i2 = L ? P : e2;
315
+ for (var o2; t2--; )
316
+ o2 = i2, i2 = /** @type {TemplateNode} */
317
+ /* @__PURE__ */ Te(i2);
318
+ if (!L)
319
+ return i2;
320
+ var a2 = i2 == null ? void 0 : i2.nodeType;
321
+ if (r3 && a2 !== 3) {
322
+ var l2 = er();
323
+ return i2 === null ? o2 == null || o2.after(l2) : i2.before(l2), Re(l2), l2;
324
+ }
325
+ return Re(i2), /** @type {TemplateNode} */
326
+ i2;
327
+ }
328
+ function io(e2) {
329
+ e2.textContent = "";
330
+ }
331
+ function bn(e2) {
332
+ return e2 === this.v;
333
+ }
334
+ function oo(e2, t2) {
335
+ return e2 != e2 ? t2 == t2 : e2 !== t2 || e2 !== null && typeof e2 == "object" || typeof e2 == "function";
336
+ }
337
+ function yn(e2) {
338
+ return !oo(e2, this.v);
339
+ }
340
+ // @__NO_SIDE_EFFECTS__
341
+ function tr(e2) {
342
+ var t2 = fe | he, r3 = R !== null && (R.f & fe) !== 0 ? (
343
+ /** @type {Derived} */
344
+ R
345
+ ) : null;
346
+ return I === null || r3 !== null && (r3.f & ee) !== 0 ? t2 |= ee : I.f |= gn, {
347
+ ctx: W,
348
+ deps: null,
349
+ effects: null,
350
+ equals: bn,
351
+ f: t2,
352
+ fn: e2,
353
+ reactions: null,
354
+ rv: 0,
355
+ v: (
356
+ /** @type {V} */
357
+ null
358
+ ),
359
+ wv: 0,
360
+ parent: r3 ?? I
361
+ };
362
+ }
363
+ // @__NO_SIDE_EFFECTS__
364
+ function st(e2) {
365
+ const t2 = /* @__PURE__ */ tr(e2);
366
+ return On(t2), t2;
367
+ }
368
+ function En(e2) {
369
+ var t2 = e2.effects;
370
+ if (t2 !== null) {
371
+ e2.effects = null;
372
+ for (var r3 = 0; r3 < t2.length; r3 += 1)
373
+ Ie(
374
+ /** @type {Effect} */
375
+ t2[r3]
376
+ );
377
+ }
378
+ }
379
+ function ao(e2) {
380
+ for (var t2 = e2.parent; t2 !== null; ) {
381
+ if ((t2.f & fe) === 0)
382
+ return (
383
+ /** @type {Effect} */
384
+ t2
385
+ );
386
+ t2 = t2.parent;
387
+ }
388
+ return null;
389
+ }
390
+ function xn(e2) {
391
+ var t2, r3 = I;
392
+ Se(ao(e2));
393
+ try {
394
+ En(e2), t2 = jn(e2);
395
+ } finally {
396
+ Se(r3);
397
+ }
398
+ return t2;
399
+ }
400
+ function $n(e2) {
401
+ var t2 = xn(e2), r3 = (Ce || (e2.f & ee) !== 0) && e2.deps !== null ? Ue : K;
402
+ ue(e2, r3), e2.equals(t2) || (e2.v = t2, e2.wv = Mn());
403
+ }
404
+ function lo(e2) {
405
+ I === null && R === null && Ji(), R !== null && (R.f & ee) !== 0 && I === null && Zi(), gt && Gi();
406
+ }
407
+ function so(e2, t2) {
408
+ var r3 = t2.last;
409
+ r3 === null ? t2.last = t2.first = e2 : (r3.next = e2, e2.prev = r3, t2.last = e2);
410
+ }
411
+ function je(e2, t2, r3, i2 = true) {
412
+ var o2 = I, a2 = {
413
+ ctx: W,
414
+ deps: null,
415
+ nodes_start: null,
416
+ nodes_end: null,
417
+ f: e2 | he,
418
+ first: null,
419
+ fn: t2,
420
+ last: null,
421
+ next: null,
422
+ parent: o2,
423
+ prev: null,
424
+ teardown: null,
425
+ transitions: null,
426
+ wv: 0
427
+ };
428
+ if (r3)
429
+ try {
430
+ ir(a2), a2.f |= Hi;
431
+ } catch (f2) {
432
+ throw Ie(a2), f2;
433
+ }
434
+ else t2 !== null && Lt(a2);
435
+ var l2 = r3 && a2.deps === null && a2.first === null && a2.nodes_start === null && a2.teardown === null && (a2.f & (gn | xt)) === 0;
436
+ if (!l2 && i2 && (o2 !== null && so(a2, o2), R !== null && (R.f & fe) !== 0)) {
437
+ var s2 = (
438
+ /** @type {Derived} */
439
+ R
440
+ );
441
+ (s2.effects ?? (s2.effects = [])).push(a2);
442
+ }
443
+ return a2;
444
+ }
445
+ function kn(e2) {
446
+ const t2 = je(It, null, false);
447
+ return ue(t2, K), t2.teardown = e2, t2;
448
+ }
449
+ function Yt(e2) {
450
+ lo();
451
+ var t2 = I !== null && (I.f & be) !== 0 && W !== null && !W.m;
452
+ if (t2) {
453
+ var r3 = (
454
+ /** @type {ComponentContext} */
455
+ W
456
+ );
457
+ (r3.e ?? (r3.e = [])).push({
458
+ fn: e2,
459
+ effect: I,
460
+ reaction: R
461
+ });
462
+ } else {
463
+ var i2 = rr(e2);
464
+ return i2;
465
+ }
466
+ }
467
+ function fo(e2) {
468
+ const t2 = je(Me, e2, true);
469
+ return () => {
470
+ Ie(t2);
471
+ };
472
+ }
473
+ function uo(e2) {
474
+ const t2 = je(Me, e2, true);
475
+ return (r3 = {}) => new Promise((i2) => {
476
+ r3.outro ? Zt(t2, () => {
477
+ Ie(t2), i2(void 0);
478
+ }) : (Ie(t2), i2(void 0));
479
+ });
480
+ }
481
+ function rr(e2) {
482
+ return je(vn, e2, false);
483
+ }
484
+ function nr(e2) {
485
+ return je(It, e2, true);
486
+ }
487
+ function Pe(e2, t2 = [], r3 = tr) {
488
+ const i2 = t2.map(r3);
489
+ return Cn(() => e2(...i2.map(c)));
490
+ }
491
+ function Cn(e2, t2 = 0) {
492
+ return je(It | Xt | t2, e2, true);
493
+ }
494
+ function Gt(e2, t2 = true) {
495
+ return je(It | be, e2, true, t2);
496
+ }
497
+ function An(e2) {
498
+ var t2 = e2.teardown;
499
+ if (t2 !== null) {
500
+ const r3 = gt, i2 = R;
501
+ Jr(true), ve(null);
502
+ try {
503
+ t2.call(null);
504
+ } finally {
505
+ Jr(r3), ve(i2);
506
+ }
507
+ }
508
+ }
509
+ function Rn(e2, t2 = false) {
510
+ var r3 = e2.first;
511
+ for (e2.first = e2.last = null; r3 !== null; ) {
512
+ var i2 = r3.next;
513
+ (r3.f & Me) !== 0 ? r3.parent = null : Ie(r3, t2), r3 = i2;
514
+ }
515
+ }
516
+ function co(e2) {
517
+ for (var t2 = e2.first; t2 !== null; ) {
518
+ var r3 = t2.next;
519
+ (t2.f & be) === 0 && Ie(t2), t2 = r3;
520
+ }
521
+ }
522
+ function Ie(e2, t2 = true) {
523
+ var r3 = false;
524
+ (t2 || (e2.f & Wi) !== 0) && e2.nodes_start !== null && (In(
525
+ e2.nodes_start,
526
+ /** @type {TemplateNode} */
527
+ e2.nodes_end
528
+ ), r3 = true), Rn(e2, t2 && !r3), Rt(e2, 0), ue(e2, St);
529
+ var i2 = e2.transitions;
530
+ if (i2 !== null)
531
+ for (const a2 of i2)
532
+ a2.stop();
533
+ An(e2);
534
+ var o2 = e2.parent;
535
+ o2 !== null && o2.first !== null && Sn(e2), e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = null;
536
+ }
537
+ function In(e2, t2) {
538
+ for (; e2 !== null; ) {
539
+ var r3 = e2 === t2 ? null : (
540
+ /** @type {TemplateNode} */
541
+ /* @__PURE__ */ Te(e2)
542
+ );
543
+ e2.remove(), e2 = r3;
544
+ }
545
+ }
546
+ function Sn(e2) {
547
+ var t2 = e2.parent, r3 = e2.prev, i2 = e2.next;
548
+ r3 !== null && (r3.next = i2), i2 !== null && (i2.prev = r3), t2 !== null && (t2.first === e2 && (t2.first = i2), t2.last === e2 && (t2.last = r3));
549
+ }
550
+ function Zt(e2, t2) {
551
+ var r3 = [];
552
+ Tn(e2, r3, true), ho(r3, () => {
553
+ Ie(e2), t2 && t2();
554
+ });
555
+ }
556
+ function ho(e2, t2) {
557
+ var r3 = e2.length;
558
+ if (r3 > 0) {
559
+ var i2 = () => --r3 || t2();
560
+ for (var o2 of e2)
561
+ o2.out(i2);
562
+ } else
563
+ t2();
564
+ }
565
+ function Tn(e2, t2, r3) {
566
+ if ((e2.f & Ke) === 0) {
567
+ if (e2.f ^= Ke, e2.transitions !== null)
568
+ for (const l2 of e2.transitions)
569
+ (l2.is_global || r3) && t2.push(l2);
570
+ for (var i2 = e2.first; i2 !== null; ) {
571
+ var o2 = i2.next, a2 = (i2.f & Qt) !== 0 || (i2.f & be) !== 0;
572
+ Tn(i2, t2, a2 ? r3 : false), i2 = o2;
573
+ }
574
+ }
575
+ }
576
+ function Zr(e2) {
577
+ Nn(e2, true);
578
+ }
579
+ function Nn(e2, t2) {
580
+ if ((e2.f & Ke) !== 0) {
581
+ e2.f ^= Ke, (e2.f & K) === 0 && (e2.f ^= K), _t(e2) && (ue(e2, he), Lt(e2));
582
+ for (var r3 = e2.first; r3 !== null; ) {
583
+ var i2 = r3.next, o2 = (r3.f & Qt) !== 0 || (r3.f & be) !== 0;
584
+ Nn(r3, o2 ? t2 : false), r3 = i2;
585
+ }
586
+ if (e2.transitions !== null)
587
+ for (const a2 of e2.transitions)
588
+ (a2.is_global || t2) && a2.in();
589
+ }
590
+ }
591
+ function Ln() {
592
+ var e2 = dt;
593
+ dt = [], hn(e2);
594
+ }
595
+ function Dn() {
596
+ var e2 = ht;
597
+ ht = [], hn(e2);
598
+ }
599
+ function Pn(e2) {
600
+ dt.length === 0 && queueMicrotask(Ln), dt.push(e2);
601
+ }
602
+ function go(e2) {
603
+ ht.length === 0 && vo(Dn), ht.push(e2);
604
+ }
605
+ function _o() {
606
+ dt.length > 0 && Ln(), ht.length > 0 && Dn();
607
+ }
608
+ function Jr(e2) {
609
+ gt = e2;
610
+ }
611
+ function ve(e2) {
612
+ R = e2;
613
+ }
614
+ function Se(e2) {
615
+ I = e2;
616
+ }
617
+ function On(e2) {
618
+ R !== null && R.f & Ht && (H === null ? H = [e2] : H.push(e2));
619
+ }
620
+ function mo(e2) {
621
+ ie = e2;
622
+ }
623
+ function Mn() {
624
+ return ++Fn;
625
+ }
626
+ function _t(e2) {
627
+ var h2;
628
+ var t2 = e2.f;
629
+ if ((t2 & he) !== 0)
630
+ return true;
631
+ if ((t2 & Ue) !== 0) {
632
+ var r3 = e2.deps, i2 = (t2 & ee) !== 0;
633
+ if (r3 !== null) {
634
+ var o2, a2, l2 = (t2 & $t) !== 0, s2 = i2 && I !== null && !Ce, f2 = r3.length;
635
+ if (l2 || s2) {
636
+ var d2 = (
637
+ /** @type {Derived} */
638
+ e2
639
+ ), v2 = d2.parent;
640
+ for (o2 = 0; o2 < f2; o2++)
641
+ a2 = r3[o2], (l2 || !((h2 = a2 == null ? void 0 : a2.reactions) != null && h2.includes(d2))) && (a2.reactions ?? (a2.reactions = [])).push(d2);
642
+ l2 && (d2.f ^= $t), s2 && v2 !== null && (v2.f & ee) === 0 && (d2.f ^= ee);
643
+ }
644
+ for (o2 = 0; o2 < f2; o2++)
645
+ if (a2 = r3[o2], _t(
646
+ /** @type {Derived} */
647
+ a2
648
+ ) && $n(
649
+ /** @type {Derived} */
650
+ a2
651
+ ), a2.wv > e2.wv)
652
+ return true;
653
+ }
654
+ (!i2 || I !== null && !Ce) && ue(e2, K);
655
+ }
656
+ return false;
657
+ }
658
+ function wo(e2, t2) {
659
+ for (var r3 = t2; r3 !== null; ) {
660
+ if ((r3.f & xt) !== 0)
661
+ try {
662
+ r3.fn(e2);
663
+ return;
664
+ } catch {
665
+ r3.f ^= xt;
666
+ }
667
+ r3 = r3.parent;
668
+ }
669
+ throw pt = false, e2;
670
+ }
671
+ function Kr(e2) {
672
+ return (e2.f & St) === 0 && (e2.parent === null || (e2.parent.f & xt) === 0);
673
+ }
674
+ function Nt(e2, t2, r3, i2) {
675
+ if (pt) {
676
+ if (r3 === null && (pt = false), Kr(t2))
677
+ throw e2;
678
+ return;
679
+ }
680
+ if (r3 !== null && (pt = true), wo(e2, t2), Kr(t2))
681
+ throw e2;
682
+ }
683
+ function Un(e2, t2, r3 = true) {
684
+ var i2 = e2.reactions;
685
+ if (i2 !== null)
686
+ for (var o2 = 0; o2 < i2.length; o2++) {
687
+ var a2 = i2[o2];
688
+ H != null && H.includes(e2) || ((a2.f & fe) !== 0 ? Un(
689
+ /** @type {Derived} */
690
+ a2,
691
+ t2,
692
+ false
693
+ ) : t2 === a2 && (r3 ? ue(a2, he) : (a2.f & K) !== 0 && ue(a2, Ue), Lt(
694
+ /** @type {Effect} */
695
+ a2
696
+ )));
697
+ }
698
+ }
699
+ function jn(e2) {
700
+ var m2;
701
+ var t2 = q, r3 = Q, i2 = ie, o2 = R, a2 = Ce, l2 = H, s2 = W, f2 = de, d2 = e2.f;
702
+ q = /** @type {null | Value[]} */
703
+ null, Q = 0, ie = null, Ce = (d2 & ee) !== 0 && (de || !Fe || R === null), R = (d2 & (be | Me)) === 0 ? e2 : null, H = null, zr(e2.ctx), de = false, At++, e2.f |= Ht;
704
+ try {
705
+ var v2 = (
706
+ /** @type {Function} */
707
+ (0, e2.fn)()
708
+ ), h2 = e2.deps;
709
+ if (q !== null) {
710
+ var g2;
711
+ if (Rt(e2, Q), h2 !== null && Q > 0)
712
+ for (h2.length = Q + q.length, g2 = 0; g2 < q.length; g2++)
713
+ h2[Q + g2] = q[g2];
714
+ else
715
+ e2.deps = h2 = q;
716
+ if (!Ce)
717
+ for (g2 = Q; g2 < h2.length; g2++)
718
+ ((m2 = h2[g2]).reactions ?? (m2.reactions = [])).push(e2);
719
+ } else h2 !== null && Q < h2.length && (Rt(e2, Q), h2.length = Q);
720
+ if (Gn() && ie !== null && !de && h2 !== null && (e2.f & (fe | Ue | he)) === 0)
721
+ for (g2 = 0; g2 < /** @type {Source[]} */
722
+ ie.length; g2++)
723
+ Un(
724
+ ie[g2],
725
+ /** @type {Effect} */
726
+ e2
727
+ );
728
+ return o2 !== null && o2 !== e2 && (At++, ie !== null && (i2 === null ? i2 = ie : i2.push(.../** @type {Source[]} */
729
+ ie))), v2;
730
+ } finally {
731
+ q = t2, Q = r3, ie = i2, R = o2, Ce = a2, H = l2, zr(s2), de = f2, e2.f ^= Ht;
732
+ }
733
+ }
734
+ function po(e2, t2) {
735
+ let r3 = t2.reactions;
736
+ if (r3 !== null) {
737
+ var i2 = Ui.call(r3, e2);
738
+ if (i2 !== -1) {
739
+ var o2 = r3.length - 1;
740
+ o2 === 0 ? r3 = t2.reactions = null : (r3[i2] = r3[o2], r3.pop());
741
+ }
742
+ }
743
+ r3 === null && (t2.f & fe) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
744
+ // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
745
+ // allows us to skip the expensive work of disconnecting and immediately reconnecting it
746
+ (q === null || !q.includes(t2)) && (ue(t2, Ue), (t2.f & (ee | $t)) === 0 && (t2.f ^= $t), En(
747
+ /** @type {Derived} **/
748
+ t2
749
+ ), Rt(
750
+ /** @type {Derived} **/
751
+ t2,
752
+ 0
753
+ ));
754
+ }
755
+ function Rt(e2, t2) {
756
+ var r3 = e2.deps;
757
+ if (r3 !== null)
758
+ for (var i2 = t2; i2 < r3.length; i2++)
759
+ po(e2, r3[i2]);
760
+ }
761
+ function ir(e2) {
762
+ var t2 = e2.f;
763
+ if ((t2 & St) === 0) {
764
+ ue(e2, K);
765
+ var r3 = I, i2 = W, o2 = Fe;
766
+ I = e2, Fe = true;
767
+ try {
768
+ (t2 & Xt) !== 0 ? co(e2) : Rn(e2), An(e2);
769
+ var a2 = jn(e2);
770
+ e2.teardown = typeof a2 == "function" ? a2 : null, e2.wv = Fn;
771
+ var l2 = e2.deps, s2;
772
+ Hr && no && e2.f & he;
773
+ } catch (f2) {
774
+ Nt(f2, e2, r3, i2 || e2.ctx);
775
+ } finally {
776
+ Fe = o2, I = r3;
777
+ }
778
+ }
779
+ }
780
+ function bo() {
781
+ try {
782
+ Ki();
783
+ } catch (e2) {
784
+ if (Ct !== null)
785
+ Nt(e2, Ct, null);
786
+ else
787
+ throw e2;
788
+ }
789
+ }
790
+ function Vn() {
791
+ var e2 = Fe;
792
+ try {
793
+ var t2 = 0;
794
+ for (Fe = true; ct.length > 0; ) {
795
+ t2++ > 1e3 && bo();
796
+ var r3 = ct, i2 = r3.length;
797
+ ct = [];
798
+ for (var o2 = 0; o2 < i2; o2++) {
799
+ var a2 = Eo(r3[o2]);
800
+ yo(a2);
801
+ }
802
+ vt.clear();
803
+ }
804
+ } finally {
805
+ kt = false, Fe = e2, Ct = null;
806
+ }
807
+ }
808
+ function yo(e2) {
809
+ var t2 = e2.length;
810
+ if (t2 !== 0)
811
+ for (var r3 = 0; r3 < t2; r3++) {
812
+ var i2 = e2[r3];
813
+ if ((i2.f & (St | Ke)) === 0)
814
+ try {
815
+ _t(i2) && (ir(i2), i2.deps === null && i2.first === null && i2.nodes_start === null && (i2.teardown === null ? Sn(i2) : i2.fn = null));
816
+ } catch (o2) {
817
+ Nt(o2, i2, null, i2.ctx);
818
+ }
819
+ }
820
+ }
821
+ function Lt(e2) {
822
+ kt || (kt = true, queueMicrotask(Vn));
823
+ for (var t2 = Ct = e2; t2.parent !== null; ) {
824
+ t2 = t2.parent;
825
+ var r3 = t2.f;
826
+ if ((r3 & (Me | be)) !== 0) {
827
+ if ((r3 & K) === 0) return;
828
+ t2.f ^= K;
829
+ }
830
+ }
831
+ ct.push(t2);
832
+ }
833
+ function Eo(e2) {
834
+ for (var t2 = [], r3 = e2; r3 !== null; ) {
835
+ var i2 = r3.f, o2 = (i2 & (be | Me)) !== 0, a2 = o2 && (i2 & K) !== 0;
836
+ if (!a2 && (i2 & Ke) === 0) {
837
+ if ((i2 & vn) !== 0)
838
+ t2.push(r3);
839
+ else if (o2)
840
+ r3.f ^= K;
841
+ else
842
+ try {
843
+ _t(r3) && ir(r3);
844
+ } catch (f2) {
845
+ Nt(f2, r3, null, r3.ctx);
846
+ }
847
+ var l2 = r3.first;
848
+ if (l2 !== null) {
849
+ r3 = l2;
850
+ continue;
851
+ }
852
+ }
853
+ var s2 = r3.parent;
854
+ for (r3 = r3.next; r3 === null && s2 !== null; )
855
+ r3 = s2.next, s2 = s2.parent;
856
+ }
857
+ return t2;
858
+ }
859
+ function $(e2) {
860
+ for (var t2; ; ) {
861
+ if (_o(), ct.length === 0)
862
+ return (
863
+ /** @type {T} */
864
+ t2
865
+ );
866
+ kt = true, Vn();
867
+ }
868
+ }
869
+ async function xo() {
870
+ await Promise.resolve(), $();
871
+ }
872
+ function c(e2) {
873
+ var t2 = e2.f, r3 = (t2 & fe) !== 0;
874
+ if (R !== null && !de) {
875
+ if (!(H != null && H.includes(e2))) {
876
+ var i2 = R.deps;
877
+ e2.rv < At && (e2.rv = At, q === null && i2 !== null && i2[Q] === e2 ? Q++ : q === null ? q = [e2] : (!Ce || !q.includes(e2)) && q.push(e2));
878
+ }
879
+ } else if (r3 && /** @type {Derived} */
880
+ e2.deps === null && /** @type {Derived} */
881
+ e2.effects === null) {
882
+ var o2 = (
883
+ /** @type {Derived} */
884
+ e2
885
+ ), a2 = o2.parent;
886
+ a2 !== null && (a2.f & ee) === 0 && (o2.f ^= ee);
887
+ }
888
+ return r3 && (o2 = /** @type {Derived} */
889
+ e2, _t(o2) && $n(o2)), gt && vt.has(e2) ? vt.get(e2) : e2.v;
890
+ }
891
+ function Xe(e2) {
892
+ var t2 = de;
893
+ try {
894
+ return de = true, e2();
895
+ } finally {
896
+ de = t2;
897
+ }
898
+ }
899
+ function ue(e2, t2) {
900
+ e2.f = e2.f & $o | t2;
901
+ }
902
+ function Bn(e2, t2) {
903
+ var r3 = {
904
+ f: 0,
905
+ // TODO ideally we could skip this altogether, but it causes type errors
906
+ v: e2,
907
+ reactions: null,
908
+ equals: bn,
909
+ rv: 0,
910
+ wv: 0
911
+ };
912
+ return r3;
913
+ }
914
+ // @__NO_SIDE_EFFECTS__
915
+ function J(e2, t2) {
916
+ const r3 = Bn(e2);
917
+ return On(r3), r3;
918
+ }
919
+ // @__NO_SIDE_EFFECTS__
920
+ function qn(e2, t2 = false) {
921
+ const r3 = Bn(e2);
922
+ return t2 || (r3.equals = yn), r3;
923
+ }
924
+ function D(e2, t2, r3 = false) {
925
+ R !== null && !de && Gn() && (R.f & (fe | Xt)) !== 0 && !(H != null && H.includes(e2)) && to();
926
+ let i2 = r3 ? ke(t2) : t2;
927
+ return ko(e2, i2);
928
+ }
929
+ function ko(e2, t2) {
930
+ if (!e2.equals(t2)) {
931
+ var r3 = e2.v;
932
+ gt ? vt.set(e2, t2) : vt.set(e2, r3), e2.v = t2, (e2.f & fe) !== 0 && ((e2.f & he) !== 0 && xn(
933
+ /** @type {Derived} */
934
+ e2
935
+ ), ue(e2, (e2.f & ee) === 0 ? K : Ue)), e2.wv = Mn(), Hn(e2, he), I !== null && (I.f & K) !== 0 && (I.f & (be | Me)) === 0 && (ie === null ? mo([e2]) : ie.push(e2));
936
+ }
937
+ return t2;
938
+ }
939
+ function Hn(e2, t2) {
940
+ var r3 = e2.reactions;
941
+ if (r3 !== null)
942
+ for (var i2 = r3.length, o2 = 0; o2 < i2; o2++) {
943
+ var a2 = r3[o2], l2 = a2.f;
944
+ (l2 & he) === 0 && (ue(a2, t2), (l2 & (K | ee)) !== 0 && ((l2 & fe) !== 0 ? Hn(
945
+ /** @type {Derived} */
946
+ a2,
947
+ Ue
948
+ ) : Lt(
949
+ /** @type {Effect} */
950
+ a2
951
+ )));
952
+ }
953
+ }
954
+ function zr(e2) {
955
+ W = e2;
956
+ }
957
+ function Wn(e2, t2 = false, r3) {
958
+ var i2 = W = {
959
+ p: W,
960
+ c: null,
961
+ d: false,
962
+ e: null,
963
+ m: false,
964
+ s: e2,
965
+ x: null,
966
+ l: null
967
+ };
968
+ kn(() => {
969
+ i2.d = true;
970
+ });
971
+ }
972
+ function Yn(e2) {
973
+ const t2 = W;
974
+ if (t2 !== null) {
975
+ e2 !== void 0 && (t2.x = e2);
976
+ const l2 = t2.e;
977
+ if (l2 !== null) {
978
+ var r3 = I, i2 = R;
979
+ t2.e = null;
980
+ try {
981
+ for (var o2 = 0; o2 < l2.length; o2++) {
982
+ var a2 = l2[o2];
983
+ Se(a2.effect), ve(a2.reaction), rr(a2.fn);
984
+ }
985
+ } finally {
986
+ Se(r3), ve(i2);
987
+ }
988
+ }
989
+ W = t2.p, t2.m = true;
990
+ }
991
+ return e2 || /** @type {T} */
992
+ {};
993
+ }
994
+ function Gn() {
995
+ return true;
996
+ }
997
+ function Ao(e2) {
998
+ return Co.includes(e2);
999
+ }
1000
+ function Zn() {
1001
+ Xr || (Xr = true, document.addEventListener(
1002
+ "reset",
1003
+ (e2) => {
1004
+ Promise.resolve().then(() => {
1005
+ var t2;
1006
+ if (!e2.defaultPrevented)
1007
+ for (
1008
+ const r3 of
1009
+ /**@type {HTMLFormElement} */
1010
+ e2.target.elements
1011
+ )
1012
+ (t2 = r3.__on_r) == null || t2.call(r3);
1013
+ });
1014
+ },
1015
+ // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
1016
+ { capture: true }
1017
+ ));
1018
+ }
1019
+ function Jn(e2) {
1020
+ var t2 = R, r3 = I;
1021
+ ve(null), Se(null);
1022
+ try {
1023
+ return e2();
1024
+ } finally {
1025
+ ve(t2), Se(r3);
1026
+ }
1027
+ }
1028
+ function Ro(e2, t2, r3, i2 = r3) {
1029
+ e2.addEventListener(t2, () => Jn(r3));
1030
+ const o2 = e2.__on_r;
1031
+ o2 ? e2.__on_r = () => {
1032
+ o2(), i2(true);
1033
+ } : e2.__on_r = () => i2(true), Zn();
1034
+ }
1035
+ function Io(e2, t2, r3, i2 = {}) {
1036
+ function o2(a2) {
1037
+ if (i2.capture || ft.call(t2, a2), !a2.cancelBubble)
1038
+ return Jn(() => r3 == null ? void 0 : r3.call(this, a2));
1039
+ }
1040
+ return e2.startsWith("pointer") || e2.startsWith("touch") || e2 === "wheel" ? Pn(() => {
1041
+ t2.addEventListener(e2, o2, i2);
1042
+ }) : t2.addEventListener(e2, o2, i2), o2;
1043
+ }
1044
+ function So(e2, t2, r3, i2, o2) {
1045
+ var a2 = { capture: i2, passive: o2 }, l2 = Io(e2, t2, r3, a2);
1046
+ (t2 === document.body || t2 === window || t2 === document) && kn(() => {
1047
+ t2.removeEventListener(e2, l2, a2);
1048
+ });
1049
+ }
1050
+ function To(e2) {
1051
+ for (var t2 = 0; t2 < e2.length; t2++)
1052
+ Kn.add(e2[t2]);
1053
+ for (var r3 of Jt)
1054
+ r3(e2);
1055
+ }
1056
+ function ft(e2) {
1057
+ var U2;
1058
+ var t2 = this, r3 = (
1059
+ /** @type {Node} */
1060
+ t2.ownerDocument
1061
+ ), i2 = e2.type, o2 = ((U2 = e2.composedPath) == null ? void 0 : U2.call(e2)) || [], a2 = (
1062
+ /** @type {null | Element} */
1063
+ o2[0] || e2.target
1064
+ ), l2 = 0, s2 = e2.__root;
1065
+ if (s2) {
1066
+ var f2 = o2.indexOf(s2);
1067
+ if (f2 !== -1 && (t2 === document || t2 === /** @type {any} */
1068
+ window)) {
1069
+ e2.__root = t2;
1070
+ return;
1071
+ }
1072
+ var d2 = o2.indexOf(t2);
1073
+ if (d2 === -1)
1074
+ return;
1075
+ f2 <= d2 && (l2 = f2);
1076
+ }
1077
+ if (a2 = /** @type {Element} */
1078
+ o2[l2] || e2.target, a2 !== t2) {
1079
+ Et(e2, "currentTarget", {
1080
+ configurable: true,
1081
+ get() {
1082
+ return a2 || r3;
1083
+ }
1084
+ });
1085
+ var v2 = R, h2 = I;
1086
+ ve(null), Se(null);
1087
+ try {
1088
+ for (var g2, m2 = []; a2 !== null; ) {
1089
+ var k = a2.assignedSlot || a2.parentNode || /** @type {any} */
1090
+ a2.host || null;
1091
+ try {
1092
+ var N = a2["__" + i2];
1093
+ if (N != null && (!/** @type {any} */
1094
+ a2.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1095
+ // -> the target could not have been disabled because it emits the event in the first place
1096
+ e2.target === a2))
1097
+ if (cn(N)) {
1098
+ var [F2, ...V2] = N;
1099
+ F2.apply(a2, [e2, ...V2]);
1100
+ } else
1101
+ N.call(a2, e2);
1102
+ } catch (Y2) {
1103
+ g2 ? m2.push(Y2) : g2 = Y2;
1104
+ }
1105
+ if (e2.cancelBubble || k === t2 || k === null)
1106
+ break;
1107
+ a2 = k;
1108
+ }
1109
+ if (g2) {
1110
+ for (let Y2 of m2)
1111
+ queueMicrotask(() => {
1112
+ throw Y2;
1113
+ });
1114
+ throw g2;
1115
+ }
1116
+ } finally {
1117
+ e2.__root = t2, delete e2.currentTarget, ve(v2), Se(h2);
1118
+ }
1119
+ }
1120
+ }
1121
+ function or(e2) {
1122
+ var t2 = document.createElement("template");
1123
+ return t2.innerHTML = e2, t2.content;
1124
+ }
1125
+ function Ae(e2, t2) {
1126
+ var r3 = (
1127
+ /** @type {Effect} */
1128
+ I
1129
+ );
1130
+ r3.nodes_start === null && (r3.nodes_start = e2, r3.nodes_end = t2);
1131
+ }
1132
+ // @__NO_SIDE_EFFECTS__
1133
+ function ge(e2, t2) {
1134
+ var r3 = (t2 & Oi) !== 0, i2 = (t2 & Fi) !== 0, o2, a2 = !e2.startsWith("<!>");
1135
+ return () => {
1136
+ if (L)
1137
+ return Ae(P, null), P;
1138
+ o2 === void 0 && (o2 = or(a2 ? e2 : "<!>" + e2), r3 || (o2 = /** @type {Node} */
1139
+ /* @__PURE__ */ ae(o2)));
1140
+ var l2 = (
1141
+ /** @type {TemplateNode} */
1142
+ i2 || mn ? document.importNode(o2, true) : o2.cloneNode(true)
1143
+ );
1144
+ if (r3) {
1145
+ var s2 = (
1146
+ /** @type {TemplateNode} */
1147
+ /* @__PURE__ */ ae(l2)
1148
+ ), f2 = (
1149
+ /** @type {TemplateNode} */
1150
+ l2.lastChild
1151
+ );
1152
+ Ae(s2, f2);
1153
+ } else
1154
+ Ae(l2, l2);
1155
+ return l2;
1156
+ };
1157
+ }
1158
+ // @__NO_SIDE_EFFECTS__
1159
+ function No(e2, t2, r3 = "svg") {
1160
+ var i2 = !e2.startsWith("<!>"), o2 = `<${r3}>${i2 ? e2 : "<!>" + e2}</${r3}>`, a2;
1161
+ return () => {
1162
+ if (L)
1163
+ return Ae(P, null), P;
1164
+ if (!a2) {
1165
+ var l2 = (
1166
+ /** @type {DocumentFragment} */
1167
+ or(o2)
1168
+ ), s2 = (
1169
+ /** @type {Element} */
1170
+ /* @__PURE__ */ ae(l2)
1171
+ );
1172
+ a2 = /** @type {Element} */
1173
+ /* @__PURE__ */ ae(s2);
1174
+ }
1175
+ var f2 = (
1176
+ /** @type {TemplateNode} */
1177
+ a2.cloneNode(true)
1178
+ );
1179
+ return Ae(f2, f2), f2;
1180
+ };
1181
+ }
1182
+ function ne(e2, t2) {
1183
+ if (L) {
1184
+ I.nodes_end = P, ze();
1185
+ return;
1186
+ }
1187
+ e2 !== null && e2.before(
1188
+ /** @type {Node} */
1189
+ t2
1190
+ );
1191
+ }
1192
+ function zn(e2, t2) {
1193
+ return Xn(e2, t2);
1194
+ }
1195
+ function Lo(e2, t2) {
1196
+ Wt(), t2.intro = t2.intro ?? false;
1197
+ const r3 = t2.target, i2 = L, o2 = P;
1198
+ try {
1199
+ for (var a2 = (
1200
+ /** @type {TemplateNode} */
1201
+ /* @__PURE__ */ ae(r3)
1202
+ ); a2 && (a2.nodeType !== 8 || /** @type {Comment} */
1203
+ a2.data !== zt); )
1204
+ a2 = /** @type {TemplateNode} */
1205
+ /* @__PURE__ */ Te(a2);
1206
+ if (!a2)
1207
+ throw Je;
1208
+ Ze(true), Re(
1209
+ /** @type {Comment} */
1210
+ a2
1211
+ ), ze();
1212
+ const l2 = Xn(e2, { ...t2, anchor: a2 });
1213
+ if (P === null || P.nodeType !== 8 || /** @type {Comment} */
1214
+ P.data !== fn)
1215
+ throw Tt(), Je;
1216
+ return Ze(false), /** @type {Exports} */
1217
+ l2;
1218
+ } catch (l2) {
1219
+ if (l2 === Je)
1220
+ return t2.recover === false && zi(), Wt(), io(r3), Ze(false), zn(e2, t2);
1221
+ throw l2;
1222
+ } finally {
1223
+ Ze(i2), Re(o2);
1224
+ }
1225
+ }
1226
+ function Xn(e2, { target: t2, anchor: r3, props: i2 = {}, events: o2, context: a2, intro: l2 = true }) {
1227
+ Wt();
1228
+ var s2 = /* @__PURE__ */ new Set(), f2 = (h2) => {
1229
+ for (var g2 = 0; g2 < h2.length; g2++) {
1230
+ var m2 = h2[g2];
1231
+ if (!s2.has(m2)) {
1232
+ s2.add(m2);
1233
+ var k = Ao(m2);
1234
+ t2.addEventListener(m2, ft, { passive: k });
1235
+ var N = Ye.get(m2);
1236
+ N === void 0 ? (document.addEventListener(m2, ft, { passive: k }), Ye.set(m2, 1)) : Ye.set(m2, N + 1);
1237
+ }
1238
+ }
1239
+ };
1240
+ f2(ji(Kn)), Jt.add(f2);
1241
+ var d2 = void 0, v2 = uo(() => {
1242
+ var h2 = r3 ?? t2.appendChild(er());
1243
+ return Gt(() => {
1244
+ if (a2) {
1245
+ Wn({});
1246
+ var g2 = (
1247
+ /** @type {ComponentContext} */
1248
+ W
1249
+ );
1250
+ g2.c = a2;
1251
+ }
1252
+ o2 && (i2.$$events = o2), L && Ae(
1253
+ /** @type {TemplateNode} */
1254
+ h2,
1255
+ null
1256
+ ), d2 = e2(h2, i2) || {}, L && (I.nodes_end = P), a2 && Yn();
1257
+ }), () => {
1258
+ var k;
1259
+ for (var g2 of s2) {
1260
+ t2.removeEventListener(g2, ft);
1261
+ var m2 = (
1262
+ /** @type {number} */
1263
+ Ye.get(g2)
1264
+ );
1265
+ --m2 === 0 ? (document.removeEventListener(g2, ft), Ye.delete(g2)) : Ye.set(g2, m2);
1266
+ }
1267
+ Jt.delete(f2), h2 !== r3 && ((k = h2.parentNode) == null || k.removeChild(h2));
1268
+ };
1269
+ });
1270
+ return Kt.set(d2, v2), d2;
1271
+ }
1272
+ function Do(e2, t2) {
1273
+ const r3 = Kt.get(e2);
1274
+ return r3 ? (Kt.delete(e2), r3(t2)) : Promise.resolve();
1275
+ }
1276
+ function $e(e2, t2, [r3, i2] = [0, 0]) {
1277
+ L && r3 === 0 && ze();
1278
+ var o2 = e2, a2 = null, l2 = null, s2 = Z, f2 = r3 > 0 ? Qt : 0, d2 = false;
1279
+ const v2 = (g2, m2 = true) => {
1280
+ d2 = true, h2(m2, g2);
1281
+ }, h2 = (g2, m2) => {
1282
+ if (s2 === (s2 = g2)) return;
1283
+ let k = false;
1284
+ if (L && i2 !== -1) {
1285
+ if (r3 === 0) {
1286
+ const F2 = (
1287
+ /** @type {Comment} */
1288
+ o2.data
1289
+ );
1290
+ F2 === zt ? i2 = 0 : F2 === sn ? i2 = 1 / 0 : (i2 = parseInt(F2.substring(1)), i2 !== i2 && (i2 = s2 ? 1 / 0 : -1));
1291
+ }
1292
+ const N = i2 > r3;
1293
+ !!s2 === N && (o2 = ro(), Re(o2), Ze(false), k = true, i2 = -1);
1294
+ }
1295
+ s2 ? (a2 ? Zr(a2) : m2 && (a2 = Gt(() => m2(o2))), l2 && Zt(l2, () => {
1296
+ l2 = null;
1297
+ })) : (l2 ? Zr(l2) : m2 && (l2 = Gt(() => m2(o2, [r3 + 1, i2]))), a2 && Zt(a2, () => {
1298
+ a2 = null;
1299
+ })), k && Ze(true);
1300
+ };
1301
+ Cn(() => {
1302
+ d2 = false, t2(v2), d2 || h2(null, null);
1303
+ }, f2), L && (o2 = P);
1304
+ }
1305
+ function Ge(e2, t2, r3 = false, i2 = false, o2 = false) {
1306
+ var a2 = e2, l2 = "";
1307
+ Pe(() => {
1308
+ var s2 = (
1309
+ /** @type {Effect} */
1310
+ I
1311
+ );
1312
+ if (l2 === (l2 = t2() ?? "")) {
1313
+ L && ze();
1314
+ return;
1315
+ }
1316
+ if (s2.nodes_start !== null && (In(
1317
+ s2.nodes_start,
1318
+ /** @type {TemplateNode} */
1319
+ s2.nodes_end
1320
+ ), s2.nodes_start = s2.nodes_end = null), l2 !== "") {
1321
+ if (L) {
1322
+ P.data;
1323
+ for (var f2 = ze(), d2 = f2; f2 !== null && (f2.nodeType !== 8 || /** @type {Comment} */
1324
+ f2.data !== ""); )
1325
+ d2 = f2, f2 = /** @type {TemplateNode} */
1326
+ /* @__PURE__ */ Te(f2);
1327
+ if (f2 === null)
1328
+ throw Tt(), Je;
1329
+ Ae(P, d2), a2 = Re(f2);
1330
+ return;
1331
+ }
1332
+ var v2 = l2 + "";
1333
+ r3 ? v2 = `<svg>${v2}</svg>` : i2 && (v2 = `<math>${v2}</math>`);
1334
+ var h2 = or(v2);
1335
+ if ((r3 || i2) && (h2 = /** @type {Element} */
1336
+ /* @__PURE__ */ ae(h2)), Ae(
1337
+ /** @type {TemplateNode} */
1338
+ /* @__PURE__ */ ae(h2),
1339
+ /** @type {TemplateNode} */
1340
+ h2.lastChild
1341
+ ), r3 || i2)
1342
+ for (; /* @__PURE__ */ ae(h2); )
1343
+ a2.before(
1344
+ /** @type {Node} */
1345
+ /* @__PURE__ */ ae(h2)
1346
+ );
1347
+ else
1348
+ a2.before(h2);
1349
+ }
1350
+ });
1351
+ }
1352
+ function Po(e2, t2, r3, i2, o2) {
1353
+ var s2;
1354
+ L && ze();
1355
+ var a2 = (s2 = t2.$$slots) == null ? void 0 : s2[r3], l2 = false;
1356
+ a2 === true && (a2 = t2.children, l2 = true), a2 === void 0 || a2(e2, l2 ? () => i2 : i2);
1357
+ }
1358
+ function Oo(e2, t2, r3) {
1359
+ var i2 = "" + e2;
1360
+ if (r3) {
1361
+ for (var o2 in r3)
1362
+ if (r3[o2])
1363
+ i2 = i2 ? i2 + " " + o2 : o2;
1364
+ else if (i2.length)
1365
+ for (var a2 = o2.length, l2 = 0; (l2 = i2.indexOf(o2, l2)) >= 0; ) {
1366
+ var s2 = l2 + a2;
1367
+ (l2 === 0 || Qr.includes(i2[l2 - 1])) && (s2 === i2.length || Qr.includes(i2[s2])) ? i2 = (l2 === 0 ? "" : i2.substring(0, l2)) + i2.substring(s2 + 1) : l2 = s2;
1368
+ }
1369
+ }
1370
+ return i2 === "" ? null : i2;
1371
+ }
1372
+ function Fo(e2, t2, r3, i2, o2, a2) {
1373
+ var l2 = e2.__className;
1374
+ if (L || l2 !== r3 || l2 === void 0) {
1375
+ var s2 = Oo(r3, i2, a2);
1376
+ (!L || s2 !== e2.getAttribute("class")) && (s2 == null ? e2.removeAttribute("class") : e2.className = s2), e2.__className = r3;
1377
+ } else if (a2 && o2 !== a2)
1378
+ for (var f2 in a2) {
1379
+ var d2 = !!a2[f2];
1380
+ (o2 == null || d2 !== !!o2[f2]) && e2.classList.toggle(f2, d2);
1381
+ }
1382
+ return a2;
1383
+ }
1384
+ function en(e2) {
1385
+ if (L) {
1386
+ var t2 = false, r3 = () => {
1387
+ if (!t2) {
1388
+ if (t2 = true, e2.hasAttribute("value")) {
1389
+ var i2 = e2.value;
1390
+ se(e2, "value", null), e2.value = i2;
1391
+ }
1392
+ if (e2.hasAttribute("checked")) {
1393
+ var o2 = e2.checked;
1394
+ se(e2, "checked", null), e2.checked = o2;
1395
+ }
1396
+ }
1397
+ };
1398
+ e2.__on_r = r3, go(r3), Zn();
1399
+ }
1400
+ }
1401
+ function jo(e2, t2) {
1402
+ var r3 = Qn(e2);
1403
+ r3.value === (r3.value = // treat null and undefined the same for the initial value
1404
+ t2 ?? void 0) || // @ts-expect-error
1405
+ // `progress` elements always need their value set when it's `0`
1406
+ e2.value === t2 && (t2 !== 0 || e2.nodeName !== "PROGRESS") || (e2.value = t2 ?? "");
1407
+ }
1408
+ function se(e2, t2, r3, i2) {
1409
+ var o2 = Qn(e2);
1410
+ L && (o2[t2] = e2.getAttribute(t2), t2 === "src" || t2 === "srcset" || t2 === "href" && e2.nodeName === "LINK") || o2[t2] !== (o2[t2] = r3) && (t2 === "loading" && (e2[Yi] = r3), r3 == null ? e2.removeAttribute(t2) : typeof r3 != "string" && Vo(e2).includes(t2) ? e2[t2] = r3 : e2.setAttribute(t2, r3));
1411
+ }
1412
+ function Qn(e2) {
1413
+ return (
1414
+ /** @type {Record<string | symbol, unknown>} **/
1415
+ // @ts-expect-error
1416
+ e2.__attributes ?? (e2.__attributes = {
1417
+ [Mo]: e2.nodeName.includes("-"),
1418
+ [Uo]: e2.namespaceURI === Mi
1419
+ })
1420
+ );
1421
+ }
1422
+ function Vo(e2) {
1423
+ var t2 = tn.get(e2.nodeName);
1424
+ if (t2) return t2;
1425
+ tn.set(e2.nodeName, t2 = []);
1426
+ for (var r3, i2 = e2, o2 = Element.prototype; o2 !== i2; ) {
1427
+ r3 = Vi(i2);
1428
+ for (var a2 in r3)
1429
+ r3[a2].set && t2.push(a2);
1430
+ i2 = dn(i2);
1431
+ }
1432
+ return t2;
1433
+ }
1434
+ function Bo(e2, t2, r3 = t2) {
1435
+ Ro(e2, "change", (i2) => {
1436
+ var o2 = i2 ? e2.defaultChecked : e2.checked;
1437
+ r3(o2);
1438
+ }), // If we are hydrating and the value has since changed,
1439
+ // then use the update value from the input instead.
1440
+ (L && e2.defaultChecked !== e2.checked || // If defaultChecked is set, then checked == defaultChecked
1441
+ Xe(t2) == null) && r3(e2.checked), nr(() => {
1442
+ var i2 = t2();
1443
+ e2.checked = !!i2;
1444
+ });
1445
+ }
1446
+ function rn(e2, t2) {
1447
+ return e2 === t2 || (e2 == null ? void 0 : e2[ut]) === t2;
1448
+ }
1449
+ function nn(e2 = {}, t2, r3, i2) {
1450
+ return rr(() => {
1451
+ var o2, a2;
1452
+ return nr(() => {
1453
+ o2 = a2, a2 = [], Xe(() => {
1454
+ e2 !== r3(...a2) && (t2(e2, ...a2), o2 && rn(r3(...o2), e2) && t2(null, ...o2));
1455
+ });
1456
+ }), () => {
1457
+ Pn(() => {
1458
+ a2 && rn(r3(...a2), e2) && t2(null, ...a2);
1459
+ });
1460
+ };
1461
+ }), e2;
1462
+ }
1463
+ function ei(e2) {
1464
+ W === null && un(), Yt(() => {
1465
+ const t2 = Xe(e2);
1466
+ if (typeof t2 == "function") return (
1467
+ /** @type {() => void} */
1468
+ t2
1469
+ );
1470
+ });
1471
+ }
1472
+ function qo(e2) {
1473
+ W === null && un(), ei(() => () => Xe(e2));
1474
+ }
1475
+ function Ho(e2) {
1476
+ var t2 = wt;
1477
+ try {
1478
+ return wt = false, [e2(), wt];
1479
+ } finally {
1480
+ wt = t2;
1481
+ }
1482
+ }
1483
+ function on(e2) {
1484
+ var t2;
1485
+ return ((t2 = e2.ctx) == null ? void 0 : t2.d) ?? false;
1486
+ }
1487
+ function A(e2, t2, r3, i2) {
1488
+ var Ne;
1489
+ var o2 = (r3 & Ni) !== 0, a2 = true, l2 = (r3 & Di) !== 0, s2 = (r3 & Pi) !== 0, f2 = false, d2;
1490
+ l2 ? [d2, f2] = Ho(() => (
1491
+ /** @type {V} */
1492
+ e2[t2]
1493
+ )) : d2 = /** @type {V} */
1494
+ e2[t2];
1495
+ var v2 = ut in e2 || _n in e2, h2 = l2 && (((Ne = Oe(e2, t2)) == null ? void 0 : Ne.set) ?? (v2 && t2 in e2 && ((O) => e2[t2] = O))) || void 0, g2 = (
1496
+ /** @type {V} */
1497
+ i2
1498
+ ), m2 = true, k = false, N = () => (k = true, m2 && (m2 = false, s2 ? g2 = Xe(
1499
+ /** @type {() => V} */
1500
+ i2
1501
+ ) : g2 = /** @type {V} */
1502
+ i2), g2);
1503
+ d2 === void 0 && i2 !== void 0 && (h2 && a2 && Xi(), d2 = N(), h2 && h2(d2));
1504
+ var F2;
1505
+ if (F2 = () => {
1506
+ var O = (
1507
+ /** @type {V} */
1508
+ e2[t2]
1509
+ );
1510
+ return O === void 0 ? N() : (m2 = true, k = false, O);
1511
+ }, (r3 & Li) === 0)
1512
+ return F2;
1513
+ if (h2) {
1514
+ var V2 = e2.$$legacy;
1515
+ return function(O, j) {
1516
+ return arguments.length > 0 ? ((!j || V2 || f2) && h2(j ? F2() : O), O) : F2();
1517
+ };
1518
+ }
1519
+ var U2 = false, Y2 = /* @__PURE__ */ qn(d2), M = /* @__PURE__ */ tr(() => {
1520
+ var O = F2(), j = c(Y2);
1521
+ return U2 ? (U2 = false, j) : Y2.v = O;
1522
+ });
1523
+ return l2 && c(M), o2 || (M.equals = yn), function(O, j) {
1524
+ if (arguments.length > 0) {
1525
+ const _e = j ? c(M) : l2 ? ke(O) : O;
1526
+ if (!M.equals(_e)) {
1527
+ if (U2 = true, D(Y2, _e), k && g2 !== void 0 && (g2 = _e), on(M))
1528
+ return O;
1529
+ Xe(() => c(M));
1530
+ }
1531
+ return O;
1532
+ }
1533
+ return on(M) ? M.v : c(M);
1534
+ };
1535
+ }
1536
+ function Wo(e2) {
1537
+ return new Yo(e2);
1538
+ }
1539
+ function bt(e2, t2, r3, i2) {
1540
+ var a2;
1541
+ const o2 = (a2 = r3[e2]) == null ? void 0 : a2.type;
1542
+ if (t2 = o2 === "Boolean" && typeof t2 != "boolean" ? t2 != null : t2, !i2 || !r3[e2])
1543
+ return t2;
1544
+ if (i2 === "toAttribute")
1545
+ switch (o2) {
1546
+ case "Object":
1547
+ case "Array":
1548
+ return t2 == null ? null : JSON.stringify(t2);
1549
+ case "Boolean":
1550
+ return t2 ? "" : null;
1551
+ case "Number":
1552
+ return t2 ?? null;
1553
+ default:
1554
+ return t2;
1555
+ }
1556
+ else
1557
+ switch (o2) {
1558
+ case "Object":
1559
+ case "Array":
1560
+ return t2 && JSON.parse(t2);
1561
+ case "Boolean":
1562
+ return t2;
1563
+ // conversion already handled above
1564
+ case "Number":
1565
+ return t2 != null ? +t2 : t2;
1566
+ default:
1567
+ return t2;
1568
+ }
1569
+ }
1570
+ function Go(e2) {
1571
+ const t2 = {};
1572
+ return e2.childNodes.forEach((r3) => {
1573
+ t2[
1574
+ /** @type {Element} node */
1575
+ r3.slot || "default"
1576
+ ] = true;
1577
+ }), t2;
1578
+ }
1579
+ function Zo(e2, t2, r3, i2, o2, a2) {
1580
+ let l2 = class extends ti {
1581
+ constructor() {
1582
+ super(e2, r3, o2), this.$$p_d = t2;
1583
+ }
1584
+ static get observedAttributes() {
1585
+ return yt(t2).map(
1586
+ (s2) => (t2[s2].attribute || s2).toLowerCase()
1587
+ );
1588
+ }
1589
+ };
1590
+ return yt(t2).forEach((s2) => {
1591
+ Et(l2.prototype, s2, {
1592
+ get() {
1593
+ return this.$$c && s2 in this.$$c ? this.$$c[s2] : this.$$d[s2];
1594
+ },
1595
+ set(f2) {
1596
+ var h2;
1597
+ f2 = bt(s2, f2, t2), this.$$d[s2] = f2;
1598
+ var d2 = this.$$c;
1599
+ if (d2) {
1600
+ var v2 = (h2 = Oe(d2, s2)) == null ? void 0 : h2.get;
1601
+ v2 ? d2[s2] = f2 : d2.$set({ [s2]: f2 });
1602
+ }
1603
+ }
1604
+ });
1605
+ }), i2.forEach((s2) => {
1606
+ Et(l2.prototype, s2, {
1607
+ get() {
1608
+ var f2;
1609
+ return (f2 = this.$$c) == null ? void 0 : f2[s2];
1610
+ }
1611
+ });
1612
+ }), e2.element = /** @type {any} */
1613
+ l2, l2;
1614
+ }
1615
+ function Jo(e2) {
1616
+ return [...new Uint8Array(e2)].map((t2) => t2.toString(16).padStart(2, "0")).join("");
1617
+ }
1618
+ async function Ko(e2, t2 = "SHA-256", r3 = 1e5) {
1619
+ const i2 = Date.now().toString(16);
1620
+ e2 || (e2 = Math.round(Math.random() * r3));
1621
+ const o2 = await ni(i2, e2, t2);
1622
+ return {
1623
+ algorithm: t2,
1624
+ challenge: o2,
1625
+ salt: i2,
1626
+ signature: ""
1627
+ };
1628
+ }
1629
+ async function ni(e2, t2, r3) {
1630
+ if (typeof crypto > "u" || !("subtle" in crypto) || !("digest" in crypto.subtle))
1631
+ throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");
1632
+ return Jo(
1633
+ await crypto.subtle.digest(
1634
+ r3.toUpperCase(),
1635
+ ri.encode(e2 + t2)
1636
+ )
1637
+ );
1638
+ }
1639
+ function zo(e2, t2, r3 = "SHA-256", i2 = 1e6, o2 = 0) {
1640
+ const a2 = new AbortController(), l2 = Date.now();
1641
+ return {
1642
+ promise: (async () => {
1643
+ for (let f2 = o2; f2 <= i2; f2 += 1) {
1644
+ if (a2.signal.aborted)
1645
+ return null;
1646
+ if (await ni(t2, f2, r3) === e2)
1647
+ return {
1648
+ number: f2,
1649
+ took: Date.now() - l2
1650
+ };
1651
+ }
1652
+ return null;
1653
+ })(),
1654
+ controller: a2
1655
+ };
1656
+ }
1657
+ function Xo() {
1658
+ try {
1659
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
1660
+ } catch {
1661
+ }
1662
+ }
1663
+ function Qo(e2) {
1664
+ const t2 = atob(e2), r3 = new Uint8Array(t2.length);
1665
+ for (let i2 = 0; i2 < t2.length; i2++)
1666
+ r3[i2] = t2.charCodeAt(i2);
1667
+ return r3;
1668
+ }
1669
+ function ea(e2, t2 = 12) {
1670
+ const r3 = new Uint8Array(t2);
1671
+ for (let i2 = 0; i2 < t2; i2++)
1672
+ r3[i2] = e2 % 256, e2 = Math.floor(e2 / 256);
1673
+ return r3;
1674
+ }
1675
+ async function ta(e2, t2 = "", r3 = 1e6, i2 = 0) {
1676
+ const o2 = "AES-GCM", a2 = new AbortController(), l2 = Date.now(), s2 = async () => {
1677
+ for (let v2 = i2; v2 <= r3; v2 += 1) {
1678
+ if (a2.signal.aborted || !f2 || !d2)
1679
+ return null;
1680
+ try {
1681
+ const h2 = await crypto.subtle.decrypt(
1682
+ {
1683
+ name: o2,
1684
+ iv: ea(v2)
1685
+ },
1686
+ f2,
1687
+ d2
1688
+ );
1689
+ if (h2)
1690
+ return {
1691
+ clearText: new TextDecoder().decode(h2),
1692
+ took: Date.now() - l2
1693
+ };
1694
+ } catch {
1695
+ }
1696
+ }
1697
+ return null;
1698
+ };
1699
+ let f2 = null, d2 = null;
1700
+ try {
1701
+ d2 = Qo(e2);
1702
+ const v2 = await crypto.subtle.digest(
1703
+ "SHA-256",
1704
+ ri.encode(t2)
1705
+ );
1706
+ f2 = await crypto.subtle.importKey(
1707
+ "raw",
1708
+ v2,
1709
+ o2,
1710
+ false,
1711
+ ["decrypt"]
1712
+ );
1713
+ } catch {
1714
+ return {
1715
+ promise: Promise.reject(),
1716
+ controller: a2
1717
+ };
1718
+ }
1719
+ return {
1720
+ promise: s2(),
1721
+ controller: a2
1722
+ };
1723
+ }
1724
+ function ha(e2, t2) {
1725
+ var Mr, Ur;
1726
+ Wn(t2, true);
1727
+ let r3 = A(t2, "auto", 7, void 0), i2 = A(t2, "blockspam", 7, void 0), o2 = A(t2, "challengeurl", 7, void 0), a2 = A(t2, "challengejson", 7, void 0), l2 = A(t2, "customfetch", 7, void 0), s2 = A(t2, "debug", 7, false), f2 = A(t2, "delay", 7, 0), d2 = A(t2, "expire", 7, void 0), v2 = A(t2, "floating", 7, void 0), h2 = A(t2, "floatinganchor", 7, void 0), g2 = A(t2, "floatingoffset", 7, void 0), m2 = A(t2, "floatingpersist", 7, false), k = A(t2, "hidefooter", 7, false), N = A(t2, "hidelogo", 7, false), F2 = A(t2, "id", 7, void 0), V2 = A(t2, "name", 7, "altcha"), U2 = A(t2, "maxnumber", 7, 1e6), Y2 = A(t2, "mockerror", 7, false), M = A(t2, "obfuscated", 7, void 0), Ne = A(t2, "plugins", 7, void 0), O = A(t2, "refetchonexpire", 7, true), j = A(t2, "spamfilter", 7, false), _e = A(t2, "strings", 7, void 0), te = A(t2, "test", 7, false), ye = A(t2, "verifyurl", 7, void 0), Ve = A(t2, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), Qe = A(t2, "workerurl", 7, void 0);
1728
+ const ar = ["SHA-256", "SHA-384", "SHA-512"], lr = "Visit Altcha.org", sr = "https://altcha.org/", et = (n2, u2) => {
1729
+ t2.$$host.dispatchEvent(new CustomEvent(n2, { detail: u2 }));
1730
+ }, fr = (Ur = (Mr = document.documentElement.lang) == null ? void 0 : Mr.split("-")) == null ? void 0 : Ur[0], Dt = /* @__PURE__ */ st(() => {
1731
+ var n2;
1732
+ return o2() && new URL(o2(), location.origin).host.endsWith(".altcha.org") && !!((n2 = o2()) != null && n2.includes("apiKey=ckey_"));
1733
+ }), Pt = /* @__PURE__ */ st(() => a2() ? Er(a2()) : void 0), ur = /* @__PURE__ */ st(() => _e() ? Er(_e()) : {}), re = /* @__PURE__ */ st(() => {
1734
+ var n2;
1735
+ return {
1736
+ ariaLinkLabel: lr,
1737
+ error: "Verification failed. Try again later.",
1738
+ expired: "Verification expired. Try again.",
1739
+ footer: `Protected by <a href="${sr}" target="_blank" aria-label="${((n2 = c(ur)) == null ? void 0 : n2.ariaLinkLabel) || lr}">ALTCHA</a>`,
1740
+ label: "I'm not a robot",
1741
+ verified: "Verified",
1742
+ verifying: "Verifying...",
1743
+ waitAlert: "Verifying... please wait.",
1744
+ ...c(ur)
1745
+ };
1746
+ }), cr = /* @__PURE__ */ st(() => `${F2() || V2()}_checkbox`);
1747
+ let Be = /* @__PURE__ */ J(false), C2 = /* @__PURE__ */ J(ke(b.UNVERIFIED)), B = /* @__PURE__ */ J(void 0), tt = /* @__PURE__ */ J(null), qe = null, w2 = null, He = /* @__PURE__ */ J(null), ce = null, Ee = [], Le = /* @__PURE__ */ J(null);
1748
+ Yt(() => {
1749
+ ci(c(He));
1750
+ }), Yt(() => {
1751
+ di(c(C2));
1752
+ }), qo(() => {
1753
+ ii(), w2 && (w2.removeEventListener("submit", wr), w2.removeEventListener("reset", pr), w2.removeEventListener("focusin", mr), w2 = null), ce && (clearTimeout(ce), ce = null), document.removeEventListener("click", gr), document.removeEventListener("scroll", _r), window.removeEventListener("resize", yr);
1754
+ }), ei(() => {
1755
+ var n2;
1756
+ S2("mounted", "1.5.1"), S2("workers", Ve()), fi(), S2("plugins", Ee.length ? Ee.map((u2) => u2.constructor.pluginName).join(", ") : "none"), te() && S2("using test mode"), d2() && Ot(d2()), r3() !== void 0 && S2("auto", r3()), v2() !== void 0 && xr(v2()), w2 = (n2 = c(B)) == null ? void 0 : n2.closest("form"), w2 && (w2.addEventListener("submit", wr, { capture: true }), w2.addEventListener("reset", pr), (r3() === "onfocus" || m2() === "focus") && w2.addEventListener("focusin", mr)), r3() === "onload" && (M() ? rt() : xe()), c(Dt) && (k() || N()) && S2("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
1757
+ et("load");
1758
+ });
1759
+ });
1760
+ function dr(n2, u2) {
1761
+ return btoa(JSON.stringify({
1762
+ algorithm: n2.algorithm,
1763
+ challenge: n2.challenge,
1764
+ number: u2.number,
1765
+ salt: n2.salt,
1766
+ signature: n2.signature,
1767
+ test: te() ? true : void 0,
1768
+ took: u2.took
1769
+ }));
1770
+ }
1771
+ function ii() {
1772
+ for (const n2 of Ee)
1773
+ n2.destroy();
1774
+ }
1775
+ function hr() {
1776
+ o2() && O() && c(C2) === b.VERIFIED ? xe() : it(b.EXPIRED, c(re).expired);
1777
+ }
1778
+ async function oi() {
1779
+ var n2;
1780
+ if (Y2())
1781
+ throw S2("mocking error"), new Error("Mocked error.");
1782
+ if (c(Pt))
1783
+ return S2("using provided json data"), c(Pt);
1784
+ if (te())
1785
+ return S2("generating test challenge", { test: te() }), Ko(typeof te() != "boolean" ? +te() : void 0);
1786
+ {
1787
+ if (!o2() && w2) {
1788
+ const x2 = w2.getAttribute("action");
1789
+ x2 != null && x2.includes("/form/") && o2(x2 + "/altcha");
1790
+ }
1791
+ if (!o2())
1792
+ throw new Error("Attribute challengeurl not set.");
1793
+ S2("fetching challenge from", o2());
1794
+ const u2 = {
1795
+ headers: j() !== false ? { "x-altcha-spam-filter": "1" } : {}
1796
+ }, _2 = await vr()(o2(), u2);
1797
+ if (!_2 || !(_2 instanceof Response))
1798
+ throw new Error("Fetch function did not return a response.");
1799
+ if (_2.status !== 200)
1800
+ throw new Error(`Server responded with ${_2.status}.`);
1801
+ const y2 = _2.headers.get("X-Altcha-Config"), T2 = await _2.json(), E = new URLSearchParams((n2 = T2.salt.split("?")) == null ? void 0 : n2[1]), p2 = E.get("expires") || E.get("expire");
1802
+ if (p2) {
1803
+ const x2 = new Date(+p2 * 1e3), me = isNaN(x2.getTime()) ? 0 : x2.getTime() - Date.now();
1804
+ me > 0 && Ot(me);
1805
+ }
1806
+ if (y2)
1807
+ try {
1808
+ const x2 = JSON.parse(y2);
1809
+ x2 && typeof x2 == "object" && ("sentinel" in x2 ? alert("This version of the widget is not compatible with Sentinel. Upgrade to version 2.x.x.") : (x2.verifyurl && (x2.verifyurl = new URL(x2.verifyurl, new URL(o2())).toString()), Cr(x2)));
1810
+ } catch (x2) {
1811
+ S2("unable to configure from X-Altcha-Config", x2);
1812
+ }
1813
+ return T2;
1814
+ }
1815
+ }
1816
+ function ai(n2) {
1817
+ var _2;
1818
+ const u2 = w2 == null ? void 0 : w2.querySelector(typeof n2 == "string" ? `input[name="${n2}"]` : 'input[type="email"]:not([data-no-spamfilter])');
1819
+ return ((_2 = u2 == null ? void 0 : u2.value) == null ? void 0 : _2.slice(u2.value.indexOf("@"))) || void 0;
1820
+ }
1821
+ function vr() {
1822
+ let n2 = fetch;
1823
+ if (l2())
1824
+ if (S2("using customfetch"), typeof l2() == "string") {
1825
+ if (n2 = globalThis[l2()] || null, !n2)
1826
+ throw new Error(`Custom fetch function not found: ${l2()}`);
1827
+ } else
1828
+ n2 = l2();
1829
+ return n2;
1830
+ }
1831
+ function li() {
1832
+ return j() === "ipAddress" ? {
1833
+ blockedCountries: void 0,
1834
+ classifier: void 0,
1835
+ disableRules: void 0,
1836
+ email: false,
1837
+ expectedCountries: void 0,
1838
+ expectedLanguages: void 0,
1839
+ fields: false,
1840
+ ipAddress: void 0,
1841
+ text: void 0,
1842
+ timeZone: void 0
1843
+ } : typeof j() == "object" ? j() : {
1844
+ blockedCountries: void 0,
1845
+ classifier: void 0,
1846
+ disableRules: void 0,
1847
+ email: void 0,
1848
+ expectedCountries: void 0,
1849
+ expectedLanguages: void 0,
1850
+ fields: void 0,
1851
+ ipAddress: void 0,
1852
+ text: void 0,
1853
+ timeZone: void 0
1854
+ };
1855
+ }
1856
+ function si(n2) {
1857
+ return [
1858
+ ...(w2 == null ? void 0 : w2.querySelectorAll(n2 != null && n2.length ? n2.map((_2) => `input[name="${_2}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
1859
+ ].reduce(
1860
+ (_2, y2) => {
1861
+ const T2 = y2.name, E = y2.value;
1862
+ return T2 && E && (_2[T2] = /\n/.test(E) ? E.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
1863
+ `) : E), _2;
1864
+ },
1865
+ {}
1866
+ );
1867
+ }
1868
+ function fi() {
1869
+ const n2 = Ne() !== void 0 ? Ne().split(",") : void 0;
1870
+ for (const u2 of globalThis.altchaPlugins)
1871
+ (!n2 || n2.includes(u2.pluginName)) && Ee.push(new u2({
1872
+ el: c(B),
1873
+ clarify: rt,
1874
+ dispatch: et,
1875
+ getConfiguration: Ar,
1876
+ getFloatingAnchor: Rr,
1877
+ getState: Ir,
1878
+ log: S2,
1879
+ reset: it,
1880
+ solve: kr,
1881
+ setState: De,
1882
+ setFloatingAnchor: Tr,
1883
+ verify: xe
1884
+ }));
1885
+ }
1886
+ function S2(...n2) {
1887
+ (s2() || n2.some((u2) => u2 instanceof Error)) && console[n2[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${V2()}]`, ...n2);
1888
+ }
1889
+ function ui() {
1890
+ [b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(c(C2)) ? j() !== false && (w2 == null ? void 0 : w2.reportValidity()) === false ? D(Be, false) : M() ? rt() : xe() : D(Be, true);
1891
+ }
1892
+ function gr(n2) {
1893
+ const u2 = n2.target;
1894
+ v2() && u2 && !c(B).contains(u2) && (c(C2) === b.VERIFIED && m2() === false || c(C2) === b.VERIFIED && m2() === "focus" && !(w2 != null && w2.matches(":focus-within")) || r3() === "off" && c(C2) === b.UNVERIFIED) && Sr();
19
1895
  }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1896
+ function _r() {
1897
+ v2() && c(C2) !== b.UNVERIFIED && nt();
1898
+ }
1899
+ function ci(n2) {
1900
+ for (const u2 of Ee)
1901
+ typeof u2.onErrorChange == "function" && u2.onErrorChange(c(He));
1902
+ }
1903
+ function mr(n2) {
1904
+ c(C2) === b.UNVERIFIED ? xe() : v2() && m2() === "focus" && c(C2) === b.VERIFIED && Ft();
1905
+ }
1906
+ function wr(n2) {
1907
+ w2 && r3() === "onsubmit" ? c(C2) === b.UNVERIFIED ? (n2.preventDefault(), n2.stopPropagation(), xe().then(() => {
1908
+ vi();
1909
+ })) : c(C2) !== b.VERIFIED && (n2.preventDefault(), n2.stopPropagation(), c(C2) === b.VERIFYING && br()) : w2 && v2() && r3() === "off" && c(C2) === b.UNVERIFIED && (n2.preventDefault(), n2.stopPropagation(), Ft());
1910
+ }
1911
+ function pr() {
1912
+ it();
1913
+ }
1914
+ function br() {
1915
+ c(C2) === b.VERIFYING && c(re).waitAlert && alert(c(re).waitAlert);
1916
+ }
1917
+ function di(n2) {
1918
+ for (const u2 of Ee)
1919
+ typeof u2.onStateChange == "function" && u2.onStateChange(c(C2));
1920
+ v2() && c(C2) !== b.UNVERIFIED && requestAnimationFrame(() => {
1921
+ nt();
1922
+ }), D(Be, c(C2) === b.VERIFIED);
1923
+ }
1924
+ function yr() {
1925
+ v2() && nt();
1926
+ }
1927
+ function Er(n2) {
1928
+ return JSON.parse(n2);
1929
+ }
1930
+ async function hi(n2) {
1931
+ if (!ye())
1932
+ throw new Error("Attribute verifyurl not set.");
1933
+ S2("requesting server verification from", ye());
1934
+ const u2 = { payload: n2 };
1935
+ if (j() !== false) {
1936
+ const {
1937
+ blockedCountries: T2,
1938
+ classifier: E,
1939
+ disableRules: p2,
1940
+ email: x2,
1941
+ expectedLanguages: me,
1942
+ expectedCountries: jt,
1943
+ fields: at,
1944
+ ipAddress: lt,
1945
+ text: Ai,
1946
+ timeZone: jr
1947
+ } = li();
1948
+ u2.blockedCountries = T2, u2.classifier = E, u2.disableRules = p2, u2.email = x2 === false ? void 0 : ai(x2), u2.expectedCountries = jt, u2.expectedLanguages = me || (fr ? [fr] : void 0), u2.fields = at === false ? void 0 : si(at), u2.ipAddress = lt === false ? void 0 : lt || "auto", u2.text = Ai, u2.timeZone = jr === false ? void 0 : jr || Xo();
1949
+ }
1950
+ const _2 = await vr()(ye(), {
1951
+ body: JSON.stringify(u2),
1952
+ headers: { "content-type": "application/json" },
1953
+ method: "POST"
1954
+ });
1955
+ if (!_2 || !(_2 instanceof Response))
1956
+ throw new Error("Fetch function did not return a response.");
1957
+ if (_2.status !== 200)
1958
+ throw new Error(`Server responded with ${_2.status}.`);
1959
+ const y2 = await _2.json();
1960
+ if (y2 != null && y2.payload && D(Le, y2.payload, true), et("serververification", y2), i2() && y2.classification === "BAD")
1961
+ throw new Error("SpamFilter returned negative classification.");
1962
+ }
1963
+ function vi() {
1964
+ w2 && "requestSubmit" in w2 ? w2.requestSubmit() : w2 != null && w2.reportValidity() && w2.submit();
1965
+ }
1966
+ function Ot(n2) {
1967
+ S2("expire", n2), ce && (clearTimeout(ce), ce = null), n2 < 1 ? hr() : ce = setTimeout(hr, n2);
1968
+ }
1969
+ function xr(n2) {
1970
+ S2("floating", n2), v2() !== n2 && (c(B).style.left = "", c(B).style.top = ""), v2(n2 === true || n2 === "" ? "auto" : n2 === false || n2 === "false" ? void 0 : v2()), v2() ? (r3() || r3("onsubmit"), document.addEventListener("scroll", _r), document.addEventListener("click", gr), window.addEventListener("resize", yr)) : r3() === "onsubmit" && r3(void 0);
1971
+ }
1972
+ function $r(n2) {
1973
+ if (!n2.algorithm)
1974
+ throw new Error("Invalid challenge. Property algorithm is missing.");
1975
+ if (n2.signature === void 0)
1976
+ throw new Error("Invalid challenge. Property signature is missing.");
1977
+ if (!ar.includes(n2.algorithm.toUpperCase()))
1978
+ throw new Error(`Unknown algorithm value. Allowed values: ${ar.join(", ")}`);
1979
+ if (!n2.challenge || n2.challenge.length < 40)
1980
+ throw new Error("Challenge is too short. Min. 40 chars.");
1981
+ if (!n2.salt || n2.salt.length < 10)
1982
+ throw new Error("Salt is too short. Min. 10 chars.");
1983
+ }
1984
+ async function kr(n2) {
1985
+ let u2 = null;
1986
+ if ("Worker" in window) {
1987
+ try {
1988
+ u2 = await gi(n2, n2.maxNumber || n2.maxnumber || U2());
1989
+ } catch (_2) {
1990
+ S2(_2);
1991
+ }
1992
+ if ((u2 == null ? void 0 : u2.number) !== void 0 || "obfuscated" in n2)
1993
+ return { data: n2, solution: u2 };
1994
+ }
1995
+ if ("obfuscated" in n2) {
1996
+ const _2 = await ta(n2.obfuscated, n2.key, n2.maxNumber || n2.maxnumber);
1997
+ return { data: n2, solution: await _2.promise };
1998
+ }
1999
+ return {
2000
+ data: n2,
2001
+ solution: await zo(n2.challenge, n2.salt, n2.algorithm, n2.maxNumber || n2.maxnumber || U2()).promise
2002
+ };
2003
+ }
2004
+ async function gi(n2, u2 = typeof te() == "number" ? te() : n2.maxNumber || n2.maxnumber || U2(), _2 = Math.ceil(Ve())) {
2005
+ const y2 = [];
2006
+ _2 = Math.min(16, u2, Math.max(1, _2));
2007
+ for (let p2 = 0; p2 < _2; p2++)
2008
+ y2.push(altchaCreateWorker(Qe()));
2009
+ const T2 = Math.ceil(u2 / _2), E = await Promise.all(y2.map((p2, x2) => {
2010
+ const me = x2 * T2;
2011
+ return new Promise((jt) => {
2012
+ p2.addEventListener("message", (at) => {
2013
+ if (at.data)
2014
+ for (const lt of y2)
2015
+ lt !== p2 && lt.postMessage({ type: "abort" });
2016
+ jt(at.data);
2017
+ }), p2.postMessage({
2018
+ payload: n2,
2019
+ max: me + T2,
2020
+ start: me,
2021
+ type: "work"
2022
+ });
2023
+ });
2024
+ }));
2025
+ for (const p2 of y2)
2026
+ p2.terminate();
2027
+ return E.find((p2) => !!p2) || null;
2028
+ }
2029
+ async function rt() {
2030
+ if (!M()) {
2031
+ De(b.ERROR);
2032
+ return;
2033
+ }
2034
+ const n2 = Ee.find((u2) => u2.constructor.pluginName === "obfuscation");
2035
+ if (!n2 || !("clarify" in n2)) {
2036
+ De(b.ERROR), S2("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
2037
+ return;
2038
+ }
2039
+ if ("clarify" in n2 && typeof n2.clarify == "function")
2040
+ return n2.clarify();
2041
+ }
2042
+ function Cr(n2) {
2043
+ n2.obfuscated !== void 0 && M(n2.obfuscated), n2.auto !== void 0 && (r3(n2.auto), r3() === "onload" && (M() ? rt() : xe())), n2.blockspam !== void 0 && i2(!!n2.blockspam), n2.customfetch !== void 0 && l2(n2.customfetch), n2.floatinganchor !== void 0 && h2(n2.floatinganchor), n2.delay !== void 0 && f2(n2.delay), n2.floatingoffset !== void 0 && g2(n2.floatingoffset), n2.floating !== void 0 && xr(n2.floating), n2.expire !== void 0 && (Ot(n2.expire), d2(n2.expire)), n2.challenge && (a2(typeof n2.challenge == "string" ? n2.challenge : JSON.stringify(n2.challenge)), $r(c(Pt))), n2.challengeurl !== void 0 && o2(n2.challengeurl), n2.debug !== void 0 && s2(!!n2.debug), n2.hidefooter !== void 0 && k(!!n2.hidefooter), n2.hidelogo !== void 0 && N(!!n2.hidelogo), n2.maxnumber !== void 0 && U2(+n2.maxnumber), n2.mockerror !== void 0 && Y2(!!n2.mockerror), n2.name !== void 0 && V2(n2.name), n2.refetchonexpire !== void 0 && O(!!n2.refetchonexpire), n2.spamfilter !== void 0 && j(typeof n2.spamfilter == "object" ? n2.spamfilter : !!n2.spamfilter), n2.strings && _e(typeof n2.strings == "string" ? n2.strings : JSON.stringify(n2.strings)), n2.test !== void 0 && te(typeof n2.test == "number" ? n2.test : !!n2.test), n2.verifyurl !== void 0 && ye(n2.verifyurl), n2.workers !== void 0 && Ve(+n2.workers), n2.workerurl !== void 0 && Qe(n2.workerurl);
2044
+ }
2045
+ function Ar() {
2046
+ return {
2047
+ auto: r3(),
2048
+ blockspam: i2(),
2049
+ challengeurl: o2(),
2050
+ debug: s2(),
2051
+ delay: f2(),
2052
+ expire: d2(),
2053
+ floating: v2(),
2054
+ floatinganchor: h2(),
2055
+ floatingoffset: g2(),
2056
+ hidefooter: k(),
2057
+ hidelogo: N(),
2058
+ name: V2(),
2059
+ maxnumber: U2(),
2060
+ mockerror: Y2(),
2061
+ obfuscated: M(),
2062
+ refetchonexpire: O(),
2063
+ spamfilter: j(),
2064
+ strings: c(re),
2065
+ test: te(),
2066
+ verifyurl: ye(),
2067
+ workers: Ve(),
2068
+ workerurl: Qe()
2069
+ };
2070
+ }
2071
+ function Rr() {
2072
+ return qe;
2073
+ }
2074
+ function _i(n2) {
2075
+ return Ee.find((u2) => u2.constructor.pluginName === n2);
2076
+ }
2077
+ function Ir() {
2078
+ return c(C2);
2079
+ }
2080
+ function Sr() {
2081
+ c(B).style.display = "none";
2082
+ }
2083
+ function nt(n2 = 20) {
2084
+ if (c(B))
2085
+ if (qe || (qe = (h2() ? document.querySelector(h2()) : w2 == null ? void 0 : w2.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || w2), qe) {
2086
+ const u2 = parseInt(g2(), 10) || 12, _2 = qe.getBoundingClientRect(), y2 = c(B).getBoundingClientRect(), T2 = document.documentElement.clientHeight, E = document.documentElement.clientWidth, p2 = v2() === "auto" ? _2.bottom + y2.height + u2 + n2 > T2 : v2() === "top", x2 = Math.max(n2, Math.min(E - n2 - y2.width, _2.left + _2.width / 2 - y2.width / 2));
2087
+ if (p2 ? c(B).style.top = `${_2.top - (y2.height + u2)}px` : c(B).style.top = `${_2.bottom + u2}px`, c(B).style.left = `${x2}px`, c(B).setAttribute("data-floating", p2 ? "top" : "bottom"), c(tt)) {
2088
+ const me = c(tt).getBoundingClientRect();
2089
+ c(tt).style.left = _2.left - x2 + _2.width / 2 - me.width / 2 + "px";
2090
+ }
2091
+ } else
2092
+ S2("unable to find floating anchor element");
2093
+ }
2094
+ function it(n2 = b.UNVERIFIED, u2 = null) {
2095
+ ce && (clearTimeout(ce), ce = null), D(Be, false), D(Le, null), De(n2, u2);
2096
+ }
2097
+ function Tr(n2) {
2098
+ qe = n2;
2099
+ }
2100
+ function De(n2, u2 = null) {
2101
+ D(C2, n2, true), D(He, u2, true), et("statechange", {
2102
+ payload: c(Le),
2103
+ state: c(C2)
2104
+ });
2105
+ }
2106
+ function Ft() {
2107
+ c(B).style.display = "block", v2() && nt();
2108
+ }
2109
+ async function xe() {
2110
+ return it(b.VERIFYING), await new Promise((n2) => setTimeout(n2, f2() || 0)), oi().then((n2) => ($r(n2), S2("challenge", n2), kr(n2))).then(({ data: n2, solution: u2 }) => {
2111
+ if (S2("solution", u2), !u2 || n2 && "challenge" in n2 && !("clearText" in u2))
2112
+ if ((u2 == null ? void 0 : u2.number) !== void 0 && "challenge" in n2) {
2113
+ if (ye())
2114
+ return hi(dr(n2, u2));
2115
+ D(Le, dr(n2, u2), true), S2("payload", c(Le));
2116
+ } else
2117
+ throw S2("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
2118
+ }).then(() => {
2119
+ De(b.VERIFIED), S2("verified"), xo().then(() => {
2120
+ et("verified", { payload: c(Le) });
2121
+ });
2122
+ }).catch((n2) => {
2123
+ S2(n2), De(b.ERROR, n2.message);
2124
+ });
2125
+ }
2126
+ var Nr = da(), Lr = Gr(Nr);
2127
+ Po(Lr, t2, "default", {});
2128
+ var ot = we(Lr, 2), Mt = X(ot), Dr = X(Mt);
2129
+ {
2130
+ var mi = (n2) => {
2131
+ var u2 = ra();
2132
+ ne(n2, u2);
2133
+ };
2134
+ $e(Dr, (n2) => {
2135
+ c(C2) === b.VERIFYING && n2(mi);
2136
+ });
2137
+ }
2138
+ var mt = we(Dr, 2);
2139
+ let Pr;
2140
+ var We = X(mt);
2141
+ en(We), We.__change = ui, z(mt);
2142
+ var Ut = we(mt, 2), wi = X(Ut);
2143
+ {
2144
+ var pi = (n2) => {
2145
+ var u2 = na(), _2 = Gr(u2), y2 = X(_2);
2146
+ Ge(y2, () => c(re).verified), z(_2);
2147
+ var T2 = we(_2, 2);
2148
+ en(T2), Pe(() => {
2149
+ se(T2, "name", V2()), jo(T2, c(Le));
2150
+ }), ne(n2, u2);
2151
+ }, bi = (n2, u2) => {
2152
+ {
2153
+ var _2 = (T2) => {
2154
+ var E = ia(), p2 = X(E);
2155
+ Ge(p2, () => c(re).verifying), z(E), ne(T2, E);
2156
+ }, y2 = (T2) => {
2157
+ var E = oa(), p2 = X(E);
2158
+ Ge(p2, () => c(re).label), z(E), Pe(() => se(E, "for", c(cr))), ne(T2, E);
2159
+ };
2160
+ $e(
2161
+ n2,
2162
+ (T2) => {
2163
+ c(C2) === b.VERIFYING ? T2(_2) : T2(y2, false);
2164
+ },
2165
+ u2
2166
+ );
2167
+ }
2168
+ };
2169
+ $e(wi, (n2) => {
2170
+ c(C2) === b.VERIFIED ? n2(pi) : n2(bi, false);
2171
+ });
2172
+ }
2173
+ z(Ut);
2174
+ var yi = we(Ut, 2);
2175
+ {
2176
+ var Ei = (n2) => {
2177
+ var u2 = aa(), _2 = X(u2);
2178
+ se(_2, "href", sr), z(u2), Pe(() => se(_2, "aria-label", c(re).ariaLinkLabel)), ne(n2, u2);
2179
+ };
2180
+ $e(yi, (n2) => {
2181
+ (N() !== true || c(Dt)) && n2(Ei);
2182
+ });
2183
+ }
2184
+ z(Mt);
2185
+ var Or = we(Mt, 2);
2186
+ {
2187
+ var xi = (n2) => {
2188
+ var u2 = fa(), _2 = we(X(u2), 2);
2189
+ {
2190
+ var y2 = (E) => {
2191
+ var p2 = la(), x2 = X(p2);
2192
+ Ge(x2, () => c(re).expired), z(p2), Pe(() => se(p2, "title", c(He))), ne(E, p2);
2193
+ }, T2 = (E) => {
2194
+ var p2 = sa(), x2 = X(p2);
2195
+ Ge(x2, () => c(re).error), z(p2), Pe(() => se(p2, "title", c(He))), ne(E, p2);
2196
+ };
2197
+ $e(_2, (E) => {
2198
+ c(C2) === b.EXPIRED ? E(y2) : E(T2, false);
2199
+ });
2200
+ }
2201
+ z(u2), ne(n2, u2);
2202
+ };
2203
+ $e(Or, (n2) => {
2204
+ (c(He) || c(C2) === b.EXPIRED) && n2(xi);
2205
+ });
2206
+ }
2207
+ var Fr = we(Or, 2);
2208
+ {
2209
+ var $i = (n2) => {
2210
+ var u2 = ua(), _2 = X(u2), y2 = X(_2);
2211
+ Ge(y2, () => c(re).footer), z(_2), z(u2), ne(n2, u2);
2212
+ };
2213
+ $e(Fr, (n2) => {
2214
+ c(re).footer && (k() !== true || c(Dt)) && n2($i);
2215
+ });
2216
+ }
2217
+ var ki = we(Fr, 2);
2218
+ {
2219
+ var Ci = (n2) => {
2220
+ var u2 = ca();
2221
+ nn(u2, (_2) => D(tt, _2), () => c(tt)), ne(n2, u2);
2222
+ };
2223
+ $e(ki, (n2) => {
2224
+ v2() && n2(Ci);
2225
+ });
2226
+ }
2227
+ return z(ot), nn(ot, (n2) => D(B, n2), () => c(B)), Pe(
2228
+ (n2) => {
2229
+ se(ot, "data-state", c(C2)), se(ot, "data-floating", v2()), Pr = Fo(mt, 1, "altcha-checkbox", null, Pr, n2), se(We, "id", c(cr)), We.required = r3() !== "onsubmit" && (!v2() || r3() !== "off");
2230
+ },
2231
+ [
2232
+ () => ({
2233
+ "altcha-hidden": c(C2) === b.VERIFYING
2234
+ })
2235
+ ]
2236
+ ), So("invalid", We, br), Bo(We, () => c(Be), (n2) => D(Be, n2)), ne(e2, Nr), Yn({
2237
+ clarify: rt,
2238
+ configure: Cr,
2239
+ getConfiguration: Ar,
2240
+ getFloatingAnchor: Rr,
2241
+ getPlugin: _i,
2242
+ getState: Ir,
2243
+ hide: Sr,
2244
+ repositionFloating: nt,
2245
+ reset: it,
2246
+ setFloatingAnchor: Tr,
2247
+ setState: De,
2248
+ show: Ft,
2249
+ verify: xe,
2250
+ get auto() {
2251
+ return r3();
2252
+ },
2253
+ set auto(n2 = void 0) {
2254
+ r3(n2), $();
2255
+ },
2256
+ get blockspam() {
2257
+ return i2();
2258
+ },
2259
+ set blockspam(n2 = void 0) {
2260
+ i2(n2), $();
2261
+ },
2262
+ get challengeurl() {
2263
+ return o2();
2264
+ },
2265
+ set challengeurl(n2 = void 0) {
2266
+ o2(n2), $();
2267
+ },
2268
+ get challengejson() {
2269
+ return a2();
2270
+ },
2271
+ set challengejson(n2 = void 0) {
2272
+ a2(n2), $();
2273
+ },
2274
+ get customfetch() {
2275
+ return l2();
2276
+ },
2277
+ set customfetch(n2 = void 0) {
2278
+ l2(n2), $();
2279
+ },
2280
+ get debug() {
2281
+ return s2();
2282
+ },
2283
+ set debug(n2 = false) {
2284
+ s2(n2), $();
2285
+ },
2286
+ get delay() {
2287
+ return f2();
2288
+ },
2289
+ set delay(n2 = 0) {
2290
+ f2(n2), $();
2291
+ },
2292
+ get expire() {
2293
+ return d2();
2294
+ },
2295
+ set expire(n2 = void 0) {
2296
+ d2(n2), $();
2297
+ },
2298
+ get floating() {
2299
+ return v2();
2300
+ },
2301
+ set floating(n2 = void 0) {
2302
+ v2(n2), $();
2303
+ },
2304
+ get floatinganchor() {
2305
+ return h2();
2306
+ },
2307
+ set floatinganchor(n2 = void 0) {
2308
+ h2(n2), $();
2309
+ },
2310
+ get floatingoffset() {
2311
+ return g2();
2312
+ },
2313
+ set floatingoffset(n2 = void 0) {
2314
+ g2(n2), $();
2315
+ },
2316
+ get floatingpersist() {
2317
+ return m2();
2318
+ },
2319
+ set floatingpersist(n2 = false) {
2320
+ m2(n2), $();
2321
+ },
2322
+ get hidefooter() {
2323
+ return k();
2324
+ },
2325
+ set hidefooter(n2 = false) {
2326
+ k(n2), $();
2327
+ },
2328
+ get hidelogo() {
2329
+ return N();
2330
+ },
2331
+ set hidelogo(n2 = false) {
2332
+ N(n2), $();
2333
+ },
2334
+ get id() {
2335
+ return F2();
2336
+ },
2337
+ set id(n2 = void 0) {
2338
+ F2(n2), $();
2339
+ },
2340
+ get name() {
2341
+ return V2();
2342
+ },
2343
+ set name(n2 = "altcha") {
2344
+ V2(n2), $();
2345
+ },
2346
+ get maxnumber() {
2347
+ return U2();
2348
+ },
2349
+ set maxnumber(n2 = 1e6) {
2350
+ U2(n2), $();
2351
+ },
2352
+ get mockerror() {
2353
+ return Y2();
2354
+ },
2355
+ set mockerror(n2 = false) {
2356
+ Y2(n2), $();
2357
+ },
2358
+ get obfuscated() {
2359
+ return M();
2360
+ },
2361
+ set obfuscated(n2 = void 0) {
2362
+ M(n2), $();
2363
+ },
2364
+ get plugins() {
2365
+ return Ne();
2366
+ },
2367
+ set plugins(n2 = void 0) {
2368
+ Ne(n2), $();
2369
+ },
2370
+ get refetchonexpire() {
2371
+ return O();
2372
+ },
2373
+ set refetchonexpire(n2 = true) {
2374
+ O(n2), $();
2375
+ },
2376
+ get spamfilter() {
2377
+ return j();
2378
+ },
2379
+ set spamfilter(n2 = false) {
2380
+ j(n2), $();
2381
+ },
2382
+ get strings() {
2383
+ return _e();
2384
+ },
2385
+ set strings(n2 = void 0) {
2386
+ _e(n2), $();
2387
+ },
2388
+ get test() {
2389
+ return te();
2390
+ },
2391
+ set test(n2 = false) {
2392
+ te(n2), $();
2393
+ },
2394
+ get verifyurl() {
2395
+ return ye();
2396
+ },
2397
+ set verifyurl(n2 = void 0) {
2398
+ ye(n2), $();
2399
+ },
2400
+ get workers() {
2401
+ return Ve();
2402
+ },
2403
+ set workers(n2 = Math.min(16, navigator.hardwareConcurrency || 8)) {
2404
+ Ve(n2), $();
2405
+ },
2406
+ get workerurl() {
2407
+ return Qe();
2408
+ },
2409
+ set workerurl(n2 = void 0) {
2410
+ Qe(n2), $();
2411
+ }
2412
+ });
2413
+ }
2414
+ function ga(e2, t2 = "__altcha-css") {
2415
+ if (!document.getElementById(t2)) {
2416
+ const r3 = document.createElement("style");
2417
+ r3.id = t2, r3.textContent = e2, document.head.appendChild(r3);
2418
+ }
2419
+ }
2420
+ var Ri, Vr, Ii, le, Br, G, Vt, Bt, ln, qr, Ti, an, Ni, Li, Di, Pi, Oi, Fi, zt, sn, fn, Je, Z, Mi, Hr, cn, Ui, ji, yt, Et, Oe, Vi, Bi, qi, dn, Wr, fe, vn, It, Xt, be, Me, xt, ee, $t, K, he, Ue, Ke, St, Hi, Qt, Wi, gn, Ht, ut, _n, Yi, L, P, no, Yr, mn, wn, pn, vo, dt, ht, pt, kt, Ct, Fe, gt, ct, R, de, I, H, q, Q, ie, Fn, At, Ce, $o, vt, W, Co, Xr, Kn, Jt, Ye, Kt, Qr, Mo, Uo, tn, wt, pe, oe, Yo, ti, ri, b, ra, na, ia, oa, aa, la, sa, fa, ua, ca, da, va;
2421
+ var init_altcha = __esm({
2422
+ "../../node_modules/.pnpm/altcha@1.5.1/node_modules/altcha/dist/altcha.js"() {
2423
+ "use strict";
2424
+ Ri = Object.defineProperty;
2425
+ Vr = (e2) => {
2426
+ throw TypeError(e2);
2427
+ };
2428
+ Ii = (e2, t2, r3) => t2 in e2 ? Ri(e2, t2, { enumerable: true, configurable: true, writable: true, value: r3 }) : e2[t2] = r3;
2429
+ le = (e2, t2, r3) => Ii(e2, typeof t2 != "symbol" ? t2 + "" : t2, r3);
2430
+ Br = (e2, t2, r3) => t2.has(e2) || Vr("Cannot " + r3);
2431
+ G = (e2, t2, r3) => (Br(e2, t2, "read from private field"), r3 ? r3.call(e2) : t2.get(e2));
2432
+ Vt = (e2, t2, r3) => t2.has(e2) ? Vr("Cannot add the same private member more than once") : t2 instanceof WeakSet ? t2.add(e2) : t2.set(e2, r3);
2433
+ Bt = (e2, t2, r3, i2) => (Br(e2, t2, "write to private field"), i2 ? i2.call(e2, r3) : t2.set(e2, r3), r3);
2434
+ ln = `(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
2435
+ `;
2436
+ qr = typeof self < "u" && self.Blob && new Blob([ln], { type: "text/javascript;charset=utf-8" });
2437
+ Ti = "5";
2438
+ typeof window < "u" && ((an = window.__svelte ?? (window.__svelte = {})).v ?? (an.v = /* @__PURE__ */ new Set())).add(Ti);
2439
+ Ni = 1;
2440
+ Li = 4;
2441
+ Di = 8;
2442
+ Pi = 16;
2443
+ Oi = 1;
2444
+ Fi = 2;
2445
+ zt = "[";
2446
+ sn = "[!";
2447
+ fn = "]";
2448
+ Je = {};
2449
+ Z = Symbol();
2450
+ Mi = "http://www.w3.org/1999/xhtml";
2451
+ Hr = false;
2452
+ cn = Array.isArray;
2453
+ Ui = Array.prototype.indexOf;
2454
+ ji = Array.from;
2455
+ yt = Object.keys;
2456
+ Et = Object.defineProperty;
2457
+ Oe = Object.getOwnPropertyDescriptor;
2458
+ Vi = Object.getOwnPropertyDescriptors;
2459
+ Bi = Object.prototype;
2460
+ qi = Array.prototype;
2461
+ dn = Object.getPrototypeOf;
2462
+ Wr = Object.isExtensible;
2463
+ fe = 2;
2464
+ vn = 4;
2465
+ It = 8;
2466
+ Xt = 16;
2467
+ be = 32;
2468
+ Me = 64;
2469
+ xt = 128;
2470
+ ee = 256;
2471
+ $t = 512;
2472
+ K = 1024;
2473
+ he = 2048;
2474
+ Ue = 4096;
2475
+ Ke = 8192;
2476
+ St = 16384;
2477
+ Hi = 32768;
2478
+ Qt = 65536;
2479
+ Wi = 1 << 19;
2480
+ gn = 1 << 20;
2481
+ Ht = 1 << 21;
2482
+ ut = Symbol("$state");
2483
+ _n = Symbol("legacy props");
2484
+ Yi = Symbol("");
2485
+ L = false;
2486
+ no = false;
2487
+ vo = typeof requestIdleCallback > "u" ? (e2) => setTimeout(e2, 1) : requestIdleCallback;
2488
+ dt = [];
2489
+ ht = [];
2490
+ pt = false;
2491
+ kt = false;
2492
+ Ct = null;
2493
+ Fe = false;
2494
+ gt = false;
2495
+ ct = [];
2496
+ R = null;
2497
+ de = false;
2498
+ I = null;
2499
+ H = null;
2500
+ q = null;
2501
+ Q = 0;
2502
+ ie = null;
2503
+ Fn = 1;
2504
+ At = 0;
2505
+ Ce = false;
2506
+ $o = -7169;
2507
+ vt = /* @__PURE__ */ new Map();
2508
+ W = null;
2509
+ Co = ["touchstart", "touchmove"];
2510
+ Xr = false;
2511
+ Kn = /* @__PURE__ */ new Set();
2512
+ Jt = /* @__PURE__ */ new Set();
2513
+ Ye = /* @__PURE__ */ new Map();
2514
+ Kt = /* @__PURE__ */ new WeakMap();
2515
+ Qr = [...`
2516
+ \r\f\xA0\v\uFEFF`];
2517
+ Mo = Symbol("is custom element");
2518
+ Uo = Symbol("is html");
2519
+ tn = /* @__PURE__ */ new Map();
2520
+ wt = false;
2521
+ Yo = class {
2522
+ /**
2523
+ * @param {ComponentConstructorOptions & {
2524
+ * component: any;
2525
+ * }} options
2526
+ */
2527
+ constructor(t2) {
2528
+ Vt(this, pe);
2529
+ Vt(this, oe);
2530
+ var a2;
2531
+ var r3 = /* @__PURE__ */ new Map(), i2 = (l2, s2) => {
2532
+ var f2 = /* @__PURE__ */ qn(s2);
2533
+ return r3.set(l2, f2), f2;
2534
+ };
2535
+ const o2 = new Proxy(
2536
+ { ...t2.props || {}, $$events: {} },
2537
+ {
2538
+ get(l2, s2) {
2539
+ return c(r3.get(s2) ?? i2(s2, Reflect.get(l2, s2)));
2540
+ },
2541
+ has(l2, s2) {
2542
+ return s2 === _n ? true : (c(r3.get(s2) ?? i2(s2, Reflect.get(l2, s2))), Reflect.has(l2, s2));
2543
+ },
2544
+ set(l2, s2, f2) {
2545
+ return D(r3.get(s2) ?? i2(s2, f2), f2), Reflect.set(l2, s2, f2);
2546
+ }
2547
+ }
2548
+ );
2549
+ Bt(this, oe, (t2.hydrate ? Lo : zn)(t2.component, {
2550
+ target: t2.target,
2551
+ anchor: t2.anchor,
2552
+ props: o2,
2553
+ context: t2.context,
2554
+ intro: t2.intro ?? false,
2555
+ recover: t2.recover
2556
+ })), (!((a2 = t2 == null ? void 0 : t2.props) != null && a2.$$host) || t2.sync === false) && $(), Bt(this, pe, o2.$$events);
2557
+ for (const l2 of Object.keys(G(this, oe)))
2558
+ l2 === "$set" || l2 === "$destroy" || l2 === "$on" || Et(this, l2, {
2559
+ get() {
2560
+ return G(this, oe)[l2];
2561
+ },
2562
+ /** @param {any} value */
2563
+ set(s2) {
2564
+ G(this, oe)[l2] = s2;
2565
+ },
2566
+ enumerable: true
2567
+ });
2568
+ G(this, oe).$set = /** @param {Record<string, any>} next */
2569
+ (l2) => {
2570
+ Object.assign(o2, l2);
2571
+ }, G(this, oe).$destroy = () => {
2572
+ Do(G(this, oe));
2573
+ };
2574
+ }
2575
+ /** @param {Record<string, any>} props */
2576
+ $set(t2) {
2577
+ G(this, oe).$set(t2);
2578
+ }
2579
+ /**
2580
+ * @param {string} event
2581
+ * @param {(...args: any[]) => any} callback
2582
+ * @returns {any}
2583
+ */
2584
+ $on(t2, r3) {
2585
+ G(this, pe)[t2] = G(this, pe)[t2] || [];
2586
+ const i2 = (...o2) => r3.call(this, ...o2);
2587
+ return G(this, pe)[t2].push(i2), () => {
2588
+ G(this, pe)[t2] = G(this, pe)[t2].filter(
2589
+ /** @param {any} fn */
2590
+ (o2) => o2 !== i2
2591
+ );
2592
+ };
2593
+ }
2594
+ $destroy() {
2595
+ G(this, oe).$destroy();
2596
+ }
2597
+ };
2598
+ pe = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap();
2599
+ typeof HTMLElement == "function" && (ti = class extends HTMLElement {
2600
+ /**
2601
+ * @param {*} $$componentCtor
2602
+ * @param {*} $$slots
2603
+ * @param {*} use_shadow_dom
2604
+ */
2605
+ constructor(t2, r3, i2) {
2606
+ super();
2607
+ le(this, "$$ctor");
2608
+ le(this, "$$s");
2609
+ le(this, "$$c");
2610
+ le(this, "$$cn", false);
2611
+ le(this, "$$d", {});
2612
+ le(this, "$$r", false);
2613
+ le(this, "$$p_d", {});
2614
+ le(this, "$$l", {});
2615
+ le(this, "$$l_u", /* @__PURE__ */ new Map());
2616
+ le(this, "$$me");
2617
+ this.$$ctor = t2, this.$$s = r3, i2 && this.attachShadow({ mode: "open" });
2618
+ }
2619
+ /**
2620
+ * @param {string} type
2621
+ * @param {EventListenerOrEventListenerObject} listener
2622
+ * @param {boolean | AddEventListenerOptions} [options]
2623
+ */
2624
+ addEventListener(t2, r3, i2) {
2625
+ if (this.$$l[t2] = this.$$l[t2] || [], this.$$l[t2].push(r3), this.$$c) {
2626
+ const o2 = this.$$c.$on(t2, r3);
2627
+ this.$$l_u.set(r3, o2);
2628
+ }
2629
+ super.addEventListener(t2, r3, i2);
2630
+ }
2631
+ /**
2632
+ * @param {string} type
2633
+ * @param {EventListenerOrEventListenerObject} listener
2634
+ * @param {boolean | AddEventListenerOptions} [options]
2635
+ */
2636
+ removeEventListener(t2, r3, i2) {
2637
+ if (super.removeEventListener(t2, r3, i2), this.$$c) {
2638
+ const o2 = this.$$l_u.get(r3);
2639
+ o2 && (o2(), this.$$l_u.delete(r3));
2640
+ }
2641
+ }
2642
+ async connectedCallback() {
2643
+ if (this.$$cn = true, !this.$$c) {
2644
+ let t2 = function(o2) {
2645
+ return (a2) => {
2646
+ const l2 = document.createElement("slot");
2647
+ o2 !== "default" && (l2.name = o2), ne(a2, l2);
2648
+ };
2649
+ };
2650
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
2651
+ return;
2652
+ const r3 = {}, i2 = Go(this);
2653
+ for (const o2 of this.$$s)
2654
+ o2 in i2 && (o2 === "default" && !this.$$d.children ? (this.$$d.children = t2(o2), r3.default = true) : r3[o2] = t2(o2));
2655
+ for (const o2 of this.attributes) {
2656
+ const a2 = this.$$g_p(o2.name);
2657
+ a2 in this.$$d || (this.$$d[a2] = bt(a2, o2.value, this.$$p_d, "toProp"));
2658
+ }
2659
+ for (const o2 in this.$$p_d)
2660
+ !(o2 in this.$$d) && this[o2] !== void 0 && (this.$$d[o2] = this[o2], delete this[o2]);
2661
+ this.$$c = Wo({
2662
+ component: this.$$ctor,
2663
+ target: this.shadowRoot || this,
2664
+ props: {
2665
+ ...this.$$d,
2666
+ $$slots: r3,
2667
+ $$host: this
2668
+ }
2669
+ }), this.$$me = fo(() => {
2670
+ nr(() => {
2671
+ var o2;
2672
+ this.$$r = true;
2673
+ for (const a2 of yt(this.$$c)) {
2674
+ if (!((o2 = this.$$p_d[a2]) != null && o2.reflect)) continue;
2675
+ this.$$d[a2] = this.$$c[a2];
2676
+ const l2 = bt(
2677
+ a2,
2678
+ this.$$d[a2],
2679
+ this.$$p_d,
2680
+ "toAttribute"
2681
+ );
2682
+ l2 == null ? this.removeAttribute(this.$$p_d[a2].attribute || a2) : this.setAttribute(this.$$p_d[a2].attribute || a2, l2);
2683
+ }
2684
+ this.$$r = false;
2685
+ });
2686
+ });
2687
+ for (const o2 in this.$$l)
2688
+ for (const a2 of this.$$l[o2]) {
2689
+ const l2 = this.$$c.$on(o2, a2);
2690
+ this.$$l_u.set(a2, l2);
2691
+ }
2692
+ this.$$l = {};
2693
+ }
2694
+ }
2695
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
2696
+ // and setting attributes through setAttribute etc, this is helpful
2697
+ /**
2698
+ * @param {string} attr
2699
+ * @param {string} _oldValue
2700
+ * @param {string} newValue
2701
+ */
2702
+ attributeChangedCallback(t2, r3, i2) {
2703
+ var o2;
2704
+ this.$$r || (t2 = this.$$g_p(t2), this.$$d[t2] = bt(t2, i2, this.$$p_d, "toProp"), (o2 = this.$$c) == null || o2.$set({ [t2]: this.$$d[t2] }));
2705
+ }
2706
+ disconnectedCallback() {
2707
+ this.$$cn = false, Promise.resolve().then(() => {
2708
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2709
+ });
2710
+ }
2711
+ /**
2712
+ * @param {string} attribute_name
2713
+ */
2714
+ $$g_p(t2) {
2715
+ return yt(this.$$p_d).find(
2716
+ (r3) => this.$$p_d[r3].attribute === t2 || !this.$$p_d[r3].attribute && r3.toLowerCase() === t2
2717
+ ) || t2;
2718
+ }
2719
+ });
2720
+ ri = new TextEncoder();
2721
+ b = /* @__PURE__ */ ((e2) => (e2.ERROR = "error", e2.VERIFIED = "verified", e2.VERIFYING = "verifying", e2.UNVERIFIED = "unverified", e2.EXPIRED = "expired", e2))(b || {});
2722
+ ra = /* @__PURE__ */ No('<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>');
2723
+ na = /* @__PURE__ */ ge('<span role="status" aria-live="polite"><!></span> <input type="hidden">', 1);
2724
+ ia = /* @__PURE__ */ ge('<span role="status" aria-live="polite"><!></span>');
2725
+ oa = /* @__PURE__ */ ge("<label><!></label>");
2726
+ aa = /* @__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>');
2727
+ la = /* @__PURE__ */ ge("<div><!></div>");
2728
+ sa = /* @__PURE__ */ ge("<div><!></div>");
2729
+ fa = /* @__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>');
2730
+ ua = /* @__PURE__ */ ge('<div class="altcha-footer"><div><!></div></div>');
2731
+ ca = /* @__PURE__ */ ge('<div class="altcha-anchor-arrow"></div>');
2732
+ da = /* @__PURE__ */ ge('<!> <div class="altcha"><div class="altcha-main"><!> <div><input type="checkbox"></div> <div class="altcha-label"><!></div> <!></div> <!> <!> <!></div>', 1);
2733
+ To(["change"]);
2734
+ customElements.define("altcha-widget", Zo(
2735
+ ha,
2736
+ {
2737
+ blockspam: { type: "Boolean" },
2738
+ debug: { type: "Boolean" },
2739
+ delay: { type: "Number" },
2740
+ expire: { type: "Number" },
2741
+ floatingoffset: { type: "Number" },
2742
+ hidefooter: { type: "Boolean" },
2743
+ hidelogo: { type: "Boolean" },
2744
+ maxnumber: { type: "Number" },
2745
+ mockerror: { type: "Boolean" },
2746
+ refetchonexpire: { type: "Boolean" },
2747
+ test: { type: "Boolean" },
2748
+ workers: { type: "Number" },
2749
+ auto: {},
2750
+ challengeurl: {},
2751
+ challengejson: {},
2752
+ customfetch: {},
2753
+ floating: {},
2754
+ floatinganchor: {},
2755
+ floatingpersist: {},
2756
+ id: {},
2757
+ name: {},
2758
+ obfuscated: {},
2759
+ plugins: {},
2760
+ spamfilter: {},
2761
+ strings: {},
2762
+ verifyurl: {},
2763
+ workerurl: {}
2764
+ },
2765
+ ["default"],
2766
+ [
2767
+ "clarify",
2768
+ "configure",
2769
+ "getConfiguration",
2770
+ "getFloatingAnchor",
2771
+ "getPlugin",
2772
+ "getState",
2773
+ "hide",
2774
+ "repositionFloating",
2775
+ "reset",
2776
+ "setFloatingAnchor",
2777
+ "setState",
2778
+ "show",
2779
+ "verify"
2780
+ ],
2781
+ false
2782
+ ));
2783
+ va = '@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem}.altcha-label{flex-grow:1}.altcha-label label{cursor:pointer}.altcha-logo{color:currentColor;opacity:.3}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.4;padding:.2rem .7rem;text-align:right}.altcha-footer>:first-child{flex-grow:1}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-hidden{display:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}';
2784
+ globalThis.altchaCreateWorker = (e2) => e2 ? new Worker(new URL(e2)) : new Si();
2785
+ globalThis.altchaPlugins = globalThis.altchaPlugins || [];
2786
+ ga(va);
2787
+ }
2788
+ });
31
2789
 
32
2790
  // src/rendering/client.ts
33
2791
  var client_exports = {};
@@ -294,7 +3052,7 @@ function RichText({ as: Comp = "div", className = "", doc, path }) {
294
3052
 
295
3053
  // ../blocks/src/primitives/content/components/Text.tsx
296
3054
  var import_jsx_runtime7 = require("react/jsx-runtime");
297
- function Text({ as: Comp = "span", children, className = "", path }) {
3055
+ function Text2({ as: Comp = "span", children, className = "", path }) {
298
3056
  const dataAttributes = path ? { "data-builder-text": path } : void 0;
299
3057
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Comp, { className, ...dataAttributes, children });
300
3058
  }
@@ -302,7 +3060,7 @@ function Text({ as: Comp = "span", children, className = "", path }) {
302
3060
  // ../blocks/src/system/runtime/nodes/basic.tsx
303
3061
  var import_jsx_runtime8 = require("react/jsx-runtime");
304
3062
  var TextNode = ({ value, children, blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...rest }) => {
305
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { ...rest, children: value ?? children });
3063
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text2, { ...rest, children: value ?? children });
306
3064
  };
307
3065
  var RichTextNode = ({ value, blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...rest }) => {
308
3066
  const doc = value?.doc ?? value;
@@ -1306,7 +4064,7 @@ function useCalendarEvents({
1306
4064
  }
1307
4065
  }
1308
4066
  }, [initialEvents]);
1309
- const fetchEventsForRange = (0, import_react4.useCallback)(async (from, to, targetMonths) => {
4067
+ const fetchEventsForRange = (0, import_react4.useCallback)(async (from, to2, targetMonths) => {
1310
4068
  const monthsToFetch = targetMonths.filter(
1311
4069
  (m2) => !loadedMonthsRef.current.has(m2) && !fetchingRef.current.has(m2)
1312
4070
  );
@@ -1318,7 +4076,7 @@ function useCalendarEvents({
1318
4076
  try {
1319
4077
  const params = new URLSearchParams({
1320
4078
  from,
1321
- to,
4079
+ to: to2,
1322
4080
  limit: String(CALENDAR_FETCH_LIMIT)
1323
4081
  });
1324
4082
  const apiBaseUrl = getCmsApiUrl();
@@ -1378,7 +4136,7 @@ function useCalendarEvents({
1378
4136
  const monthKey = getMonthKey(viewDate);
1379
4137
  const monthEvents = cacheRef.current.get(monthKey) || [];
1380
4138
  return [...monthEvents].sort(
1381
- (a2, b2) => new Date(a2.startsAt).getTime() - new Date(b2.startsAt).getTime()
4139
+ (a2, b3) => new Date(a2.startsAt).getTime() - new Date(b3.startsAt).getTime()
1382
4140
  );
1383
4141
  }, [viewDate, cacheVersion]);
1384
4142
  const goToPrevious = (0, import_react4.useCallback)(() => {
@@ -1650,71 +4408,84 @@ var serverComponentRegistry = {
1650
4408
  // ../blocks/src/system/runtime/nodes/form.client.tsx
1651
4409
  var import_react8 = require("react");
1652
4410
 
1653
- // ../turnstile/dist/client.mjs
4411
+ // ../altcha/dist/client.mjs
1654
4412
  var import_react6 = require("react");
1655
- function ensureScript() {
1656
- return new Promise((resolve) => {
1657
- if (typeof window === "undefined") return resolve();
1658
- const existing = document.querySelector("script[data-turnstile]");
1659
- if (existing && window.turnstile) return resolve();
1660
- if (existing && !window.turnstile) {
1661
- existing.addEventListener("load", () => resolve());
1662
- existing.addEventListener("error", () => resolve());
1663
- return;
1664
- }
1665
- const s2 = document.createElement("script");
1666
- s2.src = "https://challenges.cloudflare.com/turnstile/v0/api.js";
1667
- s2.async = true;
1668
- s2.defer = true;
1669
- s2.setAttribute("data-turnstile", "1");
1670
- s2.onload = () => resolve();
1671
- s2.onerror = () => resolve();
1672
- document.head.appendChild(s2);
1673
- });
1674
- }
1675
- function TurnstileWidget({ inputName = "cf-turnstile-response", onTokenChange, className }) {
4413
+ function AltchaWidget({
4414
+ challengeUrl,
4415
+ onSolutionChange,
4416
+ auto = true,
4417
+ hidelogo = false,
4418
+ className
4419
+ }) {
1676
4420
  const containerRef = (0, import_react6.useRef)(null);
4421
+ const [isLoaded, setIsLoaded] = (0, import_react6.useState)(false);
1677
4422
  (0, import_react6.useEffect)(() => {
1678
- const siteKey = process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY;
1679
- if (!siteKey || !containerRef.current) return;
1680
- let destroyed = false;
1681
- (async () => {
1682
- await ensureScript();
1683
- if (destroyed || !containerRef.current) return;
1684
- const form = containerRef.current.closest("form");
1685
- const input = form?.querySelector(`input[name="${inputName}"]`);
1686
- const setToken = (token) => {
1687
- if (input && typeof token === "string") input.value = token;
1688
- if (input && token === null) input.value = "";
1689
- try {
1690
- onTokenChange?.(token);
1691
- } catch {
1692
- }
1693
- };
1694
- try {
1695
- window.turnstile?.render(containerRef.current, {
1696
- sitekey: siteKey,
1697
- callback: (token) => setToken(token),
1698
- "refresh-expired": "auto",
1699
- "retry-interval": 5e3
1700
- });
1701
- } catch {
4423
+ if (typeof window === "undefined") return;
4424
+ let widget = null;
4425
+ Promise.resolve().then(() => (init_altcha(), altcha_exports)).then(() => {
4426
+ if (!containerRef.current) return;
4427
+ widget = document.createElement("altcha-widget");
4428
+ widget.setAttribute("challengeurl", challengeUrl);
4429
+ if (auto) {
4430
+ widget.setAttribute("auto", "onload");
1702
4431
  }
1703
- })();
4432
+ if (hidelogo) {
4433
+ widget.setAttribute("hidelogo", "true");
4434
+ }
4435
+ widget.setAttribute("hidefooter", "true");
4436
+ if (className) {
4437
+ widget.className = className;
4438
+ }
4439
+ widget.addEventListener("statechange", ((event) => {
4440
+ const { state, payload } = event.detail;
4441
+ if (state === "verified" && payload) {
4442
+ onSolutionChange?.(payload);
4443
+ } else if (state === "error" || state === "expired") {
4444
+ onSolutionChange?.(null);
4445
+ }
4446
+ }));
4447
+ containerRef.current.appendChild(widget);
4448
+ setIsLoaded(true);
4449
+ }).catch((err) => {
4450
+ console.error("Failed to load ALTCHA widget:", err);
4451
+ });
1704
4452
  return () => {
1705
- destroyed = true;
4453
+ if (widget && containerRef.current) {
4454
+ containerRef.current.removeChild(widget);
4455
+ }
1706
4456
  };
1707
- }, [inputName]);
1708
- return /* @__PURE__ */ React.createElement("div", { ref: containerRef, className: className || "hidden" });
4457
+ }, [challengeUrl, auto, hidelogo, className, onSolutionChange]);
4458
+ return /* @__PURE__ */ React.createElement("div", { ref: containerRef });
1709
4459
  }
4460
+ function isSpamProtectionEnabled() {
4461
+ return process.env.NEXT_PUBLIC_SPAM_PROTECTION_ENABLED === "true";
4462
+ }
4463
+
4464
+ // ../../node_modules/.pnpm/altcha-lib@1.4.1/node_modules/altcha-lib/dist/helpers.js
4465
+ var encoder = new TextEncoder();
1710
4466
 
1711
- // ../turnstile/dist/index.mjs
1712
- function getSiteKey() {
1713
- const v2 = process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY;
1714
- return v2 && v2.trim().length > 0 ? v2 : null;
4467
+ // ../altcha/dist/index.mjs
4468
+ function getCmsApiUrl2() {
4469
+ const env = process.env.RIVERBANK_ENV;
4470
+ if (env) {
4471
+ const envKey = `RIVERBANK_${env.toUpperCase()}_DASHBOARD_URL`;
4472
+ const dashboardUrl2 = process.env[envKey];
4473
+ if (dashboardUrl2) {
4474
+ return `${dashboardUrl2.replace(/\/$/, "")}/api`;
4475
+ }
4476
+ }
4477
+ const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
4478
+ if (dashboardUrl) {
4479
+ return `${dashboardUrl.replace(/\/$/, "")}/api`;
4480
+ }
4481
+ const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
4482
+ if (legacyApiUrl) {
4483
+ return legacyApiUrl.replace(/\/$/, "");
4484
+ }
4485
+ throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
1715
4486
  }
1716
- function hasTurnstile() {
1717
- return Boolean(getSiteKey());
4487
+ function getChallengeUrl() {
4488
+ return `${getCmsApiUrl2()}/public/challenge`;
1718
4489
  }
1719
4490
 
1720
4491
  // ../blocks/src/system/runtime/hooks/useFormSubmission.ts
@@ -1756,10 +4527,17 @@ function useFormSubmission() {
1756
4527
 
1757
4528
  // ../blocks/src/system/runtime/nodes/form.client.tsx
1758
4529
  var import_jsx_runtime23 = require("react/jsx-runtime");
1759
- var FormNodeClient = ({ value, submitLabel, successMessage, className }) => {
4530
+ var FormNodeClient = ({
4531
+ value,
4532
+ submitLabel,
4533
+ successMessage,
4534
+ className,
4535
+ spamProtectionEnabled
4536
+ }) => {
1760
4537
  const form = value;
1761
4538
  const { submit, isSubmitting, error, isSuccess } = useFormSubmission();
1762
- const [turnstileToken, setTurnstileToken] = (0, import_react8.useState)(null);
4539
+ const [altchaSolution, setAltchaSolution] = (0, import_react8.useState)(null);
4540
+ const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
1763
4541
  if (!form) {
1764
4542
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1765
4543
  "div",
@@ -1783,7 +4561,7 @@ var FormNodeClient = ({ value, submitLabel, successMessage, className }) => {
1783
4561
  const data = {};
1784
4562
  const entries = Array.from(formData);
1785
4563
  for (const [key, fieldValue] of entries) {
1786
- if (key === "company" || key === "cf-turnstile-response") continue;
4564
+ if (key === "company" || key === "altcha-solution") continue;
1787
4565
  if (key in data) {
1788
4566
  const existing = data[key];
1789
4567
  data[key] = Array.isArray(existing) ? [...existing, fieldValue] : [existing, fieldValue];
@@ -1797,7 +4575,7 @@ var FormNodeClient = ({ value, submitLabel, successMessage, className }) => {
1797
4575
  data,
1798
4576
  meta: {
1799
4577
  honeypot,
1800
- turnstileToken,
4578
+ altchaSolution,
1801
4579
  referer: typeof window !== "undefined" ? window.location.href : void 0,
1802
4580
  userAgent: typeof navigator !== "undefined" ? navigator.userAgent : void 0
1803
4581
  }
@@ -1810,7 +4588,6 @@ var FormNodeClient = ({ value, submitLabel, successMessage, className }) => {
1810
4588
  }
1811
4589
  const errorBanner = error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mb-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-900", children: error }) : null;
1812
4590
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("form", { onSubmit: handleSubmit, className: clsx_default("space-y-4", className), children: [
1813
- hasTurnstile() ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TurnstileWidget, { onTokenChange: setTurnstileToken }) : null,
1814
4591
  errorBanner,
1815
4592
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { type: "text", name: "company", className: "hidden", tabIndex: -1, autoComplete: "off" }),
1816
4593
  Array.isArray(fields) ? fields.map((field) => {
@@ -1912,6 +4689,7 @@ var FormNodeClient = ({ value, submitLabel, successMessage, className }) => {
1912
4689
  )
1913
4690
  ] }, field.id);
1914
4691
  }) : null,
4692
+ showSpamProtection && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AltchaWidget, { challengeUrl: getChallengeUrl(), onSolutionChange: setAltchaSolution }),
1915
4693
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1916
4694
  "button",
1917
4695
  {
@@ -3299,7 +6077,8 @@ function useBookingSubmission(_siteId) {
3299
6077
  startAt: data.startAt,
3300
6078
  endAt: data.endAt,
3301
6079
  customFields: data.customFields,
3302
- timezone: data.timezone
6080
+ timezone: data.timezone,
6081
+ altchaSolution: data.altchaSolution ?? null
3303
6082
  })
3304
6083
  });
3305
6084
  if (!response.ok) {
@@ -3324,9 +6103,12 @@ var BookingFormClient = ({
3324
6103
  formId,
3325
6104
  className,
3326
6105
  form,
3327
- services = []
6106
+ services = [],
6107
+ spamProtectionEnabled
3328
6108
  }) => {
3329
6109
  const [isSuccess, setIsSuccess] = (0, import_react19.useState)(false);
6110
+ const [altchaSolution, setAltchaSolution] = (0, import_react19.useState)(null);
6111
+ const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
3330
6112
  const siteId = siteIdProp || form?.siteId || "";
3331
6113
  import_react19.default.useEffect(() => {
3332
6114
  if (!siteId) {
@@ -3405,8 +6187,9 @@ var BookingFormClient = ({
3405
6187
  startAt: data.selectedSlot,
3406
6188
  endAt: endDate.toISOString(),
3407
6189
  customFields,
3408
- timezone: "UTC"
6190
+ timezone: "UTC",
3409
6191
  // TODO: Get from resource or user preference
6192
+ altchaSolution
3410
6193
  });
3411
6194
  setIsSuccess(true);
3412
6195
  } catch (err) {
@@ -3418,20 +6201,29 @@ var BookingFormClient = ({
3418
6201
  const successMessage = formConfig?.settings?.successMessage || "Your appointment has been booked! Check your email for confirmation.";
3419
6202
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SuccessMessage, { message: successMessage, className });
3420
6203
  }
3421
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3422
- MultiStepForm,
3423
- {
3424
- steps,
3425
- initialData: {
3426
- serviceId: formConfig?.settings?.serviceId,
3427
- resourceId: formConfig?.settings?.resourceId
3428
- },
3429
- onComplete: handleComplete,
3430
- progressStyle: "steps",
3431
- persistToUrl: false,
3432
- allowSkip: false
3433
- }
3434
- ) });
6204
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className, children: [
6205
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6206
+ MultiStepForm,
6207
+ {
6208
+ steps,
6209
+ initialData: {
6210
+ serviceId: formConfig?.settings?.serviceId,
6211
+ resourceId: formConfig?.settings?.resourceId
6212
+ },
6213
+ onComplete: handleComplete,
6214
+ progressStyle: "steps",
6215
+ persistToUrl: false,
6216
+ allowSkip: false
6217
+ }
6218
+ ),
6219
+ showSpamProtection && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6220
+ AltchaWidget,
6221
+ {
6222
+ challengeUrl: getChallengeUrl(),
6223
+ onSolutionChange: setAltchaSolution
6224
+ }
6225
+ ) })
6226
+ ] });
3435
6227
  };
3436
6228
 
3437
6229
  // ../blocks/src/system/runtime/nodes/event-calendar-grid.client.tsx
@@ -4099,7 +6891,15 @@ async function submitRegistration(endpoint, data) {
4099
6891
  const response = await fetch(endpoint, {
4100
6892
  method: "POST",
4101
6893
  headers: { "Content-Type": "application/json" },
4102
- body: JSON.stringify(data)
6894
+ body: JSON.stringify({
6895
+ occurrenceId: data.occurrenceId,
6896
+ email: data.email,
6897
+ name: data.name,
6898
+ ticketsCount: data.ticketsCount,
6899
+ phone: data.phone,
6900
+ notes: data.notes,
6901
+ altchaSolution: data.altchaSolution ?? null
6902
+ })
4103
6903
  });
4104
6904
  const result = await response.json();
4105
6905
  if (!response.ok) {
@@ -4119,7 +6919,8 @@ var EventRegistrationClient = ({
4119
6919
  buttonText = "Complete Registration",
4120
6920
  buttonVariant = "primary",
4121
6921
  className,
4122
- registrationEndpoint
6922
+ registrationEndpoint,
6923
+ spamProtectionEnabled
4123
6924
  }) => {
4124
6925
  const maxTicketsNum = parseInt(maxTickets, 10) || 5;
4125
6926
  const preSelectedEvent = occurrenceContext ? events?.find(
@@ -4140,6 +6941,8 @@ var EventRegistrationClient = ({
4140
6941
  const [errors, setErrors] = (0, import_react21.useState)({});
4141
6942
  const [registrationResult, setRegistrationResult] = (0, import_react21.useState)(null);
4142
6943
  const [errorMessage, setErrorMessage] = (0, import_react21.useState)("");
6944
+ const [altchaSolution, setAltchaSolution] = (0, import_react21.useState)(null);
6945
+ const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
4143
6946
  const normalizedEvents = events ?? [];
4144
6947
  const validateForm = () => {
4145
6948
  const newErrors = validateFormData(formData);
@@ -4158,7 +6961,8 @@ var EventRegistrationClient = ({
4158
6961
  name: formData.name.trim(),
4159
6962
  ticketsCount,
4160
6963
  phone: formData.phone.trim() || void 0,
4161
- notes: formData.notes.trim() || void 0
6964
+ notes: formData.notes.trim() || void 0,
6965
+ altchaSolution
4162
6966
  });
4163
6967
  setRegistrationResult({
4164
6968
  status: result.status,
@@ -4226,6 +7030,13 @@ var EventRegistrationClient = ({
4226
7030
  errors
4227
7031
  }
4228
7032
  ),
7033
+ showSpamProtection && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7034
+ AltchaWidget,
7035
+ {
7036
+ challengeUrl: getChallengeUrl(),
7037
+ onSolutionChange: setAltchaSolution
7038
+ }
7039
+ ) }),
4229
7040
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-6", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4230
7041
  "button",
4231
7042
  {
@@ -7502,9 +10313,9 @@ function useControllableState({
7502
10313
  const wasControlled = isControlledRef.current;
7503
10314
  if (wasControlled !== isControlled) {
7504
10315
  const from = wasControlled ? "controlled" : "uncontrolled";
7505
- const to = isControlled ? "controlled" : "uncontrolled";
10316
+ const to2 = isControlled ? "controlled" : "uncontrolled";
7506
10317
  console.warn(
7507
- `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
10318
+ `${caller} is changing from ${from} to ${to2}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
7508
10319
  );
7509
10320
  }
7510
10321
  isControlledRef.current = isControlled;
@@ -8369,14 +11180,14 @@ function __rest(s2, e2) {
8369
11180
  }
8370
11181
  return t2;
8371
11182
  }
8372
- function __spreadArray(to, from, pack) {
11183
+ function __spreadArray(to2, from, pack) {
8373
11184
  if (pack || arguments.length === 2) for (var i2 = 0, l2 = from.length, ar; i2 < l2; i2++) {
8374
11185
  if (ar || !(i2 in from)) {
8375
11186
  if (!ar) ar = Array.prototype.slice.call(from, 0, i2);
8376
11187
  ar[i2] = from[i2];
8377
11188
  }
8378
11189
  }
8379
- return to.concat(ar || Array.prototype.slice.call(from));
11190
+ return to2.concat(ar || Array.prototype.slice.call(from));
8380
11191
  }
8381
11192
 
8382
11193
  // ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.11_react@19.2.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
@@ -9634,7 +12445,7 @@ var __iconNode12 = [
9634
12445
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
9635
12446
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
9636
12447
  ];
9637
- var X = createLucideIcon("x", __iconNode12);
12448
+ var X2 = createLucideIcon("x", __iconNode12);
9638
12449
 
9639
12450
  // ../ui/dist/index.mjs
9640
12451
  var import_jsx_runtime65 = require("react/jsx-runtime");
@@ -9701,7 +12512,7 @@ function createCollection(name) {
9701
12512
  const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
9702
12513
  const items = Array.from(context.itemMap.values());
9703
12514
  const orderedItems = items.sort(
9704
- (a2, b2) => orderedNodes.indexOf(a2.ref.current) - orderedNodes.indexOf(b2.ref.current)
12515
+ (a2, b3) => orderedNodes.indexOf(a2.ref.current) - orderedNodes.indexOf(b3.ref.current)
9705
12516
  );
9706
12517
  return orderedItems;
9707
12518
  }, [context.collectionRef, context.itemMap]);
@@ -9938,14 +12749,14 @@ var computePosition = async (reference, floating, config) => {
9938
12749
  for (let i2 = 0; i2 < validMiddleware.length; i2++) {
9939
12750
  const {
9940
12751
  name,
9941
- fn
12752
+ fn: fn2
9942
12753
  } = validMiddleware[i2];
9943
12754
  const {
9944
12755
  x: nextX,
9945
12756
  y: nextY,
9946
12757
  data,
9947
12758
  reset
9948
- } = await fn({
12759
+ } = await fn2({
9949
12760
  x: x2,
9950
12761
  y: y2,
9951
12762
  initialPlacement: placement,
@@ -10188,7 +12999,7 @@ var flip = function(options) {
10188
12999
  };
10189
13000
  }
10190
13001
  }
10191
- let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
13002
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b3) => a2.overflows[1] - b3.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
10192
13003
  if (!resetPlacement) {
10193
13004
  switch (fallbackStrategy) {
10194
13005
  case "bestFit": {
@@ -10201,7 +13012,7 @@ var flip = function(options) {
10201
13012
  currentSideAxis === "y";
10202
13013
  }
10203
13014
  return true;
10204
- }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
13015
+ }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b3) => a2[1] - b3[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
10205
13016
  if (placement2) {
10206
13017
  resetPlacement = placement2;
10207
13018
  }
@@ -10752,10 +13563,10 @@ function getScale(element) {
10752
13563
  const {
10753
13564
  width,
10754
13565
  height,
10755
- $: $2
13566
+ $: $3
10756
13567
  } = getCssDimensions(domElement);
10757
- let x2 = ($2 ? round(rect.width) : rect.width) / width;
10758
- let y2 = ($2 ? round(rect.height) : rect.height) / height;
13568
+ let x2 = ($3 ? round(rect.width) : rect.width) / width;
13569
+ let y2 = ($3 ? round(rect.height) : rect.height) / height;
10759
13570
  if (!x2 || !Number.isFinite(x2)) {
10760
13571
  x2 = 1;
10761
13572
  }
@@ -11164,18 +13975,18 @@ var platform = {
11164
13975
  isElement,
11165
13976
  isRTL
11166
13977
  };
11167
- function rectsAreEqual(a2, b2) {
11168
- return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height;
13978
+ function rectsAreEqual(a2, b3) {
13979
+ return a2.x === b3.x && a2.y === b3.y && a2.width === b3.width && a2.height === b3.height;
11169
13980
  }
11170
13981
  function observeMove(element, onMove) {
11171
- let io = null;
13982
+ let io2 = null;
11172
13983
  let timeoutId;
11173
13984
  const root = getDocumentElement(element);
11174
13985
  function cleanup() {
11175
13986
  var _io;
11176
13987
  clearTimeout(timeoutId);
11177
- (_io = io) == null || _io.disconnect();
11178
- io = null;
13988
+ (_io = io2) == null || _io.disconnect();
13989
+ io2 = null;
11179
13990
  }
11180
13991
  function refresh(skip, threshold) {
11181
13992
  if (skip === void 0) {
@@ -11228,15 +14039,15 @@ function observeMove(element, onMove) {
11228
14039
  isFirstUpdate = false;
11229
14040
  }
11230
14041
  try {
11231
- io = new IntersectionObserver(handleObserve, {
14042
+ io2 = new IntersectionObserver(handleObserve, {
11232
14043
  ...options,
11233
14044
  // Handle <iframe>s
11234
14045
  root: root.ownerDocument
11235
14046
  });
11236
14047
  } catch (_e) {
11237
- io = new IntersectionObserver(handleObserve, options);
14048
+ io2 = new IntersectionObserver(handleObserve, options);
11238
14049
  }
11239
- io.observe(element);
14050
+ io2.observe(element);
11240
14051
  }
11241
14052
  refresh(true);
11242
14053
  return cleanup;
@@ -11340,25 +14151,25 @@ var isClient = typeof document !== "undefined";
11340
14151
  var noop = function noop2() {
11341
14152
  };
11342
14153
  var index = isClient ? import_react27.useLayoutEffect : noop;
11343
- function deepEqual(a2, b2) {
11344
- if (a2 === b2) {
14154
+ function deepEqual(a2, b3) {
14155
+ if (a2 === b3) {
11345
14156
  return true;
11346
14157
  }
11347
- if (typeof a2 !== typeof b2) {
14158
+ if (typeof a2 !== typeof b3) {
11348
14159
  return false;
11349
14160
  }
11350
- if (typeof a2 === "function" && a2.toString() === b2.toString()) {
14161
+ if (typeof a2 === "function" && a2.toString() === b3.toString()) {
11351
14162
  return true;
11352
14163
  }
11353
14164
  let length;
11354
14165
  let i2;
11355
14166
  let keys;
11356
- if (a2 && b2 && typeof a2 === "object") {
14167
+ if (a2 && b3 && typeof a2 === "object") {
11357
14168
  if (Array.isArray(a2)) {
11358
14169
  length = a2.length;
11359
- if (length !== b2.length) return false;
14170
+ if (length !== b3.length) return false;
11360
14171
  for (i2 = length; i2-- !== 0; ) {
11361
- if (!deepEqual(a2[i2], b2[i2])) {
14172
+ if (!deepEqual(a2[i2], b3[i2])) {
11362
14173
  return false;
11363
14174
  }
11364
14175
  }
@@ -11366,11 +14177,11 @@ function deepEqual(a2, b2) {
11366
14177
  }
11367
14178
  keys = Object.keys(a2);
11368
14179
  length = keys.length;
11369
- if (length !== Object.keys(b2).length) {
14180
+ if (length !== Object.keys(b3).length) {
11370
14181
  return false;
11371
14182
  }
11372
14183
  for (i2 = length; i2-- !== 0; ) {
11373
- if (!{}.hasOwnProperty.call(b2, keys[i2])) {
14184
+ if (!{}.hasOwnProperty.call(b3, keys[i2])) {
11374
14185
  return false;
11375
14186
  }
11376
14187
  }
@@ -11379,13 +14190,13 @@ function deepEqual(a2, b2) {
11379
14190
  if (key === "_owner" && a2.$$typeof) {
11380
14191
  continue;
11381
14192
  }
11382
- if (!deepEqual(a2[key], b2[key])) {
14193
+ if (!deepEqual(a2[key], b3[key])) {
11383
14194
  return false;
11384
14195
  }
11385
14196
  }
11386
14197
  return true;
11387
14198
  }
11388
- return a2 !== a2 && b2 !== b2;
14199
+ return a2 !== a2 && b3 !== b3;
11389
14200
  }
11390
14201
  function getDPR(element) {
11391
14202
  if (typeof window === "undefined") {
@@ -13520,7 +16331,7 @@ function u() {
13520
16331
  return e2;
13521
16332
  }).apply(this, arguments);
13522
16333
  }
13523
- function c(e2, r3) {
16334
+ function c2(e2, r3) {
13524
16335
  if (null == e2) return {};
13525
16336
  var t2, n2, o2 = {}, a2 = Object.keys(e2);
13526
16337
  for (n2 = 0; n2 < a2.length; n2++) r3.indexOf(t2 = a2[n2]) >= 0 || (o2[t2] = e2[t2]);
@@ -13552,9 +16363,9 @@ var h = function(e2) {
13552
16363
  !f(e2) && e2.preventDefault();
13553
16364
  };
13554
16365
  var m = import_react28.default.memo(function(o2) {
13555
- var a2 = o2.onMove, l2 = o2.onKey, s2 = c(o2, ["onMove", "onKey"]), m2 = (0, import_react28.useRef)(null), g2 = i(a2), p2 = i(l2), b2 = (0, import_react28.useRef)(null), _2 = (0, import_react28.useRef)(false), x2 = (0, import_react28.useMemo)(function() {
16366
+ var a2 = o2.onMove, l2 = o2.onKey, s2 = c2(o2, ["onMove", "onKey"]), m2 = (0, import_react28.useRef)(null), g2 = i(a2), p2 = i(l2), b3 = (0, import_react28.useRef)(null), _2 = (0, import_react28.useRef)(false), x2 = (0, import_react28.useMemo)(function() {
13556
16367
  var e2 = function(e3) {
13557
- h(e3), (f(e3) ? e3.touches.length > 0 : e3.buttons > 0) && m2.current ? g2(d(m2.current, e3, b2.current)) : t2(false);
16368
+ h(e3), (f(e3) ? e3.touches.length > 0 : e3.buttons > 0) && m2.current ? g2(d(m2.current, e3, b3.current)) : t2(false);
13558
16369
  }, r3 = function() {
13559
16370
  return t2(false);
13560
16371
  };
@@ -13570,18 +16381,18 @@ var m = import_react28.default.memo(function(o2) {
13570
16381
  if (f(r4)) {
13571
16382
  _2.current = true;
13572
16383
  var o3 = r4.changedTouches || [];
13573
- o3.length && (b2.current = o3[0].identifier);
16384
+ o3.length && (b3.current = o3[0].identifier);
13574
16385
  }
13575
- n2.focus(), g2(d(n2, r4, b2.current)), t2(true);
16386
+ n2.focus(), g2(d(n2, r4, b3.current)), t2(true);
13576
16387
  }
13577
16388
  }, function(e3) {
13578
16389
  var r4 = e3.which || e3.keyCode;
13579
16390
  r4 < 37 || r4 > 40 || (e3.preventDefault(), p2({ left: 39 === r4 ? 0.05 : 37 === r4 ? -0.05 : 0, top: 40 === r4 ? 0.05 : 38 === r4 ? -0.05 : 0 }));
13580
16391
  }, t2];
13581
- }, [p2, g2]), C2 = x2[0], E = x2[1], H = x2[2];
16392
+ }, [p2, g2]), C2 = x2[0], E = x2[1], H2 = x2[2];
13582
16393
  return (0, import_react28.useEffect)(function() {
13583
- return H;
13584
- }, [H]), import_react28.default.createElement("div", u({}, s2, { onTouchStart: C2, onMouseDown: C2, className: "react-colorful__interactive", ref: m2, onKeyDown: E, tabIndex: 0, role: "slider" }));
16394
+ return H2;
16395
+ }, [H2]), import_react28.default.createElement("div", u({}, s2, { onTouchStart: C2, onMouseDown: C2, className: "react-colorful__interactive", ref: m2, onKeyDown: E, tabIndex: 0, role: "slider" }));
13585
16396
  });
13586
16397
  var g = function(e2) {
13587
16398
  return e2.filter(Boolean).join(" ");
@@ -13590,44 +16401,44 @@ var p = function(r3) {
13590
16401
  var t2 = r3.color, n2 = r3.left, o2 = r3.top, a2 = void 0 === o2 ? 0.5 : o2, l2 = g(["react-colorful__pointer", r3.className]);
13591
16402
  return import_react28.default.createElement("div", { className: l2, style: { top: 100 * a2 + "%", left: 100 * n2 + "%" } }, import_react28.default.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: t2 } }));
13592
16403
  };
13593
- var b = function(e2, r3, t2) {
16404
+ var b2 = function(e2, r3, t2) {
13594
16405
  return void 0 === r3 && (r3 = 0), void 0 === t2 && (t2 = Math.pow(10, r3)), Math.round(t2 * e2) / t2;
13595
16406
  };
13596
16407
  var _ = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) };
13597
16408
  var x = function(e2) {
13598
- return L(C(e2));
16409
+ return L2(C(e2));
13599
16410
  };
13600
16411
  var C = function(e2) {
13601
- return "#" === e2[0] && (e2 = e2.substring(1)), e2.length < 6 ? { r: parseInt(e2[0] + e2[0], 16), g: parseInt(e2[1] + e2[1], 16), b: parseInt(e2[2] + e2[2], 16), a: 4 === e2.length ? b(parseInt(e2[3] + e2[3], 16) / 255, 2) : 1 } : { r: parseInt(e2.substring(0, 2), 16), g: parseInt(e2.substring(2, 4), 16), b: parseInt(e2.substring(4, 6), 16), a: 8 === e2.length ? b(parseInt(e2.substring(6, 8), 16) / 255, 2) : 1 };
16412
+ return "#" === e2[0] && (e2 = e2.substring(1)), e2.length < 6 ? { r: parseInt(e2[0] + e2[0], 16), g: parseInt(e2[1] + e2[1], 16), b: parseInt(e2[2] + e2[2], 16), a: 4 === e2.length ? b2(parseInt(e2[3] + e2[3], 16) / 255, 2) : 1 } : { r: parseInt(e2.substring(0, 2), 16), g: parseInt(e2.substring(2, 4), 16), b: parseInt(e2.substring(4, 6), 16), a: 8 === e2.length ? b2(parseInt(e2.substring(6, 8), 16) / 255, 2) : 1 };
13602
16413
  };
13603
16414
  var w = function(e2) {
13604
- return K(I(e2));
16415
+ return K2(I2(e2));
13605
16416
  };
13606
16417
  var y = function(e2) {
13607
16418
  var r3 = e2.s, t2 = e2.v, n2 = e2.a, o2 = (200 - r3) * t2 / 100;
13608
- return { h: b(e2.h), s: b(o2 > 0 && o2 < 200 ? r3 * t2 / 100 / (o2 <= 100 ? o2 : 200 - o2) * 100 : 0), l: b(o2 / 2), a: b(n2, 2) };
16419
+ return { h: b2(e2.h), s: b2(o2 > 0 && o2 < 200 ? r3 * t2 / 100 / (o2 <= 100 ? o2 : 200 - o2) * 100 : 0), l: b2(o2 / 2), a: b2(n2, 2) };
13609
16420
  };
13610
- var q = function(e2) {
16421
+ var q2 = function(e2) {
13611
16422
  var r3 = y(e2);
13612
16423
  return "hsl(" + r3.h + ", " + r3.s + "%, " + r3.l + "%)";
13613
16424
  };
13614
- var I = function(e2) {
16425
+ var I2 = function(e2) {
13615
16426
  var r3 = e2.h, t2 = e2.s, n2 = e2.v, o2 = e2.a;
13616
16427
  r3 = r3 / 360 * 6, t2 /= 100, n2 /= 100;
13617
- var a2 = Math.floor(r3), l2 = n2 * (1 - t2), u2 = n2 * (1 - (r3 - a2) * t2), c2 = n2 * (1 - (1 - r3 + a2) * t2), i2 = a2 % 6;
13618
- return { r: b(255 * [n2, u2, l2, l2, c2, n2][i2]), g: b(255 * [c2, n2, n2, u2, l2, l2][i2]), b: b(255 * [l2, l2, c2, n2, n2, u2][i2]), a: b(o2, 2) };
16428
+ var a2 = Math.floor(r3), l2 = n2 * (1 - t2), u2 = n2 * (1 - (r3 - a2) * t2), c3 = n2 * (1 - (1 - r3 + a2) * t2), i2 = a2 % 6;
16429
+ return { r: b2(255 * [n2, u2, l2, l2, c3, n2][i2]), g: b2(255 * [c3, n2, n2, u2, l2, l2][i2]), b: b2(255 * [l2, l2, c3, n2, n2, u2][i2]), a: b2(o2, 2) };
13619
16430
  };
13620
- var D = function(e2) {
16431
+ var D2 = function(e2) {
13621
16432
  var r3 = e2.toString(16);
13622
16433
  return r3.length < 2 ? "0" + r3 : r3;
13623
16434
  };
13624
- var K = function(e2) {
13625
- var r3 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = o2 < 1 ? D(b(255 * o2)) : "";
13626
- return "#" + D(r3) + D(t2) + D(n2) + a2;
16435
+ var K2 = function(e2) {
16436
+ var r3 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = o2 < 1 ? D2(b2(255 * o2)) : "";
16437
+ return "#" + D2(r3) + D2(t2) + D2(n2) + a2;
13627
16438
  };
13628
- var L = function(e2) {
16439
+ var L2 = function(e2) {
13629
16440
  var r3 = e2.r, t2 = e2.g, n2 = e2.b, o2 = e2.a, a2 = Math.max(r3, t2, n2), l2 = a2 - Math.min(r3, t2, n2), u2 = l2 ? a2 === r3 ? (t2 - n2) / l2 : a2 === t2 ? 2 + (n2 - r3) / l2 : 4 + (r3 - t2) / l2 : 0;
13630
- return { h: b(60 * (u2 < 0 ? u2 + 6 : u2)), s: b(a2 ? l2 / a2 * 100 : 0), v: b(a2 / 255 * 100), a: o2 };
16441
+ return { h: b2(60 * (u2 < 0 ? u2 + 6 : u2)), s: b2(a2 ? l2 / a2 * 100 : 0), v: b2(a2 / 255 * 100), a: o2 };
13631
16442
  };
13632
16443
  var S = import_react28.default.memo(function(r3) {
13633
16444
  var t2 = r3.hue, n2 = r3.onChange, o2 = g(["react-colorful__hue", r3.className]);
@@ -13635,28 +16446,28 @@ var S = import_react28.default.memo(function(r3) {
13635
16446
  n2({ h: 360 * e2.left });
13636
16447
  }, onKey: function(e2) {
13637
16448
  n2({ h: s(t2 + 360 * e2.left, 0, 360) });
13638
- }, "aria-label": "Hue", "aria-valuenow": b(t2), "aria-valuemax": "360", "aria-valuemin": "0" }, import_react28.default.createElement(p, { className: "react-colorful__hue-pointer", left: t2 / 360, color: q({ h: t2, s: 100, v: 100, a: 1 }) })));
16449
+ }, "aria-label": "Hue", "aria-valuenow": b2(t2), "aria-valuemax": "360", "aria-valuemin": "0" }, import_react28.default.createElement(p, { className: "react-colorful__hue-pointer", left: t2 / 360, color: q2({ h: t2, s: 100, v: 100, a: 1 }) })));
13639
16450
  });
13640
16451
  var T = import_react28.default.memo(function(r3) {
13641
- var t2 = r3.hsva, n2 = r3.onChange, o2 = { backgroundColor: q({ h: t2.h, s: 100, v: 100, a: 1 }) };
16452
+ var t2 = r3.hsva, n2 = r3.onChange, o2 = { backgroundColor: q2({ h: t2.h, s: 100, v: 100, a: 1 }) };
13642
16453
  return import_react28.default.createElement("div", { className: "react-colorful__saturation", style: o2 }, import_react28.default.createElement(m, { onMove: function(e2) {
13643
16454
  n2({ s: 100 * e2.left, v: 100 - 100 * e2.top });
13644
16455
  }, onKey: function(e2) {
13645
16456
  n2({ s: s(t2.s + 100 * e2.left, 0, 100), v: s(t2.v - 100 * e2.top, 0, 100) });
13646
- }, "aria-label": "Color", "aria-valuetext": "Saturation " + b(t2.s) + "%, Brightness " + b(t2.v) + "%" }, import_react28.default.createElement(p, { className: "react-colorful__saturation-pointer", top: 1 - t2.v / 100, left: t2.s / 100, color: q(t2) })));
16457
+ }, "aria-label": "Color", "aria-valuetext": "Saturation " + b2(t2.s) + "%, Brightness " + b2(t2.v) + "%" }, import_react28.default.createElement(p, { className: "react-colorful__saturation-pointer", top: 1 - t2.v / 100, left: t2.s / 100, color: q2(t2) })));
13647
16458
  });
13648
16459
  var F = function(e2, r3) {
13649
16460
  if (e2 === r3) return true;
13650
16461
  for (var t2 in e2) if (e2[t2] !== r3[t2]) return false;
13651
16462
  return true;
13652
16463
  };
13653
- var X2 = function(e2, r3) {
16464
+ var X3 = function(e2, r3) {
13654
16465
  return e2.toLowerCase() === r3.toLowerCase() || F(C(e2), C(r3));
13655
16466
  };
13656
16467
  function Y(e2, t2, l2) {
13657
- var u2 = i(l2), c2 = (0, import_react28.useState)(function() {
16468
+ var u2 = i(l2), c3 = (0, import_react28.useState)(function() {
13658
16469
  return e2.toHsva(t2);
13659
- }), s2 = c2[0], f2 = c2[1], v2 = (0, import_react28.useRef)({ color: t2, hsva: s2 });
16470
+ }), s2 = c3[0], f2 = c3[1], v2 = (0, import_react28.useRef)({ color: t2, hsva: s2 });
13660
16471
  (0, import_react28.useEffect)(function() {
13661
16472
  if (!e2.equal(t2, v2.current.color)) {
13662
16473
  var r3 = e2.toHsva(t2);
@@ -13673,34 +16484,34 @@ function Y(e2, t2, l2) {
13673
16484
  }, []);
13674
16485
  return [s2, d2];
13675
16486
  }
13676
- var R;
16487
+ var R2;
13677
16488
  var V = "undefined" != typeof window ? import_react28.useLayoutEffect : import_react28.useEffect;
13678
- var $ = function() {
13679
- return R || ("undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : void 0);
16489
+ var $2 = function() {
16490
+ return R2 || ("undefined" != typeof __webpack_nonce__ ? __webpack_nonce__ : void 0);
13680
16491
  };
13681
- var J = /* @__PURE__ */ new Map();
13682
- var Q = function(e2) {
16492
+ var J2 = /* @__PURE__ */ new Map();
16493
+ var Q2 = function(e2) {
13683
16494
  V(function() {
13684
16495
  var r3 = e2.current ? e2.current.ownerDocument : document;
13685
- if (void 0 !== r3 && !J.has(r3)) {
16496
+ if (void 0 !== r3 && !J2.has(r3)) {
13686
16497
  var t2 = r3.createElement("style");
13687
- t2.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, J.set(r3, t2);
13688
- var n2 = $();
16498
+ t2.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, J2.set(r3, t2);
16499
+ var n2 = $2();
13689
16500
  n2 && t2.setAttribute("nonce", n2), r3.head.appendChild(t2);
13690
16501
  }
13691
16502
  }, []);
13692
16503
  };
13693
16504
  var U = function(t2) {
13694
- var n2 = t2.className, o2 = t2.colorModel, a2 = t2.color, l2 = void 0 === a2 ? o2.defaultColor : a2, i2 = t2.onChange, s2 = c(t2, ["className", "colorModel", "color", "onChange"]), f2 = (0, import_react28.useRef)(null);
13695
- Q(f2);
16505
+ var n2 = t2.className, o2 = t2.colorModel, a2 = t2.color, l2 = void 0 === a2 ? o2.defaultColor : a2, i2 = t2.onChange, s2 = c2(t2, ["className", "colorModel", "color", "onChange"]), f2 = (0, import_react28.useRef)(null);
16506
+ Q2(f2);
13696
16507
  var v2 = Y(o2, l2, i2), d2 = v2[0], h2 = v2[1], m2 = g(["react-colorful", n2]);
13697
16508
  return import_react28.default.createElement("div", u({}, s2, { ref: f2, className: m2 }), import_react28.default.createElement(T, { hsva: d2, onChange: h2 }), import_react28.default.createElement(S, { hue: d2.h, onChange: h2, className: "react-colorful__last-control" }));
13698
16509
  };
13699
- var W = { defaultColor: "000", toHsva: x, fromHsva: function(e2) {
16510
+ var W2 = { defaultColor: "000", toHsva: x, fromHsva: function(e2) {
13700
16511
  return w({ h: e2.h, s: e2.s, v: e2.v, a: 1 });
13701
- }, equal: X2 };
13702
- var Z = function(r3) {
13703
- return import_react28.default.createElement(U, u({}, r3, { colorModel: W }));
16512
+ }, equal: X3 };
16513
+ var Z2 = function(r3) {
16514
+ return import_react28.default.createElement(U, u({}, r3, { colorModel: W2 }));
13704
16515
  };
13705
16516
 
13706
16517
  // ../ui/dist/index.mjs
@@ -13736,7 +16547,7 @@ function areOptionsEqual(optionsA, optionsB) {
13736
16547
  });
13737
16548
  }
13738
16549
  function sortAndMapPluginToOptions(plugins) {
13739
- return plugins.concat().sort((a2, b2) => a2.name > b2.name ? 1 : -1).map((plugin) => plugin.options);
16550
+ return plugins.concat().sort((a2, b3) => a2.name > b3.name ? 1 : -1).map((plugin) => plugin.options);
13740
16551
  }
13741
16552
  function arePluginsEqual(pluginsA, pluginsB) {
13742
16553
  if (pluginsA.length !== pluginsB.length) return false;
@@ -14017,7 +16828,7 @@ function Counter(max2, start, loop) {
14017
16828
  };
14018
16829
  return self2;
14019
16830
  }
14020
- function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location, animation, scrollTo, scrollBody, scrollTarget, index2, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
16831
+ function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTracker, location2, animation, scrollTo, scrollBody, scrollTarget, index2, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, baseFriction, watchDrag) {
14021
16832
  const {
14022
16833
  cross: crossAxis,
14023
16834
  direction
@@ -14081,13 +16892,13 @@ function DragHandler(axis, rootNode, ownerDocument, ownerWindow, target, dragTra
14081
16892
  const isMouseEvt = isMouseEvent(evt, ownerWindow);
14082
16893
  isMouse = isMouseEvt;
14083
16894
  preventClick = dragFree && isMouseEvt && !evt.buttons && isMoving;
14084
- isMoving = deltaAbs(target.get(), location.get()) >= 2;
16895
+ isMoving = deltaAbs(target.get(), location2.get()) >= 2;
14085
16896
  if (isMouseEvt && evt.button !== 0) return;
14086
16897
  if (isFocusNode(evt.target)) return;
14087
16898
  pointerIsDown = true;
14088
16899
  dragTracker.pointerDown(evt);
14089
16900
  scrollBody.useFriction(0).useDuration(0);
14090
- target.set(location);
16901
+ target.set(location2);
14091
16902
  addDragEvents();
14092
16903
  startScroll = dragTracker.readPoint(evt);
14093
16904
  startCross = dragTracker.readPoint(evt, crossAxis);
@@ -14265,28 +17076,28 @@ function ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watch
14265
17076
  };
14266
17077
  return self2;
14267
17078
  }
14268
- function ScrollBody(location, offsetLocation, previousLocation, target, baseDuration, baseFriction) {
17079
+ function ScrollBody(location2, offsetLocation, previousLocation, target, baseDuration, baseFriction) {
14269
17080
  let scrollVelocity = 0;
14270
17081
  let scrollDirection = 0;
14271
17082
  let scrollDuration = baseDuration;
14272
17083
  let scrollFriction = baseFriction;
14273
- let rawLocation = location.get();
17084
+ let rawLocation = location2.get();
14274
17085
  let rawLocationPrevious = 0;
14275
17086
  function seek() {
14276
- const displacement = target.get() - location.get();
17087
+ const displacement = target.get() - location2.get();
14277
17088
  const isInstant = !scrollDuration;
14278
17089
  let scrollDistance = 0;
14279
17090
  if (isInstant) {
14280
17091
  scrollVelocity = 0;
14281
17092
  previousLocation.set(target);
14282
- location.set(target);
17093
+ location2.set(target);
14283
17094
  scrollDistance = displacement;
14284
17095
  } else {
14285
- previousLocation.set(location);
17096
+ previousLocation.set(location2);
14286
17097
  scrollVelocity += displacement / scrollDuration;
14287
17098
  scrollVelocity *= scrollFriction;
14288
17099
  rawLocation += scrollVelocity;
14289
- location.add(scrollVelocity);
17100
+ location2.add(scrollVelocity);
14290
17101
  scrollDistance = rawLocation - rawLocationPrevious;
14291
17102
  }
14292
17103
  scrollDirection = mathSign(scrollDistance);
@@ -14333,7 +17144,7 @@ function ScrollBody(location, offsetLocation, previousLocation, target, baseDura
14333
17144
  };
14334
17145
  return self2;
14335
17146
  }
14336
- function ScrollBounds(limit, location, target, scrollBody, percentOfView) {
17147
+ function ScrollBounds(limit, location2, target, scrollBody, percentOfView) {
14337
17148
  const pullBackThreshold = percentOfView.measure(10);
14338
17149
  const edgeOffsetTolerance = percentOfView.measure(50);
14339
17150
  const frictionLimit = Limit(0.1, 0.99);
@@ -14341,14 +17152,14 @@ function ScrollBounds(limit, location, target, scrollBody, percentOfView) {
14341
17152
  function shouldConstrain() {
14342
17153
  if (disabled) return false;
14343
17154
  if (!limit.reachedAny(target.get())) return false;
14344
- if (!limit.reachedAny(location.get())) return false;
17155
+ if (!limit.reachedAny(location2.get())) return false;
14345
17156
  return true;
14346
17157
  }
14347
17158
  function constrain(pointerDown) {
14348
17159
  if (!shouldConstrain()) return;
14349
- const edge = limit.reachedMin(location.get()) ? "min" : "max";
14350
- const diffToEdge = mathAbs(limit[edge] - location.get());
14351
- const diffToTarget = target.get() - location.get();
17160
+ const edge = limit.reachedMin(location2.get()) ? "min" : "max";
17161
+ const diffToEdge = mathAbs(limit[edge] - location2.get());
17162
+ const diffToTarget = target.get() - location2.get();
14352
17163
  const friction = frictionLimit.constrain(diffToEdge / edgeOffsetTolerance);
14353
17164
  target.subtract(diffToTarget * friction);
14354
17165
  if (!pointerDown && mathAbs(diffToTarget) < pullBackThreshold) {
@@ -14421,7 +17232,7 @@ function ScrollLimit(contentSize, scrollSnaps, loop) {
14421
17232
  };
14422
17233
  return self2;
14423
17234
  }
14424
- function ScrollLooper(contentSize, limit, location, vectors) {
17235
+ function ScrollLooper(contentSize, limit, location2, vectors) {
14425
17236
  const jointSafety = 0.1;
14426
17237
  const min2 = limit.min + jointSafety;
14427
17238
  const max2 = limit.max + jointSafety;
@@ -14430,8 +17241,8 @@ function ScrollLooper(contentSize, limit, location, vectors) {
14430
17241
  reachedMax
14431
17242
  } = Limit(min2, max2);
14432
17243
  function shouldLoop(direction) {
14433
- if (direction === 1) return reachedMax(location.get());
14434
- if (direction === -1) return reachedMin(location.get());
17244
+ if (direction === 1) return reachedMax(location2.get());
17245
+ if (direction === -1) return reachedMin(location2.get());
14435
17246
  return false;
14436
17247
  }
14437
17248
  function loop(direction) {
@@ -14524,7 +17335,7 @@ function ScrollTarget(loop, scrollSnaps, contentSize, limit, targetVector) {
14524
17335
  constrain
14525
17336
  } = limit;
14526
17337
  function minDistance(distances) {
14527
- return distances.concat().sort((a2, b2) => mathAbs(a2) - mathAbs(b2))[0];
17338
+ return distances.concat().sort((a2, b3) => mathAbs(a2) - mathAbs(b3))[0];
14528
17339
  }
14529
17340
  function findTargetSnap(target) {
14530
17341
  const distance = loop ? removeOffset(target) : constrain(target);
@@ -14689,7 +17500,7 @@ function Translate(axis, container) {
14689
17500
  function y2(n2) {
14690
17501
  return `translate3d(0px,${n2}px,0px)`;
14691
17502
  }
14692
- function to(target) {
17503
+ function to2(target) {
14693
17504
  if (disabled) return;
14694
17505
  const newTarget = roundToTwoDecimals(axis.direction(target));
14695
17506
  if (newTarget === previousTarget) return;
@@ -14706,12 +17517,12 @@ function Translate(axis, container) {
14706
17517
  }
14707
17518
  const self2 = {
14708
17519
  clear,
14709
- to,
17520
+ to: to2,
14710
17521
  toggleActive
14711
17522
  };
14712
17523
  return self2;
14713
17524
  }
14714
- function SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, location, slides) {
17525
+ function SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps, snaps, scrollSnaps, location2, slides) {
14715
17526
  const roundingSafety = 0.5;
14716
17527
  const ascItems = arrayKeys(slideSizesWithGaps);
14717
17528
  const descItems = arrayKeys(slideSizesWithGaps).reverse();
@@ -14745,7 +17556,7 @@ function SlideLooper(axis, viewSize, contentSize, slideSizes, slideSizesWithGaps
14745
17556
  loopPoint,
14746
17557
  slideLocation: Vector1D(-1),
14747
17558
  translate: Translate(axis, slides[index2]),
14748
- target: () => location.get() > loopPoint ? initial : altered
17559
+ target: () => location2.get() > loopPoint ? initial : altered
14749
17560
  };
14750
17561
  });
14751
17562
  }
@@ -15019,7 +17830,7 @@ function Engine(root, container, slides, ownerDocument, ownerWindow, options, ev
15019
17830
  const render = ({
15020
17831
  scrollBody: scrollBody2,
15021
17832
  translate,
15022
- location: location2,
17833
+ location: location3,
15023
17834
  offsetLocation: offsetLocation2,
15024
17835
  previousLocation: previousLocation2,
15025
17836
  scrollLooper,
@@ -15037,7 +17848,7 @@ function Engine(root, container, slides, ownerDocument, ownerWindow, options, ev
15037
17848
  const hasSettled = loop2 ? shouldSettle : shouldSettle && withinBounds;
15038
17849
  const hasSettledAndIdle = hasSettled && !dragHandler.pointerDown();
15039
17850
  if (hasSettledAndIdle) animation2.stop();
15040
- const interpolatedLocation = location2.get() * alpha + previousLocation2.get() * (1 - alpha);
17851
+ const interpolatedLocation = location3.get() * alpha + previousLocation2.get() * (1 - alpha);
15041
17852
  offsetLocation2.set(interpolatedLocation);
15042
17853
  if (loop2) {
15043
17854
  scrollLooper.loop(scrollBody2.direction());
@@ -15050,11 +17861,11 @@ function Engine(root, container, slides, ownerDocument, ownerWindow, options, ev
15050
17861
  const animation = Animations(ownerDocument, ownerWindow, () => update(engine), (alpha) => render(engine, alpha));
15051
17862
  const friction = 0.68;
15052
17863
  const startLocation = scrollSnaps[index2.get()];
15053
- const location = Vector1D(startLocation);
17864
+ const location2 = Vector1D(startLocation);
15054
17865
  const previousLocation = Vector1D(startLocation);
15055
17866
  const offsetLocation = Vector1D(startLocation);
15056
17867
  const target = Vector1D(startLocation);
15057
- const scrollBody = ScrollBody(location, offsetLocation, previousLocation, target, duration, friction);
17868
+ const scrollBody = ScrollBody(location2, offsetLocation, previousLocation, target, duration, friction);
15058
17869
  const scrollTarget = ScrollTarget(loop, scrollSnaps, contentSize, limit, target);
15059
17870
  const scrollTo = ScrollTo(animation, index2, indexPrevious, scrollBody, scrollTarget, target, eventHandler);
15060
17871
  const scrollProgress = ScrollProgress(limit);
@@ -15072,20 +17883,20 @@ function Engine(root, container, slides, ownerDocument, ownerWindow, options, ev
15072
17883
  slideRects,
15073
17884
  animation,
15074
17885
  axis,
15075
- dragHandler: DragHandler(axis, root, ownerDocument, ownerWindow, target, DragTracker(axis, ownerWindow), location, animation, scrollTo, scrollBody, scrollTarget, index2, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, friction, watchDrag),
17886
+ dragHandler: DragHandler(axis, root, ownerDocument, ownerWindow, target, DragTracker(axis, ownerWindow), location2, animation, scrollTo, scrollBody, scrollTarget, index2, eventHandler, percentOfView, dragFree, dragThreshold, skipSnaps, friction, watchDrag),
15076
17887
  eventStore,
15077
17888
  percentOfView,
15078
17889
  index: index2,
15079
17890
  indexPrevious,
15080
17891
  limit,
15081
- location,
17892
+ location: location2,
15082
17893
  offsetLocation,
15083
17894
  previousLocation,
15084
17895
  options,
15085
17896
  resizeHandler: ResizeHandler(container, eventHandler, ownerWindow, slides, axis, watchResize, nodeRects),
15086
17897
  scrollBody,
15087
17898
  scrollBounds: ScrollBounds(limit, offsetLocation, target, scrollBody, percentOfView),
15088
- scrollLooper: ScrollLooper(contentSize, limit, offsetLocation, [location, offsetLocation, previousLocation, target]),
17899
+ scrollLooper: ScrollLooper(contentSize, limit, offsetLocation, [location2, offsetLocation, previousLocation, target]),
15089
17900
  scrollProgress,
15090
17901
  scrollSnapList: scrollSnaps.map(scrollProgress.get),
15091
17902
  scrollSnaps,
@@ -15116,7 +17927,7 @@ function EventHandler() {
15116
17927
  getListeners(evt).forEach((e2) => e2(api, evt));
15117
17928
  return self2;
15118
17929
  }
15119
- function on(evt, cb) {
17930
+ function on2(evt, cb) {
15120
17931
  listeners[evt] = getListeners(evt).concat([cb]);
15121
17932
  return self2;
15122
17933
  }
@@ -15131,7 +17942,7 @@ function EventHandler() {
15131
17942
  init,
15132
17943
  emit,
15133
17944
  off,
15134
- on,
17945
+ on: on2,
15135
17946
  clear
15136
17947
  };
15137
17948
  return self2;
@@ -15210,7 +18021,7 @@ function EmblaCarousel(root, userOptions, userPlugins) {
15210
18021
  optionsMediaQueries
15211
18022
  } = optionsHandler;
15212
18023
  const {
15213
- on,
18024
+ on: on2,
15214
18025
  off,
15215
18026
  emit
15216
18027
  } = eventHandler;
@@ -15354,7 +18165,7 @@ function EmblaCarousel(root, userOptions, userPlugins) {
15354
18165
  internalEngine,
15355
18166
  destroy,
15356
18167
  off,
15357
- on,
18168
+ on: on2,
15358
18169
  emit,
15359
18170
  plugins,
15360
18171
  previousScrollSnap,
@@ -16122,7 +18933,7 @@ var import_react39 = require("react");
16122
18933
  var import_jsx_runtime94 = require("react/jsx-runtime");
16123
18934
  var import_react40 = require("react");
16124
18935
  var import_jsx_runtime95 = require("react/jsx-runtime");
16125
- function cn(...inputs) {
18936
+ function cn2(...inputs) {
16126
18937
  return twMerge(clsx(inputs));
16127
18938
  }
16128
18939
  var buttonVariants = cva(
@@ -16158,7 +18969,7 @@ var Button = React53.forwardRef(
16158
18969
  return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
16159
18970
  Comp,
16160
18971
  {
16161
- className: cn(buttonVariants({ variant, size: size4, className })),
18972
+ className: cn2(buttonVariants({ variant, size: size4, className })),
16162
18973
  ref,
16163
18974
  ...props
16164
18975
  }
@@ -16170,7 +18981,7 @@ var CollapsibleTrigger2 = React211.forwardRef(({ className, ...props }, ref) =>
16170
18981
  Trigger,
16171
18982
  {
16172
18983
  ref,
16173
- className: cn("[&[data-state=open]>svg]:rotate-180", className),
18984
+ className: cn2("[&[data-state=open]>svg]:rotate-180", className),
16174
18985
  ...props
16175
18986
  }
16176
18987
  ));
@@ -16179,7 +18990,7 @@ var CollapsibleContent2 = React211.forwardRef(({ className, ...props }, ref) =>
16179
18990
  Content,
16180
18991
  {
16181
18992
  ref,
16182
- className: cn(
18993
+ className: cn2(
16183
18994
  [
16184
18995
  // Ensure closed content is not visible at rest
16185
18996
  "overflow-hidden data-[state=closed]:h-0 data-[state=open]:h-auto",
@@ -16196,7 +19007,7 @@ var DropdownMenuSubTrigger2 = React310.forwardRef(({ className, inset, children,
16196
19007
  SubTrigger2,
16197
19008
  {
16198
19009
  ref,
16199
- className: cn(
19010
+ className: cn2(
16200
19011
  "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-foreground focus:text-white data-[state=open]:bg-foreground data-[state=open]:text-white [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
16201
19012
  inset && "pl-8",
16202
19013
  className
@@ -16213,7 +19024,7 @@ var DropdownMenuSubContent2 = React310.forwardRef(({ className, ...props }, ref)
16213
19024
  SubContent2,
16214
19025
  {
16215
19026
  ref,
16216
- className: cn(
19027
+ className: cn2(
16217
19028
  "z-50 min-w-[8rem] overflow-hidden rounded-md border-[3px] border-foreground bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
16218
19029
  className
16219
19030
  ),
@@ -16226,7 +19037,7 @@ var DropdownMenuContent2 = React310.forwardRef(({ className, sideOffset = 4, con
16226
19037
  {
16227
19038
  ref,
16228
19039
  sideOffset,
16229
- className: cn(
19040
+ className: cn2(
16230
19041
  "z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border-[3px] border-foreground bg-popover p-1 text-popover-foreground shadow-md",
16231
19042
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
16232
19043
  className
@@ -16239,7 +19050,7 @@ var DropdownMenuItem2 = React310.forwardRef(({ className, inset, ...props }, ref
16239
19050
  Item22,
16240
19051
  {
16241
19052
  ref,
16242
- className: cn(
19053
+ className: cn2(
16243
19054
  "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-foreground focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
16244
19055
  inset && "pl-8",
16245
19056
  className
@@ -16252,7 +19063,7 @@ var DropdownMenuCheckboxItem2 = React310.forwardRef(({ className, children, chec
16252
19063
  CheckboxItem2,
16253
19064
  {
16254
19065
  ref,
16255
- className: cn(
19066
+ className: cn2(
16256
19067
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-foreground focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
16257
19068
  className
16258
19069
  ),
@@ -16269,7 +19080,7 @@ var DropdownMenuRadioItem2 = React310.forwardRef(({ className, children, ...prop
16269
19080
  RadioItem2,
16270
19081
  {
16271
19082
  ref,
16272
- className: cn(
19083
+ className: cn2(
16273
19084
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-foreground focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
16274
19085
  className
16275
19086
  ),
@@ -16285,7 +19096,7 @@ var DropdownMenuLabel2 = React310.forwardRef(({ className, inset, ...props }, re
16285
19096
  Label2,
16286
19097
  {
16287
19098
  ref,
16288
- className: cn(
19099
+ className: cn2(
16289
19100
  "px-2 py-1.5 text-sm font-semibold",
16290
19101
  inset && "pl-8",
16291
19102
  className
@@ -16298,7 +19109,7 @@ var DropdownMenuSeparator2 = React310.forwardRef(({ className, ...props }, ref)
16298
19109
  Separator2,
16299
19110
  {
16300
19111
  ref,
16301
- className: cn("-mx-1 my-1 h-px bg-muted", className),
19112
+ className: cn2("-mx-1 my-1 h-px bg-muted", className),
16302
19113
  ...props
16303
19114
  }
16304
19115
  ));
@@ -16310,7 +19121,7 @@ var DropdownMenuShortcut = ({
16310
19121
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
16311
19122
  "span",
16312
19123
  {
16313
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
19124
+ className: cn2("ml-auto text-xs tracking-widest opacity-60", className),
16314
19125
  ...props
16315
19126
  }
16316
19127
  );
@@ -16328,7 +19139,7 @@ function Input({ className, type, ...props }) {
16328
19139
  {
16329
19140
  type,
16330
19141
  "data-slot": "input",
16331
- className: cn(
19142
+ className: cn2(
16332
19143
  "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border-2 bg-white px-3 py-1 text-base shadow-xs transition-[color,border-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
16333
19144
  "focus-visible:border-ring",
16334
19145
  "aria-invalid:border-destructive",
@@ -16358,7 +19169,7 @@ var PopoverContent2 = React54.forwardRef(({ className, align = "center", sideOff
16358
19169
  ref,
16359
19170
  align,
16360
19171
  sideOffset,
16361
- className: cn(
19172
+ className: cn2(
16362
19173
  "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
16363
19174
  className
16364
19175
  ),
@@ -16385,13 +19196,13 @@ var ColorPicker = (0, import_react31.forwardRef)(
16385
19196
  const parsedValue = (0, import_react31.useMemo)(() => {
16386
19197
  return value || "#FFFFFF";
16387
19198
  }, [value]);
16388
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn("inline-block", props.style ? "" : ""), children: [
19199
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: cn2("inline-block", props.style ? "" : ""), children: [
16389
19200
  /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Popover2, { onOpenChange: setOpen, open, children: [
16390
19201
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PopoverTrigger2, { asChild: true, disabled, onBlur, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
16391
19202
  Button,
16392
19203
  {
16393
19204
  ...props,
16394
- className: cn("block", className),
19205
+ className: cn2("block", className),
16395
19206
  name,
16396
19207
  onClick: () => {
16397
19208
  setOpen(true);
@@ -16406,7 +19217,7 @@ var ColorPicker = (0, import_react31.forwardRef)(
16406
19217
  }
16407
19218
  ) }),
16408
19219
  /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(PopoverContent2, { className: "w-full", children: [
16409
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Z, { color: parsedValue, onChange }),
19220
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Z2, { color: parsedValue, onChange }),
16410
19221
  /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
16411
19222
  Input,
16412
19223
  {
@@ -16446,7 +19257,7 @@ var Carousel = React62.forwardRef(
16446
19257
  "div",
16447
19258
  {
16448
19259
  ref,
16449
- className: cn("relative", orientation === "vertical" && "flex flex-col", className),
19260
+ className: cn2("relative", orientation === "vertical" && "flex flex-col", className),
16450
19261
  ...props,
16451
19262
  children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex", children }) })
16452
19263
  }
@@ -16461,7 +19272,7 @@ var CarouselContent = React62.forwardRef(
16461
19272
  "div",
16462
19273
  {
16463
19274
  ref,
16464
- className: cn(
19275
+ className: cn2(
16465
19276
  "flex",
16466
19277
  orientation === "horizontal" ? "ml-0" : "-mt-0 flex-col",
16467
19278
  className
@@ -16481,7 +19292,7 @@ var CarouselItem = React62.forwardRef(
16481
19292
  ref,
16482
19293
  role: "group",
16483
19294
  "aria-roledescription": "slide",
16484
- className: cn(
19295
+ className: cn2(
16485
19296
  "min-w-0 shrink-0 grow-0 basis-full",
16486
19297
  orientation === "horizontal" ? "pr-4" : "pb-4",
16487
19298
  className
@@ -16493,7 +19304,7 @@ var CarouselItem = React62.forwardRef(
16493
19304
  );
16494
19305
  CarouselItem.displayName = "CarouselItem";
16495
19306
  var Control = React62.forwardRef(
16496
- ({ className, variant = "outline", size: size4 = "icon", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { ref, className: cn("h-8 w-8", className), variant, size: size4, ...props })
19307
+ ({ className, variant = "outline", size: size4 = "icon", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Button, { ref, className: cn2("h-8 w-8", className), variant, size: size4, ...props })
16497
19308
  );
16498
19309
  Control.displayName = "CarouselControl";
16499
19310
  var CarouselPrevious = React62.forwardRef(
@@ -16504,7 +19315,7 @@ var CarouselPrevious = React62.forwardRef(
16504
19315
  Control,
16505
19316
  {
16506
19317
  ref,
16507
- className: cn(
19318
+ className: cn2(
16508
19319
  "absolute z-10",
16509
19320
  isHorizontal ? "left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-2 -translate-x-1/2",
16510
19321
  className
@@ -16528,7 +19339,7 @@ var CarouselNext = React62.forwardRef(
16528
19339
  Control,
16529
19340
  {
16530
19341
  ref,
16531
- className: cn(
19342
+ className: cn2(
16532
19343
  "absolute z-10",
16533
19344
  isHorizontal ? "right-2 top-1/2 -translate-y-1/2" : "bottom-2 left-1/2 -translate-x-1/2",
16534
19345
  className
@@ -16557,7 +19368,7 @@ function SheetOverlay({
16557
19368
  Overlay,
16558
19369
  {
16559
19370
  "data-slot": "sheet-overlay",
16560
- className: cn(
19371
+ className: cn2(
16561
19372
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 md:bg-transparent md:pointer-events-none",
16562
19373
  className
16563
19374
  ),
@@ -16588,7 +19399,7 @@ var SheetContent = React72.forwardRef(({ className, children, showCloseButton =
16588
19399
  ref,
16589
19400
  "data-slot": "sheet-content",
16590
19401
  "data-side": side,
16591
- className: cn(
19402
+ className: cn2(
16592
19403
  "fixed z-50 grid gap-4 bg-background p-5 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out",
16593
19404
  SIDE_CLASSNAMES[side] ?? SIDE_CLASSNAMES.bottom,
16594
19405
  className
@@ -16602,7 +19413,7 @@ var SheetContent = React72.forwardRef(({ className, children, showCloseButton =
16602
19413
  "data-slot": "sheet-close",
16603
19414
  className: "ring-offset-background focus:ring-ring absolute right-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
16604
19415
  children: [
16605
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(X, {}),
19416
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(X2, {}),
16606
19417
  /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "sr-only", children: "Close" })
16607
19418
  ]
16608
19419
  }
@@ -16627,7 +19438,7 @@ var SkeletonRoot = (0, import_react32.forwardRef)(function SkeletonRoot2({ class
16627
19438
  {
16628
19439
  ref,
16629
19440
  "data-slot": "skeleton",
16630
- className: cn("animate-pulse rounded-md bg-accent", className),
19441
+ className: cn2("animate-pulse rounded-md bg-accent", className),
16631
19442
  style,
16632
19443
  ...props
16633
19444
  }
@@ -16640,7 +19451,7 @@ var SkeletonText = (0, import_react32.forwardRef)(function SkeletonText2({ width
16640
19451
  SkeletonRoot,
16641
19452
  {
16642
19453
  ref,
16643
- className: cn("h-4 rounded-sm", className),
19454
+ className: cn2("h-4 rounded-sm", className),
16644
19455
  style: computedStyle,
16645
19456
  ...props
16646
19457
  }
@@ -16656,7 +19467,7 @@ var SkeletonLine = (0, import_react32.forwardRef)(function SkeletonLine2({ width
16656
19467
  SkeletonRoot,
16657
19468
  {
16658
19469
  ref,
16659
- className: cn("rounded-sm", className),
19470
+ className: cn2("rounded-sm", className),
16660
19471
  style: computedStyle,
16661
19472
  ...props
16662
19473
  }
@@ -16675,7 +19486,7 @@ var SkeletonBlock = (0, import_react32.forwardRef)(function SkeletonBlock2({ wid
16675
19486
  SkeletonRoot,
16676
19487
  {
16677
19488
  ref,
16678
- className: cn("w-full", className),
19489
+ className: cn2("w-full", className),
16679
19490
  style: mergeStyle(style, additions),
16680
19491
  ...props
16681
19492
  }
@@ -16691,7 +19502,7 @@ var SkeletonAvatar = (0, import_react32.forwardRef)(function SkeletonAvatar2({ s
16691
19502
  SkeletonRoot,
16692
19503
  {
16693
19504
  ref,
16694
- className: cn("rounded-full", className),
19505
+ className: cn2("rounded-full", className),
16695
19506
  style: computedStyle,
16696
19507
  ...props
16697
19508
  }
@@ -16704,7 +19515,7 @@ var SkeletonBadge = (0, import_react32.forwardRef)(function SkeletonBadge2({ wid
16704
19515
  SkeletonRoot,
16705
19516
  {
16706
19517
  ref,
16707
- className: cn("h-5 rounded-full", className),
19518
+ className: cn2("h-5 rounded-full", className),
16708
19519
  style: computedStyle,
16709
19520
  ...props
16710
19521
  }
@@ -16734,14 +19545,14 @@ function Spinner({
16734
19545
  "span",
16735
19546
  {
16736
19547
  ...accessibilityProps,
16737
- className: cn("inline-flex items-center justify-center text-current", className),
19548
+ className: cn2("inline-flex items-center justify-center text-current", className),
16738
19549
  ...props,
16739
19550
  children: [
16740
19551
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
16741
19552
  LoaderCircle,
16742
19553
  {
16743
19554
  "aria-hidden": "true",
16744
- className: cn("animate-spin motion-reduce:animate-none", sizeClasses[size4])
19555
+ className: cn2("animate-spin motion-reduce:animate-none", sizeClasses[size4])
16745
19556
  }
16746
19557
  ),
16747
19558
  srLabel ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "sr-only", children: srLabel }) : null
@@ -16775,7 +19586,7 @@ function DelayedSpinner({
16775
19586
  return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
16776
19587
  Spinner,
16777
19588
  {
16778
- className: cn(!visible ? "opacity-0" : null, className),
19589
+ className: cn2(!visible ? "opacity-0" : null, className),
16779
19590
  "aria-hidden": !visible ? true : void 0,
16780
19591
  ...props
16781
19592
  }
@@ -16807,7 +19618,7 @@ var PendingButton = (0, import_react34.forwardRef)(
16807
19618
  active: isPending,
16808
19619
  delay: spinnerDelay,
16809
19620
  size: spinnerSize ?? "sm",
16810
- className: cn("text-current", spinnerClassName),
19621
+ className: cn2("text-current", spinnerClassName),
16811
19622
  ...rest
16812
19623
  }
16813
19624
  );
@@ -16816,7 +19627,7 @@ var PendingButton = (0, import_react34.forwardRef)(
16816
19627
  Button,
16817
19628
  {
16818
19629
  ref,
16819
- className: cn("transition-[opacity,transform]", className),
19630
+ className: cn2("transition-[opacity,transform]", className),
16820
19631
  "aria-busy": isPending,
16821
19632
  "data-pending": isPending ? "" : void 0,
16822
19633
  disabled: computedDisabled,
@@ -16834,7 +19645,7 @@ var Switch2 = React82.forwardRef(({ className, ...props }, ref) => /* @__PURE__
16834
19645
  Root4,
16835
19646
  {
16836
19647
  ref,
16837
- className: cn(
19648
+ className: cn2(
16838
19649
  "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
16839
19650
  className
16840
19651
  ),
@@ -16842,7 +19653,7 @@ var Switch2 = React82.forwardRef(({ className, ...props }, ref) => /* @__PURE__
16842
19653
  children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
16843
19654
  Thumb,
16844
19655
  {
16845
- className: cn(
19656
+ className: cn2(
16846
19657
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
16847
19658
  )
16848
19659
  }
@@ -16854,7 +19665,7 @@ var Textarea = React92.forwardRef(({ className, ...props }, ref) => {
16854
19665
  return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
16855
19666
  "textarea",
16856
19667
  {
16857
- className: cn(
19668
+ className: cn2(
16858
19669
  "flex min-h-[60px] w-full rounded-md border-2 border-input bg-white px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm transition-[color,border-color]",
16859
19670
  className
16860
19671
  ),
@@ -16888,7 +19699,7 @@ var Toggle2 = React102.forwardRef(({ className, variant, size: size4, ...props }
16888
19699
  Root5,
16889
19700
  {
16890
19701
  ref,
16891
- className: cn(toggleVariants({ variant, size: size4, className })),
19702
+ className: cn2(toggleVariants({ variant, size: size4, className })),
16892
19703
  ...props
16893
19704
  }
16894
19705
  ));
@@ -16915,7 +19726,7 @@ var AccordionItem2 = React112.forwardRef(({ className, ...props }, ref) => /* @_
16915
19726
  Item3,
16916
19727
  {
16917
19728
  ref,
16918
- className: cn("border-2 border-input rounded-md", className),
19729
+ className: cn2("border-2 border-input rounded-md", className),
16919
19730
  ...props
16920
19731
  }
16921
19732
  ));
@@ -16945,7 +19756,7 @@ var SectionAccordionItem = React122.forwardRef(({ className, ...props }, ref) =>
16945
19756
  Item3,
16946
19757
  {
16947
19758
  ref,
16948
- className: cn("border-2 border-input rounded-md", className),
19759
+ className: cn2("border-2 border-input rounded-md", className),
16949
19760
  ...props
16950
19761
  }
16951
19762
  ));
@@ -16954,7 +19765,7 @@ var SectionAccordionTrigger = React122.forwardRef(({ className, title, descripti
16954
19765
  Trigger22,
16955
19766
  {
16956
19767
  ref,
16957
- className: cn(
19768
+ className: cn2(
16958
19769
  "flex flex-1 items-center justify-between px-4 py-3 text-left text-sm font-medium transition-all",
16959
19770
  "hover:bg-muted/50",
16960
19771
  "[&[data-state=open]>svg]:rotate-180",
@@ -16978,7 +19789,7 @@ var SectionAccordionContent = React122.forwardRef(({ className, children, ...pro
16978
19789
  Content25,
16979
19790
  {
16980
19791
  ref,
16981
- className: cn(
19792
+ className: cn2(
16982
19793
  "overflow-hidden text-sm",
16983
19794
  "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
16984
19795
  className
@@ -16992,7 +19803,7 @@ var TabsList2 = React152.forwardRef(({ className, ...props }, ref) => /* @__PURE
16992
19803
  List,
16993
19804
  {
16994
19805
  ref,
16995
- className: cn(
19806
+ className: cn2(
16996
19807
  "inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
16997
19808
  className
16998
19809
  ),
@@ -17004,7 +19815,7 @@ var TabsTrigger2 = React152.forwardRef(({ className, ...props }, ref) => /* @__P
17004
19815
  Trigger3,
17005
19816
  {
17006
19817
  ref,
17007
- className: cn(
19818
+ className: cn2(
17008
19819
  "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
17009
19820
  className
17010
19821
  ),
@@ -17016,7 +19827,7 @@ var TabsContent2 = React152.forwardRef(({ className, ...props }, ref) => /* @__P
17016
19827
  Content4,
17017
19828
  {
17018
19829
  ref,
17019
- className: cn(
19830
+ className: cn2(
17020
19831
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
17021
19832
  className
17022
19833
  ),
@@ -17262,7 +20073,7 @@ var AccordionItemNode = ({
17262
20073
  ...rest,
17263
20074
  children: [
17264
20075
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(AccordionTrigger2, { className: "accordion-trigger", children: [
17265
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { as: "span", className: "flex-1", children: resolvedTrigger }),
20076
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text2, { as: "span", className: "flex-1", children: resolvedTrigger }),
17266
20077
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("span", { className: "accordion-icon", "aria-hidden": "true", children: [
17267
20078
  ClosedIconComponent && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ClosedIconComponent, { className: "accordion-icon-closed" }),
17268
20079
  OpenIconComponent && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(OpenIconComponent, { className: "accordion-icon-open" })