-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathAuto-Guard.js
More file actions
766 lines (739 loc) · 384 KB
/
Copy pathAuto-Guard.js
File metadata and controls
766 lines (739 loc) · 384 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
/* WPlace AutoBOT — uso bajo tu responsabilidad. Compilado 2025-10-01T15:35:16.647Z */
/* eslint-env browser */
/* eslint-disable no-empty */
(()=>{var lr=Object.defineProperty;var R=(o,e)=>()=>(o&&(e=o(o=0)),e);var Qt=(o,e)=>{for(var t in e)lr(o,t,{get:e[t],enumerable:!0})};var d,D=R(()=>{d=(...o)=>console.log("[WPA-UI]",...o)});async function ct(o,{timeout:e=1e4,...t}={}){let r=new AbortController,n=setTimeout(()=>r.abort("timeout"),e);try{return await fetch(o,{signal:r.signal,...t})}catch(s){if(s.name==="AbortError"||s.message==="timeout"){let a=new Error(`Request timeout after ${e}ms`);throw a.name="TimeoutError",a.timeout=e,a}throw s}finally{clearTimeout(n)}}var dt=R(()=>{});function gt(o){O.setTurnstileToken(o),Ue=o,to=O.tokenExpiryTime}function eo(){return O.isTokenValid()}function oo(){return O.getCachedToken()}async function ke(o=!1){let e=await O.ensureToken(o);return Ue=e,to=O.tokenExpiryTime,cr=O.tokenGenerationInProgress,dr=O.currentGenerationPromise,e}function ue(){let o=O.getProtectionTokens();return Oe=o.pawtect,o.pawtect}function pe(){let o=O.getProtectionTokens();return de=o.fp,o.fp}async function ro(o=5e3){return await O.waitForPawtect(o)}var pt,O,Ue,Oe,de,ut,to,cr,dr,qe=R(()=>{D();pt=class{constructor(){this.turnstileToken=null,this.tokenExpiryTime=0,this.tokenGenerationInProgress=!1,this.currentGenerationPromise=null,this._resolveToken=null,this.tokenPromise=new Promise(e=>{this._resolveToken=e}),this.TOKEN_LIFETIME=24e4,this.MAX_RETRIES=10,this.INITIAL_TIMEOUT=15e3,this.RETRY_INTERVAL=15e3,this._turnstileWidgetId=null,this._turnstileContainer=null,this._turnstileOverlay=null,this._lastSitekey=null,this._cachedSitekey=null,this.turnstileLoaded=!1,this.widgetPool=[],this.poolQueue=[],this.poolSize=2,this.poolInitialized=!1,this.metrics={tokensGenerated:0,avgGenerationTime:0,failures:0,retries:0,poolHits:0,poolMisses:0,cacheHits:0,cacheMisses:0},this._pawtectToken=window.__WPA_PAWTECT_TOKEN__||null,this._fp=window.__WPA_FINGERPRINT__||null,this._fpCandidate=window.__WPA_FP_CANDIDATE__||null,this._pawtectResolve=null,this._pawtectPromise=new Promise(e=>{this._pawtectResolve=e})}setTurnstileToken(e){this._resolveToken&&(this._resolveToken(e),this._resolveToken=null),this.turnstileToken=e,this.tokenExpiryTime=Date.now()+this.TOKEN_LIFETIME,this.metrics.tokensGenerated++,d("\u2705 Turnstile token set successfully");try{typeof window!="undefined"&&typeof window.dispatchEvent=="function"&&typeof window.CustomEvent=="function"&&window.dispatchEvent(new window.CustomEvent("turnstile:token",{detail:{token:e,expiry:this.tokenExpiryTime}}))}catch{}}isTokenValid(){return this.turnstileToken&&Date.now()<this.tokenExpiryTime}getCachedToken(){return this.isTokenValid()?(this.metrics.cacheHits++,this.turnstileToken):(this.metrics.cacheMisses++,null)}invalidateToken(){this.turnstileToken=null,this.tokenExpiryTime=0,d("\u{1F5D1}\uFE0F Token invalidated, will force fresh generation")}async ensureToken(e=!1){let t=Date.now();if(this.isTokenValid()&&!e)return this.turnstileToken;if(e&&this.invalidateToken(),this.tokenGenerationInProgress&&this.currentGenerationPromise){d("\u{1F504} Token generation already in progress, waiting for existing promise...");try{let r=await this.currentGenerationPromise;return r&&r.length>20?r:this.isTokenValid()?this.turnstileToken:null}catch{}}return this.tokenGenerationInProgress=!0,this.currentGenerationPromise=(async()=>{try{d("\u{1F504} Token expired or missing, generating new one...");let r=await this.handleCaptcha();if(r&&r.length>20){this.setTurnstileToken(r);let s=Date.now()-t;return this.metrics.avgGenerationTime=(this.metrics.avgGenerationTime+s)/2,r}d("\u26A0\uFE0F Invisible Turnstile failed, forcing browser automation...");let n=await this.handleCaptchaFallback();if(n&&n.length>20){this.setTurnstileToken(n);let s=Date.now()-t;return this.metrics.avgGenerationTime=(this.metrics.avgGenerationTime+s)/2,n}return this.metrics.failures++,d("\u274C All token generation methods failed"),null}finally{this.tokenGenerationInProgress=!1,this.currentGenerationPromise=null}})(),this.currentGenerationPromise}async handleCaptcha(){let e=Date.now();try{let t=this.detectSitekey();d("\u{1F511} Generating Turnstile token for sitekey:",t),typeof window!="undefined"&&window.navigator&&d("\u{1F9ED} UA:",window.navigator.userAgent,"Platform:",window.navigator.platform);let r=await this.executeTurnstile(t,"paint");if(r&&r.length>20){let n=Math.round(Date.now()-e);return d(`\u2705 Turnstile token generated successfully in ${n}ms`),r}else throw new Error("Invalid or empty token received")}catch(t){let r=Math.round(Date.now()-e);throw d(`\u274C Turnstile token generation failed after ${r}ms:`,t),t}}async loadTurnstile(){return window.turnstile?(this.turnstileLoaded=!0,Promise.resolve()):new Promise((e,t)=>{if(document.querySelector('script[src^="https://challenges.cloudflare.com/turnstile/v0/api.js"]')){let n=()=>{window.turnstile?(this.turnstileLoaded=!0,e()):setTimeout(n,100)};return n()}let r=document.createElement("script");r.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",r.async=!0,r.defer=!0,r.onload=()=>{this.turnstileLoaded=!0,d("\u2705 Turnstile script loaded successfully"),e()},r.onerror=()=>{d("\u274C Failed to load Turnstile script"),t(new Error("Failed to load Turnstile"))},document.head.appendChild(r)})}ensureTurnstileContainer(){return(!this._turnstileContainer||!document.body.contains(this._turnstileContainer))&&(this._turnstileContainer&&this._turnstileContainer.remove(),this._turnstileContainer=document.createElement("div"),this._turnstileContainer.style.cssText=`
position: fixed !important;
left: -9999px !important;
top: -9999px !important;
width: 300px !important;
height: 65px !important;
pointer-events: none !important;
opacity: 0 !important;
z-index: -1 !important;
`,this._turnstileContainer.setAttribute("aria-hidden","true"),this._turnstileContainer.id="turnstile-widget-container",document.body.appendChild(this._turnstileContainer)),this._turnstileContainer}ensureTurnstileOverlayContainer(){if(this._turnstileOverlay&&document.body.contains(this._turnstileOverlay))return this._turnstileOverlay;let e=document.createElement("div");e.id="turnstile-overlay-container",e.style.cssText=`
position: fixed;
right: 16px;
bottom: 16px;
width: 320px;
min-height: 80px;
background: rgba(0,0,0,0.7);
border: 1px solid rgba(255,255,255,0.2);
border-radius: 10px;
padding: 12px;
z-index: 100000;
backdrop-filter: blur(6px);
color: #fff;
box-shadow: 0 8px 24px rgba(0,0,0,0.4);
`;let t=document.createElement("div");t.textContent="Cloudflare Turnstile \u2014 please complete the check if shown",t.style.cssText='font: 600 12px/1.3 "Segoe UI",sans-serif; margin-bottom: 8px; opacity: 0.9;';let r=document.createElement("div");r.id="turnstile-overlay-host",r.style.cssText="width: 100%; min-height: 70px;";let n=document.createElement("button");return n.textContent="Hide",n.style.cssText="position:absolute; top:6px; right:6px; font-size:11px; background:transparent; color:#fff; border:1px solid rgba(255,255,255,0.2); border-radius:6px; padding:2px 6px; cursor:pointer;",n.addEventListener("click",()=>e.remove()),e.appendChild(t),e.appendChild(r),e.appendChild(n),document.body.appendChild(e),this._turnstileOverlay=e,e}async executeTurnstile(e,t="paint"){var a,c,l,u;if(await this.loadTurnstile(),this._turnstileWidgetId&&this._lastSitekey===e&&((a=window.turnstile)!=null&&a.execute))try{d("\u{1F504} Attempting to reuse existing Turnstile widget..."),(c=window.turnstile)!=null&&c.reset&&window.turnstile.reset(this._turnstileWidgetId);let g=await Promise.race([window.turnstile.execute(this._turnstileWidgetId,{action:t}),new Promise((m,h)=>setTimeout(()=>h(new Error("Execute timeout")),15e3))]);if(g&&g.length>20)return this._lastSitekey=e,d("\u2705 Widget reuse successful, token length:",g.length),g}catch(g){if(d("\u{1F504} Widget reuse failed, will create a fresh widget:",g.message),this._turnstileWidgetId&&((l=window.turnstile)!=null&&l.remove)){try{window.turnstile.remove(this._turnstileWidgetId)}catch{}this._turnstileWidgetId=null}}let r=await this.createNewTurnstileWidgetInvisible(e,t);if(r&&r.length>20)return r;d("\u{1F440} Falling back to interactive Turnstile (visible).");try{this.showUserNotificationTopCenter("\u{1F504} Resolviendo CAPTCHA...","info")}catch{}let n=1,s=!1;for(;;){let g=n===1?this.INITIAL_TIMEOUT:this.RETRY_INTERVAL;d(`\u{1F504} Intento ${n} de resoluci\xF3n del CAPTCHA (timeout: ${g/1e3}s)...`),n>1&&!s?(this.showUserNotification(`\u{1F504} CAPTCHA: Reintentando autom\xE1ticamente cada 5 segundos (intento ${n})`,"info"),s=!0):n>2&&this.showUserNotification(`\u{1F504} CAPTCHA: Intento ${n} - Continuando autom\xE1ticamente`,"info");try{if(this._turnstileWidgetId&&((u=window.turnstile)!=null&&u.remove)){try{window.turnstile.remove(this._turnstileWidgetId)}catch{}this._turnstileWidgetId=null}let m=await this.createNewTurnstileWidgetInteractiveWithRetry(e,t,!0,g);if(m&&m.length>20)return d(`\u2705 CAPTCHA resuelto exitosamente en el intento ${n}`),n>1&&this.showUserNotification("\u2705 CAPTCHA resuelto exitosamente","success"),m;d(`\u26A0\uFE0F Intento ${n} fall\xF3, reintentando en 5 segundos...`),n>1&&this.showUserNotification(`\u26A0\uFE0F Intento ${n} fall\xF3, reintentando en 5 segundos...`,"info"),await this.sleep(5e3)}catch(m){d(`\u274C Error en intento ${n}:`,m.message),n>1&&this.showUserNotification(`\u274C Error en intento ${n}, reintentando en 5 segundos`,"error"),await this.sleep(5e3)}n++,this.metrics.retries++}}async createNewTurnstileWidgetInvisible(e,t){return new Promise(r=>{var n;try{this._turnstileWidgetId&&((n=window.turnstile)!=null&&n.remove)&&window.turnstile.remove(this._turnstileWidgetId);let s=this.ensureTurnstileContainer();s.innerHTML="",this._turnstileWidgetId=window.turnstile.render(s,{sitekey:e,action:t,size:"compact",theme:"light",callback:a=>{this._lastSitekey=e,d("\u{1F3AF} Compact Turnstile callback success, token length:",a==null?void 0:a.length),r(a)},"error-callback":()=>{d("\u274C Compact Turnstile error callback"),r(null)},"timeout-callback":()=>{d("\u23F0 Compact Turnstile timeout callback"),r(null)},"expired-callback":()=>{d("\u{1F480} Compact Turnstile expired callback"),r(null)}}),setTimeout(()=>r(null),1e4)}catch(s){d("\u274C Error creating compact Turnstile widget:",s),r(null)}})}async createNewTurnstileWidgetInteractiveWithRetry(e,t,r=!0,n=3e4){return new Promise((s,a)=>{var c;try{this._turnstileWidgetId&&((c=window.turnstile)!=null&&c.remove)&&window.turnstile.remove(this._turnstileWidgetId);let l=this.ensureTurnstileOverlayContainer(),u=l.querySelector("#turnstile-overlay-host");u.innerHTML="",l.style.display="block",l.classList.remove("wplace-overlay-hidden"),this._turnstileWidgetId=window.turnstile.render(u,{sitekey:e,action:t,theme:"auto",callback:g=>{this._lastSitekey=e,d("\u{1F3AF} Interactive Turnstile callback success, token length:",g==null?void 0:g.length),l.style.display="none",s(g)},"error-callback":()=>{d("\u274C Interactive Turnstile error callback"),l.style.display="none",s(null)},"timeout-callback":()=>{d("\u23F0 Interactive Turnstile timeout callback"),l.style.display="none",s(null)},"expired-callback":()=>{d("\u{1F480} Interactive Turnstile expired callback"),l.style.display="none",s(null)}}),setTimeout(()=>{l.style.display="none",s(null)},n)}catch(l){d("\u274C Error creating interactive Turnstile widget:",l),s(null)}})}detectSitekey(e="0x4AAAAAABpqJe8FO0N84q0F"){var t;if(this._cachedSitekey)return this._cachedSitekey;try{let r=document.querySelector("[data-sitekey]");if(r){let a=r.dataset.sitekey||r.getAttribute("data-sitekey");if(a&&a.length>10)return d("\u{1F50D} Sitekey found in data attribute:",a),this._cachedSitekey=a,a}let n=document.querySelector(".cf-turnstile");if((t=n==null?void 0:n.dataset)!=null&&t.sitekey&&n.dataset.sitekey.length>10)return d("\u{1F50D} Sitekey found in turnstile element:",n.dataset.sitekey),this._cachedSitekey=n.dataset.sitekey,n.dataset.sitekey;if(typeof window!="undefined"&&window.__TURNSTILE_SITEKEY&&window.__TURNSTILE_SITEKEY.length>10)return d("\u{1F50D} Sitekey found in global variable:",window.__TURNSTILE_SITEKEY),this._cachedSitekey=window.__TURNSTILE_SITEKEY,window.__TURNSTILE_SITEKEY;let s=document.querySelectorAll("script");for(let a of s){let l=(a.textContent||a.innerHTML).match(/['"](0x4[A-Za-z0-9_-]{20,})['"]/);if(l&&l[1])return d("\u{1F50D} Sitekey found in script:",l[1]),this._cachedSitekey=l[1],l[1]}}catch(r){d("Error detecting sitekey:",r)}return d("\u{1F50D} Using fallback sitekey:",e),this._cachedSitekey=e,e}async handleCaptchaFallback(){return new Promise((e,t)=>{(async()=>{try{d("\u{1F504} Starting fallback automation flow..."),d("\u26A0\uFE0F Fallback automation not implemented in enhanced version"),e(null)}catch(n){d("\u274C Fallback automation failed:",n),e(null)}})()})}sleep(e){return new Promise(t=>setTimeout(t,e))}showUserNotification(e,t="info"){this.showUserNotificationTopCenter(e,t)}showUserNotificationTopCenter(e,t="info",r=3e3){let n=document.getElementById("wplace-toast-container");n||(n=document.createElement("div"),n.id="wplace-toast-container",n.style.cssText=`
position: fixed;
top: 16px;
left: 50%;
transform: translateX(-50%);
z-index: 2147483647;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: none;
`,document.body.appendChild(n));let s=t==="success"?"#10b981":t==="error"?"#ef4444":"#3b82f6",a=document.createElement("div");a.className="wplace-toast",a.textContent=e,a.style.cssText=`
min-width: 240px;
max-width: 80vw;
margin: 0 auto;
background: ${s};
color: white;
border-radius: 10px;
box-shadow: 0 8px 24px rgba(0,0,0,0.35);
padding: 10px 14px;
font-weight: 600;
letter-spacing: .2px;
transform: translateY(-10px) scale(0.98);
opacity: 0;
transition: transform .25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity .25s ease;
pointer-events: auto;
`,n.appendChild(a),(u=>typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame(u):setTimeout(u,16))(()=>{a.style.transform="translateY(0) scale(1)",a.style.opacity="1"});let l=()=>{a.style.transform="translateY(-10px) scale(0.98)",a.style.opacity="0",setTimeout(()=>a.remove(),250)};r>0&&setTimeout(l,r),a.addEventListener("click",l)}getProtectionTokens(){return this._pawtectToken=window.__WPA_PAWTECT_TOKEN__||this._pawtectToken,this._fp=window.__WPA_FINGERPRINT__||this._fp,this._fpCandidate=window.__WPA_FP_CANDIDATE__||this._fpCandidate,{pawtect:this._pawtectToken,fp:this._fp,fpCandidate:this._fpCandidate}}async waitForPawtect(e=5e3){if(this._pawtectToken&&this._fp)return{pawtect:this._pawtectToken,fp:this._fp};let t=setTimeout(()=>{this._pawtectResolve&&this._pawtectResolve({pawtect:this._pawtectToken,fp:this._fp})},e),r=await this._pawtectPromise.catch(()=>({pawtect:this._pawtectToken,fp:this._fp}));return clearTimeout(t),this._pawtectResolve||(this._pawtectPromise=new Promise(n=>{this._pawtectResolve=n})),r}getMetrics(){let e=this.metrics.cacheHits/Math.max(1,this.metrics.cacheHits+this.metrics.cacheMisses),t=this.metrics.poolHits/Math.max(1,this.metrics.poolHits+this.metrics.poolMisses);return{...this.metrics,cacheHitRate:e,poolHitRate:t,failureRate:this.metrics.failures/Math.max(1,this.metrics.tokensGenerated+this.metrics.failures)}}},O=new pt,Ue=null,Oe=null,de=null,ut=null,to=0,cr=!1,dr=null;window.__WPA_SET_TURNSTILE_TOKEN__=function(o){o&&typeof o=="string"&&o.length>20&&(d("\u2705 Turnstile Token Captured:",o),gt(o))};window.addEventListener("message",o=>{var t;let e=o==null?void 0:o.data;if(e){if(e.source==="turnstile-capture"&&e.token){(!eo()||Ue!==e.token)&>(e.token);return}if(e.__wplace===!0&&e.type==="token_found"){e.token&&(!eo()||Ue!==e.token)&>(e.token),e.xpaw&&(!Oe||Oe!==e.xpaw)&&(Oe=e.xpaw,window.__WPA_PAWTECT_TOKEN__=e.xpaw,O._pawtectToken=e.xpaw,d("[turnstile] pawtect token updated:",e.xpaw.substring(0,20)+"...")),e.fp&&(!de||de!==e.fp)&&(de=e.fp,window.__WPA_FINGERPRINT__=e.fp,O._fp=e.fp,d("[turnstile] fingerprint updated:",e.fp.substring(0,20)+"..."));return}try{let r=typeof e=="object"&&typeof e.fp=="string"&&e.fp.length>10?e.fp:null;r&&(!de||de!==r)&&(de=r,window.__WPA_FINGERPRINT__=r,O._fp=r,d("[turnstile] fingerprint from message:",r.substring(0,20)+"..."))}catch{}try{let r=typeof e=="object"&&(e.pi||(t=e.payload)!=null&&t.pi)?e.pi||e.payload.pi:null;if(r&&typeof r=="object"&&(r.xp||r.pfp||r.ffp)){let n=JSON.stringify(r);(!ut||ut!==n)&&(ut=n,window.__WPA_FP_CANDIDATE__=n,O._fpCandidate=n,d("[turnstile] fp candidate from pi:",n.substring(0,50)+"..."))}}catch{}}})});function ur(){try{let o=document.createElement("canvas"),e=o.getContext("2d");return e?(o.width=200,o.height=40,e.textBaseline="top",e.font='14px "Arial"',e.fillStyle="#f60",e.fillRect(0,0,200,40),e.fillStyle="#069",e.fillText("wplace-fp-canvas",2,2),e.strokeStyle="#ff0",e.beginPath(),e.arc(100,20,18,0,Math.PI*2),e.stroke(),o.toDataURL().slice(0,64)):"nocanvas"}catch{return"nocanvas"}}function pr(){try{let o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");if(!e)return"nowebgl";let t=e.getExtension("WEBGL_debug_renderer_info"),r=t?e.getParameter(t.UNMASKED_VENDOR_WEBGL):e.getParameter(e.VENDOR),n=t?e.getParameter(t.UNMASKED_RENDERER_WEBGL):e.getParameter(e.RENDERER);return r+"|"+n}catch{return"nowebgl"}}function gr(o){let e=2166136261;for(let t=0;t<o.length;t++)e^=o.charCodeAt(t),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return("00000000"+e.toString(16)).slice(-8)}async function mr(o){var e;if(typeof window!="undefined"&&((e=window.crypto)!=null&&e.subtle))try{let t=typeof window!="undefined"&&window.TextEncoder?window.TextEncoder:null,r=t?new t().encode(o):new Uint8Array([...unescape(encodeURIComponent(o))].map(s=>s.charCodeAt(0))),n=await window.crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}catch{}return gr(o)}function hr(){let o=typeof window!="undefined"&&window.navigator?window.navigator:{},e=typeof window!="undefined"&&window.screen?window.screen:{},t=typeof Intl!="undefined"&&Intl.DateTimeFormat&&Intl.DateTimeFormat().resolvedOptions().timeZone||"";return{ua:o.userAgent||"",plat:o.platform||"",lang:(o.languages||[]).join(",")||o.language||"",cores:o.hardwareConcurrency||0,mem:o.deviceMemory||0,width:e.width||0,height:e.height||0,depth:e.colorDepth||0,tz:t,canvas:ur(),webgl:pr()}}async function Ge({force:o=!1}={}){return Ce&&!o?Ce:Le||(Le=(async()=>{try{let e=hr(),t=Object.keys(e).sort().map(n=>n+":"+e[n]).join("|");Ce="fp:"+(await mr(t)).slice(0,64);try{window.__WPA_FINGERPRINT__=Ce}catch{}return d("[fp] generado len="+Ce.length),Ce}finally{Le=null}})(),Le)}var Ce,Le,mt=R(()=>{D();Ce=null,Le=null});async function no(o,e={}){return await ft.computePawtect(o,e)}async function ao(){return await ft.seedPawtect()}var ht,ft,xt=R(()=>{D();ht=class{constructor(){this._wasmMod=null,this._wasm=null,this._chunkUrl=null,this._initUser=!1,this._busy=!1,this._cache=new Map,this.CACHE_TTL=12e4,this._cacheCleanupInterval=null,this.MAX_RETRIES=3,this.RETRY_DELAY_BASE=1e3,this.CHUNK_DISCOVERY_TIMEOUT=1e4,this.WASM_LOAD_TIMEOUT=15e3,this.metrics={computations:0,cacheHits:0,cacheMisses:0,errors:0,retries:0,avgComputeTime:0,wasmLoadTime:0,chunkDiscoveryTime:0},this.errorHistory=[],this.MAX_ERROR_HISTORY=50,this._initializeCacheCleanup(),d("[pawtect] Enhanced PawtectManager initialized")}_initializeCacheCleanup(){typeof window!="undefined"&&typeof window.setInterval=="function"&&(this._cacheCleanupInterval=window.setInterval(()=>{this._cleanupExpiredCache()},6e4))}_cleanupExpiredCache(){let e=Date.now(),t=0;for(let[r,n]of this._cache.entries())e-n.ts>this.CACHE_TTL&&(this._cache.delete(r),t++);t>0&&d(`[pawtect] Cleaned ${t} expired cache entries`)}_validateAndNormalizeInput(e){if(!e||typeof e!="object")throw new Error("Invalid bodyObj: must be a non-null object");try{return JSON.stringify(e,Object.keys(e).sort())}catch(t){throw d("[pawtect] Error serializing bodyObj:",t),new Error("Failed to serialize bodyObj to JSON")}}async _discoverChunkAdvanced(){if(this._chunkUrl)return this._chunkUrl;let e=Date.now();try{if(typeof document=="undefined")return null;let t=[()=>this._discoverFromScriptTags(),()=>this._discoverFromLinks(),()=>this._discoverFromPerformanceAPI()];for(let r of t)try{let n=await Promise.race([r(),new Promise((s,a)=>setTimeout(()=>a(new Error("Strategy timeout")),3e3))]);if(n)return this._chunkUrl=n,this.metrics.chunkDiscoveryTime=Date.now()-e,d("[pawtect] chunk encontrado con estrategia avanzada:",n),n}catch(n){d("[pawtect] strategy failed:",n.message)}}catch(t){d("[pawtect] chunk discovery failed:",t)}return this.metrics.chunkDiscoveryTime=Date.now()-e,null}async _discoverFromScriptTags(){var t;let e=new Set;try{(t=document.querySelectorAll("script[src]"))==null||t.forEach(r=>{try{typeof window!="undefined"&&window.URL&&window.location&&e.add(new window.URL(r.src,window.location.href).href)}catch{}})}catch{}return this._testUrlCandidates([...e])}async _discoverFromLinks(){var t;let e=new Set;try{(t=document.querySelectorAll('link[rel="modulepreload"][href],link[as="script"][href]'))==null||t.forEach(r=>{try{typeof window!="undefined"&&window.URL&&window.location&&e.add(new window.URL(r.href,window.location.href).href)}catch{}})}catch{}return this._testUrlCandidates([...e])}async _discoverFromPerformanceAPI(){let e=new Set;try{typeof window!="undefined"&&window.performance&&(window.performance.getEntriesByType("resource")||[]).forEach(t=>{t!=null&&t.name&&e.add(t.name)})}catch{}return this._testUrlCandidates([...e])}async _testUrlCandidates(e){let t=e.filter(r=>/\/(_app|assets)\/immutable\/chunks\/.*\.js/i.test(r));for(let r of t)try{let s=await(await Promise.race([fetch(r,{credentials:"omit"}),new Promise((a,c)=>setTimeout(()=>c(new Error("Fetch timeout")),5e3))])).text();if(/get_pawtected_endpoint_payload|pawtect/i.test(s))return r}catch(n){d("[pawtect] failed to test candidate:",r,n.message)}return null}async _loadWasmEnhanced(){if(this._wasm)return this._wasm;let e=Date.now();try{let t=await Promise.race([this._discoverChunkAdvanced(),new Promise((n,s)=>setTimeout(()=>s(new Error("Chunk discovery timeout")),this.CHUNK_DISCOVERY_TIMEOUT))]);if(!t)return d("[pawtect] no se encontr\xF3 chunk despu\xE9s de b\xFAsqueda avanzada"),null;let r=await Promise.race([import(t),new Promise((n,s)=>setTimeout(()=>s(new Error("WASM import timeout")),this.WASM_LOAD_TIMEOUT))]);if(typeof r._=="function")return this._wasmMod=r,this._wasm=await r._(),this.metrics.wasmLoadTime=Date.now()-e,d("[pawtect] wasm cargado exitosamente en",this.metrics.wasmLoadTime,"ms"),this._wasm;throw new Error("WASM module does not have expected interface")}catch(t){return this.metrics.wasmLoadTime=Date.now()-e,this._recordError("WASM load failed",t),d("[pawtect] error cargando wasm:",t.message),null}}_maybeInitUser(e){if(!(!this._wasmMod||this._initUser))try{if(e!=null&&e.id)if(typeof this._wasmMod.i=="function")this._wasmMod.i(e.id),this._initUser=!0,d("[pawtect] user initialized with function:",e.id);else if(typeof this._wasmMod.i=="object"&&this._wasmMod.i.constructor)try{new this._wasmMod.i(e.id),this._initUser=!0,d("[pawtect] user initialized with class:",e.id)}catch(t){d("[pawtect] class instantiation failed, trying alternative methods:",t.message),this._tryAlternativeUserInit(e)}else d("[pawtect] user initialization skipped - no valid method found")}catch(t){d("[pawtect] user initialization failed:",t.message)}}_tryAlternativeUserInit(e){try{this._wasmMod.initUser&&typeof this._wasmMod.initUser=="function"?(this._wasmMod.initUser(e.id),this._initUser=!0,d("[pawtect] user initialized with initUser:",e.id)):this._wasmMod.init&&typeof this._wasmMod.init=="function"?(this._wasmMod.init(e.id),this._initUser=!0,d("[pawtect] user initialized with init:",e.id)):(this._initUser=!0,d("[pawtect] user initialization skipped - marking as done to avoid retries"))}catch(t){this._initUser=!0,d("[pawtect] alternative user initialization failed:",t.message)}}async _getUserWithRetry(){for(let e=0;e<3;e++)try{let t=await Promise.race([fetch("https://backend.wplace.live/me",{credentials:"include"}),new Promise((r,n)=>setTimeout(()=>n(new Error("User fetch timeout")),5e3))]);if(t.ok)return await t.json()}catch(t){d(`[pawtect] user fetch attempt ${e+1} failed:`,t.message),e<2&&await new Promise(r=>setTimeout(r,1e3*(e+1)))}return null}_recordError(e,t){let r={timestamp:Date.now(),context:e,message:t.message,stack:t.stack};this.errorHistory.push(r),this.errorHistory.length>this.MAX_ERROR_HISTORY&&this.errorHistory.shift(),this.metrics.errors++}async computePawtect(e,{force:t=!1}={}){var n;let r=Date.now();try{let s=this._validateAndNormalizeInput(e),a=s,c=Date.now();if(!t&&this._cache.has(a)){let l=this._cache.get(a);if(c-l.ts<this.CACHE_TTL)return this.metrics.cacheHits++,d("[pawtect] cache hit, token length:",((n=l.token)==null?void 0:n.length)||0),l.token;this._cache.delete(a)}if(this.metrics.cacheMisses++,this._busy&&(await new Promise(l=>setTimeout(l,150+Math.random()*100)),!t&&this._cache.has(a))){let l=this._cache.get(a);if(c-l.ts<this.CACHE_TTL)return this.metrics.cacheHits++,l.token}return await this._computeWithRetry(s,a,r)}catch(s){this._recordError("computePawtect",s);let a=Date.now()-r;return d("[pawtect] computation failed after",a,"ms:",s.message),null}}async _computeWithRetry(e,t,r){let n=null;for(let s=0;s<this.MAX_RETRIES;s++){this._busy=!0;try{let a=await this._performComputation(e);if(a){this._cache.set(t,{token:a,ts:Date.now()});try{window.__WPA_PAWTECT_TOKEN__=a}catch{}this.metrics.computations++;let c=Date.now()-r;return this.metrics.avgComputeTime=(this.metrics.avgComputeTime*(this.metrics.computations-1)+c)/this.metrics.computations,d("[pawtect] token calculado exitosamente, len=",a.length,"duration=",c,"ms"),a}throw new Error("No token generated from WASM")}catch(a){if(n=a,this.metrics.retries++,d(`[pawtect] attempt ${s+1} failed:`,a.message),s<this.MAX_RETRIES-1){let c=this.RETRY_DELAY_BASE*Math.pow(2,s);d(`[pawtect] retrying in ${c}ms...`),await new Promise(l=>setTimeout(l,c))}}finally{this._busy=!1}}return this._recordError("All computation attempts failed",n),null}async _performComputation(e){let t=await this._loadWasmEnhanced();if(!t||typeof t.get_pawtected_endpoint_payload!="function")throw new Error("WASM not available or missing function");if(!this._initUser){let l=await this._getUserWithRetry();this._maybeInitUser(l)}let r=typeof window!="undefined"&&window.TextEncoder?new window.TextEncoder:{encode:l=>new Uint8Array([...unescape(encodeURIComponent(l))].map(u=>u.charCodeAt(0)))},n=typeof window!="undefined"&&window.TextDecoder?new window.TextDecoder:{decode:l=>decodeURIComponent(escape(String.fromCharCode(...l)))},s=l=>{if(!l)return null;if(typeof l=="string")return l;if(Array.isArray(l)&&l.length>=2){let[u,g]=l,m=new Uint8Array(t.memory.buffer,u,g),h=n.decode(m);try{t.__wbindgen_free&&(t.__wbindgen_free.length>=2?t.__wbindgen_free(u,g):t.__wbindgen_free(u))}catch{}return h}if(typeof l=="object"&&typeof l.ptr=="number"&&typeof l.len=="number"){let u=new Uint8Array(t.memory.buffer,l.ptr,l.len),g=n.decode(u);try{t.__wbindgen_free&&(t.__wbindgen_free.length>=2?t.__wbindgen_free(l.ptr,l.len):t.__wbindgen_free(l.ptr))}catch{}return g}return null};try{let l=t.get_pawtected_endpoint_payload(e),u=s(l);if(u&&typeof u=="string"&&u.length>0)return u}catch{}let a=r.encode(e),c=null;try{if(typeof t.__wbindgen_malloc=="function")try{c=t.__wbindgen_malloc(a.length)}catch{c=t.__wbindgen_malloc(a.length,1)}if(!c||typeof c!="number"||c<=0)throw new Error("Failed to allocate WASM memory");let l=c+a.length;if(l>t.memory.buffer.byteLength&&typeof t.memory.grow=="function"){let h=l-t.memory.buffer.byteLength,p=Math.ceil(h/65536);if(p>0)try{t.memory.grow(p)}catch{}}new Uint8Array(t.memory.buffer,c,a.length).set(a);let u=t.get_pawtected_endpoint_payload(c,a.length);return s(u)}catch(l){throw new Error(`WASM computation failed: ${l.message}`)}finally{if(c)try{typeof t.__wbindgen_free=="function"&&(t.__wbindgen_free.length>=2?t.__wbindgen_free(c,a.length):t.__wbindgen_free(c))}catch{}}}async seedPawtect(){try{d("[pawtect] seeding computation..."),await this.computePawtect({colors:[0],coords:[1,1],t:"seed",fp:"seed"},{force:!0}),d("[pawtect] seed computation completed")}catch(e){d("[pawtect] seed computation failed:",e)}}getMetrics(){let e=this._cache.size,t=this.metrics.cacheHits/Math.max(1,this.metrics.cacheHits+this.metrics.cacheMisses),r=this.metrics.errors/Math.max(1,this.metrics.computations+this.metrics.errors);return{...this.metrics,cacheSize:e,cacheHitRate:t,errorRate:r,recentErrors:this.errorHistory.slice(-5)}}clearCache(){let e=this._cache.size;this._cache.clear(),d(`[pawtect] cache cleared, removed ${e} entries`)}cleanup(){this._cacheCleanupInterval&&typeof window!="undefined"&&typeof window.clearInterval=="function"&&(window.clearInterval(this._cacheCleanupInterval),this._cacheCleanupInterval=null),this._cache.clear(),this._wasm=null,this._wasmMod=null,this._chunkUrl=null,d("[pawtect] cleanup completed")}},ft=new ht;typeof window!="undefined"&&typeof window.setTimeout=="function"&&window.setTimeout(()=>{ft.seedPawtect()},1e3)});async function Ye(o){if(!o)return{ok:!1,status:0,json:{},text:"",parseError:"no-response"};let e=o.status,t="";try{t=await o.text()}catch(r){return{ok:o.ok,status:e,json:{},text:"",parseError:r.message}}if(!t)return{ok:o.ok,status:e,json:{},text:""};try{let r=JSON.parse(t);return{ok:o.ok,status:e,json:r,text:t}}catch(r){return{ok:o.ok,status:e,json:{},text:t,parseError:r.message}}}var io=R(()=>{});async function Re(){var o,e,t,r;try{let n=await fetch(`${je}/me`,{credentials:"include"}).then(u=>u.json()),s=n||null,a=(n==null?void 0:n.charges)||{},c=(o=n==null?void 0:n.droplets)!=null?o:0,l={count:(e=a.count)!=null?e:0,max:(t=a.max)!=null?t:0,cooldownMs:(r=a.cooldownMs)!=null?r:3e4};return{success:!0,data:{user:s,charges:l.count,maxCharges:l.max,chargeRegen:l.cooldownMs,droplets:c}}}catch(n){return{success:!1,error:n.message,data:{user:null,charges:0,maxCharges:0,chargeRegen:3e4,droplets:0}}}}async function so(o,e,t,r,n){var s,a,c;try{let l=y=>{if(!Array.isArray(y))return[];let S=[];if(y.length>0&&typeof y[0]=="number"){for(let b=0;b<y.length;b+=2){let E=Math.trunc(y[b]),T=Math.trunc(y[b+1]);Number.isFinite(E)&&Number.isFinite(T)&&S.push((E%1e3+1e3)%1e3,(T%1e3+1e3)%1e3)}return S}if(typeof y[0]=="object"&&y[0]&&("x"in y[0]||"y"in y[0])){for(let b of y){let E=Math.trunc(b==null?void 0:b.x),T=Math.trunc(b==null?void 0:b.y);Number.isFinite(E)&&Number.isFinite(T)&&S.push((E%1e3+1e3)%1e3,(T%1e3+1e3)%1e3)}return S}if(Array.isArray(y[0])){for(let b of y){let E=Math.trunc(b==null?void 0:b[0]),T=Math.trunc(b==null?void 0:b[1]);Number.isFinite(E)&&Number.isFinite(T)&&S.push((E%1e3+1e3)%1e3,(T%1e3+1e3)%1e3)}return S}return S},u=y=>Array.isArray(y)?y.map(S=>Math.trunc(Number(S))||0):[],g=l(t),m=u(r);if(g.length===0||m.length===0||g.length/2!==m.length)return d(`[API] Invalid coords/colors for tile ${o},${e} \u2192 coordsPairs=${g.length/2} colors=${m.length}`),{status:400,json:{error:"Invalid coords/colors format"},success:!1,painted:0};let h=pe();if(!h)try{h=await Ge({})}catch{}let p=null;try{let y={colors:r,coords:t,t:n||"seed",...h?{fp:h}:{fp:"seed"}},S=await no(y);S?p=S:p=ue()}catch{p=ue()}if(!h){try{await ro(1200)}catch{}h=pe()}let x=JSON.stringify({colors:m,coords:g,t:n,...h?{fp:h}:{}}),f="";try{let y=2166136261;for(let S=0;S<x.length;S++)y^=x.charCodeAt(S),y=Math.imul(y,16777619);f=("00000000"+(y>>>0).toString(16)).slice(-8)}catch{}d(`[API] Sending batch to tile ${o},${e} with ${r.length} pixels, token: ${n?n.substring(0,50)+"...":"null"}`),d(`[API] postPixelBatchImage include: pawtect=${!!p} fp=${!!h} bodyHash=${f}`);let w=await fetch(`${je}/s0/pixel/${o}/${e}`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8",...p?{"x-pawtect-token":p}:{}},body:x});if(d(`[API] Response: ${w.status} ${w.statusText}`),w.status===403){try{await w.json()}catch{}console.error("\u274C 403 Forbidden. Turnstile token might be invalid or expired.");try{console.log("\u{1F504} Regenerating Turnstile token after 403...");let y=await ke(!0);if(p=ue(),h=pe(),!y)return{status:403,json:{error:"Could not generate new token"},success:!1,painted:0};let S=JSON.stringify({colors:m,coords:g,t:y,...h?{fp:h}:{}});d(`[API] Retrying with fresh token: ${y.substring(0,50)}...`);let b=await fetch(`${je}/s0/pixel/${o}/${e}`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8",...p?{"x-pawtect-token":p}:{}},body:S});if(d(`[API] Retry response: ${b.status} ${b.statusText}`),b.status===403)return{status:403,json:{error:"Fresh token still expired or invalid after retry"},success:!1,painted:0};let E=await Ye(b),T=((s=E.json)==null?void 0:s.painted)||0;return d(`[API] Retry result: ${T} pixels painted`),{status:b.status,json:E.json,success:b.ok,painted:T}}catch(y){return console.error("\u274C Token regeneration failed:",y),{status:403,json:{error:"Token regeneration failed: "+y.message},success:!1,painted:0}}}if(w.status>=500&&w.status<=504)try{let y=await ke(!0);p=ue(),h=pe();let S=JSON.stringify({colors:m,coords:g,t:y,...h?{fp:h}:{}});d(`[API] Retrying after ${w.status} with fresh token: ${y.substring(0,50)}...`);let b=await fetch(`${je}/s0/pixel/${o}/${e}`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8",...p?{"x-pawtect-token":p}:{}},body:S}),E=await Ye(b),T=((a=E.json)==null?void 0:a.painted)||0;return d(`[API] Retry after ${w.status}: ${T} pixels painted`),{status:b.status,json:E.json,success:b.ok,painted:T}}catch{}let C=await Ye(w),P=((c=C.json)==null?void 0:c.painted)||0;return d(`[API] Success: ${P} pixels painted`),{status:w.status,json:C.json,success:w.ok,painted:P}}catch(l){return l.name==="AbortError"||l.name==="TimeoutError"?(d(`[API] Request timeout for tile ${o},${e}`),{status:408,json:{error:"Request timeout"},success:!1,painted:0}):(d(`[API] Network error: ${l.message}`),{status:0,json:{error:l.message},success:!1,painted:0})}}var je,Ve=R(()=>{dt();qe();mt();xt();D();io();je="https://backend.wplace.live"});var I,i,re=R(()=>{I={SITEKEY:"0x4AAAAAABpqJe8FO0N84q0F",COOLDOWN_DEFAULT:31e3,TILE_SIZE:1e3,CHECK_INTERVAL:1e4,MAX_PROTECTION_SIZE:1/0,PIXELS_PER_BATCH:10,MAX_PIXELS_PER_BATCH:9999,MIN_CHARGES_TO_WAIT:20,BACKEND_URL:"https://backend.wplace.live",PROTECTION_PATTERN:"random"},i={running:!1,initialized:!1,protectionArea:null,originalPixels:new Map,changes:new Map,currentCharges:0,maxCharges:50,lastCheck:0,checkInterval:null,availableColors:[],colorsChecked:!1,ui:null,totalRepaired:0,pixelsPerBatch:I.PIXELS_PER_BATCH,minChargesToWait:I.MIN_CHARGES_TO_WAIT,protectionPattern:I.PROTECTION_PATTERN,operationMode:"protect",preferColor:!1,preferredColorId:null,preferredColorIds:[],excludeColor:!1,excludedColorIds:[],spendAllPixelsOnStart:!1,randomWaitTime:!1,randomWaitMin:5,randomWaitMax:15,watchMode:!1,protectTransparentPixels:!0,protectPerimeter:!1,perimeterWidth:1,config:{colorComparisonMethod:"lab",colorThreshold:10}}});var ne,yt=R(()=>{ne=o=>new Promise(e=>setTimeout(e,o))});function fr(o,e){let t=Array.from(o),r=[],n=[...t];for(let s=0;s<Math.min(e,n.length);s++){let a=Math.floor(Math.random()*n.length);r.push(n.splice(a,1)[0])}return r}function xr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=new Map;t.forEach(a=>{let[c,l]=a.split(",").map(Number);r.has(l)||r.set(l,[]),r.get(l).push(a)});let n=[],s=Array.from(r.keys()).sort((a,c)=>a-c);for(let a of s){if(n.length>=e)break;let c=r.get(a).sort((l,u)=>{let[g]=l.split(",").map(Number),[m]=u.split(",").map(Number);return g-m});for(let l of c){if(n.length>=e)break;n.push(l)}}return n.slice(0,e)}function yr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=new Map;t.forEach(a=>{let[c,l]=a.split(",").map(Number);r.has(l)||r.set(l,[]),r.get(l).push(a)});let n=[],s=Array.from(r.keys()).sort((a,c)=>c-a);for(let a of s){if(n.length>=e)break;let c=r.get(a).sort((l,u)=>{let[g]=l.split(",").map(Number),[m]=u.split(",").map(Number);return g-m});for(let l of c){if(n.length>=e)break;n.push(l)}}return n.slice(0,e)}function wr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=new Map;t.forEach(a=>{let[c,l]=a.split(",").map(Number);r.has(c)||r.set(c,[]),r.get(c).push(a)});let n=[],s=Array.from(r.keys()).sort((a,c)=>a-c);for(let a of s){if(n.length>=e)break;let c=r.get(a).sort((l,u)=>{let[,g]=l.split(",").map(Number),[,m]=u.split(",").map(Number);return g-m});for(let l of c){if(n.length>=e)break;n.push(l)}}return n.slice(0,e)}function br(o,e){let t=Array.from(o);if(t.length===0)return[];let r=new Map;t.forEach(a=>{let[c,l]=a.split(",").map(Number);r.has(c)||r.set(c,[]),r.get(c).push(a)});let n=[],s=Array.from(r.keys()).sort((a,c)=>c-a);for(let a of s){if(n.length>=e)break;let c=r.get(a).sort((l,u)=>{let[,g]=l.split(",").map(Number),[,m]=u.split(",").map(Number);return g-m});for(let l of c){if(n.length>=e)break;n.push(l)}}return n.slice(0,e)}function Cr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;t.forEach(g=>{let[m,h]=g.split(",").map(Number);r=Math.min(r,m),n=Math.max(n,m),s=Math.min(s,h),a=Math.max(a,h)});let c=new Map;t.forEach(g=>{let[m,h]=g.split(",").map(Number),p=m-r,x=n-m,f=h-s,w=a-h,C=Math.min(p,x,f,w);c.has(C)||c.set(C,[]),c.get(C).push(g)});let l=[],u=Array.from(c.keys()).sort((g,m)=>g-m);for(let g of u){if(l.length>=e)break;let m=c.get(g);for(let h of m){if(l.length>=e)break;l.push(h)}}return l.slice(0,e)}function vr(o,e){var g;let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;t.forEach(m=>{let[h,p]=m.split(",").map(Number);r=Math.min(r,h),n=Math.max(n,h),s=Math.min(s,p),a=Math.max(a,p)});let c,l;(g=i)!=null&&g.protectionArea&&typeof i.protectionArea.x1=="number"&&typeof i.protectionArea.x2=="number"&&typeof i.protectionArea.y1=="number"&&typeof i.protectionArea.y2=="number"?(c=(i.protectionArea.x1+i.protectionArea.x2)/2,l=(i.protectionArea.y1+i.protectionArea.y2)/2):(c=(r+n)/2,l=(s+a)/2);let u=t.map(m=>{let[h,p]=m.split(",").map(Number),x=Math.sqrt(Math.pow(h-c,2)+Math.pow(p-l,2));return{coord:m,distance:x}});return u.sort((m,h)=>m.distance-h.distance),u.slice(0,e).map(m=>m.coord)}function Pr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;t.forEach(y=>{let[S,b]=y.split(",").map(Number);r=Math.min(r,S),n=Math.max(n,S),s=Math.min(s,b),a=Math.max(a,b)});let c=Math.round((r+n)/2),l=Math.round((s+a)/2),u=new Set(t),g=[],m=c,h=l,p=0,x=-1,f=1,w=0,C=0,P=`${c},${l}`;for(u.has(P)&&(g.push(P),u.delete(P));g.length<e&&u.size>0;){m+=p,h+=x;let y=`${m},${h}`;if(u.has(y)&&(g.push(y),u.delete(y)),w++,w===f&&(w=0,p===0&&x===-1?(p=1,x=0):p===1&&x===0?(p=0,x=1):p===0&&x===1?(p=-1,x=0):p===-1&&x===0&&(p=0,x=-1),C=(C+1)%4,C%2===0&&f++),Math.abs(m-c)>100||Math.abs(h-l)>100)break}if(g.length<e&&u.size>0){let y=Array.from(u),S=Math.min(e-g.length,y.length);for(let b=0;b<S;b++){let E=Math.floor(Math.random()*y.length);g.push(y.splice(E,1)[0])}}return g.slice(0,e)}function Sr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=new Map;t.forEach(c=>{let[l,u]=c.split(",").map(Number);r.has(u)||r.set(u,[]),r.get(u).push(c)});let n=[],s=Array.from(r.keys()).sort((c,l)=>c-l),a=!0;for(let c of s){if(n.length>=e)break;let l=r.get(c).sort((u,g)=>{let[m]=u.split(",").map(Number),[h]=g.split(",").map(Number);return a?m-h:h-m});for(let u of l){if(n.length>=e)break;n.push(u)}a=!a}return n.slice(0,e)}function Er(o,e){let t=Array.from(o);if(t.length===0)return[];let r=t.map(n=>{let[s,a]=n.split(",").map(Number);return{coord:n,diagonal:s+a,x:s,y:a}});return r.sort((n,s)=>n.diagonal!==s.diagonal?n.diagonal-s.diagonal:n.x-s.x),r.slice(0,e).map(n=>n.coord)}function Ir(o,e){let t=Array.from(o);if(t.length===0)return[];let r=[],n=new Set(t);for(;r.length<e&&n.size>0;){let s=Array.from(n),a=s[Math.floor(Math.random()*s.length)],[c,l]=a.split(",").map(Number),u=3+Math.floor(Math.random()*3),g=[];for(let h of n){let[p,x]=h.split(",").map(Number);Math.sqrt(Math.pow(p-c,2)+Math.pow(x-l,2))<=u&&g.push(h)}let m=Math.min(g.length,Math.min(5,e-r.length));for(let h=0;h<m;h++){let p=Math.floor(Math.random()*g.length),x=g.splice(p,1)[0];r.push(x),n.delete(x)}}return r.slice(0,e)}function Tr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0;t.forEach(a=>{let[c]=a.split(",").map(Number);r=Math.min(r,c),n=Math.max(n,c)});let s=t.map(a=>{let[c,l]=a.split(",").map(Number),u=(c-r)/(n-r||1),g=Math.sin(u*Math.PI*2)*10,m=Math.abs(l-g);return{coord:a,distance:m,x:c}});return s.sort((a,c)=>Math.abs(a.distance-c.distance)<2?a.x-c.x:a.distance-c.distance),s.slice(0,e).map(a=>a.coord)}function Ar(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;t.forEach(u=>{let[g,m]=u.split(",").map(Number);r=Math.min(r,g),n=Math.max(n,g),s=Math.min(s,m),a=Math.max(a,m)});let c=[[r,s],[n,s],[r,a],[n,a]],l=t.map(u=>{let[g,m]=u.split(",").map(Number),h=1/0;for(let[p,x]of c){let f=Math.sqrt(Math.pow(g-p,2)+Math.pow(m-x,2));h=Math.min(h,f)}return{coord:u,distance:h}});return l.sort((u,g)=>u.distance-g.distance),l.slice(0,e).map(u=>u.coord)}function kr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=new Map;t.forEach(a=>{let[c,l]=a.split(",").map(Number),u=Math.floor(c/8),g=Math.floor(l/8),m=`${u},${g}`;r.has(m)||r.set(m,[]),r.get(m).push(a)});let n=[],s=Array.from(r.keys());for(let a of s){if(n.length>=e)break;let c=r.get(a),l=Math.min(c.length,e-n.length);for(let u=0;u<l;u++)n.push(c[u])}return n.slice(0,e)}function Lr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;t.forEach(g=>{let[m,h]=g.split(",").map(Number);r=Math.min(r,m),n=Math.max(n,m),s=Math.min(s,h),a=Math.max(a,h)});let c=(r+n)/2,l=(s+a)/2,u=t.map(g=>{let[m,h]=g.split(",").map(Number),p=Math.sqrt(Math.pow(m-c,2)+Math.pow(h-l,2)),x=Math.min(m-r,n-m,h-s,a-h),f=Math.random()*.3,w=p*.4-x*.3+f;return{coord:g,priority:w}});return u.sort((g,m)=>g.priority-m.priority),u.slice(0,e).map(g=>g.coord)}function Rr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=[],n=new Set(t),s=t[Math.floor(Math.random()*t.length)];for(r.push(s),n.delete(s);r.length<e&&n.size>0;){let[a,c]=s.split(",").map(Number),l=null,u=1/0;for(let g of n){let[m,h]=g.split(",").map(Number),p=Math.sqrt(Math.pow(m-a,2)+Math.pow(h-c,2));p<u&&(u=p,l=g)}if(l)r.push(l),n.delete(l),s=l;else break}return r.slice(0,e)}function Mr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;t.forEach(p=>{let[x,f]=p.split(",").map(Number);r=Math.min(r,x),n=Math.max(n,x),s=Math.min(s,f),a=Math.max(a,f)});let c=(r+n)/2,l=(s+a)/2,u=[[],[],[],[]];t.forEach(p=>{let[x,f]=p.split(",").map(Number);x<=c&&f<=l?u[0].push(p):x>c&&f<=l?u[1].push(p):x<=c&&f>l?u[2].push(p):u[3].push(p)});let g=[],m=0,h=[0,0,0,0];for(;g.length<e;){let p=u[m],x=h[m];if(x<p.length&&(g.push(p[x]),h[m]++),m=(m+1)%4,h.every((f,w)=>f>=u[w].length))break}return g.slice(0,e)}function _r(o,e){let t=Array.from(o);if(t.length===0)return[];let r=[],n=[...t];for(;r.length<e&&n.length>0;){let s=null,a=-1,c=-1;for(let l=0;l<n.length;l++){let u=n[l],[g,m]=u.split(",").map(Number),h=1/0;for(let f of r){let[w,C]=f.split(",").map(Number),P=Math.sqrt(Math.pow(g-w,2)+Math.pow(m-C,2));h=Math.min(h,P)}let p=Math.random()*.5,x=h+p;x>a&&(a=x,s=u,c=l)}if(s)r.push(s),n.splice(c,1);else break}return r.slice(0,e)}function Xe(o,e,t,r=!1,n=null,s=null,a=!1,c=null){d(`\u{1F3AF} Aplicando patr\xF3n ${o} para ${t} p\xEDxeles de ${e.size} cambios detectados`);let l,u=e instanceof Map?Array.from(e.keys()):Array.from(e);switch(o){case"lineUp":l=xr(u,t);break;case"lineDown":l=yr(u,t);break;case"lineLeft":l=wr(u,t);break;case"lineRight":l=br(u,t);break;case"center":l=vr(u,t);break;case"borders":l=Cr(u,t);break;case"spiral":l=Pr(u,t);break;case"zigzag":l=Sr(u,t);break;case"diagonal":l=Er(u,t);break;case"cluster":l=Ir(u,t);break;case"wave":l=Tr(u,t);break;case"corners":l=Ar(u,t);break;case"sweep":l=kr(u,t);break;case"priority":l=Lr(u,t);break;case"proximity":l=Rr(u,t);break;case"quadrant":l=Mr(u,t);break;case"scattered":l=_r(u,t);break;case"snake":l=Fr(u,t);break;case"diagonalSweep":l=$r(u,t);break;case"spiralClockwise":l=lo(u,t,!0);break;case"spiralCounterClockwise":l=lo(u,t,!1);break;case"biasedRandom":l=Nr(u,t);break;case"anchorPoints":l=Wr(u,t);break;case"random":default:l=fr(u,t);break}if(r&&e instanceof Map){let g=Array.isArray(s)&&s.length>0?s:n!==null?[n]:[];g.length>0&&(l=zr(l,e,g,t))}if(a&&e instanceof Map){let g=Array.isArray(c)&&c.length>0?c:[];g.length>0&&(l=Br(l,e,g))}return l}function zr(o,e,t,r){let n=[],s=[];for(let c of o){let l=e.get(c);l&&l.original&&(Array.isArray(t)?t.includes(l.original.colorId):l.original.colorId===t)?n.push(c):s.push(c)}let a=[];if(n.length>0){let c=n.slice(0,Math.min(r,n.length));a.push(...c)}if(a.length<r&&s.length>0){let c=r-a.length,l=s.slice(0,c);a.push(...l)}return d(`\u{1F3A8} Priorizaci\xF3n de color: ${n.length} preferidos disponibles, rellenando hasta ${r}. Seleccionados: ${a.length}`),a}function Br(o,e,t){let r=[],n=0;for(let s of o){let a=e.get(s);a&&a.original&&t.includes(a.original.colorId)?n++:r.push(s)}return n>0&&d(`\u{1F6AB} Exclusi\xF3n de colores: ${n} p\xEDxeles excluidos, ${r.length} p\xEDxeles seleccionados`),r}function Fr(o,e){let t=Array.from(o);if(t.length===0)return[];let r={};for(let a of t){let[c,l]=a.split(",").map(Number);r[l]||(r[l]=[]),r[l].push({coord:a,x:c,y:l})}let n=Object.keys(r).map(Number).sort((a,c)=>a-c),s=[];for(let a=0;a<n.length&&s.length<e;a++){let c=n[a],l=r[c];a%2===0?l.sort((u,g)=>u.x-g.x):l.sort((u,g)=>g.x-u.x);for(let u of l){if(s.length>=e)break;s.push(u.coord)}}return s.slice(0,e)}function $r(o,e){let t=Array.from(o);if(t.length===0)return[];let r={};for(let a of t){let[c,l]=a.split(",").map(Number),u=c+l;r[u]||(r[u]=[]),r[u].push({coord:a,x:c,y:l})}let n=Object.keys(r).map(Number).sort((a,c)=>a-c),s=[];for(let a of n){if(s.length>=e)break;let c=r[a];c.sort((l,u)=>l.x-u.x);for(let l of c){if(s.length>=e)break;s.push(l.coord)}}return s.slice(0,e)}function lo(o,e,t=!0){let r=Array.from(o);if(r.length===0)return[];let n=1/0,s=-1/0,a=1/0,c=-1/0,l=r.map(m=>{let[h,p]=m.split(",").map(Number);return n=Math.min(n,h),s=Math.max(s,h),a=Math.min(a,p),c=Math.max(c,p),{coord:m,x:h,y:p}}),u=(n+s)/2,g=(a+c)/2;return l.forEach(m=>{let h=m.x-u,p=m.y-g;m.distance=Math.sqrt(h*h+p*p),m.angle=Math.atan2(p,h),t||(m.angle=-m.angle)}),l.sort((m,h)=>{let p=m.distance-h.distance;return Math.abs(p)<1?m.angle-h.angle:p}),l.slice(0,e).map(m=>m.coord)}function Nr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0;for(let g of t){let[m,h]=g.split(",").map(Number);r=Math.min(r,m),n=Math.max(n,m),s=Math.min(s,h),a=Math.max(a,h)}let c=t.map(g=>{let[m,h]=g.split(",").map(Number),p=m-r,x=n-m,f=h-s,w=a-h,P=1/(Math.min(p,x,f,w)+1)+Math.random()*.5;return{coord:g,weight:P}});c.sort((g,m)=>m.weight-g.weight);let l=[],u=[...c];for(;l.length<e&&u.length>0;){let g=u.reduce((p,x)=>p+x.weight,0),m=Math.random()*g,h=0;for(let p=0;p<u.length;p++)if(m-=u[p].weight,m<=0){h=p;break}l.push(u[h].coord),u.splice(h,1)}return l.slice(0,e)}function Wr(o,e){let t=Array.from(o);if(t.length===0)return[];let r=1/0,n=-1/0,s=1/0,a=-1/0,c=t.map(m=>{let[h,p]=m.split(",").map(Number);return r=Math.min(r,h),n=Math.max(n,h),s=Math.min(s,p),a=Math.max(a,p),{coord:m,x:h,y:p}}),l=(r+n)/2,u=(s+a)/2,g=[{x:r,y:s,priority:1},{x:n,y:s,priority:1},{x:r,y:a,priority:1},{x:n,y:a,priority:1},{x:l,y:u,priority:2},{x:l,y:s,priority:3},{x:l,y:a,priority:3},{x:r,y:u,priority:3},{x:n,y:u,priority:3}];return c.forEach(m=>{let h=1/0,p=10;for(let x of g){let f=Math.sqrt(Math.pow(m.x-x.x,2)+Math.pow(m.y-x.y,2));f<h&&(h=f,p=x.priority)}m.priority=p,m.distanceToAnchor=h}),c.sort((m,h)=>m.priority!==h.priority?m.priority-h.priority:m.distanceToAnchor-h.distanceToAnchor),c.slice(0,e).map(m=>m.coord)}var co=R(()=>{D();re()});function Dr(){var o;try{if(typeof window=="undefined"||!globalThis.URLSearchParams)return{};let e=new globalThis.URLSearchParams(((o=globalThis.location)==null?void 0:o.search)||""),t=e.get("metricsEnabled"),r=e.get("metricsUrl"),n=e.get("metricsKey"),s=e.get("metricsSalt"),a=e.get("metricsVariant"),c=e.get("metricsTimeoutMs"),l=e.get("metricsRetries"),u=e.get("metricsPingMs"),g={};return t!=null&&(g.ENABLED=t==="true"||t==="1"),r&&(g.BASE_URL=r),n&&(g.API_KEY=n),s&&(g.PUBLIC_SALT=s),a&&(g.VARIANT=a),c&&!Number.isNaN(Number(c))&&(g.TIMEOUT_MS=Number(c)),l&&!Number.isNaN(Number(l))&&(g.RETRIES=Number(l)),u&&!Number.isNaN(Number(u))&&(g.PING_INTERVAL_MS=Number(u)),g}catch{return{}}}function Or(){var t;let o=typeof window!="undefined"&&(window.__WPLACE_METRICS__||((t=window.__WPLACE_CONFIG__)==null?void 0:t.metrics))||{},e={};return typeof o.ENABLED=="boolean"&&(e.ENABLED=o.ENABLED),typeof o.BASE_URL=="string"&&(e.BASE_URL=o.BASE_URL),typeof o.API_KEY=="string"&&(e.API_KEY=o.API_KEY),typeof o.PUBLIC_SALT=="string"&&(e.PUBLIC_SALT=o.PUBLIC_SALT),typeof o.VARIANT=="string"&&(e.VARIANT=o.VARIANT),Number.isFinite(o.TIMEOUT_MS)&&(e.TIMEOUT_MS=o.TIMEOUT_MS),Number.isFinite(o.RETRIES)&&(e.RETRIES=o.RETRIES),Number.isFinite(o.PING_INTERVAL_MS)&&(e.PING_INTERVAL_MS=o.PING_INTERVAL_MS),e}function Ur(o){let e={...o};if(typeof e.BASE_URL=="string"&&(e.BASE_URL=e.BASE_URL.replace(/\/$/,"")),typeof e.VARIANT=="string"){let t=e.VARIANT.trim();e.VARIANT=t||wt.VARIANT}else e.VARIANT=wt.VARIANT;return e}function q(o={}){let e={...wt,...Or(),...Dr(),...o};return bt=Ur(e),bt}async function qr(o){let e=globalThis.TextEncoder,t=globalThis.crypto;if(!e||!(t!=null&&t.subtle))throw new Error("WebCrypto no disponible");let r=new e,n=await t.subtle.digest("SHA-256",r.encode(o));return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}async function uo(o,e){let t=bt||q(),r=typeof e=="string"?e:t.PUBLIC_SALT;return!r||!o?null:qr(String(r)+String(o))}function po(){var o,e,t;try{if(typeof window=="undefined")return null;if((o=window.__WPLACE_METRICS__)!=null&&o.anonId)return String(window.__WPLACE_METRICS__.anonId);let r="wplace_metrics_aid",n=null;try{n=localStorage.getItem(r)}catch{}if(n&&typeof n=="string")return n;let s=new Uint8Array(16);(t=(e=globalThis.crypto||{}).getRandomValues)==null||t.call(e,s);let a=Array.from(s).map(c=>c.toString(16).padStart(2,"0")).join("");try{localStorage.setItem(r,a)}catch{}return window.__WPLACE_METRICS__||(window.__WPLACE_METRICS__={}),window.__WPLACE_METRICS__.anonId=a,a}catch{return null}}var wt,bt,Ze=R(()=>{wt=Object.freeze({ENABLED:!0,BASE_URL:"https://metricswplaceapi.alarisco.xyz",API_KEY:"wplace_2c8e4b2b1e0a4f7cb9d3a76f4a1c0b6f",PUBLIC_SALT:"wplace_public_salt_2024",VARIANT:"auto-guard",TIMEOUT_MS:1e4,RETRIES:1,PING_INTERVAL_MS:3e5});bt=null});async function Gr(o,e,{timeout:t,apiKey:r}){let n={"Content-Type":"application/json"};return r&&(n["X-API-Key"]=r),await ct(o,{method:"POST",headers:n,body:JSON.stringify(e),timeout:t})}function go(o){return o.text().then(e=>{try{return e?JSON.parse(e):{}}catch{return{}}})}async function Yr(o,e){let t=q(e);if(!t.ENABLED)return{ok:!1,skipped:!0};let r=`${t.BASE_URL}/v1/events`;try{let a=o==null?void 0:o.event_type,c=o==null?void 0:o.bot_variant;(a==="pixel_painted"||a==="pixel_repaired")&&typeof(o==null?void 0:o.pixel_delta)!="undefined"&&d(`[METRICS] ${a} \u2192 \u0394 ${o.pixel_delta} (${c})`)}catch{}let n=0,s=null;for(;n<=t.RETRIES;)try{let a=await Gr(r,o,{timeout:t.TIMEOUT_MS,apiKey:t.API_KEY});if(!a.ok){let l=await go(a);return{ok:!1,status:a.status,data:l}}let c=await go(a);try{let l=o==null?void 0:o.event_type,u=o==null?void 0:o.bot_variant;l==="session_start"&&d(`[METRICS] session_start (${u})`)}catch{}return{ok:!0,data:c}}catch(a){if(s=a,n++,n>t.RETRIES)break;await new Promise(c=>setTimeout(c,300*n))}return{ok:!1,error:(s==null?void 0:s.message)||String(s)}}async function ve({botVariant:o,eventType:e,pixelDelta:t,timestamp:r,metadata:n}={},s){let a=q(s);if(!a.ENABLED)return{ok:!1,skipped:!0};let c={};c.bot_variant=o||a.VARIANT,c.event_type=e,typeof t=="number"&&(c.pixel_delta=t),r&&(c.timestamp=r),n&&typeof n=="object"&&(c.event_metadata=n);let l=po();if(l){let u=await uo(l);u&&(c.user_hash=u)}return Yr(c,s)}async function mo({botVariant:o,metadata:e}={},t){return ve({botVariant:o,eventType:"session_start",metadata:e},t)}async function He({botVariant:o,metadata:e}={},t){return ve({botVariant:o,eventType:"session_ping",metadata:e},t)}async function Ct({botVariant:o,metadata:e}={},t){return ve({botVariant:o,eventType:"session_end",metadata:e},t)}async function ho(o,{botVariant:e,metadata:t}={},r){return!Number.isFinite(o)||o<=0?{ok:!1,skipped:!0}:ve({botVariant:e,eventType:"pixel_repaired",pixelDelta:Math.trunc(o),metadata:t},r)}async function vt(o,{botVariant:e,metadata:t}={},r){let n={message:o,...t||{}};return ve({botVariant:e,eventType:"error",metadata:n},r)}async function $(o,{botVariant:e,metadata:t,timestamp:r}={},n){return o?ve({botVariant:e,eventType:o,metadata:t,timestamp:r},n):{ok:!1,skipped:!0}}var Pt=R(()=>{dt();Ze();D()});var vo={};Qt(vo,{analyzeAreaForErasing:()=>Co,analyzeAreaPixels:()=>te,calculateDeltaE:()=>Me,checkForChanges:()=>fe,detectAvailableColors:()=>he,findClosestColor:()=>_t,getTileImage:()=>Mt,repairChanges:()=>et,rgbToLab:()=>ie,startChargeMonitoring:()=>tt,startIndependentChargeMonitoring:()=>Lt,stopChargeMonitoring:()=>kt,stopIndependentChargeMonitoring:()=>Rt});function It(){ae&&window.clearInterval(ae),ae=window.setInterval(()=>{let o=Date.now(),e=Math.max(0,Math.ceil((Ke-o)/1e3));i.ui&&i.ui.updateCountdown(e),e<=0&&(window.clearInterval(ae),ae=null)},1e3)}function At(){ae&&(window.clearInterval(ae),ae=null),i.ui&&i.ui.showCountdown(!1)}function tt(){if(ge){d("\u{1F504} Monitoreo de cargas ya est\xE1 activo");return}d("\u{1F504} Iniciando monitoreo de cargas cada 30 segundos..."),me&&d("\u23F8\uFE0F Pausando contador independiente - bot iniciado"),ge=window.setInterval(async()=>{try{let o=await Re();if(o.success){let e=Math.floor(o.data.charges);i.currentCharges=o.data.charges,i.maxCharges=o.data.maxCharges,X=o.data.charges,Pe=Date.now(),i.ui&&i.ui.updateStats({charges:e}),i.changes.size>0&&i.running&&!Je&&e>=i.minChargesToWait&&(d(`\u{1F504} Cargas detectadas: ${e}. Continuando reparaci\xF3n autom\xE1ticamente...`),At(),await et(i.changes))}}catch(o){d(`Error en monitoreo de cargas: ${o.message}`)}},yo)}function kt(){ge&&(window.clearInterval(ge),ge=null,d("\u{1F504} Monitoreo de cargas detenido"),me&&d("\u25B6\uFE0F Reanudando contador independiente - bot detenido")),At()}function Lt(){if(me){d("\u{1F504} Monitoreo independiente de cargas ya est\xE1 activo");return}d("\u{1F504} Iniciando monitoreo independiente de cargas cada 30 segundos...");let o=async()=>{try{if(ge){d("\u{1F504} Bot activo detectado, saltando inicializaci\xF3n independiente");return}let t=await Re();if(t.success){X=t.data.charges,i.currentCharges=X,i.maxCharges=t.data.maxCharges,Pe=Date.now();let r=Math.floor(X);i.ui&&i.ui.updateStats({charges:r}),d(`\u{1F50B} Cargas iniciales obtenidas: ${r}/${i.maxCharges}`)}}catch(t){d(`Error obteniendo cargas iniciales: ${t.message}`)}},e=()=>{try{if(ge)return;if(Pe&&X<i.maxCharges){let t=Date.now(),r=t-Pe,n=Math.floor(r/3e4);if(n>0){X=Math.min(X+n,i.maxCharges),i.currentCharges=X,Pe=t;let s=Math.floor(X);i.ui&&i.ui.updateStats({charges:s}),(!St||t-St>3e5)&&(d(`\u{1F50B} Cargas calculadas actualizadas: ${s}/${i.maxCharges}`),St=t)}}}catch(t){d(`Error actualizando cargas calculadas: ${t.message}`)}};o(),me=window.setInterval(e,yo)}function Rt(){me&&(window.clearInterval(me),me=null,Pe=null,X=0,d("\u{1F504} Monitoreo independiente de cargas detenido"))}function jr(o,e,t){o=o/255,e=e/255,t=t/255,o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;let r=o*.4124564+e*.3575761+t*.1804375,n=o*.2126729+e*.7151522+t*.072175,s=o*.0193339+e*.119192+t*.9503041;return{x:r,y:n,z:s}}function Vr(o,e,t){o=o/.95047,e=e/1,t=t/1.08883;let a=o>.008856?Math.pow(o,1/3):7.787*o+16/116,c=e>.008856?Math.pow(e,1/3):7.787*e+16/116,l=t>.008856?Math.pow(t,1/3):7.787*t+16/116,u=116*c-16,g=500*(a-c),m=200*(c-l);return{l:u,a:g,b:m}}function ie(o,e,t){let r=jr(o,e,t);return Vr(r.x,r.y,r.z)}function Me(o,e){let t=o.l-e.l,r=o.a-e.a,n=o.b-e.b;return Math.sqrt(t*t+r*r+n*n)}function wo(o,e,t="rgb",r=10){if(o.colorId===0||e.colorId===0||o.r===null||o.g===null||o.b===null||e.r===null||e.g===null||e.b===null)return o.colorId!==e.colorId;if(t==="lab"){let n=ie(o.r,o.g,o.b),s=ie(e.r,e.g,e.b);return Me(n,s)>r/2}else{let n=Math.abs(o.r-e.r),s=Math.abs(o.g-e.g),a=Math.abs(o.b-e.b);return Math.max(n,s,a)>r}}async function Mt(o,e){try{let t=`${I.BACKEND_URL}/files/s0/tiles/${o}/${e}.png`,r=await fetch(t);if(!r.ok)throw new Error(`HTTP ${r.status}`);return await r.blob()}catch(t){return d(`Error obteniendo tile ${o},${e}:`,t),null}}function he(){d("\u{1F3A8} Detectando colores disponibles...");let o=document.querySelectorAll('[id^="color-"]'),e=[];e.push({id:0,r:null,g:null,b:null,element:null});for(let t of o){if(t.querySelector("svg"))continue;let r=parseInt(t.id.replace("color-",""));if(r===0)continue;let n=t.style.backgroundColor;if(n){let s=n.match(/\d+/g);s&&s.length>=3&&e.push({id:r,r:parseInt(s[0]),g:parseInt(s[1]),b:parseInt(s[2]),element:t})}}return d(`\u2705 ${e.length} colores detectados (incluyendo transparente)`),e}function _t(o,e,t,r){if(!r||r.length===0)return null;let n=r.filter(l=>l.id!==0&&l.r!==null);if(n.length===0)return null;let s=ie(o,e,t),a=1/0,c=null;for(let l of n){let u=ie(l.r,l.g,l.b),g=Me(s,u);g<a&&(a=g,c=l)}return c}async function te(o,e={}){let{allowVirtual:t=!1}=e,{x1:r,y1:n,x2:s,y2:a}=o,c=s-r+1,l=a-n+1;if(d(`\u{1F50D} Analizando \xE1rea ${c}x${l} desde (${r},${n}) hasta (${s},${a})`),!i.availableColors||i.availableColors.length===0){let x=he();if(x.length>0)i.availableColors=x,d(`\u{1F3A8} Colores detectados para an\xE1lisis: ${x.length}`);else return d("\u26A0\uFE0F Sin colores disponibles para an\xE1lisis. Omitiendo an\xE1lisis para evitar falsos positivos."),new Map}let u=new Map,g=Math.floor(r/I.TILE_SIZE),m=Math.floor(n/I.TILE_SIZE),h=Math.floor(s/I.TILE_SIZE),p=Math.floor(a/I.TILE_SIZE);for(let x=m;x<=p;x++)for(let f=g;f<=h;f++)try{let w=await Mt(f,x);if(!w){d(`\u26A0\uFE0F No se pudo obtener tile ${f},${x}, continuando...`);continue}let C=new bo,P=document.createElement("canvas"),y=P.getContext("2d");await new Promise((N,W)=>{C.onload=N,C.onerror=W,C.src=Qe.createObjectURL(w)}),P.width=C.width,P.height=C.height,y.drawImage(C,0,0);let b=y.getImageData(0,0,P.width,P.height).data,E=f*I.TILE_SIZE,T=x*I.TILE_SIZE,M=E+I.TILE_SIZE,A=T+I.TILE_SIZE,L=s+1,_=a+1,k=Math.max(r,E),z=Math.max(n,T),K=Math.min(L,M),V=Math.min(_,A);for(let N=z;N<V;N++)for(let W=k;W<K;W++){let we=W-E,De=N-T,Q=(we%1e3+1e3)%1e3,ee=(De%1e3+1e3)%1e3;if(Q>=0&&Q<I.TILE_SIZE&&ee>=0&&ee<I.TILE_SIZE&&Q<P.width&&ee<P.height){let Ae=(ee*P.width+Q)*4,be=b[Ae],Ht=b[Ae+1],Jt=b[Ae+2];if(b[Ae+3]>0){let Kt=_t(be,Ht,Jt,i.availableColors);Kt&&u.set(`${W},${N}`,{r:be,g:Ht,b:Jt,colorId:Kt.id,globalX:W,globalY:N,localX:Q,localY:ee,tileX:f,tileY:x})}else u.set(`${W},${N}`,{r:null,g:null,b:null,colorId:0,globalX:W,globalY:N,localX:Q,localY:ee,tileX:f,tileY:x})}}Qe.revokeObjectURL(C.src)}catch(w){d(`\u274C Error analizando tile ${f},${x}:`,w)}if(d(`\u2705 An\xE1lisis completado: ${u.size} p\xEDxeles protegidos`),u.size===0)if(t){d("\u26A0\uFE0F No se encontraron p\xEDxeles existentes, creando \xE1rea virtual para protecci\xF3n");let x=s+1,f=a+1;for(let w=n;w<f;w++)for(let C=r;C<x;C++){let P=Math.floor(C/I.TILE_SIZE),y=Math.floor(w/I.TILE_SIZE),S=C-P*I.TILE_SIZE,b=w-y*I.TILE_SIZE,E=(S%1e3+1e3)%1e3,T=(b%1e3+1e3)%1e3;u.set(`${C},${w}`,{r:255,g:255,b:255,colorId:5,globalX:C,globalY:w,localX:E,localY:T,tileX:P,tileY:y})}d(`\u2705 \xC1rea virtual creada: ${u.size} p\xEDxeles para proteger`)}else d("\u2139\uFE0F An\xE1lisis vac\xEDo y fallback virtual deshabilitado (modo verificaci\xF3n)");return u}async function Co(o){let{x1:e,y1:t,x2:r,y2:n}=o;d(`\u{1F5D1}\uFE0F Analizando \xE1rea para borrado: (${e},${t}) a (${r},${n})`);let s=new Map,a=Math.floor(e/I.TILE_SIZE),c=Math.floor(t/I.TILE_SIZE),l=Math.floor(r/I.TILE_SIZE),u=Math.floor(n/I.TILE_SIZE);for(let g=c;g<=u;g++)for(let m=a;m<=l;m++)try{let h=await Mt(m,g);if(!h){d(`\u26A0\uFE0F No se pudo obtener tile ${m},${g}, continuando...`);continue}let p=new bo,x=document.createElement("canvas"),f=x.getContext("2d");await new Promise((k,z)=>{p.onload=k,p.onerror=z,p.src=Qe.createObjectURL(h)}),x.width=p.width,x.height=p.height,f.drawImage(p,0,0);let C=f.getImageData(0,0,x.width,x.height).data,P=m*I.TILE_SIZE,y=g*I.TILE_SIZE,S=P+I.TILE_SIZE,b=y+I.TILE_SIZE,E=r+1,T=n+1,M=Math.max(e,P),A=Math.max(t,y),L=Math.min(E,S),_=Math.min(T,b);for(let k=A;k<_;k++)for(let z=M;z<L;z++){let K=z-P,V=k-y,N=(K%1e3+1e3)%1e3,W=(V%1e3+1e3)%1e3;if(N>=0&&N<I.TILE_SIZE&&W>=0&&W<I.TILE_SIZE&&N<x.width&&W<x.height){let we=(W*x.width+N)*4,De=C[we],Q=C[we+1],ee=C[we+2];if(C[we+3]>0){let be=_t(De,Q,ee,i.availableColors);be&&be.id!==0&&s.set(`${z},${k}`,{r:De,g:Q,b:ee,colorId:be.id,globalX:z,globalY:k,localX:N,localY:W,tileX:m,tileY:g})}}}Qe.revokeObjectURL(p.src)}catch(h){d(`\u274C Error analizando tile ${m},${g} para borrado:`,h)}return d(`\u{1F5D1}\uFE0F An\xE1lisis para borrado completado: ${s.size} p\xEDxeles no transparentes encontrados`),s}async function Xr(o){let e=new Map;if(!i.protectTransparentPixels)return e;let t=await te(o);for(let[r,n]of i.originalPixels)if(n.colorId===0){let s=t.get(r);s&&s.colorId!==0&&e.set(r,{original:n,current:s,targetColorId:0,type:"transparent_damaged"})}return d(`\u{1FAE5} An\xE1lisis de p\xEDxeles transparentes: ${e.size} p\xEDxeles transparentes da\xF1ados encontrados`),e}function Zr(o){if(!i.protectPerimeter||i.perimeterWidth<=0)return null;let e=i.perimeterWidth;return{x1:o.x1-e,y1:o.y1-e,x2:o.x2+e,y2:o.y2+e,tileX:o.tileX,tileY:o.tileY}}async function Hr(o){let e=new Map;if(!i.protectPerimeter)return e;let t=Zr(o);if(!t)return e;let r=await te(t);for(let[n,s]of r){let[a,c]=n.split(",").map(Number);(a<o.x1||a>o.x2||c<o.y1||c>o.y2)&&s.colorId!==0&&e.set(n,{original:null,current:s,targetColorId:0,type:"perimeter_intrusion"})}return d(`\u{1F6E1}\uFE0F An\xE1lisis de per\xEDmetro: ${e.size} intrusiones en per\xEDmetro encontradas`),e}function fo(o,e){var c,l;if(!i.ui||!i.ui.updateAnalysisStats)return;let t=o.size,r=0,n=0,s=0;if(t===0){i.ui.updateAnalysisStats({correct:0,incorrect:0,missing:0,accuracy:0});return}for(let[u,g]of o){let m=e.get(u);if(!m)s++;else{let h=((c=i.config)==null?void 0:c.colorComparisonMethod)||"rgb",p=((l=i.config)==null?void 0:l.colorThreshold)||10;wo(m,g,h,p)?n++:r++}}let a=t>0?(r/t*100).toFixed(1):0;i.ui.updateAnalysisStats({correct:r,incorrect:n,missing:s,accuracy:a})}async function fe(){var o,e;if(!(!i.protectionArea||!i.originalPixels.size))try{if(i.operationMode==="erase"){let s=await Co(i.protectionArea);if(s.size===0){i.lastCheck=Date.now(),i.ui&&(i.ui.updateStatus("\u2705 \xC1rea completamente borrada - todos los p\xEDxeles son transparentes","success"),i.ui.updateProgress(0,i.originalPixels.size,!1));return}let a=new Map;for(let[c,l]of s)a.set(c,{timestamp:Date.now(),type:"erase",original:l,current:l,targetColorId:0});d(`\u{1F5D1}\uFE0F Detectados ${s.size} p\xEDxeles no transparentes para borrar`),i.changes=a,i.ui&&(i.ui.updateStatus(`\u{1F5D1}\uFE0F ${s.size} p\xEDxeles no transparentes detectados`,"warning"),i.ui.updateProgress(s.size,i.originalPixels.size,!1)),i.running&&!i.watchMode&&await et(a);return}let t=await te(i.protectionArea);if(!t||t.size===0)if(i.isVirtualArea){i.lastCheck=Date.now(),i.ui&&i.ui.updateStatus("\u2705 \xC1rea protegida - sin cambios (\xE1rea virtual vac\xEDa)","success");return}else d("\u{1F6A8} P\xEDxeles originales detectados pero an\xE1lisis actual vac\xEDo - p\xEDxeles fueron borrados");let r=new Map,n=0;if(i.isVirtualArea&&t&&t.size>0)for(let[s,a]of t)r.set(s,{timestamp:Date.now(),type:"intrusion",original:null,current:a}),n++;else for(let[s,a]of i.originalPixels){let c=t.get(s);if(!(!i.protectTransparentPixels&&(a==null?void 0:a.colorId)===0))if(!c)r.set(s,{timestamp:Date.now(),type:"deleted",original:a,current:null}),n++;else{let l=!1;if(c.colorId!==a.colorId){let u=((o=i.config)==null?void 0:o.colorComparisonMethod)||"rgb",g=((e=i.config)==null?void 0:e.colorThreshold)||10;l=wo(c,a,u,g)}l&&(r.set(s,{timestamp:Date.now(),type:"changed",original:a,current:c}),n++)}}if(i.protectTransparentPixels||i.protectPerimeter){if(i.protectTransparentPixels){let s=await Xr(i.protectionArea);for(let[a,c]of s)r.has(a)||(r.set(a,{timestamp:Date.now(),type:"transparent_repair",original:c.original,current:c.current,targetColorId:0}),n++)}if(i.protectPerimeter){let s=await Hr(i.protectionArea);for(let[a,c]of s)r.has(a)||(r.set(a,{timestamp:Date.now(),type:"perimeter_clear",original:c.original,current:c.current,targetColorId:0}),n++)}}if(n>0){d(`\u{1F6A8} Detectados ${n} cambios en el \xE1rea protegida`),i.changes=r,i.ui&&(i.ui.updateStatus(`\u{1F6A8} ${n} cambios detectados`,"warning"),i.ui.updateProgress(r.size,i.originalPixels.size,i.isVirtualArea),fo(i.originalPixels,t));try{let s=0,a=0;for(let c of r.values())c.type==="deleted"?a++:s++;xo({total:i.originalPixels.size,incorrect:s,missing:a})}catch{}i.running&&!i.watchMode?await et(r):i.watchMode&&(d(`\u{1F441}\uFE0F Modo Vig\xEDa: ${r.size} cambios detectados (sin reparar)`),i.ui&&i.ui.updateStatus(`\u{1F441}\uFE0F Vig\xEDa: ${r.size} cambios detectados`,"warning"))}else{i.lastCheck=Date.now(),i.ui&&(i.ui.updateStatus("\u2705 \xC1rea protegida - sin cambios","success"),i.ui.updateProgress(0,i.originalPixels.size,i.isVirtualArea),fo(i.originalPixels,t));try{xo({total:i.originalPixels.size,incorrect:0,missing:0})}catch{}}}catch(t){d("\u274C Error verificando cambios:",t),i.ui&&i.ui.updateStatus(`\u274C Error verificando: ${t.message}`,"error")}}async function et(o){if(o.size!==0){if(Je){d("\u{1F504} Reparaci\xF3n ya en progreso, omitiendo llamada duplicada");return}Je=!0;try{let e=Array.from(o.values()),t=Math.floor(i.currentCharges),r;if(i.spendAllPixelsOnStart&&i.totalRepaired===0){let p=Math.min(5,i.minChargesToWait),x=Math.max(0,t-p);r=Math.min(e.length,x,I.MAX_PIXELS_PER_BATCH),d(`\u26A1 Primer batch - gastando ${r} p\xEDxeles de ${x} cargas gastables (${t} total, ${p} m\xEDnimo de seguridad)`)}else{let p=e.length,x=i.pixelsPerBatch;if(p>0&&p<x){let f=Math.max(0,t-i.minChargesToWait);if(f>=p)r=p,d(`\u{1F3AF} P\xEDxeles restantes: gastando solo ${r} p\xEDxeles de ${f} cargas gastables (${t} total, ${i.minChargesToWait} m\xEDnimo)`);else{let w=i.minChargesToWait+p;if(d(`\u26A0\uFE0F Cargas insuficientes para p\xEDxeles restantes: ${t}/${w} (necesita ${p} + ${i.minChargesToWait} m\xEDnimo). Esperando m\xE1s cargas...`),i.ui){i.ui.updateStatus(`\u23F3 Esperando ${w} cargas para p\xEDxeles restantes (${t} actuales, m\xEDnimo ${i.minChargesToWait})`,"warning");let P=(w-t)*Et;Ke=Date.now()+P,It()}return}}else{let f=Math.max(0,t-i.minChargesToWait),w=i.pixelsPerBatch;if(f<w){let C=i.minChargesToWait+w;if(d(`\u26A0\uFE0F Cargas insuficientes para lote completo: ${t}/${C} (necesita ${w} + ${i.minChargesToWait} m\xEDnimo). Esperando m\xE1s cargas...`),i.ui){i.ui.updateStatus(`\u23F3 Esperando ${C} cargas para continuar (${t} actuales, m\xEDnimo ${i.minChargesToWait})`,"warning");let y=(C-t)*Et;Ke=Date.now()+y,It()}try{$("repair_wait",{botVariant:"auto-guard",metadata:{available:t,minToWait:i.minChargesToWait,required:w}})}catch{}return}r=Math.min(e.length,i.pixelsPerBatch,f)}}d(`\u{1F6E0}\uFE0F Cargas: ${t}, M\xEDnimo: ${i.minChargesToWait}, Reparando: ${r} p\xEDxeles`),i.ui&&i.ui.updateStatus(`\u{1F6E0}\uFE0F Reparando ${r} p\xEDxeles...`,"info");let s=Xe(i.protectionPattern,o,r,i.preferColor,i.preferredColorId,i.preferredColorIds,i.excludeColor,i.excludedColorIds),a=0;for(;s.length<r&&a<3;)a++,s=Xe(i.protectionPattern,o,r,i.preferColor,i.preferredColorId,i.preferredColorIds,i.excludeColor,i.excludedColorIds),s.length<r&&(d(`\u{1F501} Reintentando completar lote (${s.length}/${r}) intento ${a}/3`),await ne(100));if(s.length>0){let p=new Map;for(let x of s){let f=o.get(x),w=(f==null?void 0:f.type)==="intrusion"?f==null?void 0:f.current:f==null?void 0:f.original;if(!w)continue;let C=`${w.tileX},${w.tileY}`;p.has(C)||p.set(C,[]),p.get(C).push(x)}if(p.size>1){let x=null,f=-1;for(let[C,P]of p)P.length>f&&(f=P.length,x=C);let w=p.get(x)||[];if(w.length<r){let[C,P]=x.split(",").map(Number),y=new Map;for(let[S,b]of o){let E=(b==null?void 0:b.type)==="intrusion"?b==null?void 0:b.current:b==null?void 0:b.original;E&&E.tileX===C&&E.tileY===P&&y.set(S,b)}if(y.size>0){let S=Xe(i.protectionPattern,y,r,i.preferColor,i.preferredColorId,i.preferredColorIds,i.excludeColor,i.excludedColorIds),b=new Set(w);for(let E of S)if(!b.has(E)&&(w.push(E),b.add(E),w.length>=r))break}d(`\u{1F4E6} Concentrando lote en tile (${C},${P}): ${w.length}/${r} p\xEDxeles`)}s=w}}let c=s.map(p=>o.get(p)),l=new Map;for(let p of c){let x,f;p.type==="intrusion"?(x=p.current,f=5):p.type==="erase"||p.type==="transparent_repair"?(x=p.original,f=0):p.type==="perimeter_clear"?(x=p.current,f=0):(x=p.original,f=p.original.colorId);let w=Number.isFinite(x==null?void 0:x.tileX)?x.tileX:Math.floor(x.globalX/I.TILE_SIZE),C=Number.isFinite(x==null?void 0:x.tileY)?x.tileY:Math.floor(x.globalY/I.TILE_SIZE),P=Number.isFinite(x==null?void 0:x.localX)?x.localX:x.globalX-w*I.TILE_SIZE,y=Number.isFinite(x==null?void 0:x.localY)?x.localY:x.globalY-C*I.TILE_SIZE,S=(Number(P)%1e3+1e3)%1e3,b=(Number(y)%1e3+1e3)%1e3;d(`\u{1F527} Reparando p\xEDxel en (${x.globalX}, ${x.globalY}) tile(${w}, ${C}) local(${S}, ${b})`);let E=`${w},${C}`;l.has(E)||l.set(E,[]),l.get(E).push({localX:S,localY:b,colorId:f,globalX:x.globalX,globalY:x.globalY,changeType:p.type})}let u=0,g=Array.from(l.entries());g.length>1&&(g.sort((p,x)=>x[1].length-p[1].length),g=[g[0]]);for(let[p,x]of g){let[f,w]=p.split(",").map(Number);try{let C=[],P=[],y=[...x].sort((b,E)=>b.localY-E.localY||b.localX-E.localX);for(let b of y)C.push(b.localX,b.localY),P.push(b.colorId);let S=await Jr(f,w,C,P);if(S.success&&S.painted>0){u+=S.painted,i.currentCharges=Math.max(0,i.currentCharges-S.painted),i.totalRepaired+=S.painted;for(let b=0;b<S.painted&&b<x.length;b++){let E=x[b],T=`${E.globalX},${E.globalY}`;i.changes.delete(T)}d(`\u2705 Reparados ${S.painted} p\xEDxeles en tile (${f},${w})`);try{if(q({VARIANT:"auto-guard"}).ENABLED){let E={details:`Tile (${f},${w}) reparado: ${S.painted}/${x.length} px \xB7 pendientes ${i.changes.size}`,tile:{x:f,y:w},batch_size:x.length,repaired_count:S.painted,pending_after:i.changes.size,charges_remaining:Math.max(0,i.currentCharges)};ho(S.painted,{botVariant:"auto-guard",metadata:E})}}catch{}}else{d(`\u274C Error reparando tile (${f},${w}):`,S.error);try{q().ENABLED&&S.error&&vt(`repair tile ${f},${w}: ${S.error}`,{botVariant:"auto-guard"})}catch{}}}catch(C){d(`\u274C Error reparando tile (${f},${w}):`,C);try{q().ENABLED&&(C!=null&&C.message)&&vt(`exception tile ${f},${w}: ${C.message}`,{botVariant:"auto-guard"})}catch{}}if(l.size>1)if(i.randomWaitTime){let C=Math.random()*(i.randomWaitMax-i.randomWaitMin)+i.randomWaitMin;d(`\u23F0 Esperando ${C.toFixed(1)} segundos (aleatorio) antes del siguiente lote`),await ne(C*1e3)}else await ne(500)}let m=Math.floor(i.currentCharges),h=i.changes.size;if(d(`\u{1F6E0}\uFE0F Reparaci\xF3n completada: ${u} p\xEDxeles reparados, ${m} cargas restantes`),i.ui){if(h>0&&m<i.minChargesToWait){i.ui.updateStatus(`\u23F3 Esperando ${i.minChargesToWait} cargas para continuar (${m} actuales)`,"warning");let x=(i.minChargesToWait-m)*Et;Ke=Date.now()+x,It()}else i.ui.updateStatus(`\u2705 Reparados ${u} p\xEDxeles correctamente`,"success"),At();i.ui.updateStats({charges:m,repaired:i.totalRepaired,pending:h})}if(i.randomWaitTime&&h>0&&m>=i.minChargesToWait){let p=Math.random()*(i.randomWaitMax-i.randomWaitMin)+i.randomWaitMin;d(`\u23F0 Esperando ${p.toFixed(1)} segundos (aleatorio) antes del siguiente batch`),await ne(p*1e3)}}catch(e){d(`\u274C Error en reparaci\xF3n: ${e.message}`)}finally{Je=!1}}}function xo({total:o,incorrect:e,missing:t}){Tt&&clearTimeout(Tt),Tt=setTimeout(()=>{try{$("analysis_summary",{botVariant:"auto-guard",metadata:{total:o,incorrect:e,missing:t}})}catch{}},1500)}async function Jr(o,e,t,r){var n,s;try{let a=oo();a||(a=await ke());let c=[];for(let g=0;g<t.length;g+=2){let m=(Number(t[g])%1e3+1e3)%1e3,h=(Number(t[g+1])%1e3+1e3)%1e3;Number.isFinite(m)&&Number.isFinite(h)&&c.push(m,h)}let l=c.slice(0,6).join(",");d(`[API] Enviando lote a tile ${o},${e} con ${r.length} p\xEDxeles. Ejemplo coords: ${l}`);let u=await so(o,e,c,r,a);return{success:u.success,painted:u.painted||0,status:u.status,error:u.success?null:((n=u.json)==null?void 0:n.error)||((s=u.json)==null?void 0:s.message)||`HTTP ${u.status}`}}catch(a){return{success:!1,painted:0,error:a.message}}}var ge,me,Pe,X,St,Je,ae,Ke,yo,Et,bo,Qe,Tt,ot=R(()=>{D();Ve();Ve();qe();re();yt();co();Pt();Ze();ge=null,me=null,Pe=null,X=0,St=0,Je=!1,ae=null,Ke=0,yo=3e4,Et=31e3;({Image:bo,URL:Qe}=window);Tt=null});function cn(o){zt=o}function B(o,e=null){zt&&(e?console.log(`[ModalManager] ${o}`,e):console.log(`[ModalManager] ${o}`))}function nt(){return document.querySelectorAll("dialog.modal[open], dialog[open], .modal[open], .modal.show").length>0}function Ee(){let o=nt();B(`Modal state changed. Open: ${o}`),B(`Windows registered: ${se.size}`),B(`Windows currently hidden by modal: ${oe.size}`),se.forEach(e=>{if(o){if(!oe.has(e)){B("Hiding window due to modal",e),oe.add(e),e.style.transition="all 0.3s ease-out",e.style.opacity="0",e.style.pointerEvents="none";let t=e.getRootNode&&e.getRootNode();t&&t.host&&t.host.style&&(B("Also hiding Shadow DOM host",t.host),t.host.style.transition="all 0.3s ease-out",t.host.style.opacity="0",t.host.style.pointerEvents="none")}}else if(oe.has(e)){B("Showing window, no modals detected",e),oe.delete(e),e.style.transition="all 0.3s ease-in",e.style.opacity="1",e.style.pointerEvents="auto";let t=e.getRootNode&&e.getRootNode();t&&t.host&&t.host.style&&(B("Also showing Shadow DOM host",t.host),t.host.style.transition="all 0.3s ease-in",t.host.style.opacity="1",t.host.style.pointerEvents="auto")}})}function dn(){if(rt)return;B("Setting up modal observers");let o=new MutationObserver(n=>{B(`Attribute mutations detected: ${n.length}`),n.forEach(s=>{s.type==="attributes"&&(s.attributeName==="open"||s.attributeName==="class")&&(B(`Attribute changed: ${s.attributeName} on`,s.target),B(`Old value: ${s.oldValue}`),B(`New value: ${s.target.getAttribute(s.attributeName)}`),Ee())})}),e=new MutationObserver(n=>{B(`DOM mutations detected: ${n.length}`),n.forEach(s=>{s.type==="childList"&&(s.addedNodes.forEach(a=>{if(a.nodeType===Node.ELEMENT_NODE){let c='dialog.modal, dialog, .modal, [role="dialog"], .overlay, .popup';a.matches&&a.matches(c)&&(B("New modal element detected",a),o.observe(a,{attributes:!0,attributeFilter:["open","class","aria-hidden"],attributeOldValue:!0}),Ee());let l=a.querySelectorAll?a.querySelectorAll(c):[];l.length>0&&B(`Found ${l.length} nested modals`),l.forEach(u=>{B("Observing nested modal",u),o.observe(u,{attributes:!0,attributeFilter:["open","class","aria-hidden"],attributeOldValue:!0})}),l.length>0&&Ee()}}),s.removedNodes.length>0&&(B(`${s.removedNodes.length} nodes removed`),Ee()))})}),r=document.querySelectorAll('dialog.modal, dialog, .modal, [role="dialog"], .overlay, .popup');B(`Found ${r.length} existing modals`),r.forEach(n=>{B("Observing existing modal",n),o.observe(n,{attributes:!0,attributeFilter:["open","class","aria-hidden"],attributeOldValue:!0})}),e.observe(document.body,{childList:!0,subtree:!0}),rt=!0,B("Modal observers setup complete")}function Z(o){if(!o)return;se.add(o),rt||setTimeout(()=>{dn()},100);let e=t=>{(t.target===o||o.contains(t.target))&&Bt(o)};if(o.addEventListener("mousedown",e),o._bringToFrontHandler=e,!o.style.zIndex){o.style.zIndex=_e++;let t=o.getRootNode&&o.getRootNode();t&&t.host&&t.host.style&&(t.host.style.zIndex=o.style.zIndex)}Ee(),B("Window registered successfully",o)}function H(o){o&&(se.delete(o),oe.delete(o),o._bringToFrontHandler&&(o.removeEventListener("mousedown",o._bringToFrontHandler),delete o._bringToFrontHandler))}function Bt(o){if(!o||!se.has(o)||nt())return;_e++,o.style.zIndex=_e;let e=o.getRootNode&&o.getRootNode();e&&e.host&&e.host.style&&(e.host.style.zIndex=_e)}function un(){Ee()}function pn(){console.log("=== MODAL MANAGER DEBUG STATE ==="),console.log("Debug enabled:",zt),console.log("Observers setup:",rt),console.log("Windows registered:",se.size),console.log("Windows hidden by modal:",oe.size),console.log("Current max Z-Index:",_e),console.log("Any modal open:",nt()),console.log(`
--- Registered Windows ---`),se.forEach((e,t)=>{console.log(`Window ${t}:`,{element:e,zIndex:e.style.zIndex,opacity:e.style.opacity,isHidden:oe.has(e)})}),console.log(`
--- Current Modals ---`),document.querySelectorAll('dialog.modal[open], dialog[open], .modal[open], .modal.show, [role="dialog"]').forEach((e,t)=>{console.log(`Modal ${t}:`,{element:e,isOpen:e.hasAttribute("open")||e.classList.contains("show"),display:window.getComputedStyle(e).display,visibility:window.getComputedStyle(e).visibility})})}var _e,se,rt,oe,zt,ze=R(()=>{_e=1e5,se=new Set,rt=!1,oe=new Set,zt=!1;typeof window!="undefined"&&(window.setModalDebug=cn,window.debugModalState=pn,window.registerWindow=Z,window.unregisterWindow=H,window.__modalManagerDebug={windowElements:se,hiddenWindowsByModal:oe,isAnyModalOpen:nt,refreshWindowsVisibility:un},console.log("[WindowManager] Funciones expuestas globalmente autom\xE1ticamente"))});var Io,To=R(()=>{Io={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"Selecci\xF3n",user:"Usuario",charges:"Cargas",backend:"Backend",database:"Database",uptime:"Uptime",close:"Cerrar",launch:"Lanzar",loading:"Cargando\u2026",executing:"Ejecutando\u2026",downloading:"Descargando script\u2026",chooseBot:"Elige un bot y presiona Lanzar",readyToLaunch:"Listo para lanzar",loadError:"Error al cargar",loadErrorMsg:"No se pudo cargar el bot seleccionado. Revisa tu conexi\xF3n o int\xE9ntalo de nuevo.",checking:"\u{1F504} Verificando...",online:"\u{1F7E2} Online",offline:"\u{1F534} Offline",ok:"\u{1F7E2} OK",error:"\u{1F534} Error",unknown:"-",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Descargar Logs",clearLogs:"Limpiar Logs",closeLogs:"Cerrar",localExecution:"Ejecuci\xF3n local con acceso completo al sistema de tokens",botStarting:"Bot iniciando..."},image:{title:"WPlace Auto-Image",initBot:"Iniciar Auto-BOT",uploadImage:"Subir Imagen",resizeImage:"Redimensionar Imagen",selectPosition:"Seleccionar Posici\xF3n",startPainting:"Iniciar Pintura",stopPainting:"Detener Pintura",saveProgress:"Guardar Progreso",loadProgress:"Cargar Progreso",checkingColors:"\u{1F50D} Verificando colores disponibles...",noColorsFound:"\u274C \xA1Abre la paleta de colores en el sitio e int\xE9ntalo de nuevo!",colorsFound:"\u2705 {count} colores disponibles encontrados",loadingImage:"\u{1F5BC}\uFE0F Cargando imagen...",imageLoaded:"\u2705 Imagen cargada con {count} p\xEDxeles v\xE1lidos",imageError:"\u274C Error al cargar la imagen",selectPositionAlert:"\xA1Pinta el primer p\xEDxel en la ubicaci\xF3n donde quieres que comience el arte!",waitingPosition:"\u{1F446} Esperando que pintes el p\xEDxel de referencia...",positionSet:"\u2705 \xA1Posici\xF3n establecida con \xE9xito!",positionTimeout:"\u274C Tiempo agotado para seleccionar posici\xF3n",positionDetected:"\u{1F3AF} Posici\xF3n detectada, procesando...",positionError:"\u274C Error detectando posici\xF3n, int\xE9ntalo de nuevo",startPaintingMsg:"\u{1F3A8} Iniciando pintura...",paintingProgress:"\u{1F9F1} Progreso: {painted}/{total} p\xEDxeles...",noCharges:"\u231B Sin cargas. Esperando {time}...",paintingStopped:"\u23F9\uFE0F Pintura detenida por el usuario",paintingComplete:"\u2705 \xA1Pintura completada! {count} p\xEDxeles pintados.",paintingError:"\u274C Error durante la pintura",missingRequirements:"\u274C Carga una imagen y selecciona una posici\xF3n primero",progress:"Progreso",userName:"Usuario",pixels:"P\xEDxeles",charges:"Cargas",estimatedTime:"Tiempo estimado",initMessage:"Haz clic en 'Iniciar Auto-BOT' para comenzar",waitingInit:"Esperando inicializaci\xF3n...",resizeSuccess:"\u2705 Imagen redimensionada a {width}x{height}",paintingPaused:"\u23F8\uFE0F Pintura pausada en la posici\xF3n X: {x}, Y: {y}",pixelsPerBatch:"P\xEDxeles por lote",batchSize:"Tama\xF1o del lote",nextBatchTime:"Siguiente lote en",useAllCharges:"Usar todas las cargas disponibles",showOverlay:"Mostrar overlay",maxCharges:"Cargas m\xE1ximas por lote",waitingForCharges:"\u23F3 Esperando cargas: {current}/{needed}",timeRemaining:"Tiempo restante",cooldownWaiting:"\u23F3 Esperando {time} para continuar...",progressSaved:"\u2705 Progreso guardado como {filename}",progressLoaded:"\u2705 Progreso cargado: {painted}/{total} p\xEDxeles pintados",progressLoadError:"\u274C Error al cargar progreso: {error}",progressSaveError:"\u274C Error al guardar progreso: {error}",confirmSaveProgress:"\xBFDeseas guardar el progreso actual antes de detener?",saveProgressTitle:"Guardar Progreso",discardProgress:"Descartar",cancel:"Cancelar",minimize:"Minimizar",width:"Ancho",height:"Alto",keepAspect:"Mantener proporci\xF3n",apply:"Aplicar",overlayOn:"Overlay: ON",overlayOff:"Overlay: OFF",passCompleted:"\u2705 Pasada completada: {painted} p\xEDxeles pintados | Progreso: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 Esperando regeneraci\xF3n de cargas: {current}/{needed} - Tiempo: {time}",waitingChargesCountdown:"\u23F3 Esperando cargas: {current}/{needed} - Quedan: {time}",autoInitializing:"\u{1F916} Inicializando autom\xE1ticamente...",autoInitSuccess:"\u2705 Bot iniciado autom\xE1ticamente",autoInitFailed:"\u26A0\uFE0F No se pudo iniciar autom\xE1ticamente. Usa el bot\xF3n manual.",paletteDetected:"\u{1F3A8} Paleta de colores detectada",paletteNotFound:"\u{1F50D} Buscando paleta de colores...",clickingPaintButton:"\u{1F446} Haciendo clic en el bot\xF3n Paint...",paintButtonNotFound:"\u274C Bot\xF3n Paint no encontrado",manualInitRequired:"\u{1F527} Inicio manual requerido",retryAttempt:"\u{1F504} Reintento {attempt}/{maxAttempts} en {delay}s...",retryError:"\u{1F4A5} Error en intento {attempt}/{maxAttempts}, reintentando en {delay}s...",retryFailed:"\u274C Fall\xF3 despu\xE9s de {maxAttempts} intentos. Continuando con siguiente lote...",networkError:"\u{1F310} Error de red. Reintentando...",serverError:"\u{1F525} Error del servidor. Reintentando...",timeoutError:"\u23F0 Timeout del servidor. Reintentando...",saveProgressBtn:"Guardar progreso",guardJsonBtn:"Guard JSON",resizeWindowTitle:"Redimensionar Imagen",original:"Original",labTolerance:"Tolerancia LAB",maintainProportion:"Mantener proporci\xF3n",skipColor:"Skip Color",skipColorEnabled:"Skip colors that don't match exactly",similarityThreshold:"Similarity threshold",skipColorDescription:"Only exact color matches will be painted (100% similarity).",applyResize:"Aplicar",cancelResize:"Cancelar",patternSnake:"Serpiente (Zigzag)",patternDiagonalSweep:"Barrido diagonal",patternBorders:"Bordes primero",patternCenter:"Centro primero",patternQuadrants:"Cuadrantes",patternBiasedRandom:"Aleatorio sesgado (bordes)",patternClusters:"Clusters",patternProximity:"Proximidad",patternSweep:"Barrido por secciones",patternPriority:"Prioridad (mixto)",patternAnchorPoints:"Puntos de anclaje",patternSpiralCw:"Espiral (horaria)",patternSpiralCcw:"Espiral (antihoraria)",noProgressToSave:"No hay progreso para guardar",progressSaveSuccess:"Progreso guardado como {filename}",progressLoadSuccess:"Progreso cargado: {painted}/{total} p\xEDxeles pintados",invalidProgressFile:"Archivo de progreso inv\xE1lido",missingFields:"Faltan campos requeridos: {fields}",guardDialogTitle:"Generar Guard JSON",guardDialogMessage:"\xBFDeseas generar un archivo Guard JSON con los datos actuales?",guardDialogInfo:`Imagen: {name}
Dimensiones: {width}x{height}
P\xEDxeles: {pixels}`,generateGuard:"Generar Guard",guardJsonInvalidStructure:"\u274C Estructura inv\xE1lida para JSON del Guard. Abortando guardado.",guardJsonInvalidMessage:"Estructura inv\xE1lida del JSON del Guard. Vuelve a intentarlo tras seleccionar la posici\xF3n.",guardJsonSaveSuccess:"\u2705 JSON del Guard guardado: {filename}",guardJsonSaveError:"\u274C Error guardando JSON del Guard: {error}",notificationInfo:"Informaci\xF3n",notificationSuccess:"\xC9xito",notificationWarning:"Advertencia",notificationError:"Error",paintPattern:"\u{1F4D0} Patr\xF3n de pintado",patternLinearStart:"Lineal (Inicio)",patternLinearEnd:"Lineal (Final)",patternRandom:"Aleatorio",patternCenterOut:"Centro hacia afuera",patternCornersFirst:"Esquinas primero",patternSpiral:"Espiral",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Descargar Logs",clearLogs:"Limpiar Logs",closeLogs:"Cerrar",userInfo:"Informaci\xF3n del Usuario",imageProgress:"Progreso de la Imagen",availableColors:"Colores Disponibles",noImageLoaded:"No hay imagen cargada",cooldown:"Tiempo de espera",totalColors:"Total de Colores",colorPalette:"Paleta de Colores",showAllColors:"Mostrar Todos los Colores (incluyendo no disponibles)",selectAllColors:"Seleccionar Todos",unselectAllColors:"Deseleccionar Todos",noAvailable:"No disponible",colorSelected:"Color seleccionado",statsUpdated:"\u2705 Estad\xEDsticas actualizadas: {count} colores disponibles"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"Iniciar",stop:"Detener",stopped:"Bot detenido",calibrate:"Calibrar",paintOnce:"Una vez",checkingStatus:"Verificando estado...",configuration:"Configuraci\xF3n",delay:"Delay (ms)",pixelsPerBatch:"P\xEDxeles/lote",minCharges:"Cargas m\xEDn",colorMode:"Modo color",random:"Aleatorio",fixed:"Fijo",range:"Rango",fixedColor:"Color fijo",advanced:"Avanzado",tileX:"Tile X",tileY:"Tile Y",customPalette:"Paleta personalizada",paletteExample:"ej: #FF0000,#00FF00,#0000FF",capture:"Capturar",painted:"Pintados",charges:"Cargas",retries:"Fallos",position:"Posici\xF3n",tile:"Tile",configSaved:"Configuraci\xF3n guardada",configLoaded:"Configuraci\xF3n cargada",configReset:"Configuraci\xF3n reiniciada",captureInstructions:"Pinta un p\xEDxel manualmente para capturar coordenadas...",backendOnline:"Backend Online",backendOffline:"Backend Offline",startingBot:"Iniciando bot...",stoppingBot:"Deteniendo bot...",calibrating:"Calibrando...",alreadyRunning:"Auto-Farm ya est\xE1 corriendo.",imageRunningWarning:"Auto-Image est\xE1 ejecut\xE1ndose. Ci\xE9rralo antes de iniciar Auto-Farm.",selectPositionAlert:"\u{1F3AF} Pinta un p\xEDxel en una zona DESPOBLADA del mapa para establecer el \xE1rea de farming",waitingPosition:"\u{1F446} Esperando que pintes el p\xEDxel de referencia...",positionSet:"\u2705 \xA1Zona establecida!",positionTimeout:"\u274C Tiempo agotado para seleccionar zona",missingPosition:"\u274C Selecciona una zona primero usando 'Seleccionar Zona'",farmRadius:"Radio farm",positionInfo:"Zona actual",farmingInRadius:"\u{1F33E} Farming en radio {radius}px desde ({x},{y})",selectEmptyArea:"\u26A0\uFE0F IMPORTANTE: Selecciona una zona DESPOBLADA para evitar conflictos",noPosition:"Sin zona",currentZone:"Zona: ({x},{y})",autoSelectPosition:"\u{1F3AF} Selecciona una zona primero. Pinta un p\xEDxel en el mapa para establecer la zona de farming",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Descargar Logs",clearLogs:"Limpiar Logs",closeLogs:"Cerrar",ready:"Listo",once:"Una vez",recapture:"Re-capturar",selectPosition:"Select",stats:{painted:"Pintados",charges:"Cargas",droplets:"Gotas",user:"Usuario",retries:"Reintentos"},config:{minCharges:"Cargas m\xEDnimas",delay:"Espera (seg)",pixelsPerBatch:"P\xEDxeles por lote"},color:{fixed:"Fijo",range:"Rango",random:"Aleatorio",selected:"Color seleccionado",min:"M\xEDn",max:"M\xE1x"},autobuy:{title:"Auto-compra (+5 cargas)",hint:"Se activar\xE1 autom\xE1ticamente cuando tengas \u2265 500 gotas"},buyCharges:"Comprar +5 cargas",buying:"Comprando...",buyOk:"Compra realizada. Actualiza sesi\xF3n.",buyFail:"No se pudo comprar"},common:{yes:"S\xED",no:"No",ok:"Aceptar",cancel:"Cancelar",close:"Cerrar",save:"Guardar",load:"Cargar",delete:"Eliminar",edit:"Editar",start:"Iniciar",stop:"Detener",pause:"Pausar",resume:"Reanudar",reset:"Reiniciar",settings:"Configuraci\xF3n",help:"Ayuda",about:"Acerca de",language:"Idioma",loading:"Cargando...",error:"Error",success:"\xC9xito",warning:"Advertencia",info:"Informaci\xF3n",languageChanged:"Idioma cambiado a {language}"},guard:{title:"WPlace Auto-Guard",initBot:"Inicializar Guard-BOT",selectArea:"Seleccionar \xC1rea",save:"Guardar",loadFile:"Cargar Archivo",reposition:"Reposicionar",analyzeArea:"Analizar \xC1rea",logs:"Logs",watcher:"Vig\xEDa",configuration:"Configuraci\xF3n",startErase:"Iniciar Borrado",stopWatcher:"Detener Vig\xEDa",minimize:"Minimizar",expand:"Expandir",nextBatchIn:"Pr\xF3ximo lote en: ",captureArea:"Capturar \xC1rea",startProtection:"Iniciar",stopProtection:"Detener",protectedPixels:"P\xEDxeles Protegidos",upperLeft:"Esquina Superior Izquierda",lowerRight:"Esquina Inferior Derecha",detectedChanges:"Cambios Detectados",repairedPixels:"P\xEDxeles Reparados",charges:"Cargas",waitingInit:"Esperando inicializaci\xF3n...",checkingColors:"\u{1F3A8} Verificando colores disponibles...",noColorsFound:"\u274C No se encontraron colores. Abre la paleta de colores en el sitio.",colorsFound:"\u2705 {count} colores disponibles encontrados",initSuccess:"\u2705 Guard-BOT inicializado correctamente",initError:"\u274C Error inicializando Guard-BOT",invalidCoords:"\u274C Coordenadas inv\xE1lidas",invalidArea:"\u274C El \xE1rea debe tener esquina superior izquierda menor que inferior derecha",areaTooLarge:"\u274C \xC1rea demasiado grande: {size} p\xEDxeles (m\xE1ximo: {max})",capturingArea:"\u{1F4F8} Capturando \xE1rea...",areaCaptured:"\u2705 \xC1rea capturada: {count} p\xEDxeles",captureError:"\u274C Error capturando \xE1rea: {error}",captureFirst:"\u274C Primero captura un \xE1rea",noChanges:"\u2705 \xC1rea - sin cambios detectados",changesDetected:"\u{1F6A8} {count} cambios detectados en el \xE1rea",repairing:"\u{1F6E0}\uFE0F Reparando {count} p\xEDxeles alterados...",repairedSuccess:"\u2705 Reparados {count} p\xEDxeles correctamente",repairError:"\u274C Error reparando p\xEDxeles: {error}",noCharges:"\u26A0\uFE0F Sin cargas suficientes para reparar cambios",checkingChanges:"\u{1F50D} Verificando cambios en \xE1rea...",errorChecking:"\u274C Error verificando cambios: {error}",guardActive:"\u{1F6E1}\uFE0F Guardi\xE1n activo - \xE1rea monitoreada",lastCheck:"\xDAltima verificaci\xF3n: {time}",nextCheck:"Pr\xF3xima verificaci\xF3n en: {time}s",autoInitializing:"\u{1F916} Inicializando autom\xE1ticamente...",autoInitSuccess:"\u2705 Guard-BOT iniciado autom\xE1ticamente",autoInitFailed:"\u26A0\uFE0F No se pudo iniciar autom\xE1ticamente. Usa el bot\xF3n manual.",manualInitRequired:"\u{1F527} Inicio manual requerido",paletteDetected:"\u{1F3A8} Paleta de colores detectada",paletteNotFound:"\u{1F50D} Buscando paleta de colores...",clickingPaintButton:"\u{1F446} Haciendo clic en el bot\xF3n Paint...",paintButtonNotFound:"\u274C Bot\xF3n Paint no encontrado",protectionStopped:"\u23F9\uFE0F Protecci\xF3n detenida",selectUpperLeft:"\u{1F3AF} Pinta un p\xEDxel en la esquina SUPERIOR IZQUIERDA del \xE1rea a monitorear",selectLowerRight:"\u{1F3AF} Ahora pinta un p\xEDxel en la esquina INFERIOR DERECHA del \xE1rea",waitingUpperLeft:"\u{1F446} Esperando selecci\xF3n de esquina superior izquierda...",waitingLowerRight:"\u{1F446} Esperando selecci\xF3n de esquina inferior derecha...",upperLeftCaptured:"\u2705 Esquina superior izquierda capturada: ({x}, {y})",lowerRightCaptured:"\u2705 Esquina inferior derecha capturada: ({x}, {y})",selectionTimeout:"\u274C Tiempo agotado para selecci\xF3n",selectionError:"\u274C Error en selecci\xF3n, int\xE9ntalo de nuevo",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Descargar Logs",clearLogs:"Limpiar Logs",closeLogs:"Cerrar",analysisTitle:"An\xE1lisis de Diferencias - JSON vs Canvas Actual",correctPixels:"P\xEDxeles Correctos",incorrectPixels:"P\xEDxeles Incorrectos",missingPixels:"P\xEDxeles Faltantes",showCorrect:"Mostrar Correctos",showIncorrect:"Mostrar Incorrectos",showMissing:"Mostrar Faltantes",autoRefresh:"Auto-refresco",zoomAdjusted:"Zoom ajustado autom\xE1ticamente a",autoRefreshEnabled:"Auto-refresco activado cada",autoRefreshDisabled:"Auto-refresco desactivado",autoRefreshIntervalUpdated:"Intervalo de auto-refresco actualizado a",visualizationUpdated:"Visualizaci\xF3n actualizada",noAreaOrPixels:"No hay \xE1rea protegida o p\xEDxeles cargados para analizar",noColorsDetected:"No se pueden detectar colores. Aseg\xFArate de que la paleta est\xE9 abierta.",sessionRecordingStarted:"Grabaci\xF3n de sesi\xF3n iniciada con autorefresh activado",sessionRecordingStopped:"Grabaci\xF3n de sesi\xF3n detenida",noSessionData:"No hay datos de sesi\xF3n para descargar",sessionDataDownloaded:"Datos de sesi\xF3n descargados",snapshotCaptureError:"Error al capturar la imagen",recordSession:"Grabar Sesi\xF3n",snapshot:"Snapshot",downloadData:"Descargar Datos",zoom:"Zoom",interval:"Intervalo",seconds:"segundos",updateAnalysis:"Actualizar An\xE1lisis",adjustZoom:"Ajustar Zoom",precision:"Precisi\xF3n",statistics:"Estad\xEDsticas",visualization:"Visualizaci\xF3n",recording:"Grabaci\xF3n",configTitle:"Configuraci\xF3n del Guard",protectionPatterns:"Patrones de Protecci\xF3n",preferSpecificColor:"Priorizar color espec\xEDfico",excludeSpecificColors:"No reparar colores espec\xEDficos",loadManagement:"Gesti\xF3n de Cargas",minLoadsToWait:"M\xEDnimo de cargas:",pixelsPerBatch:"P\xEDxeles por lote",spendAllPixelsOnStart:"Gastar todos los p\xEDxeles al iniciar",waitTimes:"Tiempos de Espera",useRandomTimes:"Usar tiempos aleatorios entre lotes",minTime:"Tiempo m\xEDnimo (s)",maxTime:"Tiempo m\xE1ximo (s)"},slave:{title:"WPlace Slave",masterServer:"Servidor Maestro",ipAddress:"Direcci\xF3n IP",connect:"Conectar",disconnect:"Desconectar",status:"Estado",slaveId:"ID Slave",mode:"Modo",running:"Ejecutando",idle:"Inactivo",connected:"Conectado",connecting:"Conectando...",disconnected:"Desconectado",error:"Error",close:"Cerrar",telemetry:"Telemetr\xEDa",repairedPixels:"P\xEDxeles Reparados",missingPixels:"P\xEDxeles Faltantes",absentPixels:"P\xEDxeles Ausentes",remainingCharges:"Cargas Restantes",connectionError:"Error de conexi\xF3n. Verifica la URL y que el servidor est\xE9 ejecut\xE1ndose.",invalidUrl:"Por favor ingresa una URL v\xE1lida",httpsUpgrade:"P\xE1gina HTTPS: cambiando a wss:// para evitar contenido mixto.",slaveRunning:"Slave ya est\xE1 ejecut\xE1ndose.",slaveInitialized:"Slave inicializado correctamente",slaveError:"Error inicializando Slave",masterConnected:"Conectado al servidor maestro",masterDisconnected:"Desconectado del servidor maestro",reconnecting:"Reintentando conexi\xF3n",maxReconnectAttempts:"M\xE1ximo de intentos de reconexi\xF3n alcanzado",modeSet:"Modo configurado",projectLoaded:"Configuraci\xF3n del proyecto cargada",botStarted:"Bot iniciado",botStopped:"Bot detenido",botPaused:"Bot pausado"}}});var Ao,ko=R(()=>{Ao={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"Selection",user:"User",charges:"Charges",backend:"Backend",database:"Database",uptime:"Uptime",close:"Close",launch:"Launch",loading:"Loading\u2026",executing:"Executing\u2026",downloading:"Downloading script\u2026",chooseBot:"Choose a bot and press Launch",readyToLaunch:"Ready to launch",loadError:"Load error",loadErrorMsg:"Could not load the selected bot. Check your connection or try again.",checking:"\u{1F504} Checking...",online:"\u{1F7E2} Online",offline:"\u{1F534} Offline",ok:"\u{1F7E2} OK",error:"\u{1F534} Error",unknown:"-",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Download Logs",clearLogs:"Clear Logs",closeLogs:"Close",localExecution:"Local execution with full access to token system",botStarting:"Bot starting..."},image:{title:"WPlace Auto-Image",initBot:"Initialize Auto-BOT",uploadImage:"Upload Image",resizeImage:"Resize Image",selectPosition:"Select Position",startPainting:"Start Painting",stopPainting:"Stop Painting",saveProgress:"Save Progress",loadProgress:"Load Progress",checkingColors:"\u{1F50D} Checking available colors...",noColorsFound:"\u274C Open the color palette on the site and try again!",colorsFound:"\u2705 Found {count} available colors",loadingImage:"\u{1F5BC}\uFE0F Loading image...",imageLoaded:"\u2705 Image loaded with {count} valid pixels",imageError:"\u274C Error loading image",selectPositionAlert:"Paint the first pixel at the location where you want the art to start!",waitingPosition:"\u{1F446} Waiting for you to paint the reference pixel...",positionSet:"\u2705 Position set successfully!",positionTimeout:"\u274C Timeout for position selection",positionDetected:"\u{1F3AF} Position detected, processing...",positionError:"\u274C Error detecting position, please try again",startPaintingMsg:"\u{1F3A8} Starting painting...",paintingProgress:"\u{1F9F1} Progress: {painted}/{total} pixels...",noCharges:"\u231B No charges. Waiting {time}...",paintingStopped:"\u23F9\uFE0F Painting stopped by user",paintingComplete:"\u2705 Painting completed! {count} pixels painted.",paintingError:"\u274C Error during painting",missingRequirements:"\u274C Load an image and select a position first",progress:"Progress",userName:"User",pixels:"Pixels",charges:"Charges",estimatedTime:"Estimated time",initMessage:"Click 'Initialize Auto-BOT' to begin",waitingInit:"Waiting for initialization...",resizeSuccess:"\u2705 Image resized to {width}x{height}",paintingPaused:"\u23F8\uFE0F Painting paused at position X: {x}, Y: {y}",pixelsPerBatch:"Pixels per batch",batchSize:"Batch size",nextBatchTime:"Next batch in",useAllCharges:"Use all available charges",showOverlay:"Show overlay",maxCharges:"Max charges per batch",waitingForCharges:"\u23F3 Waiting for charges: {current}/{needed}",timeRemaining:"Time remaining",cooldownWaiting:"\u23F3 Waiting {time} to continue...",progressSaved:"\u2705 Progress saved as {filename}",progressLoaded:"\u2705 Progress loaded: {painted}/{total} pixels painted",progressLoadError:"\u274C Error loading progress: {error}",progressSaveError:"\u274C Error saving progress: {error}",confirmSaveProgress:"Do you want to save the current progress before stopping?",saveProgressTitle:"Save Progress",discardProgress:"Discard",cancel:"Cancel",minimize:"Minimize",width:"Width",height:"Height",keepAspect:"Keep aspect ratio",apply:"Apply",overlayOn:"Overlay: ON",overlayOff:"Overlay: OFF",passCompleted:"\u2705 Pass completed: {painted} pixels painted | Progress: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 Waiting for charge regeneration: {current}/{needed} - Time: {time}",waitingChargesCountdown:"\u23F3 Waiting for charges: {current}/{needed} - Remaining: {time}",autoInitializing:"\u{1F916} Auto-initializing...",autoInitSuccess:"\u2705 Bot auto-started successfully",autoInitFailed:"\u26A0\uFE0F Could not auto-start. Use manual button.",paletteDetected:"\u{1F3A8} Color palette detected",paletteNotFound:"\u{1F50D} Searching for color palette...",clickingPaintButton:"\u{1F446} Clicking Paint button...",paintButtonNotFound:"\u274C Paint button not found",manualInitRequired:"\u{1F527} Manual initialization required",retryAttempt:"\u{1F504} Retry {attempt}/{maxAttempts} in {delay}s...",retryError:"\u{1F4A5} Error in attempt {attempt}/{maxAttempts}, retrying in {delay}s...",retryFailed:"\u274C Failed after {maxAttempts} attempts. Continuing with next batch...",networkError:"\u{1F310} Network error. Retrying...",serverError:"\u{1F525} Server error. Retrying...",timeoutError:"\u23F0 Server timeout, retrying...",saveProgressBtn:"Save progress",guardJsonBtn:"Guard JSON",resizeWindowTitle:"Resize Image",original:"Original",labTolerance:"LAB Tolerance",maintainProportion:"Maintain proportion",skipColor:"Skip Color",skipColorEnabled:"Skip colors that don't match exactly",similarityThreshold:"Similarity threshold",skipColorDescription:"Only exact color matches will be painted (100% similarity).",applyResize:"Apply",cancelResize:"Cancel",patternSnake:"Snake (Zigzag)",patternDiagonalSweep:"Diagonal sweep",patternBorders:"Borders first",patternCenter:"Center first",patternQuadrants:"Quadrants",patternBiasedRandom:"Biased random (edges)",patternClusters:"Clusters",patternProximity:"Proximity",patternSweep:"Sweep by sections",patternPriority:"Priority (mixed)",patternAnchorPoints:"Anchor points",patternSpiralCw:"Spiral (clockwise)",patternSpiralCcw:"Spiral (counter-clockwise)",noProgressToSave:"No progress to save",progressSaveSuccess:"Progress saved as {filename}",progressLoadSuccess:"Progress loaded: {painted}/{total} pixels painted",invalidProgressFile:"Invalid progress file",missingFields:"Missing required fields: {fields}",guardDialogTitle:"Generate Guard JSON",guardDialogMessage:"Do you want to generate a Guard JSON file with current data?",guardDialogInfo:`Image: {name}
Dimensions: {width}x{height}
Pixels: {pixels}`,generateGuard:"Generate Guard",guardJsonInvalidStructure:"\u274C Invalid structure for Guard JSON. Aborting save.",guardJsonInvalidMessage:"Invalid Guard JSON structure. Try again after selecting position.",guardJsonSaveSuccess:"\u2705 Guard JSON saved: {filename}",guardJsonSaveError:"\u274C Error saving Guard JSON: {error}",notificationInfo:"Information",notificationSuccess:"Success",notificationWarning:"Warning",notificationError:"Error",paintPattern:"\uFFFD Paint pattern",patternLinearStart:"Linear (Start)",patternLinearEnd:"Linear (End)",patternRandom:"Random",patternCenterOut:"Center outward",patternCornersFirst:"Corners first",patternSpiral:"Spiral",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Download Logs",clearLogs:"Clear Logs",closeLogs:"Close",userInfo:"User Information",imageProgress:"Image Progress",availableColors:"Available Colors",noImageLoaded:"No image loaded",cooldown:"Cooldown",totalColors:"Total Colors",colorPalette:"Color Palette",showAllColors:"Show All Colors (including unavailable)",selectAllColors:"Select All",unselectAllColors:"Unselect All",noAvailable:"Not available",colorSelected:"Color selected",statsUpdated:"\u2705 Statistics updated: {count} colors available"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"Start",stop:"Stop",stopped:"Bot stopped",calibrate:"Calibrate",paintOnce:"Once",checkingStatus:"Checking status...",configuration:"Configuration",delay:"Delay (ms)",pixelsPerBatch:"Pixels/batch",minCharges:"Min charges",colorMode:"Color mode",random:"Random",fixed:"Fixed",range:"Range",fixedColor:"Fixed color",advanced:"Advanced",tileX:"Tile X",tileY:"Tile Y",customPalette:"Custom palette",paletteExample:"e.g: #FF0000,#00FF00,#0000FF",capture:"Capture",painted:"Painted",charges:"Charges",retries:"Retries",position:"Position",tile:"Tile",configSaved:"Configuration saved",configLoaded:"Configuration loaded",configReset:"Configuration reset",captureInstructions:"Paint a pixel manually to capture coordinates...",backendOnline:"Backend Online",backendOffline:"Backend Offline",startingBot:"Starting bot...",stoppingBot:"Stopping bot...",calibrating:"Calibrating...",alreadyRunning:"Auto-Farm is already running.",imageRunningWarning:"Auto-Image is running. Close it before starting Auto-Farm.",selectPositionAlert:"\u{1F3AF} Paint a pixel in an EMPTY area of the map to set the farming zone",waitingPosition:"\u{1F446} Waiting for you to paint the reference pixel...",positionSet:"\u2705 Zone set!",positionTimeout:"\u274C Timeout for zone selection",missingPosition:"\u274C Select a zone first using 'Select Zone'",farmRadius:"Farm radius",positionInfo:"Current zone",farmingInRadius:"\u{1F33E} Farming in {radius}px radius from ({x},{y})",selectEmptyArea:"\u26A0\uFE0F IMPORTANT: Select an EMPTY area to avoid conflicts",noPosition:"No zone",currentZone:"Zone: ({x},{y})",autoSelectPosition:"\u{1F3AF} Select a zone first. Paint a pixel on the map to set the farming zone",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Download Logs",clearLogs:"Clear Logs",closeLogs:"Close",ready:"Ready",once:"Once",recapture:"Re-capture",selectPosition:"Select",stats:{painted:"Painted",charges:"Charges",droplets:"Droplets",user:"User",retries:"Retries"},config:{minCharges:"Minimum charges",delay:"Wait (sec)",pixelsPerBatch:"Pixels per batch"},color:{fixed:"Fixed",range:"Range",random:"Random",selected:"Selected color",min:"Min",max:"Max"},autobuy:{title:"Auto-buy (+5 charges)",hint:"Will activate automatically when you have \u2265 500 droplets"},buyCharges:"Buy +5 charges",buying:"Buying...",buyOk:"Purchase completed. Refresh session.",buyFail:"Could not purchase"},common:{yes:"Yes",no:"No",ok:"OK",cancel:"Cancel",close:"Close",save:"Save",load:"Load",delete:"Delete",edit:"Edit",start:"Start",stop:"Stop",pause:"Pause",resume:"Resume",reset:"Reset",settings:"Settings",help:"Help",about:"About",language:"Language",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",info:"Information",languageChanged:"Language changed to {language}"},guard:{title:"WPlace Auto-Guard",initBot:"Initialize Guard-BOT",selectArea:"Select Area",save:"Save",loadFile:"Load File",reposition:"Reposition",analyzeArea:"Analyze Area",logs:"Logs",watcher:"Watcher",configuration:"Configuration",startErase:"Start Erase",stopWatcher:"Stop Watcher",minimize:"Minimize",expand:"Expand",nextBatchIn:"Next batch in: ",captureArea:"Capture Area",startProtection:"Start",stopProtection:"Stop",protectedPixels:"Protected Pixels",upperLeft:"Upper Left Corner",lowerRight:"Lower Right Corner",detectedChanges:"Detected Changes",repairedPixels:"Repaired Pixels",charges:"Charges",waitingInit:"Waiting for initialization...",checkingColors:"\u{1F3A8} Checking available colors...",noColorsFound:"\u274C No colors found. Open the color palette on the site.",colorsFound:"\u2705 Found {count} available colors",initSuccess:"\u2705 Guard-BOT initialized successfully",initError:"\u274C Error initializing Guard-BOT",invalidCoords:"\u274C Invalid coordinates",invalidArea:"\u274C Area must have upper left corner less than lower right corner",areaTooLarge:"\u274C Area too large: {size} pixels (maximum: {max})",capturingArea:"\u{1F4F8} Capturing area...",areaCaptured:"\u2705 Area captured: {count} pixels",captureError:"\u274C Error capturing area: {error}",captureFirst:"\u274C First capture an area",noChanges:"\u2705 Area - no changes detected",changesDetected:"\u{1F6A8} {count} changes detected in area",repairing:"\u{1F6E0}\uFE0F Repairing {count} altered pixels...",repairedSuccess:"\u2705 Successfully repaired {count} pixels",repairError:"\u274C Error repairing pixels: {error}",noCharges:"\u26A0\uFE0F Insufficient charges to repair changes",checkingChanges:"\u{1F50D} Checking changes in area...",errorChecking:"\u274C Error checking changes: {error}",guardActive:"\u{1F6E1}\uFE0F Guardian active - area monitored",lastCheck:"Last check: {time}",nextCheck:"Next check in: {time}s",autoInitializing:"\u{1F916} Auto-initializing...",autoInitSuccess:"\u2705 Guard-BOT auto-started successfully",autoInitFailed:"\u26A0\uFE0F Could not auto-start. Use manual button.",manualInitRequired:"\u{1F527} Manual initialization required",paletteDetected:"\u{1F3A8} Color palette detected",paletteNotFound:"\u{1F50D} Searching for color palette...",clickingPaintButton:"\u{1F446} Clicking Paint button...",paintButtonNotFound:"\u274C Paint button not found",protectionStopped:"\u23F9\uFE0F Protection stopped",selectUpperLeft:"\u{1F3AF} Paint a pixel at the UPPER LEFT corner of the area to monitor",selectLowerRight:"\u{1F3AF} Now paint a pixel at the LOWER RIGHT corner of the area",waitingUpperLeft:"\u{1F446} Waiting for upper left corner selection...",waitingLowerRight:"\u{1F446} Waiting for lower right corner selection...",upperLeftCaptured:"\u2705 Upper left corner captured: ({x}, {y})",lowerRightCaptured:"\u2705 Lower right corner captured: ({x}, {y})",selectionTimeout:"\u274C Selection timeout",selectionError:"\u274C Selection error, please try again",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Download Logs",clearLogs:"Clear Logs",closeLogs:"Close",analysisTitle:"Difference Analysis - JSON vs Current Canvas",correctPixels:"Correct Pixels",incorrectPixels:"Incorrect Pixels",missingPixels:"Missing Pixels",showCorrect:"Show Correct",showIncorrect:"Show Incorrect",showMissing:"Show Missing",autoRefresh:"Auto-refresh",zoomAdjusted:"Zoom automatically adjusted to",autoRefreshEnabled:"Auto-refresh enabled every",autoRefreshDisabled:"Auto-refresh disabled",autoRefreshIntervalUpdated:"Auto-refresh interval updated to",visualizationUpdated:"Visualization updated",noAreaOrPixels:"No protected area or pixels loaded to analyze",noColorsDetected:"Cannot detect colors. Make sure the palette is open.",sessionRecordingStarted:"Session recording started with autorefresh enabled",sessionRecordingStopped:"Session recording stopped",noSessionData:"No session data to download",sessionDataDownloaded:"Session data downloaded",snapshotCaptureError:"Error capturing image",recordSession:"Record Session",snapshot:"Snapshot",downloadData:"Download Data",zoom:"Zoom",interval:"Interval",seconds:"seconds",updateAnalysis:"Update Analysis",adjustZoom:"Adjust Zoom",precision:"Precision",statistics:"Statistics",visualization:"Visualization",recording:"Recording",configTitle:"Guard Configuration",protectionPatterns:"Protection Patterns",preferSpecificColor:"Prioritize specific color",excludeSpecificColors:"Don't repair specific colors",loadManagement:"Load Management",minLoadsToWait:"Minimum loads:",pixelsPerBatch:"Pixels per batch",spendAllPixelsOnStart:"Spend all pixels on start",waitTimes:"Wait Times",useRandomTimes:"Use random times between batches",minTime:"Minimum time (s)",maxTime:"Maximum time (s)"},slave:{title:"WPlace Slave",masterServer:"Master Server",ipAddress:"IP Address",connect:"Connect",disconnect:"Disconnect",status:"Status",slaveId:"Slave ID",mode:"Mode",running:"Running",idle:"Idle",connected:"Connected",connecting:"Connecting...",disconnected:"Disconnected",error:"Error",close:"Close",telemetry:"Telemetry",repairedPixels:"Repaired Pixels",missingPixels:"Missing Pixels",absentPixels:"Absent Pixels",remainingCharges:"Remaining Charges",connectionError:"Connection error. Check URL and that server is running.",invalidUrl:"Please enter a valid URL",httpsUpgrade:"HTTPS page: switching to wss:// to avoid mixed content.",slaveRunning:"Slave is already running.",slaveInitialized:"Slave initialized successfully",slaveError:"Error initializing Slave",masterConnected:"Connected to master server",masterDisconnected:"Disconnected from master server",reconnecting:"Retrying connection",maxReconnectAttempts:"Maximum reconnection attempts reached",modeSet:"Mode configured",projectLoaded:"Project configuration loaded",botStarted:"Bot started",botStopped:"Bot stopped",botPaused:"Bot paused"}}});var Lo,Ro=R(()=>{Lo={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"Auswahl",user:"Benutzer",charges:"Ladungen",backend:"Backend",database:"Datenbank",uptime:"Laufzeit",close:"Schlie\xDFen",launch:"Starten",loading:"L\xE4dt\u2026",executing:"Wird ausgef\xFChrt\u2026",downloading:"Skript wird heruntergeladen\u2026",chooseBot:"W\xE4hle einen Bot und dr\xFCcke Starten",readyToLaunch:"Bereit zum Starten",loadError:"Ladefehler",loadErrorMsg:"Der ausgew\xE4hlte Bot konnte nicht geladen werden. \xDCberpr\xFCfe deine Verbindung oder versuche es erneut.",checking:"\u{1F504} \xDCberpr\xFCfe...",online:"\u{1F7E2} Online",offline:"\u{1F534} Offline",ok:"\u{1F7E2} OK",error:"\u{1F534} Fehler",unknown:"-",logWindow:"Protokolle",logWindowTitle:"Protokolle - {botName}",downloadLogs:"Protokolle herunterladen",clearLogs:"Protokolle l\xF6schen",closeLogs:"Schlie\xDFen",localExecution:"Lokale Ausf\xFChrung mit vollem Zugriff auf das Token-System",botStarting:"Bot startet..."},image:{title:"WPlace Auto-Image",initBot:"Auto-BOT initialisieren",uploadImage:"Bild hochladen",resizeImage:"Bildgr\xF6\xDFe \xE4ndern",selectPosition:"Position ausw\xE4hlen",startPainting:"Malen starten",stopPainting:"Malen stoppen",saveProgress:"Fortschritt speichern",loadProgress:"Fortschritt laden",checkingColors:"\u{1F50D} Verf\xFCgbare Farben werden \xFCberpr\xFCft...",noColorsFound:"\u274C \xD6ffne die Farbpalette auf der Seite und versuche es erneut!",colorsFound:"\u2705 {count} verf\xFCgbare Farben gefunden",loadingImage:"\u{1F5BC}\uFE0F Bild wird geladen...",imageLoaded:"\u2705 Bild mit {count} g\xFCltigen Pixeln geladen",imageError:"\u274C Fehler beim Laden des Bildes",selectPositionAlert:"Male den ersten Pixel an die Stelle, an der das Kunstwerk beginnen soll!",waitingPosition:"\u{1F446} Warte darauf, dass du den Referenzpixel malst...",positionSet:"\u2705 Position erfolgreich gesetzt!",positionTimeout:"\u274C Zeit\xFCberschreitung bei der Positionsauswahl",positionDetected:"\u{1F3AF} Position erkannt, wird verarbeitet...",positionError:"\u274C Fehler bei der Positionserkennung, bitte versuche es erneut",startPaintingMsg:"\u{1F3A8} Malen wird gestartet...",paintingProgress:"\u{1F9F1} Fortschritt: {painted}/{total} Pixel...",noCharges:"\u231B Keine Ladungen. Warte {time}...",paintingStopped:"\u23F9\uFE0F Malen vom Benutzer gestoppt",paintingComplete:"\u2705 Malen abgeschlossen! {count} Pixel gemalt.",paintingError:"\u274C Fehler beim Malen",missingRequirements:"\u274C Lade zuerst ein Bild und w\xE4hle eine Position aus",progress:"Fortschritt",userName:"Benutzer",pixels:"Pixel",charges:"Ladungen",estimatedTime:"Gesch\xE4tzte Zeit",initMessage:"Klicke auf 'Auto-BOT initialisieren', um zu beginnen",waitingInit:"Warte auf Initialisierung...",resizeSuccess:"\u2705 Bildgr\xF6\xDFe ge\xE4ndert auf {width}x{height}",paintingPaused:"\u23F8\uFE0F Malen pausiert bei Position X: {x}, Y: {y}",pixelsPerBatch:"Pixel pro Durchgang",batchSize:"Durchgangsgr\xF6\xDFe",nextBatchTime:"N\xE4chster Durchgang in",useAllCharges:"Alle verf\xFCgbaren Ladungen verwenden",showOverlay:"Overlay anzeigen",maxCharges:"Maximale Ladungen pro Durchgang",waitingForCharges:"\u23F3 Warte auf Ladungen: {current}/{needed}",timeRemaining:"Verbleibende Zeit",cooldownWaiting:"\u23F3 Warte {time} zum Fortfahren...",progressSaved:"\u2705 Fortschritt gespeichert als {filename}",progressLoaded:"\u2705 Fortschritt geladen: {painted}/{total} Pixel gemalt",progressLoadError:"\u274C Fehler beim Laden des Fortschritts: {error}",progressSaveError:"\u274C Fehler beim Speichern des Fortschritts: {error}",confirmSaveProgress:"M\xF6chtest du den aktuellen Fortschritt vor dem Stoppen speichern?",saveProgressTitle:"Fortschritt speichern",discardProgress:"Verwerfen",cancel:"Abbrechen",minimize:"Minimieren",width:"Breite",height:"H\xF6he",keepAspect:"Seitenverh\xE4ltnis beibehalten",apply:"Anwenden",overlayOn:"Overlay: AN",overlayOff:"Overlay: AUS",passCompleted:"\u2705 Durchgang abgeschlossen: {painted} Pixel gemalt | Fortschritt: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 Warte auf Ladungsregeneration: {current}/{needed} - Zeit: {time}",waitingChargesCountdown:"\u23F3 Warte auf Ladungen: {current}/{needed} - Verbleibend: {time}",autoInitializing:"\u{1F916} Automatische Initialisierung...",autoInitSuccess:"\u2705 Bot automatisch erfolgreich gestartet",autoInitFailed:"\u26A0\uFE0F Automatischer Start nicht m\xF6glich. Benutze die manuelle Schaltfl\xE4che.",paletteDetected:"\u{1F3A8} Farbpalette erkannt",paletteNotFound:"\u{1F50D} Suche nach Farbpalette...",clickingPaintButton:"\u{1F446} Klicke auf die Malen-Schaltfl\xE4che...",paintButtonNotFound:"\u274C Malen-Schaltfl\xE4che nicht gefunden",manualInitRequired:"\u{1F527} Manuelle Initialisierung erforderlich",retryAttempt:"\u{1F504} Versuch {attempt}/{maxAttempts} in {delay}s...",retryError:"\u{1F4A5} Fehler bei Versuch {attempt}/{maxAttempts}, neuer Versuch in {delay}s...",retryFailed:"\u274C Nach {maxAttempts} Versuchen fehlgeschlagen. Weiter mit dem n\xE4chsten Durchgang...",networkError:"\u{1F310} Netzwerkfehler. Neuer Versuch...",serverError:"\u{1F525} Serverfehler. Neuer Versuch...",timeoutError:"\u23F0 Server-Zeit\xFCberschreitung, neuer Versuch...",saveProgressBtn:"Fortschritt speichern",guardJsonBtn:"Guard JSON",resizeWindowTitle:"Bildgr\xF6\xDFe \xE4ndern",original:"Original",labTolerance:"LAB-Toleranz",maintainProportion:"Proportionen beibehalten",skipColor:"Farbe \xFCberspringen",skipColorEnabled:"Farben \xFCberspringen, die nicht genau passen",similarityThreshold:"\xC4hnlichkeitsschwelle",skipColorDescription:"Nur exakte Farb\xFCbereinstimmungen werden gemalt (100% \xC4hnlichkeit).",applyResize:"Anwenden",cancelResize:"Abbrechen",patternSnake:"Schlange (Zickzack)",patternDiagonalSweep:"Diagonales Wischen",patternBorders:"Zuerst R\xE4nder",patternCenter:"Zuerst Mitte",patternQuadrants:"Quadranten",patternBiasedRandom:"Verzerrtes Zuf\xE4llig (R\xE4nder)",patternClusters:"Cluster",patternProximity:"N\xE4he",patternSweep:"Wischen nach Abschnitten",patternPriority:"Priorit\xE4t (gemischt)",patternAnchorPoints:"Ankerpunkte",patternSpiralCw:"Spirale (im Uhrzeigersinn)",patternSpiralCcw:"Spirale (gegen Uhrzeigersinn)",noProgressToSave:"Kein Fortschritt zum Speichern",progressSaveSuccess:"Fortschritt gespeichert als {filename}",progressLoadSuccess:"Fortschritt geladen: {painted}/{total} Pixel gemalt",invalidProgressFile:"Ung\xFCltige Fortschrittsdatei",missingFields:"Fehlende erforderliche Felder: {fields}",guardDialogTitle:"Guard JSON generieren",guardDialogMessage:"M\xF6chtest du eine Guard JSON-Datei mit den aktuellen Daten generieren?",guardDialogInfo:`Bild: {name}
Abmessungen: {width}x{height}
Pixel: {pixels}`,generateGuard:"Guard generieren",guardJsonInvalidStructure:"\u274C Ung\xFCltige Struktur f\xFCr Guard JSON. Speichern wird abgebrochen.",guardJsonInvalidMessage:"Ung\xFCltige Guard JSON-Struktur. Versuche es erneut nach der Positionsauswahl.",guardJsonSaveSuccess:"\u2705 Guard JSON gespeichert: {filename}",guardJsonSaveError:"\u274C Fehler beim Speichern des Guard JSON: {error}",notificationInfo:"Information",notificationSuccess:"Erfolg",notificationWarning:"Warnung",notificationError:"Fehler",paintPattern:"\uFFFD Malmuster",patternLinearStart:"Linear (Start)",patternLinearEnd:"Linear (Ende)",patternRandom:"Zuf\xE4llig",patternCenterOut:"Von der Mitte nach au\xDFen",patternCornersFirst:"Zuerst Ecken",patternSpiral:"Spirale",logWindow:"Protokolle",logWindowTitle:"Protokolle - {botName}",downloadLogs:"Protokolle herunterladen",clearLogs:"Protokolle l\xF6schen",closeLogs:"Schlie\xDFen",userInfo:"Benutzerinformationen",imageProgress:"Bildfortschritt",availableColors:"Verf\xFCgbare Farben",noImageLoaded:"Kein Bild geladen",cooldown:"Abklingzeit",totalColors:"Gesamte Farben",colorPalette:"Farbpalette",showAllColors:"Alle Farben anzeigen (einschlie\xDFlich nicht verf\xFCgbare)",selectAllColors:"Alle ausw\xE4hlen",unselectAllColors:"Alle abw\xE4hlen",noAvailable:"Nicht verf\xFCgbar",colorSelected:"Farbe ausgew\xE4hlt",statsUpdated:"\u2705 Statistiken aktualisiert: {count} Farben verf\xFCgbar"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"Starten",stop:"Stoppen",stopped:"Bot gestoppt",calibrate:"Kalibrieren",paintOnce:"Einmalig",checkingStatus:"Status wird \xFCberpr\xFCft...",configuration:"Konfiguration",delay:"Verz\xF6gerung (ms)",pixelsPerBatch:"Pixel/Durchgang",minCharges:"Min. Ladungen",colorMode:"Farbmodus",random:"Zuf\xE4llig",fixed:"Fest",range:"Bereich",fixedColor:"Feste Farbe",advanced:"Erweitert",tileX:"Kachel X",tileY:"Kachel Y",customPalette:"Benutzerdefinierte Palette",paletteExample:"z.B.: #FF0000,#00FF00,#0000FF",capture:"Erfassen",painted:"Gemalt",charges:"Ladungen",retries:"Wiederholungen",position:"Position",tile:"Kachel",configSaved:"Konfiguration gespeichert",configLoaded:"Konfiguration geladen",configReset:"Konfiguration zur\xFCckgesetzt",captureInstructions:"Male einen Pixel manuell, um Koordinaten zu erfassen...",backendOnline:"Backend Online",backendOffline:"Backend Offline",startingBot:"Bot wird gestartet...",stoppingBot:"Bot wird gestoppt...",calibrating:"Kalibriere...",alreadyRunning:"Auto-Farm l\xE4uft bereits.",imageRunningWarning:"Auto-Image l\xE4uft. Schlie\xDFe es, bevor du Auto-Farm startest.",selectPositionAlert:"\u{1F3AF} Male einen Pixel in einen LEEREN Bereich der Karte, um die Farmzone festzulegen",waitingPosition:"\u{1F446} Warte darauf, dass du den Referenzpixel malst...",positionSet:"\u2705 Zone festgelegt!",positionTimeout:"\u274C Zeit\xFCberschreitung bei der Zonenauswahl",missingPosition:"\u274C W\xE4hle zuerst eine Zone mit 'Zone ausw\xE4hlen'",farmRadius:"Farm-Radius",positionInfo:"Aktuelle Zone",farmingInRadius:"\u{1F33E} Farmen im Radius von {radius}px ab ({x},{y})",selectEmptyArea:"\u26A0\uFE0F WICHTIG: W\xE4hle einen LEEREN Bereich, um Konflikte zu vermeiden",noPosition:"Keine Zone",currentZone:"Zone: ({x},{y})",autoSelectPosition:"\u{1F3AF} W\xE4hle zuerst eine Zone. Male einen Pixel auf die Karte, um die Farmzone festzulegen",logWindow:"Protokolle",logWindowTitle:"Protokolle - {botName}",downloadLogs:"Protokolle herunterladen",clearLogs:"Protokolle l\xF6schen",closeLogs:"Schlie\xDFen",ready:"Bereit",once:"Einmalig",recapture:"Neu erfassen",selectPosition:"Ausw\xE4hlen",stats:{painted:"Gemalt",charges:"Ladungen",droplets:"Tropfen",user:"Benutzer",retries:"Versuche"},config:{minCharges:"Mindestladungen",delay:"Wartezeit (Sek)",pixelsPerBatch:"Pixel pro Durchgang"},color:{fixed:"Fest",range:"Bereich",random:"Zuf\xE4llig",selected:"Ausgew\xE4hlte Farbe",min:"Min",max:"Max"},autobuy:{title:"Auto-Kauf (+5 Ladungen)",hint:"Wird automatisch aktiviert, wenn du \u2265 500 Tropfen hast"},buyCharges:"+5 Ladungen kaufen",buying:"Kaufe...",buyOk:"Kauf abgeschlossen. Session aktualisieren.",buyFail:"Kauf nicht m\xF6glich"},common:{yes:"Ja",no:"Nein",ok:"OK",cancel:"Abbrechen",close:"Schlie\xDFen",save:"Speichern",load:"Laden",delete:"L\xF6schen",edit:"Bearbeiten",start:"Starten",stop:"Stoppen",pause:"Pausieren",resume:"Fortsetzen",reset:"Zur\xFCcksetzen",settings:"Einstellungen",help:"Hilfe",about:"\xDCber",language:"Sprache",loading:"L\xE4dt...",error:"Fehler",success:"Erfolg",warning:"Warnung",info:"Information",languageChanged:"Sprache ge\xE4ndert zu {language}"},guard:{title:"WPlace Auto-Guard",initBot:"Guard-BOT initialisieren",selectArea:"Bereich ausw\xE4hlen",save:"Speichern",loadFile:"Datei laden",reposition:"Neu positionieren",analyzeArea:"Bereich analysieren",logs:"Protokolle",watcher:"W\xE4chter",configuration:"Konfiguration",startErase:"L\xF6schen starten",stopWatcher:"W\xE4chter stoppen",minimize:"Minimieren",expand:"Erweitern",nextBatchIn:"N\xE4chster Durchgang in: ",captureArea:"Bereich erfassen",startProtection:"Starten",stopProtection:"Stoppen",protectedPixels:"Gesch\xFCtzte Pixel",upperLeft:"Obere linke Ecke",lowerRight:"Untere rechte Ecke",detectedChanges:"Erkannte \xC4nderungen",repairedPixels:"Reparierte Pixel",charges:"Ladungen",waitingInit:"Warte auf Initialisierung...",checkingColors:"\u{1F3A8} Verf\xFCgbare Farben werden \xFCberpr\xFCft...",noColorsFound:"\u274C Keine Farben gefunden. \xD6ffne die Farbpalette auf der Seite.",colorsFound:"\u2705 {count} verf\xFCgbare Farben gefunden",initSuccess:"\u2705 Guard-BOT erfolgreich initialisiert",initError:"\u274C Fehler bei der Initialisierung des Guard-BOT",invalidCoords:"\u274C Ung\xFCltige Koordinaten",invalidArea:"\u274C Der Bereich muss oben links kleiner als unten rechts sein",areaTooLarge:"\u274C Bereich zu gro\xDF: {size} Pixel (maximal: {max})",capturingArea:"\u{1F4F8} Bereich wird erfasst...",areaCaptured:"\u2705 Bereich erfasst: {count} Pixel",captureError:"\u274C Fehler beim Erfassen des Bereichs: {error}",captureFirst:"\u274C Erfasse zuerst einen Bereich",noChanges:"\u2705 Bereich - keine \xC4nderungen erkannt",changesDetected:"\u{1F6A8} {count} \xC4nderungen im Bereich erkannt",repairing:"\u{1F6E0}\uFE0F Repariere {count} ver\xE4nderte Pixel...",repairedSuccess:"\u2705 Erfolgreich {count} Pixel repariert",repairError:"\u274C Fehler beim Reparieren der Pixel: {error}",noCharges:"\u26A0\uFE0F Nicht gen\xFCgend Ladungen, um \xC4nderungen zu reparieren",checkingChanges:"\u{1F50D} \xC4nderungen im Bereich werden \xFCberpr\xFCft...",errorChecking:"\u274C Fehler beim \xDCberpr\xFCfen der \xC4nderungen: {error}",guardActive:"\u{1F6E1}\uFE0F W\xE4chter aktiv - Bereich \xFCberwacht",lastCheck:"Letzte \xDCberpr\xFCfung: {time}",nextCheck:"N\xE4chste \xDCberpr\xFCfung in: {time}s",autoInitializing:"\u{1F916} Automatische Initialisierung...",autoInitSuccess:"\u2705 Guard-BOT automatisch erfolgreich gestartet",autoInitFailed:"\u26A0\uFE0F Automatischer Start nicht m\xF6glich. Benutze die manuelle Schaltfl\xE4che.",manualInitRequired:"\u{1F527} Manuelle Initialisierung erforderlich",paletteDetected:"\u{1F3A8} Farbpalette erkannt",paletteNotFound:"\u{1F50D} Suche nach Farbpalette...",clickingPaintButton:"\u{1F446} Klicke auf die Malen-Schaltfl\xE4che...",paintButtonNotFound:"\u274C Malen-Schaltfl\xE4che nicht gefunden",protectionStopped:"\u23F9\uFE0F Schutz gestoppt",selectUpperLeft:"\u{1F3AF} Male einen Pixel an die OBERE LINKE Ecke des zu \xFCberwachenden Bereichs",selectLowerRight:"\u{1F3AF} Male jetzt einen Pixel an die UNTERE RECHTE Ecke des Bereichs",waitingUpperLeft:"\u{1F446} Warte auf Auswahl der oberen linken Ecke...",waitingLowerRight:"\u{1F446} Warte auf Auswahl der unteren rechten Ecke...",upperLeftCaptured:"\u2705 Obere linke Ecke erfasst: ({x}, {y})",lowerRightCaptured:"\u2705 Untere rechte Ecke erfasst: ({x}, {y})",selectionTimeout:"\u274C Zeit\xFCberschreitung bei der Auswahl",selectionError:"\u274C Fehler bei der Auswahl, bitte versuche es erneut",logWindow:"Protokolle",logWindowTitle:"Protokolle - {botName}",downloadLogs:"Protokolle herunterladen",clearLogs:"Protokolle l\xF6schen",closeLogs:"Schlie\xDFen",analysisTitle:"Differenzanalyse - JSON vs Aktuelle Leinwand",correctPixels:"Korrekte Pixel",incorrectPixels:"Falsche Pixel",missingPixels:"Fehlende Pixel",showCorrect:"Korrekte anzeigen",showIncorrect:"Falsche anzeigen",showMissing:"Fehlende anzeigen",autoRefresh:"Automatisch aktualisieren",zoomAdjusted:"Zoom automatisch angepasst auf",autoRefreshEnabled:"Automatische Aktualisierung alle",autoRefreshDisabled:"Automatische Aktualisierung deaktiviert",autoRefreshIntervalUpdated:"Intervall f\xFCr automatische Aktualisierung ge\xE4ndert auf",visualizationUpdated:"Visualisierung aktualisiert",noAreaOrPixels:"Kein gesch\xFCtzter Bereich oder Pixel zum Analysieren geladen",noColorsDetected:"Farben k\xF6nnen nicht erkannt werden. Stelle sicher, dass die Palette ge\xF6ffnet ist.",sessionRecordingStarted:"Session-Aufzeichnung mit aktiviertem Autorefresh gestartet",sessionRecordingStopped:"Session-Aufzeichnung gestoppt",noSessionData:"Keine Session-Daten zum Herunterladen",sessionDataDownloaded:"Session-Daten heruntergeladen",snapshotCaptureError:"Fehler beim Erfassen des Bildes",recordSession:"Session aufzeichnen",snapshot:"Schnappschuss",downloadData:"Daten herunterladen",zoom:"Zoom",interval:"Intervall",seconds:"Sekunden",updateAnalysis:"Analyse aktualisieren",adjustZoom:"Zoom anpassen",precision:"Pr\xE4zision",statistics:"Statistiken",visualization:"Visualisierung",recording:"Aufzeichnung",configTitle:"Guard-Konfiguration",protectionPatterns:"Schutzmuster",preferSpecificColor:"Spezifische Farbe bevorzugen",excludeSpecificColors:"Bestimmte Farben nicht reparieren",loadManagement:"Lademanagement",minLoadsToWait:"Mindestladungen:",pixelsPerBatch:"Pixel pro Durchgang",spendAllPixelsOnStart:"Alle Pixel zu Beginn verwenden",waitTimes:"Wartezeiten",useRandomTimes:"Zuf\xE4llige Zeiten zwischen Durchg\xE4ngen verwenden",minTime:"Minimale Zeit (s)",maxTime:"Maximale Zeit (s)"},slave:{title:"WPlace Slave",masterServer:"Master-Server",ipAddress:"IP-Adresse",connect:"Verbinden",disconnect:"Trennen",status:"Status",slaveId:"Slave-ID",mode:"Modus",running:"L\xE4uft",idle:"Inaktiv",connected:"Verbunden",connecting:"Verbinde...",disconnected:"Getrennt",error:"Fehler",close:"Schlie\xDFen",telemetry:"Telemetrie",repairedPixels:"Reparierte Pixel",missingPixels:"Fehlende Pixel",absentPixels:"Abwesende Pixel",remainingCharges:"Verbleibende Ladungen",connectionError:"Verbindungsfehler. \xDCberpr\xFCfe die URL und dass der Server l\xE4uft.",invalidUrl:"Bitte gib eine g\xFCltige URL ein",httpsUpgrade:"HTTPS-Seite: wechsle zu wss:// um gemischte Inhalte zu vermeiden.",slaveRunning:"Slave l\xE4uft bereits.",slaveInitialized:"Slave erfolgreich initialisiert",slaveError:"Fehler beim Initialisieren des Slave",masterConnected:"Mit Master-Server verbunden",masterDisconnected:"Von Master-Server getrennt",reconnecting:"Verbindungsversuch",maxReconnectAttempts:"Maximale Anzahl von Verbindungsversuchen erreicht",modeSet:"Modus konfiguriert",projectLoaded:"Projektkonfiguration geladen",botStarted:"Bot gestartet",botStopped:"Bot gestoppt",botPaused:"Bot pausiert"}}});var Mo,_o=R(()=>{Mo={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"S\xE9lection",user:"Utilisateur",charges:"Charges",backend:"Backend",database:"Base de donn\xE9es",uptime:"Temps actif",close:"Fermer",launch:"Lancer",loading:"Chargement\u2026",executing:"Ex\xE9cution\u2026",downloading:"T\xE9l\xE9chargement du script\u2026",chooseBot:"Choisissez un bot et appuyez sur Lancer",readyToLaunch:"Pr\xEAt \xE0 lancer",loadError:"Erreur de chargement",loadErrorMsg:"Impossible de charger le bot s\xE9lectionn\xE9. V\xE9rifiez votre connexion ou r\xE9essayez.",checking:"\u{1F504} V\xE9rification...",online:"\u{1F7E2} En ligne",offline:"\u{1F534} Hors ligne",ok:"\u{1F7E2} OK",error:"\u{1F534} Erreur",unknown:"-",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"T\xE9l\xE9charger Logs",clearLogs:"Effacer Logs",closeLogs:"Fermer",localExecution:"Ex\xE9cution locale avec acc\xE8s complet au syst\xE8me de tokens",botStarting:"Bot en d\xE9marrage..."},image:{title:"WPlace Auto-Image",initBot:"Initialiser Auto-BOT",uploadImage:"T\xE9l\xE9charger Image",resizeImage:"Redimensionner Image",selectPosition:"S\xE9lectionner Position",startPainting:"Commencer Peinture",stopPainting:"Arr\xEAter Peinture",saveProgress:"Sauvegarder Progr\xE8s",loadProgress:"Charger Progr\xE8s",checkingColors:"\u{1F50D} V\xE9rification des couleurs disponibles...",noColorsFound:"\u274C Ouvrez la palette de couleurs sur le site et r\xE9essayez!",colorsFound:"\u2705 {count} couleurs disponibles trouv\xE9es",loadingImage:"\u{1F5BC}\uFE0F Chargement de l'image...",imageLoaded:"\u2705 Image charg\xE9e avec {count} pixels valides",imageError:"\u274C Erreur lors du chargement de l'image",selectPositionAlert:"Peignez le premier pixel \xE0 l'emplacement o\xF9 vous voulez que l'art commence!",waitingPosition:"\u{1F446} En attente que vous peigniez le pixel de r\xE9f\xE9rence...",positionSet:"\u2705 Position d\xE9finie avec succ\xE8s!",positionTimeout:"\u274C D\xE9lai d\xE9pass\xE9 pour la s\xE9lection de position",positionDetected:"\u{1F3AF} Position d\xE9tect\xE9e, traitement...",positionError:"\u274C Erreur d\xE9tectant la position, essayez \xE0 nouveau",startPaintingMsg:"\u{1F3A8} D\xE9but de la peinture...",paintingProgress:"\u{1F9F1} Progr\xE8s: {painted}/{total} pixels...",noCharges:"\u231B Aucune charge. Attendre {time}...",paintingStopped:"\u23F9\uFE0F Peinture arr\xEAt\xE9e par l'utilisateur",paintingComplete:"\u2705 Peinture termin\xE9e! {count} pixels peints.",paintingError:"\u274C Erreur pendant la peinture",missingRequirements:"\u274C Chargez une image et s\xE9lectionnez une position d'abord",progress:"Progr\xE8s",userName:"Utilisateur",pixels:"Pixels",charges:"Charges",estimatedTime:"Temps estim\xE9",initMessage:"Cliquez sur 'Initialiser Auto-BOT' pour commencer",waitingInit:"En attente d'initialisation...",resizeSuccess:"\u2705 Image redimensionn\xE9e \xE0 {width}x{height}",paintingPaused:"\u23F8\uFE0F Peinture mise en pause \xE0 la position X: {x}, Y: {y}",pixelsPerBatch:"Pixels par lot",batchSize:"Taille du lot",nextBatchTime:"Prochain lot dans",useAllCharges:"Utiliser toutes les charges disponibles",showOverlay:"Afficher l'overlay",maxCharges:"Charges max par lot",waitingForCharges:"\u23F3 En attente de charges: {current}/{needed}",timeRemaining:"Temps restant",cooldownWaiting:"\u23F3 Attendre {time} pour continuer...",progressSaved:"\u2705 Progr\xE8s sauvegard\xE9 sous {filename}",progressLoaded:"\u2705 Progr\xE8s charg\xE9: {painted}/{total} pixels peints",progressLoadError:"\u274C Erreur lors du chargement du progr\xE8s: {error}",progressSaveError:"\u274C Erreur lors de la sauvegarde du progr\xE8s: {error}",confirmSaveProgress:"Voulez-vous sauvegarder le progr\xE8s actuel avant d'arr\xEAter?",saveProgressTitle:"Sauvegarder Progr\xE8s",discardProgress:"Abandonner",cancel:"Annuler",minimize:"Minimiser",width:"Largeur",height:"Hauteur",keepAspect:"Garder les proportions",apply:"Appliquer",overlayOn:"Overlay : ON",overlayOff:"Overlay : OFF",passCompleted:"\u2705 Passage termin\xE9: {painted} pixels peints | Progr\xE8s: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 Attente de r\xE9g\xE9n\xE9ration des charges: {current}/{needed} - Temps: {time}",waitingChargesCountdown:"\u23F3 Attente des charges: {current}/{needed} - Restant: {time}",autoInitializing:"\u{1F916} Initialisation automatique...",autoInitSuccess:"\u2705 Bot d\xE9marr\xE9 automatiquement",autoInitFailed:"\u26A0\uFE0F Impossible de d\xE9marrer automatiquement. Utilisez le bouton manuel.",paletteDetected:"\u{1F3A8} Palette de couleurs d\xE9tect\xE9e",paletteNotFound:"\u{1F50D} Recherche de la palette de couleurs...",clickingPaintButton:"\u{1F446} Clic sur le bouton Paint...",paintButtonNotFound:"\u274C Bouton Paint introuvable",manualInitRequired:"\u{1F527} Initialisation manuelle requise",retryAttempt:"\u{1F504} Tentative {attempt}/{maxAttempts} dans {delay}s...",retryError:"\u{1F4A5} Erreur dans tentative {attempt}/{maxAttempts}, nouvel essai dans {delay}s...",retryFailed:"\u274C \xC9chec apr\xE8s {maxAttempts} tentatives. Continuant avec le lot suivant...",networkError:"\u{1F310} Erreur r\xE9seau. Nouvel essai...",serverError:"\u{1F525} Erreur serveur. Nouvel essai...",timeoutError:"\u23F0 D\xE9lai d'attente du serveur, nouvelle tentative...",saveProgressBtn:"Sauvegarder progr\xE8s",guardJsonBtn:"Guard JSON",resizeWindowTitle:"Redimensionner Image",original:"Original",labTolerance:"Tol\xE9rance LAB",maintainProportion:"Maintenir les proportions",skipColor:"Skip Color",skipColorEnabled:"Skip colors that don't match exactly",similarityThreshold:"Seuil de similarit\xE9",skipColorDescription:"Seules les correspondances de couleur exactes seront peintes (similarit\xE9 100%).",applyResize:"Appliquer",cancelResize:"Annuler",patternSnake:"Serpent (Zigzag)",patternDiagonalSweep:"Balayage diagonal",patternBorders:"Bordures d'abord",patternCenter:"Centre d'abord",patternQuadrants:"Quadrants",patternBiasedRandom:"Al\xE9atoire biais\xE9 (bordures)",patternClusters:"Clusters",patternProximity:"Proximit\xE9",patternSweep:"Balayage par sections",patternPriority:"Priorit\xE9 (mixte)",patternAnchorPoints:"Points d'ancrage",patternSpiralCw:"Spirale (horaire)",patternSpiralCcw:"Spirale (anti-horaire)",noProgressToSave:"Aucun progr\xE8s \xE0 sauvegarder",progressSaveSuccess:"Progr\xE8s sauvegard\xE9 sous {filename}",progressLoadSuccess:"Progr\xE8s charg\xE9: {painted}/{total} pixels peints",invalidProgressFile:"Fichier de progr\xE8s invalide",missingFields:"Champs requis manquants: {fields}",guardDialogTitle:"G\xE9n\xE9rer Guard JSON",guardDialogMessage:"Voulez-vous g\xE9n\xE9rer un fichier Guard JSON avec les donn\xE9es actuelles?",guardDialogInfo:`Image: {name}
Dimensions: {width}x{height}
Pixels: {pixels}`,generateGuard:"G\xE9n\xE9rer Guard",guardJsonInvalidStructure:"\u274C Structure invalide pour le JSON du Guard. Annulation de la sauvegarde.",guardJsonInvalidMessage:"Structure JSON du Guard invalide. R\xE9essayez apr\xE8s avoir s\xE9lectionn\xE9 la position.",guardJsonSaveSuccess:"\u2705 JSON du Guard sauvegard\xE9: {filename}",guardJsonSaveError:"\u274C Erreur lors de la sauvegarde du JSON du Guard: {error}",notificationInfo:"Information",notificationSuccess:"Succ\xE8s",notificationWarning:"Avertissement",notificationError:"Erreur",paintPattern:"\u{1F4D0} Motif de peinture",patternLinearStart:"Lin\xE9aire (D\xE9but)",patternLinearEnd:"Lin\xE9aire (Fin)",patternRandom:"Al\xE9atoire",patternCenterOut:"Centre vers l'ext\xE9rieur",patternCornersFirst:"Coins d'abord",patternSpiral:"Spirale",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"T\xE9l\xE9charger Logs",clearLogs:"Effacer Logs",closeLogs:"Fermer",userInfo:"Informations Utilisateur",imageProgress:"Progr\xE8s de l'Image",availableColors:"Couleurs Disponibles",noImageLoaded:"Aucune image charg\xE9e",cooldown:"Temps d'attente",totalColors:"Total des Couleurs",colorPalette:"Palette de Couleurs",showAllColors:"Afficher Toutes les Couleurs (y compris non disponibles)",selectAllColors:"S\xE9lectionner Toutes",unselectAllColors:"D\xE9s\xE9lectionner Toutes",noAvailable:"Non disponible",colorSelected:"Couleur s\xE9lectionn\xE9e",statsUpdated:"\u2705 Statistiques mises \xE0 jour: {count} couleurs disponibles"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"D\xE9marrer",stop:"Arr\xEAter",stopped:"Bot arr\xEAt\xE9",calibrate:"Calibrer",paintOnce:"Une fois",checkingStatus:"V\xE9rification du statut...",configuration:"Configuration",delay:"D\xE9lai (ms)",pixelsPerBatch:"Pixels/lot",minCharges:"Charges min",colorMode:"Mode couleur",random:"Al\xE9atoire",fixed:"Fixe",range:"Plage",fixedColor:"Couleur fixe",advanced:"Avanc\xE9",tileX:"Tuile X",tileY:"Tuile Y",customPalette:"Palette personnalis\xE9e",paletteExample:"ex: #FF0000,#00FF00,#0000FF",capture:"Capturer",painted:"Peints",charges:"Charges",retries:"\xC9checs",position:"Position",tile:"Tuile",configSaved:"Configuration sauvegard\xE9e",configLoaded:"Configuration charg\xE9e",configReset:"Configuration r\xE9initialis\xE9e",captureInstructions:"Peindre un pixel manuellement pour capturer les coordonn\xE9es...",backendOnline:"Backend En ligne",backendOffline:"Backend Hors ligne",startingBot:"D\xE9marrage du bot...",stoppingBot:"Arr\xEAt du bot...",calibrating:"Calibrage...",alreadyRunning:"Auto-Farm est d\xE9j\xE0 en cours d'ex\xE9cution.",imageRunningWarning:"Auto-Image est en cours d'ex\xE9cution. Fermez-le avant de d\xE9marrer Auto-Farm.",selectPositionAlert:"\u{1F3AF} Peignez un pixel dans une zone VIDE de la carte pour d\xE9finir la zone de farming",waitingPosition:"\u{1F446} En attente que vous peigniez le pixel de r\xE9f\xE9rence...",positionSet:"\u2705 Zone d\xE9finie!",positionTimeout:"\u274C D\xE9lai d\xE9pass\xE9 pour la s\xE9lection de zone",missingPosition:"\u274C S\xE9lectionnez une zone d'abord en utilisant 'S\xE9lectionner Zone'",farmRadius:"Rayon farm",positionInfo:"Zone actuelle",farmingInRadius:"\u{1F33E} Farming dans un rayon de {radius}px depuis ({x},{y})",selectEmptyArea:"\u26A0\uFE0F IMPORTANT: S\xE9lectionnez une zone VIDE pour \xE9viter les conflits",noPosition:"Aucune zone",currentZone:"Zone: ({x},{y})",autoSelectPosition:"\u{1F3AF} S\xE9lectionnez une zone d'abord. Peignez un pixel sur la carte pour d\xE9finir la zone de farming",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"T\xE9l\xE9charger Logs",clearLogs:"Effacer Logs",closeLogs:"Fermer",ready:"Pr\xEAt",once:"Une fois",recapture:"Re-capturer",selectPosition:"S\xE9lectionner",stats:{painted:"Peints",charges:"Charges",droplets:"Gouttelettes",user:"Utilisateur",retries:"Tentatives"},config:{minCharges:"Charges minimales",delay:"Attente (sec)",pixelsPerBatch:"Pixels par lot"},color:{fixed:"Fixe",range:"Plage",random:"Al\xE9atoire",selected:"Couleur s\xE9lectionn\xE9e",min:"Min",max:"Max"},autobuy:{title:"Auto-achat (+5 charges)",hint:"S'activera automatiquement quand vous avez \u2265 500 gouttelettes"},buyCharges:"Acheter +5 charges",buying:"Achat en cours...",buyOk:"Achat effectu\xE9. Actualisez la session.",buyFail:"Impossible d'acheter"},common:{yes:"Oui",no:"Non",ok:"OK",cancel:"Annuler",close:"Fermer",save:"Sauvegarder",load:"Charger",delete:"Supprimer",edit:"Modifier",start:"D\xE9marrer",stop:"Arr\xEAter",pause:"Pause",resume:"Reprendre",reset:"R\xE9initialiser",settings:"Param\xE8tres",help:"Aide",about:"\xC0 propos",language:"Langue",loading:"Chargement...",error:"Erreur",success:"Succ\xE8s",warning:"Avertissement",info:"Information",languageChanged:"Langue chang\xE9e en {language}"},guard:{title:"WPlace Auto-Guard",initBot:"Initialiser Guard-BOT",selectArea:"S\xE9lectionner Zone",save:"Sauvegarder",loadFile:"Charger Fichier",reposition:"Repositionner",analyzeArea:"Analyser Zone",logs:"Logs",watcher:"Surveillant",configuration:"Configuration",startErase:"D\xE9marrer Effacement",stopWatcher:"Arr\xEAter Surveillant",minimize:"Minimiser",expand:"\xC9tendre",nextBatchIn:"Prochain lot dans: ",captureArea:"Capturer Zone",startProtection:"D\xE9marrer",stopProtection:"Arr\xEAter",protectedPixels:"Pixels Prot\xE9g\xE9s",upperLeft:"Coin Sup\xE9rieur Gauche",lowerRight:"Coin Inf\xE9rieur Droit",detectedChanges:"Changements D\xE9tect\xE9s",repairedPixels:"Pixels R\xE9par\xE9s",charges:"Charges",waitingInit:"En attente d'initialisation...",checkingColors:"\u{1F3A8} V\xE9rification des couleurs disponibles...",noColorsFound:"\u274C Aucune couleur trouv\xE9e. Ouvrez la palette de couleurs sur le site.",colorsFound:"\u2705 {count} couleurs disponibles trouv\xE9es",initSuccess:"\u2705 Guard-BOT initialis\xE9 avec succ\xE8s",initError:"\u274C Erreur lors de l'initialisation de Guard-BOT",invalidCoords:"\u274C Coordonn\xE9es invalides",invalidArea:"\u274C La zone doit avoir le coin sup\xE9rieur gauche inf\xE9rieur au coin inf\xE9rieur droit",areaTooLarge:"\u274C Zone trop grande: {size} pixels (maximum: {max})",capturingArea:"\u{1F4F8} Capture de la zone...",areaCaptured:"\u2705 Zone captur\xE9e: {count} pixels",captureError:"\u274C Erreur lors de la capture de zone: {error}",captureFirst:"\u274C Capturez d'abord une zone",noChanges:"\u2705 Zone - aucun changement d\xE9tect\xE9",changesDetected:"\u{1F6A8} {count} changements d\xE9tect\xE9s dans la zone",repairing:"\u{1F6E0}\uFE0F R\xE9paration de {count} pixels alt\xE9r\xE9s...",repairedSuccess:"\u2705 {count} pixels r\xE9par\xE9s avec succ\xE8s",repairError:"\u274C Erreur lors de la r\xE9paration des pixels: {error}",noCharges:"\u26A0\uFE0F Charges insuffisantes pour r\xE9parer les changements",checkingChanges:"\u{1F50D} V\xE9rification des changements dans la zone...",errorChecking:"\u274C Erreur lors de la v\xE9rification des changements: {error}",guardActive:"\u{1F6E1}\uFE0F Gardien actif - zone surveill\xE9e",lastCheck:"Derni\xE8re v\xE9rification: {time}",nextCheck:"Prochaine v\xE9rification dans: {time}s",autoInitializing:"\u{1F916} Initialisation automatique...",autoInitSuccess:"\u2705 Guard-BOT d\xE9marr\xE9 automatiquement",autoInitFailed:"\u26A0\uFE0F Impossible de d\xE9marrer automatiquement. Utilisez le bouton manuel.",manualInitRequired:"\u{1F527} Initialisation manuelle requise",paletteDetected:"\u{1F3A8} Palette de couleurs d\xE9tect\xE9e",paletteNotFound:"\u{1F50D} Recherche de la palette de couleurs...",clickingPaintButton:"\u{1F446} Clic sur le bouton Paint...",paintButtonNotFound:"\u274C Bouton Paint introuvable",protectionStopped:"\u23F9\uFE0F Protection arr\xEAt\xE9e",selectUpperLeft:"\u{1F3AF} Peignez un pixel au coin SUP\xC9RIEUR GAUCHE de la zone \xE0 surveiller",selectLowerRight:"\u{1F3AF} Maintenant peignez un pixel au coin INF\xC9RIEUR DROIT de la zone",waitingUpperLeft:"\u{1F446} En attente de la s\xE9lection du coin sup\xE9rieur gauche...",waitingLowerRight:"\u{1F446} En attente de la s\xE9lection du coin inf\xE9rieur droit...",upperLeftCaptured:"\u2705 Coin sup\xE9rieur gauche captur\xE9: ({x}, {y})",lowerRightCaptured:"\u2705 Coin inf\xE9rieur droit captur\xE9: ({x}, {y})",selectionTimeout:"\u274C D\xE9lai de s\xE9lection d\xE9pass\xE9",selectionError:"\u274C Erreur de s\xE9lection, veuillez r\xE9essayer",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"T\xE9l\xE9charger Logs",clearLogs:"Effacer Logs",closeLogs:"Fermer",analysisTitle:"Analyse des Diff\xE9rences - JSON vs Canvas Actuel",correctPixels:"Pixels Corrects",incorrectPixels:"Pixels Incorrects",missingPixels:"Pixels Manquants",showCorrect:"Afficher Corrects",showIncorrect:"Afficher Incorrects",showMissing:"Afficher Manquants",autoRefresh:"Actualisation automatique",zoomAdjusted:"Zoom ajust\xE9 automatiquement \xE0",autoRefreshEnabled:"Actualisation automatique activ\xE9e toutes les",autoRefreshDisabled:"Actualisation automatique d\xE9sactiv\xE9e",autoRefreshIntervalUpdated:"Intervalle d'actualisation automatique mis \xE0 jour \xE0",visualizationUpdated:"Visualisation mise \xE0 jour",noAreaOrPixels:"Aucune zone prot\xE9g\xE9e ou pixels charg\xE9s \xE0 analyser",noColorsDetected:"Impossible de d\xE9tecter les couleurs. Assurez-vous que la palette est ouverte.",sessionRecordingStarted:"Enregistrement de session d\xE9marr\xE9 avec actualisation automatique activ\xE9e",sessionRecordingStopped:"Enregistrement de session arr\xEAt\xE9",noSessionData:"Aucune donn\xE9e de session \xE0 t\xE9l\xE9charger",sessionDataDownloaded:"Donn\xE9es de session t\xE9l\xE9charg\xE9es",snapshotCaptureError:"Erreur lors de la capture de l'image",recordSession:"Enregistrer Session",snapshot:"Instantan\xE9",downloadData:"T\xE9l\xE9charger Donn\xE9es",zoom:"Zoom",interval:"Intervalle",seconds:"secondes",updateAnalysis:"Mettre \xE0 jour l'Analyse",adjustZoom:"Ajuster le Zoom",precision:"Pr\xE9cision",statistics:"Statistiques",visualization:"Visualisation",recording:"Enregistrement",configTitle:"Configuration du Guard",protectionPatterns:"Mod\xE8les de Protection",preferSpecificColor:"Prioriser une couleur sp\xE9cifique",excludeSpecificColors:"Ne pas r\xE9parer les couleurs sp\xE9cifiques",loadManagement:"Gestion des Charges",minLoadsToWait:"Minimum de charges:",pixelsPerBatch:"Pixels par lot",spendAllPixelsOnStart:"D\xE9penser tous les pixels au d\xE9marrage",waitTimes:"Temps d'Attente",useRandomTimes:"Utiliser des temps al\xE9atoires entre les lots",minTime:"Temps minimum (s)",maxTime:"Temps maximum (s)"},slave:{title:"WPlace Slave",initBot:"Initialiser Slave-BOT",startPainting:"Commencer",stopPainting:"Arr\xEAter",logs:"Logs",configuration:"Configuration",minimize:"R\xE9duire",pixelsPerBatch:"Pixels par lot",nextBatchIn:"Prochain lot dans : ",waitingInit:"En attente d'initialisation...",checkingColors:"\u{1F3A8} V\xE9rification des couleurs disponibles...",noColorsFound:"\u274C Couleurs non trouv\xE9es. Ouvrez la palette de couleurs sur le site.",colorsFound:"\u2705 {count} couleurs disponibles trouv\xE9es",initSuccess:"\u2705 Slave-BOT initialis\xE9 avec succ\xE8s",initError:"\u274C Erreur d'initialisation de Slave-BOT",noCoordsSet:"\u274C Coordonn\xE9es non d\xE9finies. Utilisez d'abord WPlace AutoBOT Image.",noCoordsData:"\u274C Donn\xE9es de coordonn\xE9es non disponibles. Configurez d'abord les coordonn\xE9es dans WPlace AutoBOT Image.",coordsLoaded:"\u2705 {count} coordonn\xE9es charg\xE9es depuis WPlace AutoBOT Image",coordsError:"\u274C Erreur de chargement des coordonn\xE9es : {error}",paintingStarted:"\u{1F3A8} Peinture commenc\xE9e",paintingStopped:"\u23F9\uFE0F Peinture arr\xEAt\xE9e",paintingPixel:"\u{1F58C}\uFE0F Peinture du pixel ({x}, {y}) couleur {color}",pixelPainted:"\u2705 Pixel peint avec succ\xE8s",pixelError:"\u274C Erreur de peinture du pixel : {error}",batchComplete:"\u2705 Lot termin\xE9 : {painted} sur {total} pixels peints",batchError:"\u274C Erreur d'ex\xE9cution du lot : {error}",allPixelsComplete:"\u{1F389} Tous les pixels termin\xE9s !",noCharges:"\u26A0\uFE0F Charges insuffisantes pour peindre",waitingForCharges:"\u23F3 En attente de charges...",charges:"Charges",totalPixels:"Total Pixels",paintedPixels:"Pixels Peints",remainingPixels:"Pixels Restants",currentBatch:"Lot Actuel",progress:"Progr\xE8s",estimatedTime:"Temps Estim\xE9 de Fin",autoInitializing:"\u{1F916} Initialisation automatique...",autoInitSuccess:"\u2705 Slave-BOT d\xE9marr\xE9 automatiquement",autoInitFailed:"\u26A0\uFE0F Impossible de d\xE9marrer automatiquement. Utilisez le bouton de d\xE9marrage manuel.",manualInitRequired:"\u{1F527} Initialisation manuelle requise",paletteDetected:"\u{1F3A8} Palette de couleurs d\xE9tect\xE9e",paletteNotFound:"\u{1F50D} Recherche de la palette de couleurs...",clickingPaintButton:"\u{1F446} Clic sur le bouton Paint...",paintButtonNotFound:"\u274C Bouton Paint non trouv\xE9",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"T\xE9l\xE9charger Logs",clearLogs:"Effacer Logs",closeLogs:"Fermer",configTitle:"Configuration Slave",loadManagement:"Gestion des Charges",minLoadsToWait:"Minimum de charges :",pixelsPerBatchConfig:"Pixels par lot",spendAllPixelsOnStart:"D\xE9penser tous les pixels au d\xE9marrage",waitTimes:"Temps d'Attente",useRandomTimes:"Utiliser des temps al\xE9atoires entre les lots",minTime:"Temps minimum (s)",maxTime:"Temps maximum (s)"}}});var zo,Bo=R(()=>{zo={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} \u0410\u0432\u0442\u043E-\u0424\u0430\u0440\u043C",autoImage:"\u{1F3A8} \u0410\u0432\u0442\u043E-\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435",autoGuard:"\u{1F6E1}\uFE0F \u0410\u0432\u0442\u043E-\u0417\u0430\u0449\u0438\u0442\u0430",autoSlave:"\u{1F517} Slave",selection:"\u0412\u044B\u0431\u0440\u0430\u043D\u043E",user:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C",charges:"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F",backend:"\u0411\u044D\u043A\u0435\u043D\u0434",database:"\u0411\u0430\u0437\u0430 \u0434\u0430\u043D\u043D\u044B\u0445",uptime:"\u0412\u0440\u0435\u043C\u044F \u0440\u0430\u0431\u043E\u0442\u044B",close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",launch:"\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C",loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",executing:"\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435",downloading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0441\u043A\u0440\u0438\u043F\u0442\u0430...",chooseBot:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0431\u043E\u0442\u0430 \u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C",readyToLaunch:"\u0413\u043E\u0442\u043E\u0432\u043E \u043A \u0437\u0430\u043F\u0443\u0441\u043A\u0443",loadError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438",loadErrorMsg:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0431\u043E\u0442\u0430. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0438\u043B\u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437.",checking:"\u{1F504} \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430...",online:"\u{1F7E2} \u041E\u043D\u043B\u0430\u0439\u043D",offline:"\u{1F534} \u041E\u0444\u043B\u0430\u0439\u043D",ok:"\u{1F7E2} \u041E\u041A",error:"\u{1F534} \u041E\u0448\u0438\u0431\u043A\u0430",unknown:"-",logWindow:"\u041B\u043E\u0433\u0438",logWindowTitle:"\u041B\u043E\u0433\u0438 - {botName}",downloadLogs:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u041B\u043E\u0433\u0438",clearLogs:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u041B\u043E\u0433\u0438",closeLogs:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",localExecution:"\u041B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0441 \u043F\u043E\u043B\u043D\u044B\u043C \u0434\u043E\u0441\u0442\u0443\u043F\u043E\u043C \u043A \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u0442\u043E\u043A\u0435\u043D\u043E\u0432",botStarting:"\u0417\u0430\u043F\u0443\u0441\u043A \u0431\u043E\u0442\u0430..."},image:{title:"WPlace \u0410\u0432\u0442\u043E-\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435",initBot:"\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C Auto-BOT",uploadImage:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435",resizeImage:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F",selectPosition:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043C\u0435\u0441\u0442\u043E \u043D\u0430\u0447\u0430\u043B\u0430",startPainting:"\u041D\u0430\u0447\u0430\u0442\u044C \u0440\u0438\u0441\u043E\u0432\u0430\u0442\u044C",stopPainting:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435",saveProgress:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",loadProgress:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",checkingColors:"\u{1F50D} \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0446\u0432\u0435\u0442\u043E\u0432...",noColorsFound:"\u274C \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u0446\u0432\u0435\u0442\u043E\u0432 \u043D\u0430 \u0441\u0430\u0439\u0442\u0435 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430!",colorsFound:"\u2705 \u041D\u0430\u0439\u0434\u0435\u043D\u043E {count} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0446\u0432\u0435\u0442\u043E\u0432",loadingImage:"\u{1F5BC}\uFE0F \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F...",imageLoaded:"\u2705 \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0441 {count} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u043C\u0438 \u043F\u0438\u043A\u0441\u0435\u043B\u044F\u043C\u0438",imageError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F",selectPositionAlert:"\u041D\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u0441\u0442\u0430\u0440\u0442\u043E\u0432\u044B\u0439 \u043F\u0438\u043A\u0441\u0435\u043B\u044C \u0432 \u0442\u043E\u043C \u043C\u0435\u0441\u0442\u0435, \u0433\u0434\u0435 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0440\u0438\u0441\u0443\u043D\u043E\u043A \u043D\u0430\u0447\u0438\u043D\u0430\u043B\u0441\u044F!",waitingPosition:"\u{1F446} \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0441\u0442\u0430\u0440\u0442\u043E\u0432\u043E\u0433\u043E \u043F\u0438\u043A\u0441\u0435\u043B\u044F....",positionSet:"\u2705 \u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E!",positionTimeout:"\u274C \u0422\u0430\u0439\u043C\u0430\u0443\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u0438",positionDetected:"\u{1F3AF} \u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u0430, \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430...",positionError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u044B\u0431\u043E\u0440\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u0438, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437",startPaintingMsg:"\u{1F3A8} \u041D\u0430\u0447\u0430\u043B\u043E \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u044F...",paintingProgress:"\u{1F9F1} \u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441: {painted} \u0438\u0437 {total} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439...",noCharges:"\u231B \u041D\u0435\u0442 \u0437\u0430\u0440\u044F\u0434\u043E\u0432. \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 {time}...",paintingStopped:"\u23F9\uFE0F \u0420\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u043C",paintingComplete:"\u2705 \u0420\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E! {count} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043E.",paintingError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0432 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0435 \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u044F",missingRequirements:"\u274C \u0421\u043F\u0435\u0440\u0432\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u0435\u0441\u0442\u043E \u043D\u0430\u0447\u0430\u043B\u0430",progress:"\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",userName:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C",pixels:"\u041F\u0438\u043A\u0441\u0435\u043B\u0438",charges:"\u0417\u0430\u0440\u044F\u0434\u044B",estimatedTime:"\u041F\u0440\u0435\u0434\u043F\u043E\u043B\u043E\u0436\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F",initMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \xAB\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C Auto-BOT\xBB, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0447\u0430\u0442\u044C",waitingInit:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438...",resizeSuccess:"\u2705 \u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E \u0434\u043E {width}x{height}",paintingPaused:"\u23F8\uFE0F \u0420\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 X: {x}, Y: {y}",pixelsPerBatch:"\u041F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0432 \u043F\u0440\u043E\u0445\u043E\u0434\u0435",batchSize:"\u0420\u0430\u0437\u043C\u0435\u0440 \u043F\u0440\u043E\u0445\u043E\u0434\u0430",nextBatchTime:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043F\u0440\u043E\u0445\u043E\u0434 \u0447\u0435\u0440\u0435\u0437",useAllCharges:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0437\u0430\u0440\u044F\u0434\u044B",showOverlay:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0430\u043B\u043E\u0436\u0435\u043D\u0438\u0435",maxCharges:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B-\u0432\u043E \u0437\u0430\u0440\u044F\u0434\u043E\u0432 \u0437\u0430 \u043F\u0440\u043E\u0445\u043E\u0434",waitingForCharges:"\u23F3 \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0437\u0430\u0440\u044F\u0434\u043E\u0432: {current} \u0438\u0437 {needed}",timeRemaining:"\u0412\u0440\u0435\u043C\u0435\u043D\u0438 \u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C",cooldownWaiting:"\u23F3 \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 {time} \u0434\u043B\u044F \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F...",progressSaved:"\u2705 \u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043A\u0430\u043A {filename}",progressLoaded:"\u2705 \u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D: {painted} \u0438\u0437 {total} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043E",progressLoadError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430: {error}",progressSaveError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430: {error}",confirmSaveProgress:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u043F\u0435\u0440\u0435\u0434 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u043E\u0439?",saveProgressTitle:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",discardProgress:"\u041D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",minimize:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",width:"\u0428\u0438\u0440\u0438\u043D\u0430",height:"\u0412\u044B\u0441\u043E\u0442\u0430",keepAspect:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0441\u043E\u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0441\u0442\u043E\u0440\u043E\u043D",apply:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C",overlayOn:"\u041D\u0430\u043B\u043E\u0436\u0435\u043D\u0438\u0435: \u0412\u041A\u041B",overlayOff:"\u041D\u0430\u043B\u043E\u0436\u0435\u043D\u0438\u0435: \u0412\u042B\u041A\u041B",passCompleted:"\u2705 \u041F\u0440\u043E\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D: {painted} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043E | \u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441: {percent}% ({current} \u0438\u0437 {total})",waitingChargesRegen:"\u23F3 \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0432\u043E\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0437\u0430\u0440\u044F\u0434\u0430: {current} \u0438\u0437 {needed} - \u0412\u0440\u0435\u043C\u044F: {time}",waitingChargesCountdown:"\u23F3 \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0437\u0430\u0440\u044F\u0434\u043E\u0432: {current} \u0438\u0437 {needed} - \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F: {time}",autoInitializing:"\u{1F916} \u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F...",autoInitSuccess:"\u2705 \u0411\u043E\u0442 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",autoInitFailed:"\u26A0\uFE0F \u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u0443\u0441\u043A. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \u0440\u0443\u0447\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430.",paletteDetected:"\u{1F3A8} \u0426\u0432\u0435\u0442\u043E\u0432\u0430\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0430",paletteNotFound:"\u{1F50D} \u041F\u043E\u0438\u0441\u043A \u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043F\u0430\u043B\u0438\u0442\u0440\u044B...",clickingPaintButton:"\u{1F446} \u041D\u0430\u0436\u0430\u0442\u0438\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 \xABPaint\xBB...",paintButtonNotFound:"\u274C \u041A\u043D\u043E\u043F\u043A\u0430 \xABPaint\xBB \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430",manualInitRequired:"\u{1F527} \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0440\u0443\u0447\u043D\u0430\u044F \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F",retryAttempt:"\u{1F504} \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430 {attempt} \u0438\u0437 {maxAttempts} \u0447\u0435\u0440\u0435\u0437 {delay}s...",retryError:"\u{1F4A5} \u041E\u0448\u0438\u0431\u043A\u0430 \u0432 \u043F\u043E\u043F\u044B\u0442\u043A\u0435 {attempt} \u0438\u0437 {maxAttempts}, \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 {delay}s...",retryFailed:"\u274C \u041F\u0440\u043E\u0432\u0430\u043B\u0435\u043D\u043E \u0441\u043F\u0443\u0441\u0442\u044F {maxAttempts} \u043F\u043E\u043F\u044B\u0442\u043E\u043A. \u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435 \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C \u043F\u0440\u043E\u0445\u043E\u0434\u0435...",networkError:"\u{1F310} \u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u0435\u0442\u0438. \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430...",serverError:"\u{1F525} \u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430...",timeoutError:"\u23F0 \u0422\u0430\u0439\u043C-\u0430\u0443\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0430...",saveProgressBtn:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",guardJsonBtn:"Guard JSON",resizeWindowTitle:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F",original:"\u041E\u0440\u0438\u0433\u0438\u043D\u0430\u043B",labTolerance:"\u0414\u043E\u043F\u0443\u0441\u043A LAB",maintainProportion:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0440\u043E\u043F\u043E\u0440\u0446\u0438\u0438",skipColor:"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0446\u0432\u0435\u0442",skipColorEnabled:"\u041F\u0440\u043E\u043F\u0443\u0441\u043A\u0430\u0442\u044C \u0446\u0432\u0435\u0442\u0430, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442 \u0442\u043E\u0447\u043D\u043E",similarityThreshold:"\u041F\u043E\u0440\u043E\u0433 \u0441\u0445\u043E\u0436\u0435\u0441\u0442\u0438",skipColorDescription:"\u0411\u0443\u0434\u0443\u0442 \u0437\u0430\u043A\u0440\u0430\u0448\u0435\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u0447\u043D\u044B\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u043E\u0432 (100% \u0441\u0445\u043E\u0436\u0435\u0441\u0442\u044C).",applyResize:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C",cancelResize:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",patternSnake:"\u0417\u043C\u0435\u0439\u043A\u0430 (\u0437\u0438\u0433\u0437\u0430\u0433)",patternDiagonalSweep:"\u0414\u0438\u0430\u0433\u043E\u043D\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u0440\u043E\u0442\u044F\u0436\u043A\u0430",patternBorders:"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0433\u0440\u0430\u043D\u0438\u0446\u044B",patternCenter:"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0446\u0435\u043D\u0442\u0440",patternQuadrants:"\u041A\u0432\u0430\u0434\u0440\u0430\u043D\u0442\u044B",patternBiasedRandom:"\u0421\u043C\u0435\u0449\u0435\u043D\u043D\u044B\u0439 \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439 (\u0433\u0440\u0430\u043D\u0438\u0446\u044B)",patternClusters:"\u041A\u043B\u0430\u0441\u0442\u0435\u0440\u044B",patternProximity:"\u0411\u043B\u0438\u0437\u043E\u0441\u0442\u044C",patternSweep:"\u041F\u0440\u043E\u0442\u044F\u0436\u043A\u0430 \u043F\u043E \u0441\u0435\u043A\u0446\u0438\u044F\u043C",patternPriority:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 (\u0441\u043C\u0435\u0448\u0430\u043D\u043D\u044B\u0439)",patternAnchorPoints:"\u041E\u043F\u043E\u0440\u043D\u044B\u0435 \u0442\u043E\u0447\u043A\u0438",patternSpiralCw:"\u0421\u043F\u0438\u0440\u0430\u043B\u044C (\u043F\u043E \u0447\u0430\u0441\u043E\u0432\u043E\u0439 \u0441\u0442\u0440\u0435\u043B\u043A\u0435)",patternSpiralCcw:"\u0421\u043F\u0438\u0440\u0430\u043B\u044C (\u043F\u0440\u043E\u0442\u0438\u0432 \u0447\u0430\u0441\u043E\u0432\u043E\u0439 \u0441\u0442\u0440\u0435\u043B\u043A\u0438)",noProgressToSave:"\u041D\u0435\u0442 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430 \u0434\u043B\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F",progressSaveSuccess:"\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043A\u0430\u043A {filename}",progressLoadSuccess:"\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D: {painted}/{total} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043E",invalidProgressFile:"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430",missingFields:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u043B\u044F: {fields}",guardDialogTitle:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C Guard JSON",guardDialogMessage:"\u0425\u043E\u0442\u0438\u0442\u0435 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0444\u0430\u0439\u043B Guard JSON \u0441 \u0442\u0435\u043A\u0443\u0449\u0438\u043C\u0438 \u0434\u0430\u043D\u043D\u044B\u043C\u0438?",guardDialogInfo:`\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435: {name}
\u0420\u0430\u0437\u043C\u0435\u0440\u044B: {width}x{height}
\u041F\u0438\u043A\u0441\u0435\u043B\u0438: {pixels}`,generateGuard:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C Guard",guardJsonInvalidStructure:"\u274C \u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 \u0434\u043B\u044F Guard JSON. \u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E.",guardJsonInvalidMessage:"\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430 Guard JSON. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u0438.",guardJsonSaveSuccess:"\u2705 Guard JSON \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D: {filename}",guardJsonSaveError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F Guard JSON: {error}",notificationInfo:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",notificationSuccess:"\u0423\u0441\u043F\u0435\u0445",notificationWarning:"\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435",notificationError:"\u041E\u0448\u0438\u0431\u043A\u0430",paintPattern:"\u{1F4D0} \u0428\u0430\u0431\u043B\u043E\u043D \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u044F",patternLinearStart:"\u041B\u0438\u043D\u0435\u0439\u043D\u044B\u0439 (\u043D\u0430\u0447\u0430\u043B\u043E)",patternLinearEnd:"\u041B\u0438\u043D\u0435\u0439\u043D\u044B\u0439 (\u043A\u043E\u043D\u0435\u0446)",patternRandom:"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439",patternCenterOut:"\u0418\u0437 \u0446\u0435\u043D\u0442\u0440\u0430 \u043D\u0430\u0440\u0443\u0436\u0443",patternCornersFirst:"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0443\u0433\u043B\u044B",patternSpiral:"\u0421\u043F\u0438\u0440\u0430\u043B\u044C",logWindow:"\u041B\u043E\u0433\u0438",logWindowTitle:"\u041B\u043E\u0433\u0438 - {botName}",downloadLogs:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u041B\u043E\u0433\u0438",clearLogs:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u041B\u043E\u0433\u0438",closeLogs:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",userInfo:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435",imageProgress:"\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F",availableColors:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430",noImageLoaded:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E",cooldown:"\u0412\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F",totalColors:"\u041E\u0431\u0449\u0435\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0446\u0432\u0435\u0442\u043E\u0432",colorPalette:"\u0426\u0432\u0435\u0442\u043E\u0432\u0430\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430",showAllColors:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0446\u0432\u0435\u0442\u0430 (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435)",selectAllColors:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435",unselectAllColors:"\u0421\u043D\u044F\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0441\u043E \u0432\u0441\u0435\u0445",noAvailable:"\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E",colorSelected:"\u0426\u0432\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D",statsUpdated:"\u2705 \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0430: {count} \u0446\u0432\u0435\u0442\u043E\u0432 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"\u041D\u0430\u0447\u0430\u0442\u044C",stop:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",stopped:"\u0411\u043E\u0442 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D",calibrate:"\u041A\u0430\u043B\u0438\u0431\u0440\u043E\u0432\u0430\u0442\u044C",paintOnce:"\u0415\u0434\u0438\u043D\u043E\u0440\u0430\u0437\u043E\u0432\u043E",checkingStatus:"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430...",configuration:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F",delay:"\u0417\u0430\u0434\u0435\u0440\u0436\u043A\u0430 (\u043C\u0441)",pixelsPerBatch:"\u041F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0437\u0430 \u043F\u0440\u043E\u0445\u043E\u0434",minCharges:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B-\u0432\u043E",colorMode:"\u0420\u0435\u0436\u0438\u043C \u0446\u0432\u0435\u0442\u043E\u0432",random:"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439",fixed:"\u0424\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439",range:"\u0414\u0438\u0430\u043F\u0430\u0437\u043E\u043D",fixedColor:"\u0424\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",advanced:"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0435",tileX:"\u041F\u043B\u0438\u0442\u043A\u0430 X",tileY:"\u041F\u043B\u0438\u0442\u043A\u0430 Y",customPalette:"\u0421\u0432\u043E\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430",paletteExample:"\u043F\u0440\u0438\u043C\u0435\u0440: #FF0000,#00FF00,#0000FF",capture:"\u0417\u0430\u0445\u0432\u0430\u0442",painted:"\u0417\u0430\u043A\u0440\u0430\u0448\u0435\u043D\u043E",charges:"\u0417\u0430\u0440\u044F\u0434\u044B",retries:"\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0438",position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F",tile:"\u041F\u043B\u0438\u0442\u043A\u0430",configSaved:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430",configLoaded:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u0430",configReset:"\u0421\u0431\u0440\u043E\u0441 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438",captureInstructions:"\u041D\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u044C \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0434\u043B\u044F \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442...",backendOnline:"\u0411\u044D\u043A\u044D\u043D\u0434 \u041E\u043D\u043B\u0430\u0439\u043D",backendOffline:"\u0411\u044D\u043A\u044D\u043D\u0434 \u041E\u0444\u043B\u0430\u0439\u043D",startingBot:"\u0417\u0430\u043F\u0443\u0441\u043A \u0431\u043E\u0442\u0430...",stoppingBot:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0431\u043E\u0442\u0430...",calibrating:"\u041A\u0430\u043B\u0438\u0431\u0440\u043E\u0432\u043A\u0430...",alreadyRunning:"\u0410\u0432\u0442\u043E-\u0424\u0430\u0440\u043C \u0443\u0436\u0435 \u0437\u0430\u043F\u0443\u0449\u0435\u043D",imageRunningWarning:"\u0410\u0432\u0442\u043E-\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u043E. \u0417\u0430\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0433\u043E \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u043C \u0410\u0432\u0442\u043E-\u0424\u0430\u0440\u043C\u0430.",selectPositionAlert:"\u{1F3AF} \u041D\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u044C \u0432 \u041F\u0423\u0421\u0422\u041E\u0419 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u043A\u0430\u0440\u0442\u044B, \u0447\u0442\u043E\u0431\u044B \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0438\u0442\u044C \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u0444\u0430\u0440\u043C\u0430.",waitingPosition:"\u{1F446} \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0441\u0442\u0430\u0440\u0442\u043E\u0432\u043E\u0433\u043E \u043F\u0438\u043A\u0441\u0435\u043B\u044F....",positionSet:"\u2705 \u0417\u043E\u043D\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430!",positionTimeout:"\u274C \u0422\u0430\u0439\u043C\u0430\u0443\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u0437\u043E\u043D\u044B",missingPosition:"\u274C \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043E\u043D\u0443 \u0441\u043D\u0430\u0447\u0430\u043B\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044F '\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0437\u043E\u043D\u0443'",farmRadius:"\u0420\u0430\u0434\u0438\u0443\u0441 \u0444\u0430\u0440\u043C\u0430",positionInfo:"\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0437\u043E\u043D\u0430",farmingInRadius:"\u{1F33E} \u0424\u0430\u0440\u043C \u0432 \u0440\u0430\u0434\u0438\u0443\u0441\u0435 {radius}px \u043E\u0442 ({x},{y})",selectEmptyArea:"\u26A0\uFE0F \u0412\u0410\u0416\u041D\u041E: \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u041F\u0423\u0421\u0422\u0423\u042E \u043E\u0431\u043B\u0430\u0441\u0442\u044C, \u0447\u0442\u043E\u0431\u044B \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u043E\u0432.",noPosition:"\u041D\u0435\u0442 \u0437\u043E\u043D\u044B",currentZone:"\u0417\u043E\u043D\u0430: ({x},{y})",autoSelectPosition:"\u{1F3AF} \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0437\u043E\u043D\u0443. \u041D\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0438\u0442\u044C \u0437\u043E\u043D\u0443 \u0444\u0430\u0440\u043C\u0430.",logWindow:"\u041B\u043E\u0433\u0438",logWindowTitle:"\u041B\u043E\u0433\u0438 - {botName}",downloadLogs:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u041B\u043E\u0433\u0438",clearLogs:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u041B\u043E\u0433\u0438",closeLogs:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",ready:"\u0413\u043E\u0442\u043E\u0432",once:"\u0415\u0434\u0438\u043D\u043E\u0440\u0430\u0437\u043E\u0432\u043E",recapture:"\u041F\u0435\u0440\u0435\u0437\u0430\u0445\u0432\u0430\u0442",selectPosition:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C",stats:{painted:"\u0417\u0430\u043A\u0440\u0430\u0448\u0435\u043D\u043E",charges:"\u0417\u0430\u0440\u044F\u0434\u044B",droplets:"\u041A\u0430\u043F\u043B\u0438",user:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C",retries:"\u041F\u043E\u043F\u044B\u0442\u043A\u0438"},config:{minCharges:"\u041C\u0438\u043D\u0438\u043C\u0443\u043C \u0437\u0430\u0440\u044F\u0434\u043E\u0432",delay:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 (\u0441\u0435\u043A)",pixelsPerBatch:"\u041F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0437\u0430 \u043F\u0440\u043E\u0445\u043E\u0434"},color:{fixed:"\u0424\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439",range:"\u0414\u0438\u0430\u043F\u0430\u0437\u043E\u043D",random:"\u0421\u043B\u0443\u0447\u0430\u0439\u043D\u044B\u0439",selected:"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",min:"\u041C\u0438\u043D",max:"\u041C\u0430\u043A\u0441"},autobuy:{title:"\u0410\u0432\u0442\u043E\u043F\u043E\u043A\u0443\u043F\u043A\u0430 (+5 \u0437\u0430\u0440\u044F\u0434\u043E\u0432)",hint:"\u0410\u043A\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043F\u0440\u0438 \u2265 500 \u043A\u0430\u043F\u0435\u043B\u044C"},buyCharges:"\u041A\u0443\u043F\u0438\u0442\u044C +5 \u0437\u0430\u0440\u044F\u0434\u043E\u0432",buying:"\u041F\u043E\u043A\u0443\u043F\u043A\u0430...",buyOk:"\u041F\u043E\u043A\u0443\u043F\u043A\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0435\u0441\u0441\u0438\u044E.",buyFail:"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043A\u0443\u043F\u0438\u0442\u044C"},common:{yes:"\u0414\u0430",no:"\u041D\u0435\u0442",ok:"\u041E\u041A",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",save:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",load:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C",delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",edit:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C",start:"\u041D\u0430\u0447\u0430\u0442\u044C",stop:"\u0417\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u044C",pause:"\u041F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",resume:"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C",reset:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C",settings:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",help:"\u041F\u043E\u043C\u043E\u0449\u044C",about:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",language:"\u042F\u0437\u044B\u043A",loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...",error:"\u041E\u0448\u0438\u0431\u043A\u0430",success:"\u0423\u0441\u043F\u0435\u0445",warning:"\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435",info:"\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F",languageChanged:"\u042F\u0437\u044B\u043A \u0438\u0437\u043C\u0435\u043D\u0435\u043D \u043D\u0430 {language}"},guard:{title:"WPlace \u0410\u0432\u0442\u043E-\u0417\u0430\u0449\u0438\u0442\u0430",initBot:"\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C Guard-BOT",selectArea:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u041E\u0431\u043B\u0430\u0441\u0442\u044C",save:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",loadFile:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0444\u0430\u0439\u043B",reposition:"\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C",analyzeArea:"\u0410\u043D\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0431\u043B\u0430\u0441\u0442\u044C",logs:"\u041B\u043E\u0433\u0438",watcher:"\u041D\u0430\u0431\u043B\u044E\u0434\u0430\u0442\u0435\u043B\u044C",configuration:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F",startErase:"\u041D\u0430\u0447\u0430\u0442\u044C \u0441\u0442\u0438\u0440\u0430\u043D\u0438\u0435",stopWatcher:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0430\u0431\u043B\u044E\u0434\u0430\u0442\u0435\u043B\u044F",minimize:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C",nextBatchIn:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043F\u0430\u0440\u0442\u0438\u044F \u0447\u0435\u0440\u0435\u0437: ",captureArea:"\u0417\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u044C \u041E\u0431\u043B\u0430\u0441\u0442\u044C",startProtection:"\u041D\u0430\u0447\u0430\u0442\u044C",stopProtection:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",protectedPixels:"\u0417\u0430\u0449\u0438\u0449\u0435\u043D\u043D\u044B\u0435 \u041F\u0438\u043A\u0441\u0435\u043B\u0438",upperLeft:"\u0412\u0435\u0440\u0445\u043D\u0438\u0439 \u041B\u0435\u0432\u044B\u0439 \u0423\u0433\u043E\u043B",lowerRight:"\u041D\u0438\u0436\u043D\u0438\u0439 \u041F\u0440\u0430\u0432\u044B\u0439 \u0423\u0433\u043E\u043B",detectedChanges:"\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0435 \u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F",repairedPixels:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u041F\u0438\u043A\u0441\u0435\u043B\u0438",charges:"\u0417\u0430\u0440\u044F\u0434\u044B",waitingInit:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438...",checkingColors:"\u{1F3A8} \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0446\u0432\u0435\u0442\u043E\u0432...",noColorsFound:"\u274C \u0426\u0432\u0435\u0442\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u0446\u0432\u0435\u0442\u043E\u0432 \u043D\u0430 \u0441\u0430\u0439\u0442\u0435.",colorsFound:"\u2705 \u041D\u0430\u0439\u0434\u0435\u043D\u043E {count} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0446\u0432\u0435\u0442\u043E\u0432",initSuccess:"\u2705 Guard-BOT \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D",initError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 Guard-BOT",invalidCoords:"\u274C \u041D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u044B",invalidArea:"\u274C \u041E\u0431\u043B\u0430\u0441\u0442\u044C \u0434\u043E\u043B\u0436\u043D\u0430 \u0438\u043C\u0435\u0442\u044C \u0432\u0435\u0440\u0445\u043D\u0438\u0439 \u043B\u0435\u0432\u044B\u0439 \u0443\u0433\u043E\u043B \u043C\u0435\u043D\u044C\u0448\u0435 \u043D\u0438\u0436\u043D\u0435\u0433\u043E \u043F\u0440\u0430\u0432\u043E\u0433\u043E \u0443\u0433\u043B\u0430",areaTooLarge:"\u274C \u041E\u0431\u043B\u0430\u0441\u0442\u044C \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u0430\u044F: {size} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 (\u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C: {max})",capturingArea:"\u{1F4F8} \u0417\u0430\u0445\u0432\u0430\u0442 \u043E\u0431\u043B\u0430\u0441\u0442\u0438...",areaCaptured:"\u2705 \u041E\u0431\u043B\u0430\u0441\u0442\u044C \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043D\u0430: {count} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439",captureError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043E\u0431\u043B\u0430\u0441\u0442\u0438: {error}",captureFirst:"\u274C \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u044C",noChanges:"\u2705 \u041E\u0431\u043B\u0430\u0441\u0442\u044C - \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E",changesDetected:"\u{1F6A8} {count} \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0432 \u043E\u0431\u043B\u0430\u0441\u0442\u0438",repairing:"\u{1F6E0}\uFE0F \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 {count} \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439...",repairedSuccess:"\u2705 \u0423\u0441\u043F\u0435\u0448\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E {count} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439",repairError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439: {error}",noCharges:"\u26A0\uFE0F \u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0437\u0430\u0440\u044F\u0434\u043E\u0432 \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",checkingChanges:"\u{1F50D} \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0432 \u043E\u0431\u043B\u0430\u0441\u0442\u0438...",errorChecking:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439: {error}",guardActive:"\u{1F6E1}\uFE0F \u0421\u0442\u0440\u0430\u0436 \u0430\u043A\u0442\u0438\u0432\u0435\u043D - \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u043F\u043E\u0434 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435\u043C",lastCheck:"\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430: {time}",nextCheck:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0447\u0435\u0440\u0435\u0437: {time}\u0441",autoInitializing:"\u{1F916} \u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F...",autoInitSuccess:"\u2705 Guard-BOT \u0437\u0430\u043F\u0443\u0449\u0435\u043D \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",autoInitFailed:"\u26A0\uFE0F \u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \u0440\u0443\u0447\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430.",manualInitRequired:"\u{1F527} \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0440\u0443\u0447\u043D\u0430\u044F \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F",paletteDetected:"\u{1F3A8} \u0426\u0432\u0435\u0442\u043E\u0432\u0430\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0430",paletteNotFound:"\u{1F50D} \u041F\u043E\u0438\u0441\u043A \u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043F\u0430\u043B\u0438\u0442\u0440\u044B...",clickingPaintButton:"\u{1F446} \u041D\u0430\u0436\u0430\u0442\u0438\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 \xABPaint\xBB...",paintButtonNotFound:"\u274C \u041A\u043D\u043E\u043F\u043A\u0430 \xABPaint\xBB \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430",protectionStopped:"\u23F9\uFE0F \u0417\u0430\u0449\u0438\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430",selectUpperLeft:"\u{1F3AF} \u041D\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u044C \u0432 \u0412\u0415\u0420\u0425\u041D\u0415\u041C \u041B\u0415\u0412\u041E\u041C \u0443\u0433\u043B\u0443 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0434\u043B\u044F \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u044F",selectLowerRight:"\u{1F3AF} \u0422\u0435\u043F\u0435\u0440\u044C \u043D\u0430\u0440\u0438\u0441\u0443\u0439\u0442\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u044C \u0432 \u041D\u0418\u0416\u041D\u0415\u041C \u041F\u0420\u0410\u0412\u041E\u041C \u0443\u0433\u043B\u0443 \u043E\u0431\u043B\u0430\u0441\u0442\u0438",waitingUpperLeft:"\u{1F446} \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0432\u0435\u0440\u0445\u043D\u0435\u0433\u043E \u043B\u0435\u0432\u043E\u0433\u043E \u0443\u0433\u043B\u0430...",waitingLowerRight:"\u{1F446} \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u043D\u0438\u0436\u043D\u0435\u0433\u043E \u043F\u0440\u0430\u0432\u043E\u0433\u043E \u0443\u0433\u043B\u0430...",upperLeftCaptured:"\u2705 \u0412\u0435\u0440\u0445\u043D\u0438\u0439 \u043B\u0435\u0432\u044B\u0439 \u0443\u0433\u043E\u043B \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043D: ({x}, {y})",lowerRightCaptured:"\u2705 \u041D\u0438\u0436\u043D\u0438\u0439 \u043F\u0440\u0430\u0432\u044B\u0439 \u0443\u0433\u043E\u043B \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043D: ({x}, {y})",selectionTimeout:"\u274C \u0422\u0430\u0439\u043C-\u0430\u0443\u0442 \u0432\u044B\u0431\u043E\u0440\u0430",selectionError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u044B\u0431\u043E\u0440\u0430, \u043F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430",logWindow:"\u041B\u043E\u0433\u0438",logWindowTitle:"\u041B\u043E\u0433\u0438 - {botName}",downloadLogs:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u041B\u043E\u0433\u0438",clearLogs:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u041B\u043E\u0433\u0438",closeLogs:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",analysisTitle:"\u0410\u043D\u0430\u043B\u0438\u0437 \u0420\u0430\u0437\u043B\u0438\u0447\u0438\u0439 - JSON vs \u0422\u0435\u043A\u0443\u0449\u0438\u0439 Canvas",correctPixels:"\u041F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0435 \u041F\u0438\u043A\u0441\u0435\u043B\u0438",incorrectPixels:"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0435 \u041F\u0438\u043A\u0441\u0435\u043B\u0438",missingPixels:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u041F\u0438\u043A\u0441\u0435\u043B\u0438",showCorrect:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u041F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0435",showIncorrect:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0435",showMissing:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435",autoRefresh:"\u0410\u0432\u0442\u043E-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435",zoomAdjusted:"\u041C\u0430\u0441\u0448\u0442\u0430\u0431 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D \u043D\u0430",autoRefreshEnabled:"\u0410\u0432\u0442\u043E-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A\u0430\u0436\u0434\u044B\u0435",autoRefreshDisabled:"\u0410\u0432\u0442\u043E-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E",autoRefreshIntervalUpdated:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B \u0430\u0432\u0442\u043E-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D \u0434\u043E",visualizationUpdated:"\u0412\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0430",noAreaOrPixels:"\u041D\u0435\u0442 \u0437\u0430\u0449\u0438\u0449\u0435\u043D\u043D\u043E\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0438\u043B\u0438 \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0434\u043B\u044F \u0430\u043D\u0430\u043B\u0438\u0437\u0430",noColorsDetected:"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0438\u0442\u044C \u0446\u0432\u0435\u0442\u0430. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430.",sessionRecordingStarted:"\u0417\u0430\u043F\u0438\u0441\u044C \u0441\u0435\u0441\u0441\u0438\u0438 \u043D\u0430\u0447\u0430\u0442\u0430 \u0441 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u043C \u0430\u0432\u0442\u043E-\u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435\u043C",sessionRecordingStopped:"\u0417\u0430\u043F\u0438\u0441\u044C \u0441\u0435\u0441\u0441\u0438\u0438 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430",noSessionData:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043B\u044F \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438",sessionDataDownloaded:"\u0414\u0430\u043D\u043D\u044B\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u044B",snapshotCaptureError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F",recordSession:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0435\u0441\u0441\u0438\u044E",snapshot:"\u0421\u043D\u0438\u043C\u043E\u043A",downloadData:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",zoom:"\u041C\u0430\u0441\u0448\u0442\u0430\u0431",interval:"\u0418\u043D\u0442\u0435\u0440\u0432\u0430\u043B",seconds:"\u0441\u0435\u043A\u0443\u043D\u0434",updateAnalysis:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0430\u043D\u0430\u043B\u0438\u0437",adjustZoom:"\u041D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043C\u0430\u0441\u0448\u0442\u0430\u0431",precision:"\u0422\u043E\u0447\u043D\u043E\u0441\u0442\u044C",statistics:"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0430",visualization:"\u0412\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F",recording:"\u0417\u0430\u043F\u0438\u0441\u044C",configTitle:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F Guard",protectionPatterns:"\u0428\u0430\u0431\u043B\u043E\u043D\u044B \u0417\u0430\u0449\u0438\u0442\u044B",preferSpecificColor:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0446\u0432\u0435\u0442\u0430",excludeSpecificColors:"\u041D\u0435 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u0430",loadManagement:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u041D\u0430\u0433\u0440\u0443\u0437\u043A\u043E\u0439",minLoadsToWait:"\u041C\u0438\u043D\u0438\u043C\u0443\u043C \u043D\u0430\u0433\u0440\u0443\u0437\u043E\u043A:",pixelsPerBatch:"\u041F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0437\u0430 \u043F\u0430\u0440\u0442\u0438\u044E",spendAllPixelsOnStart:"\u041F\u043E\u0442\u0440\u0430\u0442\u0438\u0442\u044C \u0432\u0441\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u0438 \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435",waitTimes:"\u0412\u0440\u0435\u043C\u044F \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u044F",useRandomTimes:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u043C\u0435\u0436\u0434\u0443 \u043F\u0430\u0440\u0442\u0438\u044F\u043C\u0438",minTime:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F (\u0441)",maxTime:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F (\u0441)"},slave:{title:"WPlace \u0410\u0432\u0442\u043E-\u0420\u0430\u0431\u043E\u0447\u0438\u0439",initBot:"\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C Slave-BOT",startPainting:"\u041D\u0430\u0447\u0430\u0442\u044C",stopPainting:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C",logs:"\u041B\u043E\u0433\u0438",configuration:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F",minimize:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",pixelsPerBatch:"\u041F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0437\u0430 \u043F\u0430\u0440\u0442\u0438\u044E",nextBatchIn:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043F\u0430\u0440\u0442\u0438\u044F \u0447\u0435\u0440\u0435\u0437: ",waitingInit:"\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438...",checkingColors:"\u{1F3A8} \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0446\u0432\u0435\u0442\u043E\u0432...",noColorsFound:"\u274C \u0426\u0432\u0435\u0442\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u0446\u0432\u0435\u0442\u043E\u0432 \u043D\u0430 \u0441\u0430\u0439\u0442\u0435.",colorsFound:"\u2705 \u041D\u0430\u0439\u0434\u0435\u043D\u043E {count} \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0446\u0432\u0435\u0442\u043E\u0432",initSuccess:"\u2705 Slave-BOT \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D",initError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438 Slave-BOT",noCoordsSet:"\u274C \u041A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u044B \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u044B. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 WPlace AutoBOT Image.",noCoordsData:"\u274C \u0414\u0430\u043D\u043D\u044B\u0435 \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442\u044B \u0432 WPlace AutoBOT Image.",coordsLoaded:"\u2705 \u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E {count} \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442 \u0438\u0437 WPlace AutoBOT Image",coordsError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0442: {error}",paintingStarted:"\u{1F3A8} \u0420\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430\u0447\u0430\u043B\u043E\u0441\u044C",paintingStopped:"\u23F9\uFE0F \u0420\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E",paintingPixel:"\u{1F58C}\uFE0F \u0420\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u044F ({x}, {y}) \u0446\u0432\u0435\u0442\u043E\u043C {color}",pixelPainted:"\u2705 \u041F\u0438\u043A\u0441\u0435\u043B\u044C \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D \u0443\u0441\u043F\u0435\u0448\u043D\u043E",pixelError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u0438\u043A\u0441\u0435\u043B\u044F: {error}",batchComplete:"\u2705 \u041F\u0430\u0440\u0442\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430: {painted} \u0438\u0437 {total} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043E",batchError:"\u274C \u041E\u0448\u0438\u0431\u043A\u0430 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043F\u0430\u0440\u0442\u0438\u0438: {error}",allPixelsComplete:"\u{1F389} \u0412\u0441\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u044B!",noCharges:"\u26A0\uFE0F \u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0437\u0430\u0440\u044F\u0434\u043E\u0432 \u0434\u043B\u044F \u0440\u0438\u0441\u043E\u0432\u0430\u043D\u0438\u044F",waitingForCharges:"\u23F3 \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0437\u0430\u0440\u044F\u0434\u043E\u0432...",charges:"\u0417\u0430\u0440\u044F\u0434\u044B",totalPixels:"\u0412\u0441\u0435\u0433\u043E \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439",paintedPixels:"\u041D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043E \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439",remainingPixels:"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439",currentBatch:"\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u043F\u0430\u0440\u0442\u0438\u044F",progress:"\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",estimatedTime:"\u0420\u0430\u0441\u0447\u0435\u0442\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F",autoInitializing:"\u{1F916} \u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F...",autoInitSuccess:"\u2705 Slave-BOT \u0437\u0430\u043F\u0443\u0449\u0435\u043D \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",autoInitFailed:"\u26A0\uFE0F \u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \u0440\u0443\u0447\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430.",manualInitRequired:"\u{1F527} \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0440\u0443\u0447\u043D\u0430\u044F \u0438\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F",paletteDetected:"\u{1F3A8} \u0426\u0432\u0435\u0442\u043E\u0432\u0430\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0430",paletteNotFound:"\u{1F50D} \u041F\u043E\u0438\u0441\u043A \u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043F\u0430\u043B\u0438\u0442\u0440\u044B...",clickingPaintButton:"\u{1F446} \u041D\u0430\u0436\u0430\u0442\u0438\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 \xABPaint\xBB...",paintButtonNotFound:"\u274C \u041A\u043D\u043E\u043F\u043A\u0430 \xABPaint\xBB \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430",logWindow:"\u041B\u043E\u0433\u0438",logWindowTitle:"\u041B\u043E\u0433\u0438 - {botName}",downloadLogs:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u041B\u043E\u0433\u0438",clearLogs:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u041B\u043E\u0433\u0438",closeLogs:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",configTitle:"\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F Slave",loadManagement:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u041D\u0430\u0433\u0440\u0443\u0437\u043A\u043E\u0439",minLoadsToWait:"\u041C\u0438\u043D\u0438\u043C\u0443\u043C \u043D\u0430\u0433\u0440\u0443\u0437\u043E\u043A:",pixelsPerBatchConfig:"\u041F\u0438\u043A\u0441\u0435\u043B\u0435\u0439 \u0437\u0430 \u043F\u0430\u0440\u0442\u0438\u044E",spendAllPixelsOnStart:"\u041F\u043E\u0442\u0440\u0430\u0442\u0438\u0442\u044C \u0432\u0441\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u0438 \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435",waitTimes:"\u0412\u0440\u0435\u043C\u044F \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u044F",useRandomTimes:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u043B\u0443\u0447\u0430\u0439\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u043C\u0435\u0436\u0434\u0443 \u043F\u0430\u0440\u0442\u0438\u044F\u043C\u0438",minTime:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F (\u0441)",maxTime:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F (\u0441)"}}});var Fo,$o=R(()=>{Fo={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"\u9009\u62E9",user:"\u7528\u6237",charges:"\u6B21\u6570",backend:"\u540E\u7AEF",database:"\u6570\u636E\u5E93",uptime:"\u8FD0\u884C\u65F6\u95F4",close:"\u5173\u95ED",launch:"\u542F\u52A8",loading:"\u52A0\u8F7D\u4E2D\u2026",executing:"\u6267\u884C\u4E2D\u2026",downloading:"\u6B63\u5728\u4E0B\u8F7D\u811A\u672C\u2026",chooseBot:"\u9009\u62E9\u4E00\u4E2A\u673A\u5668\u4EBA\u5E76\u70B9\u51FB\u542F\u52A8",readyToLaunch:"\u51C6\u5907\u542F\u52A8",loadError:"\u52A0\u8F7D\u9519\u8BEF",loadErrorMsg:"\u65E0\u6CD5\u52A0\u8F7D\u6240\u9009\u673A\u5668\u4EBA\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u8FDE\u63A5\u6216\u91CD\u8BD5\u3002",checking:"\u{1F504} \u68C0\u67E5\u4E2D...",online:"\u{1F7E2} \u5728\u7EBF",offline:"\u{1F534} \u79BB\u7EBF",ok:"\u{1F7E2} \u6B63\u5E38",error:"\u{1F534} \u9519\u8BEF",unknown:"-",logWindow:"Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED",localExecution:"\u672C\u5730\u6267\u884C\uFF0C\u5B8C\u5168\u8BBF\u95EE\u4EE4\u724C\u7CFB\u7EDF",botStarting:"\u673A\u5668\u4EBA\u542F\u52A8\u4E2D..."},image:{title:"WPlace Auto-Image",initBot:"\u521D\u59CB\u5316\u81EA\u52A8\u673A\u5668\u4EBA",uploadImage:"\u4E0A\u4F20\u56FE\u7247",resizeImage:"\u8C03\u6574\u56FE\u7247\u5927\u5C0F",selectPosition:"\u9009\u62E9\u4F4D\u7F6E",startPainting:"\u5F00\u59CB\u7ED8\u5236",stopPainting:"\u505C\u6B62\u7ED8\u5236",saveProgress:"\u4FDD\u5B58\u8FDB\u5EA6",loadProgress:"\u52A0\u8F7D\u8FDB\u5EA6",checkingColors:"\u{1F50D} \u68C0\u67E5\u53EF\u7528\u989C\u8272...",noColorsFound:"\u274C \u8BF7\u5728\u7F51\u7AD9\u4E0A\u6253\u5F00\u8C03\u8272\u677F\u540E\u91CD\u8BD5\uFF01",colorsFound:"\u2705 \u627E\u5230 {count} \u79CD\u53EF\u7528\u989C\u8272",loadingImage:"\u{1F5BC}\uFE0F \u6B63\u5728\u52A0\u8F7D\u56FE\u7247...",imageLoaded:"\u2705 \u56FE\u7247\u5DF2\u52A0\u8F7D\uFF0C\u6709\u6548\u50CF\u7D20 {count} \u4E2A",imageError:"\u274C \u56FE\u7247\u52A0\u8F7D\u5931\u8D25",selectPositionAlert:"\u8BF7\u5728\u4F60\u60F3\u5F00\u59CB\u7ED8\u5236\u7684\u5730\u65B9\u6D82\u7B2C\u4E00\u4E2A\u50CF\u7D20\uFF01",waitingPosition:"\u{1F446} \u7B49\u5F85\u4F60\u6D82\u53C2\u8003\u50CF\u7D20...",positionSet:"\u2705 \u4F4D\u7F6E\u8BBE\u7F6E\u6210\u529F\uFF01",positionTimeout:"\u274C \u4F4D\u7F6E\u9009\u62E9\u8D85\u65F6",positionDetected:"\u{1F3AF} \u5DF2\u68C0\u6D4B\u5230\u4F4D\u7F6E\uFF0C\u5904\u7406\u4E2D...",positionError:"\u274C \u4F4D\u7F6E\u68C0\u6D4B\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",startPaintingMsg:"\u{1F3A8} \u5F00\u59CB\u7ED8\u5236...",paintingProgress:"\u{1F9F1} \u8FDB\u5EA6: {painted}/{total} \u50CF\u7D20...",noCharges:"\u231B \u6CA1\u6709\u6B21\u6570\u3002\u7B49\u5F85 {time}...",paintingStopped:"\u23F9\uFE0F \u7528\u6237\u5DF2\u505C\u6B62\u7ED8\u5236",paintingComplete:"\u2705 \u7ED8\u5236\u5B8C\u6210\uFF01\u5171\u7ED8\u5236 {count} \u4E2A\u50CF\u7D20\u3002",paintingError:"\u274C \u7ED8\u5236\u8FC7\u7A0B\u4E2D\u51FA\u9519",missingRequirements:"\u274C \u8BF7\u5148\u52A0\u8F7D\u56FE\u7247\u5E76\u9009\u62E9\u4F4D\u7F6E",progress:"\u8FDB\u5EA6",userName:"\u7528\u6237",pixels:"\u50CF\u7D20",charges:"\u6B21\u6570",estimatedTime:"\u9884\u8BA1\u65F6\u95F4",initMessage:"\u70B9\u51FB\u201C\u521D\u59CB\u5316\u81EA\u52A8\u673A\u5668\u4EBA\u201D\u5F00\u59CB",waitingInit:"\u7B49\u5F85\u521D\u59CB\u5316...",resizeSuccess:"\u2705 \u56FE\u7247\u5DF2\u8C03\u6574\u4E3A {width}x{height}",paintingPaused:"\u23F8\uFE0F \u7ED8\u5236\u6682\u505C\u4E8E\u4F4D\u7F6E X: {x}, Y: {y}",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6570",batchSize:"\u6279\u6B21\u5927\u5C0F",nextBatchTime:"\u4E0B\u6B21\u6279\u6B21\u65F6\u95F4",useAllCharges:"\u4F7F\u7528\u6240\u6709\u53EF\u7528\u6B21\u6570",showOverlay:"\u663E\u793A\u8986\u76D6\u5C42",maxCharges:"\u6BCF\u6279\u6700\u5927\u6B21\u6570",waitingForCharges:"\u23F3 \u7B49\u5F85\u6B21\u6570: {current}/{needed}",timeRemaining:"\u5269\u4F59\u65F6\u95F4",cooldownWaiting:"\u23F3 \u7B49\u5F85 {time} \u540E\u7EE7\u7EED...",progressSaved:"\u2705 \u8FDB\u5EA6\u5DF2\u4FDD\u5B58\u4E3A {filename}",progressLoaded:"\u2705 \u5DF2\u52A0\u8F7D\u8FDB\u5EA6: {painted}/{total} \u50CF\u7D20\u5DF2\u7ED8\u5236",progressLoadError:"\u274C \u52A0\u8F7D\u8FDB\u5EA6\u5931\u8D25: {error}",progressSaveError:"\u274C \u4FDD\u5B58\u8FDB\u5EA6\u5931\u8D25: {error}",confirmSaveProgress:"\u5728\u505C\u6B62\u4E4B\u524D\u8981\u4FDD\u5B58\u5F53\u524D\u8FDB\u5EA6\u5417\uFF1F",saveProgressTitle:"\u4FDD\u5B58\u8FDB\u5EA6",discardProgress:"\u653E\u5F03",cancel:"\u53D6\u6D88",minimize:"\u6700\u5C0F\u5316",width:"\u5BBD\u5EA6",height:"\u9AD8\u5EA6",keepAspect:"\u4FDD\u6301\u7EB5\u6A2A\u6BD4",apply:"\u5E94\u7528",overlayOn:"\u8986\u76D6\u5C42: \u5F00\u542F",overlayOff:"\u8986\u76D6\u5C42: \u5173\u95ED",passCompleted:"\u2705 \u6279\u6B21\u5B8C\u6210: \u5DF2\u7ED8\u5236 {painted} \u50CF\u7D20 | \u8FDB\u5EA6: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 \u7B49\u5F85\u6B21\u6570\u6062\u590D: {current}/{needed} - \u65F6\u95F4: {time}",waitingChargesCountdown:"\u23F3 \u7B49\u5F85\u6B21\u6570: {current}/{needed} - \u5269\u4F59: {time}",autoInitializing:"\u{1F916} \u6B63\u5728\u81EA\u52A8\u521D\u59CB\u5316...",autoInitSuccess:"\u2705 \u81EA\u52A8\u542F\u52A8\u6210\u529F",autoInitFailed:"\u26A0\uFE0F \u65E0\u6CD5\u81EA\u52A8\u542F\u52A8\uFF0C\u8BF7\u624B\u52A8\u64CD\u4F5C\u3002",paletteDetected:"\u{1F3A8} \u5DF2\u68C0\u6D4B\u5230\u8C03\u8272\u677F",paletteNotFound:"\u{1F50D} \u6B63\u5728\u641C\u7D22\u8C03\u8272\u677F...",clickingPaintButton:"\u{1F446} \u6B63\u5728\u70B9\u51FB\u7ED8\u5236\u6309\u94AE...",paintButtonNotFound:"\u274C \u672A\u627E\u5230\u7ED8\u5236\u6309\u94AE",manualInitRequired:"\u{1F527} \u9700\u8981\u624B\u52A8\u521D\u59CB\u5316",retryAttempt:"\u{1F504} \u91CD\u8BD5 {attempt}/{maxAttempts}\uFF0C\u7B49\u5F85 {delay} \u79D2...",retryError:"\u{1F4A5} \u7B2C {attempt}/{maxAttempts} \u6B21\u5C1D\u8BD5\u51FA\u9519\uFF0C\u5C06\u5728 {delay} \u79D2\u540E\u91CD\u8BD5...",retryFailed:"\u274C \u8D85\u8FC7 {maxAttempts} \u6B21\u5C1D\u8BD5\u5931\u8D25\u3002\u7EE7\u7EED\u4E0B\u4E00\u6279...",networkError:"\u{1F310} \u7F51\u7EDC\u9519\u8BEF\uFF0C\u6B63\u5728\u91CD\u8BD5...",serverError:"\u{1F525} \u670D\u52A1\u5668\u9519\u8BEF\uFF0C\u6B63\u5728\u91CD\u8BD5...",timeoutError:"\u23F0 \u670D\u52A1\u5668\u8D85\u65F6\uFF0C\u6B63\u5728\u91CD\u8BD5...",saveProgressBtn:"\u4FDD\u5B58\u8FDB\u5EA6",guardJsonBtn:"Guard JSON",resizeWindowTitle:"\u8C03\u6574\u56FE\u7247\u5927\u5C0F",original:"\u539F\u59CB",labTolerance:"LAB\u5BB9\u9519",maintainProportion:"\u4FDD\u6301\u6BD4\u4F8B",skipColor:"\u8DF3\u8FC7\u989C\u8272",skipColorEnabled:"\u53EA\u7ED8\u5236\u5B8C\u5168\u5339\u914D\u7684\u989C\u8272",similarityThreshold:"\u76F8\u4F3C\u5EA6\u9608\u503C",skipColorDescription:"\u53EA\u4F1A\u7ED8\u5236\u5B8C\u5168\u5339\u914D\u7684\u989C\u8272\uFF08100%\u76F8\u4F3C\u5EA6\uFF09\u3002",applyResize:"\u5E94\u7528",cancelResize:"\u53D6\u6D88",patternSnake:"\u86C7\u5F62\uFF08\u4E4B\u5B57\u5F62\uFF09",patternDiagonalSweep:"\u5BF9\u89D2\u626B\u63CF",patternBorders:"\u8FB9\u6846\u4F18\u5148",patternCenter:"\u4E2D\u5FC3\u4F18\u5148",patternQuadrants:"\u8C61\u9650",patternBiasedRandom:"\u504F\u5411\u968F\u673A\uFF08\u8FB9\u6846\uFF09",patternClusters:"\u96C6\u7FA4",patternProximity:"\u90BB\u8FD1\u6027",patternSweep:"\u5206\u533A\u626B\u63CF",patternPriority:"\u4F18\u5148\u7EA7\uFF08\u6DF7\u5408\uFF09",patternAnchorPoints:"\u951A\u70B9",patternSpiralCw:"\u87BA\u65CB\uFF08\u987A\u65F6\u9488\uFF09",patternSpiralCcw:"\u87BA\u65CB\uFF08\u9006\u65F6\u9488\uFF09",noProgressToSave:"\u6CA1\u6709\u8981\u4FDD\u5B58\u7684\u8FDB\u5EA6",progressSaveSuccess:"\u8FDB\u5EA6\u5DF2\u4FDD\u5B58\u4E3A {filename}",progressLoadSuccess:"\u8FDB\u5EA6\u5DF2\u52A0\u8F7D\uFF1A{painted}/{total} \u50CF\u7D20\u5DF2\u7ED8\u5236",invalidProgressFile:"\u8FDB\u5EA6\u6587\u4EF6\u65E0\u6548",missingFields:"\u7F3A\u5C11\u5FC5\u9700\u5B57\u6BB5\uFF1A{fields}",guardDialogTitle:"\u751F\u6210 Guard JSON",guardDialogMessage:"\u662F\u5426\u8981\u4F7F\u7528\u5F53\u524D\u6570\u636E\u751F\u6210 Guard JSON \u6587\u4EF6\uFF1F",guardDialogInfo:`\u56FE\u7247\uFF1A{name}
\u5C3A\u5BF8\uFF1A{width}x{height}
\u50CF\u7D20\uFF1A{pixels}`,generateGuard:"\u751F\u6210 Guard",guardJsonInvalidStructure:"\u274C Guard JSON \u7ED3\u6784\u65E0\u6548\u3002\u4E2D\u6B62\u4FDD\u5B58\u3002",guardJsonInvalidMessage:"Guard JSON \u7ED3\u6784\u65E0\u6548\u3002\u9009\u62E9\u4F4D\u7F6E\u540E\u91CD\u8BD5\u3002",guardJsonSaveSuccess:"\u2705 Guard JSON \u5DF2\u4FDD\u5B58\uFF1A{filename}",guardJsonSaveError:"\u274C \u4FDD\u5B58 Guard JSON \u9519\u8BEF\uFF1A{error}",notificationInfo:"\u4FE1\u606F",notificationSuccess:"\u6210\u529F",notificationWarning:"\u8B66\u544A",notificationError:"\u9519\u8BEF",paintPattern:"\u{1F4D0} \u7ED8\u5236\u6A21\u5F0F",patternLinearStart:"\u7EBF\u6027\uFF08\u8D77\u70B9\uFF09",patternLinearEnd:"\u7EBF\u6027\uFF08\u7EC8\u70B9\uFF09",patternRandom:"\u968F\u673A",patternCenterOut:"\u4ECE\u4E2D\u5FC3\u5411\u5916",patternCornersFirst:"\u5148\u89D2\u843D",patternSpiral:"\u87BA\u65CB",logWindow:"Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED",userInfo:"\u7528\u6237\u4FE1\u606F",imageProgress:"\u56FE\u7247\u8FDB\u5EA6",availableColors:"\u53EF\u7528\u989C\u8272",noImageLoaded:"\u6CA1\u6709\u52A0\u8F7D\u56FE\u7247",cooldown:"\u51B7\u5374\u65F6\u95F4",totalColors:"\u603B\u989C\u8272\u6570",colorPalette:"\u989C\u8272\u8C03\u8272\u677F",showAllColors:"\u663E\u793A\u6240\u6709\u989C\u8272\uFF08\u5305\u62EC\u4E0D\u53EF\u7528\u7684\uFF09",selectAllColors:"\u9009\u62E9\u5168\u90E8",unselectAllColors:"\u53D6\u6D88\u5168\u9009",noAvailable:"\u4E0D\u53EF\u7528",colorSelected:"\u5DF2\u9009\u62E9\u989C\u8272",statsUpdated:"\u2705 \u7EDF\u8BA1\u5DF2\u66F4\u65B0\uFF1A{count} \u79CD\u53EF\u7528\u989C\u8272"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"\u5F00\u59CB",stop:"\u505C\u6B62",stopped:"\u673A\u5668\u4EBA\u5DF2\u505C\u6B62",calibrate:"\u6821\u51C6",paintOnce:"\u4E00\u6B21",checkingStatus:"\u68C0\u67E5\u72B6\u6001\u4E2D...",configuration:"\u914D\u7F6E",delay:"\u5EF6\u8FDF (\u6BEB\u79D2)",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20",minCharges:"\u6700\u5C11\u6B21\u6570",colorMode:"\u989C\u8272\u6A21\u5F0F",random:"\u968F\u673A",fixed:"\u56FA\u5B9A",range:"\u8303\u56F4",fixedColor:"\u56FA\u5B9A\u989C\u8272",advanced:"\u9AD8\u7EA7",tileX:"\u74E6\u7247 X",tileY:"\u74E6\u7247 Y",customPalette:"\u81EA\u5B9A\u4E49\u8C03\u8272\u677F",paletteExample:"\u4F8B\u5982: #FF0000,#00FF00,#0000FF",capture:"\u6355\u83B7",painted:"\u5DF2\u7ED8\u5236",charges:"\u6B21\u6570",retries:"\u91CD\u8BD5",tile:"\u74E6\u7247",configSaved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",configLoaded:"\u914D\u7F6E\u5DF2\u52A0\u8F7D",configReset:"\u914D\u7F6E\u5DF2\u91CD\u7F6E",captureInstructions:"\u8BF7\u624B\u52A8\u7ED8\u5236\u4E00\u4E2A\u50CF\u7D20\u4EE5\u6355\u83B7\u5750\u6807...",backendOnline:"\u540E\u7AEF\u5728\u7EBF",backendOffline:"\u540E\u7AEF\u79BB\u7EBF",startingBot:"\u6B63\u5728\u542F\u52A8\u673A\u5668\u4EBA...",stoppingBot:"\u6B63\u5728\u505C\u6B62\u673A\u5668\u4EBA...",calibrating:"\u6821\u51C6\u4E2D...",alreadyRunning:"\u81EA\u52A8\u519C\u573A\u5DF2\u5728\u8FD0\u884C\u3002",imageRunningWarning:"\u81EA\u52A8\u7ED8\u56FE\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u5173\u95ED\u518D\u542F\u52A8\u81EA\u52A8\u519C\u573A\u3002",selectPosition:"\u9009\u62E9\u533A\u57DF",selectPositionAlert:"\u{1F3AF} \u5728\u5730\u56FE\u7684\u7A7A\u767D\u533A\u57DF\u6D82\u4E00\u4E2A\u50CF\u7D20\u4EE5\u8BBE\u7F6E\u519C\u573A\u533A\u57DF",waitingPosition:"\u{1F446} \u7B49\u5F85\u4F60\u6D82\u53C2\u8003\u50CF\u7D20...",positionSet:"\u2705 \u533A\u57DF\u8BBE\u7F6E\u6210\u529F\uFF01\u534A\u5F84: 500px",positionTimeout:"\u274C \u533A\u57DF\u9009\u62E9\u8D85\u65F6",missingPosition:"\u274C \u8BF7\u5148\u9009\u62E9\u533A\u57DF\uFF08\u4F7F\u7528\u201C\u9009\u62E9\u533A\u57DF\u201D\u6309\u94AE\uFF09",farmRadius:"\u519C\u573A\u534A\u5F84",positionInfo:"\u5F53\u524D\u533A\u57DF",farmingInRadius:"\u{1F33E} \u6B63\u5728\u4EE5\u534A\u5F84 {radius}px \u5728 ({x},{y}) \u519C\u573A",selectEmptyArea:"\u26A0\uFE0F \u91CD\u8981: \u8BF7\u9009\u62E9\u7A7A\u767D\u533A\u57DF\u4EE5\u907F\u514D\u51B2\u7A81",noPosition:"\u672A\u9009\u62E9\u533A\u57DF",currentZone:"\u533A\u57DF: ({x},{y})",autoSelectPosition:"\u{1F3AF} \u8BF7\u5148\u9009\u62E9\u533A\u57DF\uFF0C\u5728\u5730\u56FE\u4E0A\u6D82\u4E00\u4E2A\u50CF\u7D20\u4EE5\u8BBE\u7F6E\u519C\u573A\u533A\u57DF",logWindow:"Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED",ready:"\u5C31\u7EEA",once:"\u4E00\u6B21",recapture:"\u91CD\u65B0\u6355\u83B7",position:"\u4F4D\u7F6E",stats:{painted:"\u5DF2\u7ED8\u5236",charges:"\u6B21\u6570",droplets:"\u6C34\u6EF4",user:"\u7528\u6237",retries:"\u91CD\u8BD5"},config:{minCharges:"\u6700\u5C11\u6B21\u6570",delay:"\u7B49\u5F85\u65F6\u95F4\uFF08\u79D2\uFF09",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6570"},color:{fixed:"\u56FA\u5B9A",range:"\u8303\u56F4",random:"\u968F\u673A",selected:"\u5DF2\u9009\u62E9\u989C\u8272",min:"\u6700\u5C0F",max:"\u6700\u5927"},autobuy:{title:"\u81EA\u52A8\u8D2D\u4E70\uFF08+5\u6B21\u6570\uFF09",hint:"\u5F53\u4F60\u6709\u2265500\u6C34\u6EF4\u65F6\u5C06\u81EA\u52A8\u6FC0\u6D3B"},buyCharges:"\u8D2D\u4E70+5\u6B21\u6570",buying:"\u8D2D\u4E70\u4E2D...",buyOk:"\u8D2D\u4E70\u6210\u529F\u3002\u5237\u65B0\u4F1A\u8BDD\u3002",buyFail:"\u65E0\u6CD5\u8D2D\u4E70"},common:{yes:"\u662F",no:"\u5426",ok:"\u786E\u8BA4",cancel:"\u53D6\u6D88",close:"\u5173\u95ED",save:"\u4FDD\u5B58",load:"\u52A0\u8F7D",delete:"\u5220\u9664",edit:"\u7F16\u8F91",start:"\u5F00\u59CB",stop:"\u505C\u6B62",pause:"\u6682\u505C",resume:"\u7EE7\u7EED",reset:"\u91CD\u7F6E",settings:"\u8BBE\u7F6E",help:"\u5E2E\u52A9",about:"\u5173\u4E8E",language:"\u8BED\u8A00",loading:"\u52A0\u8F7D\u4E2D...",error:"\u9519\u8BEF",success:"\u6210\u529F",warning:"\u8B66\u544A",info:"\u4FE1\u606F",languageChanged:"\u8BED\u8A00\u5DF2\u5207\u6362\u4E3A {language}"},guard:{title:"WPlace Auto-Guard",initBot:"\u521D\u59CB\u5316\u5B88\u62A4\u673A\u5668\u4EBA",selectArea:"\u9009\u62E9\u533A\u57DF",save:"\u4FDD\u5B58",loadFile:"\u52A0\u8F7D\u6587\u4EF6",reposition:"\u91CD\u65B0\u5B9A\u4F4D",analyzeArea:"\u5206\u6790\u533A\u57DF",logs:"\u65E5\u5FD7",watcher:"\u76D1\u89C6\u5668",configuration:"\u914D\u7F6E",startErase:"\u5F00\u59CB\u64E6\u9664",stopWatcher:"\u505C\u6B62\u76D1\u89C6\u5668",minimize:"\u6700\u5C0F\u5316",expand:"\u5C55\u5F00",nextBatchIn:"\u4E0B\u4E00\u6279: ",captureArea:"\u6355\u83B7\u533A\u57DF",startProtection:"\u5F00\u59CB",stopProtection:"\u505C\u6B62",protectedPixels:"\u53D7\u4FDD\u62A4\u50CF\u7D20",upperLeft:"\u5DE6\u4E0A\u89D2",lowerRight:"\u53F3\u4E0B\u89D2",detectedChanges:"\u68C0\u6D4B\u5230\u7684\u53D8\u5316",repairedPixels:"\u4FEE\u590D\u7684\u50CF\u7D20",charges:"\u6B21\u6570",waitingInit:"\u7B49\u5F85\u521D\u59CB\u5316...",checkingColors:"\u{1F3A8} \u68C0\u67E5\u53EF\u7528\u989C\u8272...",noColorsFound:"\u274C \u672A\u627E\u5230\u989C\u8272\uFF0C\u8BF7\u5728\u7F51\u7AD9\u4E0A\u6253\u5F00\u8C03\u8272\u677F\u3002",colorsFound:"\u2705 \u627E\u5230 {count} \u79CD\u53EF\u7528\u989C\u8272",initSuccess:"\u2705 \u5B88\u62A4\u673A\u5668\u4EBA\u521D\u59CB\u5316\u6210\u529F",initError:"\u274C \u5B88\u62A4\u673A\u5668\u4EBA\u521D\u59CB\u5316\u5931\u8D25",invalidCoords:"\u274C \u5750\u6807\u65E0\u6548",invalidArea:"\u274C \u533A\u57DF\u65E0\u6548\uFF0C\u5DE6\u4E0A\u89D2\u5FC5\u987B\u5C0F\u4E8E\u53F3\u4E0B\u89D2",areaTooLarge:"\u274C \u533A\u57DF\u8FC7\u5927: {size} \u50CF\u7D20 (\u6700\u5927: {max})",capturingArea:"\u{1F4F8} \u6355\u83B7\u533A\u57DF\u4E2D...",areaCaptured:"\u2705 \u533A\u57DF\u6355\u83B7\u6210\u529F: {count} \u50CF\u7D20",captureError:"\u274C \u6355\u83B7\u533A\u57DF\u51FA\u9519: {error}",captureFirst:"\u274C \u8BF7\u5148\u6355\u83B7\u4E00\u4E2A\u533A\u57DF",noChanges:"\u2705 \u533A\u57DF - \u672A\u68C0\u6D4B\u5230\u53D8\u5316",changesDetected:"\u{1F6A8} \u68C0\u6D4B\u5230 {count} \u4E2A\u53D8\u5316",repairing:"\u{1F6E0}\uFE0F \u6B63\u5728\u4FEE\u590D {count} \u4E2A\u50CF\u7D20...",repairedSuccess:"\u2705 \u5DF2\u6210\u529F\u4FEE\u590D {count} \u4E2A\u50CF\u7D20",repairError:"\u274C \u4FEE\u590D\u51FA\u9519: {error}",noCharges:"\u26A0\uFE0F \u6B21\u6570\u4E0D\u8DB3\uFF0C\u65E0\u6CD5\u4FEE\u590D",checkingChanges:"\u{1F50D} \u6B63\u5728\u68C0\u67E5\u533A\u57DF\u53D8\u5316...",errorChecking:"\u274C \u68C0\u67E5\u51FA\u9519: {error}",guardActive:"\u{1F6E1}\uFE0F \u5B88\u62A4\u4E2D - \u533A\u57DF\u53D7\u4FDD\u62A4",lastCheck:"\u4E0A\u6B21\u68C0\u67E5: {time}",nextCheck:"\u4E0B\u6B21\u68C0\u67E5: {time} \u79D2\u540E",autoInitializing:"\u{1F916} \u6B63\u5728\u81EA\u52A8\u521D\u59CB\u5316...",autoInitSuccess:"\u2705 \u81EA\u52A8\u542F\u52A8\u6210\u529F",autoInitFailed:"\u26A0\uFE0F \u65E0\u6CD5\u81EA\u52A8\u542F\u52A8\uFF0C\u8BF7\u624B\u52A8\u64CD\u4F5C\u3002",manualInitRequired:"\u{1F527} \u9700\u8981\u624B\u52A8\u521D\u59CB\u5316",paletteDetected:"\u{1F3A8} \u5DF2\u68C0\u6D4B\u5230\u8C03\u8272\u677F",paletteNotFound:"\u{1F50D} \u6B63\u5728\u641C\u7D22\u8C03\u8272\u677F...",clickingPaintButton:"\u{1F446} \u6B63\u5728\u70B9\u51FB\u7ED8\u5236\u6309\u94AE...",paintButtonNotFound:"\u274C \u672A\u627E\u5230\u7ED8\u5236\u6309\u94AE",protectionStopped:"\u23F9\uFE0F \u4FDD\u62A4\u5DF2\u505C\u6B62",selectUpperLeft:"\u{1F3AF} \u5728\u9700\u8981\u4FDD\u62A4\u533A\u57DF\u7684\u5DE6\u4E0A\u89D2\u6D82\u4E00\u4E2A\u50CF\u7D20",selectLowerRight:"\u{1F3AF} \u73B0\u5728\u5728\u53F3\u4E0B\u89D2\u6D82\u4E00\u4E2A\u50CF\u7D20",waitingUpperLeft:"\u{1F446} \u7B49\u5F85\u9009\u62E9\u5DE6\u4E0A\u89D2...",waitingLowerRight:"\u{1F446} \u7B49\u5F85\u9009\u62E9\u53F3\u4E0B\u89D2...",upperLeftCaptured:"\u2705 \u5DF2\u6355\u83B7\u5DE6\u4E0A\u89D2: ({x}, {y})",lowerRightCaptured:"\u2705 \u5DF2\u6355\u83B7\u53F3\u4E0B\u89D2: ({x}, {y})",selectionTimeout:"\u274C \u9009\u62E9\u8D85\u65F6",selectionError:"\u274C \u9009\u62E9\u51FA\u9519\uFF0C\u8BF7\u91CD\u8BD5",logWindow:"Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED",analysisTitle:"\u5DEE\u5F02\u5206\u6790 - JSON vs \u5F53\u524D\u753B\u5E03",correctPixels:"\u6B63\u786E\u50CF\u7D20",incorrectPixels:"\u9519\u8BEF\u50CF\u7D20",missingPixels:"\u7F3A\u5931\u50CF\u7D20",showCorrect:"\u663E\u793A\u6B63\u786E",showIncorrect:"\u663E\u793A\u9519\u8BEF",showMissing:"\u663E\u793A\u7F3A\u5931",autoRefresh:"\u81EA\u52A8\u5237\u65B0",zoomAdjusted:"\u7F29\u653E\u81EA\u52A8\u8C03\u6574\u4E3A",autoRefreshEnabled:"\u81EA\u52A8\u5237\u65B0\u5DF2\u542F\u7528\uFF0C\u95F4\u9694",autoRefreshDisabled:"\u81EA\u52A8\u5237\u65B0\u5DF2\u7981\u7528",autoRefreshIntervalUpdated:"\u81EA\u52A8\u5237\u65B0\u95F4\u9694\u5DF2\u66F4\u65B0\u4E3A",visualizationUpdated:"\u53EF\u89C6\u5316\u5DF2\u66F4\u65B0",noAreaOrPixels:"\u6CA1\u6709\u53D7\u4FDD\u62A4\u533A\u57DF\u6216\u50CF\u7D20\u8FDB\u884C\u5206\u6790",noColorsDetected:"\u65E0\u6CD5\u68C0\u6D4B\u989C\u8272\u3002\u786E\u4FDD\u8C03\u8272\u677F\u5DF2\u6253\u5F00\u3002",sessionRecordingStarted:"\u4F1A\u8BDD\u5F55\u5236\u5DF2\u5F00\u59CB\uFF0C\u81EA\u52A8\u5237\u65B0\u5DF2\u542F\u7528",sessionRecordingStopped:"\u4F1A\u8BDD\u5F55\u5236\u5DF2\u505C\u6B62",noSessionData:"\u6CA1\u6709\u4F1A\u8BDD\u6570\u636E\u53EF\u4E0B\u8F7D",sessionDataDownloaded:"\u4F1A\u8BDD\u6570\u636E\u5DF2\u4E0B\u8F7D",snapshotCaptureError:"\u6355\u83B7\u56FE\u50CF\u65F6\u51FA\u9519",recordSession:"\u5F55\u5236\u4F1A\u8BDD",snapshot:"\u5FEB\u7167",downloadData:"\u4E0B\u8F7D\u6570\u636E",zoom:"\u7F29\u653E",interval:"\u95F4\u9694",seconds:"\u79D2",updateAnalysis:"\u66F4\u65B0\u5206\u6790",adjustZoom:"\u8C03\u6574\u7F29\u653E",precision:"\u7CBE\u5EA6",statistics:"\u7EDF\u8BA1",visualization:"\u53EF\u89C6\u5316",recording:"\u5F55\u5236",configTitle:"Guard\u914D\u7F6E",protectionPatterns:"\u4FDD\u62A4\u6A21\u5F0F",preferSpecificColor:"\u4F18\u5148\u7279\u5B9A\u989C\u8272",excludeSpecificColors:"\u4E0D\u4FEE\u590D\u7279\u5B9A\u989C\u8272",loadManagement:"\u8D1F\u8F7D\u7BA1\u7406",minLoadsToWait:"\u7B49\u5F85\u7684\u6700\u5C0F\u8D1F\u8F7D\u6570",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6570",spendAllPixelsOnStart:"\u542F\u52A8\u65F6\u6D88\u8017\u6240\u6709\u50CF\u7D20",waitTimes:"\u7B49\u5F85\u65F6\u95F4",useRandomTimes:"\u6279\u6B21\u95F4\u4F7F\u7528\u968F\u673A\u65F6\u95F4",minTime:"\u6700\u5C0F\u65F6\u95F4 (\u79D2)",maxTime:"\u6700\u5927\u65F6\u95F4 (\u79D2)"},slave:{title:"WPlace Slave",initBot:"\u521D\u59CB\u5316Slave-BOT",startPainting:"\u5F00\u59CB",stopPainting:"\u505C\u6B62",logs:"\u65E5\u5FD7",configuration:"\u914D\u7F6E",minimize:"\u6700\u5C0F\u5316",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6570",nextBatchIn:"\u4E0B\u4E00\u6279: ",waitingInit:"\u7B49\u5F85\u521D\u59CB\u5316...",checkingColors:"\u{1F3A8} \u68C0\u67E5\u53EF\u7528\u989C\u8272...",noColorsFound:"\u274C \u672A\u627E\u5230\u989C\u8272\uFF0C\u8BF7\u5728\u7F51\u7AD9\u4E0A\u6253\u5F00\u8C03\u8272\u677F\u3002",colorsFound:"\u2705 \u627E\u5230 {count} \u79CD\u53EF\u7528\u989C\u8272",initSuccess:"\u2705 Slave-BOT\u521D\u59CB\u5316\u6210\u529F",initError:"\u274C Slave-BOT\u521D\u59CB\u5316\u5931\u8D25",noCoordsSet:"\u274C \u672A\u8BBE\u7F6E\u5750\u6807\u3002\u8BF7\u5148\u4F7F\u7528WPlace AutoBOT Image\u3002",noCoordsData:"\u274C \u5750\u6807\u6570\u636E\u4E0D\u53EF\u7528\u3002\u8BF7\u5148\u5728WPlace AutoBOT Image\u4E2D\u8BBE\u7F6E\u5750\u6807\u3002",coordsLoaded:"\u2705 \u4ECEWPlace AutoBOT Image\u52A0\u8F7D\u4E86 {count} \u4E2A\u5750\u6807",coordsError:"\u274C \u52A0\u8F7D\u5750\u6807\u9519\u8BEF: {error}",paintingStarted:"\u{1F3A8} \u7ED8\u5236\u5DF2\u5F00\u59CB",paintingStopped:"\u23F9\uFE0F \u7ED8\u5236\u5DF2\u505C\u6B62",paintingPixel:"\u{1F58C}\uFE0F \u7ED8\u5236\u50CF\u7D20 ({x}, {y}) \u989C\u8272 {color}",pixelPainted:"\u2705 \u50CF\u7D20\u7ED8\u5236\u6210\u529F",pixelError:"\u274C \u7ED8\u5236\u50CF\u7D20\u9519\u8BEF: {error}",batchComplete:"\u2705 \u6279\u6B21\u5B8C\u6210: {painted} / {total} \u50CF\u7D20\u5DF2\u7ED8\u5236",batchError:"\u274C \u6279\u6B21\u6267\u884C\u9519\u8BEF: {error}",allPixelsComplete:"\u{1F389} \u6240\u6709\u50CF\u7D20\u5B8C\u6210\uFF01",noCharges:"\u26A0\uFE0F \u6B21\u6570\u4E0D\u8DB3\uFF0C\u65E0\u6CD5\u7ED8\u5236",waitingForCharges:"\u23F3 \u7B49\u5F85\u6B21\u6570...",charges:"\u6B21\u6570",totalPixels:"\u603B\u50CF\u7D20\u6570",paintedPixels:"\u5DF2\u7ED8\u5236\u50CF\u7D20",remainingPixels:"\u5269\u4F59\u50CF\u7D20",currentBatch:"\u5F53\u524D\u6279\u6B21",progress:"\u8FDB\u5EA6",estimatedTime:"\u9884\u8BA1\u5B8C\u6210\u65F6\u95F4",autoInitializing:"\u{1F916} \u6B63\u5728\u81EA\u52A8\u521D\u59CB\u5316...",autoInitSuccess:"\u2705 Slave-BOT\u81EA\u52A8\u542F\u52A8\u6210\u529F",autoInitFailed:"\u26A0\uFE0F \u65E0\u6CD5\u81EA\u52A8\u542F\u52A8\u3002\u8BF7\u4F7F\u7528\u624B\u52A8\u542F\u52A8\u6309\u94AE\u3002",manualInitRequired:"\u{1F527} \u9700\u8981\u624B\u52A8\u521D\u59CB\u5316",paletteDetected:"\u{1F3A8} \u5DF2\u68C0\u6D4B\u5230\u8C03\u8272\u677F",paletteNotFound:"\u{1F50D} \u6B63\u5728\u641C\u7D22\u8C03\u8272\u677F...",clickingPaintButton:"\u{1F446} \u6B63\u5728\u70B9\u51FB\u7ED8\u5236\u6309\u94AE...",paintButtonNotFound:"\u274C \u672A\u627E\u5230\u7ED8\u5236\u6309\u94AE",logWindow:"\u65E5\u5FD7",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED",configTitle:"Slave\u914D\u7F6E",loadManagement:"\u8D1F\u8F7D\u7BA1\u7406",minLoadsToWait:"\u7B49\u5F85\u7684\u6700\u5C0F\u8D1F\u8F7D\u6570",pixelsPerBatchConfig:"\u6BCF\u6279\u50CF\u7D20\u6570",spendAllPixelsOnStart:"\u542F\u52A8\u65F6\u6D88\u8017\u6240\u6709\u50CF\u7D20",waitTimes:"\u7B49\u5F85\u65F6\u95F4",useRandomTimes:"\u6279\u6B21\u95F4\u4F7F\u7528\u968F\u673A\u65F6\u95F4",minTime:"\u6700\u5C0F\u65F6\u95F4 (\u79D2)",maxTime:"\u6700\u5927\u65F6\u95F4 (\u79D2)"}}});var No,Wo=R(()=>{No={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"\u9078\u64C7",user:"\u7528\u6237",charges:"\u6B21\u6578",backend:"\u5F8C\u7AEF",database:"\u6578\u64DA\u5EAB",uptime:"\u904B\u884C\u6642\u9593",close:"\u95DC\u9589",launch:"\u5553\u52D5",loading:"\u52A0\u8F09\u4E2D\u2026",executing:"\u57F7\u884C\u4E2D\u2026",downloading:"\u6B63\u5728\u4E0B\u8F09\u8173\u672C\u2026",chooseBot:"\u9078\u64C7\u4E00\u500B\u6A5F\u5668\u4EBA\u4E26\u9EDE\u64CA\u5553\u52D5",readyToLaunch:"\u6E96\u5099\u5553\u52D5",loadError:"\u52A0\u8F09\u932F\u8AA4",loadErrorMsg:"\u7121\u6CD5\u52A0\u8F09\u6240\u9078\u6A5F\u5668\u4EBA\u3002\u8ACB\u6AA2\u67E5\u7DB2\u7D61\u9023\u63A5\u6216\u91CD\u8A66\u3002",checking:"\u{1F504} \u6AA2\u67E5\u4E2D...",online:"\u{1F7E2} \u5728\u7DDA",offline:"\u{1F534} \u96E2\u7DDA",ok:"\u{1F7E2} \u6B63\u5E38",error:"\u{1F534} \u932F\u8AA4",unknown:"-",logWindow:"Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589",localExecution:"\u672C\u5730\u57F7\u884C\uFF0C\u5B8C\u5168\u8A2A\u554F\u4EE4\u724C\u7CFB\u7D71",botStarting:"\u6A5F\u5668\u4EBA\u5553\u52D5\u4E2D..."},image:{title:"WPlace Auto-Image",initBot:"\u521D\u59CB\u5316\u81EA\u52D5\u6A5F\u5668\u4EBA",uploadImage:"\u4E0A\u50B3\u5716\u7247",resizeImage:"\u8ABF\u6574\u5716\u7247\u5927\u5C0F",selectPosition:"\u9078\u64C7\u4F4D\u7F6E",startPainting:"\u958B\u59CB\u7E6A\u88FD",stopPainting:"\u505C\u6B62\u7E6A\u88FD",saveProgress:"\u4FDD\u5B58\u9032\u5EA6",loadProgress:"\u52A0\u8F09\u9032\u5EA6",checkingColors:"\u{1F50D} \u6AA2\u67E5\u53EF\u7528\u984F\u8272...",noColorsFound:"\u274C \u8ACB\u5728\u7DB2\u7AD9\u4E0A\u6253\u958B\u8ABF\u8272\u677F\u5F8C\u91CD\u8A66\uFF01",colorsFound:"\u2705 \u627E\u5230 {count} \u7A2E\u53EF\u7528\u984F\u8272",loadingImage:"\u{1F5BC}\uFE0F \u6B63\u5728\u52A0\u8F09\u5716\u7247...",imageLoaded:"\u2705 \u5716\u7247\u5DF2\u52A0\u8F09\uFF0C\u6709\u6548\u50CF\u7D20 {count} \u500B",imageError:"\u274C \u5716\u7247\u52A0\u8F09\u5931\u6557",selectPositionAlert:"\u8ACB\u5728\u4F60\u60F3\u958B\u59CB\u7E6A\u88FD\u7684\u5730\u65B9\u5857\u7B2C\u4E00\u500B\u50CF\u7D20\uFF01",waitingPosition:"\u{1F446} \u7B49\u5F85\u4F60\u5857\u53C3\u8003\u50CF\u7D20...",positionSet:"\u2705 \u4F4D\u7F6E\u8A2D\u7F6E\u6210\u529F\uFF01",positionTimeout:"\u274C \u4F4D\u7F6E\u9078\u64C7\u8D85\u6642",positionDetected:"\u{1F3AF} \u5DF2\u6AA2\u6E2C\u5230\u4F4D\u7F6E\uFF0C\u8655\u7406\u4E2D...",positionError:"\u274C \u4F4D\u7F6E\u6AA2\u6E2C\u5931\u6557\uFF0C\u8ACB\u91CD\u8A66",startPaintingMsg:"\u{1F3A8} \u958B\u59CB\u7E6A\u88FD...",paintingProgress:"\u{1F9F1} \u9032\u5EA6: {painted}/{total} \u50CF\u7D20...",noCharges:"\u231B \u6C92\u6709\u6B21\u6578\u3002\u7B49\u5F85 {time}...",paintingStopped:"\u23F9\uFE0F \u7528\u6237\u5DF2\u505C\u6B62\u7E6A\u88FD",paintingComplete:"\u2705 \u7E6A\u88FD\u5B8C\u6210\uFF01\u5171\u7E6A\u88FD {count} \u500B\u50CF\u7D20\u3002",paintingError:"\u274C \u7E6A\u88FD\u904E\u7A0B\u4E2D\u51FA\u932F",missingRequirements:"\u274C \u8ACB\u5148\u52A0\u8F09\u5716\u7247\u4E26\u9078\u64C7\u4F4D\u7F6E",progress:"\u9032\u5EA6",userName:"\u7528\u6237",pixels:"\u50CF\u7D20",charges:"\u6B21\u6578",estimatedTime:"\u9810\u8A08\u6642\u9593",initMessage:"\u9EDE\u64CA\u201C\u521D\u59CB\u5316\u81EA\u52D5\u6A5F\u5668\u4EBA\u201D\u958B\u59CB",waitingInit:"\u7B49\u5F85\u521D\u59CB\u5316...",resizeSuccess:"\u2705 \u5716\u7247\u5DF2\u8ABF\u6574\u70BA {width}x{height}",paintingPaused:"\u23F8\uFE0F \u7E6A\u88FD\u66AB\u505C\u65BC\u4F4D\u7F6E X: {x}, Y: {y}",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6578",batchSize:"\u6279\u6B21\u5927\u5C0F",nextBatchTime:"\u4E0B\u6B21\u6279\u6B21\u6642\u9593",useAllCharges:"\u4F7F\u7528\u6240\u6709\u53EF\u7528\u6B21\u6578",showOverlay:"\u986F\u793A\u8986\u84CB\u5C64",maxCharges:"\u6BCF\u6279\u6700\u5927\u6B21\u6578",waitingForCharges:"\u23F3 \u7B49\u5F85\u6B21\u6578: {current}/{needed}",timeRemaining:"\u5269\u9918\u6642\u9593",cooldownWaiting:"\u23F3 \u7B49\u5F85 {time} \u5F8C\u7E7C\u7E8C...",progressSaved:"\u2705 \u9032\u5EA6\u5DF2\u4FDD\u5B58\u70BA {filename}",progressLoaded:"\u2705 \u5DF2\u52A0\u8F09\u9032\u5EA6: {painted}/{total} \u50CF\u7D20\u5DF2\u7E6A\u88FD",progressLoadError:"\u274C \u52A0\u8F09\u9032\u5EA6\u5931\u6557: {error}",progressSaveError:"\u274C \u4FDD\u5B58\u9032\u5EA6\u5931\u6557: {error}",confirmSaveProgress:"\u5728\u505C\u6B62\u4E4B\u524D\u8981\u4FDD\u5B58\u7576\u524D\u9032\u5EA6\u55CE\uFF1F",saveProgressTitle:"\u4FDD\u5B58\u9032\u5EA6",discardProgress:"\u653E\u68C4",cancel:"\u53D6\u6D88",minimize:"\u6700\u5C0F\u5316",width:"\u5BEC\u5EA6",height:"\u9AD8\u5EA6",keepAspect:"\u4FDD\u6301\u7E31\u6A6B\u6BD4",apply:"\u61C9\u7528",overlayOn:"\u8986\u84CB\u5C64: \u958B\u5553",overlayOff:"\u8986\u84CB\u5C64: \u95DC\u9589",passCompleted:"\u2705 \u6279\u6B21\u5B8C\u6210: \u5DF2\u7E6A\u88FD {painted} \u50CF\u7D20 | \u9032\u5EA6: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 \u7B49\u5F85\u6B21\u6578\u6062\u5FA9: {current}/{needed} - \u6642\u9593: {time}",waitingChargesCountdown:"\u23F3 \u7B49\u5F85\u6B21\u6578: {current}/{needed} - \u5269\u9918: {time}",autoInitializing:"\u{1F916} \u6B63\u5728\u81EA\u52D5\u521D\u59CB\u5316...",autoInitSuccess:"\u2705 \u81EA\u52D5\u5553\u52D5\u6210\u529F",autoInitFailed:"\u26A0\uFE0F \u7121\u6CD5\u81EA\u52D5\u5553\u52D5\uFF0C\u8ACB\u624B\u52D5\u64CD\u4F5C\u3002",paletteDetected:"\u{1F3A8} \u5DF2\u6AA2\u6E2C\u5230\u8ABF\u8272\u677F",paletteNotFound:"\u{1F50D} \u6B63\u5728\u641C\u7D22\u8ABF\u8272\u677F...",clickingPaintButton:"\u{1F446} \u6B63\u5728\u9EDE\u64CA\u7E6A\u88FD\u6309\u9215...",paintButtonNotFound:"\u274C \u672A\u627E\u5230\u7E6A\u88FD\u6309\u9215",manualInitRequired:"\u{1F527} \u9700\u8981\u624B\u52D5\u521D\u59CB\u5316",retryAttempt:"\u{1F504} \u91CD\u8A66 {attempt}/{maxAttempts}\uFF0C\u7B49\u5F85 {delay} \u79D2...",retryError:"\u{1F4A5} \u7B2C {attempt}/{maxAttempts} \u6B21\u5617\u8A66\u51FA\u932F\uFF0C\u5C07\u5728 {delay} \u79D2\u5F8C\u91CD\u8A66...",retryFailed:"\u274C \u8D85\u904E {maxAttempts} \u6B21\u5617\u8A66\u5931\u6557\u3002\u7E7C\u7E8C\u4E0B\u4E00\u6279...",networkError:"\u{1F310} \u7DB2\u7D61\u932F\u8AA4\uFF0C\u6B63\u5728\u91CD\u8A66...",serverError:"\u{1F525} \u670D\u52D9\u5668\u932F\u8AA4\uFF0C\u6B63\u5728\u91CD\u8A66...",timeoutError:"\u23F0 \u4F3A\u670D\u5668\u903E\u6642\uFF0C\u6B63\u5728\u91CD\u8A66...",saveProgressBtn:"\u4FDD\u5B58\u9032\u5EA6",guardJsonBtn:"Guard JSON",resizeWindowTitle:"\u8ABF\u6574\u5716\u7247\u5927\u5C0F",original:"\u539F\u59CB",labTolerance:"LAB\u5BB9\u932F",maintainProportion:"\u4FDD\u6301\u6BD4\u4F8B",skipColor:"\u8DF3\u904E\u984F\u8272",skipColorEnabled:"\u53EA\u7E6A\u88FD\u5B8C\u5168\u5339\u914D\u7684\u984F\u8272",similarityThreshold:"\u76F8\u4F3C\u5EA6\u95BE\u503C",skipColorDescription:"\u53EA\u6703\u7E6A\u88FD\u5B8C\u5168\u5339\u914D\u7684\u984F\u8272\uFF08100%\u76F8\u4F3C\u5EA6\uFF09\u3002",applyResize:"\u61C9\u7528",cancelResize:"\u53D6\u6D88",patternSnake:"\u86C7\u5F62\uFF08\u4E4B\u5B57\u5F62\uFF09",patternDiagonalSweep:"\u5C0D\u89D2\u6383\u63CF",patternBorders:"\u908A\u6846\u512A\u5148",patternCenter:"\u4E2D\u5FC3\u512A\u5148",patternQuadrants:"\u8C61\u9650",patternBiasedRandom:"\u504F\u5411\u96A8\u6A5F\uFF08\u908A\u6846\uFF09",patternClusters:"\u96C6\u7FA4",patternProximity:"\u9130\u8FD1\u6027",patternSweep:"\u5206\u5340\u6383\u63CF",patternPriority:"\u512A\u5148\u7D1A\uFF08\u6DF7\u5408\uFF09",patternAnchorPoints:"\u9328\u9EDE",patternSpiralCw:"\u87BA\u65CB\uFF08\u9806\u6642\u91DD\uFF09",patternSpiralCcw:"\u87BA\u65CB\uFF08\u9006\u6642\u91DD\uFF09",noProgressToSave:"\u6C92\u6709\u8981\u4FDD\u5B58\u7684\u9032\u5EA6",progressSaveSuccess:"\u9032\u5EA6\u5DF2\u4FDD\u5B58\u70BA {filename}",progressLoadSuccess:"\u9032\u5EA6\u5DF2\u52A0\u8F09\uFF1A{painted}/{total} \u50CF\u7D20\u5DF2\u7E6A\u88FD",invalidProgressFile:"\u9032\u5EA6\u6587\u4EF6\u7121\u6548",missingFields:"\u7F3A\u5C11\u5FC5\u9700\u5B57\u6BB5\uFF1A{fields}",guardDialogTitle:"\u751F\u6210 Guard JSON",guardDialogMessage:"\u662F\u5426\u8981\u4F7F\u7528\u7576\u524D\u6578\u64DA\u751F\u6210 Guard JSON \u6587\u4EF6\uFF1F",guardDialogInfo:`\u5716\u7247\uFF1A{name}
\u5C3A\u5BF8\uFF1A{width}x{height}
\u50CF\u7D20\uFF1A{pixels}`,generateGuard:"\u751F\u6210 Guard",guardJsonInvalidStructure:"\u274C Guard JSON \u7D50\u69CB\u7121\u6548\u3002\u4E2D\u6B62\u4FDD\u5B58\u3002",guardJsonInvalidMessage:"Guard JSON \u7D50\u69CB\u7121\u6548\u3002\u9078\u64C7\u4F4D\u7F6E\u5F8C\u91CD\u8A66\u3002",guardJsonSaveSuccess:"\u2705 Guard JSON \u5DF2\u4FDD\u5B58\uFF1A{filename}",guardJsonSaveError:"\u274C \u4FDD\u5B58 Guard JSON \u932F\u8AA4\uFF1A{error}",notificationInfo:"\u4FE1\u606F",notificationSuccess:"\u6210\u529F",notificationWarning:"\u8B66\u544A",notificationError:"\u932F\u8AA4",paintPattern:"\u{1F4D0} \u7E6A\u88FD\u6A21\u5F0F",patternLinearStart:"\u7DDA\u6027\uFF08\u8D77\u9EDE\uFF09",patternLinearEnd:"\u7DDA\u6027\uFF08\u7D42\u9EDE\uFF09",patternRandom:"\u96A8\u6A5F",patternCenterOut:"\u7531\u4E2D\u5FC3\u5411\u5916",patternCornersFirst:"\u5148\u89D2\u843D",patternSpiral:"\u87BA\u65CB",logWindow:"Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589",userInfo:"\u7528\u6236\u4FE1\u606F",imageProgress:"\u5716\u7247\u9032\u5EA6",availableColors:"\u53EF\u7528\u984F\u8272",noImageLoaded:"\u6C92\u6709\u52A0\u8F09\u5716\u7247",cooldown:"\u51B7\u537B\u6642\u9593",totalColors:"\u7E3D\u984F\u8272\u6578",colorPalette:"\u984F\u8272\u8ABF\u8272\u677F",showAllColors:"\u986F\u793A\u6240\u6709\u984F\u8272\uFF08\u5305\u62EC\u4E0D\u53EF\u7528\u7684\uFF09",selectAllColors:"\u9078\u64C7\u5168\u90E8",unselectAllColors:"\u53D6\u6D88\u5168\u9078",noAvailable:"\u4E0D\u53EF\u7528",colorSelected:"\u5DF2\u9078\u64C7\u984F\u8272",statsUpdated:"\u2705 \u7D71\u8A08\u5DF2\u66F4\u65B0\uFF1A{count} \u7A2E\u53EF\u7528\u984F\u8272"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"\u958B\u59CB",stop:"\u505C\u6B62",stopped:"\u6A5F\u5668\u4EBA\u5DF2\u505C\u6B62",calibrate:"\u6821\u6E96",paintOnce:"\u4E00\u6B21",checkingStatus:"\u6AA2\u67E5\u72C0\u614B\u4E2D...",configuration:"\u914D\u7F6E",delay:"\u5EF6\u9072 (\u6BEB\u79D2)",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20",minCharges:"\u6700\u5C11\u6B21\u6578",colorMode:"\u984F\u8272\u6A21\u5F0F",random:"\u96A8\u6A5F",fixed:"\u56FA\u5B9A",range:"\u7BC4\u570D",fixedColor:"\u56FA\u5B9A\u984F\u8272",advanced:"\u9AD8\u7D1A",tileX:"\u74E6\u7247 X",tileY:"\u74E6\u7247 Y",customPalette:"\u81EA\u5B9A\u7FA9\u8ABF\u8272\u677F",paletteExample:"\u4F8B\u5982: #FF0000,#00FF00,#0000FF",capture:"\u6355\u7372",painted:"\u5DF2\u7E6A\u88FD",charges:"\u6B21\u6578",retries:"\u91CD\u8A66",tile:"\u74E6\u7247",configSaved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",configLoaded:"\u914D\u7F6E\u5DF2\u52A0\u8F09",configReset:"\u914D\u7F6E\u5DF2\u91CD\u7F6E",captureInstructions:"\u8ACB\u624B\u52D5\u7E6A\u88FD\u4E00\u500B\u50CF\u7D20\u4EE5\u6355\u7372\u5EA7\u6A19...",backendOnline:"\u5F8C\u7AEF\u5728\u7DDA",backendOffline:"\u5F8C\u7AEF\u96E2\u7DDA",startingBot:"\u6B63\u5728\u5553\u52D5\u6A5F\u5668\u4EBA...",stoppingBot:"\u6B63\u5728\u505C\u6B62\u6A5F\u5668\u4EBA...",calibrating:"\u6821\u6E96\u4E2D...",alreadyRunning:"\u81EA\u52D5\u8FB2\u5834\u5DF2\u5728\u904B\u884C\u3002",imageRunningWarning:"\u81EA\u52D5\u7E6A\u5716\u6B63\u5728\u904B\u884C\uFF0C\u8ACB\u5148\u95DC\u9589\u518D\u5553\u52D5\u81EA\u52D5\u8FB2\u5834\u3002",selectPosition:"\u9078\u64C7\u5340\u57DF",selectPositionAlert:"\u{1F3AF} \u5728\u5730\u5716\u7684\u7A7A\u767D\u5340\u57DF\u5857\u4E00\u500B\u50CF\u7D20\u4EE5\u8A2D\u7F6E\u8FB2\u5834\u5340\u57DF",waitingPosition:"\u{1F446} \u7B49\u5F85\u4F60\u5857\u53C3\u8003\u50CF\u7D20...",positionSet:"\u2705 \u5340\u57DF\u8A2D\u7F6E\u6210\u529F\uFF01\u534A\u5F91: 500px",positionTimeout:"\u274C \u5340\u57DF\u9078\u64C7\u8D85\u6642",missingPosition:"\u274C \u8ACB\u5148\u9078\u64C7\u5340\u57DF\uFF08\u4F7F\u7528\u201C\u9078\u64C7\u5340\u57DF\u201D\u6309\u9215\uFF09",farmRadius:"\u8FB2\u5834\u534A\u5F91",positionInfo:"\u7576\u524D\u5340\u57DF",farmingInRadius:"\u{1F33E} \u6B63\u5728\u4EE5\u534A\u5F91 {radius}px \u5728 ({x},{y}) \u8FB2\u5834",selectEmptyArea:"\u26A0\uFE0F \u91CD\u8981: \u8ACB\u9078\u64C7\u7A7A\u767D\u5340\u57DF\u4EE5\u907F\u514D\u885D\u7A81",noPosition:"\u672A\u9078\u64C7\u5340\u57DF",currentZone:"\u5340\u57DF: ({x},{y})",autoSelectPosition:"\u{1F3AF} \u8ACB\u5148\u9078\u64C7\u5340\u57DF\uFF0C\u5728\u5730\u5716\u4E0A\u5857\u4E00\u500B\u50CF\u7D20\u4EE5\u8A2D\u7F6E\u8FB2\u5834\u5340\u57DF",logWindow:"Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589",ready:"\u5C31\u7DD2",once:"\u4E00\u6B21",recapture:"\u91CD\u65B0\u6355\u7372",position:"\u4F4D\u7F6E",stats:{painted:"\u5DF2\u7E6A\u88FD",charges:"\u6B21\u6578",droplets:"\u6C34\u6EF4",user:"\u7528\u6236",retries:"\u91CD\u8A66"},config:{minCharges:"\u6700\u5C11\u6B21\u6578",delay:"\u7B49\u5F85\u6642\u9593\uFF08\u79D2\uFF09",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6578"},color:{fixed:"\u56FA\u5B9A",range:"\u7BC4\u570D",random:"\u96A8\u6A5F",selected:"\u5DF2\u9078\u64C7\u984F\u8272",min:"\u6700\u5C0F",max:"\u6700\u5927"},autobuy:{title:"\u81EA\u52D5\u8CFC\u8CB7\uFF08+5\u6B21\u6578\uFF09",hint:"\u7576\u4F60\u6709\u2265500\u6C34\u6EF4\u6642\u5C07\u81EA\u52D5\u6FC0\u6D3B"},buyCharges:"\u8CFC\u8CB7+5\u6B21\u6578",buying:"\u8CFC\u8CB7\u4E2D...",buyOk:"\u8CFC\u8CB7\u6210\u529F\u3002\u5237\u65B0\u6703\u8A71\u3002",buyFail:"\u7121\u6CD5\u8CFC\u8CB7"},common:{yes:"\u662F",no:"\u5426",ok:"\u78BA\u8A8D",cancel:"\u53D6\u6D88",close:"\u95DC\u9589",save:"\u4FDD\u5B58",load:"\u52A0\u8F09",delete:"\u522A\u9664",edit:"\u7DE8\u8F2F",start:"\u958B\u59CB",stop:"\u505C\u6B62",pause:"\u66AB\u505C",resume:"\u7E7C\u7E8C",reset:"\u91CD\u7F6E",settings:"\u8A2D\u7F6E",help:"\u5E6B\u52A9",about:"\u95DC\u65BC",language:"\u8A9E\u8A00",loading:"\u52A0\u8F09\u4E2D...",error:"\u932F\u8AA4",success:"\u6210\u529F",warning:"\u8B66\u544A",info:"\u4FE1\u606F",languageChanged:"\u8A9E\u8A00\u5DF2\u5207\u63DB\u70BA {language}"},guard:{title:"WPlace Auto-Guard",initBot:"\u521D\u59CB\u5316\u5B88\u8B77\u6A5F\u5668\u4EBA",selectArea:"\u9078\u64C7\u5340\u57DF",save:"\u4FDD\u5B58",loadFile:"\u52A0\u8F09\u6587\u4EF6",reposition:"\u91CD\u65B0\u5B9A\u4F4D",analyzeArea:"\u5206\u6790\u5340\u57DF",logs:"\u65E5\u8A8C",watcher:"\u76E3\u8996\u5668",configuration:"\u914D\u7F6E",startErase:"\u958B\u59CB\u64E6\u9664",stopWatcher:"\u505C\u6B62\u76E3\u8996\u5668",minimize:"\u6700\u5C0F\u5316",expand:"\u5C55\u958B",nextBatchIn:"\u4E0B\u4E00\u6279: ",captureArea:"\u6355\u7372\u5340\u57DF",startProtection:"\u958B\u59CB",stopProtection:"\u505C\u6B62",upperLeft:"\u5DE6\u4E0A\u89D2",lowerRight:"\u53F3\u4E0B\u89D2",protectedPixels:"\u53D7\u4FDD\u8B77\u50CF\u7D20",detectedChanges:"\u6AA2\u6E2C\u5230\u7684\u8B8A\u5316",repairedPixels:"\u4FEE\u5FA9\u7684\u50CF\u7D20",charges:"\u6B21\u6578",waitingInit:"\u7B49\u5F85\u521D\u59CB\u5316...",checkingColors:"\u{1F3A8} \u6AA2\u67E5\u53EF\u7528\u984F\u8272...",noColorsFound:"\u274C \u672A\u627E\u5230\u984F\u8272\uFF0C\u8ACB\u5728\u7DB2\u7AD9\u4E0A\u6253\u958B\u8ABF\u8272\u677F\u3002",colorsFound:"\u2705 \u627E\u5230 {count} \u7A2E\u53EF\u7528\u984F\u8272",initSuccess:"\u2705 \u5B88\u8B77\u6A5F\u5668\u4EBA\u521D\u59CB\u5316\u6210\u529F",initError:"\u274C \u5B88\u8B77\u6A5F\u5668\u4EBA\u521D\u59CB\u5316\u5931\u6557",invalidCoords:"\u274C \u5EA7\u6A19\u7121\u6548",invalidArea:"\u274C \u5340\u57DF\u7121\u6548\uFF0C\u5DE6\u4E0A\u89D2\u5FC5\u9808\u5C0F\u65BC\u53F3\u4E0B\u89D2",areaTooLarge:"\u274C \u5340\u57DF\u904E\u5927: {size} \u50CF\u7D20 (\u6700\u5927: {max})",capturingArea:"\u{1F4F8} \u6355\u7372\u5340\u57DF\u4E2D...",areaCaptured:"\u2705 \u5340\u57DF\u6355\u7372\u6210\u529F: {count} \u50CF\u7D20",captureError:"\u274C \u6355\u7372\u5340\u57DF\u51FA\u932F: {error}",captureFirst:"\u274C \u8ACB\u5148\u6355\u7372\u4E00\u500B\u5340\u57DF",noChanges:"\u2705 \u5340\u57DF - \u672A\u6AA2\u6E2C\u5230\u8B8A\u5316",changesDetected:"\u{1F6A8} \u6AA2\u6E2C\u5230 {count} \u500B\u8B8A\u5316",repairing:"\u{1F6E0}\uFE0F \u6B63\u5728\u4FEE\u5FA9 {count} \u500B\u50CF\u7D20...",repairedSuccess:"\u2705 \u5DF2\u6210\u529F\u4FEE\u5FA9 {count} \u500B\u50CF\u7D20",repairError:"\u274C \u4FEE\u5FA9\u51FA\u932F: {error}",noCharges:"\u26A0\uFE0F \u6B21\u6578\u4E0D\u8DB3\uFF0C\u7121\u6CD5\u4FEE\u5FA9",checkingChanges:"\u{1F50D} \u6B63\u5728\u6AA2\u67E5\u5340\u57DF\u8B8A\u5316...",errorChecking:"\u274C \u6AA2\u67E5\u51FA\u932F: {error}",guardActive:"\u{1F6E1}\uFE0F \u5B88\u8B77\u4E2D - \u5340\u57DF\u53D7\u4FDD\u8B77",lastCheck:"\u4E0A\u6B21\u6AA2\u67E5: {time}",nextCheck:"\u4E0B\u6B21\u6AA2\u67E5: {time} \u79D2\u5F8C",autoInitializing:"\u{1F916} \u6B63\u5728\u81EA\u52D5\u521D\u59CB\u5316...",autoInitSuccess:"\u2705 \u81EA\u52D5\u5553\u52D5\u6210\u529F",autoInitFailed:"\u26A0\uFE0F \u7121\u6CD5\u81EA\u52D5\u5553\u52D5\uFF0C\u8ACB\u624B\u52D5\u64CD\u4F5C\u3002",manualInitRequired:"\u{1F527} \u9700\u8981\u624B\u52D5\u521D\u59CB\u5316",paletteDetected:"\u{1F3A8} \u5DF2\u6AA2\u6E2C\u5230\u8ABF\u8272\u677F",paletteNotFound:"\u{1F50D} \u6B63\u5728\u641C\u7D22\u8ABF\u8272\u677F...",clickingPaintButton:"\u{1F446} \u6B63\u5728\u9EDE\u64CA\u7E6A\u88FD\u6309\u9215...",paintButtonNotFound:"\u274C \u672A\u627E\u5230\u7E6A\u88FD\u6309\u9215",protectionStopped:"\u23F9\uFE0F \u4FDD\u8B77\u5DF2\u505C\u6B62",selectUpperLeft:"\u{1F3AF} \u5728\u9700\u8981\u4FDD\u8B77\u5340\u57DF\u7684\u5DE6\u4E0A\u89D2\u5857\u4E00\u500B\u50CF\u7D20",selectLowerRight:"\u{1F3AF} \u73FE\u5728\u5728\u53F3\u4E0B\u89D2\u5857\u4E00\u500B\u50CF\u7D20",waitingUpperLeft:"\u{1F446} \u7B49\u5F85\u9078\u64C7\u5DE6\u4E0A\u89D2...",waitingLowerRight:"\u{1F446} \u7B49\u5F85\u9078\u64C7\u53F3\u4E0B\u89D2...",upperLeftCaptured:"\u2705 \u5DF2\u6355\u7372\u5DE6\u4E0A\u89D2: ({x}, {y})",lowerRightCaptured:"\u2705 \u5DF2\u6355\u7372\u53F3\u4E0B\u89D2: ({x}, {y})",selectionTimeout:"\u274C \u9078\u64C7\u8D85\u6642",selectionError:"\u274C \u9078\u64C7\u51FA\u932F\uFF0C\u8ACB\u91CD\u8A66",logWindow:"Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589",analysisTitle:"\u5DEE\u7570\u5206\u6790 - JSON vs \u7576\u524D\u756B\u5E03",correctPixels:"\u6B63\u78BA\u50CF\u7D20",incorrectPixels:"\u932F\u8AA4\u50CF\u7D20",missingPixels:"\u7F3A\u5931\u50CF\u7D20",showCorrect:"\u986F\u793A\u6B63\u78BA",showIncorrect:"\u986F\u793A\u932F\u8AA4",showMissing:"\u986F\u793A\u7F3A\u5931",autoRefresh:"\u81EA\u52D5\u5237\u65B0",zoomAdjusted:"\u7E2E\u653E\u81EA\u52D5\u8ABF\u6574\u70BA",autoRefreshEnabled:"\u81EA\u52D5\u5237\u65B0\u5DF2\u555F\u7528\uFF0C\u9593\u9694",autoRefreshDisabled:"\u81EA\u52D5\u5237\u65B0\u5DF2\u7981\u7528",autoRefreshIntervalUpdated:"\u81EA\u52D5\u5237\u65B0\u9593\u9694\u5DF2\u66F4\u65B0\u70BA",visualizationUpdated:"\u8996\u89BA\u5316\u5DF2\u66F4\u65B0",noAreaOrPixels:"\u6C92\u6709\u53D7\u4FDD\u8B77\u5340\u57DF\u6216\u50CF\u7D20\u9032\u884C\u5206\u6790",noColorsDetected:"\u7121\u6CD5\u6AA2\u6E2C\u984F\u8272\u3002\u78BA\u4FDD\u8ABF\u8272\u677F\u5DF2\u6253\u958B\u3002",sessionRecordingStarted:"\u6703\u8A71\u9304\u5236\u5DF2\u958B\u59CB\uFF0C\u81EA\u52D5\u5237\u65B0\u5DF2\u555F\u7528",sessionRecordingStopped:"\u6703\u8A71\u9304\u5236\u5DF2\u505C\u6B62",noSessionData:"\u6C92\u6709\u6703\u8A71\u6578\u64DA\u53EF\u4E0B\u8F09",sessionDataDownloaded:"\u6703\u8A71\u6578\u64DA\u5DF2\u4E0B\u8F09",snapshotCaptureError:"\u6355\u7372\u5716\u50CF\u6642\u51FA\u932F",recordSession:"\u9304\u5236\u6703\u8A71",snapshot:"\u5FEB\u7167",downloadData:"\u4E0B\u8F09\u6578\u64DA",zoom:"\u7E2E\u653E",interval:"\u9593\u9694",seconds:"\u79D2",updateAnalysis:"\u66F4\u65B0\u5206\u6790",adjustZoom:"\u8ABF\u6574\u7E2E\u653E",precision:"\u7CBE\u5EA6",statistics:"\u7D71\u8A08",visualization:"\u8996\u89BA\u5316",recording:"\u9304\u5236",configTitle:"Guard\u914D\u7F6E",protectionPatterns:"\u4FDD\u8B77\u6A21\u5F0F",preferSpecificColor:"\u512A\u5148\u7279\u5B9A\u984F\u8272",excludeSpecificColors:"\u4E0D\u4FEE\u5FA9\u7279\u5B9A\u984F\u8272",loadManagement:"\u8CA0\u8F09\u7BA1\u7406",minLoadsToWait:"\u7B49\u5F85\u7684\u6700\u5C0F\u8CA0\u8F09\u6578",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6578",spendAllPixelsOnStart:"\u555F\u52D5\u6642\u6D88\u8017\u6240\u6709\u50CF\u7D20",waitTimes:"\u7B49\u5F85\u6642\u9593",useRandomTimes:"\u6279\u6B21\u9593\u4F7F\u7528\u96A8\u6A5F\u6642\u9593",minTime:"\u6700\u5C0F\u6642\u9593 (\u79D2)",maxTime:"\u6700\u5927\u6642\u9593 (\u79D2)"},slave:{title:"WPlace Slave",initBot:"\u521D\u59CB\u5316Slave-BOT",startPainting:"\u958B\u59CB",stopPainting:"\u505C\u6B62",logs:"\u65E5\u8A8C",configuration:"\u914D\u7F6E",minimize:"\u6700\u5C0F\u5316",pixelsPerBatch:"\u6BCF\u6279\u50CF\u7D20\u6578",nextBatchIn:"\u4E0B\u4E00\u6279: ",waitingInit:"\u7B49\u5F85\u521D\u59CB\u5316...",checkingColors:"\u{1F3A8} \u6AA2\u67E5\u53EF\u7528\u984F\u8272...",noColorsFound:"\u274C \u672A\u627E\u5230\u984F\u8272\uFF0C\u8ACB\u5728\u7DB2\u7AD9\u4E0A\u6253\u958B\u8ABF\u8272\u677F\u3002",colorsFound:"\u2705 \u627E\u5230 {count} \u7A2E\u53EF\u7528\u984F\u8272",initSuccess:"\u2705 Slave-BOT\u521D\u59CB\u5316\u6210\u529F",initError:"\u274C Slave-BOT\u521D\u59CB\u5316\u5931\u6557",noCoordsSet:"\u274C \u672A\u8A2D\u7F6E\u5EA7\u6A19\u3002\u8ACB\u5148\u4F7F\u7528WPlace AutoBOT Image\u3002",noCoordsData:"\u274C \u5EA7\u6A19\u6578\u64DA\u4E0D\u53EF\u7528\u3002\u8ACB\u5148\u5728WPlace AutoBOT Image\u4E2D\u8A2D\u7F6E\u5EA7\u6A19\u3002",coordsLoaded:"\u2705 \u5F9EWPlace AutoBOT Image\u8F09\u5165\u4E86 {count} \u500B\u5EA7\u6A19",coordsError:"\u274C \u8F09\u5165\u5EA7\u6A19\u932F\u8AA4: {error}",paintingStarted:"\u{1F3A8} \u7E6A\u88FD\u5DF2\u958B\u59CB",paintingStopped:"\u23F9\uFE0F \u7E6A\u88FD\u5DF2\u505C\u6B62",paintingPixel:"\u{1F58C}\uFE0F \u7E6A\u88FD\u50CF\u7D20 ({x}, {y}) \u984F\u8272 {color}",pixelPainted:"\u2705 \u50CF\u7D20\u7E6A\u88FD\u6210\u529F",pixelError:"\u274C \u7E6A\u88FD\u50CF\u7D20\u932F\u8AA4: {error}",batchComplete:"\u2705 \u6279\u6B21\u5B8C\u6210: {painted} / {total} \u50CF\u7D20\u5DF2\u7E6A\u88FD",batchError:"\u274C \u6279\u6B21\u57F7\u884C\u932F\u8AA4: {error}",allPixelsComplete:"\u{1F389} \u6240\u6709\u50CF\u7D20\u5B8C\u6210\uFF01",noCharges:"\u26A0\uFE0F \u6B21\u6578\u4E0D\u8DB3\uFF0C\u7121\u6CD5\u7E6A\u88FD",waitingForCharges:"\u23F3 \u7B49\u5F85\u6B21\u6578...",charges:"\u6B21\u6578",totalPixels:"\u7E3D\u50CF\u7D20\u6578",paintedPixels:"\u5DF2\u7E6A\u88FD\u50CF\u7D20",remainingPixels:"\u5269\u9918\u50CF\u7D20",currentBatch:"\u7576\u524D\u6279\u6B21",progress:"\u9032\u5EA6",estimatedTime:"\u9810\u8A08\u5B8C\u6210\u6642\u9593",autoInitializing:"\u{1F916} \u6B63\u5728\u81EA\u52D5\u521D\u59CB\u5316...",autoInitSuccess:"\u2705 Slave-BOT\u81EA\u52D5\u5553\u52D5\u6210\u529F",autoInitFailed:"\u26A0\uFE0F \u7121\u6CD5\u81EA\u52D5\u5553\u52D5\u3002\u8ACB\u4F7F\u7528\u624B\u52D5\u5553\u52D5\u6309\u9215\u3002",manualInitRequired:"\u{1F527} \u9700\u8981\u624B\u52D5\u521D\u59CB\u5316",paletteDetected:"\u{1F3A8} \u5DF2\u6AA2\u6E2C\u5230\u8ABF\u8272\u677F",paletteNotFound:"\u{1F50D} \u6B63\u5728\u641C\u7D22\u8ABF\u8272\u677F...",clickingPaintButton:"\u{1F446} \u6B63\u5728\u9EDE\u64CA\u7E6A\u88FD\u6309\u9215...",paintButtonNotFound:"\u274C \u672A\u627E\u5230\u7E6A\u88FD\u6309\u9215",logWindow:"\u65E5\u8A8C",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589",configTitle:"Slave\u914D\u7F6E",loadManagement:"\u8CA0\u8F09\u7BA1\u7406",minLoadsToWait:"\u7B49\u5F85\u7684\u6700\u5C0F\u8CA0\u8F09\u6578",pixelsPerBatchConfig:"\u6BCF\u6279\u50CF\u7D20\u6578",spendAllPixelsOnStart:"\u555F\u52D5\u6642\u6D88\u8017\u6240\u6709\u50CF\u7D20",waitTimes:"\u7B49\u5F85\u6642\u9593",useRandomTimes:"\u6279\u6B21\u9593\u4F7F\u7528\u96A8\u6A5F\u6642\u9593",minTime:"\u6700\u5C0F\u6642\u9593 (\u79D2)",maxTime:"\u6700\u5927\u6642\u9593 (\u79D2)"}}});var Do,Oo=R(()=>{Do={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",autoSlave:"\u{1F517} Slave",selection:"Sele\xE7\xE3o",user:"Usu\xE1rio",charges:"Cargas",backend:"Backend",database:"Banco de Dados",uptime:"Tempo Ativo",close:"Fechar",launch:"Iniciar",loading:"Carregando\u2026",executing:"Executando\u2026",downloading:"Baixando script\u2026",chooseBot:"Escolha um bot e pressione Iniciar",readyToLaunch:"Pronto para iniciar",loadError:"Erro de carregamento",loadErrorMsg:"N\xE3o foi poss\xEDvel carregar o bot selecionado. Verifique sua conex\xE3o ou tente novamente.",checking:"\u{1F504} Verificando...",online:"\u{1F7E2} Online",offline:"\u{1F534} Offline",ok:"\u{1F7E2} OK",error:"\u{1F534} Erro",unknown:"-",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Baixar Logs",clearLogs:"Limpar Logs",closeLogs:"Fechar",localExecution:"Execu\xE7\xE3o local com acesso completo ao sistema de tokens",botStarting:"Bot iniciando..."},image:{title:"WPlace Auto-Image",initBot:"Inicializar Auto-BOT",uploadImage:"Carregar Imagem",resizeImage:"Redimensionar Imagem",selectPosition:"Selecionar Posi\xE7\xE3o",startPainting:"Iniciar Pintura",stopPainting:"Parar Pintura",saveProgress:"Salvar Progresso",loadProgress:"Carregar Progresso",checkingColors:"\u{1F50D} Verificando cores dispon\xEDveis...",noColorsFound:"\u274C Abra a paleta de cores no site e tente novamente!",colorsFound:"\u2705 Encontradas {count} cores dispon\xEDveis",loadingImage:"\u{1F5BC}\uFE0F Carregando imagem...",imageLoaded:"\u2705 Imagem carregada com {count} pixels v\xE1lidos",imageError:"\u274C Erro ao carregar imagem",selectPositionAlert:"Pinte o primeiro pixel no local onde voc\xEA quer que a arte comece!",waitingPosition:"\u{1F446} Aguardando voc\xEA pintar o pixel de refer\xEAncia...",positionSet:"\u2705 Posi\xE7\xE3o definida com sucesso!",positionTimeout:"\u274C Tempo esgotado para sele\xE7\xE3o de posi\xE7\xE3o",positionDetected:"\u{1F3AF} Posi\xE7\xE3o detectada, processando...",positionError:"\u274C Erro ao detectar posi\xE7\xE3o, tente novamente",startPaintingMsg:"\u{1F3A8} Iniciando pintura...",paintingProgress:"\u{1F9F1} Progresso: {painted}/{total} pixels...",noCharges:"\u231B Sem cargas. Aguardando {time}...",paintingStopped:"\u23F9\uFE0F Pintura parada pelo usu\xE1rio",paintingComplete:"\u2705 Pintura conclu\xEDda! {count} pixels pintados.",paintingError:"\u274C Erro durante a pintura",missingRequirements:"\u274C Carregue uma imagem e selecione uma posi\xE7\xE3o primeiro",progress:"Progresso",userName:"Usu\xE1rio",pixels:"Pixels",charges:"Cargas",estimatedTime:"Tempo estimado",initMessage:"Clique em 'Inicializar Auto-BOT' para come\xE7ar",waitingInit:"Aguardando inicializa\xE7\xE3o...",resizeSuccess:"\u2705 Imagem redimensionada para {width}x{height}",paintingPaused:"\u23F8\uFE0F Pintura pausada na posi\xE7\xE3o X: {x}, Y: {y}",pixelsPerBatch:"Pixels por lote",batchSize:"Tamanho do lote",nextBatchTime:"Pr\xF3ximo lote em",useAllCharges:"Usar todas as cargas dispon\xEDveis",showOverlay:"Mostrar sobreposi\xE7\xE3o",maxCharges:"M\xE1ximo de cargas por lote",waitingForCharges:"\u23F3 Aguardando cargas: {current}/{needed}",timeRemaining:"Tempo restante",cooldownWaiting:"\u23F3 Aguardando {time} para continuar...",progressSaved:"\u2705 Progresso salvo como {filename}",progressLoaded:"\u2705 Progresso carregado: {painted}/{total} pixels pintados",progressLoadError:"\u274C Erro ao carregar progresso: {error}",progressSaveError:"\u274C Erro ao salvar progresso: {error}",confirmSaveProgress:"Voc\xEA quer salvar o progresso atual antes de parar?",saveProgressTitle:"Salvar Progresso",discardProgress:"Descartar",cancel:"Cancelar",minimize:"Minimizar",width:"Largura",height:"Altura",keepAspect:"Manter propor\xE7\xE3o",apply:"Aplicar",overlayOn:"Sobreposi\xE7\xE3o: LIGADA",overlayOff:"Sobreposi\xE7\xE3o: DESLIGADA",passCompleted:"\u2705 Passagem conclu\xEDda: {painted} pixels pintados | Progresso: {percent}% ({current}/{total})",waitingChargesRegen:"\u23F3 Aguardando regenera\xE7\xE3o de cargas: {current}/{needed} - Tempo: {time}",waitingChargesCountdown:"\u23F3 Aguardando cargas: {current}/{needed} - Restante: {time}",autoInitializing:"\u{1F916} Auto-inicializando...",autoInitSuccess:"\u2705 Bot iniciado automaticamente com sucesso",autoInitFailed:"\u26A0\uFE0F N\xE3o foi poss\xEDvel iniciar automaticamente. Use o bot\xE3o manual.",paletteDetected:"\u{1F3A8} Paleta de cores detectada",paletteNotFound:"\u{1F50D} Procurando paleta de cores...",clickingPaintButton:"\u{1F446} Clicando no bot\xE3o Pintar...",paintButtonNotFound:"\u274C Bot\xE3o Pintar n\xE3o encontrado",manualInitRequired:"\u{1F527} Inicializa\xE7\xE3o manual necess\xE1ria",retryAttempt:"\u{1F504} Tentativa {attempt}/{maxAttempts} em {delay}s...",retryError:"\u{1F4A5} Erro na tentativa {attempt}/{maxAttempts}, tentando novamente em {delay}s...",retryFailed:"\u274C Falhou ap\xF3s {maxAttempts} tentativas. Continuando com o pr\xF3ximo lote...",networkError:"\u{1F310} Erro de rede. Tentando novamente...",serverError:"\u{1F525} Erro do servidor. Tentando novamente...",timeoutError:"\u23F0 Timeout do servidor, tentando novamente...",saveProgressBtn:"Salvar progresso",guardJsonBtn:"Guard JSON",resizeWindowTitle:"Redimensionar Imagem",original:"Original",labTolerance:"Toler\xE2ncia LAB",maintainProportion:"Manter propor\xE7\xE3o",skipColor:"Pular Cor",skipColorEnabled:"Pular cores que n\xE3o correspondem exatamente",similarityThreshold:"Limiar de similaridade",skipColorDescription:"Apenas correspond\xEAncias exatas de cor ser\xE3o pintadas (100% de similaridade).",applyResize:"Aplicar",cancelResize:"Cancelar",patternSnake:"Cobra (Zigzag)",patternDiagonalSweep:"Varredura diagonal",patternBorders:"Bordas primeiro",patternCenter:"Centro primeiro",patternQuadrants:"Quadrantes",patternBiasedRandom:"Aleat\xF3rio tendencioso (bordas)",patternClusters:"Agrupamentos",patternProximity:"Proximidade",patternSweep:"Varredura por se\xE7\xF5es",patternPriority:"Prioridade (misto)",patternAnchorPoints:"Pontos \xE2ncora",patternSpiralCw:"Espiral (sentido hor\xE1rio)",patternSpiralCcw:"Espiral (sentido anti-hor\xE1rio)",noProgressToSave:"Nenhum progresso para salvar",progressSaveSuccess:"Progresso salvo como {filename}",progressLoadSuccess:"Progresso carregado: {painted}/{total} pixels pintados",invalidProgressFile:"Arquivo de progresso inv\xE1lido",missingFields:"Campos obrigat\xF3rios ausentes: {fields}",guardDialogTitle:"Gerar Guard JSON",guardDialogMessage:"Voc\xEA quer gerar um arquivo Guard JSON com os dados atuais?",guardDialogInfo:`Imagem: {name}
Dimens\xF5es: {width}x{height}
Pixels: {pixels}`,generateGuard:"Gerar Guard",guardJsonInvalidStructure:"\u274C Estrutura inv\xE1lida para Guard JSON. Cancelando salvamento.",guardJsonInvalidMessage:"Estrutura de Guard JSON inv\xE1lida. Tente novamente ap\xF3s selecionar posi\xE7\xE3o.",guardJsonSaveSuccess:"\u2705 Guard JSON salvo: {filename}",guardJsonSaveError:"\u274C Erro ao salvar Guard JSON: {error}",notificationInfo:"Informa\xE7\xE3o",notificationSuccess:"Sucesso",notificationWarning:"Aviso",notificationError:"Erro",paintPattern:"\u{1F3A8} Padr\xE3o de pintura",patternLinearStart:"Linear (In\xEDcio)",patternLinearEnd:"Linear (Fim)",patternRandom:"Aleat\xF3rio",patternCenterOut:"Centro para fora",patternCornersFirst:"Cantos primeiro",patternSpiral:"Espiral",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Baixar Logs",clearLogs:"Limpar Logs",closeLogs:"Fechar",userInfo:"Informa\xE7\xF5es do Usu\xE1rio",imageProgress:"Progresso da Imagem",availableColors:"Cores Dispon\xEDveis",noImageLoaded:"Nenhuma imagem carregada",cooldown:"Cooldown",totalColors:"Total de Cores",colorPalette:"Paleta de Cores",showAllColors:"Mostrar Todas as Cores (incluindo indispon\xEDveis)",selectAllColors:"Selecionar Todas",unselectAllColors:"Desselecionar Todas",noAvailable:"N\xE3o dispon\xEDvel",colorSelected:"Cor selecionada",statsUpdated:"\u2705 Estat\xEDsticas atualizadas: {count} cores dispon\xEDveis"},farm:{title:"\u{1F9D1}\u200D\u{1F33E} WPlace Farm",start:"Iniciar",stop:"Parar",stopped:"Bot parado",calibrate:"Calibrar",paintOnce:"Uma vez",checkingStatus:"Verificando status...",configuration:"Configura\xE7\xE3o",delay:"Atraso (ms)",pixelsPerBatch:"Pixels/lote",minCharges:"Min cargas",colorMode:"Modo de cor",random:"Aleat\xF3rio",fixed:"Fixo",range:"Intervalo",fixedColor:"Cor fixa",advanced:"Avan\xE7ado",tileX:"Tile X",tileY:"Tile Y",customPalette:"Paleta personalizada",paletteExample:"ex: #FF0000,#00FF00,#0000FF",capture:"Capturar",painted:"Pintado",charges:"Cargas",retries:"Tentativas",position:"Posi\xE7\xE3o",tile:"Tile",configSaved:"Configura\xE7\xE3o salva",configLoaded:"Configura\xE7\xE3o carregada",configReset:"Configura\xE7\xE3o resetada",captureInstructions:"Pinte um pixel manualmente para capturar coordenadas...",backendOnline:"Backend Online",backendOffline:"Backend Offline",startingBot:"Iniciando bot...",stoppingBot:"Parando bot...",calibrating:"Calibrando...",alreadyRunning:"Auto-Farm j\xE1 est\xE1 rodando.",imageRunningWarning:"Auto-Image est\xE1 rodando. Feche-o antes de iniciar Auto-Farm.",selectPositionAlert:"\u{1F3AF} Pinte um pixel em uma \xE1rea VAZIA do mapa para definir a zona de farming",waitingPosition:"\u{1F446} Aguardando voc\xEA pintar o pixel de refer\xEAncia...",positionSet:"\u2705 Zona definida!",positionTimeout:"\u274C Tempo esgotado para sele\xE7\xE3o de zona",missingPosition:"\u274C Selecione uma zona primeiro usando 'Selecionar Zona'",farmRadius:"Raio de farming",positionInfo:"Zona atual",farmingInRadius:"\u{1F33E} Fazendo farming em {radius}px de raio de ({x},{y})",selectEmptyArea:"\u26A0\uFE0F IMPORTANTE: Selecione uma \xE1rea VAZIA para evitar conflitos",noPosition:"Nenhuma zona",currentZone:"Zona: ({x},{y})",autoSelectPosition:"\u{1F3AF} Selecione uma zona primeiro. Pinte um pixel no mapa para definir a zona de farming",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Baixar Logs",clearLogs:"Limpar Logs",closeLogs:"Fechar",ready:"Pronto",once:"Uma vez",recapture:"Recapturar",selectPosition:"Selecionar",stats:{painted:"Pintado",charges:"Cargas",droplets:"Gotas",user:"Usu\xE1rio",retries:"Tentativas"},config:{minCharges:"Cargas m\xEDnimas",delay:"Aguardar (seg)",pixelsPerBatch:"Pixels por lote"},color:{fixed:"Fixo",range:"Intervalo",random:"Aleat\xF3rio",selected:"Cor selecionada",min:"Min",max:"Max"},autobuy:{title:"Compra autom\xE1tica (+5 cargas)",hint:"Ser\xE1 ativado automaticamente quando voc\xEA tiver \u2265 500 gotas"},buyCharges:"Comprar +5 cargas",buying:"Comprando...",buyOk:"Compra conclu\xEDda. Atualize a sess\xE3o.",buyFail:"N\xE3o foi poss\xEDvel comprar"},common:{yes:"Sim",no:"N\xE3o",ok:"OK",cancel:"Cancelar",close:"Fechar",save:"Salvar",load:"Carregar",delete:"Excluir",edit:"Editar",start:"Iniciar",stop:"Parar",pause:"Pausar",resume:"Retomar",reset:"Resetar",settings:"Configura\xE7\xF5es",help:"Ajuda",about:"Sobre",language:"Idioma",loading:"Carregando...",error:"Erro",success:"Sucesso",warning:"Aviso",info:"Informa\xE7\xE3o",languageChanged:"Idioma alterado para {language}"},guard:{title:"WPlace Auto-Guard",initBot:"Inicializar Guard-BOT",selectArea:"Selecionar \xC1rea",save:"Salvar",loadFile:"Carregar Arquivo",reposition:"Reposicionar",analyzeArea:"Analisar \xC1rea",logs:"Logs",watcher:"Observador",configuration:"Configura\xE7\xE3o",startErase:"Iniciar Apagar",stopWatcher:"Parar Observador",minimize:"Minimizar",expand:"Expandir",nextBatchIn:"Pr\xF3ximo lote em: ",captureArea:"Capturar \xC1rea",startProtection:"Iniciar",stopProtection:"Parar",protectedPixels:"Pixels Protegidos",upperLeft:"Canto Superior Esquerdo",lowerRight:"Canto Inferior Direito",detectedChanges:"Mudan\xE7as Detectadas",repairedPixels:"Pixels Reparados",charges:"Cargas",waitingInit:"Aguardando inicializa\xE7\xE3o...",checkingColors:"\u{1F3A8} Verificando cores dispon\xEDveis...",noColorsFound:"\u274C Nenhuma cor encontrada. Abra a paleta de cores no site.",colorsFound:"\u2705 Encontradas {count} cores dispon\xEDveis",initSuccess:"\u2705 Guard-BOT inicializado com sucesso",initError:"\u274C Erro ao inicializar Guard-BOT",invalidCoords:"\u274C Coordenadas inv\xE1lidas",invalidArea:"\u274C A \xE1rea deve ter o canto superior esquerdo menor que o canto inferior direito",areaTooLarge:"\u274C \xC1rea muito grande: {size} pixels (m\xE1ximo: {max})",capturingArea:"\u{1F4F8} Capturando \xE1rea...",areaCaptured:"\u2705 \xC1rea capturada: {count} pixels",captureError:"\u274C Erro ao capturar \xE1rea: {error}",captureFirst:"\u274C Primeiro capture uma \xE1rea",noChanges:"\u2705 \xC1rea - nenhuma mudan\xE7a detectada",changesDetected:"\u{1F6A8} {count} mudan\xE7as detectadas na \xE1rea",repairing:"\u{1F6E0}\uFE0F Reparando {count} pixels alterados...",repairedSuccess:"\u2705 {count} pixels reparados com sucesso",repairError:"\u274C Erro ao reparar pixels: {error}",noCharges:"\u26A0\uFE0F Cargas insuficientes para reparar mudan\xE7as",checkingChanges:"\u{1F50D} Verificando mudan\xE7as na \xE1rea...",errorChecking:"\u274C Erro ao verificar mudan\xE7as: {error}",guardActive:"\u{1F6E1}\uFE0F Guardi\xE3o ativo - \xE1rea monitorada",lastCheck:"\xDAltima verifica\xE7\xE3o: {time}",nextCheck:"Pr\xF3xima verifica\xE7\xE3o em: {time}s",autoInitializing:"\u{1F916} Auto-inicializando...",autoInitSuccess:"\u2705 Guard-BOT iniciado automaticamente com sucesso",autoInitFailed:"\u26A0\uFE0F N\xE3o foi poss\xEDvel iniciar automaticamente. Use o bot\xE3o manual.",manualInitRequired:"\u{1F527} Inicializa\xE7\xE3o manual necess\xE1ria",paletteDetected:"\u{1F3A8} Paleta de cores detectada",paletteNotFound:"\u{1F50D} Procurando paleta de cores...",clickingPaintButton:"\u{1F446} Clicando no bot\xE3o Pintar...",paintButtonNotFound:"\u274C Bot\xE3o Pintar n\xE3o encontrado",protectionStopped:"\u23F9\uFE0F Prote\xE7\xE3o parada",selectUpperLeft:"\u{1F3AF} Pinte um pixel no canto SUPERIOR ESQUERDO da \xE1rea para monitorar",selectLowerRight:"\u{1F3AF} Agora pinte um pixel no canto INFERIOR DIREITO da \xE1rea",waitingUpperLeft:"\u{1F446} Aguardando sele\xE7\xE3o do canto superior esquerdo...",waitingLowerRight:"\u{1F446} Aguardando sele\xE7\xE3o do canto inferior direito...",upperLeftCaptured:"\u2705 Canto superior esquerdo capturado: ({x}, {y})",lowerRightCaptured:"\u2705 Canto inferior direito capturado: ({x}, {y})",selectionTimeout:"\u274C Tempo esgotado para sele\xE7\xE3o",selectionError:"\u274C Erro na sele\xE7\xE3o, tente novamente",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Baixar Logs",clearLogs:"Limpar Logs",closeLogs:"Fechar",analysisTitle:"An\xE1lise de Diferen\xE7as - JSON vs Canvas Atual",correctPixels:"Pixels Corretos",incorrectPixels:"Pixels Incorretos",missingPixels:"Pixels Ausentes",showCorrect:"Mostrar Corretos",showIncorrect:"Mostrar Incorretos",showMissing:"Mostrar Ausentes",autoRefresh:"Atualiza\xE7\xE3o autom\xE1tica",zoomAdjusted:"Zoom ajustado automaticamente para",autoRefreshEnabled:"Atualiza\xE7\xE3o autom\xE1tica ativada a cada",autoRefreshDisabled:"Atualiza\xE7\xE3o autom\xE1tica desativada",autoRefreshIntervalUpdated:"Intervalo de atualiza\xE7\xE3o autom\xE1tica atualizado para",visualizationUpdated:"Visualiza\xE7\xE3o atualizada",noAreaOrPixels:"Nenhuma \xE1rea protegida ou pixels carregados para analisar",noColorsDetected:"N\xE3o \xE9 poss\xEDvel detectar cores. Certifique-se de que a paleta est\xE1 aberta.",sessionRecordingStarted:"Grava\xE7\xE3o de sess\xE3o iniciada com atualiza\xE7\xE3o autom\xE1tica ativada",sessionRecordingStopped:"Grava\xE7\xE3o de sess\xE3o parada",noSessionData:"Nenhum dado de sess\xE3o para baixar",sessionDataDownloaded:"Dados de sess\xE3o baixados",snapshotCaptureError:"Erro ao capturar imagem",recordSession:"Gravar Sess\xE3o",snapshot:"Captura",downloadData:"Baixar Dados",zoom:"Zoom",interval:"Intervalo",seconds:"segundos",updateAnalysis:"Atualizar An\xE1lise",adjustZoom:"Ajustar Zoom",precision:"Precis\xE3o",statistics:"Estat\xEDsticas",visualization:"Visualiza\xE7\xE3o",recording:"Grava\xE7\xE3o",configTitle:"Configura\xE7\xE3o do Guard",protectionPatterns:"Padr\xF5es de Prote\xE7\xE3o",preferSpecificColor:"Priorizar cor espec\xEDfica",excludeSpecificColors:"N\xE3o reparar cores espec\xEDficas",loadManagement:"Gerenciamento de Carga",minLoadsToWait:"Cargas m\xEDnimas:",pixelsPerBatch:"Pixels por lote",spendAllPixelsOnStart:"Gastar todos os pixels no in\xEDcio",waitTimes:"Tempos de Espera",useRandomTimes:"Usar tempos aleat\xF3rios entre lotes",minTime:"Tempo m\xEDnimo (s)",maxTime:"Tempo m\xE1ximo (s)"},slave:{title:"WPlace Slave",masterServer:"Servidor Mestre",ipAddress:"Endere\xE7o IP",connect:"Conectar",disconnect:"Desconectar",status:"Status",slaveId:"ID do Slave",mode:"Modo",running:"Rodando",idle:"Ocioso",connected:"Conectado",connecting:"Conectando...",disconnected:"Desconectado",error:"Erro",close:"Fechar",telemetry:"Telemetria",repairedPixels:"Pixels Reparados",missingPixels:"Pixels Ausentes",absentPixels:"Pixels Ausentes",remainingCharges:"Cargas Restantes",connectionError:"Erro de conex\xE3o. Verifique a URL e se o servidor est\xE1 rodando.",invalidUrl:"Por favor, insira uma URL v\xE1lida",httpsUpgrade:"P\xE1gina HTTPS: mudando para wss:// para evitar conte\xFAdo misto.",slaveRunning:"Slave j\xE1 est\xE1 rodando.",slaveInitialized:"Slave inicializado com sucesso",slaveError:"Erro ao inicializar Slave",masterConnected:"Conectado ao servidor mestre",masterDisconnected:"Desconectado do servidor mestre",reconnecting:"Tentando reconectar",maxReconnectAttempts:"M\xE1ximo de tentativas de reconex\xE3o atingido",modeSet:"Modo configurado",projectLoaded:"Configura\xE7\xE3o do projeto carregada",botStarted:"Bot iniciado",botStopped:"Bot parado",botPaused:"Bot pausado"}}});function gn(){let e=(window.navigator.language||window.navigator.userLanguage||"es").split("-")[0].toLowerCase();return xe[e]?e:"es"}function mn(){return null}function hn(){var o;try{return((o=window.__wplaceBot)==null?void 0:o.globalLanguage)||null}catch{return null}}function fn(o){try{window.__wplaceBot||(window.__wplaceBot={}),window.__wplaceBot.globalLanguage=o}catch{}}function $t(){let o=hn(),e=mn(),t=gn(),r="es";return o&&xe[o]?r=o:e&&xe[e]?r=e:t&&xe[t]&&(r=t),xn(r),r}function xn(o){if(!xe[o]){console.warn(`Idioma '${o}' no disponible. Usando '${Ft}'`);return}Ft=o,Be=xe[o],fn(o),typeof window!="undefined"&&window.CustomEvent&&window.dispatchEvent(new window.CustomEvent("languageChanged",{detail:{language:o,translations:Be}}))}function v(o,e={}){let t=o.split("."),r=Be;for(let n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return console.warn(`Clave de traducci\xF3n no encontrada: '${o}'`),o;return typeof r!="string"?(console.warn(`Clave de traducci\xF3n no es string: '${o}'`),o):yn(r,e)}function yn(o,e){return!e||Object.keys(e).length===0?o:o.replace(/\{(\w+)\}/g,(t,r)=>e[r]!==void 0?e[r]:t)}function Uo(o){return Be[o]?Be[o]:(console.warn(`Secci\xF3n de traducci\xF3n no encontrada: '${o}'`),{})}var xe,Ft,Be,Fe=R(()=>{To();ko();Ro();_o();Bo();$o();Wo();Oo();xe={es:Io,en:Ao,de:Lo,fr:Mo,ru:zo,zhHans:Fo,zhHant:No,pt:Do},Ft="es",Be=xe[Ft];$t()});var Ko={};Qt(Ko,{closeAnalysisWindow:()=>Dt,createAnalysisWindow:()=>Sn,updateAnalysisTexts:()=>Pn});function J(o,e,t=!1){return`
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; padding: 8px 0;">
<span style="color: #eee; font-size: 14px; flex: 1;">${e}</span>
<label class="toggle-switch" style="position: relative; display: inline-block; width: 50px; height: 26px; margin-left: 10px;">
<input type="checkbox" id="${o}" ${t?"checked":""} style="opacity: 0; width: 0; height: 0;">
<span class="toggle-slider" style="
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: ${t?"#22c55e":"#ef4444"};
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 13px;
border: 1px solid ${t?"#16a34a":"#dc2626"};
"></span>
<span class="toggle-knob" style="
position: absolute;
height: 20px;
width: 20px;
left: ${t?"27px":"3px"};
top: 3px;
background-color: white;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 50%;
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
"></span>
</label>
</div>
`}function $e(o,e){let t=document.getElementById(o);if(!t)return;let r=t.parentElement.querySelector(".toggle-slider"),n=t.parentElement.querySelector(".toggle-knob");r&&n&&(r.style.backgroundColor=e?"#22c55e":"#ef4444",r.style.borderColor=e?"#16a34a":"#dc2626",n.style.left=e?"27px":"3px")}function Dt(){if(ce){let o=ce.analysisWindow;o.style.transition="opacity 0.3s ease, transform 0.3s ease",o.style.opacity="0",o.style.transform="scale(0.95) translateY(-20px)",setTimeout(()=>{H(o),j&&(window.clearInterval(j),j=null),it&&Ho(),U=[],le=null,o&&o.parentNode&&document.body.removeChild(o),ce=null,d("\u{1F50D} Ventana de an\xE1lisis cerrada")},300)}}function Pn(){if(ce){let{analysisWindow:o,controlPanel:e}=ce,t=o.querySelector('div[style*="background: #2d3748"]');if(t){let r=t.querySelector("span");r&&(r.textContent=v("guard.analysisTitle"))}e&&(e.innerHTML=`
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u{1F4CA} ${v("guard.statistics","Estad\xEDsticas")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
<div style="margin-bottom: 10px;">
<span style="color: #10b981;">\u2705 ${v("guard.correctPixels")}:</span>
<span id="correctPixels" style="float: right; font-weight: bold;">-</span>
</div>
<div style="margin-bottom: 10px;">
<span style="color: #ef4444;">\u274C ${v("guard.incorrectPixels")}:</span>
<span id="incorrectPixels" style="float: right; font-weight: bold;">-</span>
</div>
<div style="margin-bottom: 10px;">
<span style="color: #f59e0b;">\u26AA ${v("guard.missingPixels")}:</span>
<span id="missingPixels" style="float: right; font-weight: bold;">-</span>
</div>
<div>
<span style="color: #8b5cf6;">\u{1F3AF} ${v("guard.precision","Precisi\xF3n")}:</span>
<span id="accuracy" style="float: right; font-weight: bold;">-</span>
</div>
</div>
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u{1F3A8} ${v("guard.visualization","Visualizaci\xF3n")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
${J("showCorrect",`\u2705 ${v("guard.showCorrect")}`,!1)}
${J("showIncorrect",`\u274C ${v("guard.showIncorrect")}`,!0)}
${J("showMissing",`\u26AA ${v("guard.showMissing")}`,!0)}
</div>
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u{1F4F9} ${v("guard.recording","Grabaci\xF3n")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
${J("recordSession",`\u{1F4F9} ${v("guard.recordSession","Grabar Sesi\xF3n")}`,!1)}
<button id="snapshotBtn" style="width: 100%; padding: 10px; background: #f59e0b; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 10px;">
\u{1F4F8} ${v("guard.snapshot","Snapshot")}
</button>
<div id="sessionControls" style="margin-top: 10px; opacity: 0; max-height: 0; overflow: hidden; transition: all 0.3s ease;">
<button id="downloadSession" style="width: 100%; padding: 8px; background: #8b5cf6; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 12px;">
\u{1F4BE} ${v("guard.downloadData","Descargar Datos")}
</button>
</div>
</div>
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u2699\uFE0F ${v("guard.configuration","Configuraci\xF3n")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px;">
<div style="margin-bottom: 15px;">
<label style="display: block; margin-bottom: 5px; font-size: 14px;">\u{1F50D} ${v("guard.zoom","Zoom")}:</label>
<input type="range" id="zoomSlider" min="0.5" max="5" step="0.1" value="1" style="width: 100%;">
<span id="zoomValue" style="font-size: 12px; color: #cbd5e0;">100%</span>
</div>
<div style="margin-bottom: 15px;">
${J("autoRefresh",`\u{1F504} ${v("guard.autoRefresh")}`,!0)}
<div style="display: flex; align-items: center; gap: 10px; margin-top: 10px;">
<label style="font-size: 12px; color: #cbd5e0;">${v("guard.interval","Intervalo")} (s):</label>
<input type="number" id="refreshInterval" min="1" max="60" value="5" style="width: 60px; padding: 4px; background: #4b5563; color: white; border: 1px solid #6b7280; border-radius: 4px;">
</div>
</div>
<button id="refreshAnalysis" style="width: 100%; padding: 10px; background: #60a5fa; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;">
\u{1F504} ${v("guard.updateAnalysis","Actualizar An\xE1lisis")}
</button>
<button id="autoFitZoom" style="width: 100%; padding: 8px; background: #10b981; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 8px;">
\u{1F4D0} ${v("guard.adjustZoom","Ajustar Zoom")}
</button>
<!-- Coordenadas del \xE1rea -->
<div style="margin-top: 15px; padding-top: 10px; border-top: 1px solid #4b5563;">
<div style="font-size: 10px; color: #9ca3af; margin-bottom: 5px;">
<div style="display: flex; justify-content: space-between; margin-bottom: 2px;">
<span>${v("guard.upperLeft","Esquina Superior Izquierda")}:</span>
<span id="coordsUpperLeft">--</span>
</div>
<div style="display: flex; justify-content: space-between;">
<span>${v("guard.lowerRight","Esquina Inferior Derecha")}:</span>
<span id="coordsLowerRight">--</span>
</div>
</div>
</div>
</div>
`,i.lastAnalysis&&(Vo(e,ce.canvas,i.lastAnalysis),Zo(e,i.lastAnalysis),Ot(e,i.lastAnalysis),Xo(e)))}}function Sn(){if(!i.protectionArea||!i.originalPixels.size){alert(`\u274C ${v("guard.noAreaOrPixels","No hay \xE1rea protegida o p\xEDxeles cargados para analizar")}`);return}ce&&Dt();let o=document.createElement("div");o.style.cssText=`
position: fixed;
left: 50px;
top: 50px;
width: 1200px;
height: 800px;
background: #1a1a1a;
border: 2px solid #333;
border-radius: 12px;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
z-index: 100002;
backdrop-filter: blur(10px);
opacity: 0;
transform: scale(0.95) translateY(-20px);
transition: opacity 0.3s ease, transform 0.3s ease;
`;let e=document.createElement("div");e.style.cssText=`
padding: 15px 20px;
background: #2d3748;
color: #60a5fa;
font-size: 18px;
font-weight: 600;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #333;
cursor: move;
user-select: none;
`,e.innerHTML=`
<div style="display: flex; align-items: center; gap: 10px;">
\u{1F50D} <span>${v("guard.analysisTitle")}</span>
</div>
<div style="display: flex; align-items: center; gap: 5px;">
<button id="minimizeAnalysisBtn" style="background: none; border: none; color: #eee; cursor: pointer; font-size: 16px; padding: 5px; opacity: 0.7; transition: opacity 0.2s ease;">\u2796</button>
<button id="closeAnalysisBtn" style="background: none; border: none; color: #eee; cursor: pointer; font-size: 20px; padding: 5px;">\u274C</button>
</div>
`;let t=document.createElement("div");t.style.cssText=`
flex: 1;
display: flex;
overflow: hidden;
`;let r=document.createElement("div");r.style.cssText=`
width: 300px;
background: #2d3748;
padding: 20px;
border-right: 1px solid #333;
overflow-y: auto;
color: #eee;
font-family: 'Segoe UI', Roboto, sans-serif;
`,r.innerHTML=`
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u{1F4CA} ${v("guard.statistics","Estad\xEDsticas")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
<div style="margin-bottom: 10px;">
<span style="color: #10b981;">\u2705 ${v("guard.correctPixels")}:</span>
<span id="correctPixels" style="float: right; font-weight: bold;">-</span>
</div>
<div style="margin-bottom: 10px;">
<span style="color: #ef4444;">\u274C ${v("guard.incorrectPixels")}:</span>
<span id="incorrectPixels" style="float: right; font-weight: bold;">-</span>
</div>
<div style="margin-bottom: 10px;">
<span style="color: #f59e0b;">\u26AA ${v("guard.missingPixels")}:</span>
<span id="missingPixels" style="float: right; font-weight: bold;">-</span>
</div>
<div>
<span style="color: #8b5cf6;">\u{1F3AF} ${v("guard.precision","Precisi\xF3n")}:</span>
<span id="accuracy" style="float: right; font-weight: bold;">-</span>
</div>
</div>
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u{1F3A8} ${v("guard.visualization","Visualizaci\xF3n")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
${J("showCorrect",`\u2705 ${v("guard.showCorrect")}`,!1)}
${J("showIncorrect",`\u274C ${v("guard.showIncorrect")}`,!0)}
${J("showMissing",`\u26AA ${v("guard.showMissing")}`,!0)}
</div>
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u{1F4F9} ${v("guard.recording","Grabaci\xF3n")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px; margin-bottom: 20px;">
${J("recordSession",`\u{1F4F9} ${v("guard.recordSession","Grabar Sesi\xF3n")}`,!1)}
<button id="snapshotBtn" style="width: 100%; padding: 10px; background: #f59e0b; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 10px;">
\u{1F4F8} ${v("guard.snapshot","Snapshot")}
</button>
<div id="sessionControls" style="margin-top: 10px; opacity: 0; max-height: 0; overflow: hidden; transition: all 0.3s ease;">
<button id="downloadSession" style="width: 100%; padding: 8px; background: #8b5cf6; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 12px;">
\u{1F4BE} ${v("guard.downloadData","Descargar Datos")}
</button>
</div>
</div>
<h3 style="margin: 0 0 15px 0; color: #60a5fa;">\u2699\uFE0F ${v("guard.configuration","Configuraci\xF3n")}</h3>
<div style="background: #374151; padding: 15px; border-radius: 8px;">
<div style="margin-bottom: 15px;">
<label style="display: block; margin-bottom: 5px; font-size: 14px;">\u{1F50D} ${v("guard.zoom","Zoom")}:</label>
<input type="range" id="zoomSlider" min="0.5" max="5" step="0.1" value="1" style="width: 100%;">
<span id="zoomValue" style="font-size: 12px; color: #cbd5e0;">100%</span>
</div>
<div style="margin-bottom: 15px;">
${J("autoRefresh",`\u{1F504} ${v("guard.autoRefresh")}`,!0)}
<div style="display: flex; align-items: center; gap: 10px; margin-top: 10px;">
<label style="font-size: 12px; color: #cbd5e0;">${v("guard.interval","Intervalo")} (s):</label>
<input type="number" id="refreshInterval" min="1" max="60" value="5" style="width: 60px; padding: 4px; background: #4b5563; color: white; border: 1px solid #6b7280; border-radius: 4px;">
</div>
</div>
<button id="refreshAnalysis" style="width: 100%; padding: 10px; background: #60a5fa; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;">
\u{1F504} ${v("guard.updateAnalysis","Actualizar An\xE1lisis")}
</button>
<button id="autoFitZoom" style="width: 100%; padding: 8px; background: #10b981; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 8px;">
\u{1F4D0} ${v("guard.adjustZoom","Ajustar Zoom")}
</button>
<!-- Coordenadas del \xE1rea -->
<div style="margin-top: 15px; padding-top: 10px; border-top: 1px solid #4b5563;">
<div style="font-size: 10px; color: #9ca3af; margin-bottom: 5px;">
<div style="display: flex; justify-content: space-between; margin-bottom: 2px;">
<span>${v("guard.upperLeft","Esquina Superior Izquierda")}:</span>
<span id="coordsUpperLeft">--</span>
</div>
<div style="display: flex; justify-content: space-between;">
<span>${v("guard.lowerRight","Esquina Inferior Derecha")}:</span>
<span id="coordsLowerRight">--</span>
</div>
</div>
</div>
</div>
`;let n=document.createElement("div");n.style.cssText=`
flex: 1;
position: relative;
overflow: auto;
background: #111;
`;let s=document.createElement("canvas");s.style.cssText=`
display: block;
margin: 0;
border: 1px solid #333;
cursor: grab;
`;let a=document.createElement("div");a.style.cssText=`
position: absolute;
bottom: 0;
right: 0;
width: 20px;
height: 20px;
cursor: se-resize;
background: linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.3) 30%, rgba(255,255,255,0.3) 70%, transparent 70%);
border-radius: 0 0 12px 0;
z-index: 1;
`,t.appendChild(r),t.appendChild(n),n.appendChild(s),o.appendChild(e),o.appendChild(t),o.appendChild(a),document.body.appendChild(o),setTimeout(()=>{o.style.opacity="1",o.style.transform="scale(1) translateY(0)"},10),Z(o),En(s,r),ce={analysisWindow:o,canvas:s,controlPanel:r};let c=e.querySelector("#minimizeAnalysisBtn");c.addEventListener("click",()=>{t.style.display==="none"?(t.style.display="flex",c.textContent="\u2796",o.style.height="800px"):(t.style.display="none",o.style.height="auto",c.textContent="\u{1F53C}",o.style.height="auto")}),e.querySelector("#closeAnalysisBtn").addEventListener("click",Dt);let l=!1,u={x:0,y:0};e.addEventListener("mousedown",y=>{if(y.target.id!=="closeAnalysisBtn"){l=!0;let S=o.getBoundingClientRect();u.x=y.clientX-S.left,u.y=y.clientY-S.top,document.addEventListener("mousemove",g),document.addEventListener("mouseup",m)}});function g(y){if(l){let S=y.clientX-u.x,b=y.clientY-u.y;o.style.position="absolute",o.style.left=`${Math.max(0,Math.min(S,window.innerWidth-o.offsetWidth))}px`,o.style.top=`${Math.max(0,Math.min(b,window.innerHeight-o.offsetHeight))}px`}}function m(){l=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",m)}let h=!1,p,x,f,w;a.addEventListener("mousedown",y=>{h=!0,p=y.clientX,x=y.clientY,f=parseInt(document.defaultView.getComputedStyle(o).width,10),w=parseInt(document.defaultView.getComputedStyle(o).height,10),document.addEventListener("mousemove",C),document.addEventListener("mouseup",P),y.preventDefault()});function C(y){if(h){let S=Math.max(600,f+y.clientX-p),b=Math.max(400,w+y.clientY-x);o.style.width=S+"px",o.style.height=b+"px"}}function P(){h=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",P)}return{analysisWindow:o,canvas:s,controlPanel:r}}async function at(o,e){try{let t=await te(i.protectionArea),r=jo(i.originalPixels,t||new Map);Ot(e,r),qt(r),Ut(o,r)}catch(t){d("\u274C Error en refresco de an\xE1lisis:",t)}}async function En(o,e){var t,r;try{if(d("\u{1F50D} Iniciando an\xE1lisis de diferencias..."),d("\u{1F4CD} \xC1rea de protecci\xF3n:",i.protectionArea),d(`\u{1F4CA} P\xEDxeles originales en guardState: ${((t=i.originalPixels)==null?void 0:t.size)||0}`),d(`\u{1F3A8} Colores disponibles: ${((r=i.availableColors)==null?void 0:r.length)||0}`),!i.availableColors||i.availableColors.length===0){d("\u26A0\uFE0F No hay colores disponibles, intentando detectar...");let{detectAvailableColors:a}=await Promise.resolve().then(()=>(ot(),vo)),c=a();if(c.length>0)i.availableColors=c,d(`\u{1F3A8} Colores detectados: ${c.length}`);else{d("\u274C No se pudieron detectar colores para el an\xE1lisis"),alert("\u274C No se pueden detectar colores. Aseg\xFArate de que la paleta est\xE9 abierta.");return}}d("\u{1F50D} Obteniendo p\xEDxeles actuales del canvas...");let n=await te(i.protectionArea);d(`\u{1F5BC}\uFE0F P\xEDxeles actuales obtenidos: ${(n==null?void 0:n.size)||0}`),d("\u{1F50D} Comparando p\xEDxeles...");let s=jo(i.originalPixels,n||new Map);Ot(e,s),qt(s),Ut(o,s),Vo(e,o,s),Zo(e,s),Xo(e),d("\u2705 An\xE1lisis completado")}catch(n){d("\u274C Error en an\xE1lisis:",n),console.error("Error detallado:",n)}}function jo(o,e){var l,u;let t=new Map,r=new Map,n=new Map,s=((l=i.config)==null?void 0:l.colorComparisonMethod)||"rgb",a=((u=i.config)==null?void 0:u.colorThreshold)||10,c=(g,m)=>{if(s==="lab"){let h=ie(g.r,g.g,g.b),p=ie(m.r,m.g,m.b);return Me(h,p)<=a/2}else{let h=Math.abs(g.r-m.r),p=Math.abs(g.g-m.g),x=Math.abs(g.b-m.b);return Math.max(h,p,x)<=a}};for(let[g,m]of o){let h=e.get(g);h?c(m,h)?t.set(g,{original:m,current:h}):r.set(g,{original:m,current:h}):n.set(g,m)}return{correct:t,incorrect:r,missing:n,originalPixels:o,currentPixels:e}}function Ot(o,e){let t=e.originalPixels.size,r=e.correct.size,n=e.incorrect.size,s=e.missing.size,a=t>0?(r/t*100).toFixed(1):0;o.querySelector("#correctPixels").textContent=r,o.querySelector("#incorrectPixels").textContent=n,o.querySelector("#missingPixels").textContent=s,o.querySelector("#accuracy").textContent=`${a}%`}function Ut(o,e){var b,E,T,M;let t=i.protectionArea,r=t.x2-t.x1+1,n=t.y2-t.y1+1;d(`\u{1F5BC}\uFE0F Renderizando visualizaci\xF3n: ${r}x${n} p\xEDxeles`),d(`\u{1F4CA} P\xEDxeles originales: ${((b=e.originalPixels)==null?void 0:b.size)||0}`),d(`\u2705 P\xEDxeles correctos: ${((E=e.correct)==null?void 0:E.size)||0}`),d(`\u274C P\xEDxeles incorrectos: ${((T=e.incorrect)==null?void 0:T.size)||0}`),d(`\u26A0\uFE0F P\xEDxeles faltantes: ${((M=e.missing)==null?void 0:M.size)||0}`),o.width=r,o.height=n;let a=o.parentElement.getBoundingClientRect(),c=a.width-20,l=a.height-20,u=c/r,g=l/n,m=Math.min(u,g,3);o.style.width=`${r*m}px`,o.style.height=`${n*m}px`;let h=o.getContext("2d"),p=h.createImageData(r,n);for(let A=0;A<p.data.length;A+=4)p.data[A]=240,p.data[A+1]=240,p.data[A+2]=240,p.data[A+3]=255;let x=document.querySelector("#showCorrect"),f=document.querySelector("#showIncorrect"),w=document.querySelector("#showMissing"),C=x?x.checked:!0,P=f?f.checked:!0,y=w?w.checked:!0;d(`\u{1F39B}\uFE0F Estados de visualizaci\xF3n - Correctos: ${C}, Incorrectos: ${P}, Faltantes: ${y}`);for(let[A,L]of e.originalPixels||new Map){let[_,k]=A.split(",").map(Number),z=((k-t.y1)*r+(_-t.x1))*4;z>=0&&z<p.data.length-3&&(p.data[z]=L.r,p.data[z+1]=L.g,p.data[z+2]=L.b,p.data[z+3]=255)}let S=(A,L,_,k,z,K=255)=>{let V=((L-t.y1)*r+(A-t.x1))*4;V>=0&&V<p.data.length-3&&(p.data[V]=_,p.data[V+1]=k,p.data[V+2]=z,p.data[V+3]=K)};if(C)for(let[A,L]of e.correct){let[_,k]=A.split(",").map(Number);S(_,k,0,255,0,128)}if(P)for(let[A,L]of e.incorrect){let[_,k]=A.split(",").map(Number);S(_,k,255,0,0,200)}if(y)for(let[A,L]of e.missing){let[_,k]=A.split(",").map(Number);S(_,k,255,255,0,150)}h.putImageData(p,0,0)}function Vo(o,e,t){let r=o.querySelector("#zoomSlider"),n=o.querySelector("#zoomValue"),s=o.querySelector("#refreshAnalysis"),a=o.querySelector("#autoRefresh"),c=o.querySelector("#refreshInterval"),l=o.querySelector("#autoFitZoom"),u=o.querySelector("#repositionArea");r.addEventListener("input",y=>{let S=parseFloat(y.target.value);n.textContent=`${Math.round(S*100)}%`,e.style.transform=`scale(${S})`,e.style.transformOrigin="top left"}),l.addEventListener("click",()=>{let S=e.parentElement.getBoundingClientRect(),b=parseFloat(e.style.width)||e.width,E=parseFloat(e.style.height)||e.height,T=(S.width-20)/b,M=(S.height-20)/E,A=Math.min(T,M,3);r.value=A,n.textContent=`${Math.round(A*100)}%`,e.style.transform=`scale(${A})`,e.style.transformOrigin="top left",d(`\u{1F50D} ${v("guard.zoomAdjusted")} ${Math.round(A*100)}%`)}),a.addEventListener("change",()=>{if($e("autoRefresh",a.checked),a.checked){let y=parseInt(c.value)*1e3;j=window.setInterval(async()=>{await at(e,o)},y),d(`\u{1F504} ${v("guard.autoRefreshEnabled")} ${c.value} segundos`)}else j&&(window.clearInterval(j),j=null),d(`\u{1F504} ${v("guard.autoRefreshDisabled")}`)}),c.addEventListener("change",()=>{if(a.checked){j&&window.clearInterval(j);let y=parseInt(c.value)*1e3;j=window.setInterval(async()=>{await at(e,o)},y),d(`\u{1F504} ${v("guard.autoRefreshIntervalUpdated")} ${c.value} segundos`)}}),s.addEventListener("click",async()=>{await at(e,o)}),o.querySelector("#snapshotBtn").addEventListener("click",()=>{Tn(e,o)}),["showCorrect","showIncorrect","showMissing"].forEach(y=>{let S=o.querySelector(`#${y}`);S.addEventListener("change",()=>{$e(y,S.checked);let b=parseFloat(r.value);Ut(e,t),e.style.transform=`scale(${b})`,e.style.transformOrigin="top left",d(`\u{1F441}\uFE0F ${v("guard.visualizationUpdated")}: ${y} = ${S.checked}`)})});let h=e.parentElement;h.style.overflow="auto";let p=(y,S,b)=>Math.max(S,Math.min(b,y));h.addEventListener("wheel",y=>{y.preventDefault();let S=1.1,b=parseFloat(r.value),E=p(b*(y.deltaY<0?S:1/S),.5,5),T=h.getBoundingClientRect(),M=y.clientX-T.left,A=y.clientY-T.top,L=h.scrollLeft+M,_=h.scrollTop+A;r.value=E,n.textContent=`${Math.round(E*100)}%`,e.style.transform=`scale(${E})`,e.style.transformOrigin="top left";let k=E/b;h.scrollLeft=L*k-M,h.scrollTop=_*k-A},{passive:!1});let x=!1,f=0,w=0,C=0,P=0;if(h.addEventListener("mousedown",y=>{if(y.button!==0)return;x=!0,h.style.cursor="grabbing";let S=h.getBoundingClientRect();f=y.clientX-S.left,w=y.clientY-S.top,C=h.scrollLeft,P=h.scrollTop}),window.addEventListener("mousemove",y=>{if(!x)return;let S=h.getBoundingClientRect(),b=y.clientX-S.left,E=y.clientY-S.top,T=b-f,M=E-w;h.scrollLeft=C-T,h.scrollTop=P-M}),window.addEventListener("mouseup",()=>{x&&(x=!1,h.style.cursor="grab")}),setTimeout(()=>{l.click()},100),$e("autoRefresh",a.checked),a.checked){let y=parseInt(c.value)*1e3;j=window.setInterval(async()=>{await at(e,o)},y)}}function Xo(o){let e=o.querySelector("#coordsUpperLeft"),t=o.querySelector("#coordsLowerRight");if(i.protectionArea){let{x1:r,y1:n,x2:s,y2:a}=i.protectionArea;e.textContent=`(${r}, ${n})`,t.textContent=`(${s}, ${a})`}else e.textContent="--",t.textContent="--"}function Zo(o,e){let t=o.querySelector("#recordSession"),r=o.querySelector("#sessionControls"),n=o.querySelector("#downloadSession");t.addEventListener("change",()=>{$e("recordSession",t.checked),t.checked?(In(e),r.style.maxHeight="50px",r.style.opacity="1"):(Ho(),r.style.maxHeight="0",r.style.opacity="0")}),n.addEventListener("click",()=>{Jo()})}function In(o){it=!0,U=[],le=new Date;let e=document.querySelector("#autoRefresh");e&&!e.checked&&(e.checked=!0,$e("autoRefresh",!0),e.dispatchEvent(new Event("change"))),qt(o),console.log(`\u{1F4F9} ${v("guard.sessionRecordingStarted","Grabaci\xF3n de sesi\xF3n iniciada con autorefresh activado")}`)}function Ho(){it=!1,U.length>0&&Jo(),console.log(`\u23F9\uFE0F ${v("guard.sessionRecordingStopped","Grabaci\xF3n de sesi\xF3n detenida")}`)}function qt(o){var l,u,g,m;if(!it||!o)return;let e=new Date,t=((l=o.originalPixels)==null?void 0:l.size)||0,r=((u=o.correct)==null?void 0:u.size)||0,n=((g=o.incorrect)==null?void 0:g.size)||0,s=((m=o.missing)==null?void 0:m.size)||0,a=t>0?r/t*100:0,c={timestamp:e.toISOString(),timeFromStart:e-le,correct:r,incorrect:n,missing:s,total:t,precision:parseFloat(a.toFixed(1))};U.push(c)}function Jo(){var n,s,a,c;if(U.length===0){alert(v("guard.noSessionData","No hay datos de sesi\xF3n para descargar"));return}let o={sessionStart:le==null?void 0:le.toISOString(),sessionEnd:new Date().toISOString(),totalDuration:le?new Date-le:0,totalEntries:U.length,data:U,summary:{finalCorrect:((n=U[U.length-1])==null?void 0:n.correct)||0,finalIncorrect:((s=U[U.length-1])==null?void 0:s.incorrect)||0,finalMissing:((a=U[U.length-1])==null?void 0:a.missing)||0,finalPrecision:((c=U[U.length-1])==null?void 0:c.precision)||0}},e=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`session-data-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.json`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t),console.log(`\u{1F4BE} ${v("guard.sessionDataDownloaded","Datos de sesi\xF3n descargados")}`)}function Tn(o,e){try{let t=e.querySelector("#accuracy"),r=t?t.textContent.replace("%",""):"0",n=document.createElement("canvas"),s=n.getContext("2d");n.width=o.width,n.height=o.height,s.drawImage(o,0,0),n.toBlob(a=>{let c=document.createElement("a");c.href=URL.createObjectURL(a);let l=new Date().toISOString().slice(0,19).replace(/:/g,"-");c.download=`snapshot-${l}-precision-${r}%.png`,document.body.appendChild(c),c.click(),document.body.removeChild(c),d(`\u{1F4F8} Snapshot capturado: precisi\xF3n ${r}%`)},"image/png")}catch(t){d("\u274C Error al capturar snapshot:",t),alert(`\u274C ${v("guard.snapshotCaptureError","Error al capturar la imagen")}`)}}var ce,j,it,U,le,Qo=R(()=>{D();re();ot();ze();Fe();ce=null,j=null,it=!1,U=[],le=null});D();Ve();re();ot();re();D();function Kr(o,e,t){if(!o||!e||!t)return null;if(!window||!window.btoa)return console.warn("btoa no disponible, usando compresi\xF3n alternativa"),null;let r;if(o instanceof Uint8Array)r=o;else{let a=e*t,c=Math.ceil(a/8);r=new Uint8Array(c);let l=0;for(let u=0;u<t;u++){let g=o[u];for(let m=0;m<e;m++){let h=g&&g[m]?1:0,p=l>>3,x=l&7;h&&(r[p]|=1<<x),l++}}}let n="",s=32768;for(let a=0;a<r.length;a+=s)n+=String.fromCharCode.apply(null,r.subarray(a,Math.min(a+s,r.length)));return window.btoa(n)}function Qr(o,e,t){if(!o||!e||!t)return null;if(!window||!window.atob)return console.warn("atob no disponible, usando descompresi\xF3n alternativa"),null;let r=window.atob(o),n=new Uint8Array(r.length);for(let a=0;a<r.length;a++)n[a]=r.charCodeAt(a);let s=Math.ceil(e*t/8);return n.length!==s&&console.warn(`paintedMapPacked longitud inesperada: ${n.length} (esperado ${s})`),n}function en(o,e){if(!o||o.size===0)return null;let t=[],r=!!e,n=r?{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}:null;for(let[s,a]of o)r&&(a.globalX<n.x1||a.globalX>=n.x2||a.globalY<n.y1||a.globalY>=n.y2)||t.push({x:a.globalX,y:a.globalY,color:a.colorId});return t}function tn(o,e){if(!o||!e)return null;let t=e.x2-e.x1,r=e.y2-e.y1;if(t<=0||r<=0)return null;let n=t*r,s=new Uint8Array(Math.ceil(n/8));for(let[a,c]of o){let l=c.globalX-e.x1,u=c.globalY-e.y1;if(l>=0&&l<t&&u>=0&&u<r){let g=u*t+l,m=g>>3,h=g&7;s[m]|=1<<h}}return s}function on(o,e,t){if(!o||!e)return null;let r=e.x2-e.x1,n=e.y2-e.y1,s=r*n,a=o.size,l=a*50,g=a*12,m=t?t.length:0,h=g+m,p=l>0?(l-h)/l:0;return{totalAreaPixels:s,protectedPixels:a,legacyEstimatedSize:Math.round(l/1024/1024*100)/100,compressedEstimatedSize:Math.round(h/1024/1024*100)/100,compressionRatio:Math.round(p*100),spaceSaved:Math.round((l-h)/1024/1024*100)/100}}function rn(o,e){try{let t=JSON.stringify(o),r=new window.Blob([t],{type:"application/json"}),n=window.URL.createObjectURL(r),s=document.createElement("a");return s.href=n,s.download=e,s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(n),!0}catch(t){return d("\u274C Error en descarga con Blob:",t),!1}}function Po(o){let t=["protectionData","originalPixels"].filter(r=>!(r in o));if(t.length>0)throw new Error(`Campos requeridos faltantes: ${t.join(", ")}`);if(!o.protectionData.area)throw new Error("\xC1rea de protecci\xF3n no definida");if(!Array.isArray(o.originalPixels)||o.originalPixels.length===0)throw new Error("No hay p\xEDxeles para exportar");return!0}function nn(o=null,e=null,t="GUARD"){let r;if(o&&o.trim()!=="")r=o.trim().endsWith(".json")?o.trim():o.trim()+".json";else{let n=new Date().toISOString().slice(0,19).replace(/:/g,"-");r=`wplace_${t}_${n}.json`}return e&&e.total>1&&(r=`${r.replace(".json","")}_parte${e.current}de${e.total}.json`),r}function an(o){if(!o||typeof o!="string")return!1;let e=o.trim();return!(e.length===0||e===".json"||/[<>:"/\\|?*]/.test(e))}function sn(o,e){let{x1:t,y1:r,x2:n,y2:s}=o,a=n-t,c=s-r,l=[];if(e<=1)return[o];if(a>=c){let g=Math.floor(a/e);for(let m=0;m<e;m++){let h=t+m*g,p=m===e-1?n:h+g;l.push({x1:h,y1:r,x2:p,y2:s})}}else{let g=Math.floor(c/e);for(let m=0;m<e;m++){let h=r+m*g,p=m===e-1?s:h+g;l.push({x1:t,y1:h,x2:n,y2:p})}}return l}function ln(o,e){let t=[],{x1:r,y1:n,x2:s,y2:a}=o;for(let[c,l]of e.entries()){let[u,g]=c.split(",").map(Number);u>=r&&u<=s&&g>=n&&g<=a&&t.push({key:c,...l})}return t}function So(o=null,e=null){try{if(!i.protectionArea||!i.originalPixels.size)throw new Error("No hay progreso para guardar");if(o&&!an(o))throw new Error("Nombre de archivo inv\xE1lido");let t=e&&e>1?sn(i.protectionArea,e):[i.protectionArea],r=[];for(let n=0;n<t.length;n++){let s=t[n],a=ln(s,i.originalPixels),c=s.x2-s.x1,l=s.y2-s.y1,u=tn(i.originalPixels,s),g=en(i.originalPixels,s),m=Kr(u,c,l),h={version:"1.2",timestamp:Date.now(),protectionData:{area:{...s},protectedPixels:a.length,splitInfo:e>1?{total:e,current:n+1,originalArea:{...i.protectionArea}}:null,areaSize:{width:c,height:l,totalPixels:c*l},exportMethod:"enhanced_blob_download_compressed"},progress:{totalRepaired:i.totalRepaired,lastCheck:i.lastCheck,repairRate:i.totalRepaired>0?(i.totalRepaired/a.length*100).toFixed(2)+"%":"0%"},config:{maxProtectionSize:1e5,pixelsPerBatch:i.pixelsPerBatch,checkInterval:1e4},colors:i.availableColors.map(C=>({id:C.id,r:C.r,g:C.g,b:C.b})),originalPixels:g,paintedMapPacked:m,legacyPixels:a.length<1e4?a:null};Po(h);let p=e>1?{total:e,current:n+1}:null,x=nn(o,p,"GUARD");if(!rn(h,x))throw new Error(`Error descargando archivo: ${x}`);let w=on(i.originalPixels,s,m);r.push({success:!0,filename:x,compressionStats:w}),w?(d(`\u2705 Progreso guardado con compresi\xF3n optimizada: ${x}`),d(`\u{1F4CA} Compresi\xF3n: ${w.legacyEstimatedSize}MB \u2192 ${w.compressedEstimatedSize}MB (${w.compressionRatio}% reducci\xF3n, ${w.spaceSaved}MB ahorrados)`)):d(`\u2705 Progreso guardado con compresi\xF3n optimizada: ${x}`)}return{success:!0,filename:r.length===1?r[0].filename:`${r.length} archivos`,files:r,enhanced:!0,compressed:!0}}catch(t){return d("\u274C Error guardando progreso:",t),{success:!1,error:t.message}}}async function Eo(o){var e;try{let t=await o.text(),r=JSON.parse(t);d("\u{1F4C1} Archivo cargado correctamente");let s=["protectionData","originalPixels"].filter(p=>!(p in r));if(s.length>0)throw new Error(`Campos requeridos faltantes: ${s.join(", ")}`);Po(r);let a=r.version||"1.0",c=a==="1.1"||a==="1.2"||((e=r.protectionData)==null?void 0:e.exportMethod)==="enhanced_blob_download",l=a==="1.2";d(`\u{1F4CB} Versi\xF3n del archivo: ${a}${c?" (mejorado)":" (cl\xE1sico)"}${l?" (comprimido)":""}`);let u=Array.isArray(r.colors)?r.colors:[];if(i.availableColors.length>0&&u.length>0){let p=u.map(w=>w.id),x=i.availableColors.map(w=>w.id);p.filter(w=>x.includes(w)).length<p.length*.8&&d("\u26A0\uFE0F Los colores guardados no coinciden completamente con los actuales")}(!i.availableColors||i.availableColors.length===0)&&(i.availableColors=u.map(p=>({id:p.id,r:p.r,g:p.g,b:p.b})),d(`\u{1F3A8} Colores cargados desde archivo: ${i.availableColors.length}`));let g=new Map(i.availableColors.map(p=>[p.id,p])),m=Date.now();if(r.protectionData?(i.protectionArea=r.protectionData.area,i.isVirtualArea=r.protectionData.virtualArea||!1):r.protectionArea&&(i.protectionArea=r.protectionArea,i.isVirtualArea=!1),i.originalPixels=new Map,l&&r.originalPixels&&Array.isArray(r.originalPixels)){d("\u{1F4E6} Cargando datos comprimidos v1.2");for(let p of r.originalPixels){let x=`${p.x},${p.y}`,f=g.get(p.color),w=f?f.r:0,C=f?f.g:0,P=f?f.b:0,y=Math.floor(p.x/I.TILE_SIZE),S=Math.floor(p.y/I.TILE_SIZE),b=p.x-y*I.TILE_SIZE,E=p.y-S*I.TILE_SIZE,T=(b%1e3+1e3)%1e3,M=(E%1e3+1e3)%1e3;i.originalPixels.set(x,{globalX:p.x,globalY:p.y,tileX:y,tileY:S,localX:T,localY:M,colorId:p.color,r:w,g:C,b:P,timestamp:p.timestamp||m})}if(r.paintedMapPacked&&r.protectionData.areaSize){let{width:p,height:x}=r.protectionData.areaSize,f=Qr(r.paintedMapPacked,p,x);f&&d(`\u2705 Mapa pintado descomprimido (${f.length} bytes)`)}}else if(r.originalPixels&&Array.isArray(r.originalPixels)){d("\u{1F4E6} Cargando datos legacy v1.1/v1.0");for(let p of r.originalPixels)if(p.key){let{key:x,...f}=p,[w,C]=x.split(",").map(Number),P=Number.isFinite(f.globalX)?f.globalX:Number.isFinite(f.x)?f.x:w,y=Number.isFinite(f.globalY)?f.globalY:Number.isFinite(f.y)?f.y:C,S=Number.isFinite(f.colorId)?f.colorId:Number.isFinite(f.color)?f.color:0,b=g.get(S),E=b?b.r:Number.isFinite(f.r)?f.r:0,T=b?b.g:Number.isFinite(f.g)?f.g:0,M=b?b.b:Number.isFinite(f.b)?f.b:0,A=Math.floor(P/I.TILE_SIZE),L=Math.floor(y/I.TILE_SIZE),_=P-A*I.TILE_SIZE,k=y-L*I.TILE_SIZE,z=(_%1e3+1e3)%1e3,K=(k%1e3+1e3)%1e3;i.originalPixels.set(x,{globalX:P,globalY:y,tileX:A,tileY:L,localX:z,localY:K,colorId:S,r:E,g:T,b:M,timestamp:f.timestamp||m})}else{let x=`${p.x},${p.y}`,f=p.x,w=p.y,C=Number.isFinite(p.colorId)?p.colorId:Number.isFinite(p.color)?p.color:0,P=g.get(C),y=P?P.r:Number.isFinite(p.r)?p.r:0,S=P?P.g:Number.isFinite(p.g)?p.g:0,b=P?P.b:Number.isFinite(p.b)?p.b:0,E=Math.floor(f/I.TILE_SIZE),T=Math.floor(w/I.TILE_SIZE),M=f-E*I.TILE_SIZE,A=w-T*I.TILE_SIZE,L=(M%1e3+1e3)%1e3,_=(A%1e3+1e3)%1e3;i.originalPixels.set(x,{globalX:f,globalY:w,tileX:E,tileY:T,localX:L,localY:_,colorId:C,r:y,g:S,b,timestamp:p.timestamp||m})}}else if(r.legacyPixels&&Array.isArray(r.legacyPixels)){d("\u{1F4E6} Usando datos de fallback legacy");for(let p of r.legacyPixels){let{key:x,...f}=p,[w,C]=x.split(",").map(Number),P=Number.isFinite(f.globalX)?f.globalX:Number.isFinite(f.x)?f.x:w,y=Number.isFinite(f.globalY)?f.globalY:Number.isFinite(f.y)?f.y:C,S=Number.isFinite(f.colorId)?f.colorId:Number.isFinite(f.color)?f.color:0,b=g.get(S),E=b?b.r:Number.isFinite(f.r)?f.r:0,T=b?b.g:Number.isFinite(f.g)?f.g:0,M=b?b.b:Number.isFinite(f.b)?f.b:0,A=Math.floor(P/I.TILE_SIZE),L=Math.floor(y/I.TILE_SIZE),_=P-A*I.TILE_SIZE,k=y-L*I.TILE_SIZE,z=(_%1e3+1e3)%1e3,K=(k%1e3+1e3)%1e3;i.originalPixels.set(x,{globalX:P,globalY:y,tileX:A,tileY:L,localX:z,localY:K,colorId:S,r:E,g:T,b:M,timestamp:f.timestamp||m})}}else throw new Error("No se encontraron datos de p\xEDxeles v\xE1lidos");if(r.progress?(i.totalRepaired=r.progress.totalRepaired||0,i.lastCheck=r.progress.lastCheck||0):r.statistics&&(i.totalRepaired=r.statistics.totalRepaired||0,i.lastCheck=r.statistics.lastCheck||0),i.changes.clear(),i.ui&&(i.ui.updateCoordinates({x1:i.protectionArea.x1,y1:i.protectionArea.y1,x2:i.protectionArea.x2,y2:i.protectionArea.y2}),i.ui.updateProgress(i.originalPixels.size,0),i.ui.updateStats({repaired:i.totalRepaired}),i.ui.enableStartBtn()),d(`\u2705 Progreso cargado: ${i.originalPixels.size} p\xEDxeles protegidos`),window.wplaceSlave&&window.wplaceSlave.isFavorite)try{let p={protectedArea:{x:i.protectionArea.x1,y:i.protectionArea.y1,width:i.protectionArea.x2-i.protectionArea.x1,height:i.protectionArea.y2-i.protectionArea.y1},totalPixels:i.originalPixels.size,changes:Array.from(i.changes.values()),lastCheck:i.lastCheck,isVirtualArea:i.isVirtualArea||!1};window.wplaceSlave.sendToMaster({type:"preview_data",data:p}),d("\u{1F4E1} Datos de preview enviados al servidor")}catch(p){d("\u274C Error enviando datos de preview:",p)}let h=i.originalPixels.size;return{success:!0,data:r,protectedPixels:h,area:i.protectionArea,version:a,enhanced:c,compressed:l}}catch(t){return d("\u274C Error cargando progreso:",t),{success:!1,error:t.message}}}function Se(){return i.protectionArea&&i.originalPixels.size>0}re();D();ze();Fe();function Ie(o,e,t=!1){return`
<div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; padding: 8px 0;">
<span style="color: #eee; font-size: 14px; flex: 1;">${e}</span>
<label class="toggle-switch" style="position: relative; display: inline-block; width: 50px; height: 26px; margin-left: 10px;">
<input type="checkbox" id="${o}" ${t?"checked":""} style="opacity: 0; width: 0; height: 0;">
<span class="toggle-slider" style="
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: ${t?"#22c55e":"#ef4444"};
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 13px;
border: 1px solid ${t?"#16a34a":"#dc2626"};
"></span>
<span class="toggle-knob" style="
position: absolute;
height: 20px;
width: 20px;
left: ${t?"27px":"3px"};
top: 3px;
background-color: white;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
border-radius: 50%;
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
"></span>
</label>
</div>
`}function Y(o,e){let t=document.getElementById(o);if(!t)return;let r=t.parentElement.querySelector(".toggle-slider"),n=t.parentElement.querySelector(".toggle-knob");r&&n&&(r.style.backgroundColor=e?"#22c55e":"#ef4444",r.style.borderColor=e?"#16a34a":"#dc2626",n.style.left=e?"27px":"3px")}function Te(o,e){let t=document.getElementById(o);t&&(e?(t.style.maxHeight="200px",t.style.opacity="1"):(t.style.maxHeight="0",t.style.opacity="0"))}function qo(){return Go()}function Go(){let o=document.getElementById("guardConfigWindow");if(o){o.style.display="flex",o.style.opacity="1";let l=o.querySelector("div");l&&(l.style.opacity="1",l.style.transform="scale(1) translateY(0)");return}let e=document.createElement("div");e.id="guardConfigWindow",e.style.cssText="position:fixed;inset:0;width:100%;height:100%;background:transparent;z-index:10002;display:flex;align-items:flex-start;justify-content:flex-start;pointer-events:none;opacity:0;transition:opacity 0.3s ease;";let t=document.createElement("div");t.style.cssText="background:#1a1a1a;border:2px solid #333;border-radius:12px;width:460px;max-width:90vw;max-height:80vh;color:#eee;font-family:Segoe UI,Roboto,sans-serif;box-shadow:0 10px 30px rgba(0,0,0,0.5);display:flex;flex-direction:column;overflow:auto;position:relative;resize:both;pointer-events:auto;opacity:0;transform:scale(0.95) translateY(-20px);transition:opacity 0.3s ease, transform 0.3s ease;";let r=document.createElement("div");r.style.cssText="background:#2d3748;padding:12px 16px;border-bottom:1px solid #4a5568;display:flex;align-items:center;justify-content:space-between;cursor:move;user-select:none;",r.innerHTML=`<h2 style="margin:0;font-size:16px;color:#e2e8f0;">\u2699\uFE0F ${v("guard.configTitle")}</h2>`;let n=document.createElement("button");n.textContent="\u2715",n.style.cssText="background:none;border:none;color:#cbd5e0;font-size:18px;cursor:pointer;padding:0;width:24px;height:24px;",r.appendChild(n);let s=document.createElement("div");s.style.cssText="padding:16px;overflow:auto;flex:1;",s.innerHTML=`
<div id="configGrid" style="display:grid;grid-template-columns:1fr;gap:16px;transition:grid-template-columns 0.3s ease;">
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;"> Modo de Operaci\xF3n</h3>
<select id="operationModeSelect" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;font-family:'Segoe UI Emoji',Arial,sans-serif;">
<option value="protect">\u{1F6E1}\uFE0F Proteger - Reparar p\xEDxeles cambiados</option>
<option value="erase">\u{1F5D1}\uFE0F Borrar - Convertir p\xEDxeles a transparente</option>
</select>
</div>
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;"\u{1F6E1}\uFE0F Patrones de Protecci\xF3n</h3>
<select id="protectionPatternSelect" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;font-family:'Segoe UI Emoji',Arial,sans-serif;">
<option value="random">\u{1F3B2} Aleatorio</option>
<option value="lineUp">\u2B06\uFE0F Lineal (Arriba)</option>
<option value="lineDown">\u2B07\uFE0F Lineal (Abajo)</option>
<option value="lineLeft">\u2B05\uFE0F Lineal (Izquierda)</option>
<option value="lineRight">\u27A1\uFE0F Lineal (Derecha)</option>
<option value="center">\u{1F3AF} Centro</option>
<option value="borders">\u{1F7E7} Bordes</option>
<option value="spiral">\u{1F300} Espiral</option>
<option value="zigzag">\u3030\uFE0F Zigzag (Escritura)</option>
<option value="diagonal">\u{1F4D0} Diagonal (Lectura)</option>
<option value="cluster">\u{1F517} Clusters (Agrupado)</option>
<option value="wave">\u{1F30A} Ondas (Natural)</option>
<option value="corners">\u{1F4CD} Esquinas (Referencia)</option>
<option value="sweep">\u{1F9F9} Barrido (Sistem\xE1tico)</option>
<option value="priority">\u2B50 Prioridad (Inteligente)</option>
<option value="proximity">\u{1F91D} Proximidad (Cercano)</option>
<option value="quadrant">\u2B1C Cuadrantes (Rotativo)</option>
<option value="scattered">\u{1F4AB} Disperso (Espaciado)</option>
<option value="snake">\u{1F40D} Serpiente (Zigzag Filas)</option>
<option value="diagonalSweep">\u2197\uFE0F Barrido Diagonal</option>
<option value="spiralClockwise">\u{1F504} Espiral Horaria</option>
<option value="spiralCounterClockwise">\u{1F503} Espiral Antihoraria</option>
<option value="biasedRandom">\u{1F3B2} Aleatorio Sesgado</option>
<option value="anchorPoints">\u2693 Puntos de Anclaje</option>
</select>
</div>
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;">\u{1F3A8} ${v("guard.preferSpecificColor")}</h3>
${Ie("preferColorCheckbox",v("guard.preferSpecificColor"),!1)}
<div id="colorSelectorContainer" style="max-height:0;overflow:hidden;margin-top:8px;transition:max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);opacity:0;">
<div id="colorSelector" style="display:flex;flex-wrap:wrap;gap:8px;padding-top:8px;"></div>
<button id="clearPreferredColors" style="display:none;margin-top:8px;padding:4px 12px;font-size:12px;background:#ef4444;color:white;border:none;border-radius:4px;cursor:pointer;">Clear</button>
</div>
</div>
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;">\u{1F6AB} Excluir Color</h3>
${Ie("excludeColorCheckbox",v("guard.excludeSpecificColors"),!1)}
<div id="excludeColorSelectorContainer" style="max-height:0;overflow:hidden;margin-top:8px;transition:max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);opacity:0;">
<div id="excludeColorSelector" style="display:flex;flex-wrap:wrap;gap:8px;padding-top:8px;"></div>
<button id="clearExcludedColors" style="display:none;margin-top:8px;padding:4px 12px;font-size:12px;background:#ef4444;color:white;border:none;border-radius:4px;cursor:pointer;">Clear</button>
</div>
</div>
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;">\u26A1 ${v("guard.loadManagement")}</h3>
<label style="display:block;margin-bottom:6px;color:#e5e7eb;">${v("guard.minLoadsToWait")}:</label>
<input type="number" id="minChargesToWaitInput" min="1" max="10" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;">
<label style="display:block;margin:10px 0 6px;color:#e5e7eb;">${v("guard.pixelsPerBatch")}:</label>
<input type="number" id="pixelsPerBatchInput" min="1" max="20" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;">
<div style="margin-top:10px;">
${Ie("spendAllPixelsCheckbox",v("guard.spendAllPixelsOnStart"),!1)}
</div>
</div>
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;">\u23F0 ${v("guard.waitTimes")}</h3>
<div style="margin-bottom:8px;">
${Ie("randomWaitCheckbox",v("guard.useRandomTimes"),!1)}
</div>
<div id="randomWaitContainer" style="display:none;">
<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;">
<div>
<label style="display:block;margin-bottom:4px;color:#e5e7eb;">${v("guard.minTime")}:</label>
<input type="number" id="randomWaitMinInput" min="0.5" max="10" step="0.1" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;">
</div>
<div>
<label style="display:block;margin-bottom:4px;color:#e5e7eb;">${v("guard.maxTime")}:</label>
<input type="number" id="randomWaitMaxInput" min="1" max="30" step="0.1" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;">
</div>
</div>
</div>
</div>
<div style="background:#2d3748;padding:12px;border-radius:8px;border:1px solid #4a5568;">
<h3 style="margin:0 0 8px 0;font-size:14px;color:#e2e8f0;">\u{1FAE5} Protecci\xF3n de Transparencias</h3>
<div style="margin-bottom:12px;">
${Ie("protectTransparentPixelsCheckbox","Proteger p\xEDxeles transparentes",!0)}
</div>
<div style="margin-bottom:8px;">
${Ie("protectPerimeterCheckbox","Proteger per\xEDmetro",!1)}
</div>
<div id="perimeterContainer" style="max-height:0;overflow:hidden;transition:max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);opacity:0;">
<label style="display:block;margin-bottom:6px;color:#e5e7eb;font-size:13px;">Ancho del per\xEDmetro (p\xEDxeles):</label>
<input type="number" id="perimeterWidthInput" min="1" max="10" style="width:100%;padding:8px;background:#374151;border:1px solid #6b7280;color:#e5e7eb;border-radius:6px;">
<small style="color:#9ca3af;font-size:12px;display:block;margin-top:4px;">
Crea una zona buffer transparente alrededor del \xE1rea protegida
</small>
</div>
</div>
</div>`;let a=document.createElement("div");a.style.cssText="background:#2d3748;padding:12px 16px;border-top:1px solid #4a5568;display:flex;justify-content:flex-end;gap:10px;";let c=document.createElement("button");c.id="guardResetBtn",c.textContent="\u{1F504}",c.style.cssText="padding:8px 16px;border:none;border-radius:6px;background:#6b7280;color:white;font-weight:600;cursor:pointer;",a.appendChild(c),t.appendChild(r),t.appendChild(s),t.appendChild(a),e.appendChild(t),document.body.appendChild(e),setTimeout(()=>{e.style.opacity="1",t.style.opacity="1",t.style.transform="scale(1) translateY(0)"},10),wn(t,r),bn(t),Z(e),n.addEventListener("click",()=>{e.style.transition="opacity 0.3s ease",t.style.transition="opacity 0.3s ease, transform 0.3s ease",e.style.opacity="0",t.style.opacity="0",t.style.transform="scale(0.95) translateY(-20px)",setTimeout(()=>{H(e),e.style.display="none",e.style.transition="",t.style.transition=""},300)}),Cn(e),Yo(e),d("\u{1F527} Ventana de configuraci\xF3n abierta")}function wn(o,e){let t=!1,r=0,n=0,s=0,a=0;e.addEventListener("mousedown",c=>{t=!0,r=c.clientX,n=c.clientY;let l=o.getBoundingClientRect();s=l.left,a=l.top,o.style.position="fixed",o.style.left=s+"px",o.style.top=a+"px";let u=m=>{t&&(o.style.left=s+m.clientX-r+"px",o.style.top=a+m.clientY-n+"px")},g=()=>{t=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",g)})}function bn(o){let e=o.querySelector("#configGrid");if(!e)return;let t=0,r=()=>{let c=o.offsetWidth;Math.abs(c-t)<10||(t=c,c>=900?e.style.gridTemplateColumns="repeat(3, 1fr)":c>=650?e.style.gridTemplateColumns="repeat(2, 1fr)":e.style.gridTemplateColumns="1fr")},n=window.setInterval(r,200),s=()=>window.setTimeout(r,50);window.addEventListener("resize",s),r();let a=o.remove;o.remove=function(){window.clearInterval(n),window.removeEventListener("resize",s),a.call(this)}}function Cn(o){let e=o.querySelector("#operationModeSelect");e&&e.addEventListener("change",()=>{let P=e.value;i.operationMode=P,i.ui&&i.ui.elements&&(P==="erase"?i.ui.elements.startBtn.innerHTML=`\u{1F5D1}\uFE0F ${v("guard.startErase","Iniciar Borrado")}`:i.ui.elements.startBtn.innerHTML="\u25B6\uFE0F Iniciar Protecci\xF3n"),d(`\u{1F527} Modo de operaci\xF3n cambiado a: ${P}`),F()});let t=o.querySelector("#protectionPatternSelect");t&&t.addEventListener("change",()=>{i.protectionPattern=t.value,F()});let r=o.querySelector("#preferColorCheckbox"),n=o.querySelector("#clearPreferredColors");r&&r.addEventListener("change",P=>{let y=P.target.checked;Y("preferColorCheckbox",y),Te("colorSelectorContainer",y),i.preferColor=!!y,y&&Nt(o),F()}),n&&n.addEventListener("click",()=>{i.preferredColorIds=[],i.preferredColorId=null,Nt(o),F()});let s=o.querySelector("#excludeColorCheckbox"),a=o.querySelector("#clearExcludedColors");s&&s.addEventListener("change",P=>{let y=P.target.checked;Y("excludeColorCheckbox",y),Te("excludeColorSelectorContainer",y),i.excludeColor=!!y,y&&Wt(o),F()}),a&&a.addEventListener("click",()=>{i.excludedColorIds=[],Wt(o),F()});let c=o.querySelector("#randomWaitCheckbox"),l=o.querySelector("#randomWaitContainer");c&&c.addEventListener("change",P=>{let y=P.target.checked;Y("randomWaitCheckbox",y),l&&(l.style.display=y?"block":"none"),i.randomWaitTime=!!y,F()});let u=o.querySelector("#randomWaitMinInput"),g=o.querySelector("#randomWaitMaxInput");u&&u.addEventListener("change",()=>{let P=parseFloat(u.value),y=g?parseFloat(g.value):0;P>=y&&g&&(g.value=(P+.5).toString()),i.randomWaitMin=parseFloat(u.value),F()}),g&&g.addEventListener("change",()=>{let P=u?parseFloat(u.value):0,y=parseFloat(g.value);y<=P&&u&&(u.value=(y-.5).toString()),i.randomWaitMax=parseFloat(g.value),F()});let m=o.querySelector("#minChargesToWaitInput"),h=o.querySelector("#pixelsPerBatchInput"),p=o.querySelector("#spendAllPixelsCheckbox");m&&m.addEventListener("change",()=>{i.minChargesToWait=parseInt(m.value),F()}),h&&h.addEventListener("change",()=>{i.pixelsPerBatch=parseInt(h.value),F()}),p&&p.addEventListener("change",P=>{let y=P.target.checked;Y("spendAllPixelsCheckbox",y),i.spendAllPixelsOnStart=!!y,F()});let x=o.querySelector("#protectTransparentPixelsCheckbox"),f=o.querySelector("#protectPerimeterCheckbox"),w=o.querySelector("#perimeterWidthInput");x&&x.addEventListener("change",P=>{let y=P.target.checked;Y("protectTransparentPixelsCheckbox",y),i.protectTransparentPixels=!!y,F()}),f&&f.addEventListener("change",P=>{let y=P.target.checked;Y("protectPerimeterCheckbox",y),Te("perimeterContainer",y),i.protectPerimeter=!!y,F()}),w&&w.addEventListener("change",()=>{let P=parseInt(w.value);P>=1&&P<=10&&(i.perimeterWidth=P,F())});let C=o.querySelector("#guardResetBtn");C&&C.addEventListener("click",()=>vn(o)),document.addEventListener("keydown",P=>{P.key==="Escape"&&o.style.display!=="none"&&(o.style.display="none")})}function Nt(o){let e=o.querySelector("#colorSelector");if(!e||!i.availableColors)return;Array.isArray(i.preferredColorIds)||(i.preferredColorIds=[],typeof i.preferredColorId=="number"&&(i.preferredColorIds=[i.preferredColorId])),d(`\u{1F50D} Cargando selector de colores preferidos. Colores preferidos actuales: [${i.preferredColorIds.join(", ")}]`),e.innerHTML="",i.availableColors.forEach(n=>{let s=document.createElement("div");s.style.cssText=`width:28px;height:28px;border-radius:6px;cursor:pointer;border:2px solid transparent;background-color: rgb(${n.r},${n.g},${n.b});position:relative;`,s.title=`Color ${n.id}: RGB(${n.r}, ${n.g}, ${n.b})`,s.dataset.colorId=n.id;let a=document.createElement("div");a.style.cssText=`
position: absolute;
top: -2px;
right: -2px;
width: 16px;
height: 16px;
background: #10b981;
border-radius: 50%;
display: none;
align-items: center;
justify-content: center;
color: white;
font-size: 10px;
font-weight: bold;
border: 2px solid white;
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
`,a.innerHTML="\u2713",s.appendChild(a),s.addEventListener("click",()=>{let c=Array.isArray(i.preferredColorIds)?i.preferredColorIds:[],l=c.indexOf(n.id);l>=0?(c.splice(l,1),s.style.borderColor="transparent",a.style.display="none"):(c.push(n.id),s.style.borderColor="#10b981",a.style.display="flex"),i.preferredColorIds=c,i.preferredColorId=c.length>0?c[0]:null;let u=o.querySelector("#clearPreferredColors");u.style.display=c.length>0?"block":"none",d(`\u{1F3A8} Colores preferidos: [${c.join(", ")}]`),F()}),Array.isArray(i.preferredColorIds)&&i.preferredColorIds.includes(n.id)&&(s.style.borderColor="#10b981",a.style.display="flex"),e.appendChild(s)});let t=o.querySelector("#clearPreferredColors"),r=Array.isArray(i.preferredColorIds)&&i.preferredColorIds.length>0;t.style.display=r?"block":"none"}function Wt(o){let e=o.querySelector("#excludeColorSelector");if(!e||!i.availableColors)return;Array.isArray(i.excludedColorIds)||(i.excludedColorIds=[]),d(`\u{1F50D} Cargando selector de colores excluidos. Colores excluidos actuales: [${i.excludedColorIds.join(", ")}]`),e.innerHTML="",i.availableColors.forEach(n=>{let s=document.createElement("div");s.style.cssText=`width:28px;height:28px;border-radius:6px;cursor:pointer;border:2px solid transparent;background-color: rgb(${n.r},${n.g},${n.b});position:relative;`,s.title=`Color ${n.id}: RGB(${n.r}, ${n.g}, ${n.b})`,s.dataset.colorId=n.id;let a=document.createElement("div");a.style.cssText=`
position: absolute;
top: -2px;
right: -2px;
width: 16px;
height: 16px;
background: #ef4444;
border-radius: 50%;
display: none;
align-items: center;
justify-content: center;
color: white;
font-size: 10px;
font-weight: bold;
border: 2px solid white;
box-shadow: 0 2px 4px rgba(0,0,0,0.3);
`,a.innerHTML="\u2715",s.appendChild(a),s.addEventListener("click",()=>{let c=Array.isArray(i.excludedColorIds)?i.excludedColorIds:[],l=c.indexOf(n.id);l>=0?(c.splice(l,1),s.style.borderColor="transparent",a.style.display="none"):(c.push(n.id),s.style.borderColor="#ef4444",a.style.display="flex"),i.excludedColorIds=c;let u=o.querySelector("#clearExcludedColors");u.style.display=c.length>0?"block":"none",d(`\u{1F6AB} Colores excluidos: [${c.join(", ")}]`),F()}),Array.isArray(i.excludedColorIds)&&i.excludedColorIds.includes(n.id)&&(s.style.borderColor="#ef4444",a.style.display="flex"),e.appendChild(s)});let t=o.querySelector("#clearExcludedColors"),r=Array.isArray(i.excludedColorIds)&&i.excludedColorIds.length>0;t.style.display=r?"block":"none"}function Yo(o){o.querySelector("#operationModeSelect").value=i.operationMode||"protect",o.querySelector("#protectionPatternSelect").value=i.protectionPattern;let e=o.querySelector("#preferColorCheckbox");e.checked=i.preferColor,Y("preferColorCheckbox",i.preferColor),Te("colorSelectorContainer",i.preferColor),i.preferColor&&Nt(o);let t=o.querySelector("#excludeColorCheckbox");t.checked=i.excludeColor,Y("excludeColorCheckbox",i.excludeColor),Te("excludeColorSelectorContainer",i.excludeColor),i.excludeColor&&Wt(o);let r=o.querySelector("#clearPreferredColors"),n=o.querySelector("#clearExcludedColors"),s=Array.isArray(i.preferredColorIds)&&i.preferredColorIds.length>0,a=Array.isArray(i.excludedColorIds)&&i.excludedColorIds.length>0;r.style.display=s?"block":"none",n.style.display=a?"block":"none";let c=o.querySelector("#spendAllPixelsCheckbox");c.checked=i.spendAllPixelsOnStart,Y("spendAllPixelsCheckbox",i.spendAllPixelsOnStart),o.querySelector("#minChargesToWaitInput").value=i.minChargesToWait,o.querySelector("#pixelsPerBatchInput").value=i.pixelsPerBatch;let l=o.querySelector("#randomWaitCheckbox"),u=o.querySelector("#randomWaitContainer"),g=o.querySelector("#randomWaitMinInput"),m=o.querySelector("#randomWaitMaxInput");l.checked=i.randomWaitTime,Y("randomWaitCheckbox",i.randomWaitTime),u.style.display=i.randomWaitTime?"block":"none",g.value=i.randomWaitMin,m.value=i.randomWaitMax;let h=o.querySelector("#protectTransparentPixelsCheckbox"),p=o.querySelector("#protectPerimeterCheckbox"),x=o.querySelector("#perimeterWidthInput");h&&(h.checked=i.protectTransparentPixels,Y("protectTransparentPixelsCheckbox",i.protectTransparentPixels)),p&&(p.checked=i.protectPerimeter,Y("protectPerimeterCheckbox",i.protectPerimeter),Te("perimeterContainer",i.protectPerimeter)),x&&(x.value=i.perimeterWidth)}function F(){try{let o={operationMode:i.operationMode,protectionPattern:i.protectionPattern,preferColor:i.preferColor,preferredColorId:i.preferredColorId,preferredColorIds:Array.isArray(i.preferredColorIds)?i.preferredColorIds:[],excludeColor:i.excludeColor,excludedColorIds:Array.isArray(i.excludedColorIds)?i.excludedColorIds:[],spendAllPixelsOnStart:i.spendAllPixelsOnStart,minChargesToWait:i.minChargesToWait,pixelsPerBatch:i.pixelsPerBatch,randomWaitTime:i.randomWaitTime,randomWaitMin:i.randomWaitMin,randomWaitMax:i.randomWaitMax,protectTransparentPixels:i.protectTransparentPixels,protectPerimeter:i.protectPerimeter,perimeterWidth:i.perimeterWidth};localStorage.setItem("wplace-guard-config",JSON.stringify(o)),d("\u{1F4BE} Configuraci\xF3n actualizada")}catch(o){d("\u274C Error guardando configuraci\xF3n:",o)}}function vn(o){window.confirm("\xBFRestablecer configuraci\xF3n por defecto?")&&(i.operationMode="protect",i.protectionPattern="random",i.preferColor=!1,i.preferredColorIds=[],i.preferredColorId=5,i.excludeColor=!1,i.excludedColorIds=[],i.spendAllPixelsOnStart=!1,i.minChargesToWait=20,i.pixelsPerBatch=10,i.randomWaitTime=!1,i.randomWaitMin=1,i.randomWaitMax=5,i.protectTransparentPixels=!0,i.protectPerimeter=!1,i.perimeterWidth=1,Yo(o),F(),d("\u{1F504} Configuraci\xF3n restablecida"))}ze();Fe();function er(o){let e=document.createElement("div");e.style.cssText=`
position: fixed;
top: 20px;
right: 70px;
width: 350px;
min-width: 280px;
max-width: 500px;
min-height: 200px;
max-height: 80vh;
background: #1a1a1a;
border: 1px solid #333;
border-radius: 8px;
color: #eee;
font-family: 'Segoe UI', Roboto, sans-serif;
z-index: 9999;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
resize: both;
overflow: auto;
display: flex;
flex-direction: column;
`,e.classList.add("guard-container");let t=document.createElement("style");t.textContent=`
.guard-container.minimized { min-height: 0 !important; height: auto !important; }
.guard-content { max-height: 1000px; transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease; }
.guard-content.collapsed { max-height: 0; opacity: 0; overflow: hidden; padding: 0; flex: 0 0 auto !important; }
`,e.innerHTML=`
<div style="padding: 12px 15px; background: #2d3748; color: #60a5fa; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; cursor: move; flex-shrink: 0;" class="guard-header">
<div style="display: flex; align-items: center; gap: 8px;">
\u{1F6E1}\uFE0F <span>${o.title}</span>
</div>
<button id="minimizeBtn" style="background: none; border: none; color: #eee; cursor: pointer; opacity: 0.7; padding: 5px; transition: opacity 0.2s ease;">\u2796</button>
</div>
<div class="guard-content" style="padding: 15px; flex: 1; overflow-y: auto;">
<!-- Estado de inicializaci\xF3n -->
<div id="initSection">
<button id="initBtn" style="width: 100%; padding: 10px; background: #60a5fa; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; margin-bottom: 10px;">
\u{1F916} ${o.initBot}
</button>
</div>
<!-- Selecci\xF3n de \xE1rea -->
<div id="areaSection" style="display: none;">
<!-- Botones de \xE1rea - en dos columnas con transici\xF3n -->
<div id="areaActionsRow" style="display: flex; gap: 10px; margin-bottom: 15px; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease; max-height: 200px; opacity: 1;">
<button id="selectAreaBtn" style="flex: 1; padding: 10px; background: #8b5cf6; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;">
\u{1F3AF} ${o.selectArea}
</button>
<button id="loadAreaBtn" style="flex: 1; padding: 10px; background: #f59e0b; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;">
\u{1F4C1} ${v("guard.loadFile","Cargar Archivo")}
</button>
</div>
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
<button id="startBtn" style="flex: 1; padding: 10px; background: #10b981; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; opacity: 0.5;" disabled>
\u25B6\uFE0F ${o.startProtection}
</button>
<button id="stopBtn" style="flex: 1; padding: 10px; background: #ef4444; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; opacity: 0.5;" disabled>
\u23F9\uFE0F ${o.stopProtection}
</button>
</div>
<!-- Fila 2: Reposicionar / Guardar -->
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
<button id="repositionBtn" style="flex: 1; padding: 8px; background: #8b5cf6; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.3s ease; opacity: 0.5;" disabled>
\u{1F4CD} ${v("guard.reposition","Reposicionar")}
</button>
<button id="saveBtn" style="flex: 1; padding: 8px; background: #10b981; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.3s ease; opacity: 0.5;" disabled>
\u{1F4BE} ${o.save||"Guardar"}
</button>
</div>
<!-- Fila 3: Analizar \xC1rea / Logs -->
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
<button id="analyzeBtn" style="flex: 1; padding: 8px; background: #3b82f6; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; opacity: 0.5;" disabled>
<svg width="14" height="14" viewBox="0 0 24 24" aria-hidden="true" focusable="false" style="margin-right: 6px; flex-shrink: 0;" fill="none">
<circle cx="11" cy="11" r="7" stroke="currentColor" stroke-width="2"></circle>
<line x1="16.65" y1="16.65" x2="21" y2="21" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>
</svg>
${v("guard.analyzeArea","Analizar \xC1rea")}
</button>
<button id="logWindowBtn" style="flex: 1; padding: 8px; background: #6b7280; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center;">
<svg width="14" height="14" viewBox="0 0 24 24" aria-hidden="true" focusable="false" style="margin-right: 6px; flex-shrink: 0;" fill="none">
<rect x="4" y="3" width="16" height="18" rx="2" ry="2" stroke="currentColor" stroke-width="2"></rect>
<line x1="8" y1="7" x2="16" y2="7" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>
<line x1="8" y1="11" x2="16" y2="11" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>
<line x1="8" y1="15" x2="13" y2="15" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>
</svg>
${v("guard.logs",o.logWindow||"Logs")}
</button>
</div>
<!-- Fila 4: Vig\xEDa / Configuraci\xF3n -->
<div style="display: flex; gap: 10px; margin-bottom: 15px;">
<button id="watchBtn" style="flex: 1; padding: 8px; background: #f59e0b; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px; transition: all 0.3s ease; opacity: 0.5;" disabled>
\u{1F441}\uFE0F ${v("guard.watcher","Vig\xEDa")}
</button>
<button id="configBtn" style="flex: 1; padding: 8px; background: #8b5cf6; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 13px;">
\u2699\uFE0F ${v("guard.configuration","Configuraci\xF3n")}
</button>
</div>
</div>
<!-- Estad\xEDsticas -->
<div id="statsSection" style="background: #2d3748; padding: 10px; border-radius: 6px; margin-top: 10px;">
<div style="font-size: 13px; margin-bottom: 5px;">
<span>\u{1F4CA} ${o.protectedPixels}: </span><span id="protectedCount">0</span>
</div>
<div style="font-size: 13px; margin-bottom: 5px;">
<span>\u{1F6A8} ${o.detectedChanges}: </span><span id="changesCount">0</span>
</div>
<div style="font-size: 13px; margin-bottom: 5px;">
<span>\u26A1 ${o.charges}: </span><span id="chargesCount">0</span>
</div>
<div style="font-size: 13px; margin-bottom: 5px;">
<span>\u{1F6E0}\uFE0F ${o.repairedPixels}: </span><span id="repairedCount">0</span>
</div>
<div id="countdownSection" style="font-size: 13px; margin-bottom: 5px; display: none;">
<span>\u23F0 ${v("guard.nextBatchIn","Pr\xF3ximo lote en: ")}</span><span id="countdownTimer">--</span>
</div>
<!-- Estad\xEDsticas de An\xE1lisis -->
<hr style="border: none; border-top: 1px solid #4a5568; margin: 10px 0;">
<div style="font-size: 13px; margin-bottom: 5px;">
<span style="color: #10b981;">\u2705 P\xEDxeles Correctos: </span><span id="correctPixelsCount">-</span>
</div>
<div style="font-size: 13px; margin-bottom: 5px;">
<span style="color: #ef4444;">\u274C P\xEDxeles Incorrectos: </span><span id="incorrectPixelsCount">-</span>
</div>
<div style="font-size: 13px; margin-bottom: 5px;">
<span style="color: #f59e0b;">\u26AA P\xEDxeles Faltantes: </span><span id="missingPixelsCount">-</span>
</div>
<div style="font-size: 13px;">
<span style="color: #8b5cf6;">\u{1F3AF} Precisi\xF3n: </span><span id="accuracyCount">-</span>
</div>
</div>
</div>
<!-- Estado (siempre visible aunque se minimice) -->
<div id="statusBar" style="background: #2d3748; padding: 8px; border-radius: 4px; text-align: center; font-size: 13px; margin-top: 10px;">
\u23F3 ${o.waitingInit}
</div>
<!-- Indicador de redimensionamiento -->
<div style="
position: absolute;
bottom: 0;
right: 0;
width: 20px;
height: 20px;
background: linear-gradient(-45deg, transparent 30%, #666 30%, #666 40%, transparent 40%, transparent 60%, #666 60%, #666 70%, transparent 70%);
cursor: nw-resize;
border-bottom-right-radius: 15px;
"></div>
`,document.body.appendChild(e),e.appendChild(t),Z(e);let r=document.createElement("input");r.type="file",r.accept=".json",r.style.display="none",document.body.appendChild(r),An(e);let n={initBtn:e.querySelector("#initBtn"),selectAreaBtn:e.querySelector("#selectAreaBtn"),loadAreaBtn:e.querySelector("#loadAreaBtn"),x1Input:e.querySelector("#x1Input"),y1Input:e.querySelector("#y1Input"),x2Input:e.querySelector("#x2Input"),y2Input:e.querySelector("#y2Input"),startBtn:e.querySelector("#startBtn"),stopBtn:e.querySelector("#stopBtn"),watchBtn:e.querySelector("#watchBtn"),logWindowBtn:e.querySelector("#logWindowBtn"),configBtn:e.querySelector("#configBtn"),repositionBtn:e.querySelector("#repositionBtn"),minimizeBtn:e.querySelector("#minimizeBtn"),initSection:e.querySelector("#initSection"),areaSection:e.querySelector("#areaSection"),protectedCount:e.querySelector("#protectedCount"),changesCount:e.querySelector("#changesCount"),chargesCount:e.querySelector("#chargesCount"),repairedCount:e.querySelector("#repairedCount"),countdownSection:e.querySelector("#countdownSection"),countdownTimer:e.querySelector("#countdownTimer"),correctPixelsCount:e.querySelector("#correctPixelsCount"),incorrectPixelsCount:e.querySelector("#incorrectPixelsCount"),missingPixelsCount:e.querySelector("#missingPixelsCount"),accuracyCount:e.querySelector("#accuracyCount"),statusBar:e.querySelector("#statusBar"),areaFileInput:r,saveBtn:e.querySelector("#saveBtn"),analyzeBtn:e.querySelector("#analyzeBtn"),areaActionsRow:e.querySelector("#areaActionsRow")},s={container:e,elements:n,updateStatus:(a,c="info")=>{n.statusBar.textContent=a;let l={info:"#60a5fa",success:"#10b981",warning:"#f59e0b",error:"#ef4444"};n.statusBar.style.color=l[c]||l.info},updateProgress:(a,c,l=!1)=>{n.changesCount.textContent=a,l&&c>0?n.protectedCount.textContent=`${c} (\xE1rea vac\xEDa)`:n.protectedCount.textContent=c},updateStats:a=>{a.charges!==void 0&&(n.chargesCount.textContent=a.charges),a.repaired!==void 0&&(n.repairedCount.textContent=a.repaired),a.pending!==void 0&&(n.changesCount.textContent=a.pending)},showCountdown:(a=!0)=>{n.countdownSection.style.display=a?"block":"none"},updateCountdown:a=>{if(a<=0){n.countdownTimer.textContent="--",s.showCountdown(!1);return}let c=Math.floor(a/60),l=a%60,u=c>0?`${c}m ${l}s`:`${l}s`;n.countdownTimer.textContent=u,s.showCountdown(!0)},updateAnalysisStats:a=>{a.correct!==void 0&&(n.correctPixelsCount.textContent=a.correct),a.incorrect!==void 0&&(n.incorrectPixelsCount.textContent=a.incorrect),a.missing!==void 0&&(n.missingPixelsCount.textContent=a.missing),a.accuracy!==void 0&&(n.accuracyCount.textContent=`${a.accuracy}%`)},showAreaSection:()=>{n.initSection.style.display="none",n.areaSection.style.display="block";let{guardState:a}=window;a&&a.operationMode&&(a.operationMode==="erase"?n.startBtn.innerHTML=`\u{1F5D1}\uFE0F ${v("guard.startErase","Iniciar Borrado")}`:n.startBtn.innerHTML="\u25B6\uFE0F Iniciar")},setInitButtonVisible:a=>{n.initSection.style.display=a?"block":"none"},setInitialized:a=>{n.initBtn.disabled=a,a&&(n.initBtn.style.opacity="0.5",n.initBtn.style.cursor="not-allowed")},enableStartBtn:()=>{n.startBtn.disabled=!1,n.startBtn.style.opacity="1",n.startBtn.style.cursor="pointer",s.updateButtonsState()},updateRepositionBtn:()=>{let a=Se();n.repositionBtn.disabled=!a,a?(n.repositionBtn.style.opacity="1",n.repositionBtn.style.cursor="pointer"):(n.repositionBtn.style.opacity="0.5",n.repositionBtn.style.cursor="not-allowed")},updateWatchButton:a=>{a?(n.watchBtn.innerHTML=`\u23F9\uFE0F ${v("guard.stopWatcher","Detener Vig\xEDa")}`,n.watchBtn.style.background="#ef4444"):(n.watchBtn.innerHTML="\u{1F441}\uFE0F Vig\xEDa",n.watchBtn.style.background="#f59e0b")},updateButtonsState:()=>{let a=Se()||window.guardState&&window.guardState.protectionArea;n.analyzeBtn.disabled=!a,a?(n.analyzeBtn.style.opacity="1",n.analyzeBtn.style.cursor="pointer"):(n.analyzeBtn.style.opacity="0.5",n.analyzeBtn.style.cursor="not-allowed"),n.watchBtn.disabled=!a,a?(n.watchBtn.style.opacity="1",n.watchBtn.style.cursor="pointer"):(n.watchBtn.style.opacity="0.5",n.watchBtn.style.cursor="not-allowed"),n.saveBtn.disabled=!a,a?(n.saveBtn.style.opacity="1",n.saveBtn.style.cursor="pointer"):(n.saveBtn.style.opacity="0.5",n.saveBtn.style.cursor="not-allowed"),s.updateRepositionBtn()},setRunningState:a=>{a?(n.startBtn.disabled=!0,n.startBtn.style.opacity="0.5",n.startBtn.style.cursor="not-allowed",n.stopBtn.disabled=!1,n.stopBtn.style.opacity="1",n.stopBtn.style.cursor="pointer",n.selectAreaBtn.disabled=!0,n.repositionBtn.disabled=!0,n.areaActionsRow&&(n.areaActionsRow.style.maxHeight="0px",n.areaActionsRow.style.opacity="0",setTimeout(()=>{n.areaActionsRow.style.display="none"},300))):(n.stopBtn.disabled=!0,n.stopBtn.style.opacity="0.5",n.stopBtn.style.cursor="not-allowed",s.updateStartButtonState(),n.selectAreaBtn.disabled=!1,s.updateButtonsState(),n.areaActionsRow&&(n.areaActionsRow.style.display="flex",window.requestAnimationFrame(()=>{n.areaActionsRow.style.maxHeight="200px",n.areaActionsRow.style.opacity="1"})))},updateCoordinates:a=>{a.x1!==void 0&&a.y1!==void 0&&a.x2!==void 0&&a.y2!==void 0&&(s.updateStartButtonState(),s.updateButtonsState())},updateStartButtonState:()=>{let a=Se()||window.guardState&&window.guardState.protectionArea;a&&!n.startBtn.disabled||(a?(n.startBtn.disabled=!1,n.startBtn.style.opacity="1",n.startBtn.style.cursor="pointer"):(n.startBtn.disabled=!0,n.startBtn.style.opacity="0.5",n.startBtn.style.cursor="not-allowed"))},destroy:()=>{e.style.transition="opacity 0.3s ease, transform 0.3s ease",e.style.opacity="0",e.style.transform="scale(0.95) translateY(-20px)",setTimeout(()=>{H(e),e.remove(),r.remove()},300)}};return n.minimizeBtn.addEventListener("click",()=>{let a=e.querySelector(".guard-content");a&&(a.classList.contains("collapsed")?(a.classList.remove("collapsed"),e.classList.remove("minimized"),n.minimizeBtn.textContent="\u2796"):(a.classList.add("collapsed"),e.classList.add("minimized"),n.minimizeBtn.textContent="\u{1F53C}"))}),n.configBtn.addEventListener("click",async()=>{n.configBtn.style.transform="scale(0.95)",setTimeout(()=>{n.configBtn.style.transform="scale(1)"},150),qo()}),n.analyzeBtn.addEventListener("click",async()=>{n.analyzeBtn.style.transform="scale(0.95)",setTimeout(()=>{n.analyzeBtn.style.transform="scale(1)"},150);let{createAnalysisWindow:a}=await Promise.resolve().then(()=>(Qo(),Ko));a()}),s.updateTexts=()=>{let a=e.querySelector("#loadAreaBtn");a&&(a.innerHTML=`\u{1F4C1} ${v("guard.loadFile","Cargar Archivo")}`);let c=e.querySelector("#repositionBtn");c&&(c.innerHTML=`\u{1F4CD} ${v("guard.reposition","Reposicionar")}`);let l=e.querySelector(".analyze-btn");l&&(l.innerHTML=`${v("guard.analyzeArea","Analizar \xC1rea")}`);let u=e.querySelector("#logWindowBtn");u&&(u.innerHTML=`${v("guard.logs","Logs")}`);let g=e.querySelector("#watchBtn");g&&(g.innerHTML=`\u{1F441}\uFE0F ${v("guard.watcher","Vig\xEDa")}`);let m=e.querySelector("#configBtn");m&&(m.innerHTML=`\u2699\uFE0F ${v("guard.configuration","Configuraci\xF3n")}`);let h=e.querySelector("#countdownSection span");h&&(h.innerHTML=`\u23F0 ${v("guard.nextBatchIn","Pr\xF3ximo lote en: ")}`)},s.updateButtonsState(),s}function tr(o,e,t={}){return new Promise(r=>{let n=document.createElement("div");n.className="modal-overlay",n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.background="rgba(0,0,0,0.7)",n.style.zIndex="10001",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";let s=document.createElement("div");s.style.background="#1a1a1a",s.style.border="2px solid #333",s.style.borderRadius="15px",s.style.padding="25px",s.style.color="#eee",s.style.minWidth="350px",s.style.maxWidth="400px",s.style.boxShadow="0 10px 30px rgba(0,0,0,0.5)",s.style.fontFamily="'Segoe UI', Roboto, sans-serif",s.innerHTML=`
<h3 style="margin: 0 0 15px 0; text-align: center; font-size: 18px;">${e}</h3>
<p style="margin: 0 0 20px 0; text-align: center; line-height: 1.4;">${o}</p>
<div style="display: flex; gap: 10px; justify-content: center;">
${t.save?`<button class="save-btn" style="padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; min-width: 100px; background: #10b981; color: white;">${t.save}</button>`:""}
${t.discard?`<button class="discard-btn" style="padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; min-width: 100px; background: #ef4444; color: white;">${t.discard}</button>`:""}
${t.cancel?`<button class="cancel-btn" style="padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; min-width: 100px; background: #2d3748; color: white;">${t.cancel}</button>`:""}
</div>
`,n.appendChild(s),document.body.appendChild(n),Z(s);let a=s.querySelector(".save-btn"),c=s.querySelector(".discard-btn"),l=s.querySelector(".cancel-btn"),u=()=>{H(s),document.body.removeChild(n)};a&&a.addEventListener("click",()=>{u(),r("save")}),c&&c.addEventListener("click",()=>{u(),r("discard")}),l&&l.addEventListener("click",()=>{u(),r("cancel")}),n.addEventListener("click",g=>{g.target===n&&(u(),r("cancel"))})})}function An(o){let e=o.querySelector(".guard-header");if(!e)return;let t,r,n,s;e.addEventListener("mousedown",a=>{a.preventDefault(),t=a.clientX,r=a.clientY,n=parseInt(window.getComputedStyle(o).left,10),s=parseInt(window.getComputedStyle(o).top,10);let c=u=>{let g=u.clientX-t,m=u.clientY-r;o.style.left=`${n+g}px`,o.style.top=`${s+m}px`},l=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",c),document.addEventListener("mouseup",l)})}D();ze();var st=class{constructor(e="Bot"){this.botName=e,this.isVisible=!1,this.logs=[],this.maxLogs=1e3,this.container=null,this.logContent=null,this.isResizing=!1,this.resizeHandle=null,this.originalConsole={},this.config={width:600,height:400,x:window.innerWidth-620,y:20,visible:!1},this.loadConfig(),this.createWindow(),this.setupLogInterception(),this.setupEventListeners()}loadConfig(){try{let e=localStorage.getItem(`wplace-log-window-${this.botName}`);e&&(this.config={...this.config,...JSON.parse(e)})}catch(e){d("Error cargando configuraci\xF3n de ventana de logs:",e)}}saveConfig(){try{localStorage.setItem(`wplace-log-window-${this.botName}`,JSON.stringify(this.config))}catch(e){d("Error guardando configuraci\xF3n de ventana de logs:",e)}}createWindow(){this.container=document.createElement("div"),this.container.className="wplace-log-window",this.container.style.cssText=`
position: fixed;
left: ${this.config.x}px;
top: ${this.config.y}px;
width: ${this.config.width}px;
height: ${this.config.height}px;
background: rgba(0, 0, 0, 0.9);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
z-index: 100001;
display: ${this.config.visible?"flex":"none"};
flex-direction: column;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
color: #fff;
resize: none;
overflow: hidden;
`;let e=document.createElement("div");e.className="log-window-header",e.style.cssText=`
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
cursor: move;
user-select: none;
border-radius: 7px 7px 0 0;
`;let t=document.createElement("div");t.textContent=`\u{1F4CB} Logs - ${this.botName}`,t.style.cssText=`
font-weight: bold;
font-size: 14px;
color: #e2e8f0;
`;let r=document.createElement("div");r.style.cssText=`
display: flex;
gap: 8px;
`;let n=document.createElement("button");n.innerHTML="\u{1F4BE}",n.title="Descargar logs",n.style.cssText=`
background: rgba(34, 197, 94, 0.8);
border: none;
border-radius: 4px;
color: white;
width: 24px;
height: 24px;
cursor: pointer;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
`,n.addEventListener("mouseenter",()=>{n.style.background="rgba(34, 197, 94, 1)"}),n.addEventListener("mouseleave",()=>{n.style.background="rgba(34, 197, 94, 0.8)"}),n.addEventListener("click",()=>this.downloadLogs());let s=document.createElement("button");s.innerHTML="\u2715",s.title="Cerrar ventana",s.style.cssText=`
background: rgba(239, 68, 68, 0.8);
border: none;
border-radius: 4px;
color: white;
width: 24px;
height: 24px;
cursor: pointer;
font-size: 12px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
`,s.addEventListener("mouseenter",()=>{s.style.background="rgba(239, 68, 68, 1)"}),s.addEventListener("mouseleave",()=>{s.style.background="rgba(239, 68, 68, 0.8)"}),s.addEventListener("click",()=>this.hide()),r.appendChild(n),r.appendChild(s),e.appendChild(t),e.appendChild(r),this.logContent=document.createElement("div"),this.logContent.className="log-window-content",this.logContent.style.cssText=`
flex: 1;
padding: 8px;
overflow-y: auto;
font-size: 12px;
line-height: 1.4;
white-space: pre-wrap;
word-break: break-word;
`,this.resizeHandle=document.createElement("div"),this.resizeHandle.className="log-window-resize-handle",this.resizeHandle.style.cssText=`
position: absolute;
bottom: 0;
right: 0;
width: 20px;
height: 20px;
cursor: se-resize;
background: linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.3) 30%, rgba(255,255,255,0.3) 70%, transparent 70%);
border-radius: 0 0 8px 0;
`,this.container.appendChild(e),this.container.appendChild(this.logContent),this.container.appendChild(this.resizeHandle),document.body.appendChild(this.container),Z(this.container),this.setupDragging(e),this.setupResizing(),this.isVisible=this.config.visible}setupDragging(e){let t=!1,r={x:0,y:0};e.addEventListener("mousedown",a=>{a.target.tagName!=="BUTTON"&&(t=!0,r.x=a.clientX-this.container.offsetLeft,r.y=a.clientY-this.container.offsetTop,document.addEventListener("mousemove",n),document.addEventListener("mouseup",s),a.preventDefault())});let n=a=>{if(!t)return;let c=Math.max(0,Math.min(window.innerWidth-this.container.offsetWidth,a.clientX-r.x)),l=Math.max(0,Math.min(window.innerHeight-this.container.offsetHeight,a.clientY-r.y));this.container.style.left=c+"px",this.container.style.top=l+"px",this.config.x=c,this.config.y=l},s=()=>{t=!1,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s),this.saveConfig()}}setupResizing(){let e=!1,t,r,n,s;this.resizeHandle.addEventListener("mousedown",l=>{e=!0,t=l.clientX,r=l.clientY,n=parseInt(document.defaultView.getComputedStyle(this.container).width,10),s=parseInt(document.defaultView.getComputedStyle(this.container).height,10),document.addEventListener("mousemove",a),document.addEventListener("mouseup",c),l.preventDefault()});let a=l=>{if(!e)return;let u=Math.max(300,n+l.clientX-t),g=Math.max(200,s+l.clientY-r);this.container.style.width=u+"px",this.container.style.height=g+"px",this.config.width=u,this.config.height=g},c=()=>{e=!1,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",c),this.saveConfig()}}setupLogInterception(){this.originalConsole={log:console.log,info:console.info,warn:console.warn,error:console.error,debug:console.debug},console.log=(...e)=>{this.originalConsole.log.apply(console,e),this.addLog("log",e)},console.info=(...e)=>{this.originalConsole.info.apply(console,e),this.addLog("info",e)},console.warn=(...e)=>{this.originalConsole.warn.apply(console,e),this.addLog("warn",e)},console.error=(...e)=>{this.originalConsole.error.apply(console,e),this.addLog("error",e)},console.debug=(...e)=>{this.originalConsole.debug.apply(console,e),this.addLog("debug",e)}}addLog(e,t){let r=new Date().toLocaleTimeString(),n=t.map(a=>typeof a=="object"?JSON.stringify(a,null,2):String(a)).join(" "),s={timestamp:r,type:e,message:n,raw:t};this.logs.push(s),this.logs.length>this.maxLogs&&this.logs.shift(),this.isVisible&&this.updateLogDisplay()}updateLogDisplay(){if(!this.logContent)return;let e=this.logs.map(t=>`<div style="color: ${this.getLogColor(t.type)}; margin-bottom: 2px;">[${t.timestamp}] ${t.message}</div>`).join("");this.logContent.innerHTML=e,this.logContent.scrollTop=this.logContent.scrollHeight}getLogColor(e){let t={log:"#e2e8f0",info:"#60a5fa",warn:"#fbbf24",error:"#f87171",debug:"#a78bfa"};return t[e]||t.log}downloadLogs(){let e=new Date,t=e.toISOString().split("T")[0],r=e.toTimeString().split(" ")[0].replace(/:/g,"-"),n=`log_${this.botName}_${t}_${r}.log`,s=this.logs.map(u=>`[${u.timestamp}] [${u.type.toUpperCase()}] ${u.message}`).join(`
`),a=new Blob([s],{type:"text/plain"}),c=URL.createObjectURL(a),l=document.createElement("a");l.href=c,l.download=n,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(c),d(`\u{1F4E5} Logs descargados como: ${n}`)}show(){this.container&&(this.container.style.display="flex",Bt(this.container),this.isVisible=!0,this.config.visible=!0,this.updateLogDisplay(),this.saveConfig())}hide(){this.container&&(this.container.style.display="none",this.isVisible=!1,this.config.visible=!1,this.saveConfig())}toggle(){this.isVisible?this.hide():this.show()}clear(){this.logs=[],this.logContent&&(this.logContent.innerHTML="")}setupEventListeners(){window.addEventListener("resize",()=>{if(this.container){let e=window.innerWidth-this.container.offsetWidth,t=window.innerHeight-this.container.offsetHeight;this.config.x>e&&(this.config.x=Math.max(0,e),this.container.style.left=this.config.x+"px"),this.config.y>t&&(this.config.y=Math.max(0,t),this.container.style.top=this.config.y+"px"),this.saveConfig()}})}destroy(){this.originalConsole.log&&(console.log=this.originalConsole.log,console.info=this.originalConsole.info,console.warn=this.originalConsole.warn,console.error=this.originalConsole.error,console.debug=this.originalConsole.debug),this.container&&this.container.parentNode&&(H(this.container),this.container.parentNode.removeChild(this.container)),this.container=null,this.logContent=null,this.logs=[]}};window.__wplaceLogWindows=window.__wplaceLogWindows||{};function Gt(o){return window.__wplaceLogWindows[o]||(window.__wplaceLogWindows[o]=new st(o)),window.__wplaceLogWindows[o]}Fe();function Ne(o=!1){let e=['[data-testid="color-picker"]',".color-picker",".palette",'[class*="color"][class*="picker"]','[class*="palette"]'];for(let n of e){let s=document.querySelector(n);if(s&&s.offsetParent!==null)return o&&console.log(`[WPA-UI] \u{1F3A8} Paleta detectada por selector: ${n}`),!0}let t=document.querySelectorAll('[style*="background-color"], [style*="background:"], .color, [class*="color"]'),r=0;for(let n of t)if(n.offsetParent!==null&&n.offsetWidth>10&&n.offsetHeight>10&&(r++,r>=5))return o&&console.log(`[WPA-UI] \u{1F3A8} Paleta detectada por colores visibles: ${r}`),!0;return o&&console.log(`[WPA-UI] \u{1F50D} Paleta no detectada. Colores visibles: ${r}`),!1}function lt(o=!1,e=!1){let t=document.querySelector("button.btn.btn-primary.btn-lg, button.btn.btn-primary.sm\\:btn-xl");if(t){let n=t.textContent.toLowerCase(),s=n.includes("paint")||n.includes("pintar"),a=t.querySelector('svg path[d*="240-120"]')||t.querySelector('svg path[d*="M15"]');if(s||a)return o&&console.log(`[WPA-UI] \u{1F3AF} Bot\xF3n Paint encontrado por selector espec\xEDfico: "${n}"`),t.click(),e&&setTimeout(()=>{o&&console.log("[WPA-UI] \u{1F3AF} Segundo clic en bot\xF3n Paint"),t.click()},500),!0}let r=document.querySelectorAll("button");for(let n of r){let s=n.textContent.toLowerCase();if((s.includes("paint")||s.includes("pintar"))&&n.offsetParent!==null&&!n.disabled)return o&&console.log(`[WPA-UI] \u{1F3AF} Bot\xF3n Paint encontrado por texto: "${n.textContent.trim()}"`),n.click(),e&&setTimeout(()=>{o&&console.log("[WPA-UI] \u{1F3AF} Segundo clic en bot\xF3n Paint"),n.click()},500),!0}return o&&console.log("[WPA-UI] \u274C Bot\xF3n Paint no encontrado"),!1}async function or(o=3,e=!0){e&&console.log(`[WPA-UI] \u{1F916} Iniciando auto-click del bot\xF3n Paint (m\xE1ximo ${o} intentos)`);for(let t=1;t<=o;t++){if(e&&console.log(`[WPA-UI] \u{1F3AF} Intento ${t}/${o} - Buscando bot\xF3n Paint...`),Ne())return e&&console.log("[WPA-UI] \u2705 Paleta ya est\xE1 abierta, auto-click completado"),!0;if(lt(e,!1)){if(e&&console.log("[WPA-UI] \u{1F446} Clic en bot\xF3n Paint realizado (sin segundo clic)"),await new Promise(r=>setTimeout(r,1500)),Ne())return e&&console.log(`[WPA-UI] \u2705 Paleta abierta exitosamente despu\xE9s del intento ${t}`),!0;e&&console.log(`[WPA-UI] \u26A0\uFE0F Paleta no detectada tras el clic en intento ${t}. Reintentar\xE1.`)}else e&&console.log(`[WPA-UI] \u274C Bot\xF3n Paint no encontrado para clic en intento ${t}`);t<o&&await new Promise(r=>setTimeout(r,1e3))}return e&&console.log(`[WPA-UI] \u274C Auto-click fall\xF3 despu\xE9s de ${o} intentos`),!1}D();qe();xt();mt();async function rr(o="Bot"){d(`\u{1F680} [${o}] Preparando tokens (modo simplificado)`);try{Ge({})}catch{}try{ao()}catch{}return{success:!0,fingerprint:pe(),pawtectToken:ue(),skipped:!0}}yt();D();re();var{setTimeout:nr,Request:kn,Response:Ln,createImageBitmap:Rn,OffscreenCanvas:Mn}=window,Yt=class{constructor(){this.isEnabled=!1,this.displayEnabled=!1,this.protectionArea=null,this.originalFetch=null,this.isIntercepting=!1,this.TILE_SIZE=1e3}initialize(){try{return d("\u2705 Overlay de protecci\xF3n inicializado"),!0}catch(e){return d("\u274C Error inicializando overlay:",e),!1}}showProtectionArea(e){this.protectionArea=e,this.isEnabled=!0,this.startFetchInterception(),d(`\u{1F6E1}\uFE0F Mostrando \xE1rea de protecci\xF3n: (${e.x1},${e.y1}) a (${e.x2},${e.y2})`)}hideProtectionArea(){this.isEnabled=!1,this.stopFetchInterception(),d("\u{1F50D} Ocultando \xE1rea de protecci\xF3n")}showDisplay(e){this.displayEnabled=!0,this.showProtectionArea(e),d("\u{1F5BC}\uFE0F Display activado")}hideDisplay(){this.displayEnabled=!1,this.hideProtectionArea(),d("\u{1F5BC}\uFE0F Display desactivado")}startFetchInterception(){this.isIntercepting||(this.originalFetch=window.fetch,this.isIntercepting=!0,window.fetch=async(...e)=>{var a;let t=await this.originalFetch.apply(window,e),r=t.clone(),n=(e[0]instanceof kn?(a=e[0])==null?void 0:a.url:e[0])||"ignore",s=r.headers.get("content-type")||"";if((n.includes("tiles")||n.includes("tile"))&&d(`\u{1F50D} TILE REQUEST: ${n} | ContentType: ${s}`),s.includes("image/")&&(n.includes("/tiles/")||n.includes("/tile/"))&&!n.includes("openfreemap")&&!n.includes("maps")){d(`\u{1F4E1} Interceptando tile: ${n}`);try{let c=await r.blob(),l=await this.drawProtectionOnTile(c,n);return new Ln(l,{headers:r.headers,status:r.status,statusText:r.statusText})}catch(c){return d("\u274C Error procesando tile:",c),t}}return t},d("\u{1F50D} Intercepci\xF3n de tiles iniciada para overlay de protecci\xF3n"))}stopFetchInterception(){!this.isIntercepting||!this.originalFetch||(window.fetch=this.originalFetch,this.isIntercepting=!1,d("\u23F9\uFE0F Intercepci\xF3n de tiles detenida"))}async drawProtectionOnTile(e,t){if(!this.isEnabled||!this.protectionArea)return e;d(`\u{1F527} Procesando tile: ${t}`);let r,n,s=t.split("/"),a=s[s.length-1].replace(/\.(png|jpg|jpeg|webp).*$/i,""),c=s[s.length-2];if(n=parseInt(a),r=parseInt(c),isNaN(r)||isNaN(n)){let h=t.match(/\/(\d+)\/(\d+)(?:\/\d+)?\.(?:png|jpg|jpeg|webp)/i);h&&(r=parseInt(h[1]),n=parseInt(h[2]))}if(isNaN(r)||isNaN(n))return d(`\u274C No se pudieron extraer coordenadas de: ${t}`),e;if(d(`\u{1F4CD} Coordenadas extra\xEDdas: tile(${r}, ${n})`),!this.tileIntersectsProtectionArea(r,n))return d(`\u27A1\uFE0F Tile ${r},${n} no intersecta con \xE1rea de protecci\xF3n`),e;d(`\u{1F3AF} Tile ${r},${n} INTERSECTA con \xE1rea de protecci\xF3n - aplicando overlay`);let l=await Rn(e),u=new Mn(l.width,l.height),g=u.getContext("2d");g.imageSmoothingEnabled=!1,g.drawImage(l,0,0),this.drawProtectionOverlay(g,r,n,l.width,l.height);let m=await u.convertToBlob({type:"image/png"});return d(`\u2705 Tile ${r},${n} procesado con overlay`),m}tileIntersectsProtectionArea(e,t){if(!this.protectionArea)return!1;let{x1:r,y1:n,x2:s,y2:a}=this.protectionArea,c=e*this.TILE_SIZE,l=c+this.TILE_SIZE,u=t*this.TILE_SIZE,g=u+this.TILE_SIZE;d("\u{1F50D} Verificando intersecci\xF3n:"),d(` Tile ${e},${t}: (${c}-${l}, ${u}-${g})`),d(` \xC1rea protecci\xF3n: (${r}-${s}, ${n}-${a})`);let m=!(s<c||r>l||a<u||n>g);return d(` \u{1F3AF} Intersecta: ${m}`),m}drawProtectionOverlay(e,t,r,n,s){var E;if(!this.protectionArea)return;let{x1:a,y1:c,x2:l,y2:u}=this.protectionArea,g=t*this.TILE_SIZE,m=r*this.TILE_SIZE,h=Math.max(0,a-g),p=Math.max(0,c-m),x=Math.min(this.TILE_SIZE,l-g),f=Math.min(this.TILE_SIZE,u-m);if(h>=x||p>=f)return;let w=n/this.TILE_SIZE,C=s/this.TILE_SIZE,P=h*w,y=p*C,S=(x-h)*w,b=(f-p)*C;if(d(`\u{1F3A8} Dibujando overlay en tile ${t},${r}:`),d(` Local: (${h},${p}) a (${x},${f})`),d(` Render: (${P},${y}) tama\xF1o: ${S}x${b}`),d(` Scale: ${w} x ${C}, TileSize: ${n}x${s}`),e.save(),this.displayEnabled){if(e.globalCompositeOperation="difference",e.fillStyle="white",e.fillRect(P,y,S,b),e.globalCompositeOperation="source-over",(E=i)!=null&&E.changes&&i.changes.size>0){e.fillStyle="rgba(255, 0, 0, 0.9)";for(let[T,M]of i.changes){let A=M.original;if(!A||A.tileX!==t||A.tileY!==r||A.localX<h||A.localX>=x||A.localY<p||A.localY>=f)continue;let L=A.localX*w,_=A.localY*C;e.fillRect(L,_,Math.max(1,w),Math.max(1,C))}}e.strokeStyle="rgba(255, 255, 255, 0.9)",e.lineWidth=Math.max(1,1.5*Math.max(w,C)),e.strokeRect(P,y,S,b)}else{e.fillStyle="rgba(255, 0, 0, 0.5)",e.fillRect(P,y,S,b),e.strokeStyle="rgba(255, 0, 0, 1.0)",e.lineWidth=Math.max(1,1.5*Math.max(w,C)),e.strokeRect(P,y,S,b),e.strokeStyle="rgba(255, 255, 0, 0.8)",e.lineWidth=Math.max(.5,1*Math.max(w,C));for(let T=0;T<=S;T+=10*w)e.beginPath(),e.moveTo(P+T,y),e.lineTo(P+T,y+b),e.stroke();for(let T=0;T<=b;T+=10*C)e.beginPath(),e.moveTo(P,y+T),e.lineTo(P+S,y+T),e.stroke()}e.restore(),d(`\u2705 Overlay dibujado en tile ${t},${r}`)}updateArea(e){this.protectionArea=e}toggle(){this.isEnabled?this.hideProtectionArea():this.protectionArea&&this.showProtectionArea(this.protectionArea)}destroy(){this.stopFetchInterception(),this.protectionArea=null,this.isEnabled=!1,this.displayEnabled=!1,d("\u{1F5D1}\uFE0F Overlay destruido")}handleViewportChange(){}},ye=new Yt;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{nr(()=>ye.initialize(),1e3)}):nr(()=>ye.initialize(),1e3);Pt();Ze();var{setInterval:Xt,clearInterval:jt}=window;async function ar(){d("\u{1F6E1}\uFE0F Iniciando WPlace Auto-Guard"),$t();try{(await rr("Auto-Guard")).success||d("\u26A0\uFE0F [guard] Tokens no preparados, continuando con interceptor activo")}catch(o){d("\u274C [guard] Error preparando tokens:",o)}try{let o=localStorage.getItem("wplace-guard-config");if(o){let e=JSON.parse(o);e&&typeof e=="object"&&(typeof e.protectionPattern=="string"&&(i.protectionPattern=e.protectionPattern),typeof e.operationMode=="string"&&(i.operationMode=e.operationMode),typeof e.preferColor=="boolean"&&(i.preferColor=e.preferColor),Array.isArray(e.preferredColorIds)?(i.preferredColorIds=e.preferredColorIds,i.preferredColorId=e.preferredColorIds.length>0?e.preferredColorIds[0]:null):typeof e.preferredColorId=="number"&&(i.preferredColorIds=[e.preferredColorId],i.preferredColorId=e.preferredColorId),typeof e.excludeColor=="boolean"&&(i.excludeColor=e.excludeColor),Array.isArray(e.excludedColorIds)&&(i.excludedColorIds=e.excludedColorIds),typeof e.spendAllPixelsOnStart=="boolean"&&(i.spendAllPixelsOnStart=e.spendAllPixelsOnStart),Number.isFinite(e.minChargesToWait)&&(i.minChargesToWait=e.minChargesToWait),Number.isFinite(e.pixelsPerBatch)&&(i.pixelsPerBatch=e.pixelsPerBatch),typeof e.randomWaitTime=="boolean"&&(i.randomWaitTime=e.randomWaitTime),Number.isFinite(e.randomWaitMin)&&(i.randomWaitMin=e.randomWaitMin),Number.isFinite(e.randomWaitMax)&&(i.randomWaitMax=e.randomWaitMax),typeof e.protectTransparentPixels=="boolean"&&(i.protectTransparentPixels=e.protectTransparentPixels),typeof e.protectPerimeter=="boolean"&&(i.protectPerimeter=e.protectPerimeter),Number.isFinite(e.perimeterWidth)&&e.perimeterWidth>=1&&e.perimeterWidth<=10&&(i.perimeterWidth=e.perimeterWidth))}}catch(o){d("\u26A0\uFE0F No se pudo cargar configuraci\xF3n previa:",o)}if(_n()){window.__wplaceBot={...window.__wplaceBot,guardRunning:!0},window.guardState=i;try{let o=Uo("guard");i.ui=er(o),zn(),(async()=>{try{let t=q({VARIANT:"auto-guard"});if(!t.ENABLED)return;window.__wplaceMetrics||(window.__wplaceMetrics={}),d(`[METRICS] enabled \u2192 ${t.BASE_URL}`),window.__wplaceMetrics.guardSessionActive=!0,mo({botVariant:"auto-guard",metadata:{source:"guard"}});let r=Math.max(6e4,t.PING_INTERVAL_MS||3e5);window.__wplaceMetrics.guardPingInterval=Xt(()=>{He({botVariant:"auto-guard"})},r)}catch{}})();async function e(){if(d("\u{1F916} Intentando auto-inicio del Guard..."),i.ui.updateStatus(v("guard.paletteNotFound"),"info"),Ne()){if(d("\u{1F3A8} Paleta parece abierta. Validando colores..."),he().length>0)return i.ui.updateStatus(v("guard.paletteDetected"),"success"),!0;d('\u26A0\uFE0F Paleta "abierta" pero sin colores detectados. Intentando presionar Paint...')}if(d("\u{1F50D} Buscando bot\xF3n Paint..."),i.ui.updateStatus(v("guard.clickingPaintButton"),"info"),lt()){if(d("\u{1F446} Bot\xF3n Paint encontrado y presionado"),await ne(3e3),he().length>0)return d("\u2705 Colores detectados tras presionar Paint"),i.ui.updateStatus(v("guard.paletteDetected"),"success"),!0;Ne()?d("\u2705 Paleta abierta, pero sin colores accesibles a\xFAn"):d("\u274C La paleta no se abri\xF3 despu\xE9s de hacer clic")}else d("\u274C Bot\xF3n Paint no encontrado");return i.ui.updateStatus(v("guard.autoInitFailed"),"warning"),!1}setTimeout(async()=>{try{i.ui.updateStatus(v("guard.autoInitializing"),"info"),d("\u{1F916} Intentando auto-inicio...");try{$("auto_init_attempt",{botVariant:"auto-guard"})}catch{}if(await e()){i.ui.updateStatus(v("guard.autoInitSuccess"),"success"),d("\u2705 Auto-inicio exitoso");try{$("auto_init_result",{botVariant:"auto-guard",metadata:{success:!0}})}catch{}i.ui.setInitButtonVisible(!1),await ir(!0)&&d("\u{1F680} Guard-BOT auto-iniciado completamente")}else{i.ui.updateStatus(v("guard.autoInitFailed"),"warning"),d("\u26A0\uFE0F Auto-inicio fall\xF3, se requiere inicio manual");try{$("auto_init_result",{botVariant:"auto-guard",metadata:{success:!1}})}catch{}i.ui.setInitButtonVisible(!0)}}catch(t){d("\u274C Error en auto-inicio:",t),i.ui.updateStatus(v("guard.manualInitRequired"),"warning");try{$("auto_init_result",{botVariant:"auto-guard",metadata:{success:!1,error:String((t==null?void 0:t.message)||t)}})}catch{}}},1e3),window.addEventListener("beforeunload",()=>{var t,r;Vt(),window.__wplaceBot&&(window.__wplaceBot.guardRunning=!1);try{q().ENABLED&&((t=window.__wplaceMetrics)!=null&&t.guardPingInterval&&(jt(window.__wplaceMetrics.guardPingInterval),window.__wplaceMetrics.guardPingInterval=null),(r=window.__wplaceMetrics)!=null&&r.guardSessionActive&&(Ct({botVariant:"auto-guard"}),window.__wplaceMetrics.guardSessionActive=!1))}catch{}});try{if(q().ENABLED){let r=()=>{if(!document.hidden)try{He({botVariant:"auto-guard",metadata:{reason:"visibility"}})}catch{}},n=()=>{try{He({botVariant:"auto-guard",metadata:{reason:"focus"}})}catch{}};document.addEventListener("visibilitychange",r),window.addEventListener("focus",n),window.__wplaceMetrics=window.__wplaceMetrics||{},window.__wplaceMetrics.guardVisibilityHandler=r,window.__wplaceMetrics.guardFocusHandler=n}}catch{}Lt(),d("\u2705 Auto-Guard cargado correctamente")}catch(o){throw d("\u274C Error inicializando Auto-Guard:",o),window.__wplaceBot&&(window.__wplaceBot.guardRunning=!1),o}}}function _n(){var o,e;return(o=window.__wplaceBot)!=null&&o.imageRunning?(alert("Auto-Image est\xE1 ejecut\xE1ndose. Ci\xE9rralo antes de iniciar Auto-Guard."),!1):(e=window.__wplaceBot)!=null&&e.farmRunning?(alert("Auto-Farm est\xE1 ejecut\xE1ndose. Ci\xE9rralo antes de iniciar Auto-Guard."),!1):!0}function zn(){let{elements:o}=i.ui;o.initBtn.addEventListener("click",()=>ir()),o.selectAreaBtn.addEventListener("click",Bn),o.loadAreaBtn.addEventListener("click",()=>{o.areaFileInput.click()}),o.areaFileInput.addEventListener("change",async()=>{if(o.areaFileInput.files.length>0){let t=await Eo(o.areaFileInput.files[0]);t.success?(i.ui.updateStatus(`\u2705 Protecci\xF3n cargada: ${t.protectedPixels} p\xEDxeles protegidos`,"success"),d("\u2705 \xC1rea de protecci\xF3n cargada desde archivo")):(i.ui.updateStatus(`\u274C Error al cargar protecci\xF3n: ${t.error}`,"error"),d(`\u274C Error cargando archivo: ${t.error}`))}}),o.startBtn.addEventListener("click",$n),o.stopBtn.addEventListener("click",async()=>{Vt()}),o.watchBtn.addEventListener("click",()=>{if(i.running&&i.watchMode)Vt();else{Nn();try{$("mode_change",{botVariant:"auto-guard",metadata:{mode:"watch"}})}catch{}}});let e=null;o.logWindowBtn.addEventListener("click",()=>{e?e.toggle():(e=Gt("guard"),e.show())}),o.repositionBtn.addEventListener("click",()=>sr()),o.saveBtn.addEventListener("click",async()=>{if(!Se()){i.ui.updateStatus("\u274C No hay \xE1rea protegida para guardar","error");return}if(await tr('\xBFDeseas dividir el \xE1rea protegida en partes para m\xFAltiples usuarios?<br><br><label for="splitCountInput">N\xFAmero de partes (1 = sin dividir):</label><br><input type="number" id="splitCountInput" min="1" max="20" value="1" style="margin: 5px 0; padding: 5px; width: 100px; background: #374151; border: 1px solid #4b5563; border-radius: 4px; color: #d1d5db;">',"Opciones de Guardado",{save:"Guardar",cancel:"Cancelar"})==="save"){let r=document.querySelector("#splitCountInput"),n=parseInt(r==null?void 0:r.value)||1,s=await So(null,n);s.success?i.ui.updateStatus(`\u2705 Protecci\xF3n guardada${n>1?` (dividida en ${n} partes)`:""}`,"success"):i.ui.updateStatus(`\u274C Error al guardar: ${s.error}`,"error")}})}async function ir(o=!1){var e;try{i.ui.updateStatus(v("guard.checkingColors"),"info");let t=he();if(t.length===0&&(d("\u26A0\uFE0F 0 colores detectados. Intentando abrir paleta (fallback)..."),i.ui.updateStatus(v("guard.clickingPaintButton"),"info"),lt()&&(await ne(2500),t=he())),t.length===0)return i.ui.updateStatus(v("guard.noColorsFound"),"error"),!1;i.availableColors=t,i.colorsChecked=!0;let r=await Re();return r.success&&(i.currentCharges=r.data.charges,i.maxCharges=r.data.maxCharges,i.ui.updateStats({charges:Math.floor(i.currentCharges)}),d(`\u{1F464} Usuario: ${((e=r.data.user)==null?void 0:e.name)||"An\xF3nimo"} - Cargas: ${i.currentCharges}`)),i.initialized=!0,i.ui.updateStatus(v("guard.colorsFound",{count:t.length}),"success"),i.ui.showAreaSection(),o||d(`\u2705 ${t.length} colores disponibles detectados`),i.ui.setInitialized(!0),!0}catch(t){return d("\u274C Error inicializando:",t),i.ui.updateStatus(v("guard.initError"),"error"),!1}}var We=window.fetch;async function Bn(){d("\u{1F3AF} Iniciando selecci\xF3n paso a paso del \xE1rea");let o=null,e=null,t="upperLeft",r=!1,n=()=>{window.fetch!==We&&(window.fetch=We,d("\u{1F504} Fetch original restaurado"))};(()=>{window.fetch=async(a,c)=>{if(!r&&typeof a=="string"&&a.includes("/s0/pixel/")&&c&&c.method==="POST")try{d(`\u{1F3AF} Interceptando request de pintado: ${a}`);let l=await We(a,c);if(l.ok&&c.body){let u;try{u=JSON.parse(c.body)}catch(g){return d("Error parseando body del request:",g),l}if(u.coords&&Array.isArray(u.coords)&&u.coords.length>=2){let g=u.coords[0],m=u.coords[1],h=a.match(/\/s0\/pixel\/(-?\d+)\/(-?\d+)/);if(h){let p=parseInt(h[1]),x=parseInt(h[2]),f=p*I.TILE_SIZE+g,w=x*I.TILE_SIZE+m;if(t==="upperLeft")o={x:f,y:w},i.ui.updateCoordinates({x1:f,y1:w}),i.ui.updateStatus(v("guard.upperLeftCaptured",{x:f,y:w}),"success"),d(`\u2705 Esquina superior izquierda capturada: (${f}, ${w})`),t="lowerRight",setTimeout(()=>{t==="lowerRight"&&i.ui.updateStatus(v("guard.selectLowerRight"),"info")},1500);else if(t==="lowerRight"){if(e={x:f,y:w},i.ui.updateCoordinates({x2:f,y2:w}),i.ui.updateStatus(v("guard.lowerRightCaptured",{x:f,y:w}),"success"),d(`\u2705 Esquina inferior derecha capturada: (${f}, ${w})`),r=!0,n(),o.x>=e.x||o.y>=e.y)return i.ui.updateStatus(v("guard.invalidArea"),"error"),l;setTimeout(async()=>{await Fn(o,e)},1e3)}}}}return l}catch(l){return d("\u274C Error interceptando pixel:",l),n(),We(a,c)}return We(a,c)}})(),i.ui.updateStatus(v("guard.selectUpperLeft"),"info"),setTimeout(()=>{r||(n(),i.ui.updateStatus(v("guard.selectionTimeout"),"error"),d("\u23F0 Timeout en selecci\xF3n de \xE1rea"))},12e4)}async function Fn(o,e){try{let t={x1:o.x,y1:o.y,x2:e.x,y2:e.y};i.ui.updateStatus(v("guard.capturingArea"),"info");let r=await te(t,{allowVirtual:!0});i.protectionArea=t,i.originalPixels=r,i.changes.clear();let n=r.size>0&&Array.from(r.values()).every(s=>s.colorId===5&&s.r===255&&s.g===255&&s.b===255);i.ui.updateProgress(r.size,0,n),i.ui.updateStatus(v("guard.areaCaptured",{count:r.size}),"success"),i.ui.enableStartBtn(),d(`\u2705 \xC1rea capturada: ${r.size} p\xEDxeles protegidos`);try{$("area_captured",{botVariant:"auto-guard",metadata:{count:r.size,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}})}catch{}}catch(t){d("\u274C Error capturando \xE1rea:",t),i.ui.updateStatus(v("guard.captureError",{error:t.message}),"error")}}async function $n(){if(!i.protectionArea||!i.originalPixels.size){i.ui.updateStatus(v("guard.captureFirst"),"error");return}if(i.running=!0,i.watchMode=!1,i.totalRepaired=0,i.ui.setRunningState(!0),i.operationMode==="erase"){i.ui.updateStatus("\u{1F5D1}\uFE0F Protecci\xF3n de borrado iniciada","success"),d("\u{1F5D1}\uFE0F Iniciando protecci\xF3n de borrado del \xE1rea");try{$("mode_change",{botVariant:"auto-guard",metadata:{mode:"erase"}})}catch{}}else{i.ui.updateStatus(v("guard.protectionStarted"),"success"),d("\u{1F6E1}\uFE0F Iniciando protecci\xF3n del \xE1rea");try{$("mode_change",{botVariant:"auto-guard",metadata:{mode:"protect"}})}catch{}}i.checkInterval=Xt(fe,I.CHECK_INTERVAL),tt(),await fe()}async function Nn(){if(!i.protectionArea||!i.originalPixels.size){i.ui.updateStatus(v("guard.captureFirst"),"error");return}i.running=!0,i.watchMode=!0,i.totalRepaired=0,i.ui.setRunningState(!0),i.ui.updateWatchButton(!0),i.ui.updateStatus("\u{1F441}\uFE0F Modo Vig\xEDa iniciado - solo monitorizaci\xF3n","success"),d("\u{1F441}\uFE0F Iniciando modo Vig\xEDa del \xE1rea"),i.checkInterval=Xt(fe,I.CHECK_INTERVAL),tt(),await fe()}function Vt(){var e,t;let o=i.watchMode;i.running=!1,i.watchMode=!1,i.checkInterval&&(jt(i.checkInterval),i.checkInterval=null),kt(),Rt();try{q().ENABLED&&((e=window.__wplaceMetrics)!=null&&e.guardPingInterval&&(jt(window.__wplaceMetrics.guardPingInterval),window.__wplaceMetrics.guardPingInterval=null),(t=window.__wplaceMetrics)!=null&&t.guardSessionActive&&(Ct({botVariant:"auto-guard"}),window.__wplaceMetrics.guardSessionActive=!1))}catch{}if(i.ui){i.ui.setRunningState(!1),i.ui.updateWatchButton(!1);let r=o?"\u23F9\uFE0F Vig\xEDa detenido":v("guard.protectionStopped");i.ui.updateStatus(r,"warning")}d(o?"\u23F9\uFE0F Vig\xEDa detenido":"\u23F9\uFE0F Protecci\xF3n detenida");try{$("mode_change",{botVariant:"auto-guard",metadata:{mode:"stopped"}})}catch{}}var G={isRepositioning:!1,originalPixels:null,originalArea:null,overlayEnabled:!1};async function sr(){if(!i.protectionArea||!i.originalPixels||i.originalPixels.size===0){i.ui.updateStatus("\u274C No hay \xE1rea protegida para reposicionar","error"),d("\u274C No hay \xE1rea capturada para reposicionar");return}d("\u{1F4CD} Iniciando reposicionamiento del \xE1rea protegida..."),G.originalPixels=new Map(i.originalPixels),G.originalArea={...i.protectionArea},G.isRepositioning=!0;let o=document.createElement("div");o.id="repositionStatus",o.style.cssText=`
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background: #1f2937;
color: #fff;
padding: 15px 20px;
border-radius: 8px;
border: 2px solid #8b5cf6;
z-index: 100003;
font-family: 'Segoe UI', Roboto, sans-serif;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
`,o.innerHTML=`
<div style="text-align: center;">
<div style="font-weight: bold; margin-bottom: 8px;">\u{1F4CD} Reposicionamiento Activo</div>
<div style="font-size: 14px; color: #cbd5e0;">Pinta un p\xEDxel en la nueva esquina superior izquierda</div>
</div>
`,document.body.appendChild(o),await Wn(o)}async function Wn(o){return new Promise(e=>{let t=!1,r=window.fetch;window.fetch=async function(...n){var c,l,u;let s=await r.apply(this,n);if(!G.isRepositioning||t)return s;let a=((c=n[0])==null?void 0:c.url)||n[0];if(a&&a.includes("/s0/pixel/")&&((l=n[1])==null?void 0:l.method)==="POST")try{d("\u{1F50D} Request interceptado:",a);let g=a.match(/\/s0\/pixel\/(-?\d+)\/(-?\d+)/);if(g){let m=parseInt(g[1]),h=parseInt(g[2]);d(`\u{1F50D} Tile extra\xEDdo de URL: (${m}, ${h})`);let p=(u=n[1])==null?void 0:u.body;if(d("\u{1F50D} Request body:",p),p){let x=JSON.parse(p);d("\u{1F50D} Body data:",x);let f=x.coords;if(f&&f.length>0){t=!0,d("\u{1F50D} Coords array structure:",f,"Length:",f.length);let w,C;if(f.length>=2&&typeof f[0]=="number"&&typeof f[1]=="number")w=f[0],C=f[1],d("\u{1F50D} Coordenadas como n\xFAmeros separados:",w,C);else if(Array.isArray(f[0]))w=f[0][0],C=f[0][1],d("\u{1F50D} Coordenadas como array anidado:",w,C);else if(typeof f[0]=="object"&&f[0].x!==void 0)w=f[0].x,C=f[0].y,d("\u{1F50D} Coordenadas como objeto:",w,C);else return d("\u274C Formato de coordenadas no reconocido:",f),s;(w<0||w>=1e3||C<0||C>=1e3)&&d(`\u26A0\uFE0F Coordenadas relativas fuera de rango: (${w}, ${C})`);let P=m*1e3+w,y=h*1e3+C;d(`\u{1F4CD} Nueva posici\xF3n capturada: (${P}, ${y})`),d(`\u{1F4D0} C\xE1lculo: Tile(${m}, ${h}) * 1000 + Relativa(${w}, ${C}) = Global(${P}, ${y})`),window.fetch=r,await Dn(P,y,o),e()}}}else d("\u274C No se pudo extraer tile de URL:",a)}catch(g){d("\u274C Error capturando nueva posici\xF3n:",g)}return s},setTimeout(()=>{t||(window.fetch=r,G.isRepositioning=!1,o.remove(),d("\u23F0 Timeout en captura de nueva posici\xF3n"),e())},3e4)})}async function Dn(o,e,t){let r=G.originalArea,n=o-r.x1,s=e-r.y1;d(`\u{1F4D0} Calculando offset para trasladar patr\xF3n: (${n}, ${s})`),d(`\u{1F4CB} Trasladando ${G.originalPixels.size} p\xEDxeles con sus colores originales`);let a={x1:r.x1+n,y1:r.y1+s,x2:r.x2+n,y2:r.y2+s,tileX:Math.floor((r.x1+n)/I.TILE_SIZE),tileY:Math.floor((r.y1+s)/I.TILE_SIZE)},c=new Map;G.originalPixels.forEach((l,u)=>{let[g,m]=u.split(",").map(Number),h=g+n,p=m+s,x=`${h},${p}`,f=Math.floor(h/I.TILE_SIZE),w=Math.floor(p/I.TILE_SIZE),C=(h%I.TILE_SIZE+I.TILE_SIZE)%I.TILE_SIZE,P=(p%I.TILE_SIZE+I.TILE_SIZE)%I.TILE_SIZE,y=f*I.TILE_SIZE+C,S=w*I.TILE_SIZE+P;(y!==h||S!==p)&&d(`\u26A0\uFE0F Error en c\xE1lculo de coordenadas: Global(${h},${p}) vs Esperado(${y},${S})`);let b={r:l.r,g:l.g,b:l.b,colorId:l.colorId,globalX:h,globalY:p,localX:C,localY:P,tileX:f,tileY:w};c.set(x,b),c.size<=5&&(d(`\u{1F3A8} P\xEDxel trasladado #${c.size}:`),d(` Original: (${g},${m}) color(${l.r},${l.g},${l.b}) ID:${l.colorId}`),d(` Nuevo: Global(${h},${p}) Tile(${f},${w}) Local(${C},${P})`),d(` Verificaci\xF3n: ${f}*1000 + ${C} = ${f*1e3+C} (debe ser ${h})`))}),d(`\u2705 Patr\xF3n de colores trasladado: ${c.size} p\xEDxeles con coordenadas actualizadas`),await On(a,c,t)}async function On(o,e,t){G.overlayEnabled=!0,ye.showProtectionArea(o),d("\u{1F3AF} Overlay visual activado para vista previa de reposicionamiento"),t.innerHTML=`
<div style="text-align: center;">
<div style="font-weight: bold; margin-bottom: 8px;">\u{1F4CD} Vista Previa de Reposicionamiento</div>
<div style="font-size: 14px; color: #cbd5e0; margin-bottom: 8px;">Nueva \xE1rea: (${o.x1}, ${o.y1}) \u2192 (${o.x2}, ${o.y2})</div>
<div style="font-size: 14px; color: #cbd5e0; margin-bottom: 15px;">\xBFConfirmar nueva posici\xF3n?</div>
<div style="display: flex; gap: 10px; justify-content: center;">
<button id="confirmReposition" style="padding: 8px 16px; background: #10b981; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600;">
\u2705 Aceptar
</button>
<button id="retryReposition" style="padding: 8px 16px; background: #f59e0b; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600;">
\u{1F504} Repetir
</button>
<button id="cancelReposition" style="padding: 8px 16px; background: #ef4444; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 600;">
\u274C Cancelar
</button>
</div>
</div>
`,t.querySelector("#confirmReposition").addEventListener("click",()=>{Un(o,e,t)}),t.querySelector("#retryReposition").addEventListener("click",()=>{qn(t)}),t.querySelector("#cancelReposition").addEventListener("click",()=>{Gn(t)})}async function Un(o,e,t){i.protectionArea=o,i.originalPixels=e,i.changes.clear(),i.totalRepaired=0,i.ui.updateCoordinates({x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}),i.ui.updateProgress(0,e.size),ye.hideProtectionArea(),d("\u{1F3AF} Overlay visual desactivado tras confirmar reposicionamiento"),Zt(t),i.ui.updateStatus("\u2705 \xC1rea reposicionada correctamente","success"),d("\u2705 Reposicionamiento confirmado - patr\xF3n de colores trasladado a nueva ubicaci\xF3n");try{$("reposition_confirm",{botVariant:"auto-guard",metadata:{size:e.size,x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}})}catch{}d(`\u{1F4CB} Protegiendo ${e.size} p\xEDxeles con los colores originales en coordenadas (${o.x1},${o.y1}) \u2192 (${o.x2},${o.y2})`),i.running&&(d("\u{1F50D} Ejecutando verificaci\xF3n inmediata tras reposicionamiento..."),setTimeout(async()=>{await fe()},2e3))}function qn(o){ye.hideProtectionArea(),d("\u{1F3AF} Overlay visual desactivado para reintentar reposicionamiento"),Zt(o),sr();try{$("reposition_retry",{botVariant:"auto-guard"})}catch{}}function Gn(o){ye.hideProtectionArea(),d("\u{1F3AF} Overlay visual desactivado tras cancelar reposicionamiento"),Zt(o),i.ui.updateStatus("\u274C Reposicionamiento cancelado","warning"),d("\u274C Reposicionamiento cancelado");try{$("reposition_cancel",{botVariant:"auto-guard"})}catch{}}function Zt(o){G.isRepositioning=!1,G.originalPixels=null,G.originalArea=null,G.overlayEnabled=!1,o.remove()}(async function(){var o;try{console.log("[WPA-Guard] \u{1F916} Iniciando auto-click del bot\xF3n Paint..."),await or(3,!0)}catch(e){console.log("[WPA-Guard] \u26A0\uFE0F Error en auto-click del bot\xF3n Paint:",e)}(o=window.__wplaceBot)!=null&&o.guardRunning?alert("Auto-Guard ya est\xE1 corriendo."):ar().catch(e=>{console.error("[WPA-GUARD] Error en Auto-Guard:",e),window.__wplaceBot&&(window.__wplaceBot.guardRunning=!1),alert("Auto-Guard: error inesperado. Revisa consola.")})})();})();