vite-plugin-lingo 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,396 @@
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The GNU Affero General Public License is a free, copyleft license for
12
+ software and other kinds of works, specifically designed to ensure
13
+ cooperation with the community in the case of network server software.
14
+
15
+ The licenses for most software and other practical works are designed
16
+ to take away your freedom to share and change the works. By contrast,
17
+ our General Public Licenses are intended to guarantee your freedom to
18
+ share and change all versions of a program--to make sure it remains free
19
+ software for all its users.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ them if you wish), that you receive source code or can get it if you
25
+ want it, that you can change the software or use pieces of it in new
26
+ free programs, and that you know you can do these things.
27
+
28
+ Developers that use our General Public Licenses protect your rights
29
+ with two steps: (1) assert copyright on the software, and (2) offer
30
+ you this License which gives you legal permission to copy, distribute
31
+ and/or modify the software.
32
+
33
+ An important aspect of the GNU Affero General Public License is its
34
+ requirement that the source code of modified versions of covered
35
+ programs be made available to users interacting with the program over a
36
+ network. This provision is intended to ensure that users of network
37
+ services receive the same freedoms that users of conventional free
38
+ software receive.
39
+
40
+ The precise terms and conditions for copying, distribution and
41
+ modification follow.
42
+
43
+ TERMS AND CONDITIONS
44
+
45
+ 0. Definitions.
46
+
47
+ "This License" refers to version 3 of the GNU Affero General Public
48
+ License.
49
+
50
+ "Copyright" also means copyright-like laws that apply to other kinds
51
+ of works, such as semiconductor masks.
52
+
53
+ "The Program" refers to any copyrightable work licensed under this
54
+ License. Each licensee is addressed as "you". "Licensees" and
55
+ "recipients" may be individuals or organizations.
56
+
57
+ To "modify" a work means to copy from or adapt all or part of the
58
+ work in a fashion requiring copyright permission, other than the
59
+ making of an exact copy. The resulting work is called a "modified
60
+ version" of the earlier work or a work "based on" the earlier work.
61
+
62
+ A "covered work" means either the unmodified Program or a work based
63
+ on the Program.
64
+
65
+ To "propagate" a work means to do anything with it that, without
66
+ permission, would make you directly or secondarily liable for
67
+ infringement under applicable copyright law, except executing it on a
68
+ computer or modifying a private copy. Propagation includes copying,
69
+ distribution (with or without modification), making available to the
70
+ public, and in some countries other activities as well.
71
+
72
+ To "convey" a work means any kind of propagation that enables other
73
+ parties to make or receive copies. Mere interaction with a user
74
+ through a computer network, with no transfer of a copy, is not
75
+ conveying.
76
+
77
+ An interactive user interface displays "Appropriate Legal Notices"
78
+ to the extent that it includes a convenient and prominently visible
79
+ feature that (1) displays an appropriate copyright notice, and (2)
80
+ tells the user that there is no warranty for the work (except to the
81
+ extent that warranties are provided), that licensees may convey the
82
+ work under this License, and how to view a copy of this License. If
83
+ the interface presents a list of user commands or options, such as a
84
+ menu, a prominent item in the list meets this criterion.
85
+
86
+ 1. Source Code.
87
+
88
+ The "source code" for a work means the preferred form of the work
89
+ for making modifications to it. "Object code" means any non-source
90
+ form of a work.
91
+
92
+ A "Standard Interface" means an interface that either is an official
93
+ standard defined by a recognized standards body, or, in the case of
94
+ interfaces specified for a particular programming language, one that
95
+ is widely used among developers working in that language.
96
+
97
+ The "System Libraries" of an executable work include anything, other
98
+ than the work as a whole, that (a) is included in the normal form of
99
+ packaging a Major Component, but which is not part of that Major
100
+ Component, and (b) serves only to enable use of the work with that
101
+ Major Component, or to implement a Standard Interface for which an
102
+ implementation is available to the public in source code form. A
103
+ "Major Component", in this context, means a major essential component
104
+ (kernel, window system, and so on) of the specific operating system
105
+ (if any) on which the executable work runs, or a compiler used to
106
+ produce the work, or an object code interpreter used to run it.
107
+
108
+ 2. Basic Permissions.
109
+
110
+ All rights granted under this License are granted for the term of
111
+ copyright on the Program, and are irrevocable provided the stated
112
+ conditions are met. This License explicitly affirms your unlimited
113
+ permission to run the unmodified Program. The output from running a
114
+ covered work is covered by this License only if the output, given its
115
+ content, constitutes a covered work. This License acknowledges your
116
+ rights of fair use or other equivalent, as provided by copyright law.
117
+
118
+ You may make, run and propagate covered works that you do not
119
+ convey, without conditions so long as your license otherwise remains
120
+ in force. You may convey covered works to others for the sole purpose
121
+ of having them make modifications exclusively for you, or provide you
122
+ with facilities for running those works, provided that you comply
123
+ with the terms of this License in conveying all material for which
124
+ you do not control copyright.
125
+
126
+ Conveying under any other circumstances is permitted solely under
127
+ the conditions stated below. Sublicensing is not allowed: you may
128
+ not delegate or grant any of your rights under this License to
129
+ others unless expressly authorized by this License.
130
+
131
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
132
+
133
+ No covered work shall be deemed part of an effective technological
134
+ measure under any applicable law fulfilling obligations under article
135
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
136
+ similar laws prohibiting or restricting circumvention of such
137
+ measures.
138
+
139
+ 4. Conveying Verbatim Copies.
140
+
141
+ You may convey verbatim copies of the Program's source code as you
142
+ receive it, in any medium, provided that you conspicuously and
143
+ appropriately publish on each copy an appropriate copyright notice; a
144
+ notice that there is no warranty; and that recipients may access the
145
+ full source code of the Program and that the license terms are
146
+ provided to them. You may charge any price or no price for each copy
147
+ that you convey, and you may offer support or warranty protection for
148
+ a fee.
149
+
150
+ 5. Conveying Modified Source Versions.
151
+
152
+ You may convey a work based on the Program, or the modifications to
153
+ produce it from the Program, in the form of source code under the
154
+ terms of section 4, provided that you also meet all of these
155
+ conditions:
156
+
157
+ a) The work must carry prominent notices stating that you modified
158
+ it, and giving a relevant date.
159
+
160
+ b) The work must carry prominent notices stating that it is
161
+ released under this License and any conditions added under this
162
+ License.
163
+
164
+ c) You must license the entire work, as a whole, under this
165
+ License to anyone who comes into possession of a copy. This
166
+ License will therefore apply, along with any applicable
167
+ additional terms, to the whole of the work, and all its parts,
168
+ regardless of how they are packaged. This License gives no
169
+ permission to license the work in any other way, but it does not
170
+ invalidate or limit any other obligations you may have.
171
+
172
+ d) If the work has interactive user interfaces, each must display
173
+ Appropriate Legal Notices; however, if the Program has no
174
+ interactive user interfaces, the work need not display such
175
+ notices.
176
+
177
+ 6. Conveying Non-Source Forms.
178
+
179
+ You may convey a covered work in object code form under the terms
180
+ of sections 4 and 5, provided that you also convey the
181
+ machine-readable Corresponding Source under the terms of this
182
+ License, in one of these ways:
183
+
184
+ a) Convey the object code in, or embodied in, a physical product
185
+ (including a physical distribution medium), accompanied by a
186
+ written offer, valid for at least three years and valid for as
187
+ long as you offer spare parts or customer support for that
188
+ product model, to give anyone who possesses the object code
189
+ either (1) a copy of the Corresponding Source for all the
190
+ software in the product that is covered by this License, on a
191
+ durable physical medium customarily used for software interchange, or (2) access to copy the Corresponding Source from a network server at no charge.
192
+
193
+ b) Accompany the object code with a copy of the written offer to
194
+ provide the Corresponding Source. This alternative is allowed
195
+ only for noncommercial distribution and only if you provide the
196
+ Corresponding Source in accord with section 6.
197
+
198
+ c) Convey the object code by offering access from a designated
199
+ place (gratis or for a charge), and offer equivalent access to
200
+ the Corresponding Source in the same way through the same
201
+ place at no further charge. You need not require recipients to
202
+ copy the Corresponding Source along with the object code.
203
+
204
+ d) Convey the object code using peer-to-peer transmission, provided
205
+ you inform other peers where the object code and Corresponding
206
+ Source of the work are being offered to the public at no charge under subparagraph (c).
207
+
208
+ A separable portion of the object code, whose source code is not
209
+ covered by this License, is not required to be released under this
210
+ License, but when you convey the object code you must still provide
211
+ all source code for all parts of the work that are covered by this
212
+ License.
213
+
214
+ 7. Additional Terms.
215
+
216
+ "Additional permissions" are terms that supplement the terms of
217
+ this License by making exceptions from one or more of its
218
+ conditions. Additional permissions that are applicable to the
219
+ entire Program shall be treated as though they were included in this
220
+ License, but only to the extent that such additional permissions do
221
+ not conflict with the terms of this License.
222
+
223
+ You may not impose any further restrictions on the exercise of the
224
+ rights granted or affirmed under this License.
225
+
226
+ 8. Termination.
227
+
228
+ You may not propagate or modify a covered work except as expressly
229
+ provided under this License. Any attempt otherwise to propagate or
230
+ modify it is void, and will automatically terminate your rights under
231
+ this License (including any patent licenses granted under the
232
+ License).
233
+
234
+ However, if you cease all violation of this License, then your
235
+ license from a particular copyright holder is reinstated (a)
236
+ provisionally, unless and until the copyright holder explicitly and
237
+ finally terminates your rights; or (b) permanently, if the copyright
238
+ holder fails to notify you of the violation by some reasonable means
239
+ prior to the publication of the notice of termination.
240
+
241
+ 9. Acceptance Not Required for Having Copies.
242
+
243
+ You are not required to accept this License in order to receive or
244
+ run a copy of the Program. Ancillary propagation of a covered work
245
+ occurring solely as a consequence of using peer-to-peer transmission
246
+ to receive a copy likewise does not require acceptance.
247
+
248
+ 10. Automatic Licensing of Downstream Recipients.
249
+
250
+ Each time you convey a covered work, the recipient automatically
251
+ receives a license from the original licensors, to run, modify and
252
+ propagate that work, subject to this License. You may not impose
253
+ any further restrictions on the exercise of the rights granted or
254
+ affirmed under this License.
255
+
256
+ 11. Patents.
257
+
258
+ If you convey a covered work, knowingly relying on a patent
259
+ infringement claim to prevent acceptance of the license, you shall
260
+ ensure that the patent license you grant is not limited such that it
261
+ would effectively place the recipient under an obligation to refrain
262
+ from exercising any of the rights granted by this License.
263
+
264
+ 12. No Surrender of Others' Freedom.
265
+
266
+ If you convey a covered work, you waive any legal restriction on the
267
+ exercise of the license by recipients, unless such limitations are
268
+ passed through to you from the recipients of the covered work. In
269
+ effect, users who receive the covered work should be sure that they
270
+ will be free to exercise the rights described in the License.
271
+
272
+ 13. Use with the GNU General Public License.
273
+
274
+ The GNU Affero General Public License is compatible with the GNU
275
+ General Public License version 3, and this license may be combined
276
+ with it under certain conditions.
277
+
278
+ 14. Revised Versions of this License.
279
+
280
+ The Free Software Foundation may publish revised and/or new versions
281
+ of the GNU Affero General Public License from time to time. Such
282
+ new versions will be similar in spirit to the present version, but
283
+ may differ in detail to address new problems or concerns.
284
+
285
+ Each version is given a distinguishing version number. If the
286
+ Program specifies a version number of this License which applies to
287
+ it and "any later version", you have the option of following the
288
+ terms and conditions either of that version or of any later version
289
+ published by the Free Software Foundation. If the Program does not
290
+ specify a version number of this License, you may choose any version
291
+ ever published by the Free Software Foundation.
292
+
293
+ NO WARRANTY
294
+
295
+ 15. Disclaimer of Warranty.
296
+
297
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
298
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
299
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
300
+ WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
301
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
302
+ A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
303
+ PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
304
+ DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
305
+ CORRECTION.
306
+
307
+ 16. Limitation of Liability.
308
+
309
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ANY COPYRIGHT
310
+ HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
311
+ PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
312
+ SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
313
+ OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
314
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
315
+ THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
316
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
317
+ POSSIBILITY OF SUCH DAMAGES.
318
+
319
+ END OF TERMS AND CONDITIONS
320
+
321
+ How to Apply These Terms to Your New Programs
322
+
323
+ If you develop a new program, and you want it to be of the greatest
324
+ possible use to the public, the best way to achieve this is to make
325
+ it free software which everyone can redistribute and change under
326
+ these terms.
327
+
328
+ To do so, attach the following notices to the program. It is safest
329
+ to attach them to the start of each source file to most effectively
330
+ state the exclusion of warranty; and each file should have at least
331
+ the "copyright" line and a pointer to where the full notice is found.
332
+ Additionally add your own copyright statement.
333
+
334
+ Copyright (C) 2025 Michael-Obele
335
+
336
+ This program is free software: you can redistribute it and/or modify
337
+ it under the terms of the GNU Affero General Public License as
338
+ published by the Free Software Foundation, either version 3 of the
339
+ License, or (at your option) any later version.
340
+
341
+ This program is distributed in the hope that it will be useful,
342
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
343
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
344
+ GNU Affero General Public License for more details.
345
+
346
+ You should have received a copy of the GNU Affero General Public License
347
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
348
+ GNU AFFERO GENERAL PUBLIC LICENSE
349
+ Version 3, 19 November 2007
350
+
351
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
352
+ Everyone is permitted to copy and distribute verbatim copies
353
+ of this license document, but changing it is not allowed.
354
+
355
+ Preamble
356
+
357
+ The GNU Affero General Public License is a free, copyleft license for
358
+ software and other kinds of works, specifically designed to ensure
359
+ cooperation with the community in the case of network server software.
360
+
361
+ The licenses for most software and other practical works are designed
362
+ to take away your freedom to share and change the works. By contrast,
363
+ our General Public Licenses are intended to guarantee your freedom to
364
+ share and change all versions of a program--to make sure it remains free
365
+ software for all its users.
366
+
367
+ When we speak of free software, we are referring to freedom, not
368
+ price. Our General Public Licenses are designed to make sure that you
369
+ have the freedom to distribute copies of free software (and charge for
370
+ them if you wish), that you receive source code or can get it if you
371
+ want it, that you can change the software or use pieces of it in new
372
+ free programs, and that you know you can do these things.
373
+
374
+ Developers that use our General Public Licenses protect your rights
375
+ with two steps: (1) assert copyright on the software, and (2) offer
376
+ you this License which gives you legal permission to copy, distribute
377
+ and/or modify the software.
378
+
379
+ When we refer to free software, we are referring to freedom, not
380
+ price. Our General Public Licenses are designed to make sure that you
381
+ have the freedom to distribute copies of free software (and charge for
382
+ them if you wish), that you receive source code or can get it if you
383
+ want it, that you can change the software or use pieces of it in new
384
+ free programs, and that you know you can do these things.
385
+
386
+ This License is a variant of the ordinary GNU General Public License
387
+ version 3, but it adds an additional requirement: if you run a modified
388
+ version of the program on a server and let other users communicate with
389
+ it there, your server must also allow them to download the source code
390
+ of your modified version.
391
+
392
+ The precise terms and conditions for copying, distribution and
393
+ modification follow.
394
+
395
+ [This file contains the full text of the GNU Affero General Public License,
396
+ version 3. Full license text available from: https://www.gnu.org/licenses/agpl-3.0.txt]
@@ -13,7 +13,12 @@
13
13
  progress: number;
14
14
  }
15
15
 
16
- let { selected = $bindable<string | null>(null) }: { selected: string | null } = $props();
16
+ interface Props {
17
+ selected: string | null;
18
+ apiBase?: string;
19
+ }
20
+
21
+ let { selected = $bindable<string | null>(null), apiBase = '.' }: Props = $props();
17
22
 
18
23
  let languages = $state<LanguageStats[]>([]);
19
24
  let loading = $state(true);
@@ -41,7 +46,7 @@
41
46
  error = null;
42
47
 
43
48
  try {
44
- const res = await fetch('./api/languages');
49
+ const res = await fetch(`${apiBase}/api/languages`);
45
50
  const result = await res.json();
46
51
 
47
52
  if (!result.success) {
@@ -1,6 +1,7 @@
1
- type $$ComponentProps = {
1
+ interface Props {
2
2
  selected: string | null;
3
- };
4
- declare const LanguageList: import("svelte").Component<$$ComponentProps, {}, "selected">;
3
+ apiBase?: string;
4
+ }
5
+ declare const LanguageList: import("svelte").Component<Props, {}, "selected">;
5
6
  type LanguageList = ReturnType<typeof LanguageList>;
6
7
  export default LanguageList;
@@ -34,9 +34,10 @@
34
34
  language: string;
35
35
  searchQuery: string;
36
36
  filter: 'all' | 'translated' | 'untranslated' | 'fuzzy';
37
+ apiBase?: string;
37
38
  }
38
39
 
39
- let { language, searchQuery, filter }: Props = $props();
40
+ let { language, searchQuery, filter, apiBase = '.' }: Props = $props();
40
41
 
41
42
  let translations = $state<Translation[]>([]);
42
43
  let loading = $state(true);
@@ -95,7 +96,7 @@
95
96
  error = null;
96
97
 
97
98
  try {
98
- const res = await fetch(`./api/translations/${language}`);
99
+ const res = await fetch(`${apiBase}/api/translations/${language}`);
99
100
  const result = await res.json();
100
101
 
101
102
  if (!result.success) {
@@ -129,7 +130,7 @@
129
130
  saving = t.msgid;
130
131
 
131
132
  try {
132
- const res = await fetch(`./api/translations/${language}`, {
133
+ const res = await fetch(`${apiBase}/api/translations/${language}`, {
133
134
  method: 'PUT',
134
135
  headers: { 'Content-Type': 'application/json' },
135
136
  body: JSON.stringify({
@@ -176,7 +177,7 @@
176
177
  togglingFuzzy = t.msgid;
177
178
 
178
179
  try {
179
- const res = await fetch(`./api/translations/${language}`, {
180
+ const res = await fetch(`${apiBase}/api/translations/${language}`, {
180
181
  method: 'PUT',
181
182
  headers: { 'Content-Type': 'application/json' },
182
183
  body: JSON.stringify({
@@ -2,6 +2,7 @@ interface Props {
2
2
  language: string;
3
3
  searchQuery: string;
4
4
  filter: 'all' | 'translated' | 'untranslated' | 'fuzzy';
5
+ apiBase?: string;
5
6
  }
6
7
  declare const TranslationEditor: import("svelte").Component<Props, {}, "">;
7
8
  type TranslationEditor = ReturnType<typeof TranslationEditor>;
@@ -0,0 +1,10 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();const Fr=!1;var Gr=Array.isArray,ha=Array.prototype.indexOf,Qr=Array.from,_a=Object.defineProperty,it=Object.getOwnPropertyDescriptor,Un=Object.getOwnPropertyDescriptors,pa=Object.prototype,ga=Array.prototype,Jr=Object.getPrototypeOf,wn=Object.isExtensible;function Ut(e){return typeof e=="function"}const U=()=>{};function ma(e){return e()}function Rr(e){for(var t=0;t<e.length;t++)e[t]()}function Kn(){var e,t,r=new Promise((n,s)=>{e=n,t=s});return{promise:r,resolve:e,reject:t}}function ba(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const fe=2,Xr=4,Er=8,Yn=1<<24,Ze=16,et=32,ft=64,Sr=128,Re=512,de=1024,we=2048,tt=4096,Se=8192,Ge=16384,Zr=32768,Xe=65536,kn=1<<17,en=1<<18,St=1<<19,Gn=1<<20,xt=32768,jr=1<<21,tn=1<<22,lt=1<<23,qe=Symbol("$state"),Qn=Symbol("legacy props"),ya=Symbol(""),zt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function xa(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function wa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ka(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ea(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Sa(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Aa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ma(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Na(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ta(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $a(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Pa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Jn=1,Xn=2,Zn=4,Ca=8,za=16,La=1,Ia=2,Oa=4,Fa=8,Ra=16,ja=1,Da=2,oe=Symbol(),Ba="http://www.w3.org/1999/xhtml",Va="http://www.w3.org/2000/svg",qa="@attach";function Wa(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Ha(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function es(e){return e===this.v}function Ua(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ts(e){return!Ua(e,this.v)}let Dt=!1,Ka=!1;function Ya(){Dt=!0}let ee=null;function It(e){ee=e}function L(e,t=!1,r){ee={p:ee,i:!1,c:null,e:null,s:e,x:null,l:Dt&&!t?{s:null,u:null,$:[]}:null}}function I(e){var t=ee,r=t.e;if(r!==null){t.e=null;for(var n of r)gs(n)}return t.i=!0,ee=t.p,{}}function sr(){return!Dt||ee!==null&&ee.l===null}let gt=[];function rs(){var e=gt;gt=[],Rr(e)}function At(e){if(gt.length===0&&!Jt){var t=gt;queueMicrotask(()=>{t===gt&&rs()})}gt.push(e)}function Ga(){for(;gt.length>0;)rs()}function ns(e){var t=z;if(t===null)return P.f|=lt,e;if((t.f&Zr)===0){if((t.f&Sr)===0)throw e;t.b.error(e)}else Ot(e,t)}function Ot(e,t){for(;t!==null;){if((t.f&Sr)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const vr=new Set;let D=null,_r=null,Ce=null,Pe=[],Ar=null,Dr=!1,Jt=!1;class Fe{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#r=0;#a=null;#s=[];#o=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(t){Pe=[],_r=null,this.apply();var r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)this.#i(n,r);this.is_fork||this.#f(),this.is_deferred()?(this.#l(r.effects),this.#l(r.render_effects),this.#l(r.block_effects)):(_r=this,D=null,En(r.render_effects),En(r.effects),_r=null,this.#a?.resolve()),Ce=null}#i(t,r){t.f^=de;for(var n=t.first;n!==null;){var s=n.f,a=(s&(et|ft))!==0,i=a&&(s&de)!==0,l=i||(s&Se)!==0||this.skipped_effects.has(n);if((n.f&Sr)!==0&&n.b?.is_pending()&&(r={parent:r,effect:n,effects:[],render_effects:[],block_effects:[]}),!l&&n.fn!==null){a?n.f^=de:(s&Xr)!==0?r.effects.push(n):or(n)&&((n.f&Ze)!==0&&r.block_effects.push(n),tr(n));var o=n.first;if(o!==null){n=o;continue}}var u=n.parent;for(n=n.next;n===null&&u!==null;)u===r.effect&&(this.#l(r.effects),this.#l(r.render_effects),this.#l(r.block_effects),r=r.parent),n=u.next,u=u.parent}}#l(t){for(const r of t)((r.f&we)!==0?this.#s:this.#o).push(r),this.#u(r.deps),ve(r,de)}#u(t){if(t!==null)for(const r of t)(r.f&fe)===0||(r.f&xt)===0||(r.f^=xt,this.#u(r.deps))}capture(t,r){this.previous.has(t)||this.previous.set(t,r),(t.f&lt)===0&&(this.current.set(t,t.v),Ce?.set(t,t.v))}activate(){D=this,this.apply()}deactivate(){D===this&&(D=null,Ce=null)}flush(){if(this.activate(),Pe.length>0){if(ss(),D!==null&&D!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#f(){if(this.#r===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#c()}#c(){if(vr.size>1){this.previous.clear();var t=Ce,r=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const a of vr){if(a===this){r=!1;continue}const i=[];for(const[o,u]of this.current){if(a.current.has(o))if(r&&u!==a.current.get(o))a.current.set(o,u);else continue;i.push(o)}if(i.length===0)continue;const l=[...a.current.keys()].filter(o=>!this.current.has(o));if(l.length>0){var s=Pe;Pe=[];const o=new Set,u=new Map;for(const c of i)as(c,l,o,u);if(Pe.length>0){D=a,a.apply();for(const c of Pe)a.#i(c,n);a.deactivate()}Pe=s}}D=null,Ce=t}this.committed=!0,vr.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#s)ve(t,we),wt(t);for(const t of this.#o)ve(t,tt),wt(t);this.#s=[],this.#o=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=Kn()).promise}static ensure(){if(D===null){const t=D=new Fe;vr.add(D),Jt||Fe.enqueue(()=>{D===t&&t.flush()})}return D}static enqueue(t){At(t)}apply(){}}function Qa(e){var t=Jt;Jt=!0;try{for(var r;;){if(Ga(),Pe.length===0&&(D?.flush(),Pe.length===0))return Ar=null,r;ss()}}finally{Jt=t}}function ss(){var e=ut;Dr=!0;var t=null;try{var r=0;for(br(!0);Pe.length>0;){var n=Fe.ensure();if(r++>1e3){var s,a;Ja()}n.process(Pe),ot.clear()}}finally{Dr=!1,br(e),Ar=null}}function Ja(){try{Aa()}catch(e){Ot(e,Ar)}}let Ke=null;function En(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Ge|Se))===0&&or(n)&&(Ke=new Set,tr(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?ws(n):n.fn=null),Ke?.size>0)){ot.clear();for(const s of Ke){if((s.f&(Ge|Se))!==0)continue;const a=[s];let i=s.parent;for(;i!==null;)Ke.has(i)&&(Ke.delete(i),a.push(i)),i=i.parent;for(let l=a.length-1;l>=0;l--){const o=a[l];(o.f&(Ge|Se))===0&&tr(o)}}Ke.clear()}}Ke=null}}function as(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;(a&fe)!==0?as(s,t,r,n):(a&(tn|Ze))!==0&&(a&we)===0&&is(s,t,n)&&(ve(s,we),wt(s))}}function is(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&fe)!==0&&is(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function wt(e){for(var t=Ar=e;t.parent!==null;){t=t.parent;var r=t.f;if(Dr&&t===z&&(r&Ze)!==0&&(r&en)===0)return;if((r&(ft|et))!==0){if((r&de)===0)return;t.f^=de}}Pe.push(t)}function ar(e){let t=0,r=kt(0),n;return()=>{Zt()&&(f(r),on(()=>(t===0&&(n=ct(()=>e(()=>Xt(r)))),t+=1,()=>{At(()=>{t-=1,t===0&&(n?.(),n=void 0,Xt(r))})})))}}var Xa=Xe|St|Sr;function Za(e,t,r){new ei(e,t,r)}class ei{parent;#t=!1;#e;#n=null;#r;#a;#s;#o=null;#i=null;#l=null;#u=null;#f=null;#c=0;#d=0;#h=!1;#v=null;#b=ar(()=>(this.#v=kt(this.#c),()=>{this.#v=null}));constructor(t,r,n){this.#e=t,this.#r=r,this.#a=n,this.parent=z.b,this.#t=!!this.#r.pending,this.#s=Mt(()=>{z.b=this;{var s=this.#g();try{this.#o=ye(()=>n(s))}catch(a){this.error(a)}this.#d>0?this.#p():this.#t=!1}return()=>{this.#f?.remove()}},Xa)}#y(){try{this.#o=ye(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#x(){const t=this.#r.pending;t&&(this.#i=ye(()=>t(this.#e)),Fe.enqueue(()=>{var r=this.#g();this.#o=this.#_(()=>(Fe.ensure(),ye(()=>this.#a(r)))),this.#d>0?this.#p():(Lt(this.#i,()=>{this.#i=null}),this.#t=!1)}))}#g(){var t=this.#e;return this.#t&&(this.#f=We(),this.#e.before(this.#f),t=this.#f),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#_(t){var r=z,n=P,s=ee;He(this.#s),xe(this.#s),It(this.#s.ctx);try{return t()}catch(a){return ns(a),null}finally{He(r),xe(n),It(s)}}#p(){const t=this.#r.pending;this.#o!==null&&(this.#u=document.createDocumentFragment(),this.#u.append(this.#f),Ss(this.#o,this.#u)),this.#i===null&&(this.#i=ye(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#d+=t,this.#d===0&&(this.#t=!1,this.#i&&Lt(this.#i,()=>{this.#i=null}),this.#u&&(this.#e.before(this.#u),this.#u=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#v&&Ft(this.#v,this.#c)}get_effect_pending(){return this.#b(),f(this.#v)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(this.#h||!r&&!n)throw t;this.#o&&(ae(this.#o),this.#o=null),this.#i&&(ae(this.#i),this.#i=null),this.#l&&(ae(this.#l),this.#l=null);var s=!1,a=!1;const i=()=>{if(s){Ha();return}s=!0,a&&Pa(),Fe.ensure(),this.#c=0,this.#l!==null&&Lt(this.#l,()=>{this.#l=null}),this.#t=this.has_pending_snippet(),this.#o=this.#_(()=>(this.#h=!1,ye(()=>this.#a(this.#e)))),this.#d>0?this.#p():this.#t=!1};var l=P;try{xe(null),a=!0,r?.(t,i),a=!1}catch(o){Ot(o,this.#s&&this.#s.parent)}finally{xe(l)}n&&At(()=>{this.#l=this.#_(()=>{Fe.ensure(),this.#h=!0;try{return ye(()=>{n(this.#e,()=>t,()=>i)})}catch(o){return Ot(o,this.#s.parent),null}finally{this.#h=!1}})})}}function ti(e,t){return t}function ri(e,t,r){for(var n=[],s=t.length,a=0;a<s;a++)un(t[a].e,n,!0);ks(n,()=>{var i=n.length===0&&r!==null;if(i){var l=r,o=l.parentNode;vi(o),o.append(l),e.items.clear(),Ie(e,t[0].prev,t[s-1].next)}for(var u=0;u<s;u++){var c=t[u];i||(e.items.delete(c.k),Ie(e,c.prev,c.next)),ae(c.e,!i)}e.first===t[0]&&(e.first=t[0].prev)})}function Mr(e,t,r,n,s,a=null){var i=e,l=new Map,o=null,u=(t&Zn)!==0,c=(t&Jn)!==0,v=(t&Xn)!==0;if(u){var d=e;i=d.appendChild(We())}var h=null,y=rn(()=>{var p=r();return Gr(p)?p:p==null?[]:Qr(p)}),k,m=!0;function b(){ni(S,k,i,t,n),h!==null&&(k.length===0?(h.fragment?(i.before(h.fragment),h.fragment=null):fn(h.effect),H.first=h.effect):Lt(h.effect,()=>{h=null}))}var H=Mt(()=>{k=f(y);for(var p=k.length,E=new Set,O=D,j=null,T=_s(),F=0;F<p;F+=1){var te=k[F],ie=n(te,F),J=m?null:l.get(ie);J?(c&&Ft(J.v,te),v?Ft(J.i,F):J.i=F,T&&O.skipped_effects.delete(J.e)):(J=si(m?i:null,j,te,ie,F,s,t,r),m&&(J.o=!0,j===null?o=J:j.next=J,j=J),l.set(ie,J)),E.add(ie)}if(p===0&&a&&!h)if(m)h={fragment:null,effect:ye(()=>a(i))};else{var ke=document.createDocumentFragment(),le=We();ke.append(le),h={fragment:ke,effect:ye(()=>a(le))}}if(!m)if(T){for(const[me,Ae]of l)E.has(me)||O.skipped_effects.add(Ae.e);O.oncommit(b),O.ondiscard(()=>{})}else b();f(y)}),S={effect:H,items:l,first:o};m=!1}function ni(e,t,r,n,s){var a=(n&Ca)!==0,i=t.length,l=e.items,o=e.first,u,c=null,v,d=[],h=[],y,k,m,b;if(a)for(b=0;b<i;b+=1)y=t[b],k=s(y,b),m=l.get(k),m.o&&(m.a?.measure(),(v??=new Set).add(m));for(b=0;b<i;b+=1){if(y=t[b],k=s(y,b),m=l.get(k),e.first??=m,!m.o){m.o=!0;var H=c?c.next:o;Ie(e,c,m),Ie(e,m,H),Cr(m,H,r),c=m,d=[],h=[],o=c.next;continue}if((m.e.f&Se)!==0&&(fn(m.e),a&&(m.a?.unfix(),(v??=new Set).delete(m))),m!==o){if(u!==void 0&&u.has(m)){if(d.length<h.length){var S=h[0],p;c=S.prev;var E=d[0],O=d[d.length-1];for(p=0;p<d.length;p+=1)Cr(d[p],S,r);for(p=0;p<h.length;p+=1)u.delete(h[p]);Ie(e,E.prev,O.next),Ie(e,c,E),Ie(e,O,S),o=S,c=O,b-=1,d=[],h=[]}else u.delete(m),Cr(m,o,r),Ie(e,m.prev,m.next),Ie(e,m,c===null?e.first:c.next),Ie(e,c,m),c=m;continue}for(d=[],h=[];o!==null&&o.k!==k;)(o.e.f&Se)===0&&(u??=new Set).add(o),h.push(o),o=o.next;if(o===null)continue;m=o}d.push(m),c=m,o=m.next}let j=l.size>i;if(o!==null||u!==void 0){for(var T=u===void 0?[]:Qr(u);o!==null;)(o.e.f&Se)===0&&T.push(o),o=o.next;var F=T.length;if(j=l.size-F>i,F>0){var te=(n&Zn)!==0&&i===0?r:null;if(a){for(b=0;b<F;b+=1)T[b].a?.measure();for(b=0;b<F;b+=1)T[b].a?.fix()}ri(e,T,te)}}if(j)for(const ie of l.values())ie.o||(Ie(e,c,ie),c=ie);e.effect.last=c&&c.e,a&&At(()=>{if(v!==void 0)for(m of v)m.a?.apply()})}function si(e,t,r,n,s,a,i,l){var o=(i&Jn)!==0,u=(i&za)===0,c=o?u?oi(r,!1,!1):kt(r):r,v=(i&Xn)===0?s:kt(s),d={i:v,v:c,k:n,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var h=document.createDocumentFragment();h.append(e=We())}return d.e=ye(()=>a(e,c,v,l)),t!==null&&(t.next=d),d}finally{}}function Cr(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,s=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==null&&a!==n;){var i=lr(a);s.before(a),a=i}}function Ie(e,t,r){t===null?(e.first=r,e.effect.first=r&&r.e):(t.e.next&&(t.e.next.prev=null),t.next=r,t.e.next=r&&r.e),r!==null&&(r.e.prev&&(r.e.prev.next=null),r.prev=t,r.e.prev=t&&t.e)}function ls(e,t,r,n){const s=sr()?ir:rn;if(r.length===0&&e.length===0){n(t.map(s));return}var a=D,i=z,l=ai();function o(){Promise.all(r.map(u=>ii(u))).then(u=>{l();try{n([...t.map(s),...u])}catch(c){(i.f&Ge)===0&&Ot(c,i)}a?.deactivate(),mr()}).catch(u=>{Ot(u,i)})}e.length>0?Promise.all(e).then(()=>{l();try{return o()}finally{a?.deactivate(),mr()}}):o()}function ai(){var e=z,t=P,r=ee,n=D;return function(a=!0){He(e),xe(t),It(r),a&&n?.activate()}}function mr(){He(null),xe(null),It(null)}function ir(e){var t=fe|we,r=P!==null&&(P.f&fe)!==0?P:null;return z!==null&&(z.f|=St),{ctx:ee,deps:null,effects:null,equals:es,f:t,fn:e,reactions:null,rv:0,v:oe,wv:0,parent:r??z,ac:null}}function ii(e,t){let r=z;r===null&&wa();var n=r.b,s=void 0,a=kt(oe),i=!P,l=new Map;return bi(()=>{var o=Kn();s=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{u===D&&u.committed&&u.deactivate(),mr()})}catch(d){o.reject(d),mr()}var u=D;if(i){var c=!n.is_pending();n.update_pending_count(1),u.increment(c),l.get(u)?.reject(zt),l.delete(u),l.set(u,o)}const v=(d,h=void 0)=>{if(u.activate(),h)h!==zt&&(a.f|=lt,Ft(a,h));else{(a.f&lt)!==0&&(a.f^=lt),Ft(a,d);for(const[y,k]of l){if(l.delete(y),y===u)break;k.reject(zt)}}i&&(n.update_pending_count(-1),u.decrement(c))};o.promise.then(v,d=>v(null,d||"unknown"))}),sn(()=>{for(const o of l.values())o.reject(zt)}),new Promise(o=>{function u(c){function v(){c===s?o(a):u(s)}c.then(v,v)}u(s)})}function Qe(e){const t=ir(e);return As(t),t}function rn(e){const t=ir(e);return t.equals=ts,t}function os(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)ae(t[r])}}function li(e){for(var t=e.parent;t!==null;){if((t.f&fe)===0)return(t.f&Ge)===0?t:null;t=t.parent}return null}function nn(e){var t,r=z;He(li(e));try{e.f&=~xt,os(e),t=$s(e)}finally{He(r)}return t}function us(e){var t=nn(e);if(e.equals(t)||(D?.is_fork||(e.v=t),e.wv=Ns()),!Nt)if(Ce!==null)(Zt()||D?.is_fork)&&Ce.set(e,t);else{var r=(e.f&Re)===0?tt:de;ve(e,r)}}let Br=new Set;const ot=new Map;let fs=!1;function kt(e,t){var r={f:0,v:e,reactions:null,equals:es,rv:0,wv:0};return r}function B(e,t){const r=kt(e);return As(r),r}function oi(e,t=!1,r=!0){const n=kt(e);return t||(n.equals=ts),Dt&&r&&ee!==null&&ee.l!==null&&(ee.l.s??=[]).push(n),n}function A(e,t,r=!1){P!==null&&(!Ve||(P.f&kn)!==0)&&sr()&&(P.f&(fe|Ze|tn|kn))!==0&&!Je?.includes(e)&&$a();let n=r?ze(t):t;return Ft(e,n)}function Ft(e,t){if(!e.equals(t)){var r=e.v;Nt?ot.set(e,t):ot.set(e,r),e.v=t;var n=Fe.ensure();n.capture(e,r),(e.f&fe)!==0&&((e.f&we)!==0&&nn(e),ve(e,(e.f&Re)!==0?de:tt)),e.wv=Ns(),cs(e,we),sr()&&z!==null&&(z.f&de)!==0&&(z.f&(et|ft))===0&&($e===null?xi([e]):$e.push(e)),!n.is_fork&&Br.size>0&&!fs&&ui()}return t}function ui(){fs=!1;var e=ut;br(!0);const t=Array.from(Br);try{for(const r of t)(r.f&de)!==0&&ve(r,tt),or(r)&&tr(r)}finally{br(e)}Br.clear()}function fi(e,t=1){var r=f(e),n=t===1?r++:r--;return A(e,r),n}function Xt(e){A(e,e.v+1)}function cs(e,t){var r=e.reactions;if(r!==null)for(var n=sr(),s=r.length,a=0;a<s;a++){var i=r[a],l=i.f;if(!(!n&&i===z)){var o=(l&we)===0;if(o&&ve(i,t),(l&fe)!==0){var u=i;Ce?.delete(u),(l&xt)===0&&(l&Re&&(i.f|=xt),cs(u,tt))}else o&&((l&Ze)!==0&&Ke!==null&&Ke.add(i),wt(i))}}}function ze(e){if(typeof e!="object"||e===null||qe in e)return e;const t=Jr(e);if(t!==pa&&t!==ga)return e;var r=new Map,n=Gr(e),s=B(0),a=yt,i=l=>{if(yt===a)return l();var o=P,u=yt;xe(null),Tn(a);var c=l();return xe(o),Tn(u),c};return n&&r.set("length",B(e.length)),new Proxy(e,{defineProperty(l,o,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Na();var c=r.get(o);return c===void 0?c=i(()=>{var v=B(u.value);return r.set(o,v),v}):A(c,u.value,!0),!0},deleteProperty(l,o){var u=r.get(o);if(u===void 0){if(o in l){const c=i(()=>B(oe));r.set(o,c),Xt(s)}}else A(u,oe),Xt(s);return!0},get(l,o,u){if(o===qe)return e;var c=r.get(o),v=o in l;if(c===void 0&&(!v||it(l,o)?.writable)&&(c=i(()=>{var h=ze(v?l[o]:oe),y=B(h);return y}),r.set(o,c)),c!==void 0){var d=f(c);return d===oe?void 0:d}return Reflect.get(l,o,u)},getOwnPropertyDescriptor(l,o){var u=Reflect.getOwnPropertyDescriptor(l,o);if(u&&"value"in u){var c=r.get(o);c&&(u.value=f(c))}else if(u===void 0){var v=r.get(o),d=v?.v;if(v!==void 0&&d!==oe)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(l,o){if(o===qe)return!0;var u=r.get(o),c=u!==void 0&&u.v!==oe||Reflect.has(l,o);if(u!==void 0||z!==null&&(!c||it(l,o)?.writable)){u===void 0&&(u=i(()=>{var d=c?ze(l[o]):oe,h=B(d);return h}),r.set(o,u));var v=f(u);if(v===oe)return!1}return c},set(l,o,u,c){var v=r.get(o),d=o in l;if(n&&o==="length")for(var h=u;h<v.v;h+=1){var y=r.get(h+"");y!==void 0?A(y,oe):h in l&&(y=i(()=>B(oe)),r.set(h+"",y))}if(v===void 0)(!d||it(l,o)?.writable)&&(v=i(()=>B(void 0)),A(v,ze(u)),r.set(o,v));else{d=v.v!==oe;var k=i(()=>ze(u));A(v,k)}var m=Reflect.getOwnPropertyDescriptor(l,o);if(m?.set&&m.set.call(c,u),!d){if(n&&typeof o=="string"){var b=r.get("length"),H=Number(o);Number.isInteger(H)&&H>=b.v&&A(b,H+1)}Xt(s)}return!0},ownKeys(l){f(s);var o=Reflect.ownKeys(l).filter(v=>{var d=r.get(v);return d===void 0||d.v!==oe});for(var[u,c]of r)c.v!==oe&&!(u in l)&&o.push(u);return o},setPrototypeOf(){Ta()}})}function Sn(e){try{if(e!==null&&typeof e=="object"&&qe in e)return e[qe]}catch{}return e}function ci(e,t){return Object.is(Sn(e),Sn(t))}var An,ds,vs,hs;function di(){if(An===void 0){An=window,ds=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;vs=it(t,"firstChild").get,hs=it(t,"nextSibling").get,wn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),wn(r)&&(r.__t=void 0)}}function We(e=""){return document.createTextNode(e)}function Be(e){return vs.call(e)}function lr(e){return hs.call(e)}function _(e,t){return Be(e)}function N(e,t=!1){{var r=Be(e);return r instanceof Comment&&r.data===""?lr(r):r}}function w(e,t=1,r=!1){let n=e;for(;t--;)n=lr(n);return n}function vi(e){e.textContent=""}function _s(){return!1}function hi(e,t){if(t){const r=document.body;e.autofocus=!0,At(()=>{document.activeElement===r&&e.focus()})}}let Mn=!1;function _i(){Mn||(Mn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Nr(e){var t=P,r=z;xe(null),He(null);try{return e()}finally{xe(t),He(r)}}function pi(e,t,r,n=r){e.addEventListener(t,()=>Nr(r));const s=e.__on_r;s?e.__on_r=()=>{s(),n(!0)}:e.__on_r=()=>n(!0),_i()}function ps(e){z===null&&(P===null&&Sa(),Ea()),Nt&&ka()}function gi(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Le(e,t,r){var n=z;n!==null&&(n.f&Se)!==0&&(e|=Se);var s={ctx:ee,deps:null,nodes_start:null,nodes_end:null,f:e|we|Re,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{tr(s),s.f|=Zr}catch(l){throw ae(s),l}else t!==null&&wt(s);var a=s;if(r&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&St)===0&&(a=a.first,(e&Ze)!==0&&(e&Xe)!==0&&a!==null&&(a.f|=Xe)),a!==null&&(a.parent=n,n!==null&&gi(a,n),P!==null&&(P.f&fe)!==0&&(e&ft)===0)){var i=P;(i.effects??=[]).push(a)}return s}function Zt(){return P!==null&&!Ve}function sn(e){const t=Le(Er,null,!1);return ve(t,de),t.teardown=e,t}function Et(e){ps();var t=z.f,r=!P&&(t&et)!==0&&(t&Zr)===0;if(r){var n=ee;(n.e??=[]).push(e)}else return gs(e)}function gs(e){return Le(Xr|Gn,e,!1)}function Oe(e){return ps(),Le(Er|Gn,e,!0)}function an(e){Fe.ensure();const t=Le(ft|St,e,!0);return()=>{ae(t)}}function mi(e){Fe.ensure();const t=Le(ft|St,e,!0);return(r={})=>new Promise(n=>{r.outro?Lt(t,()=>{ae(t),n(void 0)}):(ae(t),n(void 0))})}function ln(e){return Le(Xr,e,!1)}function bi(e){return Le(tn|St,e,!0)}function on(e,t=0){return Le(Er|t,e,!0)}function ue(e,t=[],r=[],n=[]){ls(n,t,r,s=>{Le(Er,()=>e(...s.map(f)),!0)})}function Mt(e,t=0){var r=Le(Ze|t,e,!0);return r}function ms(e,t=0){var r=Le(Yn|t,e,!0);return r}function ye(e){return Le(et|St,e,!0)}function bs(e){var t=e.teardown;if(t!==null){const r=Nt,n=P;Nn(!0),xe(null);try{t.call(null)}finally{Nn(r),xe(n)}}}function ys(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&Nr(()=>{s.abort(zt)});var n=r.next;(r.f&ft)!==0?r.parent=null:ae(r,t),r=n}}function yi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&et)===0&&ae(t),t=r}}function ae(e,t=!0){var r=!1;(t||(e.f&en)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(xs(e.nodes_start,e.nodes_end),r=!0),ys(e,t&&!r),yr(e,0),ve(e,Ge);var n=e.transitions;if(n!==null)for(const a of n)a.stop();bs(e);var s=e.parent;s!==null&&s.first!==null&&ws(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function xs(e,t){for(;e!==null;){var r=e===t?null:lr(e);e.remove(),e=r}}function ws(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Lt(e,t,r=!0){var n=[];un(e,n,!0),ks(n,()=>{r&&ae(e),t&&t()})}function ks(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var s of e)s.out(n)}else t()}function un(e,t,r){if((e.f&Se)===0){if(e.f^=Se,e.transitions!==null)for(const i of e.transitions)(i.is_global||r)&&t.push(i);for(var n=e.first;n!==null;){var s=n.next,a=(n.f&Xe)!==0||(n.f&et)!==0&&(e.f&Ze)!==0;un(n,t,a?r:!1),n=s}}}function fn(e){Es(e,!0)}function Es(e,t){if((e.f&Se)!==0){e.f^=Se,(e.f&de)===0&&(ve(e,we),wt(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&Xe)!==0||(r.f&et)!==0;Es(r,s?t:!1),r=n}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}function Ss(e,t){for(var r=e.nodes_start,n=e.nodes_end;r!==null;){var s=r===n?null:lr(r);t.append(r),r=s}}let ut=!1;function br(e){ut=e}let Nt=!1;function Nn(e){Nt=e}let P=null,Ve=!1;function xe(e){P=e}let z=null;function He(e){z=e}let Je=null;function As(e){P!==null&&(Je===null?Je=[e]:Je.push(e))}let ge=null,Ee=0,$e=null;function xi(e){$e=e}let Ms=1,er=0,yt=er;function Tn(e){yt=e}function Ns(){return++Ms}function or(e){var t=e.f;if((t&we)!==0)return!0;if(t&fe&&(e.f&=~xt),(t&tt)!==0){var r=e.deps;if(r!==null)for(var n=r.length,s=0;s<n;s++){var a=r[s];if(or(a)&&us(a),a.wv>e.wv)return!0}(t&Re)!==0&&Ce===null&&ve(e,de)}return!1}function Ts(e,t,r=!0){var n=e.reactions;if(n!==null&&!Je?.includes(e))for(var s=0;s<n.length;s++){var a=n[s];(a.f&fe)!==0?Ts(a,t,!1):t===a&&(r?ve(a,we):(a.f&de)!==0&&ve(a,tt),wt(a))}}function $s(e){var t=ge,r=Ee,n=$e,s=P,a=Je,i=ee,l=Ve,o=yt,u=e.f;ge=null,Ee=0,$e=null,P=(u&(et|ft))===0?e:null,Je=null,It(e.ctx),Ve=!1,yt=++er,e.ac!==null&&(Nr(()=>{e.ac.abort(zt)}),e.ac=null);try{e.f|=jr;var c=e.fn,v=c(),d=e.deps;if(ge!==null){var h;if(yr(e,Ee),d!==null&&Ee>0)for(d.length=Ee+ge.length,h=0;h<ge.length;h++)d[Ee+h]=ge[h];else e.deps=d=ge;if(ut&&Zt()&&(e.f&Re)!==0)for(h=Ee;h<d.length;h++)(d[h].reactions??=[]).push(e)}else d!==null&&Ee<d.length&&(yr(e,Ee),d.length=Ee);if(sr()&&$e!==null&&!Ve&&d!==null&&(e.f&(fe|tt|we))===0)for(h=0;h<$e.length;h++)Ts($e[h],e);return s!==null&&s!==e&&(er++,$e!==null&&(n===null?n=$e:n.push(...$e))),(e.f&lt)!==0&&(e.f^=lt),v}catch(y){return ns(y)}finally{e.f^=jr,ge=t,Ee=r,$e=n,P=s,Je=a,It(i),Ve=l,yt=o}}function wi(e,t){let r=t.reactions;if(r!==null){var n=ha.call(r,e);if(n!==-1){var s=r.length-1;s===0?r=t.reactions=null:(r[n]=r[s],r.pop())}}r===null&&(t.f&fe)!==0&&(ge===null||!ge.includes(t))&&(ve(t,tt),(t.f&Re)!==0&&(t.f^=Re,t.f&=~xt),os(t),yr(t,0))}function yr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)wi(e,r[n])}function tr(e){var t=e.f;if((t&Ge)===0){ve(e,de);var r=z,n=ut;z=e,ut=!0;try{(t&(Ze|Yn))!==0?yi(e):ys(e),bs(e);var s=$s(e);e.teardown=typeof s=="function"?s:null,e.wv=Ms;var a;Fr&&Ka&&(e.f&we)!==0&&e.deps}finally{ut=n,z=r}}}async function ki(){await Promise.resolve(),Qa()}function f(e){var t=e.f,r=(t&fe)!==0;if(P!==null&&!Ve){var n=z!==null&&(z.f&Ge)!==0;if(!n&&!Je?.includes(e)){var s=P.deps;if((P.f&jr)!==0)e.rv<er&&(e.rv=er,ge===null&&s!==null&&s[Ee]===e?Ee++:ge===null?ge=[e]:ge.includes(e)||ge.push(e));else{(P.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[P]:a.includes(P)||a.push(P)}}}if(Nt){if(ot.has(e))return ot.get(e);if(r){var i=e,l=i.v;return((i.f&de)===0&&i.reactions!==null||Cs(i))&&(l=nn(i)),ot.set(i,l),l}}else r&&(!Ce?.has(e)||D?.is_fork&&!Zt())&&(i=e,or(i)&&us(i),ut&&Zt()&&(i.f&Re)===0&&Ps(i));if(Ce?.has(e))return Ce.get(e);if((e.f&lt)!==0)throw e.v;return e.v}function Ps(e){if(e.deps!==null){e.f^=Re;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&fe)!==0&&(t.f&Re)===0&&Ps(t)}}function Cs(e){if(e.v===oe)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ot.has(t)||(t.f&fe)!==0&&Cs(t))return!0;return!1}function ct(e){var t=Ve;try{return Ve=!0,e()}finally{Ve=t}}const Ei=-7169;function ve(e,t){e.f=e.f&Ei|t}function Si(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(qe in e)Vr(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&qe in r&&Vr(r)}}}function Vr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Vr(e[n],t)}catch{}const r=Jr(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Un(r);for(let s in n){const a=n[s].get;if(a)try{a.call(e)}catch{}}}}}function Ai(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Mi=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ni(e){return Mi.includes(e)}const Ti={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function $i(e){return e=e.toLowerCase(),Ti[e]??e}const Pi=["touchstart","touchmove"];function Ci(e){return Pi.includes(e)}const zs=new Set,qr=new Set;function Ls(e,t,r,n={}){function s(a){if(n.capture||Qt.call(t,a),!a.cancelBubble)return Nr(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?At(()=>{t.addEventListener(e,s,n)}):t.addEventListener(e,s,n),s}function Rt(e,t,r,n={}){var s=Ls(t,e,r,n);return()=>{e.removeEventListener(t,s,n)}}function Bt(e){for(var t=0;t<e.length;t++)zs.add(e[t]);for(var r of qr)r(e)}let $n=null;function Qt(e){var t=this,r=t.ownerDocument,n=e.type,s=e.composedPath?.()||[],a=s[0]||e.target;$n=e;var i=0,l=$n===e&&e.__root;if(l){var o=s.indexOf(l);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var u=s.indexOf(t);if(u===-1)return;o<=u&&(i=o)}if(a=s[i]||e.target,a!==t){_a(e,"currentTarget",{configurable:!0,get(){return a||r}});var c=P,v=z;xe(null),He(null);try{for(var d,h=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var k=a["__"+n];k!=null&&(!a.disabled||e.target===a)&&k.call(a,e)}catch(m){d?h.push(m):d=m}if(e.cancelBubble||y===t||y===null)break;a=y}if(d){for(let m of h)queueMicrotask(()=>{throw m});throw d}}finally{e.__root=t,delete e.currentTarget,xe(c),He(v)}}}function cn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function jt(e,t){var r=z;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function M(e,t){var r=(t&ja)!==0,n=(t&Da)!==0,s,a=!e.startsWith("<!>");return()=>{s===void 0&&(s=cn(a?e:"<!>"+e),r||(s=Be(s)));var i=n||ds?document.importNode(s,!0):s.cloneNode(!0);if(r){var l=Be(i),o=i.lastChild;jt(l,o)}else jt(i,i);return i}}function zi(e,t,r="svg"){var n=!e.startsWith("<!>"),s=`<${r}>${n?e:"<!>"+e}</${r}>`,a;return()=>{if(!a){var i=cn(s),l=Be(i);a=Be(l)}var o=a.cloneNode(!0);return jt(o,o),o}}function Li(e,t){return zi(e,t,"svg")}function R(){var e=document.createDocumentFragment(),t=document.createComment(""),r=We();return e.append(t,r),jt(t,r),e}function g(e,t){e!==null&&e.before(t)}function re(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Ii(e,t){return Oi(e,t)}const Ct=new Map;function Oi(e,{target:t,anchor:r,props:n={},events:s,context:a,intro:i=!0}){di();var l=new Set,o=v=>{for(var d=0;d<v.length;d++){var h=v[d];if(!l.has(h)){l.add(h);var y=Ci(h);t.addEventListener(h,Qt,{passive:y});var k=Ct.get(h);k===void 0?(document.addEventListener(h,Qt,{passive:y}),Ct.set(h,1)):Ct.set(h,k+1)}}};o(Qr(zs)),qr.add(o);var u=void 0,c=mi(()=>{var v=r??t.appendChild(We());return Za(v,{pending:()=>{}},d=>{if(a){L({});var h=ee;h.c=a}s&&(n.$$events=s),u=e(d,n)||{},a&&I()}),()=>{for(var d of l){t.removeEventListener(d,Qt);var h=Ct.get(d);--h===0?(document.removeEventListener(d,Qt),Ct.delete(d)):Ct.set(d,h)}qr.delete(o),v!==r&&v.parentNode?.removeChild(v)}});return Fi.set(u,c),u}let Fi=new WeakMap;class Tr{anchor;#t=new Map;#e=new Map;#n=new Map;#r=new Set;#a=!0;constructor(t,r=!0){this.anchor=t,this.#a=r}#s=()=>{var t=D;if(this.#t.has(t)){var r=this.#t.get(t),n=this.#e.get(r);if(n)fn(n),this.#r.delete(r);else{var s=this.#n.get(r);s&&(this.#e.set(r,s.effect),this.#n.delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[a,i]of this.#t){if(this.#t.delete(a),a===t)break;const l=this.#n.get(i);l&&(ae(l.effect),this.#n.delete(i))}for(const[a,i]of this.#e){if(a===r||this.#r.has(a))continue;const l=()=>{if(Array.from(this.#t.values()).includes(a)){var u=document.createDocumentFragment();Ss(i,u),u.append(We()),this.#n.set(a,{effect:i,fragment:u})}else ae(i);this.#r.delete(a),this.#e.delete(a)};this.#a||!n?(this.#r.add(a),Lt(i,l,!1)):l()}}};#o=t=>{this.#t.delete(t);const r=Array.from(this.#t.values());for(const[n,s]of this.#n)r.includes(n)||(ae(s.effect),this.#n.delete(n))};ensure(t,r){var n=D,s=_s();if(r&&!this.#e.has(t)&&!this.#n.has(t))if(s){var a=document.createDocumentFragment(),i=We();a.append(i),this.#n.set(t,{effect:ye(()=>r(i)),fragment:a})}else this.#e.set(t,ye(()=>r(this.anchor)));if(this.#t.set(n,t),s){for(const[l,o]of this.#e)l===t?n.skipped_effects.delete(o):n.skipped_effects.add(o);for(const[l,o]of this.#n)l===t?n.skipped_effects.delete(o.effect):n.skipped_effects.add(o.effect);n.oncommit(this.#s),n.ondiscard(this.#o)}else this.#s()}}function W(e,t,r=!1){var n=new Tr(e),s=r?Xe:0;function a(i,l){n.ensure(i,l)}Mt(()=>{var i=!1;t((l,o=!0)=>{i=!0,a(o,l)}),i||a(!1,null)},s)}function Ri(e,t,r=!1,n=!1,s=!1){var a=e,i="";ue(()=>{var l=z;if(i!==(i=t()??"")&&(l.nodes_start!==null&&(xs(l.nodes_start,l.nodes_end),l.nodes_start=l.nodes_end=null),i!=="")){var o=i+"";r?o=`<svg>${o}</svg>`:n&&(o=`<math>${o}</math>`);var u=cn(o);if((r||n)&&(u=Be(u)),jt(Be(u),u.lastChild),r||n)for(;Be(u);)a.before(Be(u));else a.before(u)}})}function K(e,t,...r){var n=new Tr(e);Mt(()=>{const s=t()??null;n.ensure(s,s&&(a=>s(a,...r)))},Xe)}function ji(e,t,r){var n=new Tr(e);Mt(()=>{var s=t()??null;n.ensure(s,s&&(a=>r(a,s)))},Xe)}function Di(e,t,r,n,s,a){var i=null,l=e,o=new Tr(l,!1);Mt(()=>{const u=t()||null;var c=Va;if(u===null){o.ensure(null,null);return}return o.ensure(u,v=>{if(u){if(i=document.createElementNS(c,u),jt(i,i),n){var d=i.appendChild(We());n(i,d)}z.nodes_end=i,v.before(i)}}),()=>{}},Xe),sn(()=>{})}function Bi(e,t){var r;r=document.head.appendChild(We());try{Mt(()=>t(r),en)}finally{}}function Vi(e,t){var r=void 0,n;ms(()=>{r!==(r=t())&&(n&&(ae(n),n=null),r&&(n=ye(()=>{ln(()=>r(e))})))})}function Is(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Is(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qi(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Is(e))&&(n&&(n+=" "),n+=t);return n}function Wi(e){return typeof e=="object"?qi(e):e??""}const Pn=[...`
2
+ \r\f \v\uFEFF`];function Hi(e,t,r){var n=e==null?"":""+e;if(r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var a=s.length,i=0;(i=n.indexOf(s,i))>=0;){var l=i+a;(i===0||Pn.includes(n[i-1]))&&(l===n.length||Pn.includes(n[l]))?n=(i===0?"":n.substring(0,i))+n.substring(l+1):i=l}}return n===""?null:n}function Cn(e,t=!1){var r=t?" !important;":";",n="";for(var s in e){var a=e[s];a!=null&&a!==""&&(n+=" "+s+": "+a+r)}return n}function zr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Ui(e,t){if(t){var r="",n,s;if(Array.isArray(t)?(n=t[0],s=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,i=0,l=!1,o=[];n&&o.push(...Object.keys(n).map(zr)),s&&o.push(...Object.keys(s).map(zr));var u=0,c=-1;const k=e.length;for(var v=0;v<k;v++){var d=e[v];if(l?d==="/"&&e[v-1]==="*"&&(l=!1):a?a===d&&(a=!1):d==="/"&&e[v+1]==="*"?l=!0:d==='"'||d==="'"?a=d:d==="("?i++:d===")"&&i--,!l&&a===!1&&i===0){if(d===":"&&c===-1)c=v;else if(d===";"||v===k-1){if(c!==-1){var h=zr(e.substring(u,c).trim());if(!o.includes(h)){d!==";"&&v++;var y=e.substring(u,v).trim();r+=" "+y+";"}}u=v+1,c=-1}}}}return n&&(r+=Cn(n)),s&&(r+=Cn(s,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Ye(e,t,r,n,s,a){var i=e.__className;if(i!==r||i===void 0){var l=Hi(r,n,a);l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e.__className=r}else if(a&&s!==a)for(var o in a){var u=!!a[o];(s==null||u!==!!s[o])&&e.classList.toggle(o,u)}return a}function Lr(e,t={},r,n){for(var s in r){var a=r[s];t[s]!==a&&(r[s]==null?e.style.removeProperty(s):e.style.setProperty(s,a,n))}}function Os(e,t,r,n){var s=e.__style;if(s!==t){var a=Ui(t,n);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}else n&&(Array.isArray(n)?(Lr(e,r?.[0],n[0]),Lr(e,r?.[1],n[1],"important")):Lr(e,r,n));return n}function Wr(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Gr(t))return Wa();for(var n of e.options)n.selected=t.includes(zn(n));return}for(n of e.options){var s=zn(n);if(ci(s,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Ki(e){var t=new MutationObserver(()=>{Wr(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),sn(()=>{t.disconnect()})}function zn(e){return"__value"in e?e.__value:e.value}const Kt=Symbol("class"),Yt=Symbol("style"),Fs=Symbol("is custom element"),Rs=Symbol("is html");function Yi(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function rr(e,t,r,n){var s=js(e);s[t]!==(s[t]=r)&&(t==="loading"&&(e[ya]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Ds(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Gi(e,t,r,n,s=!1,a=!1){var i=js(e),l=i[Fs],o=!i[Rs],u=t||{},c=e.tagName==="OPTION";for(var v in t)v in r||(r[v]=null);r.class?r.class=Wi(r.class):r[Kt]&&(r.class=null),r[Yt]&&(r.style??=null);var d=Ds(e);for(const p in r){let E=r[p];if(c&&p==="value"&&E==null){e.value=e.__value="",u[p]=E;continue}if(p==="class"){var h=e.namespaceURI==="http://www.w3.org/1999/xhtml";Ye(e,h,E,n,t?.[Kt],r[Kt]),u[p]=E,u[Kt]=r[Kt];continue}if(p==="style"){Os(e,E,t?.[Yt],r[Yt]),u[p]=E,u[Yt]=r[Yt];continue}var y=u[p];if(!(E===y&&!(E===void 0&&e.hasAttribute(p)))){u[p]=E;var k=p[0]+p[1];if(k!=="$$")if(k==="on"){const O={},j="$$"+p;let T=p.slice(2);var m=Ni(T);if(Ai(T)&&(T=T.slice(0,-7),O.capture=!0),!m&&y){if(E!=null)continue;e.removeEventListener(T,u[j],O),u[j]=null}if(E!=null)if(m)e[`__${T}`]=E,Bt([T]);else{let F=function(te){u[p].call(this,te)};var S=F;u[j]=Ls(T,e,F,O)}else m&&(e[`__${T}`]=void 0)}else if(p==="style")rr(e,p,E);else if(p==="autofocus")hi(e,!!E);else if(!l&&(p==="__value"||p==="value"&&E!=null))e.value=e.__value=E;else if(p==="selected"&&c)Yi(e,E);else{var b=p;o||(b=$i(b));var H=b==="defaultValue"||b==="defaultChecked";if(E==null&&!l&&!H)if(i[p]=null,b==="value"||b==="checked"){let O=e;const j=t===void 0;if(b==="value"){let T=O.defaultValue;O.removeAttribute(b),O.defaultValue=T,O.value=O.__value=j?T:null}else{let T=O.defaultChecked;O.removeAttribute(b),O.defaultChecked=T,O.checked=j?T:!1}}else e.removeAttribute(p);else H||d.includes(b)&&(l||typeof E!="string")?(e[b]=E,b in i&&(i[b]=oe)):typeof E!="function"&&rr(e,b,E)}}}return u}function Ln(e,t,r=[],n=[],s=[],a,i=!1,l=!1){ls(s,r,n,o=>{var u=void 0,c={},v=e.nodeName==="SELECT",d=!1;if(ms(()=>{var y=t(...o.map(f)),k=Gi(e,u,y,a,i,l);d&&v&&"value"in y&&Wr(e,y.value);for(let b of Object.getOwnPropertySymbols(c))y[b]||ae(c[b]);for(let b of Object.getOwnPropertySymbols(y)){var m=y[b];b.description===qa&&(!u||m!==u[b])&&(c[b]&&ae(c[b]),c[b]=ye(()=>Vi(e,()=>m))),k[b]=m}u=k}),v){var h=e;ln(()=>{Wr(h,u.value,!0),Ki(h)})}d=!0})}function js(e){return e.__attributes??={[Fs]:e.nodeName.includes("-"),[Rs]:e.namespaceURI===Ba}}var In=new Map;function Ds(e){var t=e.getAttribute("is")||e.nodeName,r=In.get(t);if(r)return r;In.set(t,r=[]);for(var n,s=e,a=Element.prototype;a!==s;){n=Un(s);for(var i in n)n[i].set&&r.push(i);s=Jr(s)}return r}function Bs(e,t,r=t){var n=new WeakSet;pi(e,"input",async s=>{var a=s?e.defaultValue:e.value;if(a=Ir(e)?Or(a):a,r(a),D!==null&&n.add(D),await ki(),a!==(a=t())){var i=e.selectionStart,l=e.selectionEnd,o=e.value.length;if(e.value=a??"",l!==null){var u=e.value.length;i===l&&l===o&&u>o?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=i,e.selectionEnd=Math.min(l,u))}}}),ct(t)==null&&e.value&&(r(Ir(e)?Or(e.value):e.value),D!==null&&n.add(D)),on(()=>{var s=t();if(e===document.activeElement){var a=_r??D;if(n.has(a))return}Ir(e)&&s===Or(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Ir(e){var t=e.type;return t==="number"||t==="range"}function Or(e){return e===""?null:+e}function On(e,t){return e===t||e?.[qe]===t}function Qi(e={},t,r,n){return ln(()=>{var s,a;return on(()=>{s=a,a=[],ct(()=>{e!==r(...a)&&(t(e,...a),s&&On(r(...s),e)&&t(null,...s))})}),()=>{At(()=>{a&&On(r(...a),e)&&t(null,...a)})}}),e}function Ji(e=!1){const t=ee,r=t.l.u;if(!r)return;let n=()=>Si(t.s);if(e){let s=0,a={};const i=ir(()=>{let l=!1;const o=t.s;for(const u in o)o[u]!==a[u]&&(a[u]=o[u],l=!0);return l&&s++,s});n=()=>f(i)}r.b.length&&Oe(()=>{Fn(t,n),Rr(r.b)}),Et(()=>{const s=ct(()=>r.m.map(ma));return()=>{for(const a of s)typeof a=="function"&&a()}}),r.a.length&&Et(()=>{Fn(t,n),Rr(r.a)})}function Fn(e,t){if(e.l.s)for(const r of e.l.s)f(r);t()}let hr=!1;function Xi(e){var t=hr;try{return hr=!1,[e(),hr]}finally{hr=t}}const Zi={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Y(e,t,r){return new Proxy({props:e,exclude:t},Zi)}const el={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(Ut(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let s=e.props[n];Ut(s)&&(s=s());const a=it(s,t);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(Ut(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const s=it(n,t);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,t){if(t===qe||t===Qn)return!1;for(let r of e.props)if(Ut(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(Ut(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function G(...e){return new Proxy({props:e},el)}function Z(e,t,r,n){var s=!Dt||(r&Ia)!==0,a=(r&Fa)!==0,i=(r&Ra)!==0,l=n,o=!0,u=()=>(o&&(o=!1,l=i?ct(n):n),l),c;if(a){var v=qe in e||Qn in e;c=it(e,t)?.set??(v&&t in e?S=>e[t]=S:void 0)}var d,h=!1;a?[d,h]=Xi(()=>e[t]):d=e[t],d===void 0&&n!==void 0&&(d=u(),c&&(s&&Ma(),c(d)));var y;if(s?y=()=>{var S=e[t];return S===void 0?u():(o=!0,S)}:y=()=>{var S=e[t];return S!==void 0&&(l=void 0),S===void 0?l:S},s&&(r&Oa)===0)return y;if(c){var k=e.$$legacy;return(function(S,p){return arguments.length>0?((!s||!p||k||h)&&c(p?y():S),S):y()})}var m=!1,b=((r&La)!==0?ir:rn)(()=>(m=!1,y()));a&&f(b);var H=z;return(function(S,p){if(arguments.length>0){const E=p?f(b):s&&a?ze(S):S;return A(b,E),m=!0,l!==void 0&&(l=E),S}return Nt&&m||(H.f&Ge)!==0?b.v:f(b)})}function Vs(e){ee===null&&xa(),Dt&&ee.l!==null?tl(ee).m.push(e):Et(()=>{const t=ct(e);if(typeof t=="function")return t})}function tl(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const rl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(rl);const nl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var sl=Li("<svg><!><!></svg>");function Q(e,t){L(t,!0);const r=Z(t,"color",3,"currentColor"),n=Z(t,"size",3,24),s=Z(t,"strokeWidth",3,2),a=Z(t,"absoluteStrokeWidth",3,!1),i=Z(t,"iconNode",19,()=>[]),l=Y(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var o=sl();Ln(o,v=>({...nl,...l,width:n(),height:n(),stroke:r(),"stroke-width":v,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>a()?Number(s())*24/Number(n()):s()]);var u=_(o);Mr(u,17,i,ti,(v,d)=>{var h=Qe(()=>ba(f(d),2));let y=()=>f(h)[0],k=()=>f(h)[1];var m=R(),b=N(m);Di(b,y,!0,(H,S)=>{Ln(H,()=>({...k()}))}),g(v,m)});var c=w(u);K(c,()=>t.children??U),g(e,o),I()}function al(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 6 9 17l-5-5"}]];Q(e,G({name:"check"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function Rn(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];Q(e,G({name:"circle-alert"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function jn(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];Q(e,G({name:"circle-check"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function Dn(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7"}]];Q(e,G({name:"circle-dashed"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function qs(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];Q(e,G({name:"file-text"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function il(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}],["path",{d:"m2 2 20 20"}],["path",{d:"M4 22V4"}],["path",{d:"M7.656 2H8c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10.347"}]];Q(e,G({name:"flag-off"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function ll(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]];Q(e,G({name:"flag"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function ol(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Q(e,G({name:"folder-open"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function ul(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];Q(e,G({name:"funnel"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function fl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];Q(e,G({name:"globe"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function cl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Q(e,G({name:"info"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function dl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m5 8 6 6"}],["path",{d:"m4 14 6-6 2-3"}],["path",{d:"M2 5h12"}],["path",{d:"M7 2h1"}],["path",{d:"m22 22-5-10-5 10"}],["path",{d:"M14 18h6"}]];Q(e,G({name:"languages"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function pr(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Q(e,G({name:"loader-circle"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function vl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}],["circle",{cx:"12",cy:"10",r:"3"}]];Q(e,G({name:"map-pin"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function hl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}],["path",{d:"M7 11h10"}],["path",{d:"M7 15h6"}],["path",{d:"M7 7h8"}]];Q(e,G({name:"message-square-text"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function _l(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"}]];Q(e,G({name:"moon"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function pl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Q(e,G({name:"pencil"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function gl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Q(e,G({name:"refresh-cw"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function ml(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Q(e,G({name:"search"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function bl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];Q(e,G({name:"sun"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function Ws(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];Q(e,G({name:"triangle-alert"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}function Hs(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Q(e,G({name:"x"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=R(),l=N(i);K(l,()=>t.children??U),g(s,i)},$$slots:{default:!0}})),I()}const Us=typeof window<"u"?window:void 0;function yl(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class xl{#t;#e;constructor(t,r){this.#t=t,this.#e=ar(r)}get current(){return this.#e(),this.#t()}}const wl=/\(.+\)/,kl=new Set(["all","print","screen","and","or","not","only"]);class El extends xl{constructor(t,r){let n=wl.test(t)||t.split(/[\s,]+/).some(a=>kl.has(a.trim()))?t:`(${t})`;const s=window.matchMedia(n);super(()=>s.matches,a=>Rt(s,"change",a))}}let Sl=class{#t;#e;constructor(t={}){const{window:r=Us,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=ar(s=>{const a=Rt(r,"focusin",s),i=Rt(r,"focusout",s);return()=>{a(),i()}}))}get current(){return this.#e?.(),this.#t?yl(this.#t):null}};new Sl;function Al(e,t){switch(e){case"post":Et(t);break;case"pre":Oe(t);break}}function Ks(e,t,r,n={}){const{lazy:s=!1}=n;let a=!s,i=Array.isArray(e)?[]:void 0;Al(t,()=>{const l=Array.isArray(e)?e.map(u=>u()):e();if(!a){a=!0,i=l;return}const o=ct(()=>r(l,i));return i=l,o})}function dn(e,t,r){Ks(e,"post",t,r)}function Ml(e,t,r){Ks(e,"pre",t,r)}dn.pre=Ml;function Nl(e,t){switch(e){case"local":return t.localStorage;case"session":return t.sessionStorage}}class Ys{#t;#e;#n;#r;#a;#s=B(0);constructor(t,r,n={}){const{storage:s="local",serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:i=!0,window:l=Us}=n;if(this.#t=r,this.#e=t,this.#n=a,l===void 0)return;const o=Nl(s,l);this.#r=o;const u=o.getItem(t);u!==null?this.#t=this.#i(u):this.#l(r),i&&s==="local"&&(this.#a=ar(()=>Rt(l,"storage",this.#o)))}get current(){this.#a?.(),f(this.#s);const t=this.#i(this.#r?.getItem(this.#e))??this.#t,r=new WeakMap,n=s=>{if(s===null||s?.constructor.name==="Date"||typeof s!="object")return s;let a=r.get(s);return a||(a=new Proxy(s,{get:(i,l)=>(f(this.#s),n(Reflect.get(i,l))),set:(i,l,o)=>(A(this.#s,f(this.#s)+1),Reflect.set(i,l,o),this.#l(t),!0)}),r.set(s,a)),a};return n(t)}set current(t){this.#l(t),A(this.#s,f(this.#s)+1)}#o=t=>{t.key!==this.#e||t.newValue===null||(this.#t=this.#i(t.newValue),A(this.#s,f(this.#s)+1))};#i(t){try{return this.#n.deserialize(t)}catch(r){console.error(`Error when parsing "${t}" from persisted store "${this.#e}"`,r);return}}#l(t){try{t!=null&&this.#r?.setItem(this.#e,this.#n.serialize(t))}catch(r){console.error(`Error when writing value from persisted store "${this.#e}" to ${this.#r}`,r)}}}function Bn(e){return e.filter(t=>t.length>0)}const Gs={getItem:e=>null,setItem:(e,t)=>{}},ur=typeof document<"u";function Tl(e){return typeof e=="function"}function $l(e){return e!==null&&typeof e=="object"}const nr=Symbol("box"),vn=Symbol("is-writable");function Pl(e){return $l(e)&&nr in e}function Cl(e){return ne.isBox(e)&&vn in e}function ne(e){let t=B(ze(e));return{[nr]:!0,[vn]:!0,get current(){return f(t)},set current(r){A(t,r,!0)}}}function zl(e,t){const r=Qe(e);return t?{[nr]:!0,[vn]:!0,get current(){return f(r)},set current(n){t(n)}}:{[nr]:!0,get current(){return e()}}}function Ll(e){return ne.isBox(e)?e:Tl(e)?ne.with(e):ne(e)}function Il(e){return Object.entries(e).reduce((t,[r,n])=>ne.isBox(n)?(ne.isWritableBox(n)?Object.defineProperty(t,r,{get(){return n.current},set(s){n.current=s}}):Object.defineProperty(t,r,{get(){return n.current}}),t):Object.assign(t,{[r]:n}),{})}function Ol(e){return ne.isWritableBox(e)?{[nr]:!0,get current(){return e.current}}:e}ne.from=Ll;ne.with=zl;ne.flatten=Il;ne.readonly=Ol;ne.isBox=Pl;ne.isWritableBox=Cl;function Fl(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}const Rl=Fl(/[A-Z]/,e=>`-${e.toLowerCase()}`);function jl(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Rl(t)}: ${e[t]};`).join(`
3
+ `)}function Dl(e={}){return jl(e).replace(`
4
+ `," ")}const Bl={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};Dl(Bl);const Vl=typeof window<"u"?window:void 0;function ql(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class Wl{#t;#e;constructor(t={}){const{window:r=Vl,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=ar(s=>{const a=Rt(r,"focusin",s),i=Rt(r,"focusout",s);return()=>{a(),i()}}))}get current(){return this.#e?.(),this.#t?ql(this.#t):null}}new Wl;const mt=ne("mode-watcher-mode"),bt=ne("mode-watcher-theme"),Hl=["dark","light","system"];function Hr(e){return typeof e!="string"?!1:Hl.includes(e)}class Ul{#t="system";#e=ur?localStorage:Gs;#n=this.#e.getItem(mt.current);#r=Hr(this.#n)?this.#n:this.#t;#a=B(ze(this.#s()));#s(t=this.#r){return new Ys(mt.current,t,{serializer:{serialize:r=>r,deserialize:r=>Hr(r)?r:this.#t}})}constructor(){an(()=>dn.pre(()=>mt.current,(t,r)=>{const n=f(this.#a).current;A(this.#a,this.#s(n),!0),r&&localStorage.removeItem(r)}))}get current(){return f(this.#a).current}set current(t){f(this.#a).current=t}}class Kl{#t=void 0;#e=!0;#n=B(ze(this.#t));#r=typeof window<"u"&&typeof window.matchMedia=="function"?new El("prefers-color-scheme: light"):{current:!1};query(){ur&&A(this.#n,this.#r.current?"light":"dark",!0)}tracking(t){this.#e=t}constructor(){an(()=>{Oe(()=>{this.#e&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return f(this.#n)}}const xr=new Ul,Ur=new Kl;class Yl{#t=ur?localStorage:Gs;#e=this.#t.getItem(bt.current);#n=this.#e===null||this.#e===void 0?"":this.#e;#r=B(ze(this.#a()));#a(t=this.#n){return new Ys(bt.current,t,{serializer:{serialize:r=>typeof r!="string"?"":r,deserialize:r=>r}})}constructor(){an(()=>dn.pre(()=>bt.current,(t,r)=>{const n=f(this.#r).current;A(this.#r,this.#a(n),!0),r&&localStorage.removeItem(r)}))}get current(){return f(this.#r).current}set current(t){f(this.#r).current=t}}const gr=new Yl;let Vn,qn,Wn=!1,Gt=null;function Gl(){return Gt||(Gt=document.createElement("style"),Gt.appendChild(document.createTextNode(`* {
5
+ -webkit-transition: none !important;
6
+ -moz-transition: none !important;
7
+ -o-transition: none !important;
8
+ -ms-transition: none !important;
9
+ transition: none !important;
10
+ }`)),Gt)}function Qs(e,t=!1){if(typeof document>"u")return;if(!Wn){Wn=!0,e();return}if(typeof window<"u"&&window.__vitest_worker__){e();return}clearTimeout(Vn),clearTimeout(qn);const n=Gl(),s=()=>document.head.appendChild(n),a=()=>{n.parentNode&&document.head.removeChild(n)};function i(){e(),window.requestAnimationFrame(a)}if(typeof window.requestAnimationFrame<"u"){s(),t?i():window.requestAnimationFrame(()=>{i()});return}s(),Vn=window.setTimeout(()=>{e(),qn=window.setTimeout(a,16)},16)}const at=ne(void 0),wr=ne(!0),kr=ne(!1),Kr=ne([]),Yr=ne([]);function Ql(){const e=Qe(()=>{if(!ur)return;const t=xr.current==="system"?Ur.current:xr.current,r=Bn(Kr.current),n=Bn(Yr.current);function s(){const a=document.documentElement,i=document.querySelector('meta[name="theme-color"]');t==="light"?(r.length&&a.classList.remove(...r),n.length&&a.classList.add(...n),a.style.colorScheme="light",i&&at.current&&i.setAttribute("content",at.current.light)):(n.length&&a.classList.remove(...n),r.length&&a.classList.add(...r),a.style.colorScheme="dark",i&&at.current&&i.setAttribute("content",at.current.dark))}return wr.current?Qs(s,kr.current):s(),t});return{get current(){return f(e)}}}function Jl(){const e=Qe(()=>{if(gr.current,!ur)return;function t(){document.documentElement.setAttribute("data-theme",gr.current)}return wr.current?Qs(t,ct(()=>kr.current)):t(),gr.current});return{get current(){return f(e)}}}const hn=Ql(),Xl=Jl();function Zl(){xr.current=hn.current==="dark"?"light":"dark"}function eo(e){xr.current=e}function to(e){gr.current=e}function ro({defaultMode:e="system",themeColors:t,darkClassNames:r=["dark"],lightClassNames:n=[],defaultTheme:s="",modeStorageKey:a="mode-watcher-mode",themeStorageKey:i="mode-watcher-theme"}){const l=document.documentElement,o=localStorage.getItem(a)??e,u=localStorage.getItem(i)??s,c=o==="light"||o==="system"&&window.matchMedia("(prefers-color-scheme: light)").matches;if(c?(r.length&&l.classList.remove(...r.filter(Boolean)),n.length&&l.classList.add(...n.filter(Boolean))):(n.length&&l.classList.remove(...n.filter(Boolean)),r.length&&l.classList.add(...r.filter(Boolean))),l.style.colorScheme=c?"light":"dark",t){const v=document.querySelector('meta[name="theme-color"]');v&&v.setAttribute("content",o==="light"?t.light:t.dark)}u&&(l.setAttribute("data-theme",u),localStorage.setItem(i,u)),localStorage.setItem(a,o)}var no=M('<meta name="theme-color"/>');function so(e,t){L(t,!0);var r=R(),n=N(r);{var s=a=>{var i=no();ue(()=>rr(i,"content",t.themeColors.dark)),g(a,i)};W(n,a=>{t.themeColors&&a(s)})}g(e,r),I()}var ao=M('<meta name="theme-color"/>'),io=M("<!> <!>",1);function lo(e,t){L(t,!0);let r=Z(t,"trueNonce",3,"");Bi("1funsus",n=>{var s=io(),a=N(s);{var i=o=>{var u=ao();ue(()=>rr(u,"content",t.themeColors.dark)),g(o,u)};W(a,o=>{t.themeColors&&o(i)})}var l=w(a,2);Ri(l,()=>`<script${r()?` nonce=${r()}`:""}>(`+ro.toString()+")("+JSON.stringify(t.initConfig)+");<\/script>"),g(n,s)}),I()}function oo(e,t){L(t,!0);let r=Z(t,"track",3,!0),n=Z(t,"defaultMode",3,"system"),s=Z(t,"disableTransitions",3,!0),a=Z(t,"darkClassNames",19,()=>["dark"]),i=Z(t,"lightClassNames",19,()=>[]),l=Z(t,"defaultTheme",3,""),o=Z(t,"nonce",3,""),u=Z(t,"themeStorageKey",3,"mode-watcher-theme"),c=Z(t,"modeStorageKey",3,"mode-watcher-mode"),v=Z(t,"disableHeadScriptInjection",3,!1),d=Z(t,"synchronousModeChanges",3,!1);mt.current=c(),bt.current=u(),Kr.current=a(),Yr.current=i(),wr.current=s(),at.current=t.themeColors,kr.current=d(),Oe(()=>{kr.current=d()}),Oe(()=>{wr.current=s()}),Oe(()=>{at.current=t.themeColors}),Oe(()=>{Kr.current=a()}),Oe(()=>{Yr.current=i()}),Oe(()=>{mt.current=c()}),Oe(()=>{bt.current=u()}),Oe(()=>{hn.current,mt.current,bt.current,Xl.current}),Vs(()=>{Ur.tracking(r()),Ur.query();const S=localStorage.getItem(mt.current);eo(Hr(S)?S:n());const p=localStorage.getItem(bt.current);to(p||l())});const h={defaultMode:n(),themeColors:t.themeColors,darkClassNames:a(),lightClassNames:i(),defaultTheme:l(),modeStorageKey:c(),themeStorageKey:u()},y=Qe(()=>typeof window>"u"?o():"");var k=R(),m=N(k);{var b=S=>{so(S,{get themeColors(){return at.current}})},H=S=>{lo(S,{get trueNonce(){return f(y)},get initConfig(){return h},get themeColors(){return at.current}})};W(m,S=>{v()?S(b):S(H,!1)})}g(e,k),I()}let Js=B(0);function uo(){return f(Js)}function Hn(){fi(Js)}var fo=M('<div class="flex flex-1 flex-col items-center justify-center gap-2 text-slate-500 dark:text-slate-400"><!> <span class="text-sm">Loading languages...</span></div>'),co=M('<div class="flex flex-1 flex-col items-center justify-center gap-3 px-4 text-center"><!> <p class="text-sm text-red-600 dark:text-red-400"> </p> <button type="button" class="btn btn-secondary text-sm">Retry</button></div>'),vo=M('<div class="flex flex-1 flex-col items-center justify-center gap-2 px-4 text-center text-slate-500 dark:text-slate-400"><!> <p class="text-sm font-medium">No .po files found</p> <p class="text-xs text-slate-400 dark:text-slate-500">Add .po files to your locales directory</p></div>'),ho=M('<li><button type="button"><div class="flex items-start justify-between"><div><span> </span> <span class="text-xs text-slate-500 dark:text-slate-400"> </span></div> <span> </span></div> <div class="mt-2 h-1.5 overflow-hidden rounded-full bg-slate-200 dark:bg-slate-700"><div></div></div> <div class="mt-2 flex gap-3 text-xs text-slate-500 dark:text-slate-400"><span class="flex items-center gap-1"><span class="h-1.5 w-1.5 rounded-full bg-emerald-500"></span> </span> <span class="flex items-center gap-1"><span class="h-1.5 w-1.5 rounded-full bg-amber-500"></span> </span> <span class="flex items-center gap-1"><span class="h-1.5 w-1.5 rounded-full bg-red-500"></span> </span></div></button></li>'),_o=M('<ul class="flex-1 overflow-y-auto p-2"></ul>'),po=M('<div class="flex h-full flex-col"><div class="flex items-center justify-between border-b border-slate-200 px-4 py-3 dark:border-slate-700"><div class="flex items-center gap-2"><!> <h2 class="text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400">Languages</h2></div> <button type="button" class="rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 disabled:opacity-50 dark:hover:bg-slate-700 dark:hover:text-slate-300" title="Refresh languages"><!></button></div> <!></div>');function go(e,t){L(t,!0);let r=Z(t,"selected",15,null),n=Z(t,"apiBase",3,"."),s=B(ze([])),a=B(!0),i=B(null),l=B(!1);Vs(async()=>{await o()}),Et(()=>{uo()>0&&o()});async function o(){if(!f(l)){A(a,f(s).length===0),A(l,!0),A(i,null);try{const E=await(await fetch(`${n()}/api/languages`)).json();if(!E.success)throw new Error(E.error||"Failed to load languages");A(s,E.data||[],!0)}catch(p){A(i,p instanceof Error?p.message:"Failed to load languages",!0)}finally{A(a,!1),A(l,!1)}}}function u(p){return p>=90?"bg-emerald-500":p>=50?"bg-amber-500":"bg-red-500"}function c(p){return p>=90?"text-emerald-600 dark:text-emerald-400":p>=50?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}var v=po(),d=_(v),h=_(d),y=_(h);dl(y,{class:"h-4 w-4 text-slate-400"});var k=w(h,2);k.__click=o;var m=_(k);{let p=Qe(()=>f(l)?"animate-spin":"");gl(m,{get class(){return`h-4 w-4 ${f(p)??""}`}})}var b=w(d,2);{var H=p=>{var E=fo(),O=_(E);pr(O,{class:"h-6 w-6 animate-spin"}),g(p,E)},S=p=>{var E=R(),O=N(E);{var j=F=>{var te=co(),ie=_(te);Ws(ie,{class:"h-8 w-8 text-red-400"});var J=w(ie,2),ke=_(J),le=w(J,2);le.__click=o,ue(()=>re(ke,f(i))),g(F,te)},T=F=>{var te=R(),ie=N(te);{var J=le=>{var me=vo(),Ae=_(me);ol(Ae,{class:"h-8 w-8 text-slate-300 dark:text-slate-600"}),g(le,me)},ke=le=>{var me=_o();Mr(me,21,()=>f(s),Ae=>Ae.code,(Ae,he)=>{var fr=ho(),Vt=_(fr);Vt.__click=()=>r(f(he).code);var cr=_(Vt),dr=_(cr),qt=_(dr),$r=_(qt),Pr=w(qt,2),x=_(Pr),C=w(dr,2),be=_(C),Me=w(cr,2),rt=_(Me),nt=w(Me,2),st=_(nt),Tt=w(_(st)),dt=w(st,2),Wt=w(_(dt)),je=w(dt,2),vt=w(_(je));ue(($t,ht)=>{Ye(Vt,1,`group w-full rounded-lg p-3 text-left transition-colors ${r()===f(he).code?"bg-blue-50 ring-1 ring-blue-200 dark:bg-blue-900/30 dark:ring-blue-700":"hover:bg-slate-50 dark:hover:bg-slate-700/50"}`),Ye(qt,1,`block font-medium text-slate-900 dark:text-white ${r()===f(he).code?"text-blue-900 dark:text-blue-300":""}`),re($r,f(he).name),re(x,f(he).code),Ye(C,1,`text-xs font-medium ${$t??""}`),re(be,`${f(he).progress??""}%`),Ye(rt,1,`h-full transition-all duration-300 ${ht??""}`),Os(rt,`width: ${f(he).progress??""}%`),re(Tt,` ${f(he).translated??""}`),re(Wt,` ${f(he).fuzzy??""}`),re(vt,` ${f(he).untranslated??""}`)},[()=>c(f(he).progress),()=>u(f(he).progress)]),g(Ae,fr)}),g(le,me)};W(ie,le=>{f(s).length===0?le(J):le(ke,!1)},!0)}g(F,te)};W(O,F=>{f(i)?F(j):F(T,!1)},!0)}g(p,E)};W(b,p=>{f(a)?p(H):p(S,!1)})}ue(()=>k.disabled=f(l)),g(e,v),I()}Bt(["click"]);var mo=M('<div class="flex flex-1 flex-col items-center justify-center gap-3 text-slate-500 dark:text-slate-400"><!> <span>Loading translations...</span></div>'),bo=M('<div class="flex flex-1 flex-col items-center justify-center gap-4"><!> <p class="text-red-600 dark:text-red-400"> </p> <button type="button" class="btn btn-secondary">Retry</button></div>'),yo=M('<p class="text-sm text-slate-400 dark:text-slate-500">Try adjusting your search or filter</p>'),xo=M('<div class="flex flex-1 flex-col items-center justify-center gap-3 text-slate-500 dark:text-slate-400"><!> <p class="font-medium">No translations found</p> <!></div>'),wo=M('<span class="badge badge-secondary text-xs"> </span>'),ko=M('<div class="mt-1 flex items-center gap-1 text-xs text-slate-400 dark:text-slate-500"><!> </div>'),Eo=M('<div class="flex items-start gap-2 text-sm"><!> <div><span class="font-medium text-slate-600 dark:text-slate-300">Translator note:</span> <span class="ml-1 text-slate-700 dark:text-slate-200"> </span></div></div>'),So=M('<div><!> <div><span class="font-medium text-slate-600 dark:text-slate-300">Context:</span> <span class="ml-1 text-slate-700 dark:text-slate-200"> </span></div></div>'),Ao=M('<div class="rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-slate-600 dark:bg-slate-800/50"><!> <!></div>'),Mo=M('<span class="badge badge-warning">Fuzzy</span>'),No=M("<!> <span>Unflag</span>",1),To=M("<!> <span>Mark fuzzy</span>",1),$o=M('<button type="button"><!></button>'),Po=M("<!> Saving...",1),Co=M("<!> Save",1),zo=M('<div class="space-y-2"><textarea rows="2" class="input w-full resize-none font-mono text-sm" placeholder="Enter translation..."></textarea> <div class="flex items-center gap-2"><button type="button" class="btn btn-primary"><!></button> <button type="button" class="btn btn-ghost"><!> Cancel</button> <span class="ml-2 text-xs text-slate-400 dark:text-slate-500">Enter to save, Esc to cancel</span></div></div>'),Lo=M('<span class="flex-1 text-sm text-slate-800 dark:text-slate-200"> </span>'),Io=M('<span class="flex-1 text-sm italic text-slate-400 dark:text-slate-500">Click to add translation</span>'),Oo=M('<button type="button" class="group/edit flex w-full items-start gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-slate-100 dark:hover:bg-slate-700"><!> <!></button>'),Fo=M('<div><div class="flex gap-4"><div class="shrink-0 pt-0.5"><!></div> <div class="min-w-0 flex-1 space-y-3"><div><div class="mb-1 flex items-center gap-2"><span class="text-xs font-medium uppercase tracking-wide text-slate-400">Source</span> <!></div> <code class="block rounded bg-slate-100 px-3 py-2 text-sm text-slate-800 dark:bg-slate-700 dark:text-slate-200"> </code> <!></div> <!> <div><div class="mb-1 flex items-center gap-2"><span class="text-xs font-medium uppercase tracking-wide text-slate-400">Translation</span> <!> <!></div> <!></div></div></div></div>'),Ro=M('<div class="flex-1 overflow-y-auto"><div class="divide-y divide-slate-100 dark:divide-slate-700"></div></div>'),jo=M('<div class="flex flex-1 flex-col overflow-hidden"><div class="flex items-center gap-6 border-b border-slate-200 bg-white px-6 py-3 dark:border-slate-700 dark:bg-slate-800"><div class="flex items-center gap-2"><span class="text-2xl font-semibold text-slate-900 dark:text-white"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Total</span></div> <div class="flex items-center gap-2"><!> <span class="font-medium text-emerald-600 dark:text-emerald-400"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Translated</span></div> <div class="flex items-center gap-2"><!> <span class="font-medium text-red-600 dark:text-red-400"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Untranslated</span></div> <div class="flex items-center gap-2"><!> <span class="font-medium text-amber-600 dark:text-amber-400"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Fuzzy</span></div> <div class="ml-auto text-sm text-slate-500 dark:text-slate-400"> </div></div> <!></div>');function Do(e,t){L(t,!0);let r=Z(t,"apiBase",3,"."),n=B(ze([])),s=B(!0),a=B(null),i=B(null),l=B(null),o=B(""),u=B(null),c=Qe(()=>{let x=f(n);switch(t.filter){case"translated":x=x.filter(C=>C.msgstr&&!C.fuzzy);break;case"untranslated":x=x.filter(C=>!C.msgstr);break;case"fuzzy":x=x.filter(C=>C.fuzzy);break}if(t.searchQuery){const C=t.searchQuery.toLowerCase();x=x.filter(be=>be.msgid.toLowerCase().includes(C)||be.msgstr.toLowerCase().includes(C))}return x}),v=Qe(()=>({total:f(n).length,translated:f(n).filter(x=>x.msgstr&&!x.fuzzy).length,untranslated:f(n).filter(x=>!x.msgstr).length,fuzzy:f(n).filter(x=>x.fuzzy).length}));Et(()=>{t.language&&d()});async function d(){A(s,!0),A(a,null);try{const C=await(await fetch(`${r()}/api/translations/${t.language}`)).json();if(!C.success)throw new Error(C.error||"Failed to load translations");A(n,C.data||[],!0)}catch(x){A(a,x instanceof Error?x.message:"Failed to load translations",!0)}finally{A(s,!1)}}function h(x){A(l,x.msgid,!0),A(o,x.msgstr,!0)}function y(){A(l,null),A(o,"")}async function k(x){if(f(o)===x.msgstr){y();return}A(i,x.msgid,!0);try{const be=await(await fetch(`${r()}/api/translations/${t.language}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({msgid:x.msgid,msgstr:f(o),context:x.context})})).json();if(!be.success)throw new Error(be.error||"Failed to save");const Me=f(n).findIndex(rt=>rt.msgid===x.msgid);Me!==-1&&(f(n)[Me]={...f(n)[Me],msgstr:f(o)}),Hn(),y()}catch(C){alert(C instanceof Error?C.message:"Failed to save")}finally{A(i,null)}}function m(x,C){x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),k(C)),x.key==="Escape"&&y()}async function b(x){A(u,x.msgid,!0);try{const be=await(await fetch(`${r()}/api/translations/${t.language}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({msgid:x.msgid,msgstr:x.msgstr,context:x.context,fuzzy:!x.fuzzy})})).json();if(!be.success)throw new Error(be.error||"Failed to toggle fuzzy status");const Me=f(n).findIndex(rt=>rt.msgid===x.msgid);Me!==-1&&(f(n)[Me]={...f(n)[Me],fuzzy:!x.fuzzy}),Hn()}catch(C){alert(C instanceof Error?C.message:"Failed to toggle fuzzy status")}finally{A(u,null)}}function H(x){return x.fuzzy?{icon:Rn,class:"text-amber-500"}:x.msgstr?{icon:jn,class:"text-emerald-500"}:{icon:Dn,class:"text-red-400"}}var S=jo(),p=_(S),E=_(p),O=_(E),j=_(O),T=w(E,2),F=_(T);jn(F,{class:"h-4 w-4 text-emerald-500"});var te=w(F,2),ie=_(te),J=w(T,2),ke=_(J);Dn(ke,{class:"h-4 w-4 text-red-400"});var le=w(ke,2),me=_(le),Ae=w(J,2),he=_(Ae);Rn(he,{class:"h-4 w-4 text-amber-500"});var fr=w(he,2),Vt=_(fr),cr=w(Ae,2),dr=_(cr),qt=w(p,2);{var $r=x=>{var C=mo(),be=_(C);pr(be,{class:"h-8 w-8 animate-spin text-blue-500"}),g(x,C)},Pr=x=>{var C=R(),be=N(C);{var Me=nt=>{var st=bo(),Tt=_(st);Ws(Tt,{class:"h-10 w-10 text-red-400"});var dt=w(Tt,2),Wt=_(dt),je=w(dt,2);je.__click=d,ue(()=>re(Wt,f(a))),g(nt,st)},rt=nt=>{var st=R(),Tt=N(st);{var dt=je=>{var vt=xo(),$t=_(vt);qs($t,{class:"h-10 w-10 text-slate-300 dark:text-slate-600"});var ht=w($t,4);{var $=Pt=>{var Ht=yo();g(Pt,Ht)};W(ht,Pt=>{(t.searchQuery||t.filter!=="all")&&Pt($)})}g(je,vt)},Wt=je=>{var vt=Ro(),$t=_(vt);Mr($t,21,()=>f(c),ht=>ht.msgid,(ht,$)=>{const Pt=Qe(()=>H(f($)));var Ht=Fo(),Xs=_(Ht),_n=_(Xs),Zs=_(_n);ji(Zs,()=>f(Pt).icon,(V,q)=>{q(V,{get class(){return`h-5 w-5 ${f(Pt).class??""}`}})});var ea=w(_n,2),pn=_(ea),gn=_(pn),ta=w(_(gn),2);{var ra=V=>{var q=wo(),ce=_(q);ue(()=>re(ce,`ctx: ${f($).context??""}`)),g(V,q)};W(ta,V=>{f($).context&&V(ra)})}var mn=w(gn,2),na=_(mn),sa=w(mn,2);{var aa=V=>{var q=ko(),ce=_(q);vl(ce,{class:"h-3 w-3"});var Ue=w(ce);ue(()=>re(Ue,` ${f($).comments.reference??""}`)),g(V,q)};W(sa,V=>{f($).comments?.reference&&V(aa)})}var bn=w(pn,2);{var ia=V=>{var q=Ao(),ce=_(q);{var Ue=se=>{var _e=Eo(),Te=_(_e);hl(Te,{class:"mt-0.5 h-4 w-4 shrink-0 text-blue-500"});var _t=w(Te,2),X=w(_(_t),2),pe=_(X);ue(()=>re(pe,f($).comments.translator)),g(se,_e)};W(ce,se=>{f($).comments.translator&&se(Ue)})}var De=w(ce,2);{var Ne=se=>{var _e=So(),Te=_(_e);cl(Te,{class:"mt-0.5 h-4 w-4 shrink-0 text-slate-400"});var _t=w(Te,2),X=w(_(_t),2),pe=_(X);ue(()=>{Ye(_e,1,`flex items-start gap-2 text-sm ${f($).comments.translator?"mt-2":""}`),re(pe,f($).comments.extracted)}),g(se,_e)};W(De,se=>{f($).comments.extracted&&se(Ne)})}g(V,q)};W(bn,V=>{(f($).comments?.translator||f($).comments?.extracted)&&V(ia)})}var la=w(bn,2),yn=_(la),xn=w(_(yn),2);{var oa=V=>{var q=Mo();g(V,q)};W(xn,V=>{f($).fuzzy&&V(oa)})}var ua=w(xn,2);{var fa=V=>{var q=$o();q.__click=()=>b(f($));var ce=_(q);{var Ue=Ne=>{pr(Ne,{class:"h-3 w-3 animate-spin"})},De=Ne=>{var se=R(),_e=N(se);{var Te=X=>{var pe=No(),pt=N(pe);il(pt,{class:"h-3 w-3"}),g(X,pe)},_t=X=>{var pe=To(),pt=N(pe);ll(pt,{class:"h-3 w-3"}),g(X,pe)};W(_e,X=>{f($).fuzzy?X(Te):X(_t,!1)},!0)}g(Ne,se)};W(ce,Ne=>{f(u)===f($).msgid?Ne(Ue):Ne(De,!1)})}ue(()=>{Ye(q,1,`ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${f($).fuzzy?"bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50":"bg-slate-100 text-slate-600 hover:bg-slate-200 dark:bg-slate-700 dark:text-slate-400 dark:hover:bg-slate-600"}`),q.disabled=f(u)===f($).msgid,rr(q,"title",f($).fuzzy?"Mark as not fuzzy":"Mark as fuzzy (needs review)")}),g(V,q)};W(ua,V=>{f($).msgstr&&V(fa)})}var ca=w(yn,2);{var da=V=>{var q=zo(),ce=_(q);ce.__keydown=X=>m(X,f($));var Ue=w(ce,2),De=_(Ue);De.__click=()=>k(f($));var Ne=_(De);{var se=X=>{var pe=Po(),pt=N(pe);pr(pt,{class:"h-4 w-4 animate-spin"}),g(X,pe)},_e=X=>{var pe=Co(),pt=N(pe);al(pt,{class:"h-4 w-4"}),g(X,pe)};W(Ne,X=>{f(i)===f($).msgid?X(se):X(_e,!1)})}var Te=w(De,2);Te.__click=y;var _t=_(Te);Hs(_t,{class:"h-4 w-4"}),ue(()=>De.disabled=f(i)===f($).msgid),Bs(ce,()=>f(o),X=>A(o,X)),g(V,q)},va=V=>{var q=Oo();q.__click=()=>h(f($));var ce=_(q);{var Ue=se=>{var _e=Lo(),Te=_(_e);ue(()=>re(Te,f($).msgstr)),g(se,_e)},De=se=>{var _e=Io();g(se,_e)};W(ce,se=>{f($).msgstr?se(Ue):se(De,!1)})}var Ne=w(ce,2);pl(Ne,{class:"h-4 w-4 shrink-0 text-slate-400 opacity-0 transition-opacity group-hover/edit:opacity-100"}),g(V,q)};W(ca,V=>{f(l)===f($).msgid?V(da):V(va,!1)})}ue(()=>{Ye(Ht,1,`group px-6 py-4 transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/50 ${f($).fuzzy?"bg-amber-50/50 dark:bg-amber-900/10":f($).msgstr?"":"bg-red-50/30 dark:bg-red-900/10"}`),re(na,f($).msgid)}),g(ht,Ht)}),g(je,vt)};W(Tt,je=>{f(c).length===0?je(dt):je(Wt,!1)},!0)}g(nt,st)};W(be,nt=>{f(a)?nt(Me):nt(rt,!1)},!0)}g(x,C)};W(qt,x=>{f(s)?x($r):x(Pr,!1)})}ue(()=>{re(j,f(v).total),re(ie,f(v).translated),re(me,f(v).untranslated),re(Vt,f(v).fuzzy),re(dr,`Showing ${f(c).length??""} of ${f(v).total??""}`)}),g(e,S),I()}Bt(["click","keydown"]);var Bo=M('<button type="button" class="absolute right-3 rounded p-0.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-slate-700 dark:hover:text-slate-300"><!></button>'),Vo=M('<kbd class="absolute right-3 flex items-center gap-0.5 rounded border border-slate-200 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-400"><span class="text-[10px]">⌘</span>K</kbd>'),qo=M('<div class="relative flex items-center"><!> <input type="text" placeholder="Search translations..." class="h-9 w-72 rounded-lg border border-slate-300 bg-white pl-9 pr-16 text-sm shadow-sm transition-colors placeholder:text-slate-400 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-100 dark:placeholder:text-slate-500 dark:focus:border-blue-400"/> <!></div>');function Wo(e,t){L(t,!0);let r=Z(t,"query",15,""),n=B(null);function s(v){(v.ctrlKey||v.metaKey)&&v.key==="k"&&(v.preventDefault(),f(n)?.focus()),v.key==="Escape"&&document.activeElement===f(n)&&(r(""),f(n)?.blur())}Et(()=>(window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)));var a=qo(),i=_(a);ml(i,{class:"absolute left-3 h-4 w-4 text-slate-400"});var l=w(i,2);Qi(l,v=>A(n,v),()=>f(n));var o=w(l,2);{var u=v=>{var d=Bo();d.__click=()=>r("");var h=_(d);Hs(h,{class:"h-4 w-4"}),g(v,d)},c=v=>{var d=Vo();g(v,d)};W(o,v=>{r()?v(u):v(c,!1)})}Bs(l,r),g(e,a),I()}Bt(["click"]);Ya();var Ho=M('<button type="button" class="rounded-md p-2 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200 transition-colors" aria-label="Toggle theme"><!></button>');function Uo(e,t){L(t,!1),Ji();var r=Ho();r.__click=function(...i){Zl?.apply(this,i)};var n=_(r);{var s=i=>{bl(i,{class:"h-5 w-5"})},a=i=>{_l(i,{class:"h-5 w-5"})};W(n,i=>{hn.current==="dark"?i(s):i(a,!1)})}g(e,r),I()}Bt(["click"]);var Ko=M('<button type="button"> </button>'),Yo=M('<div class="flex items-center gap-4 border-b border-slate-200 bg-white px-6 py-3 dark:border-slate-700 dark:bg-slate-800"><!> <div class="flex gap-1"></div></div> <!>',1),Go=M('<div class="flex flex-1 items-center justify-center bg-slate-50 dark:bg-slate-900"><div class="text-center"><!> <h2 class="mt-4 text-lg font-medium text-slate-900 dark:text-white">Select a language</h2> <p class="mt-1 text-sm text-slate-500 dark:text-slate-400">Choose a language from the sidebar to start editing translations</p></div></div>'),Qo=M('<!> <div class="flex h-screen flex-col bg-slate-50 dark:bg-slate-900"><header class="flex items-center justify-between border-b border-slate-200 bg-white px-6 py-3 shadow-sm dark:border-slate-700 dark:bg-slate-800"><div class="flex items-center gap-3"><div class="flex items-center gap-2"><!> <h1 class="text-lg font-semibold text-slate-900 dark:text-white">Lingo</h1></div> <span class="text-sm text-slate-500 dark:text-slate-400">Translation Editor</span></div> <div class="flex items-center gap-4"><!> <!></div></header> <main class="flex flex-1 overflow-hidden"><aside class="w-72 overflow-y-auto border-r border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-800"><!></aside> <section class="flex flex-1 flex-col overflow-hidden"><!></section></main></div>',1);function Jo(e,t){L(t,!0);let r=B(null),n=B(""),s=B("all");const a=[{value:"all",label:"All"},{value:"translated",label:"Translated"},{value:"untranslated",label:"Untranslated"},{value:"fuzzy",label:"Fuzzy"}];var i=Qo(),l=N(i);oo(l,{});var o=w(l,2),u=_(o),c=_(u),v=_(c),d=_(v);fl(d,{class:"h-5 w-5 text-blue-600 dark:text-blue-400"});var h=w(c,2),y=_(h);Wo(y,{get query(){return f(n)},set query(j){A(n,j,!0)}});var k=w(y,2);Uo(k,{});var m=w(u,2),b=_(m),H=_(b);go(H,{get selected(){return f(r)},set selected(j){A(r,j,!0)}});var S=w(b,2),p=_(S);{var E=j=>{var T=Yo(),F=N(T),te=_(F);ul(te,{class:"h-4 w-4 text-slate-400"});var ie=w(te,2);Mr(ie,21,()=>a,ke=>ke.value,(ke,le)=>{var me=Ko();me.__click=()=>A(s,f(le).value,!0);var Ae=_(me);ue(()=>{Ye(me,1,`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${f(s)===f(le).value?"bg-blue-600 text-white dark:bg-blue-500":"text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700"}`),re(Ae,f(le).label)}),g(ke,me)});var J=w(F,2);Do(J,{get language(){return f(r)},get searchQuery(){return f(n)},get filter(){return f(s)}}),g(j,T)},O=j=>{var T=Go(),F=_(T),te=_(F);qs(te,{class:"mx-auto h-12 w-12 text-slate-300 dark:text-slate-600"}),g(j,T)};W(p,j=>{f(r)?j(E):j(O,!1)})}g(e,i),I()}Bt(["click"]);Ii(Jo,{target:document.getElementById("app")});
@@ -16,7 +16,7 @@
16
16
  document.documentElement.style.colorScheme = theme === 'dark' || (theme === 'system' && prefersDark) ? 'dark' : 'light';
17
17
  })();
18
18
  </script>
19
- <script type="module" crossorigin src="./assets/index-DsX4xzGF.js"></script>
19
+ <script type="module" crossorigin src="./assets/index-Cg7dOnun.js"></script>
20
20
  <link rel="stylesheet" crossorigin href="./assets/index-B5dZv0sy.css">
21
21
  </head>
22
22
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-lingo",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Visual translation editor for .po files in Vite projects",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "author": "Michael-Obele",
@@ -9,13 +9,15 @@
9
9
  "url": "git+https://github.com/Michael-Obele/vite-plugin-lingo.git"
10
10
  },
11
11
  "publishConfig": {
12
- "access": "public"
12
+ "access": "public",
13
+ "provenance": true
13
14
  },
14
15
  "scripts": {
15
16
  "dev": "bun run build:ui && concurrently -n main,ui -c blue,green \"vite dev\" \"vite build --config vite.ui.config.ts --watch\"",
16
17
  "dev:simple": "vite dev",
17
18
  "dev:ui": "vite --config vite.ui.config.ts",
18
19
  "build": "bun run build:svelte && bun run build:plugin && bun run build:ui && publint",
20
+ "build:netlify": "vite build",
19
21
  "build:ui": "vite build --config vite.ui.config.ts",
20
22
  "build:ui:watch": "vite build --config vite.ui.config.ts --watch",
21
23
  "build:svelte": "svelte-kit sync && svelte-package",
@@ -28,9 +30,8 @@
28
30
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
29
31
  "format": "prettier --write .",
30
32
  "lint": "prettier --check .",
31
- "test:unit": "vitest",
32
- "test": "npm run test:unit -- --run",
33
- "prepublishOnly": "echo 'Build will run via prepack'"
33
+ "prepublishOnly": "echo 'Build will run via prepack'",
34
+ "release": "semantic-release"
34
35
  },
35
36
  "files": [
36
37
  "dist",
@@ -71,15 +72,14 @@
71
72
  },
72
73
  "devDependencies": {
73
74
  "@sveltejs/adapter-auto": "^7.0.0",
75
+ "@sveltejs/adapter-netlify": "^5.2.4",
74
76
  "@sveltejs/kit": "^2.48.5",
75
77
  "@sveltejs/package": "^2.5.6",
76
78
  "@sveltejs/vite-plugin-svelte": "^6.2.1",
77
79
  "@tailwindcss/forms": "^0.5.10",
78
80
  "@tailwindcss/typography": "^0.5.19",
79
81
  "@tailwindcss/vite": "^4.1.17",
80
- "@vitest/browser-playwright": "^4.0.10",
81
82
  "concurrently": "^9.2.1",
82
- "playwright": "^1.56.1",
83
83
  "prettier": "^3.6.2",
84
84
  "prettier-plugin-svelte": "^3.4.0",
85
85
  "prettier-plugin-tailwindcss": "^0.7.1",
@@ -88,11 +88,13 @@
88
88
  "svelte-check": "^4.3.4",
89
89
  "tailwindcss": "^4.1.17",
90
90
  "tsup": "^8.5.1",
91
+ "semantic-release": "^25.0.2",
92
+ "@semantic-release/changelog": "^6.0.3",
93
+ "@semantic-release/git": "^10.0.1",
94
+ "@semantic-release/commit-analyzer": "^13.0.1",
95
+ "@semantic-release/release-notes-generator": "^14.1.0",
91
96
  "typescript": "^5.9.3",
92
- "vite": "^7.2.2",
93
- "vitest": "^4.0.10",
94
- "vitest-browser-svelte": "^2.0.1"
95
-
97
+ "vite": "^7.2.2"
96
98
  },
97
99
  "keywords": [
98
100
  "vite-plugin",
@@ -1,10 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=r(s);fetch(s.href,a)}})();const Or=!1;var Yr=Array.isArray,va=Array.prototype.indexOf,Gr=Array.from,ha=Object.defineProperty,at=Object.getOwnPropertyDescriptor,Hn=Object.getOwnPropertyDescriptors,_a=Object.prototype,pa=Array.prototype,Qr=Object.getPrototypeOf,xn=Object.isExtensible;function Ht(e){return typeof e=="function"}const U=()=>{};function ga(e){return e()}function Fr(e){for(var t=0;t<e.length;t++)e[t]()}function Un(){var e,t,r=new Promise((n,s)=>{e=n,t=s});return{promise:r,resolve:e,reject:t}}function ma(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const ce=2,Jr=4,kr=8,Kn=1<<24,Xe=16,Ze=32,ut=64,Er=128,Fe=512,ve=1024,ke=2048,et=4096,Se=8192,Ye=16384,Xr=32768,Je=65536,wn=1<<17,Zr=1<<18,Et=1<<19,Yn=1<<20,yt=32768,Rr=1<<21,en=1<<22,it=1<<23,qe=Symbol("$state"),Gn=Symbol("legacy props"),ba=Symbol(""),Ct=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function ya(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function xa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function wa(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ka(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ea(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Sa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Aa(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ma(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Na(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ta(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $a(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Qn=1,Jn=2,Xn=4,Pa=8,Ca=16,za=1,La=2,Ia=4,Oa=8,Fa=16,Ra=1,ja=2,ue=Symbol(),Da="http://www.w3.org/1999/xhtml",Va="http://www.w3.org/2000/svg",qa="@attach";function Ba(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Wa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Zn(e){return e===this.v}function Ha(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function es(e){return!Ha(e,this.v)}let jt=!1,Ua=!1;function Ka(){jt=!0}let X=null;function Lt(e){X=e}function L(e,t=!1,r){X={p:X,i:!1,c:null,e:null,s:e,x:null,l:jt&&!t?{s:null,u:null,$:[]}:null}}function I(e){var t=X,r=t.e;if(r!==null){t.e=null;for(var n of r)ps(n)}return t.i=!0,X=t.p,{}}function nr(){return!jt||X!==null&&X.l===null}let pt=[];function ts(){var e=pt;pt=[],Fr(e)}function St(e){if(pt.length===0&&!Qt){var t=pt;queueMicrotask(()=>{t===pt&&ts()})}pt.push(e)}function Ya(){for(;pt.length>0;)ts()}function rs(e){var t=z;if(t===null)return P.f|=it,e;if((t.f&Xr)===0){if((t.f&Er)===0)throw e;t.b.error(e)}else It(e,t)}function It(e,t){for(;t!==null;){if((t.f&Er)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const dr=new Set;let R=null,hr=null,Pe=null,$e=[],Sr=null,jr=!1,Qt=!1;class Oe{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#r=0;#a=null;#s=[];#o=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#r>0}process(t){$e=[],hr=null,this.apply();var r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)this.#i(n,r);this.is_fork||this.#f(),this.is_deferred()?(this.#l(r.effects),this.#l(r.render_effects),this.#l(r.block_effects)):(hr=this,R=null,kn(r.render_effects),kn(r.effects),hr=null,this.#a?.resolve()),Pe=null}#i(t,r){t.f^=ve;for(var n=t.first;n!==null;){var s=n.f,a=(s&(Ze|ut))!==0,i=a&&(s&ve)!==0,l=i||(s&Se)!==0||this.skipped_effects.has(n);if((n.f&Er)!==0&&n.b?.is_pending()&&(r={parent:r,effect:n,effects:[],render_effects:[],block_effects:[]}),!l&&n.fn!==null){a?n.f^=ve:(s&Jr)!==0?r.effects.push(n):lr(n)&&((n.f&Xe)!==0&&r.block_effects.push(n),er(n));var o=n.first;if(o!==null){n=o;continue}}var u=n.parent;for(n=n.next;n===null&&u!==null;)u===r.effect&&(this.#l(r.effects),this.#l(r.render_effects),this.#l(r.block_effects),r=r.parent),n=u.next,u=u.parent}}#l(t){for(const r of t)((r.f&ke)!==0?this.#s:this.#o).push(r),this.#u(r.deps),he(r,ve)}#u(t){if(t!==null)for(const r of t)(r.f&ce)===0||(r.f&yt)===0||(r.f^=yt,this.#u(r.deps))}capture(t,r){this.previous.has(t)||this.previous.set(t,r),(t.f&it)===0&&(this.current.set(t,t.v),Pe?.set(t,t.v))}activate(){R=this,this.apply()}deactivate(){R===this&&(R=null,Pe=null)}flush(){if(this.activate(),$e.length>0){if(ns(),R!==null&&R!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#f(){if(this.#r===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#c()}#c(){if(dr.size>1){this.previous.clear();var t=Pe,r=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const a of dr){if(a===this){r=!1;continue}const i=[];for(const[o,u]of this.current){if(a.current.has(o))if(r&&u!==a.current.get(o))a.current.set(o,u);else continue;i.push(o)}if(i.length===0)continue;const l=[...a.current.keys()].filter(o=>!this.current.has(o));if(l.length>0){var s=$e;$e=[];const o=new Set,u=new Map;for(const c of i)ss(c,l,o,u);if($e.length>0){R=a,a.apply();for(const c of $e)a.#i(c,n);a.deactivate()}$e=s}}R=null,Pe=t}this.committed=!0,dr.delete(this)}increment(t){this.#n+=1,t&&(this.#r+=1)}decrement(t){this.#n-=1,t&&(this.#r-=1),this.revive()}revive(){for(const t of this.#s)he(t,ke),xt(t);for(const t of this.#o)he(t,et),xt(t);this.#s=[],this.#o=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#a??=Un()).promise}static ensure(){if(R===null){const t=R=new Oe;dr.add(R),Qt||Oe.enqueue(()=>{R===t&&t.flush()})}return R}static enqueue(t){St(t)}apply(){}}function Ga(e){var t=Qt;Qt=!0;try{for(var r;;){if(Ya(),$e.length===0&&(R?.flush(),$e.length===0))return Sr=null,r;ns()}}finally{Qt=t}}function ns(){var e=ot;jr=!0;var t=null;try{var r=0;for(mr(!0);$e.length>0;){var n=Oe.ensure();if(r++>1e3){var s,a;Qa()}n.process($e),lt.clear()}}finally{jr=!1,mr(e),Sr=null}}function Qa(){try{Sa()}catch(e){It(e,Sr)}}let Ue=null;function kn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(Ye|Se))===0&&lr(n)&&(Ue=new Set,er(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?xs(n):n.fn=null),Ue?.size>0)){lt.clear();for(const s of Ue){if((s.f&(Ye|Se))!==0)continue;const a=[s];let i=s.parent;for(;i!==null;)Ue.has(i)&&(Ue.delete(i),a.push(i)),i=i.parent;for(let l=a.length-1;l>=0;l--){const o=a[l];(o.f&(Ye|Se))===0&&er(o)}}Ue.clear()}}Ue=null}}function ss(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;(a&ce)!==0?ss(s,t,r,n):(a&(en|Xe))!==0&&(a&ke)===0&&as(s,t,n)&&(he(s,ke),xt(s))}}function as(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&ce)!==0&&as(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function xt(e){for(var t=Sr=e;t.parent!==null;){t=t.parent;var r=t.f;if(jr&&t===z&&(r&Xe)!==0&&(r&Zr)===0)return;if((r&(ut|Ze))!==0){if((r&ve)===0)return;t.f^=ve}}$e.push(t)}function sr(e){let t=0,r=wt(0),n;return()=>{Xt()&&(f(r),ln(()=>(t===0&&(n=ft(()=>e(()=>Jt(r)))),t+=1,()=>{St(()=>{t-=1,t===0&&(n?.(),n=void 0,Jt(r))})})))}}var Ja=Je|Et|Er;function Xa(e,t,r){new Za(e,t,r)}class Za{parent;#t=!1;#e;#n=null;#r;#a;#s;#o=null;#i=null;#l=null;#u=null;#f=null;#c=0;#d=0;#h=!1;#v=null;#b=sr(()=>(this.#v=wt(this.#c),()=>{this.#v=null}));constructor(t,r,n){this.#e=t,this.#r=r,this.#a=n,this.parent=z.b,this.#t=!!this.#r.pending,this.#s=At(()=>{z.b=this;{var s=this.#g();try{this.#o=xe(()=>n(s))}catch(a){this.error(a)}this.#d>0?this.#p():this.#t=!1}return()=>{this.#f?.remove()}},Ja)}#y(){try{this.#o=xe(()=>this.#a(this.#e))}catch(t){this.error(t)}this.#t=!1}#x(){const t=this.#r.pending;t&&(this.#i=xe(()=>t(this.#e)),Oe.enqueue(()=>{var r=this.#g();this.#o=this.#_(()=>(Oe.ensure(),xe(()=>this.#a(r)))),this.#d>0?this.#p():(zt(this.#i,()=>{this.#i=null}),this.#t=!1)}))}#g(){var t=this.#e;return this.#t&&(this.#f=Be(),this.#e.before(this.#f),t=this.#f),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#r.pending}#_(t){var r=z,n=P,s=X;We(this.#s),we(this.#s),Lt(this.#s.ctx);try{return t()}catch(a){return rs(a),null}finally{We(r),we(n),Lt(s)}}#p(){const t=this.#r.pending;this.#o!==null&&(this.#u=document.createDocumentFragment(),this.#u.append(this.#f),Es(this.#o,this.#u)),this.#i===null&&(this.#i=xe(()=>t(this.#e)))}#m(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t);return}this.#d+=t,this.#d===0&&(this.#t=!1,this.#i&&zt(this.#i,()=>{this.#i=null}),this.#u&&(this.#e.before(this.#u),this.#u=null))}update_pending_count(t){this.#m(t),this.#c+=t,this.#v&&Ot(this.#v,this.#c)}get_effect_pending(){return this.#b(),f(this.#v)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(this.#h||!r&&!n)throw t;this.#o&&(le(this.#o),this.#o=null),this.#i&&(le(this.#i),this.#i=null),this.#l&&(le(this.#l),this.#l=null);var s=!1,a=!1;const i=()=>{if(s){Wa();return}s=!0,a&&$a(),Oe.ensure(),this.#c=0,this.#l!==null&&zt(this.#l,()=>{this.#l=null}),this.#t=this.has_pending_snippet(),this.#o=this.#_(()=>(this.#h=!1,xe(()=>this.#a(this.#e)))),this.#d>0?this.#p():this.#t=!1};var l=P;try{we(null),a=!0,r?.(t,i),a=!1}catch(o){It(o,this.#s&&this.#s.parent)}finally{we(l)}n&&St(()=>{this.#l=this.#_(()=>{Oe.ensure(),this.#h=!0;try{return xe(()=>{n(this.#e,()=>t,()=>i)})}catch(o){return It(o,this.#s.parent),null}finally{this.#h=!1}})})}}function ei(e,t){return t}function ti(e,t,r){for(var n=[],s=t.length,a=0;a<s;a++)on(t[a].e,n,!0);ws(n,()=>{var i=n.length===0&&r!==null;if(i){var l=r,o=l.parentNode;di(o),o.append(l),e.items.clear(),Le(e,t[0].prev,t[s-1].next)}for(var u=0;u<s;u++){var c=t[u];i||(e.items.delete(c.k),Le(e,c.prev,c.next)),le(c.e,!i)}e.first===t[0]&&(e.first=t[0].prev)})}function Ar(e,t,r,n,s,a=null){var i=e,l=new Map,o=null,u=(t&Xn)!==0,c=(t&Qn)!==0,v=(t&Jn)!==0;if(u){var d=e;i=d.appendChild(Be())}var h=null,y=tn(()=>{var b=r();return Yr(b)?b:b==null?[]:Gr(b)}),E,g=!0;function m(){ri(x,E,i,t,n),h!==null&&(E.length===0?(h.fragment?(i.before(h.fragment),h.fragment=null):un(h.effect),W.first=h.effect):zt(h.effect,()=>{h=null}))}var W=At(()=>{E=f(y);for(var b=E.length,M=new Set,D=R,O=null,A=hs(),V=0;V<b;V+=1){var re=E[V],ie=n(re,V),Z=g?null:l.get(ie);Z?(c&&Ot(Z.v,re),v?Ot(Z.i,V):Z.i=V,A&&D.skipped_effects.delete(Z.e)):(Z=ni(g?i:null,O,re,ie,V,s,t,r),g&&(Z.o=!0,O===null?o=Z:O.next=Z,O=Z),l.set(ie,Z)),M.add(ie)}if(b===0&&a&&!h)if(g)h={fragment:null,effect:xe(()=>a(i))};else{var oe=document.createDocumentFragment(),be=Be();oe.append(be),h={fragment:oe,effect:xe(()=>a(be))}}if(!g)if(A){for(const[_e,ne]of l)M.has(_e)||D.skipped_effects.add(ne.e);D.oncommit(m),D.ondiscard(()=>{})}else m();f(y)}),x={effect:W,items:l,first:o};g=!1}function ri(e,t,r,n,s){var a=(n&Pa)!==0,i=t.length,l=e.items,o=e.first,u,c=null,v,d=[],h=[],y,E,g,m;if(a)for(m=0;m<i;m+=1)y=t[m],E=s(y,m),g=l.get(E),g.o&&(g.a?.measure(),(v??=new Set).add(g));for(m=0;m<i;m+=1){if(y=t[m],E=s(y,m),g=l.get(E),e.first??=g,!g.o){g.o=!0;var W=c?c.next:o;Le(e,c,g),Le(e,g,W),Pr(g,W,r),c=g,d=[],h=[],o=c.next;continue}if((g.e.f&Se)!==0&&(un(g.e),a&&(g.a?.unfix(),(v??=new Set).delete(g))),g!==o){if(u!==void 0&&u.has(g)){if(d.length<h.length){var x=h[0],b;c=x.prev;var M=d[0],D=d[d.length-1];for(b=0;b<d.length;b+=1)Pr(d[b],x,r);for(b=0;b<h.length;b+=1)u.delete(h[b]);Le(e,M.prev,D.next),Le(e,c,M),Le(e,D,x),o=x,c=D,m-=1,d=[],h=[]}else u.delete(g),Pr(g,o,r),Le(e,g.prev,g.next),Le(e,g,c===null?e.first:c.next),Le(e,c,g),c=g;continue}for(d=[],h=[];o!==null&&o.k!==E;)(o.e.f&Se)===0&&(u??=new Set).add(o),h.push(o),o=o.next;if(o===null)continue;g=o}d.push(g),c=g,o=g.next}let O=l.size>i;if(o!==null||u!==void 0){for(var A=u===void 0?[]:Gr(u);o!==null;)(o.e.f&Se)===0&&A.push(o),o=o.next;var V=A.length;if(O=l.size-V>i,V>0){var re=(n&Xn)!==0&&i===0?r:null;if(a){for(m=0;m<V;m+=1)A[m].a?.measure();for(m=0;m<V;m+=1)A[m].a?.fix()}ti(e,A,re)}}if(O)for(const ie of l.values())ie.o||(Le(e,c,ie),c=ie);e.effect.last=c&&c.e,a&&St(()=>{if(v!==void 0)for(g of v)g.a?.apply()})}function ni(e,t,r,n,s,a,i,l){var o=(i&Qn)!==0,u=(i&Ca)===0,c=o?u?li(r,!1,!1):wt(r):r,v=(i&Jn)===0?s:wt(s),d={i:v,v:c,k:n,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var h=document.createDocumentFragment();h.append(e=Be())}return d.e=xe(()=>a(e,c,v,l)),t!==null&&(t.next=d),d}finally{}}function Pr(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,s=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==null&&a!==n;){var i=ir(a);s.before(a),a=i}}function Le(e,t,r){t===null?(e.first=r,e.effect.first=r&&r.e):(t.e.next&&(t.e.next.prev=null),t.next=r,t.e.next=r&&r.e),r!==null&&(r.e.prev&&(r.e.prev.next=null),r.prev=t,r.e.prev=t&&t.e)}function is(e,t,r,n){const s=nr()?ar:tn;if(r.length===0&&e.length===0){n(t.map(s));return}var a=R,i=z,l=si();function o(){Promise.all(r.map(u=>ai(u))).then(u=>{l();try{n([...t.map(s),...u])}catch(c){(i.f&Ye)===0&&It(c,i)}a?.deactivate(),gr()}).catch(u=>{It(u,i)})}e.length>0?Promise.all(e).then(()=>{l();try{return o()}finally{a?.deactivate(),gr()}}):o()}function si(){var e=z,t=P,r=X,n=R;return function(a=!0){We(e),we(t),Lt(r),a&&n?.activate()}}function gr(){We(null),we(null),Lt(null)}function ar(e){var t=ce|ke,r=P!==null&&(P.f&ce)!==0?P:null;return z!==null&&(z.f|=Et),{ctx:X,deps:null,effects:null,equals:Zn,f:t,fn:e,reactions:null,rv:0,v:ue,wv:0,parent:r??z,ac:null}}function ai(e,t){let r=z;r===null&&xa();var n=r.b,s=void 0,a=wt(ue),i=!P,l=new Map;return mi(()=>{var o=Un();s=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).then(()=>{u===R&&u.committed&&u.deactivate(),gr()})}catch(d){o.reject(d),gr()}var u=R;if(i){var c=!n.is_pending();n.update_pending_count(1),u.increment(c),l.get(u)?.reject(Ct),l.delete(u),l.set(u,o)}const v=(d,h=void 0)=>{if(u.activate(),h)h!==Ct&&(a.f|=it,Ot(a,h));else{(a.f&it)!==0&&(a.f^=it),Ot(a,d);for(const[y,E]of l){if(l.delete(y),y===u)break;E.reject(Ct)}}i&&(n.update_pending_count(-1),u.decrement(c))};o.promise.then(v,d=>v(null,d||"unknown"))}),nn(()=>{for(const o of l.values())o.reject(Ct)}),new Promise(o=>{function u(c){function v(){c===s?o(a):u(s)}c.then(v,v)}u(s)})}function Ge(e){const t=ar(e);return Ss(t),t}function tn(e){const t=ar(e);return t.equals=es,t}function ls(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)le(t[r])}}function ii(e){for(var t=e.parent;t!==null;){if((t.f&ce)===0)return(t.f&Ye)===0?t:null;t=t.parent}return null}function rn(e){var t,r=z;We(ii(e));try{e.f&=~yt,ls(e),t=Ts(e)}finally{We(r)}return t}function os(e){var t=rn(e);if(e.equals(t)||(R?.is_fork||(e.v=t),e.wv=Ms()),!Mt)if(Pe!==null)(Xt()||R?.is_fork)&&Pe.set(e,t);else{var r=(e.f&Fe)===0?et:ve;he(e,r)}}let Dr=new Set;const lt=new Map;let us=!1;function wt(e,t){var r={f:0,v:e,reactions:null,equals:Zn,rv:0,wv:0};return r}function j(e,t){const r=wt(e);return Ss(r),r}function li(e,t=!1,r=!0){const n=wt(e);return t||(n.equals=es),jt&&r&&X!==null&&X.l!==null&&(X.l.s??=[]).push(n),n}function S(e,t,r=!1){P!==null&&(!Ve||(P.f&wn)!==0)&&nr()&&(P.f&(ce|Xe|en|wn))!==0&&!Qe?.includes(e)&&Ta();let n=r?Ce(t):t;return Ot(e,n)}function Ot(e,t){if(!e.equals(t)){var r=e.v;Mt?lt.set(e,t):lt.set(e,r),e.v=t;var n=Oe.ensure();n.capture(e,r),(e.f&ce)!==0&&((e.f&ke)!==0&&rn(e),he(e,(e.f&Fe)!==0?ve:et)),e.wv=Ms(),fs(e,ke),nr()&&z!==null&&(z.f&ve)!==0&&(z.f&(Ze|ut))===0&&(Te===null?yi([e]):Te.push(e)),!n.is_fork&&Dr.size>0&&!us&&oi()}return t}function oi(){us=!1;var e=ot;mr(!0);const t=Array.from(Dr);try{for(const r of t)(r.f&ve)!==0&&he(r,et),lr(r)&&er(r)}finally{mr(e)}Dr.clear()}function ui(e,t=1){var r=f(e),n=t===1?r++:r--;return S(e,r),n}function Jt(e){S(e,e.v+1)}function fs(e,t){var r=e.reactions;if(r!==null)for(var n=nr(),s=r.length,a=0;a<s;a++){var i=r[a],l=i.f;if(!(!n&&i===z)){var o=(l&ke)===0;if(o&&he(i,t),(l&ce)!==0){var u=i;Pe?.delete(u),(l&yt)===0&&(l&Fe&&(i.f|=yt),fs(u,et))}else o&&((l&Xe)!==0&&Ue!==null&&Ue.add(i),xt(i))}}}function Ce(e){if(typeof e!="object"||e===null||qe in e)return e;const t=Qr(e);if(t!==_a&&t!==pa)return e;var r=new Map,n=Yr(e),s=j(0),a=bt,i=l=>{if(bt===a)return l();var o=P,u=bt;we(null),Nn(a);var c=l();return we(o),Nn(u),c};return n&&r.set("length",j(e.length)),new Proxy(e,{defineProperty(l,o,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ma();var c=r.get(o);return c===void 0?c=i(()=>{var v=j(u.value);return r.set(o,v),v}):S(c,u.value,!0),!0},deleteProperty(l,o){var u=r.get(o);if(u===void 0){if(o in l){const c=i(()=>j(ue));r.set(o,c),Jt(s)}}else S(u,ue),Jt(s);return!0},get(l,o,u){if(o===qe)return e;var c=r.get(o),v=o in l;if(c===void 0&&(!v||at(l,o)?.writable)&&(c=i(()=>{var h=Ce(v?l[o]:ue),y=j(h);return y}),r.set(o,c)),c!==void 0){var d=f(c);return d===ue?void 0:d}return Reflect.get(l,o,u)},getOwnPropertyDescriptor(l,o){var u=Reflect.getOwnPropertyDescriptor(l,o);if(u&&"value"in u){var c=r.get(o);c&&(u.value=f(c))}else if(u===void 0){var v=r.get(o),d=v?.v;if(v!==void 0&&d!==ue)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(l,o){if(o===qe)return!0;var u=r.get(o),c=u!==void 0&&u.v!==ue||Reflect.has(l,o);if(u!==void 0||z!==null&&(!c||at(l,o)?.writable)){u===void 0&&(u=i(()=>{var d=c?Ce(l[o]):ue,h=j(d);return h}),r.set(o,u));var v=f(u);if(v===ue)return!1}return c},set(l,o,u,c){var v=r.get(o),d=o in l;if(n&&o==="length")for(var h=u;h<v.v;h+=1){var y=r.get(h+"");y!==void 0?S(y,ue):h in l&&(y=i(()=>j(ue)),r.set(h+"",y))}if(v===void 0)(!d||at(l,o)?.writable)&&(v=i(()=>j(void 0)),S(v,Ce(u)),r.set(o,v));else{d=v.v!==ue;var E=i(()=>Ce(u));S(v,E)}var g=Reflect.getOwnPropertyDescriptor(l,o);if(g?.set&&g.set.call(c,u),!d){if(n&&typeof o=="string"){var m=r.get("length"),W=Number(o);Number.isInteger(W)&&W>=m.v&&S(m,W+1)}Jt(s)}return!0},ownKeys(l){f(s);var o=Reflect.ownKeys(l).filter(v=>{var d=r.get(v);return d===void 0||d.v!==ue});for(var[u,c]of r)c.v!==ue&&!(u in l)&&o.push(u);return o},setPrototypeOf(){Na()}})}function En(e){try{if(e!==null&&typeof e=="object"&&qe in e)return e[qe]}catch{}return e}function fi(e,t){return Object.is(En(e),En(t))}var Sn,cs,ds,vs;function ci(){if(Sn===void 0){Sn=window,cs=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;ds=at(t,"firstChild").get,vs=at(t,"nextSibling").get,xn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),xn(r)&&(r.__t=void 0)}}function Be(e=""){return document.createTextNode(e)}function De(e){return ds.call(e)}function ir(e){return vs.call(e)}function _(e,t){return De(e)}function T(e,t=!1){{var r=De(e);return r instanceof Comment&&r.data===""?ir(r):r}}function k(e,t=1,r=!1){let n=e;for(;t--;)n=ir(n);return n}function di(e){e.textContent=""}function hs(){return!1}function vi(e,t){if(t){const r=document.body;e.autofocus=!0,St(()=>{document.activeElement===r&&e.focus()})}}let An=!1;function hi(){An||(An=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Mr(e){var t=P,r=z;we(null),We(null);try{return e()}finally{we(t),We(r)}}function _i(e,t,r,n=r){e.addEventListener(t,()=>Mr(r));const s=e.__on_r;s?e.__on_r=()=>{s(),n(!0)}:e.__on_r=()=>n(!0),hi()}function _s(e){z===null&&(P===null&&Ea(),ka()),Mt&&wa()}function pi(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ze(e,t,r){var n=z;n!==null&&(n.f&Se)!==0&&(e|=Se);var s={ctx:X,deps:null,nodes_start:null,nodes_end:null,f:e|ke|Fe,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{er(s),s.f|=Xr}catch(l){throw le(s),l}else t!==null&&xt(s);var a=s;if(r&&a.deps===null&&a.teardown===null&&a.nodes_start===null&&a.first===a.last&&(a.f&Et)===0&&(a=a.first,(e&Xe)!==0&&(e&Je)!==0&&a!==null&&(a.f|=Je)),a!==null&&(a.parent=n,n!==null&&pi(a,n),P!==null&&(P.f&ce)!==0&&(e&ut)===0)){var i=P;(i.effects??=[]).push(a)}return s}function Xt(){return P!==null&&!Ve}function nn(e){const t=ze(kr,null,!1);return he(t,ve),t.teardown=e,t}function kt(e){_s();var t=z.f,r=!P&&(t&Ze)!==0&&(t&Xr)===0;if(r){var n=X;(n.e??=[]).push(e)}else return ps(e)}function ps(e){return ze(Jr|Yn,e,!1)}function Ie(e){return _s(),ze(kr|Yn,e,!0)}function sn(e){Oe.ensure();const t=ze(ut|Et,e,!0);return()=>{le(t)}}function gi(e){Oe.ensure();const t=ze(ut|Et,e,!0);return(r={})=>new Promise(n=>{r.outro?zt(t,()=>{le(t),n(void 0)}):(le(t),n(void 0))})}function an(e){return ze(Jr,e,!1)}function mi(e){return ze(en|Et,e,!0)}function ln(e,t=0){return ze(kr|t,e,!0)}function fe(e,t=[],r=[],n=[]){is(n,t,r,s=>{ze(kr,()=>e(...s.map(f)),!0)})}function At(e,t=0){var r=ze(Xe|t,e,!0);return r}function gs(e,t=0){var r=ze(Kn|t,e,!0);return r}function xe(e){return ze(Ze|Et,e,!0)}function ms(e){var t=e.teardown;if(t!==null){const r=Mt,n=P;Mn(!0),we(null);try{t.call(null)}finally{Mn(r),we(n)}}}function bs(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&Mr(()=>{s.abort(Ct)});var n=r.next;(r.f&ut)!==0?r.parent=null:le(r,t),r=n}}function bi(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Ze)===0&&le(t),t=r}}function le(e,t=!0){var r=!1;(t||(e.f&Zr)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ys(e.nodes_start,e.nodes_end),r=!0),bs(e,t&&!r),br(e,0),he(e,Ye);var n=e.transitions;if(n!==null)for(const a of n)a.stop();ms(e);var s=e.parent;s!==null&&s.first!==null&&xs(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function ys(e,t){for(;e!==null;){var r=e===t?null:ir(e);e.remove(),e=r}}function xs(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function zt(e,t,r=!0){var n=[];on(e,n,!0),ws(n,()=>{r&&le(e),t&&t()})}function ws(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var s of e)s.out(n)}else t()}function on(e,t,r){if((e.f&Se)===0){if(e.f^=Se,e.transitions!==null)for(const i of e.transitions)(i.is_global||r)&&t.push(i);for(var n=e.first;n!==null;){var s=n.next,a=(n.f&Je)!==0||(n.f&Ze)!==0&&(e.f&Xe)!==0;on(n,t,a?r:!1),n=s}}}function un(e){ks(e,!0)}function ks(e,t){if((e.f&Se)!==0){e.f^=Se,(e.f&ve)===0&&(he(e,ke),xt(e));for(var r=e.first;r!==null;){var n=r.next,s=(r.f&Je)!==0||(r.f&Ze)!==0;ks(r,s?t:!1),r=n}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}function Es(e,t){for(var r=e.nodes_start,n=e.nodes_end;r!==null;){var s=r===n?null:ir(r);t.append(r),r=s}}let ot=!1;function mr(e){ot=e}let Mt=!1;function Mn(e){Mt=e}let P=null,Ve=!1;function we(e){P=e}let z=null;function We(e){z=e}let Qe=null;function Ss(e){P!==null&&(Qe===null?Qe=[e]:Qe.push(e))}let me=null,Ee=0,Te=null;function yi(e){Te=e}let As=1,Zt=0,bt=Zt;function Nn(e){bt=e}function Ms(){return++As}function lr(e){var t=e.f;if((t&ke)!==0)return!0;if(t&ce&&(e.f&=~yt),(t&et)!==0){var r=e.deps;if(r!==null)for(var n=r.length,s=0;s<n;s++){var a=r[s];if(lr(a)&&os(a),a.wv>e.wv)return!0}(t&Fe)!==0&&Pe===null&&he(e,ve)}return!1}function Ns(e,t,r=!0){var n=e.reactions;if(n!==null&&!Qe?.includes(e))for(var s=0;s<n.length;s++){var a=n[s];(a.f&ce)!==0?Ns(a,t,!1):t===a&&(r?he(a,ke):(a.f&ve)!==0&&he(a,et),xt(a))}}function Ts(e){var t=me,r=Ee,n=Te,s=P,a=Qe,i=X,l=Ve,o=bt,u=e.f;me=null,Ee=0,Te=null,P=(u&(Ze|ut))===0?e:null,Qe=null,Lt(e.ctx),Ve=!1,bt=++Zt,e.ac!==null&&(Mr(()=>{e.ac.abort(Ct)}),e.ac=null);try{e.f|=Rr;var c=e.fn,v=c(),d=e.deps;if(me!==null){var h;if(br(e,Ee),d!==null&&Ee>0)for(d.length=Ee+me.length,h=0;h<me.length;h++)d[Ee+h]=me[h];else e.deps=d=me;if(ot&&Xt()&&(e.f&Fe)!==0)for(h=Ee;h<d.length;h++)(d[h].reactions??=[]).push(e)}else d!==null&&Ee<d.length&&(br(e,Ee),d.length=Ee);if(nr()&&Te!==null&&!Ve&&d!==null&&(e.f&(ce|et|ke))===0)for(h=0;h<Te.length;h++)Ns(Te[h],e);return s!==null&&s!==e&&(Zt++,Te!==null&&(n===null?n=Te:n.push(...Te))),(e.f&it)!==0&&(e.f^=it),v}catch(y){return rs(y)}finally{e.f^=Rr,me=t,Ee=r,Te=n,P=s,Qe=a,Lt(i),Ve=l,bt=o}}function xi(e,t){let r=t.reactions;if(r!==null){var n=va.call(r,e);if(n!==-1){var s=r.length-1;s===0?r=t.reactions=null:(r[n]=r[s],r.pop())}}r===null&&(t.f&ce)!==0&&(me===null||!me.includes(t))&&(he(t,et),(t.f&Fe)!==0&&(t.f^=Fe,t.f&=~yt),ls(t),br(t,0))}function br(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)xi(e,r[n])}function er(e){var t=e.f;if((t&Ye)===0){he(e,ve);var r=z,n=ot;z=e,ot=!0;try{(t&(Xe|Kn))!==0?bi(e):bs(e),ms(e);var s=Ts(e);e.teardown=typeof s=="function"?s:null,e.wv=As;var a;Or&&Ua&&(e.f&ke)!==0&&e.deps}finally{ot=n,z=r}}}async function wi(){await Promise.resolve(),Ga()}function f(e){var t=e.f,r=(t&ce)!==0;if(P!==null&&!Ve){var n=z!==null&&(z.f&Ye)!==0;if(!n&&!Qe?.includes(e)){var s=P.deps;if((P.f&Rr)!==0)e.rv<Zt&&(e.rv=Zt,me===null&&s!==null&&s[Ee]===e?Ee++:me===null?me=[e]:me.includes(e)||me.push(e));else{(P.deps??=[]).push(e);var a=e.reactions;a===null?e.reactions=[P]:a.includes(P)||a.push(P)}}}if(Mt){if(lt.has(e))return lt.get(e);if(r){var i=e,l=i.v;return((i.f&ve)===0&&i.reactions!==null||Ps(i))&&(l=rn(i)),lt.set(i,l),l}}else r&&(!Pe?.has(e)||R?.is_fork&&!Xt())&&(i=e,lr(i)&&os(i),ot&&Xt()&&(i.f&Fe)===0&&$s(i));if(Pe?.has(e))return Pe.get(e);if((e.f&it)!==0)throw e.v;return e.v}function $s(e){if(e.deps!==null){e.f^=Fe;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&ce)!==0&&(t.f&Fe)===0&&$s(t)}}function Ps(e){if(e.v===ue)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(lt.has(t)||(t.f&ce)!==0&&Ps(t))return!0;return!1}function ft(e){var t=Ve;try{return Ve=!0,e()}finally{Ve=t}}const ki=-7169;function he(e,t){e.f=e.f&ki|t}function Ei(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(qe in e)Vr(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&qe in r&&Vr(r)}}}function Vr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Vr(e[n],t)}catch{}const r=Qr(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=Hn(r);for(let s in n){const a=n[s].get;if(a)try{a.call(e)}catch{}}}}}function Si(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const Ai=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Mi(e){return Ai.includes(e)}const Ni={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Ti(e){return e=e.toLowerCase(),Ni[e]??e}const $i=["touchstart","touchmove"];function Pi(e){return $i.includes(e)}const Cs=new Set,qr=new Set;function zs(e,t,r,n={}){function s(a){if(n.capture||Gt.call(t,a),!a.cancelBubble)return Mr(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?St(()=>{t.addEventListener(e,s,n)}):t.addEventListener(e,s,n),s}function Ft(e,t,r,n={}){var s=zs(t,e,r,n);return()=>{e.removeEventListener(t,s,n)}}function Dt(e){for(var t=0;t<e.length;t++)Cs.add(e[t]);for(var r of qr)r(e)}let Tn=null;function Gt(e){var t=this,r=t.ownerDocument,n=e.type,s=e.composedPath?.()||[],a=s[0]||e.target;Tn=e;var i=0,l=Tn===e&&e.__root;if(l){var o=s.indexOf(l);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var u=s.indexOf(t);if(u===-1)return;o<=u&&(i=o)}if(a=s[i]||e.target,a!==t){ha(e,"currentTarget",{configurable:!0,get(){return a||r}});var c=P,v=z;we(null),We(null);try{for(var d,h=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var E=a["__"+n];E!=null&&(!a.disabled||e.target===a)&&E.call(a,e)}catch(g){d?h.push(g):d=g}if(e.cancelBubble||y===t||y===null)break;a=y}if(d){for(let g of h)queueMicrotask(()=>{throw g});throw d}}finally{e.__root=t,delete e.currentTarget,we(c),We(v)}}}function fn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Rt(e,t){var r=z;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function N(e,t){var r=(t&Ra)!==0,n=(t&ja)!==0,s,a=!e.startsWith("<!>");return()=>{s===void 0&&(s=fn(a?e:"<!>"+e),r||(s=De(s)));var i=n||cs?document.importNode(s,!0):s.cloneNode(!0);if(r){var l=De(i),o=i.lastChild;Rt(l,o)}else Rt(i,i);return i}}function Ci(e,t,r="svg"){var n=!e.startsWith("<!>"),s=`<${r}>${n?e:"<!>"+e}</${r}>`,a;return()=>{if(!a){var i=fn(s),l=De(i);a=De(l)}var o=a.cloneNode(!0);return Rt(o,o),o}}function zi(e,t){return Ci(e,t,"svg")}function F(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Be();return e.append(t,r),Rt(t,r),e}function p(e,t){e!==null&&e.before(t)}function ee(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Li(e,t){return Ii(e,t)}const Pt=new Map;function Ii(e,{target:t,anchor:r,props:n={},events:s,context:a,intro:i=!0}){ci();var l=new Set,o=v=>{for(var d=0;d<v.length;d++){var h=v[d];if(!l.has(h)){l.add(h);var y=Pi(h);t.addEventListener(h,Gt,{passive:y});var E=Pt.get(h);E===void 0?(document.addEventListener(h,Gt,{passive:y}),Pt.set(h,1)):Pt.set(h,E+1)}}};o(Gr(Cs)),qr.add(o);var u=void 0,c=gi(()=>{var v=r??t.appendChild(Be());return Xa(v,{pending:()=>{}},d=>{if(a){L({});var h=X;h.c=a}s&&(n.$$events=s),u=e(d,n)||{},a&&I()}),()=>{for(var d of l){t.removeEventListener(d,Gt);var h=Pt.get(d);--h===0?(document.removeEventListener(d,Gt),Pt.delete(d)):Pt.set(d,h)}qr.delete(o),v!==r&&v.parentNode?.removeChild(v)}});return Oi.set(u,c),u}let Oi=new WeakMap;class Nr{anchor;#t=new Map;#e=new Map;#n=new Map;#r=new Set;#a=!0;constructor(t,r=!0){this.anchor=t,this.#a=r}#s=()=>{var t=R;if(this.#t.has(t)){var r=this.#t.get(t),n=this.#e.get(r);if(n)un(n),this.#r.delete(r);else{var s=this.#n.get(r);s&&(this.#e.set(r,s.effect),this.#n.delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),n=s.effect)}for(const[a,i]of this.#t){if(this.#t.delete(a),a===t)break;const l=this.#n.get(i);l&&(le(l.effect),this.#n.delete(i))}for(const[a,i]of this.#e){if(a===r||this.#r.has(a))continue;const l=()=>{if(Array.from(this.#t.values()).includes(a)){var u=document.createDocumentFragment();Es(i,u),u.append(Be()),this.#n.set(a,{effect:i,fragment:u})}else le(i);this.#r.delete(a),this.#e.delete(a)};this.#a||!n?(this.#r.add(a),zt(i,l,!1)):l()}}};#o=t=>{this.#t.delete(t);const r=Array.from(this.#t.values());for(const[n,s]of this.#n)r.includes(n)||(le(s.effect),this.#n.delete(n))};ensure(t,r){var n=R,s=hs();if(r&&!this.#e.has(t)&&!this.#n.has(t))if(s){var a=document.createDocumentFragment(),i=Be();a.append(i),this.#n.set(t,{effect:xe(()=>r(i)),fragment:a})}else this.#e.set(t,xe(()=>r(this.anchor)));if(this.#t.set(n,t),s){for(const[l,o]of this.#e)l===t?n.skipped_effects.delete(o):n.skipped_effects.add(o);for(const[l,o]of this.#n)l===t?n.skipped_effects.delete(o.effect):n.skipped_effects.add(o.effect);n.oncommit(this.#s),n.ondiscard(this.#o)}else this.#s()}}function H(e,t,r=!1){var n=new Nr(e),s=r?Je:0;function a(i,l){n.ensure(i,l)}At(()=>{var i=!1;t((l,o=!0)=>{i=!0,a(o,l)}),i||a(!1,null)},s)}function Fi(e,t,r=!1,n=!1,s=!1){var a=e,i="";fe(()=>{var l=z;if(i!==(i=t()??"")&&(l.nodes_start!==null&&(ys(l.nodes_start,l.nodes_end),l.nodes_start=l.nodes_end=null),i!=="")){var o=i+"";r?o=`<svg>${o}</svg>`:n&&(o=`<math>${o}</math>`);var u=fn(o);if((r||n)&&(u=De(u)),Rt(De(u),u.lastChild),r||n)for(;De(u);)a.before(De(u));else a.before(u)}})}function K(e,t,...r){var n=new Nr(e);At(()=>{const s=t()??null;n.ensure(s,s&&(a=>s(a,...r)))},Je)}function Ri(e,t,r){var n=new Nr(e);At(()=>{var s=t()??null;n.ensure(s,s&&(a=>r(a,s)))},Je)}function ji(e,t,r,n,s,a){var i=null,l=e,o=new Nr(l,!1);At(()=>{const u=t()||null;var c=Va;if(u===null){o.ensure(null,null);return}return o.ensure(u,v=>{if(u){if(i=document.createElementNS(c,u),Rt(i,i),n){var d=i.appendChild(Be());n(i,d)}z.nodes_end=i,v.before(i)}}),()=>{}},Je),nn(()=>{})}function Di(e,t){var r;r=document.head.appendChild(Be());try{At(()=>t(r),Zr)}finally{}}function Vi(e,t){var r=void 0,n;gs(()=>{r!==(r=t())&&(n&&(le(n),n=null),r&&(n=xe(()=>{an(()=>r(e))})))})}function Ls(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Ls(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qi(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ls(e))&&(n&&(n+=" "),n+=t);return n}function Bi(e){return typeof e=="object"?qi(e):e??""}const $n=[...`
2
- \r\f \v\uFEFF`];function Wi(e,t,r){var n=e==null?"":""+e;if(r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var a=s.length,i=0;(i=n.indexOf(s,i))>=0;){var l=i+a;(i===0||$n.includes(n[i-1]))&&(l===n.length||$n.includes(n[l]))?n=(i===0?"":n.substring(0,i))+n.substring(l+1):i=l}}return n===""?null:n}function Pn(e,t=!1){var r=t?" !important;":";",n="";for(var s in e){var a=e[s];a!=null&&a!==""&&(n+=" "+s+": "+a+r)}return n}function Cr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Hi(e,t){if(t){var r="",n,s;if(Array.isArray(t)?(n=t[0],s=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,i=0,l=!1,o=[];n&&o.push(...Object.keys(n).map(Cr)),s&&o.push(...Object.keys(s).map(Cr));var u=0,c=-1;const E=e.length;for(var v=0;v<E;v++){var d=e[v];if(l?d==="/"&&e[v-1]==="*"&&(l=!1):a?a===d&&(a=!1):d==="/"&&e[v+1]==="*"?l=!0:d==='"'||d==="'"?a=d:d==="("?i++:d===")"&&i--,!l&&a===!1&&i===0){if(d===":"&&c===-1)c=v;else if(d===";"||v===E-1){if(c!==-1){var h=Cr(e.substring(u,c).trim());if(!o.includes(h)){d!==";"&&v++;var y=e.substring(u,v).trim();r+=" "+y+";"}}u=v+1,c=-1}}}}return n&&(r+=Pn(n)),s&&(r+=Pn(s,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function Ke(e,t,r,n,s,a){var i=e.__className;if(i!==r||i===void 0){var l=Wi(r,n,a);l==null?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e.__className=r}else if(a&&s!==a)for(var o in a){var u=!!a[o];(s==null||u!==!!s[o])&&e.classList.toggle(o,u)}return a}function zr(e,t={},r,n){for(var s in r){var a=r[s];t[s]!==a&&(r[s]==null?e.style.removeProperty(s):e.style.setProperty(s,a,n))}}function Is(e,t,r,n){var s=e.__style;if(s!==t){var a=Hi(t,n);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}else n&&(Array.isArray(n)?(zr(e,r?.[0],n[0]),zr(e,r?.[1],n[1],"important")):zr(e,r,n));return n}function Br(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Yr(t))return Ba();for(var n of e.options)n.selected=t.includes(Cn(n));return}for(n of e.options){var s=Cn(n);if(fi(s,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Ui(e){var t=new MutationObserver(()=>{Br(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),nn(()=>{t.disconnect()})}function Cn(e){return"__value"in e?e.__value:e.value}const Ut=Symbol("class"),Kt=Symbol("style"),Os=Symbol("is custom element"),Fs=Symbol("is html");function Ki(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function tr(e,t,r,n){var s=Rs(e);s[t]!==(s[t]=r)&&(t==="loading"&&(e[ba]=r),r==null?e.removeAttribute(t):typeof r!="string"&&js(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Yi(e,t,r,n,s=!1,a=!1){var i=Rs(e),l=i[Os],o=!i[Fs],u=t||{},c=e.tagName==="OPTION";for(var v in t)v in r||(r[v]=null);r.class?r.class=Bi(r.class):r[Ut]&&(r.class=null),r[Kt]&&(r.style??=null);var d=js(e);for(const b in r){let M=r[b];if(c&&b==="value"&&M==null){e.value=e.__value="",u[b]=M;continue}if(b==="class"){var h=e.namespaceURI==="http://www.w3.org/1999/xhtml";Ke(e,h,M,n,t?.[Ut],r[Ut]),u[b]=M,u[Ut]=r[Ut];continue}if(b==="style"){Is(e,M,t?.[Kt],r[Kt]),u[b]=M,u[Kt]=r[Kt];continue}var y=u[b];if(!(M===y&&!(M===void 0&&e.hasAttribute(b)))){u[b]=M;var E=b[0]+b[1];if(E!=="$$")if(E==="on"){const D={},O="$$"+b;let A=b.slice(2);var g=Mi(A);if(Si(A)&&(A=A.slice(0,-7),D.capture=!0),!g&&y){if(M!=null)continue;e.removeEventListener(A,u[O],D),u[O]=null}if(M!=null)if(g)e[`__${A}`]=M,Dt([A]);else{let V=function(re){u[b].call(this,re)};var x=V;u[O]=zs(A,e,V,D)}else g&&(e[`__${A}`]=void 0)}else if(b==="style")tr(e,b,M);else if(b==="autofocus")vi(e,!!M);else if(!l&&(b==="__value"||b==="value"&&M!=null))e.value=e.__value=M;else if(b==="selected"&&c)Ki(e,M);else{var m=b;o||(m=Ti(m));var W=m==="defaultValue"||m==="defaultChecked";if(M==null&&!l&&!W)if(i[b]=null,m==="value"||m==="checked"){let D=e;const O=t===void 0;if(m==="value"){let A=D.defaultValue;D.removeAttribute(m),D.defaultValue=A,D.value=D.__value=O?A:null}else{let A=D.defaultChecked;D.removeAttribute(m),D.defaultChecked=A,D.checked=O?A:!1}}else e.removeAttribute(b);else W||d.includes(m)&&(l||typeof M!="string")?(e[m]=M,m in i&&(i[m]=ue)):typeof M!="function"&&tr(e,m,M)}}}return u}function zn(e,t,r=[],n=[],s=[],a,i=!1,l=!1){is(s,r,n,o=>{var u=void 0,c={},v=e.nodeName==="SELECT",d=!1;if(gs(()=>{var y=t(...o.map(f)),E=Yi(e,u,y,a,i,l);d&&v&&"value"in y&&Br(e,y.value);for(let m of Object.getOwnPropertySymbols(c))y[m]||le(c[m]);for(let m of Object.getOwnPropertySymbols(y)){var g=y[m];m.description===qa&&(!u||g!==u[m])&&(c[m]&&le(c[m]),c[m]=xe(()=>Vi(e,()=>g))),E[m]=g}u=E}),v){var h=e;an(()=>{Br(h,u.value,!0),Ui(h)})}d=!0})}function Rs(e){return e.__attributes??={[Os]:e.nodeName.includes("-"),[Fs]:e.namespaceURI===Da}}var Ln=new Map;function js(e){var t=e.getAttribute("is")||e.nodeName,r=Ln.get(t);if(r)return r;Ln.set(t,r=[]);for(var n,s=e,a=Element.prototype;a!==s;){n=Hn(s);for(var i in n)n[i].set&&r.push(i);s=Qr(s)}return r}function Ds(e,t,r=t){var n=new WeakSet;_i(e,"input",async s=>{var a=s?e.defaultValue:e.value;if(a=Lr(e)?Ir(a):a,r(a),R!==null&&n.add(R),await wi(),a!==(a=t())){var i=e.selectionStart,l=e.selectionEnd,o=e.value.length;if(e.value=a??"",l!==null){var u=e.value.length;i===l&&l===o&&u>o?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=i,e.selectionEnd=Math.min(l,u))}}}),ft(t)==null&&e.value&&(r(Lr(e)?Ir(e.value):e.value),R!==null&&n.add(R)),ln(()=>{var s=t();if(e===document.activeElement){var a=hr??R;if(n.has(a))return}Lr(e)&&s===Ir(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Lr(e){var t=e.type;return t==="number"||t==="range"}function Ir(e){return e===""?null:+e}function In(e,t){return e===t||e?.[qe]===t}function Gi(e={},t,r,n){return an(()=>{var s,a;return ln(()=>{s=a,a=[],ft(()=>{e!==r(...a)&&(t(e,...a),s&&In(r(...s),e)&&t(null,...s))})}),()=>{St(()=>{a&&In(r(...a),e)&&t(null,...a)})}}),e}function Qi(e=!1){const t=X,r=t.l.u;if(!r)return;let n=()=>Ei(t.s);if(e){let s=0,a={};const i=ar(()=>{let l=!1;const o=t.s;for(const u in o)o[u]!==a[u]&&(a[u]=o[u],l=!0);return l&&s++,s});n=()=>f(i)}r.b.length&&Ie(()=>{On(t,n),Fr(r.b)}),kt(()=>{const s=ft(()=>r.m.map(ga));return()=>{for(const a of s)typeof a=="function"&&a()}}),r.a.length&&kt(()=>{On(t,n),Fr(r.a)})}function On(e,t){if(e.l.s)for(const r of e.l.s)f(r);t()}let vr=!1;function Ji(e){var t=vr;try{return vr=!1,[e(),vr]}finally{vr=t}}const Xi={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Y(e,t,r){return new Proxy({props:e,exclude:t},Xi)}const Zi={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(Ht(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let s=e.props[n];Ht(s)&&(s=s());const a=at(s,t);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(Ht(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const s=at(n,t);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,t){if(t===qe||t===Gn)return!1;for(let r of e.props)if(Ht(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(Ht(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function G(...e){return new Proxy({props:e},Zi)}function ae(e,t,r,n){var s=!jt||(r&La)!==0,a=(r&Oa)!==0,i=(r&Fa)!==0,l=n,o=!0,u=()=>(o&&(o=!1,l=i?ft(n):n),l),c;if(a){var v=qe in e||Gn in e;c=at(e,t)?.set??(v&&t in e?x=>e[t]=x:void 0)}var d,h=!1;a?[d,h]=Ji(()=>e[t]):d=e[t],d===void 0&&n!==void 0&&(d=u(),c&&(s&&Aa(),c(d)));var y;if(s?y=()=>{var x=e[t];return x===void 0?u():(o=!0,x)}:y=()=>{var x=e[t];return x!==void 0&&(l=void 0),x===void 0?l:x},s&&(r&Ia)===0)return y;if(c){var E=e.$$legacy;return(function(x,b){return arguments.length>0?((!s||!b||E||h)&&c(b?y():x),x):y()})}var g=!1,m=((r&za)!==0?ar:tn)(()=>(g=!1,y()));a&&f(m);var W=z;return(function(x,b){if(arguments.length>0){const M=b?f(m):s&&a?Ce(x):x;return S(m,M),g=!0,l!==void 0&&(l=M),x}return Mt&&g||(W.f&Ye)!==0?m.v:f(m)})}function Vs(e){X===null&&ya(),jt&&X.l!==null?el(X).m.push(e):kt(()=>{const t=ft(e);if(typeof t=="function")return t})}function el(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const tl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(tl);const rl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var nl=zi("<svg><!><!></svg>");function Q(e,t){L(t,!0);const r=ae(t,"color",3,"currentColor"),n=ae(t,"size",3,24),s=ae(t,"strokeWidth",3,2),a=ae(t,"absoluteStrokeWidth",3,!1),i=ae(t,"iconNode",19,()=>[]),l=Y(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var o=nl();zn(o,v=>({...rl,...l,width:n(),height:n(),stroke:r(),"stroke-width":v,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>a()?Number(s())*24/Number(n()):s()]);var u=_(o);Ar(u,17,i,ei,(v,d)=>{var h=Ge(()=>ma(f(d),2));let y=()=>f(h)[0],E=()=>f(h)[1];var g=F(),m=T(g);ji(m,y,!0,(W,x)=>{zn(W,()=>({...E()}))}),p(v,g)});var c=k(u);K(c,()=>t.children??U),p(e,o),I()}function sl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 6 9 17l-5-5"}]];Q(e,G({name:"check"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function Fn(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];Q(e,G({name:"circle-alert"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function Rn(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];Q(e,G({name:"circle-check"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function jn(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7"}]];Q(e,G({name:"circle-dashed"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function qs(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];Q(e,G({name:"file-text"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function al(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}],["path",{d:"m2 2 20 20"}],["path",{d:"M4 22V4"}],["path",{d:"M7.656 2H8c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10.347"}]];Q(e,G({name:"flag-off"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function il(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]];Q(e,G({name:"flag"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function ll(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Q(e,G({name:"folder-open"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function ol(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];Q(e,G({name:"funnel"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function ul(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];Q(e,G({name:"globe"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function fl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Q(e,G({name:"info"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function cl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m5 8 6 6"}],["path",{d:"m4 14 6-6 2-3"}],["path",{d:"M2 5h12"}],["path",{d:"M7 2h1"}],["path",{d:"m22 22-5-10-5 10"}],["path",{d:"M14 18h6"}]];Q(e,G({name:"languages"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function _r(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Q(e,G({name:"loader-circle"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function dl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}],["circle",{cx:"12",cy:"10",r:"3"}]];Q(e,G({name:"map-pin"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function vl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}],["path",{d:"M7 11h10"}],["path",{d:"M7 15h6"}],["path",{d:"M7 7h8"}]];Q(e,G({name:"message-square-text"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function hl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"}]];Q(e,G({name:"moon"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function _l(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Q(e,G({name:"pencil"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function pl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Q(e,G({name:"refresh-cw"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function gl(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Q(e,G({name:"search"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function ml(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];Q(e,G({name:"sun"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function Bs(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];Q(e,G({name:"triangle-alert"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}function Ws(e,t){L(t,!0);let r=Y(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Q(e,G({name:"x"},()=>r,{get iconNode(){return n},children:(s,a)=>{var i=F(),l=T(i);K(l,()=>t.children??U),p(s,i)},$$slots:{default:!0}})),I()}const Hs=typeof window<"u"?window:void 0;function bl(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class yl{#t;#e;constructor(t,r){this.#t=t,this.#e=sr(r)}get current(){return this.#e(),this.#t()}}const xl=/\(.+\)/,wl=new Set(["all","print","screen","and","or","not","only"]);class kl extends yl{constructor(t,r){let n=xl.test(t)||t.split(/[\s,]+/).some(a=>wl.has(a.trim()))?t:`(${t})`;const s=window.matchMedia(n);super(()=>s.matches,a=>Ft(s,"change",a))}}let El=class{#t;#e;constructor(t={}){const{window:r=Hs,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=sr(s=>{const a=Ft(r,"focusin",s),i=Ft(r,"focusout",s);return()=>{a(),i()}}))}get current(){return this.#e?.(),this.#t?bl(this.#t):null}};new El;function Sl(e,t){switch(e){case"post":kt(t);break;case"pre":Ie(t);break}}function Us(e,t,r,n={}){const{lazy:s=!1}=n;let a=!s,i=Array.isArray(e)?[]:void 0;Sl(t,()=>{const l=Array.isArray(e)?e.map(u=>u()):e();if(!a){a=!0,i=l;return}const o=ft(()=>r(l,i));return i=l,o})}function cn(e,t,r){Us(e,"post",t,r)}function Al(e,t,r){Us(e,"pre",t,r)}cn.pre=Al;function Ml(e,t){switch(e){case"local":return t.localStorage;case"session":return t.sessionStorage}}class Ks{#t;#e;#n;#r;#a;#s=j(0);constructor(t,r,n={}){const{storage:s="local",serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:i=!0,window:l=Hs}=n;if(this.#t=r,this.#e=t,this.#n=a,l===void 0)return;const o=Ml(s,l);this.#r=o;const u=o.getItem(t);u!==null?this.#t=this.#i(u):this.#l(r),i&&s==="local"&&(this.#a=sr(()=>Ft(l,"storage",this.#o)))}get current(){this.#a?.(),f(this.#s);const t=this.#i(this.#r?.getItem(this.#e))??this.#t,r=new WeakMap,n=s=>{if(s===null||s?.constructor.name==="Date"||typeof s!="object")return s;let a=r.get(s);return a||(a=new Proxy(s,{get:(i,l)=>(f(this.#s),n(Reflect.get(i,l))),set:(i,l,o)=>(S(this.#s,f(this.#s)+1),Reflect.set(i,l,o),this.#l(t),!0)}),r.set(s,a)),a};return n(t)}set current(t){this.#l(t),S(this.#s,f(this.#s)+1)}#o=t=>{t.key!==this.#e||t.newValue===null||(this.#t=this.#i(t.newValue),S(this.#s,f(this.#s)+1))};#i(t){try{return this.#n.deserialize(t)}catch(r){console.error(`Error when parsing "${t}" from persisted store "${this.#e}"`,r);return}}#l(t){try{t!=null&&this.#r?.setItem(this.#e,this.#n.serialize(t))}catch(r){console.error(`Error when writing value from persisted store "${this.#e}" to ${this.#r}`,r)}}}function Dn(e){return e.filter(t=>t.length>0)}const Ys={getItem:e=>null,setItem:(e,t)=>{}},or=typeof document<"u";function Nl(e){return typeof e=="function"}function Tl(e){return e!==null&&typeof e=="object"}const rr=Symbol("box"),dn=Symbol("is-writable");function $l(e){return Tl(e)&&rr in e}function Pl(e){return te.isBox(e)&&dn in e}function te(e){let t=j(Ce(e));return{[rr]:!0,[dn]:!0,get current(){return f(t)},set current(r){S(t,r,!0)}}}function Cl(e,t){const r=Ge(e);return t?{[rr]:!0,[dn]:!0,get current(){return f(r)},set current(n){t(n)}}:{[rr]:!0,get current(){return e()}}}function zl(e){return te.isBox(e)?e:Nl(e)?te.with(e):te(e)}function Ll(e){return Object.entries(e).reduce((t,[r,n])=>te.isBox(n)?(te.isWritableBox(n)?Object.defineProperty(t,r,{get(){return n.current},set(s){n.current=s}}):Object.defineProperty(t,r,{get(){return n.current}}),t):Object.assign(t,{[r]:n}),{})}function Il(e){return te.isWritableBox(e)?{[rr]:!0,get current(){return e.current}}:e}te.from=zl;te.with=Cl;te.flatten=Ll;te.readonly=Il;te.isBox=$l;te.isWritableBox=Pl;function Ol(e,t){const r=RegExp(e,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,t):n}}const Fl=Ol(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Rl(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Fl(t)}: ${e[t]};`).join(`
3
- `)}function jl(e={}){return Rl(e).replace(`
4
- `," ")}const Dl={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};jl(Dl);const Vl=typeof window<"u"?window:void 0;function ql(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}class Bl{#t;#e;constructor(t={}){const{window:r=Vl,document:n=r?.document}=t;r!==void 0&&(this.#t=n,this.#e=sr(s=>{const a=Ft(r,"focusin",s),i=Ft(r,"focusout",s);return()=>{a(),i()}}))}get current(){return this.#e?.(),this.#t?ql(this.#t):null}}new Bl;const gt=te("mode-watcher-mode"),mt=te("mode-watcher-theme"),Wl=["dark","light","system"];function Wr(e){return typeof e!="string"?!1:Wl.includes(e)}class Hl{#t="system";#e=or?localStorage:Ys;#n=this.#e.getItem(gt.current);#r=Wr(this.#n)?this.#n:this.#t;#a=j(Ce(this.#s()));#s(t=this.#r){return new Ks(gt.current,t,{serializer:{serialize:r=>r,deserialize:r=>Wr(r)?r:this.#t}})}constructor(){sn(()=>cn.pre(()=>gt.current,(t,r)=>{const n=f(this.#a).current;S(this.#a,this.#s(n),!0),r&&localStorage.removeItem(r)}))}get current(){return f(this.#a).current}set current(t){f(this.#a).current=t}}class Ul{#t=void 0;#e=!0;#n=j(Ce(this.#t));#r=typeof window<"u"&&typeof window.matchMedia=="function"?new kl("prefers-color-scheme: light"):{current:!1};query(){or&&S(this.#n,this.#r.current?"light":"dark",!0)}tracking(t){this.#e=t}constructor(){sn(()=>{Ie(()=>{this.#e&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return f(this.#n)}}const yr=new Hl,Hr=new Ul;class Kl{#t=or?localStorage:Ys;#e=this.#t.getItem(mt.current);#n=this.#e===null||this.#e===void 0?"":this.#e;#r=j(Ce(this.#a()));#a(t=this.#n){return new Ks(mt.current,t,{serializer:{serialize:r=>typeof r!="string"?"":r,deserialize:r=>r}})}constructor(){sn(()=>cn.pre(()=>mt.current,(t,r)=>{const n=f(this.#r).current;S(this.#r,this.#a(n),!0),r&&localStorage.removeItem(r)}))}get current(){return f(this.#r).current}set current(t){f(this.#r).current=t}}const pr=new Kl;let Vn,qn,Bn=!1,Yt=null;function Yl(){return Yt||(Yt=document.createElement("style"),Yt.appendChild(document.createTextNode(`* {
5
- -webkit-transition: none !important;
6
- -moz-transition: none !important;
7
- -o-transition: none !important;
8
- -ms-transition: none !important;
9
- transition: none !important;
10
- }`)),Yt)}function Gs(e,t=!1){if(typeof document>"u")return;if(!Bn){Bn=!0,e();return}if(typeof window<"u"&&window.__vitest_worker__){e();return}clearTimeout(Vn),clearTimeout(qn);const n=Yl(),s=()=>document.head.appendChild(n),a=()=>{n.parentNode&&document.head.removeChild(n)};function i(){e(),window.requestAnimationFrame(a)}if(typeof window.requestAnimationFrame<"u"){s(),t?i():window.requestAnimationFrame(()=>{i()});return}s(),Vn=window.setTimeout(()=>{e(),qn=window.setTimeout(a,16)},16)}const st=te(void 0),xr=te(!0),wr=te(!1),Ur=te([]),Kr=te([]);function Gl(){const e=Ge(()=>{if(!or)return;const t=yr.current==="system"?Hr.current:yr.current,r=Dn(Ur.current),n=Dn(Kr.current);function s(){const a=document.documentElement,i=document.querySelector('meta[name="theme-color"]');t==="light"?(r.length&&a.classList.remove(...r),n.length&&a.classList.add(...n),a.style.colorScheme="light",i&&st.current&&i.setAttribute("content",st.current.light)):(n.length&&a.classList.remove(...n),r.length&&a.classList.add(...r),a.style.colorScheme="dark",i&&st.current&&i.setAttribute("content",st.current.dark))}return xr.current?Gs(s,wr.current):s(),t});return{get current(){return f(e)}}}function Ql(){const e=Ge(()=>{if(pr.current,!or)return;function t(){document.documentElement.setAttribute("data-theme",pr.current)}return xr.current?Gs(t,ft(()=>wr.current)):t(),pr.current});return{get current(){return f(e)}}}const vn=Gl(),Jl=Ql();function Xl(){yr.current=vn.current==="dark"?"light":"dark"}function Zl(e){yr.current=e}function eo(e){pr.current=e}function to({defaultMode:e="system",themeColors:t,darkClassNames:r=["dark"],lightClassNames:n=[],defaultTheme:s="",modeStorageKey:a="mode-watcher-mode",themeStorageKey:i="mode-watcher-theme"}){const l=document.documentElement,o=localStorage.getItem(a)??e,u=localStorage.getItem(i)??s,c=o==="light"||o==="system"&&window.matchMedia("(prefers-color-scheme: light)").matches;if(c?(r.length&&l.classList.remove(...r.filter(Boolean)),n.length&&l.classList.add(...n.filter(Boolean))):(n.length&&l.classList.remove(...n.filter(Boolean)),r.length&&l.classList.add(...r.filter(Boolean))),l.style.colorScheme=c?"light":"dark",t){const v=document.querySelector('meta[name="theme-color"]');v&&v.setAttribute("content",o==="light"?t.light:t.dark)}u&&(l.setAttribute("data-theme",u),localStorage.setItem(i,u)),localStorage.setItem(a,o)}var ro=N('<meta name="theme-color"/>');function no(e,t){L(t,!0);var r=F(),n=T(r);{var s=a=>{var i=ro();fe(()=>tr(i,"content",t.themeColors.dark)),p(a,i)};H(n,a=>{t.themeColors&&a(s)})}p(e,r),I()}var so=N('<meta name="theme-color"/>'),ao=N("<!> <!>",1);function io(e,t){L(t,!0);let r=ae(t,"trueNonce",3,"");Di("1funsus",n=>{var s=ao(),a=T(s);{var i=o=>{var u=so();fe(()=>tr(u,"content",t.themeColors.dark)),p(o,u)};H(a,o=>{t.themeColors&&o(i)})}var l=k(a,2);Fi(l,()=>`<script${r()?` nonce=${r()}`:""}>(`+to.toString()+")("+JSON.stringify(t.initConfig)+");<\/script>"),p(n,s)}),I()}function lo(e,t){L(t,!0);let r=ae(t,"track",3,!0),n=ae(t,"defaultMode",3,"system"),s=ae(t,"disableTransitions",3,!0),a=ae(t,"darkClassNames",19,()=>["dark"]),i=ae(t,"lightClassNames",19,()=>[]),l=ae(t,"defaultTheme",3,""),o=ae(t,"nonce",3,""),u=ae(t,"themeStorageKey",3,"mode-watcher-theme"),c=ae(t,"modeStorageKey",3,"mode-watcher-mode"),v=ae(t,"disableHeadScriptInjection",3,!1),d=ae(t,"synchronousModeChanges",3,!1);gt.current=c(),mt.current=u(),Ur.current=a(),Kr.current=i(),xr.current=s(),st.current=t.themeColors,wr.current=d(),Ie(()=>{wr.current=d()}),Ie(()=>{xr.current=s()}),Ie(()=>{st.current=t.themeColors}),Ie(()=>{Ur.current=a()}),Ie(()=>{Kr.current=i()}),Ie(()=>{gt.current=c()}),Ie(()=>{mt.current=u()}),Ie(()=>{vn.current,gt.current,mt.current,Jl.current}),Vs(()=>{Hr.tracking(r()),Hr.query();const x=localStorage.getItem(gt.current);Zl(Wr(x)?x:n());const b=localStorage.getItem(mt.current);eo(b||l())});const h={defaultMode:n(),themeColors:t.themeColors,darkClassNames:a(),lightClassNames:i(),defaultTheme:l(),modeStorageKey:c(),themeStorageKey:u()},y=Ge(()=>typeof window>"u"?o():"");var E=F(),g=T(E);{var m=x=>{no(x,{get themeColors(){return st.current}})},W=x=>{io(x,{get trueNonce(){return f(y)},get initConfig(){return h},get themeColors(){return st.current}})};H(g,x=>{v()?x(m):x(W,!1)})}p(e,E),I()}let Qs=j(0);function oo(){return f(Qs)}function Wn(){ui(Qs)}var uo=N('<div class="flex flex-1 flex-col items-center justify-center gap-2 text-slate-500 dark:text-slate-400"><!> <span class="text-sm">Loading languages...</span></div>'),fo=N('<div class="flex flex-1 flex-col items-center justify-center gap-3 px-4 text-center"><!> <p class="text-sm text-red-600 dark:text-red-400"> </p> <button type="button" class="btn btn-secondary text-sm">Retry</button></div>'),co=N('<div class="flex flex-1 flex-col items-center justify-center gap-2 px-4 text-center text-slate-500 dark:text-slate-400"><!> <p class="text-sm font-medium">No .po files found</p> <p class="text-xs text-slate-400 dark:text-slate-500">Add .po files to your locales directory</p></div>'),vo=N('<li><button type="button"><div class="flex items-start justify-between"><div><span> </span> <span class="text-xs text-slate-500 dark:text-slate-400"> </span></div> <span> </span></div> <div class="mt-2 h-1.5 overflow-hidden rounded-full bg-slate-200 dark:bg-slate-700"><div></div></div> <div class="mt-2 flex gap-3 text-xs text-slate-500 dark:text-slate-400"><span class="flex items-center gap-1"><span class="h-1.5 w-1.5 rounded-full bg-emerald-500"></span> </span> <span class="flex items-center gap-1"><span class="h-1.5 w-1.5 rounded-full bg-amber-500"></span> </span> <span class="flex items-center gap-1"><span class="h-1.5 w-1.5 rounded-full bg-red-500"></span> </span></div></button></li>'),ho=N('<ul class="flex-1 overflow-y-auto p-2"></ul>'),_o=N('<div class="flex h-full flex-col"><div class="flex items-center justify-between border-b border-slate-200 px-4 py-3 dark:border-slate-700"><div class="flex items-center gap-2"><!> <h2 class="text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400">Languages</h2></div> <button type="button" class="rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 disabled:opacity-50 dark:hover:bg-slate-700 dark:hover:text-slate-300" title="Refresh languages"><!></button></div> <!></div>');function po(e,t){L(t,!0);let r=ae(t,"selected",15,null),n=j(Ce([])),s=j(!0),a=j(null),i=j(!1);Vs(async()=>{await l()}),kt(()=>{oo()>0&&l()});async function l(){if(!f(i)){S(s,f(n).length===0),S(i,!0),S(a,null);try{const b=await(await fetch("./api/languages")).json();if(!b.success)throw new Error(b.error||"Failed to load languages");S(n,b.data||[],!0)}catch(x){S(a,x instanceof Error?x.message:"Failed to load languages",!0)}finally{S(s,!1),S(i,!1)}}}function o(x){return x>=90?"bg-emerald-500":x>=50?"bg-amber-500":"bg-red-500"}function u(x){return x>=90?"text-emerald-600 dark:text-emerald-400":x>=50?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}var c=_o(),v=_(c),d=_(v),h=_(d);cl(h,{class:"h-4 w-4 text-slate-400"});var y=k(d,2);y.__click=l;var E=_(y);{let x=Ge(()=>f(i)?"animate-spin":"");pl(E,{get class(){return`h-4 w-4 ${f(x)??""}`}})}var g=k(v,2);{var m=x=>{var b=uo(),M=_(b);_r(M,{class:"h-6 w-6 animate-spin"}),p(x,b)},W=x=>{var b=F(),M=T(b);{var D=A=>{var V=fo(),re=_(V);Bs(re,{class:"h-8 w-8 text-red-400"});var ie=k(re,2),Z=_(ie),oe=k(ie,2);oe.__click=l,fe(()=>ee(Z,f(a))),p(A,V)},O=A=>{var V=F(),re=T(V);{var ie=oe=>{var be=co(),_e=_(be);ll(_e,{class:"h-8 w-8 text-slate-300 dark:text-slate-600"}),p(oe,be)},Z=oe=>{var be=ho();Ar(be,21,()=>f(n),_e=>_e.code,(_e,ne)=>{var ur=vo(),Vt=_(ur);Vt.__click=()=>r(f(ne).code);var fr=_(Vt),cr=_(fr),qt=_(cr),Tr=_(qt),$r=k(qt,2),w=_($r),C=k(cr,2),ye=_(C),Ae=k(fr,2),tt=_(Ae),rt=k(Ae,2),nt=_(rt),Nt=k(_(nt)),ct=k(nt,2),Bt=k(_(ct)),Re=k(ct,2),dt=k(_(Re));fe((Tt,vt)=>{Ke(Vt,1,`group w-full rounded-lg p-3 text-left transition-colors ${r()===f(ne).code?"bg-blue-50 ring-1 ring-blue-200 dark:bg-blue-900/30 dark:ring-blue-700":"hover:bg-slate-50 dark:hover:bg-slate-700/50"}`),Ke(qt,1,`block font-medium text-slate-900 dark:text-white ${r()===f(ne).code?"text-blue-900 dark:text-blue-300":""}`),ee(Tr,f(ne).name),ee(w,f(ne).code),Ke(C,1,`text-xs font-medium ${Tt??""}`),ee(ye,`${f(ne).progress??""}%`),Ke(tt,1,`h-full transition-all duration-300 ${vt??""}`),Is(tt,`width: ${f(ne).progress??""}%`),ee(Nt,` ${f(ne).translated??""}`),ee(Bt,` ${f(ne).fuzzy??""}`),ee(dt,` ${f(ne).untranslated??""}`)},[()=>u(f(ne).progress),()=>o(f(ne).progress)]),p(_e,ur)}),p(oe,be)};H(re,oe=>{f(n).length===0?oe(ie):oe(Z,!1)},!0)}p(A,V)};H(M,A=>{f(a)?A(D):A(O,!1)},!0)}p(x,b)};H(g,x=>{f(s)?x(m):x(W,!1)})}fe(()=>y.disabled=f(i)),p(e,c),I()}Dt(["click"]);var go=N('<div class="flex flex-1 flex-col items-center justify-center gap-3 text-slate-500 dark:text-slate-400"><!> <span>Loading translations...</span></div>'),mo=N('<div class="flex flex-1 flex-col items-center justify-center gap-4"><!> <p class="text-red-600 dark:text-red-400"> </p> <button type="button" class="btn btn-secondary">Retry</button></div>'),bo=N('<p class="text-sm text-slate-400 dark:text-slate-500">Try adjusting your search or filter</p>'),yo=N('<div class="flex flex-1 flex-col items-center justify-center gap-3 text-slate-500 dark:text-slate-400"><!> <p class="font-medium">No translations found</p> <!></div>'),xo=N('<span class="badge badge-secondary text-xs"> </span>'),wo=N('<div class="mt-1 flex items-center gap-1 text-xs text-slate-400 dark:text-slate-500"><!> </div>'),ko=N('<div class="flex items-start gap-2 text-sm"><!> <div><span class="font-medium text-slate-600 dark:text-slate-300">Translator note:</span> <span class="ml-1 text-slate-700 dark:text-slate-200"> </span></div></div>'),Eo=N('<div><!> <div><span class="font-medium text-slate-600 dark:text-slate-300">Context:</span> <span class="ml-1 text-slate-700 dark:text-slate-200"> </span></div></div>'),So=N('<div class="rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-slate-600 dark:bg-slate-800/50"><!> <!></div>'),Ao=N('<span class="badge badge-warning">Fuzzy</span>'),Mo=N("<!> <span>Unflag</span>",1),No=N("<!> <span>Mark fuzzy</span>",1),To=N('<button type="button"><!></button>'),$o=N("<!> Saving...",1),Po=N("<!> Save",1),Co=N('<div class="space-y-2"><textarea rows="2" class="input w-full resize-none font-mono text-sm" placeholder="Enter translation..."></textarea> <div class="flex items-center gap-2"><button type="button" class="btn btn-primary"><!></button> <button type="button" class="btn btn-ghost"><!> Cancel</button> <span class="ml-2 text-xs text-slate-400 dark:text-slate-500">Enter to save, Esc to cancel</span></div></div>'),zo=N('<span class="flex-1 text-sm text-slate-800 dark:text-slate-200"> </span>'),Lo=N('<span class="flex-1 text-sm italic text-slate-400 dark:text-slate-500">Click to add translation</span>'),Io=N('<button type="button" class="group/edit flex w-full items-start gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-slate-100 dark:hover:bg-slate-700"><!> <!></button>'),Oo=N('<div><div class="flex gap-4"><div class="shrink-0 pt-0.5"><!></div> <div class="min-w-0 flex-1 space-y-3"><div><div class="mb-1 flex items-center gap-2"><span class="text-xs font-medium uppercase tracking-wide text-slate-400">Source</span> <!></div> <code class="block rounded bg-slate-100 px-3 py-2 text-sm text-slate-800 dark:bg-slate-700 dark:text-slate-200"> </code> <!></div> <!> <div><div class="mb-1 flex items-center gap-2"><span class="text-xs font-medium uppercase tracking-wide text-slate-400">Translation</span> <!> <!></div> <!></div></div></div></div>'),Fo=N('<div class="flex-1 overflow-y-auto"><div class="divide-y divide-slate-100 dark:divide-slate-700"></div></div>'),Ro=N('<div class="flex flex-1 flex-col overflow-hidden"><div class="flex items-center gap-6 border-b border-slate-200 bg-white px-6 py-3 dark:border-slate-700 dark:bg-slate-800"><div class="flex items-center gap-2"><span class="text-2xl font-semibold text-slate-900 dark:text-white"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Total</span></div> <div class="flex items-center gap-2"><!> <span class="font-medium text-emerald-600 dark:text-emerald-400"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Translated</span></div> <div class="flex items-center gap-2"><!> <span class="font-medium text-red-600 dark:text-red-400"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Untranslated</span></div> <div class="flex items-center gap-2"><!> <span class="font-medium text-amber-600 dark:text-amber-400"> </span> <span class="text-sm text-slate-500 dark:text-slate-400">Fuzzy</span></div> <div class="ml-auto text-sm text-slate-500 dark:text-slate-400"> </div></div> <!></div>');function jo(e,t){L(t,!0);let r=j(Ce([])),n=j(!0),s=j(null),a=j(null),i=j(null),l=j(""),o=j(null),u=Ge(()=>{let w=f(r);switch(t.filter){case"translated":w=w.filter(C=>C.msgstr&&!C.fuzzy);break;case"untranslated":w=w.filter(C=>!C.msgstr);break;case"fuzzy":w=w.filter(C=>C.fuzzy);break}if(t.searchQuery){const C=t.searchQuery.toLowerCase();w=w.filter(ye=>ye.msgid.toLowerCase().includes(C)||ye.msgstr.toLowerCase().includes(C))}return w}),c=Ge(()=>({total:f(r).length,translated:f(r).filter(w=>w.msgstr&&!w.fuzzy).length,untranslated:f(r).filter(w=>!w.msgstr).length,fuzzy:f(r).filter(w=>w.fuzzy).length}));kt(()=>{t.language&&v()});async function v(){S(n,!0),S(s,null);try{const C=await(await fetch(`./api/translations/${t.language}`)).json();if(!C.success)throw new Error(C.error||"Failed to load translations");S(r,C.data||[],!0)}catch(w){S(s,w instanceof Error?w.message:"Failed to load translations",!0)}finally{S(n,!1)}}function d(w){S(i,w.msgid,!0),S(l,w.msgstr,!0)}function h(){S(i,null),S(l,"")}async function y(w){if(f(l)===w.msgstr){h();return}S(a,w.msgid,!0);try{const ye=await(await fetch(`./api/translations/${t.language}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({msgid:w.msgid,msgstr:f(l),context:w.context})})).json();if(!ye.success)throw new Error(ye.error||"Failed to save");const Ae=f(r).findIndex(tt=>tt.msgid===w.msgid);Ae!==-1&&(f(r)[Ae]={...f(r)[Ae],msgstr:f(l)}),Wn(),h()}catch(C){alert(C instanceof Error?C.message:"Failed to save")}finally{S(a,null)}}function E(w,C){w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),y(C)),w.key==="Escape"&&h()}async function g(w){S(o,w.msgid,!0);try{const ye=await(await fetch(`./api/translations/${t.language}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({msgid:w.msgid,msgstr:w.msgstr,context:w.context,fuzzy:!w.fuzzy})})).json();if(!ye.success)throw new Error(ye.error||"Failed to toggle fuzzy status");const Ae=f(r).findIndex(tt=>tt.msgid===w.msgid);Ae!==-1&&(f(r)[Ae]={...f(r)[Ae],fuzzy:!w.fuzzy}),Wn()}catch(C){alert(C instanceof Error?C.message:"Failed to toggle fuzzy status")}finally{S(o,null)}}function m(w){return w.fuzzy?{icon:Fn,class:"text-amber-500"}:w.msgstr?{icon:Rn,class:"text-emerald-500"}:{icon:jn,class:"text-red-400"}}var W=Ro(),x=_(W),b=_(x),M=_(b),D=_(M),O=k(b,2),A=_(O);Rn(A,{class:"h-4 w-4 text-emerald-500"});var V=k(A,2),re=_(V),ie=k(O,2),Z=_(ie);jn(Z,{class:"h-4 w-4 text-red-400"});var oe=k(Z,2),be=_(oe),_e=k(ie,2),ne=_(_e);Fn(ne,{class:"h-4 w-4 text-amber-500"});var ur=k(ne,2),Vt=_(ur),fr=k(_e,2),cr=_(fr),qt=k(x,2);{var Tr=w=>{var C=go(),ye=_(C);_r(ye,{class:"h-8 w-8 animate-spin text-blue-500"}),p(w,C)},$r=w=>{var C=F(),ye=T(C);{var Ae=rt=>{var nt=mo(),Nt=_(nt);Bs(Nt,{class:"h-10 w-10 text-red-400"});var ct=k(Nt,2),Bt=_(ct),Re=k(ct,2);Re.__click=v,fe(()=>ee(Bt,f(s))),p(rt,nt)},tt=rt=>{var nt=F(),Nt=T(nt);{var ct=Re=>{var dt=yo(),Tt=_(dt);qs(Tt,{class:"h-10 w-10 text-slate-300 dark:text-slate-600"});var vt=k(Tt,4);{var $=$t=>{var Wt=bo();p($t,Wt)};H(vt,$t=>{(t.searchQuery||t.filter!=="all")&&$t($)})}p(Re,dt)},Bt=Re=>{var dt=Fo(),Tt=_(dt);Ar(Tt,21,()=>f(u),vt=>vt.msgid,(vt,$)=>{const $t=Ge(()=>m(f($)));var Wt=Oo(),Js=_(Wt),hn=_(Js),Xs=_(hn);Ri(Xs,()=>f($t).icon,(q,B)=>{B(q,{get class(){return`h-5 w-5 ${f($t).class??""}`}})});var Zs=k(hn,2),_n=_(Zs),pn=_(_n),ea=k(_(pn),2);{var ta=q=>{var B=xo(),de=_(B);fe(()=>ee(de,`ctx: ${f($).context??""}`)),p(q,B)};H(ea,q=>{f($).context&&q(ta)})}var gn=k(pn,2),ra=_(gn),na=k(gn,2);{var sa=q=>{var B=wo(),de=_(B);dl(de,{class:"h-3 w-3"});var He=k(de);fe(()=>ee(He,` ${f($).comments.reference??""}`)),p(q,B)};H(na,q=>{f($).comments?.reference&&q(sa)})}var mn=k(_n,2);{var aa=q=>{var B=So(),de=_(B);{var He=se=>{var pe=ko(),Ne=_(pe);vl(Ne,{class:"mt-0.5 h-4 w-4 shrink-0 text-blue-500"});var ht=k(Ne,2),J=k(_(ht),2),ge=_(J);fe(()=>ee(ge,f($).comments.translator)),p(se,pe)};H(de,se=>{f($).comments.translator&&se(He)})}var je=k(de,2);{var Me=se=>{var pe=Eo(),Ne=_(pe);fl(Ne,{class:"mt-0.5 h-4 w-4 shrink-0 text-slate-400"});var ht=k(Ne,2),J=k(_(ht),2),ge=_(J);fe(()=>{Ke(pe,1,`flex items-start gap-2 text-sm ${f($).comments.translator?"mt-2":""}`),ee(ge,f($).comments.extracted)}),p(se,pe)};H(je,se=>{f($).comments.extracted&&se(Me)})}p(q,B)};H(mn,q=>{(f($).comments?.translator||f($).comments?.extracted)&&q(aa)})}var ia=k(mn,2),bn=_(ia),yn=k(_(bn),2);{var la=q=>{var B=Ao();p(q,B)};H(yn,q=>{f($).fuzzy&&q(la)})}var oa=k(yn,2);{var ua=q=>{var B=To();B.__click=()=>g(f($));var de=_(B);{var He=Me=>{_r(Me,{class:"h-3 w-3 animate-spin"})},je=Me=>{var se=F(),pe=T(se);{var Ne=J=>{var ge=Mo(),_t=T(ge);al(_t,{class:"h-3 w-3"}),p(J,ge)},ht=J=>{var ge=No(),_t=T(ge);il(_t,{class:"h-3 w-3"}),p(J,ge)};H(pe,J=>{f($).fuzzy?J(Ne):J(ht,!1)},!0)}p(Me,se)};H(de,Me=>{f(o)===f($).msgid?Me(He):Me(je,!1)})}fe(()=>{Ke(B,1,`ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${f($).fuzzy?"bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50":"bg-slate-100 text-slate-600 hover:bg-slate-200 dark:bg-slate-700 dark:text-slate-400 dark:hover:bg-slate-600"}`),B.disabled=f(o)===f($).msgid,tr(B,"title",f($).fuzzy?"Mark as not fuzzy":"Mark as fuzzy (needs review)")}),p(q,B)};H(oa,q=>{f($).msgstr&&q(ua)})}var fa=k(bn,2);{var ca=q=>{var B=Co(),de=_(B);de.__keydown=J=>E(J,f($));var He=k(de,2),je=_(He);je.__click=()=>y(f($));var Me=_(je);{var se=J=>{var ge=$o(),_t=T(ge);_r(_t,{class:"h-4 w-4 animate-spin"}),p(J,ge)},pe=J=>{var ge=Po(),_t=T(ge);sl(_t,{class:"h-4 w-4"}),p(J,ge)};H(Me,J=>{f(a)===f($).msgid?J(se):J(pe,!1)})}var Ne=k(je,2);Ne.__click=h;var ht=_(Ne);Ws(ht,{class:"h-4 w-4"}),fe(()=>je.disabled=f(a)===f($).msgid),Ds(de,()=>f(l),J=>S(l,J)),p(q,B)},da=q=>{var B=Io();B.__click=()=>d(f($));var de=_(B);{var He=se=>{var pe=zo(),Ne=_(pe);fe(()=>ee(Ne,f($).msgstr)),p(se,pe)},je=se=>{var pe=Lo();p(se,pe)};H(de,se=>{f($).msgstr?se(He):se(je,!1)})}var Me=k(de,2);_l(Me,{class:"h-4 w-4 shrink-0 text-slate-400 opacity-0 transition-opacity group-hover/edit:opacity-100"}),p(q,B)};H(fa,q=>{f(i)===f($).msgid?q(ca):q(da,!1)})}fe(()=>{Ke(Wt,1,`group px-6 py-4 transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/50 ${f($).fuzzy?"bg-amber-50/50 dark:bg-amber-900/10":f($).msgstr?"":"bg-red-50/30 dark:bg-red-900/10"}`),ee(ra,f($).msgid)}),p(vt,Wt)}),p(Re,dt)};H(Nt,Re=>{f(u).length===0?Re(ct):Re(Bt,!1)},!0)}p(rt,nt)};H(ye,rt=>{f(s)?rt(Ae):rt(tt,!1)},!0)}p(w,C)};H(qt,w=>{f(n)?w(Tr):w($r,!1)})}fe(()=>{ee(D,f(c).total),ee(re,f(c).translated),ee(be,f(c).untranslated),ee(Vt,f(c).fuzzy),ee(cr,`Showing ${f(u).length??""} of ${f(c).total??""}`)}),p(e,W),I()}Dt(["click","keydown"]);var Do=N('<button type="button" class="absolute right-3 rounded p-0.5 text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-slate-700 dark:hover:text-slate-300"><!></button>'),Vo=N('<kbd class="absolute right-3 flex items-center gap-0.5 rounded border border-slate-200 bg-slate-50 px-1.5 py-0.5 text-xs text-slate-500 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-400"><span class="text-[10px]">⌘</span>K</kbd>'),qo=N('<div class="relative flex items-center"><!> <input type="text" placeholder="Search translations..." class="h-9 w-72 rounded-lg border border-slate-300 bg-white pl-9 pr-16 text-sm shadow-sm transition-colors placeholder:text-slate-400 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-100 dark:placeholder:text-slate-500 dark:focus:border-blue-400"/> <!></div>');function Bo(e,t){L(t,!0);let r=ae(t,"query",15,""),n=j(null);function s(v){(v.ctrlKey||v.metaKey)&&v.key==="k"&&(v.preventDefault(),f(n)?.focus()),v.key==="Escape"&&document.activeElement===f(n)&&(r(""),f(n)?.blur())}kt(()=>(window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)));var a=qo(),i=_(a);gl(i,{class:"absolute left-3 h-4 w-4 text-slate-400"});var l=k(i,2);Gi(l,v=>S(n,v),()=>f(n));var o=k(l,2);{var u=v=>{var d=Do();d.__click=()=>r("");var h=_(d);Ws(h,{class:"h-4 w-4"}),p(v,d)},c=v=>{var d=Vo();p(v,d)};H(o,v=>{r()?v(u):v(c,!1)})}Ds(l,r),p(e,a),I()}Dt(["click"]);Ka();var Wo=N('<button type="button" class="rounded-md p-2 text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200 transition-colors" aria-label="Toggle theme"><!></button>');function Ho(e,t){L(t,!1),Qi();var r=Wo();r.__click=function(...i){Xl?.apply(this,i)};var n=_(r);{var s=i=>{ml(i,{class:"h-5 w-5"})},a=i=>{hl(i,{class:"h-5 w-5"})};H(n,i=>{vn.current==="dark"?i(s):i(a,!1)})}p(e,r),I()}Dt(["click"]);var Uo=N('<button type="button"> </button>'),Ko=N('<div class="flex items-center gap-4 border-b border-slate-200 bg-white px-6 py-3 dark:border-slate-700 dark:bg-slate-800"><!> <div class="flex gap-1"></div></div> <!>',1),Yo=N('<div class="flex flex-1 items-center justify-center bg-slate-50 dark:bg-slate-900"><div class="text-center"><!> <h2 class="mt-4 text-lg font-medium text-slate-900 dark:text-white">Select a language</h2> <p class="mt-1 text-sm text-slate-500 dark:text-slate-400">Choose a language from the sidebar to start editing translations</p></div></div>'),Go=N('<!> <div class="flex h-screen flex-col bg-slate-50 dark:bg-slate-900"><header class="flex items-center justify-between border-b border-slate-200 bg-white px-6 py-3 shadow-sm dark:border-slate-700 dark:bg-slate-800"><div class="flex items-center gap-3"><div class="flex items-center gap-2"><!> <h1 class="text-lg font-semibold text-slate-900 dark:text-white">Lingo</h1></div> <span class="text-sm text-slate-500 dark:text-slate-400">Translation Editor</span></div> <div class="flex items-center gap-4"><!> <!></div></header> <main class="flex flex-1 overflow-hidden"><aside class="w-72 overflow-y-auto border-r border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-800"><!></aside> <section class="flex flex-1 flex-col overflow-hidden"><!></section></main></div>',1);function Qo(e,t){L(t,!0);let r=j(null),n=j(""),s=j("all");const a=[{value:"all",label:"All"},{value:"translated",label:"Translated"},{value:"untranslated",label:"Untranslated"},{value:"fuzzy",label:"Fuzzy"}];var i=Go(),l=T(i);lo(l,{});var o=k(l,2),u=_(o),c=_(u),v=_(c),d=_(v);ul(d,{class:"h-5 w-5 text-blue-600 dark:text-blue-400"});var h=k(c,2),y=_(h);Bo(y,{get query(){return f(n)},set query(O){S(n,O,!0)}});var E=k(y,2);Ho(E,{});var g=k(u,2),m=_(g),W=_(m);po(W,{get selected(){return f(r)},set selected(O){S(r,O,!0)}});var x=k(m,2),b=_(x);{var M=O=>{var A=Ko(),V=T(A),re=_(V);ol(re,{class:"h-4 w-4 text-slate-400"});var ie=k(re,2);Ar(ie,21,()=>a,oe=>oe.value,(oe,be)=>{var _e=Uo();_e.__click=()=>S(s,f(be).value,!0);var ne=_(_e);fe(()=>{Ke(_e,1,`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${f(s)===f(be).value?"bg-blue-600 text-white dark:bg-blue-500":"text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-700"}`),ee(ne,f(be).label)}),p(oe,_e)});var Z=k(V,2);jo(Z,{get language(){return f(r)},get searchQuery(){return f(n)},get filter(){return f(s)}}),p(O,A)},D=O=>{var A=Yo(),V=_(A),re=_(V);qs(re,{class:"mx-auto h-12 w-12 text-slate-300 dark:text-slate-600"}),p(O,A)};H(b,O=>{f(r)?O(M):O(D,!1)})}p(e,i),I()}Dt(["click"]);Li(Qo,{target:document.getElementById("app")});