forked from Alarisco/WPlace-AutoBOTV2-GuardBOT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuto-Image.js
More file actions
1157 lines (1039 loc) · 293 KB
/
Auto-Image.js
File metadata and controls
1157 lines (1039 loc) · 293 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
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* WPlace AutoBOT — uso bajo tu responsabilidad. Compilado 2025-09-23T20:54:18.163Z */
/* eslint-env browser */
/* eslint-disable no-empty */
(()=>{var ho=Object.defineProperty;var ee=(t,e)=>()=>(t&&(e=t(t=0)),e);var mt=(t,e)=>{for(var o in e)ho(t,o,{get:e[o],enumerable:!0})};var u,V=ee(()=>{u=(...t)=>console.log("[WPA-UI]",...t)});var ht,ft=ee(()=>{ht={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",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...",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:"WPlace Farm Bot",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.",selectPosition:"Seleccionar Zona",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",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",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",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",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 wt,xt=ee(()=>{wt={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",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...",protectionEnabled:"Protection enabled",protectionDisabled:"Protection disabled",paintPattern:"Paint pattern",patternLinearStart:"Linear (Start)",patternLinearEnd:"Linear (End)",patternRandom:"Random",patternCenterOut:"Center outward",patternCornersFirst:"Corners first",patternSpiral:"Spiral",solid:"Solid",stripes:"Stripes",checkerboard:"Checkerboard",gradient:"Gradient",dots:"Dots",waves:"Waves",spiral:"Spiral",mosaic:"Mosaic",bricks:"Bricks",zigzag:"Zigzag",protectingDrawing:"Protecting drawing...",changesDetected:"\u{1F6A8} {count} changes detected in drawing",repairing:"\u{1F527} Repairing {count} altered pixels...",repairCompleted:"\u2705 Repair completed: {count} pixels",noChargesForRepair:"\u26A1 No charges for repair, waiting...",protectionPriority:"\u{1F6E1}\uFE0F Protection priority activated",patternApplied:"Pattern applied",customPattern:"Custom pattern",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"Download Logs",clearLogs:"Clear Logs",closeLogs:"Close"},farm:{title:"WPlace Farm Bot",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",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.",selectPosition:"Select Area",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 Area set! Radius: 500px",positionTimeout:"\u274C Timeout for area selection",missingPosition:"\u274C Select an area first using 'Select Area'",farmRadius:"Farm radius",positionInfo:"Current area",farmingInRadius:"\u{1F33E} Farming in {radius}px radius from ({x},{y})",selectEmptyArea:"\u26A0\uFE0F IMPORTANT: Select an EMPTY area to avoid conflicts",noPosition:"No area",currentZone:"Zone: ({x},{y})",autoSelectPosition:"\u{1F3AF} Select an area 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"},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",captureArea:"Capture Area",startProtection:"Start Protection",stopProtection:"Stop Protection",upperLeft:"Upper Left Corner",lowerRight:"Lower Right Corner",protectedPixels:"Protected Pixels",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 protection area...",areaCaptured:"\u2705 Area captured: {count} pixels under protection",captureError:"\u274C Error capturing area: {error}",captureFirst:"\u274C First capture a protection area",protectionStarted:"\u{1F6E1}\uFE0F Protection started - monitoring area",protectionStopped:"\u23F9\uFE0F Protection stopped",noChanges:"\u2705 Protected area - no changes detected",changesDetected:"\u{1F6A8} {count} changes detected in protected 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 protected area...",errorChecking:"\u274C Error checking changes: {error}",guardActive:"\u{1F6E1}\uFE0F Guardian active - area under protection",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",selectUpperLeft:"\u{1F3AF} Paint a pixel at the UPPER LEFT corner of the area to protect",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",configTitle:"Guard Configuration",protectionPatterns:"Protection Patterns",preferSpecificColor:"Prioritize specific color",excludeSpecificColors:"Don't repair specific colors",loadManagement:"Load Management",minLoadsToWait:"Minimum loads to wait",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)"}}});var yt,bt=ee(()=>{yt={launcher:{title:"WPlace AutoBOT",autoFarm:"\u{1F33E} Auto-Farm",autoImage:"\u{1F3A8} Auto-Image",autoGuard:"\u{1F6E1}\uFE0F Auto-Guard",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"},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:"Usager",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\u2019attente du serveur, nouvelle tentative...",protectionEnabled:"Protection activ\xE9e",protectionDisabled:"Protection d\xE9sactiv\xE9e",paintPattern:"Motif de peinture",patternLinearStart:"Lin\xE9aire (D\xE9but)",patternLinearEnd:"Lin\xE9aire (Fin)",patternRandom:"Al\xE9atoire",patternCenterOut:"Centre vers l\u2019ext\xE9rieur",patternCornersFirst:"Coins d\u2019abord",patternSpiral:"Spirale",solid:"Plein",stripes:"Rayures",checkerboard:"Damier",gradient:"D\xE9grad\xE9",dots:"Points",waves:"Vagues",spiral:"Spirale",mosaic:"Mosa\xEFque",bricks:"Briques",zigzag:"Zigzag",protectingDrawing:"Protection du dessin...",changesDetected:"\u{1F6A8} {count} changements d\xE9tect\xE9s dans le dessin",repairing:"\u{1F527} R\xE9paration de {count} pixels modifi\xE9s...",repairCompleted:"\u2705 R\xE9paration termin\xE9e : {count} pixels",noChargesForRepair:"\u26A1 Pas de frais pour la r\xE9paration, en attente...",protectionPriority:"\u{1F6E1}\uFE0F Priorit\xE9 \xE0 la protection activ\xE9e",patternApplied:"Motif appliqu\xE9",customPattern:"Motif personnalis\xE9",logWindow:"Logs",logWindowTitle:"Logs - {botName}",downloadLogs:"T\xE9l\xE9charger Logs",clearLogs:"Effacer Logs",closeLogs:"Fermer"},farm:{title:"WPlace Farm Bot",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",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.",selectPosition:"S\xE9lectionner Zone",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! Rayon: 500px",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"},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",captureArea:"Capturer Zone",startProtection:"D\xE9marrer Protection",stopProtection:"Arr\xEAter Protection",upperLeft:"Coin Sup\xE9rieur Gauche",lowerRight:"Coin Inf\xE9rieur Droit",protectedPixels:"Pixels Prot\xE9g\xE9s",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 de protection...",areaCaptured:"\u2705 Zone captur\xE9e: {count} pixels sous protection",captureError:"\u274C Erreur lors de la capture de zone: {error}",captureFirst:"\u274C Capturez d'abord une zone de protection",protectionStarted:"\u{1F6E1}\uFE0F Protection d\xE9marr\xE9e - surveillance de la zone",protectionStopped:"\u23F9\uFE0F Protection arr\xEAt\xE9e",noChanges:"\u2705 Zone prot\xE9g\xE9e - aucun changement d\xE9tect\xE9",changesDetected:"\u{1F6A8} {count} changements d\xE9tect\xE9s dans la zone prot\xE9g\xE9e",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 prot\xE9g\xE9e...",errorChecking:"\u274C Erreur lors de la v\xE9rification des changements: {error}",guardActive:"\u{1F6E1}\uFE0F Gardien actif - zone sous protection",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",selectUpperLeft:"\u{1F3AF} Peignez un pixel au coin SUP\xC9RIEUR GAUCHE de la zone \xE0 prot\xE9ger",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",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 \xE0 attendre",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)"}}});var Pt,Ct=ee(()=>{Pt={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",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:"Logs",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"},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...",protectionEnabled:"\u0417\u0430\u0449\u0438\u0442\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430",protectionDisabled:"\u0417\u0430\u0449\u0438\u0442\u0430 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430",paintPattern:"\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",solid:"\u0421\u043F\u043B\u043E\u0448\u043D\u043E\u0439",stripes:"\u041F\u043E\u043B\u043E\u0441\u044B",checkerboard:"\u0428\u0430\u0445\u043C\u0430\u0442\u043D\u0430\u044F \u0434\u043E\u0441\u043A\u0430",gradient:"\u0413\u0440\u0430\u0434\u0438\u0435\u043D\u0442",dots:"\u0422\u043E\u0447\u043A\u0438",waves:"\u0412\u043E\u043B\u043D\u044B",spiral:"\u0421\u043F\u0438\u0440\u0430\u043B\u044C",mosaic:"\u041C\u043E\u0437\u0430\u0438\u043A\u0430",bricks:"\u041A\u0438\u0440\u043F\u0438\u0447\u0438",zigzag:"\u0417\u0438\u0433\u0437\u0430\u0433",protectingDrawing:"\u0417\u0430\u0449\u0438\u0442\u0430 \u0440\u0438\u0441\u0443\u043D\u043A\u0430...",changesDetected:"\u{1F6A8} \u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439: {count}",repairing:"\u{1F527} \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 {count} \u0438\u0437\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0445 \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439...",repairCompleted:"\u2705 \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E: {count} \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439",noChargesForRepair:"\u26A1 \u041A\u043E\u043C\u0438\u0441\u0441\u0438\u0439 \u0437\u0430 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u0442, \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435...",protectionPriority:"\u{1F6E1}\uFE0F \u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u044B \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D",patternApplied:"\u0428\u0430\u0431\u043B\u043E\u043D \u043F\u0440\u0438\u043C\u0435\u043D\u0451\u043D",customPattern:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0439 \u0448\u0430\u0431\u043B\u043E\u043D",logWindow:"Logs",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"},farm:{title:"WPlace \u0410\u0432\u0442\u043E-\u0424\u0430\u0440\u043C",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",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.",selectPosition:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C",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 \u041E\u0431\u043B\u0430\u0441\u0442\u044C \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430! \u0420\u0430\u0434\u0438\u0443\u0441: 500px",positionTimeout:"\u274C \u0422\u0430\u0439\u043C\u0430\u0443\u0442 \u0432\u044B\u0431\u043E\u0440\u0430 \u043E\u0431\u043B\u0430\u0441\u0442\u0438",missingPosition:"\u274C \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \xAB\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043E\u0431\u043B\u0430\u0441\u0442\u044C\xBB",farmRadius:"\u0420\u0430\u0434\u0438\u0443\u0441 \u0444\u0430\u0440\u043C\u0430",positionInfo:"\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C",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 \u043E\u0431\u043B\u0430\u0441\u0442\u0438",currentZone:"\u041E\u0431\u043B\u0430\u0441\u0442\u044C: ({x},{y})",autoSelectPosition:"\u{1F3AF} \u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u044C. \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 \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u0444\u0430\u0440\u043C\u0430.",logWindow:"Logs",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"},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",captureArea:"\u0417\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u044C \u041E\u0431\u043B\u0430\u0441\u0442\u044C",startProtection:"\u041D\u0430\u0447\u0430\u0442\u044C \u0417\u0430\u0449\u0438\u0442\u0443",stopProtection:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0417\u0430\u0449\u0438\u0442\u0443",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",protectedPixels:"\u0417\u0430\u0449\u0438\u0449\u0435\u043D\u043D\u044B\u0435 \u041F\u0438\u043A\u0441\u0435\u043B\u0438",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 \u0437\u0430\u0449\u0438\u0442\u044B...",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 \u043F\u043E\u0434 \u0437\u0430\u0449\u0438\u0442\u043E\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 \u0437\u0430\u0449\u0438\u0442\u044B",protectionStarted:"\u{1F6E1}\uFE0F \u0417\u0430\u0449\u0438\u0442\u0430 \u0437\u0430\u043F\u0443\u0449\u0435\u043D\u0430 - \u043C\u043E\u043D\u0438\u0442\u043E\u0440\u0438\u043D\u0433 \u043E\u0431\u043B\u0430\u0441\u0442\u0438",protectionStopped:"\u23F9\uFE0F \u0417\u0430\u0449\u0438\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430",noChanges:"\u2705 \u0417\u0430\u0449\u0438\u0449\u0435\u043D\u043D\u0430\u044F \u043E\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 \u0437\u0430\u0449\u0438\u0449\u0435\u043D\u043D\u043E\u0439 \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 \u0437\u0430\u0449\u0438\u0449\u0435\u043D\u043D\u043E\u0439 \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 \u0437\u0430\u0449\u0438\u0442\u043E\u0439",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",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 \u0437\u0430\u0449\u0438\u0442\u044B",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:"Logs",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",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 \u0437\u0430\u0433\u0440\u0443\u0437\u043E\u043A \u0434\u043B\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F",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)"}}});var vt,Et=ee(()=>{vt={launcher:{title:"WPlace \u81EA\u52A8\u673A\u5668\u4EBA",autoFarm:"\u{1F33E} \u81EA\u52A8\u519C\u573A",autoImage:"\u{1F3A8} \u81EA\u52A8\u7ED8\u56FE",autoGuard:"\u{1F6E1}\uFE0F \u81EA\u52A8\u5B88\u62A4",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:"\u{1F4CB} Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED"},image:{title:"WPlace \u81EA\u52A8\u7ED8\u56FE",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...",protectionEnabled:"\u5DF2\u5F00\u542F\u4FDD\u62A4",protectionDisabled:"\u5DF2\u5173\u95ED\u4FDD\u62A4",paintPattern:"\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",solid:"\u5B9E\u5FC3",stripes:"\u6761\u7EB9",checkerboard:"\u68CB\u76D8\u683C",gradient:"\u6E10\u53D8",dots:"\u70B9\u72B6",waves:"\u6CE2\u6D6A",spiral:"\u87BA\u65CB",mosaic:"\u9A6C\u8D5B\u514B",bricks:"\u7816\u5757",zigzag:"\u4E4B\u5B57\u5F62",protectingDrawing:"\u6B63\u5728\u4FDD\u62A4\u56FE\u7A3F...",changesDetected:"\u{1F6A8} \u68C0\u6D4B\u5230 {count} \u5904\u66F4\u6539",repairing:"\u{1F527} \u6B63\u5728\u4FEE\u590D {count} \u4E2A\u66F4\u6539\u7684\u50CF\u7D20...",repairCompleted:"\u2705 \u4FEE\u590D\u5B8C\u6210\uFF1A{count} \u4E2A\u50CF\u7D20",noChargesForRepair:"\u26A1 \u4FEE\u590D\u4E0D\u6D88\u8017\u70B9\u6570\uFF0C\u7B49\u5F85\u4E2D...",protectionPriority:"\u{1F6E1}\uFE0F \u5DF2\u542F\u7528\u4FDD\u62A4\u4F18\u5148",patternApplied:"\u5DF2\u5E94\u7528\u6A21\u5F0F",customPattern:"\u81EA\u5B9A\u4E49\u6A21\u5F0F",logWindow:"\u{1F4CB} Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED"},farm:{title:"WPlace \u519C\u573A\u673A\u5668\u4EBA",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:"\u{1F4CB} Logs",logWindowTitle:"\u65E5\u5FD7\u7A97\u53E3",downloadLogs:"\u4E0B\u8F7D\u65E5\u5FD7",clearLogs:"\u6E05\u9664\u65E5\u5FD7",closeLogs:"\u5173\u95ED"},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 \u81EA\u52A8\u5B88\u62A4",initBot:"\u521D\u59CB\u5316\u5B88\u62A4\u673A\u5668\u4EBA",selectArea:"\u9009\u62E9\u533A\u57DF",captureArea:"\u6355\u83B7\u533A\u57DF",startProtection:"\u5F00\u59CB\u5B88\u62A4",stopProtection:"\u505C\u6B62\u5B88\u62A4",upperLeft:"\u5DE6\u4E0A\u89D2",lowerRight:"\u53F3\u4E0B\u89D2",protectedPixels:"\u53D7\u4FDD\u62A4\u50CF\u7D20",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\u5B88\u62A4\u533A\u57DF\u4E2D...",areaCaptured:"\u2705 \u533A\u57DF\u6355\u83B7\u6210\u529F: {count} \u50CF\u7D20\u53D7\u4FDD\u62A4",captureError:"\u274C \u6355\u83B7\u533A\u57DF\u51FA\u9519: {error}",captureFirst:"\u274C \u8BF7\u5148\u6355\u83B7\u4E00\u4E2A\u5B88\u62A4\u533A\u57DF",protectionStarted:"\u{1F6E1}\uFE0F \u5B88\u62A4\u5DF2\u542F\u52A8 - \u533A\u57DF\u76D1\u63A7\u4E2D",protectionStopped:"\u23F9\uFE0F \u5B88\u62A4\u5DF2\u505C\u6B62",noChanges:"\u2705 \u533A\u57DF\u5B89\u5168 - \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",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:"\u{1F4CB} 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",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)"}}});var St,At=ee(()=>{St={launcher:{title:"WPlace \u81EA\u52D5\u6A5F\u5668\u4EBA",autoFarm:"\u{1F33E} \u81EA\u52D5\u8FB2\u5834",autoImage:"\u{1F3A8} \u81EA\u52D5\u7E6A\u5716",autoGuard:"\u{1F6E1}\uFE0F \u81EA\u52D5\u5B88\u8B77",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:"\u{1F4CB} Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589"},image:{title:"WPlace \u81EA\u52D5\u7E6A\u5716",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...",protectionEnabled:"\u5DF2\u555F\u7528\u4FDD\u8B77",protectionDisabled:"\u5DF2\u505C\u7528\u4FDD\u8B77",paintPattern:"\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",solid:"\u5BE6\u5FC3",stripes:"\u689D\u7D0B",checkerboard:"\u68CB\u76E4\u683C",gradient:"\u6F38\u5C64",dots:"\u9EDE\u72C0",waves:"\u6CE2\u6D6A",spiral:"\u87BA\u65CB",mosaic:"\u99AC\u8CFD\u514B",bricks:"\u78DA\u584A",zigzag:"\u4E4B\u5B57\u5F62",protectingDrawing:"\u6B63\u5728\u4FDD\u8B77\u7E6A\u5716...",changesDetected:"\u{1F6A8} \u5075\u6E2C\u5230 {count} \u8655\u8B8A\u66F4",repairing:"\u{1F527} \u6B63\u5728\u4FEE\u5FA9 {count} \u500B\u8B8A\u66F4\u7684\u50CF\u7D20...",repairCompleted:"\u2705 \u4FEE\u5FA9\u5B8C\u6210\uFF1A{count} \u500B\u50CF\u7D20",noChargesForRepair:"\u26A1 \u4FEE\u5FA9\u4E0D\u6D88\u8017\u9EDE\u6578\uFF0C\u7B49\u5F85\u4E2D...",protectionPriority:"\u{1F6E1}\uFE0F \u5DF2\u555F\u7528\u4FDD\u8B77\u512A\u5148",patternApplied:"\u5DF2\u5957\u7528\u6A21\u5F0F",customPattern:"\u81EA\u8A02\u6A21\u5F0F",logWindow:"\u{1F4CB} Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589"},farm:{title:"WPlace \u8FB2\u5834\u6A5F\u5668\u4EBA",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:"\u{1F4CB} Logs",logWindowTitle:"\u65E5\u8A8C\u8996\u7A97",downloadLogs:"\u4E0B\u8F09\u65E5\u8A8C",clearLogs:"\u6E05\u9664\u65E5\u8A8C",closeLogs:"\u95DC\u9589"},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 \u81EA\u52D5\u5B88\u8B77",initBot:"\u521D\u59CB\u5316\u5B88\u8B77\u6A5F\u5668\u4EBA",selectArea:"\u9078\u64C7\u5340\u57DF",captureArea:"\u6355\u7372\u5340\u57DF",startProtection:"\u958B\u59CB\u5B88\u8B77",stopProtection:"\u505C\u6B62\u5B88\u8B77",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\u5B88\u8B77\u5340\u57DF\u4E2D...",areaCaptured:"\u2705 \u5340\u57DF\u6355\u7372\u6210\u529F: {count} \u50CF\u7D20\u53D7\u4FDD\u8B77",captureError:"\u274C \u6355\u7372\u5340\u57DF\u51FA\u932F: {error}",captureFirst:"\u274C \u8ACB\u5148\u6355\u7372\u4E00\u500B\u5B88\u8B77\u5340\u57DF",protectionStarted:"\u{1F6E1}\uFE0F \u5B88\u8B77\u5DF2\u5553\u52D5 - \u5340\u57DF\u76E3\u63A7\u4E2D",protectionStopped:"\u23F9\uFE0F \u5B88\u8B77\u5DF2\u505C\u6B62",noChanges:"\u2705 \u5340\u57DF\u5B89\u5168 - \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",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:"\u{1F4CB} 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",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)"}}});function fo(){let e=(window.navigator.language||window.navigator.userLanguage||"es").split("-")[0].toLowerCase();return me[e]?e:"es"}function wo(){return null}function je(){let t=wo(),e=fo(),o="es";return t&&me[t]?o=t:e&&me[e]&&(o=e),xo(o),o}function xo(t){if(!me[t]){console.warn(`Idioma '${t}' no disponible. Usando '${_e}'`);return}_e=t,ye=me[t],typeof window!="undefined"&&window.CustomEvent&&window.dispatchEvent(new window.CustomEvent("languageChanged",{detail:{language:t,translations:ye}}))}function Tt(){return _e}function I(t,e={}){let o=t.split("."),n=ye;for(let i of o)if(n&&typeof n=="object"&&i in n)n=n[i];else return console.warn(`Clave de traducci\xF3n no encontrada: '${t}'`),t;return typeof n!="string"?(console.warn(`Clave de traducci\xF3n no es string: '${t}'`),t):yo(n,e)}function yo(t,e){return!e||Object.keys(e).length===0?t:t.replace(/\{(\w+)\}/g,(o,n)=>e[n]!==void 0?e[n]:o)}function Le(t){return ye[t]?ye[t]:(console.warn(`Secci\xF3n de traducci\xF3n no encontrada: '${t}'`),{})}var me,_e,ye,Ie=ee(()=>{ft();xt();bt();Ct();Et();At();me={es:ht,en:wt,fr:yt,ru:Pt,zhHans:vt,zhHant:St},_e="es",ye=me[_e];je()});var _t={};mt(_t,{IMAGE_DEFAULTS:()=>ne,TEXTS:()=>Po,getImageText:()=>bo,getImageTexts:()=>He,imageState:()=>l});function He(){return Le("image")}function bo(t,e={}){let n=He()[t]||t;return e&&Object.keys(e).length>0&&(n=n.replace(/\{(\w+)\}/g,(i,d)=>e[d]!==void 0?e[d]:i)),n}var ne,Po,l,he=ee(()=>{Ie();ne={SITEKEY:"0x4AAAAAABpqJe8FO0N84q0F",COOLDOWN_DEFAULT:31e3,TRANSPARENCY_THRESHOLD:100,WHITE_THRESHOLD:250,LOG_INTERVAL:10,TILE_SIZE:3e3,PIXELS_PER_BATCH:20,CHARGE_REGEN_MS:3e4,THEME:{primary:"#000000",secondary:"#111111",accent:"#222222",text:"#ffffff",highlight:"#775ce3",success:"#00ff00",error:"#ff0000",warning:"#ffaa00"}};Po={get es(){return console.warn("TEXTS.es est\xE1 deprecated. Usa getImageTexts() en su lugar."),He()}},l={running:!1,imageLoaded:!1,processing:!1,totalPixels:0,paintedPixels:0,availableColors:[],currentCharges:0,cooldown:ne.COOLDOWN_DEFAULT,imageData:null,stopFlag:!1,colorsChecked:!1,startPosition:null,selectingPosition:!1,positionTimeoutId:null,cleanupObserver:null,region:null,minimized:!1,lastPosition:{x:0,y:0},estimatedTime:0,language:"es",tileX:null,tileY:null,pixelsPerBatch:ne.PIXELS_PER_BATCH,useAllChargesFirst:!0,isFirstBatch:!0,maxCharges:9999,nextBatchCooldown:0,inCooldown:!1,cooldownEndTime:0,remainingPixels:[],lastChargeUpdate:0,chargeDecimalPart:0,originalImageName:null,retryCount:0,paintPattern:"linear_start"}});var nt={};mt(nt,{PAINT_PATTERNS:()=>R,applyPaintPattern:()=>it,getPatternName:()=>ot,sortPixelsByPattern:()=>Xt});function ot(t){return{[R.LINEAR_START]:"\u27A1\uFE0F Lineal (Inicio)",[R.LINEAR_END]:"\u2B05\uFE0F Lineal (Final)",[R.RANDOM]:"\u{1F3B2} Aleatorio",[R.CENTER_OUT]:"\u{1F4A5} Centro hacia afuera",[R.CORNERS_FIRST]:"\u{1F3C1} Esquinas primero",[R.SPIRAL]:"\u{1F300} Espiral",[R.SNAKE]:"\u{1F40D} Serpiente (Zigzag)",[R.DIAGONAL_SWEEP]:"\u{1F4D0} Barrido diagonal",[R.BORDERS]:"\u{1F5BC}\uFE0F Bordes primero",[R.CENTER]:"\u{1F3AF} Centro primero",[R.QUADRANTS]:"\u{1F532} Cuadrantes",[R.BIASED_RANDOM]:"\u{1F3AF} Aleatorio sesgado (bordes)",[R.CLUSTERS]:"\u{1F3AA} Clusters",[R.PROXIMITY]:"\u{1F91D} Proximidad",[R.SWEEP]:"\u{1F9F9} Barrido por secciones",[R.PRIORITY]:"\u2B50 Prioridad (mixto)",[R.ANCHOR_POINTS]:"\u2693 Puntos de anclaje",[R.SPIRAL_CW]:"\u{1F504} Espiral (horaria)",[R.SPIRAL_CCW]:"\u{1F503} Espiral (antihoraria)"}[t]||t}function Xt(t,e,o,n){if(!t||t.length===0)return t;u(`\u{1F3A8} Aplicando patr\xF3n de pintado: ${ot(e)} (${t.length} p\xEDxeles)`);let i=[...t];switch(e){case R.LINEAR_START:return Yt(i);case R.LINEAR_END:return zo(i);case R.RANDOM:return Go(i);case R.CENTER_OUT:return jo(i,o,n);case R.CORNERS_FIRST:return Ho(i,o,n);case R.SPIRAL:return Vo(i,o,n);case R.SNAKE:return No(i);case R.DIAGONAL_SWEEP:return $o(i);case R.BORDERS:return Oo(i,o,n);case R.CENTER:return Gt(i,o,n);case R.QUADRANTS:return Fo(i,o,n);case R.BIASED_RANDOM:return Do(i,o,n);case R.CLUSTERS:return Wo(i,o,n);case R.PROXIMITY:return Uo(i);case R.SWEEP:return Yo(i);case R.PRIORITY:return qo(i,o,n);case R.ANCHOR_POINTS:return Xo(i,o,n);case R.SPIRAL_CW:return qt(i,o,n,!0);case R.SPIRAL_CCW:return qt(i,o,n,!1);default:return u(`\u26A0\uFE0F Patr\xF3n desconocido: ${e}, usando linear_start`),Yt(i)}}function Yt(t){return t.sort((e,o)=>{let n=e.imageY!==void 0?e.imageY:e.y,i=o.imageY!==void 0?o.imageY:o.y,d=e.imageX!==void 0?e.imageX:e.x,r=o.imageX!==void 0?o.imageX:o.x;return n!==i?n-i:d-r})}function zo(t){return t.sort((e,o)=>{let n=e.imageY!==void 0?e.imageY:e.y,i=o.imageY!==void 0?o.imageY:o.y,d=e.imageX!==void 0?e.imageX:e.x,r=o.imageX!==void 0?o.imageX:o.x;return n!==i?i-n:r-d})}function No(t){return t.sort((e,o)=>{var s,a,c,g;let n=(s=e.imageY)!=null?s:e.y,i=(a=o.imageY)!=null?a:o.y;if(n!==i)return n-i;let d=(c=e.imageX)!=null?c:e.x,r=(g=o.imageX)!=null?g:o.x;return n%2===0?d-r:r-d})}function $o(t){return t.sort((e,o)=>{var c,g,p,m;let n=(c=e.imageX)!=null?c:e.x,i=(g=e.imageY)!=null?g:e.y,d=(p=o.imageX)!=null?p:o.x,r=(m=o.imageY)!=null?m:o.y,s=n+i,a=d+r;return s!==a?s-a:n-d})}function Oo(t,e,o){let n=e-1,i=o-1;return t.sort((d,r)=>{var x,y,w,f;let s=(x=d.imageX)!=null?x:d.x,a=(y=d.imageY)!=null?y:d.y,c=(w=r.imageX)!=null?w:r.x,g=(f=r.imageY)!=null?f:r.y,p=Math.min(s,a,n-s,i-a),m=Math.min(c,g,n-c,i-g);return p-m})}function Gt(t,e,o){let n=e/2,i=o/2;return t.sort((d,r)=>{var x,y,w,f;let s=(x=d.imageX)!=null?x:d.x,a=(y=d.imageY)!=null?y:d.y,c=(w=r.imageX)!=null?w:r.x,g=(f=r.imageY)!=null?f:r.y,p=(s-n)*(s-n)+(a-i)*(a-i),m=(c-n)*(c-n)+(g-i)*(g-i);return p-m})}function Fo(t,e,o){let n=e/2,i=o/2,d=(r,s)=>s<i?r<n?0:1:r<n?2:3;return t.sort((r,s)=>{var f,P,b,h;let a=(f=r.imageX)!=null?f:r.x,c=(P=r.imageY)!=null?P:r.y,g=(b=s.imageX)!=null?b:s.x,p=(h=s.imageY)!=null?h:s.y,m=d(a,c),x=d(g,p);if(m!==x)return m-x;let y=(a-n)*(a-n)+(c-i)*(c-i),w=(g-n)*(g-n)+(p-i)*(p-i);return y-w})}function Do(t,e,o){let n=e-1,i=o-1,d=(s,a)=>1+Math.min(s,a,n-s,i-a),r=(s,a)=>{let c=(s+1)*73856093^(a+1)*19349663;return c^=c<<13,c^=c>>17,c^=c<<5,(c>>>0)/4294967295};return t.sort((s,a)=>{var w,f,P,b;let c=(w=s.imageX)!=null?w:s.x,g=(f=s.imageY)!=null?f:s.y,p=(P=a.imageX)!=null?P:a.x,m=(b=a.imageY)!=null?b:a.y,x=d(c,g)-r(c,g);return d(p,m)-r(p,m)-x})}function Wo(t,e,o){if(t.length<64)return Gt(t,e,o);let n=[];for(let d=1;d<=3;d++)for(let r=1;r<=3;r++)n.push({x:Math.round(r*e/4),y:Math.round(d*o/4)});let i=(d,r)=>{let s=0,a=1/0;for(let c=0;c<n.length;c++){let g=n[c],p=(d-g.x)*(d-g.x)+(r-g.y)*(r-g.y);p<a&&(a=p,s=c)}return s};return t.sort((d,r)=>{var f,P,b,h;let s=(f=d.imageX)!=null?f:d.x,a=(P=d.imageY)!=null?P:d.y,c=(b=r.imageX)!=null?b:r.x,g=(h=r.imageY)!=null?h:r.y,p=i(s,a),m=i(c,g);if(p!==m)return p-m;let x=n[p],y=(s-x.x)*(s-x.x)+(a-x.y)*(a-x.y),w=(c-x.x)*(c-x.x)+(g-x.y)*(g-x.y);return y-w})}function Uo(t){let e=n=>(n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,n),o=(n,i)=>e(i)<<1|e(n);return t.sort((n,i)=>{var d,r,s,a;return o((d=n.imageX)!=null?d:n.x,(r=n.imageY)!=null?r:n.y)-o((s=i.imageX)!=null?s:i.x,(a=i.imageY)!=null?a:i.y)})}function Yo(t){return t.sort((e,o)=>{var c,g,p,m;let n=(c=e.imageX)!=null?c:e.x,i=(g=e.imageY)!=null?g:e.y,d=(p=o.imageX)!=null?p:o.x,r=(m=o.imageY)!=null?m:o.y,s=Math.floor(i/8)<<16|Math.floor(n/8),a=Math.floor(r/8)<<16|Math.floor(d/8);return s!==a?s-a:i!==r?i-r:n-d})}function qo(t,e,o){let n=e/2,i=o/2,d=e-1,r=o-1,s=(c,g)=>Math.min(c,g,d-c,r-g),a=(c,g)=>{let p=(c+7)*2654435761^(g+13)*2246822519;return p^=p<<13,p^=p>>17,p^=p<<5,(p>>>0)/4294967295};return t.sort((c,g)=>{var h,E,C,S;let p=(h=c.imageX)!=null?h:c.x,m=(E=c.imageY)!=null?E:c.y,x=(C=g.imageX)!=null?C:g.x,y=(S=g.imageY)!=null?S:g.y,w=(p-n)*(p-n)+(m-i)*(m-i),f=(x-n)*(x-n)+(y-i)*(y-i),P=-.4*w+.3*s(p,m)+.3*a(p,m);return-.4*f+.3*s(x,y)+.3*a(x,y)-P})}function Xo(t,e,o){let n=[{x:0,y:0},{x:e-1,y:0},{x:0,y:o-1},{x:e-1,y:o-1},{x:Math.round((e-1)/2),y:Math.round((o-1)/2)}],i=(d,r)=>{let s=1/0;for(let a of n){let c=(d-a.x)*(d-a.x)+(r-a.y)*(r-a.y);c<s&&(s=c)}return s};return t.sort((d,r)=>{var p,m,x,y;let s=(p=d.imageX)!=null?p:d.x,a=(m=d.imageY)!=null?m:d.y,c=(x=r.imageX)!=null?x:r.x,g=(y=r.imageY)!=null?y:r.y;return i(s,a)-i(c,g)})}function qt(t,e,o,n=!0){let i=(e-1)/2,d=(o-1)/2;return t.sort((r,s)=>{var f,P,b,h;let a=(f=r.imageX)!=null?f:r.x,c=(P=r.imageY)!=null?P:r.y,g=(b=s.imageX)!=null?b:s.x,p=(h=s.imageY)!=null?h:s.y,m=Math.hypot(a-i,c-d),x=Math.hypot(g-i,p-d);if(Math.abs(m-x)>.5)return m-x;let y=Math.atan2(c-d,a-i),w=Math.atan2(p-d,g-i);return n?y-w:w-y})}function Go(t){for(let e=t.length-1;e>0;e--){let o=Math.floor(Math.random()*(e+1));[t[e],t[o]]=[t[o],t[e]]}return t}function jo(t,e,o){let n=e/2,i=o/2;return t.sort((d,r)=>{let s=d.imageX!==void 0?d.imageX:d.x,a=d.imageY!==void 0?d.imageY:d.y,c=r.imageX!==void 0?r.imageX:r.x,g=r.imageY!==void 0?r.imageY:r.y,p=Math.sqrt(Math.pow(s-n,2)+Math.pow(a-i,2)),m=Math.sqrt(Math.pow(c-n,2)+Math.pow(g-i,2));return p-m})}function Ho(t,e,o){let n=[{x:0,y:0},{x:e-1,y:0},{x:0,y:o-1},{x:e-1,y:o-1}];return t.sort((i,d)=>{let r=i.imageX!==void 0?i.imageX:i.x,s=i.imageY!==void 0?i.imageY:i.y,a=d.imageX!==void 0?d.imageX:d.x,c=d.imageY!==void 0?d.imageY:d.y,g=Math.min(...n.map(m=>Math.sqrt(Math.pow(r-m.x,2)+Math.pow(s-m.y,2)))),p=Math.min(...n.map(m=>Math.sqrt(Math.pow(a-m.x,2)+Math.pow(c-m.y,2))));return g-p})}function Vo(t,e,o){let n=new Map,i=0,d=0,r=e-1,s=0,a=o-1;for(;d<=r&&s<=a;){for(let c=d;c<=r;c++)n.set(`${c},${s}`,i++);s++;for(let c=s;c<=a;c++)n.set(`${r},${c}`,i++);if(r--,s<=a){for(let c=r;c>=d;c--)n.set(`${c},${a}`,i++);a--}if(d<=r){for(let c=a;c>=s;c--)n.set(`${d},${c}`,i++);d++}}return t.sort((c,g)=>{let p=c.imageX!==void 0?c.imageX:c.x,m=c.imageY!==void 0?c.imageY:c.y,x=g.imageX!==void 0?g.imageX:g.x,y=g.imageY!==void 0?g.imageY:g.y,w=n.get(`${p},${m}`)||Number.MAX_SAFE_INTEGER,f=n.get(`${x},${y}`)||Number.MAX_SAFE_INTEGER;return w-f})}function it(t,e,o){if(!t||t.length===0)return t;let n=(o==null?void 0:o.width)||100,i=(o==null?void 0:o.height)||100,d=Xt(t,e,n,i);return u(`\u2705 Patr\xF3n aplicado: ${ot(e)} a ${d.length} p\xEDxeles`),d}var R,Oe=ee(()=>{V();R={LINEAR_START:"linear_start",LINEAR_END:"linear_end",RANDOM:"random",CENTER_OUT:"center_out",CORNERS_FIRST:"corners_first",SPIRAL:"spiral",SNAKE:"snake",DIAGONAL_SWEEP:"diagonal_sweep",BORDERS:"borders",CENTER:"center",QUADRANTS:"quadrants",BIASED_RANDOM:"biased_random",CLUSTERS:"clusters",PROXIMITY:"proximity",SWEEP:"sweep",PRIORITY:"priority",ANCHOR_POINTS:"anchor_points",SPIRAL_CW:"spiral_cw",SPIRAL_CCW:"spiral_ccw"}});V();he();V();V();var Q=class t{static _rgbToLab(e,o,n){let i=b=>(b/=255,b<=.04045?b/12.92:Math.pow((b+.055)/1.055,2.4)),d=i(e),r=i(o),s=i(n),a=d*.4124+r*.3576+s*.1805,c=d*.2126+r*.7152+s*.0722,g=d*.0193+r*.1192+s*.9505;a/=.95047,c/=1,g/=1.08883;let p=b=>b>.008856?Math.cbrt(b):7.787*b+16/116,m=p(a),x=p(c),y=p(g),w=116*x-16,f=500*(m-x),P=200*(x-y);return[w,f,P]}static _lab(e,o,n){t._labCache||(t._labCache=new Map);let i=e<<16|o<<8|n,d=t._labCache.get(i);return d||(d=t._rgbToLab(e,o,n),t._labCache.set(i,d)),d}static findClosestPaletteColor(e,o,n,i,d={}){var m,x,y,w,f,P;if(!i||i.length===0)return null;let{useLegacyRgb:r=!1,chromaPenalty:s=0,whiteThreshold:a=240,maxDistance:c=1/0}=d;if(e>=a&&o>=a&&n>=a){let b=i.find(h=>{var T,L,_;let E=h.r||((T=h.rgb)==null?void 0:T.r)||0,C=h.g||((L=h.rgb)==null?void 0:L.g)||0,S=h.b||((_=h.rgb)==null?void 0:_.b)||0;return E>=a&&C>=a&&S>=a});if(b)return b}let g=null,p=1/0;if(r)for(let b of i){let h=b.r||((m=b.rgb)==null?void 0:m.r)||0,E=b.g||((x=b.rgb)==null?void 0:x.g)||0,C=b.b||((y=b.rgb)==null?void 0:y.b)||0,S=Math.sqrt(Math.pow(e-h,2)+Math.pow(o-E,2)+Math.pow(n-C,2));S<p&&(p=S,g=b)}else{let b=t._lab(e,o,n);for(let h of i){let E=h.r||((w=h.rgb)==null?void 0:w.r)||0,C=h.g||((f=h.rgb)==null?void 0:f.g)||0,S=h.b||((P=h.rgb)==null?void 0:P.b)||0,T=t._lab(E,C,S),L=Math.sqrt(Math.pow(b[0]-T[0],2)+Math.pow(b[1]-T[1],2)+Math.pow(b[2]-T[2],2));if(s>0){let _=Math.sqrt(b[1]*b[1]+b[2]*b[2]),B=Math.sqrt(T[1]*T[1]+T[2]*T[2]),M=Math.abs(_-B);L+=M*s}L<p&&(p=L,g=h)}}return p>c?null:g}static findClosestColor(e,o,n={}){return t.findClosestPaletteColor(e.r,e.g,e.b,o,n)}static clearCache(){t._labCache&&(t._labCache.clear(),u("Cach\xE9 de colores LAB limpiada"))}static getCacheStats(){return t._labCache?{size:t._labCache.size,memoryEstimate:t._labCache.size*32}:{size:0,memoryEstimate:0}}},Li=Q.findClosestColor.bind(Q),Ii=Q.findClosestPaletteColor.bind(Q);V();function be(){u("\u{1F3A8} Detectando colores disponibles...");let t=document.querySelectorAll('[id^="color-"]'),e=[];for(let o of t){if(o.querySelector("svg"))continue;let n=o.id.replace("color-",""),i=parseInt(n);if(i===0)continue;let d=o.style.backgroundColor;if(d){let r=d.match(/\d+/g);if(r&&r.length>=3){let s={r:parseInt(r[0]),g:parseInt(r[1]),b:parseInt(r[2])};e.push({id:i,element:o,...s}),u(`Color detectado: id=${i}, rgb(${s.r},${s.g},${s.b})`)}}}return u(`\u2705 ${e.length} colores disponibles detectados`),e}var ke=class{constructor(e){this.imageSrc=e,this.img=new window.Image,this.originalName=null,this.tileSize=1e3,this.drawMult=3,this.shreadSize=3,this.bitmap=null,this.imageWidth=0,this.imageHeight=0,this.totalPixels=0,this.requiredPixelCount=0,this.defacePixelCount=0,this.colorPalette={},this.allowedColorsSet=new Set,this.rgbToMeta=new Map,this.coords=[0,0,0,0],this.templateTiles={},this.templateTilesBuffers={},this.tilePrefixes=new Set,this.selectedColors=null,this.allSiteColors=[],this.initialAllowedColorsSet=null,this.allowedColors=[],this.labTolerance=100,this.originalBitmap=null,this.skipColorModeEnabled=!1,this.skipColorThreshold=100}async load(){return new Promise((e,o)=>{this.img.onload=async()=>{try{this.bitmap=await createImageBitmap(this.img),this.originalBitmap=this.bitmap,this.imageWidth=this.bitmap.width,this.imageHeight=this.bitmap.height,this.totalPixels=this.imageWidth*this.imageHeight,u(`[BLUE MARBLE] Imagen cargada: ${this.imageWidth}\xD7${this.imageHeight}`),e()}catch(n){o(n)}},this.img.onerror=o,this.img.src=this.imageSrc})}setLabTolerance(e){this.labTolerance=Number.isFinite(e)?Math.max(0,e):1/0}setSkipColorMode(e,o=100){this.skipColorModeEnabled=!!e,this.skipColorThreshold=Math.max(0,Math.min(100,o||100)),u(`[BLUE MARBLE] Skip Color Mode: ${this.skipColorModeEnabled?"enabled":"disabled"} (threshold: ${this.skipColorThreshold}%)`)}calculateColorSimilarity(e,o,n,i,d,r){let s=e-i,a=o-d,c=n-r,g=Math.sqrt(s*s+a*a+c*c),p=Math.sqrt(255*255*3),m=(p-g)/p*100;return Math.max(0,Math.min(100,m))}passesSkipColorFilter(e,o,n,i,d,r){return this.skipColorModeEnabled?this.skipColorThreshold===100?e===i&&o===d&&n===r:this.calculateColorSimilarity(e,o,n,i,d,r)>=this.skipColorThreshold:!0}generateOriginalPreview(e=200,o=200){if(!this.originalBitmap)return this.generatePreview(e,o);let n=document.createElement("canvas"),i=n.getContext("2d"),{width:d,height:r}=this.originalBitmap,s=d/r,a,c;return e/o>s?(c=Math.round(o),a=Math.round(o*s)):(a=Math.round(e),c=Math.round(e/s)),a=Math.max(1,a),c=Math.max(1,c),n.width=a,n.height=c,i.imageSmoothingEnabled=!1,i.drawImage(this.originalBitmap,0,0,a,c),n.toDataURL()}initializeColorPalette(){u("[BLUE MARBLE] Inicializando paleta de colores...");let e=be(),o=e.filter(i=>i.id!==void 0&&typeof i.r=="number"&&typeof i.g=="number"&&typeof i.b=="number");this.allowedColorsSet=new Set(o.map(i=>`${i.r},${i.g},${i.b}`));let n="222,250,206";return this.allowedColorsSet.add(n),this.rgbToMeta=new Map(o.map(i=>[`${i.r},${i.g},${i.b}`,{id:i.id,premium:!!i.premium,name:i.name||`Color ${i.id}`}])),this.rgbToMeta.set(n,{id:0,premium:!1,name:"Transparent"}),this.allSiteColors=o.map(i=>({r:i.r,g:i.g,b:i.b,id:i.id,name:i.name,premium:!!i.premium})),this.initialAllowedColorsSet=new Set(this.allowedColorsSet),this.allowedColors=[...this.allSiteColors],u(`[BLUE MARBLE] Paleta inicializada: ${this.allowedColorsSet.size} colores permitidos`),Array.from(e)}detectSiteColors(){let e=document.querySelectorAll('[id^="color-"]'),o=[];for(let n of e){let i=n.id.replace("color-",""),d=parseInt(i);if(n.querySelector("svg")||d===0)continue;let r=n.style.backgroundColor;if(r){let s=r.match(/\d+/g);if(s&&s.length>=3){let a=[parseInt(s[0]),parseInt(s[1]),parseInt(s[2])],c={id:d,element:n,rgb:a,name:n.title||n.getAttribute("aria-label")||`Color ${d}`,premium:n.classList.contains("premium")||n.querySelector(".premium")};o.push(c)}}}return u(`[BLUE MARBLE] ${o.length} colores detectados del sitio`),o}setCoords(e,o,n,i){this.coords=[e,o,n,i]}async analyzePixels(){if(!this.bitmap)throw new Error("Imagen no cargada. Llama a load() primero.");try{let e=this.skipColorModeEnabled&&this.originalBitmap?this.originalBitmap:this.bitmap,n=new OffscreenCanvas(this.imageWidth,this.imageHeight).getContext("2d",{willReadFrequently:!0});n.imageSmoothingEnabled=!1,n.clearRect(0,0,this.imageWidth,this.imageHeight),n.drawImage(e,0,0);let i=n.getImageData(0,0,this.imageWidth,this.imageHeight).data,d=0,r=0,s=new Map;for(let c=0;c<this.imageHeight;c++)for(let g=0;g<this.imageWidth;g++){let p=(c*this.imageWidth+g)*4,m=i[p],x=i[p+1],y=i[p+2];if(i[p+3]===0)continue;let f=`${m},${x},${y}`;m===222&&x===250&&y===206&&r++;let P=f,b=this.allowedColorsSet.has(f),h=m,E=x,C=y;if(!b&&this.allowedColors&&this.allowedColors.length>0){let S=Q.findClosestPaletteColor(m,x,y,this.allowedColors,{useLegacyRgb:!1,whiteThreshold:240,maxDistance:this.labTolerance});S&&(h=S.r,E=S.g,C=S.b,P=`${h},${E},${C}`,b=!0)}b&&this.skipColorModeEnabled&&(this.passesSkipColorFilter(m,x,y,h,E,C)||(b=!1)),b&&(d++,s.set(P,(s.get(P)||0)+1))}this.requiredPixelCount=d,this.defacePixelCount=r;let a={};for(let[c,g]of s.entries())a[c]={count:g,enabled:!0};return this.colorPalette=a,u(`[BLUE MARBLE] An\xE1lisis: ${d.toLocaleString()} p\xEDxeles, ${s.size} colores`),{totalPixels:this.totalPixels,requiredPixels:d,defacePixels:r,uniqueColors:s.size,colorPalette:a}}catch{return this.requiredPixelCount=Math.max(0,this.totalPixels),this.defacePixelCount=0,{totalPixels:this.totalPixels,requiredPixels:this.totalPixels,defacePixels:0,uniqueColors:0,colorPalette:{}}}}async createTemplateTiles(){if(!this.bitmap)throw new Error("Imagen no cargada. Llama a load() primero.");let e={},o={},n=new OffscreenCanvas(this.tileSize,this.tileSize),i=n.getContext("2d",{willReadFrequently:!0});for(let d=this.coords[3];d<this.imageHeight+this.coords[3];){let r=Math.min(this.tileSize-d%this.tileSize,this.imageHeight-(d-this.coords[3]));for(let s=this.coords[2];s<this.imageWidth+this.coords[2];){let a=Math.min(this.tileSize-s%this.tileSize,this.imageWidth-(s-this.coords[2])),c=a*this.shreadSize,g=r*this.shreadSize;n.width=c,n.height=g,i.imageSmoothingEnabled=!1,i.clearRect(0,0,c,g),i.drawImage(this.bitmap,s-this.coords[2],d-this.coords[3],a,r,0,0,a*this.shreadSize,r*this.shreadSize);let p=i.getImageData(0,0,c,g);for(let w=0;w<g;w++)for(let f=0;f<c;f++){let P=(w*c+f)*4;if(p.data[P]===222&&p.data[P+1]===250&&p.data[P+2]===206)(f+w)%2===0?(p.data[P]=0,p.data[P+1]=0,p.data[P+2]=0):(p.data[P]=255,p.data[P+1]=255,p.data[P+2]=255),p.data[P+3]=32;else if(f%this.shreadSize!==1||w%this.shreadSize!==1)p.data[P+3]=0;else{let b=p.data[P],h=p.data[P+1],E=p.data[P+2];this.allowedColorsSet.has(`${b},${h},${E}`)||(p.data[P+3]=0)}}i.putImageData(p,0,0);let m=`${(this.coords[0]+Math.floor(s/1e3)).toString().padStart(4,"0")},${(this.coords[1]+Math.floor(d/1e3)).toString().padStart(4,"0")},${(s%1e3).toString().padStart(3,"0")},${(d%1e3).toString().padStart(3,"0")}`;e[m]=await createImageBitmap(n),this.tilePrefixes.add(m.split(",").slice(0,2).join(","));let y=await(await n.convertToBlob()).arrayBuffer();o[m]=y,s+=a}d+=r}return this.templateTiles=e,this.templateTilesBuffers=o,u(`[BLUE MARBLE] ${Object.keys(e).length} tiles creados`),{templateTiles:e,templateTilesBuffers:o}}generatePixelQueue(){if(!this.bitmap)throw new Error("Imagen no cargada. Llama a load() primero.");u(`[BLUE MARBLE DEBUG] allowedColorsSet size: ${this.allowedColorsSet?this.allowedColorsSet.size:"undefined"}`),u(`[BLUE MARBLE DEBUG] allowedColors length: ${this.allowedColors?this.allowedColors.length:"undefined"}`),this.allowedColorsSet&&this.allowedColorsSet.size>0&&u(`[BLUE MARBLE DEBUG] Primeros colores permitidos: ${Array.from(this.allowedColorsSet).slice(0,5).join(", ")}`);let e=[],o=this.coords[0]*1e3+(this.coords[2]||0),n=this.coords[1]*1e3+(this.coords[3]||0),i=this.skipColorModeEnabled&&this.originalBitmap?this.originalBitmap:this.bitmap,r=new OffscreenCanvas(this.imageWidth,this.imageHeight).getContext("2d",{willReadFrequently:!0});r.imageSmoothingEnabled=!1,r.drawImage(i,0,0);let s=r.getImageData(0,0,this.imageWidth,this.imageHeight).data,a=0,c=0,g=0,p=0,m=0,x=0,y=0;for(let w=0;w<this.imageHeight;w++)for(let f=0;f<this.imageWidth;f++){a++;let P=(w*this.imageWidth+f)*4,b=s[P],h=s[P+1],E=s[P+2],C=s[P+3];if(C===0){c++;continue}if(b===222&&h===250&&E===206){g++;continue}let S=`${b},${h},${E}`,T=S,L=b,_=h,B=E,M=this.allowedColorsSet.has(S);if(M)p++;else if(this.allowedColors&&this.allowedColors.length>0){let v=Q.findClosestPaletteColor(b,h,E,this.allowedColors,{useLegacyRgb:!1,whiteThreshold:240,maxDistance:this.labTolerance});v&&(L=v.r,_=v.g,B=v.b,T=`${L},${_},${B}`,M=!0,m++)}if(M&&this.skipColorModeEnabled&&!this.passesSkipColorFilter(b,h,E,L,_,B)){M=!1,y++;continue}if(!M){x++;continue}let G=o+f,U=n+w,Z=Math.floor(G/1e3),X=Math.floor(U/1e3),J=G%1e3,W=U%1e3,Y=this.rgbToMeta.get(T)||{id:0,name:"Unknown"};e.push({imageX:f,imageY:w,globalX:G,globalY:U,tileX:Z,tileY:X,localX:J,localY:W,color:{r:L,g:_,b:B,id:Y.id,name:Y.name},originalColor:{r:L,g:_,b:B,alpha:C}})}return u("[BLUE MARBLE DEBUG] Estad\xEDsticas de procesamiento:"),u(`[BLUE MARBLE DEBUG] - Total p\xEDxeles procesados: ${a}`),u(`[BLUE MARBLE DEBUG] - P\xEDxeles transparentes: ${c}`),u(`[BLUE MARBLE DEBUG] - P\xEDxeles #deface: ${g}`),u(`[BLUE MARBLE DEBUG] - Coincidencias exactas: ${p}`),u(`[BLUE MARBLE DEBUG] - Coincidencias LAB: ${m}`),u(`[BLUE MARBLE DEBUG] - P\xEDxeles inv\xE1lidos: ${x}`),u(`[BLUE MARBLE DEBUG] - Skip Color filtrados: ${y}`),u(`[BLUE MARBLE DEBUG] - Cola final: ${e.length} p\xEDxeles`),u(`[BLUE MARBLE] Cola: ${e.length} p\xEDxeles`),e}async resize(e,o,n=!0){if(!this.img)throw new Error("Imagen no cargada. Llama a load() primero.");let i=this.img.width,d=this.img.height;if(n){let p=i/d;e/o>p?e=Math.round(o*p):o=Math.round(e/p)}else e=Math.round(e),o=Math.round(o);u(`[BLUE MARBLE] Redimensionando: ${i}\xD7${d} \u2192 ${e}\xD7${o}`);let r=this.originalBitmap||this.img,s=document.createElement("canvas");s.width=e,s.height=o;let a=s.getContext("2d");a.imageSmoothingEnabled=!1,a.drawImage(r,0,0,e,o);let c=await new Promise(p=>s.toBlob(p)),g=URL.createObjectURL(c);return this.img.src=g,this.imageSrc=g,await new Promise(p=>{this.img.onload=async()=>{try{this.bitmap=await createImageBitmap(this.img),this.originalBitmap=this.bitmap,this.imageWidth=this.bitmap.width,this.imageHeight=this.bitmap.height,this.totalPixels=this.imageWidth*this.imageHeight,u(`[BLUE MARBLE] Bitmap actualizado: ${this.imageWidth}\xD7${this.imageHeight}`),p()}catch(m){u("[BLUE MARBLE ERROR] Error actualizando bitmap:",m),p()}},setTimeout(()=>{u("[BLUE MARBLE WARNING] Timeout esperando carga de imagen redimensionada"),p()},5e3)}),u(`[BLUE MARBLE] Imagen redimensionada exitosamente: ${i}\xD7${d} \u2192 ${this.imageWidth}\xD7${this.imageHeight}`),{width:this.imageWidth,height:this.imageHeight}}getImageData(){return{width:this.imageWidth,height:this.imageHeight,totalPixels:this.totalPixels,requiredPixels:this.requiredPixelCount,defacePixels:this.defacePixelCount,colorPalette:this.colorPalette,coords:[...this.coords],originalName:this.originalName||"image.png",pixels:this.generatePixelQueue()}}generatePreview(e=200,o=200){if(!this.img)return null;let n=document.createElement("canvas"),i=n.getContext("2d"),d=this.imageWidth||this.img.width,r=this.imageHeight||this.img.height,s=d/r,a,c;return e/o>s?(c=Math.round(o),a=Math.round(o*s)):(a=Math.round(e),c=Math.round(e/s)),a=Math.max(1,a),c=Math.max(1,c),n.width=a,n.height=c,i.imageSmoothingEnabled=!1,i.drawImage(this.img,0,0,a,c),n.toDataURL()}getDimensions(){return{width:this.imageWidth,height:this.imageHeight}}setSelectedColors(e){this.selectedColors=Array.isArray(e)?e:[],this.selectedColors.length>0?(this.allowedColorsSet=new Set(this.selectedColors.map(o=>{var r,s,a,c,g,p;let n=(s=o.r)!=null?s:(r=o.rgb)==null?void 0:r.r,i=(c=o.g)!=null?c:(a=o.rgb)==null?void 0:a.g,d=(p=o.b)!=null?p:(g=o.rgb)==null?void 0:g.b;return`${n},${i},${d}`})),this.allowedColors=this.selectedColors.map(o=>{var n,i,d,r,s,a;return{id:o.id,name:o.name,premium:!!o.premium,r:(i=o.r)!=null?i:(n=o.rgb)==null?void 0:n.r,g:(r=o.g)!=null?r:(d=o.rgb)==null?void 0:d.g,b:(a=o.b)!=null?a:(s=o.rgb)==null?void 0:s.b,rgb:o.rgb||{r:o.r,g:o.g,b:o.b}}}),this.colorPalette={},this.selectedColors.forEach(o=>{let n=o.rgb||{r:o.r,g:o.g,b:o.b};this.colorPalette[o.id]=n}),u(`\u{1F3A8} [BLUE MARBLE] Paleta actualizada con ${this.selectedColors.length} colores seleccionados`),this.imageDataCache=null):(this.allowedColors=[...this.allSiteColors],this.allowedColorsSet=new Set(this.allSiteColors.map(o=>`${o.r},${o.g},${o.b}`)),u(`\u{1F3A8} [BLUE MARBLE] Sin selecci\xF3n: usando todos los colores disponibles (${this.allowedColors.length})`))}generatePreviewWithPalette(e=200,o=200){var b,h,E,C,S,T;if(!this.img)return{dataUrl:null,stats:{total:0,exact:0,lab:0,removed:0}};let n=document.createElement("canvas"),i=n.getContext("2d",{willReadFrequently:!0}),d=this.originalBitmap||this.bitmap||this.img,{width:r,height:s}=d,a=r/s,c,g;e/o>a?(g=Math.max(1,Math.round(o)),c=Math.max(1,Math.round(o*a))):(c=Math.max(1,Math.round(e)),g=Math.max(1,Math.round(e/a))),n.width=c,n.height=g,i.imageSmoothingEnabled=!1,i.drawImage(d,0,0,c,g);let p=i.getImageData(0,0,c,g),m=p.data,x=Array.isArray(this.allowedColors)?this.allowedColors:[],y=0,w=0,f=0,P=c*g;for(let L=0;L<g;L++)for(let _=0;_<c;_++){let B=(L*c+_)*4,M=m[B],G=m[B+1],U=m[B+2];if(m[B+3]===0)continue;let X=`${M},${G},${U}`,J=this.allowedColorsSet&&this.allowedColorsSet.has(X);if(J&&y++,J){if(this.skipColorModeEnabled&&!this.passesSkipColorFilter(M,G,U,M,G,U)){m[B+3]=0,f++,y--;continue}}else{let W=Q.findClosestPaletteColor(M,G,U,x,{useLegacyRgb:!1,whiteThreshold:240,maxDistance:this.labTolerance});if(W){let Y=(h=W.r)!=null?h:(b=W.rgb)==null?void 0:b.r,v=(C=W.g)!=null?C:(E=W.rgb)==null?void 0:E.g,q=(T=W.b)!=null?T:(S=W.rgb)==null?void 0:S.b;if(this.skipColorModeEnabled&&!this.passesSkipColorFilter(M,G,U,Y,v,q)){m[B+3]=0,f++;continue}m[B]=Y,m[B+1]=v,m[B+2]=q,m[B+3]=255,w++}else m[B+3]=0,f++}}return i.putImageData(p,0,0),{dataUrl:n.toDataURL(),stats:{total:P,exact:y,lab:w,removed:f}}}async remapImageToPalette(){var g,p,m,x,y,w;if(!this.bitmap)return;(!this.allowedColors||this.allowedColors.length===0)&&(this.allowedColors=[...this.allSiteColors],this.allowedColorsSet=new Set(this.allSiteColors.map(f=>`${f.r},${f.g},${f.b}`)));let e=this.imageWidth,o=this.imageHeight,n=document.createElement("canvas");n.width=e,n.height=o;let i=n.getContext("2d",{willReadFrequently:!0});i.imageSmoothingEnabled=!1,i.drawImage(this.bitmap,0,0);let d=i.getImageData(0,0,e,o),r=d.data,s=this.allowedColors;for(let f=0;f<o;f++)for(let P=0;P<e;P++){let b=(f*e+P)*4,h=r[b],E=r[b+1],C=r[b+2];if(r[b+3]===0)continue;let T=`${h},${E},${C}`;if(this.allowedColorsSet&&this.allowedColorsSet.has(T))continue;let L=Q.findClosestPaletteColor(h,E,C,s,{useLegacyRgb:!1,whiteThreshold:240,maxDistance:this.labTolerance});if(L){let _=(p=L.r)!=null?p:(g=L.rgb)==null?void 0:g.r,B=(x=L.g)!=null?x:(m=L.rgb)==null?void 0:m.g,M=(w=L.b)!=null?w:(y=L.rgb)==null?void 0:y.b;r[b]=_,r[b+1]=B,r[b+2]=M,r[b+3]=255}else r[b+3]=0}i.putImageData(d,0,0);let a=await new Promise(f=>n.toBlob(f)),c=window.URL.createObjectURL(a);this.img.src=c,this.imageSrc=c,await new Promise(f=>{this.img.onload=async()=>{this.bitmap=await createImageBitmap(this.img),f()}}),u("[BLUE MARBLE] Imagen base remapeada a paleta activa (pixelart)")}};V();var le=t=>new Promise(e=>setTimeout(e,t));async function Ve(t,{timeout:e=1e4,...o}={}){let n=new AbortController,i=setTimeout(()=>n.abort("timeout"),e);try{return await fetch(t,{signal:n.signal,...o})}catch(d){if(d.name==="AbortError"||d.message==="timeout"){let r=new Error(`Request timeout after ${e}ms`);throw r.name="TimeoutError",r.timeout=e,r}throw d}finally{clearTimeout(i)}}V();var Ke=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=5e3,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++,u("\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,u("\u{1F5D1}\uFE0F Token invalidated, will force fresh generation")}async ensureToken(e=!1){let o=Date.now();if(this.isTokenValid()&&!e)return this.turnstileToken;if(e&&this.invalidateToken(),this.tokenGenerationInProgress&&this.currentGenerationPromise){u("\u{1F504} Token generation already in progress, waiting for existing promise...");try{let n=await this.currentGenerationPromise;return n&&n.length>20?n:this.isTokenValid()?this.turnstileToken:null}catch{}}return this.tokenGenerationInProgress=!0,this.currentGenerationPromise=(async()=>{try{u("\u{1F504} Token expired or missing, generating new one...");let n=await this.handleCaptcha();if(n&&n.length>20){this.setTurnstileToken(n);let d=Date.now()-o;return this.metrics.avgGenerationTime=(this.metrics.avgGenerationTime+d)/2,n}u("\u26A0\uFE0F Invisible Turnstile failed, forcing browser automation...");let i=await this.handleCaptchaFallback();if(i&&i.length>20){this.setTurnstileToken(i);let d=Date.now()-o;return this.metrics.avgGenerationTime=(this.metrics.avgGenerationTime+d)/2,i}return this.metrics.failures++,u("\u274C All token generation methods failed"),null}finally{this.tokenGenerationInProgress=!1,this.currentGenerationPromise=null}})(),this.currentGenerationPromise}async handleCaptcha(){let e=Date.now();try{let o=this.detectSitekey();u("\u{1F511} Generating Turnstile token for sitekey:",o),typeof window!="undefined"&&window.navigator&&u("\u{1F9ED} UA:",window.navigator.userAgent,"Platform:",window.navigator.platform);let n=await this.executeTurnstile(o,"paint");if(n&&n.length>20){let i=Math.round(Date.now()-e);return u(`\u2705 Turnstile token generated successfully in ${i}ms`),n}else throw new Error("Invalid or empty token received")}catch(o){let n=Math.round(Date.now()-e);throw u(`\u274C Turnstile token generation failed after ${n}ms:`,o),o}}async loadTurnstile(){return window.turnstile?(this.turnstileLoaded=!0,Promise.resolve()):new Promise((e,o)=>{if(document.querySelector('script[src^="https://challenges.cloudflare.com/turnstile/v0/api.js"]')){let i=()=>{window.turnstile?(this.turnstileLoaded=!0,e()):setTimeout(i,100)};return i()}let n=document.createElement("script");n.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",n.async=!0,n.defer=!0,n.onload=()=>{this.turnstileLoaded=!0,u("\u2705 Turnstile script loaded successfully"),e()},n.onerror=()=>{u("\u274C Failed to load Turnstile script"),o(new Error("Failed to load Turnstile"))},document.head.appendChild(n)})}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 o=document.createElement("div");o.textContent="Cloudflare Turnstile \u2014 please complete the check if shown",o.style.cssText='font: 600 12px/1.3 "Segoe UI",sans-serif; margin-bottom: 8px; opacity: 0.9;';let n=document.createElement("div");n.id="turnstile-overlay-host",n.style.cssText="width: 100%; min-height: 70px;";let i=document.createElement("button");return i.textContent="Hide",i.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;",i.addEventListener("click",()=>e.remove()),e.appendChild(o),e.appendChild(n),e.appendChild(i),document.body.appendChild(e),this._turnstileOverlay=e,e}async executeTurnstile(e,o="paint"){var r,s,a,c;if(await this.loadTurnstile(),this._turnstileWidgetId&&this._lastSitekey===e&&((r=window.turnstile)!=null&&r.execute))try{u("\u{1F504} Attempting to reuse existing Turnstile widget..."),(s=window.turnstile)!=null&&s.reset&&window.turnstile.reset(this._turnstileWidgetId);let g=await Promise.race([window.turnstile.execute(this._turnstileWidgetId,{action:o}),new Promise((p,m)=>setTimeout(()=>m(new Error("Execute timeout")),15e3))]);if(g&&g.length>20)return this._lastSitekey=e,u("\u2705 Widget reuse successful, token length:",g.length),g}catch(g){if(u("\u{1F504} Widget reuse failed, will create a fresh widget:",g.message),this._turnstileWidgetId&&((a=window.turnstile)!=null&&a.remove)){try{window.turnstile.remove(this._turnstileWidgetId)}catch{}this._turnstileWidgetId=null}}let n=await this.createNewTurnstileWidgetInvisible(e,o);if(n&&n.length>20)return n;u("\u{1F440} Falling back to interactive Turnstile (visible).");try{this.showUserNotificationTopCenter("\u{1F504} Resolviendo CAPTCHA...","info")}catch{}let i=1,d=!1;for(;;){let g=i===1?this.INITIAL_TIMEOUT:this.RETRY_INTERVAL;u(`\u{1F504} Intento ${i} de resoluci\xF3n del CAPTCHA (timeout: ${g/1e3}s)...`),i>1&&!d?(this.showUserNotification(`\u{1F504} CAPTCHA: Reintentando autom\xE1ticamente cada 5 segundos (intento ${i})`,"info"),d=!0):i>2&&this.showUserNotification(`\u{1F504} CAPTCHA: Intento ${i} - Continuando autom\xE1ticamente`,"info");try{if(this._turnstileWidgetId&&((c=window.turnstile)!=null&&c.remove)){try{window.turnstile.remove(this._turnstileWidgetId)}catch{}this._turnstileWidgetId=null}let p=await this.createNewTurnstileWidgetInteractiveWithRetry(e,o,!0,g);if(p&&p.length>20)return u(`\u2705 CAPTCHA resuelto exitosamente en el intento ${i}`),i>1&&this.showUserNotification("\u2705 CAPTCHA resuelto exitosamente","success"),p;u(`\u26A0\uFE0F Intento ${i} fall\xF3, reintentando en 5 segundos...`),i>1&&this.showUserNotification(`\u26A0\uFE0F Intento ${i} fall\xF3, reintentando en 5 segundos...`,"info"),await this.sleep(5e3)}catch(p){u(`\u274C Error en intento ${i}:`,p.message),i>1&&this.showUserNotification(`\u274C Error en intento ${i}, reintentando en 5 segundos`,"error"),await this.sleep(5e3)}i++,this.metrics.retries++}}async createNewTurnstileWidgetInvisible(e,o){return new Promise(n=>{var i;try{this._turnstileWidgetId&&((i=window.turnstile)!=null&&i.remove)&&window.turnstile.remove(this._turnstileWidgetId);let d=this.ensureTurnstileContainer();d.innerHTML="",this._turnstileWidgetId=window.turnstile.render(d,{sitekey:e,action:o,size:"compact",theme:"light",callback:r=>{this._lastSitekey=e,u("\u{1F3AF} Compact Turnstile callback success, token length:",r==null?void 0:r.length),n(r)},"error-callback":()=>{u("\u274C Compact Turnstile error callback"),n(null)},"timeout-callback":()=>{u("\u23F0 Compact Turnstile timeout callback"),n(null)},"expired-callback":()=>{u("\u{1F480} Compact Turnstile expired callback"),n(null)}}),setTimeout(()=>n(null),1e4)}catch(d){u("\u274C Error creating compact Turnstile widget:",d),n(null)}})}async createNewTurnstileWidgetInteractiveWithRetry(e,o,n=!0,i=3e4){return new Promise((d,r)=>{var s;try{this._turnstileWidgetId&&((s=window.turnstile)!=null&&s.remove)&&window.turnstile.remove(this._turnstileWidgetId);let a=this.ensureTurnstileOverlayContainer(),c=a.querySelector("#turnstile-overlay-host");c.innerHTML="",a.style.display="block",a.classList.remove("wplace-overlay-hidden"),this._turnstileWidgetId=window.turnstile.render(c,{sitekey:e,action:o,theme:"auto",callback:g=>{this._lastSitekey=e,u("\u{1F3AF} Interactive Turnstile callback success, token length:",g==null?void 0:g.length),a.style.display="none",d(g)},"error-callback":()=>{u("\u274C Interactive Turnstile error callback"),a.style.display="none",d(null)},"timeout-callback":()=>{u("\u23F0 Interactive Turnstile timeout callback"),a.style.display="none",d(null)},"expired-callback":()=>{u("\u{1F480} Interactive Turnstile expired callback"),a.style.display="none",d(null)}}),setTimeout(()=>{a.style.display="none",d(null)},i)}catch(a){u("\u274C Error creating interactive Turnstile widget:",a),d(null)}})}detectSitekey(e="0x4AAAAAABpqJe8FO0N84q0F"){var o;if(this._cachedSitekey)return this._cachedSitekey;try{let n=document.querySelector("[data-sitekey]");if(n){let r=n.dataset.sitekey||n.getAttribute("data-sitekey");if(r&&r.length>10)return u("\u{1F50D} Sitekey found in data attribute:",r),this._cachedSitekey=r,r}let i=document.querySelector(".cf-turnstile");if((o=i==null?void 0:i.dataset)!=null&&o.sitekey&&i.dataset.sitekey.length>10)return u("\u{1F50D} Sitekey found in turnstile element:",i.dataset.sitekey),this._cachedSitekey=i.dataset.sitekey,i.dataset.sitekey;if(typeof window!="undefined"&&window.__TURNSTILE_SITEKEY&&window.__TURNSTILE_SITEKEY.length>10)return u("\u{1F50D} Sitekey found in global variable:",window.__TURNSTILE_SITEKEY),this._cachedSitekey=window.__TURNSTILE_SITEKEY,window.__TURNSTILE_SITEKEY;let d=document.querySelectorAll("script");for(let r of d){let a=(r.textContent||r.innerHTML).match(/['"](0x4[A-Za-z0-9_-]{20,})['"]/);if(a&&a[1])return u("\u{1F50D} Sitekey found in script:",a[1]),this._cachedSitekey=a[1],a[1]}}catch(n){u("Error detecting sitekey:",n)}return u("\u{1F50D} Using fallback sitekey:",e),this._cachedSitekey=e,e}async handleCaptchaFallback(){return new Promise((e,o)=>{(async()=>{try{u("\u{1F504} Starting fallback automation flow..."),u("\u26A0\uFE0F Fallback automation not implemented in enhanced version"),e(null)}catch(i){u("\u274C Fallback automation failed:",i),e(null)}})()})}sleep(e){return new Promise(o=>setTimeout(o,e))}showUserNotification(e,o="info"){this.showUserNotificationTopCenter(e,o)}showUserNotificationTopCenter(e,o="info",n=3e3){let i=document.getElementById("wplace-toast-container");i||(i=document.createElement("div"),i.id="wplace-toast-container",i.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(i));let d=o==="success"?"#10b981":o==="error"?"#ef4444":"#3b82f6",r=document.createElement("div");r.className="wplace-toast",r.textContent=e,r.style.cssText=`
min-width: 240px;
max-width: 80vw;
margin: 0 auto;
background: ${d};
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;
`,i.appendChild(r),(c=>typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame(c):setTimeout(c,16))(()=>{r.style.transform="translateY(0) scale(1)",r.style.opacity="1"});let a=()=>{r.style.transform="translateY(-10px) scale(0.98)",r.style.opacity="0",setTimeout(()=>r.remove(),250)};n>0&&setTimeout(a,n),r.addEventListener("click",a)}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 o=setTimeout(()=>{this._pawtectResolve&&this._pawtectResolve({pawtect:this._pawtectToken,fp:this._fp})},e),n=await this._pawtectPromise.catch(()=>({pawtect:this._pawtectToken,fp:this._fp}));return clearTimeout(o),this._pawtectResolve||(this._pawtectPromise=new Promise(i=>{this._pawtectResolve=i})),n}getMetrics(){let e=this.metrics.cacheHits/Math.max(1,this.metrics.cacheHits+this.metrics.cacheMisses),o=this.metrics.poolHits/Math.max(1,this.metrics.poolHits+this.metrics.poolMisses);return{...this.metrics,cacheHitRate:e,poolHitRate:o,failureRate:this.metrics.failures/Math.max(1,this.metrics.tokensGenerated+this.metrics.failures)}}},K=new Ke,Be=null,Re=null,ce=null,Je=null,It=0,Co=!1,vo=null;function Ze(t){K.setTurnstileToken(t),Be=t,It=K.tokenExpiryTime}function Lt(){return K.isTokenValid()}async function te(t=!1){let e=await K.ensureToken(t);return Be=e,It=K.tokenExpiryTime,Co=K.tokenGenerationInProgress,vo=K.currentGenerationPromise,e}function de(){let t=K.getProtectionTokens();return Re=t.pawtect,t.pawtect}function ue(){let t=K.getProtectionTokens();return ce=t.fp,t.fp}async function kt(t=5e3){return await K.waitForPawtect(t)}window.__WPA_SET_TURNSTILE_TOKEN__=function(t){t&&typeof t=="string"&&t.length>20&&(u("\u2705 Turnstile Token Captured:",t),Ze(t))};window.addEventListener("message",t=>{var o;let e=t==null?void 0:t.data;if(e){if(e.source==="turnstile-capture"&&e.token){(!Lt()||Be!==e.token)&&Ze(e.token);return}if(e.__wplace===!0&&e.type==="token_found"){e.token&&(!Lt()||Be!==e.token)&&Ze(e.token),e.xpaw&&(!Re||Re!==e.xpaw)&&(Re=e.xpaw,window.__WPA_PAWTECT_TOKEN__=e.xpaw,K._pawtectToken=e.xpaw,u("[turnstile] pawtect token updated:",e.xpaw.substring(0,20)+"...")),e.fp&&(!ce||ce!==e.fp)&&(ce=e.fp,window.__WPA_FINGERPRINT__=e.fp,K._fp=e.fp,u("[turnstile] fingerprint updated:",e.fp.substring(0,20)+"..."));return}try{let n=typeof e=="object"&&typeof e.fp=="string"&&e.fp.length>10?e.fp:null;n&&(!ce||ce!==n)&&(ce=n,window.__WPA_FINGERPRINT__=n,K._fp=n,u("[turnstile] fingerprint from message:",n.substring(0,20)+"..."))}catch{}try{let n=typeof e=="object"&&(e.pi||(o=e.payload)!=null&&o.pi)?e.pi||e.payload.pi:null;if(n&&typeof n=="object"&&(n.xp||n.pfp||n.ffp)){let i=JSON.stringify(n);(!Je||Je!==i)&&(Je=i,window.__WPA_FP_CANDIDATE__=i,K._fpCandidate=i,u("[turnstile] fp candidate from pi:",i.substring(0,50)+"..."))}}catch{}}});V();var fe=null,Pe=null;function Eo(){try{let t=document.createElement("canvas"),e=t.getContext("2d");return e?(t.width=200,t.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(),t.toDataURL().slice(0,64)):"nocanvas"}catch{return"nocanvas"}}function So(){try{let t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");if(!e)return"nowebgl";let o=e.getExtension("WEBGL_debug_renderer_info"),n=o?e.getParameter(o.UNMASKED_VENDOR_WEBGL):e.getParameter(e.VENDOR),i=o?e.getParameter(o.UNMASKED_RENDERER_WEBGL):e.getParameter(e.RENDERER);return n+"|"+i}catch{return"nowebgl"}}function Ao(t){let e=2166136261;for(let o=0;o<t.length;o++)e^=t.charCodeAt(o),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return("00000000"+e.toString(16)).slice(-8)}async function To(t){var e;if(typeof window!="undefined"&&((e=window.crypto)!=null&&e.subtle))try{let o=typeof window!="undefined"&&window.TextEncoder?window.TextEncoder:null,n=o?new o().encode(t):new Uint8Array([...unescape(encodeURIComponent(t))].map(d=>d.charCodeAt(0))),i=await window.crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(i)).map(d=>d.toString(16).padStart(2,"0")).join("")}catch{}return Ao(t)}function _o(){let t=typeof window!="undefined"&&window.navigator?window.navigator:{},e=typeof window!="undefined"&&window.screen?window.screen:{},o=typeof Intl!="undefined"&&Intl.DateTimeFormat&&Intl.DateTimeFormat().resolvedOptions().timeZone||"";return{ua:t.userAgent||"",plat:t.platform||"",lang:(t.languages||[]).join(",")||t.language||"",cores:t.hardwareConcurrency||0,mem:t.deviceMemory||0,width:e.width||0,height:e.height||0,depth:e.colorDepth||0,tz:o,canvas:Eo(),webgl:So()}}async function Me({force:t=!1}={}){return fe&&!t?fe:Pe||(Pe=(async()=>{try{let e=_o(),o=Object.keys(e).sort().map(i=>i+":"+e[i]).join("|");fe="fp:"+(await To(o)).slice(0,64);try{window.__WPA_FINGERPRINT__=fe}catch{}return u("[fp] generado len="+fe.length),fe}finally{Pe=null}})(),Pe)}V();var Qe=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(),u("[pawtect] Enhanced PawtectManager initialized")}_initializeCacheCleanup(){typeof window!="undefined"&&typeof window.setInterval=="function"&&(this._cacheCleanupInterval=window.setInterval(()=>{this._cleanupExpiredCache()},6e4))}_cleanupExpiredCache(){let e=Date.now(),o=0;for(let[n,i]of this._cache.entries())e-i.ts>this.CACHE_TTL&&(this._cache.delete(n),o++);o>0&&u(`[pawtect] Cleaned ${o} 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(o){throw u("[pawtect] Error serializing bodyObj:",o),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 o=[()=>this._discoverFromScriptTags(),()=>this._discoverFromLinks(),()=>this._discoverFromPerformanceAPI()];for(let n of o)try{let i=await Promise.race([n(),new Promise((d,r)=>setTimeout(()=>r(new Error("Strategy timeout")),3e3))]);if(i)return this._chunkUrl=i,this.metrics.chunkDiscoveryTime=Date.now()-e,u("[pawtect] chunk encontrado con estrategia avanzada:",i),i}catch(i){u("[pawtect] strategy failed:",i.message)}}catch(o){u("[pawtect] chunk discovery failed:",o)}return this.metrics.chunkDiscoveryTime=Date.now()-e,null}async _discoverFromScriptTags(){var o;let e=new Set;try{(o=document.querySelectorAll("script[src]"))==null||o.forEach(n=>{try{typeof window!="undefined"&&window.URL&&window.location&&e.add(new window.URL(n.src,window.location.href).href)}catch{}})}catch{}return this._testUrlCandidates([...e])}async _discoverFromLinks(){var o;let e=new Set;try{(o=document.querySelectorAll('link[rel="modulepreload"][href],link[as="script"][href]'))==null||o.forEach(n=>{try{typeof window!="undefined"&&window.URL&&window.location&&e.add(new window.URL(n.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(o=>{o!=null&&o.name&&e.add(o.name)})}catch{}return this._testUrlCandidates([...e])}async _testUrlCandidates(e){let o=e.filter(n=>/\/(_app|assets)\/immutable\/chunks\/.*\.js/i.test(n));for(let n of o)try{let d=await(await Promise.race([fetch(n,{credentials:"omit"}),new Promise((r,s)=>setTimeout(()=>s(new Error("Fetch timeout")),5e3))])).text();if(/get_pawtected_endpoint_payload|pawtect/i.test(d))return n}catch(i){u("[pawtect] failed to test candidate:",n,i.message)}return null}async _loadWasmEnhanced(){if(this._wasm)return this._wasm;let e=Date.now();try{let o=await Promise.race([this._discoverChunkAdvanced(),new Promise((i,d)=>setTimeout(()=>d(new Error("Chunk discovery timeout")),this.CHUNK_DISCOVERY_TIMEOUT))]);if(!o)return u("[pawtect] no se encontr\xF3 chunk despu\xE9s de b\xFAsqueda avanzada"),null;let n=await Promise.race([import(o),new Promise((i,d)=>setTimeout(()=>d(new Error("WASM import timeout")),this.WASM_LOAD_TIMEOUT))]);if(typeof n._=="function")return this._wasmMod=n,this._wasm=await n._(),this.metrics.wasmLoadTime=Date.now()-e,u("[pawtect] wasm cargado exitosamente en",this.metrics.wasmLoadTime,"ms"),this._wasm;throw new Error("WASM module does not have expected interface")}catch(o){return this.metrics.wasmLoadTime=Date.now()-e,this._recordError("WASM load failed",o),u("[pawtect] error cargando wasm:",o.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,u("[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,u("[pawtect] user initialized with class:",e.id)}catch(o){u("[pawtect] class instantiation failed, trying alternative methods:",o.message),this._tryAlternativeUserInit(e)}else u("[pawtect] user initialization skipped - no valid method found")}catch(o){u("[pawtect] user initialization failed:",o.message)}}_tryAlternativeUserInit(e){try{this._wasmMod.initUser&&typeof this._wasmMod.initUser=="function"?(this._wasmMod.initUser(e.id),this._initUser=!0,u("[pawtect] user initialized with initUser:",e.id)):this._wasmMod.init&&typeof this._wasmMod.init=="function"?(this._wasmMod.init(e.id),this._initUser=!0,u("[pawtect] user initialized with init:",e.id)):(this._initUser=!0,u("[pawtect] user initialization skipped - marking as done to avoid retries"))}catch(o){this._initUser=!0,u("[pawtect] alternative user initialization failed:",o.message)}}async _getUserWithRetry(){for(let e=0;e<3;e++)try{let o=await Promise.race([fetch("https://backend.wplace.live/me",{credentials:"include"}),new Promise((n,i)=>setTimeout(()=>i(new Error("User fetch timeout")),5e3))]);if(o.ok)return await o.json()}catch(o){u(`[pawtect] user fetch attempt ${e+1} failed:`,o.message),e<2&&await new Promise(n=>setTimeout(n,1e3*(e+1)))}return null}_recordError(e,o){let n={timestamp:Date.now(),context:e,message:o.message,stack:o.stack};this.errorHistory.push(n),this.errorHistory.length>this.MAX_ERROR_HISTORY&&this.errorHistory.shift(),this.metrics.errors++}async computePawtect(e,{force:o=!1}={}){var i;let n=Date.now();try{let d=this._validateAndNormalizeInput(e),r=d,s=Date.now();if(!o&&this._cache.has(r)){let a=this._cache.get(r);if(s-a.ts<this.CACHE_TTL)return this.metrics.cacheHits++,u("[pawtect] cache hit, token length:",((i=a.token)==null?void 0:i.length)||0),a.token;this._cache.delete(r)}if(this.metrics.cacheMisses++,this._busy&&(await new Promise(a=>setTimeout(a,150+Math.random()*100)),!o&&this._cache.has(r))){let a=this._cache.get(r);if(s-a.ts<this.CACHE_TTL)return this.metrics.cacheHits++,a.token}return await this._computeWithRetry(d,r,n)}catch(d){this._recordError("computePawtect",d);let r=Date.now()-n;return u("[pawtect] computation failed after",r,"ms:",d.message),null}}async _computeWithRetry(e,o,n){let i=null;for(let d=0;d<this.MAX_RETRIES;d++){this._busy=!0;try{let r=await this._performComputation(e);if(r){this._cache.set(o,{token:r,ts:Date.now()});try{window.__WPA_PAWTECT_TOKEN__=r}catch{}this.metrics.computations++;let s=Date.now()-n;return this.metrics.avgComputeTime=(this.metrics.avgComputeTime*(this.metrics.computations-1)+s)/this.metrics.computations,u("[pawtect] token calculado exitosamente, len=",r.length,"duration=",s,"ms"),r}throw new Error("No token generated from WASM")}catch(r){if(i=r,this.metrics.retries++,u(`[pawtect] attempt ${d+1} failed:`,r.message),d<this.MAX_RETRIES-1){let s=this.RETRY_DELAY_BASE*Math.pow(2,d);u(`[pawtect] retrying in ${s}ms...`),await new Promise(a=>setTimeout(a,s))}}finally{this._busy=!1}}return this._recordError("All computation attempts failed",i),null}async _performComputation(e){let o=await this._loadWasmEnhanced();if(!o||typeof o.get_pawtected_endpoint_payload!="function")throw new Error("WASM not available or missing function");if(!this._initUser){let a=await this._getUserWithRetry();this._maybeInitUser(a)}let n=typeof window!="undefined"&&window.TextEncoder?new window.TextEncoder:{encode:a=>new Uint8Array([...unescape(encodeURIComponent(a))].map(c=>c.charCodeAt(0)))},i=typeof window!="undefined"&&window.TextDecoder?new window.TextDecoder:{decode:a=>decodeURIComponent(escape(String.fromCharCode(...a)))},d=a=>{if(!a)return null;if(typeof a=="string")return a;if(Array.isArray(a)&&a.length>=2){let[c,g]=a,p=new Uint8Array(o.memory.buffer,c,g),m=i.decode(p);try{o.__wbindgen_free&&(o.__wbindgen_free.length>=2?o.__wbindgen_free(c,g):o.__wbindgen_free(c))}catch{}return m}if(typeof a=="object"&&typeof a.ptr=="number"&&typeof a.len=="number"){let c=new Uint8Array(o.memory.buffer,a.ptr,a.len),g=i.decode(c);try{o.__wbindgen_free&&(o.__wbindgen_free.length>=2?o.__wbindgen_free(a.ptr,a.len):o.__wbindgen_free(a.ptr))}catch{}return g}return null};try{let a=o.get_pawtected_endpoint_payload(e),c=d(a);if(c&&typeof c=="string"&&c.length>0)return c}catch{}let r=n.encode(e),s=null;try{if(typeof o.__wbindgen_malloc=="function")try{s=o.__wbindgen_malloc(r.length)}catch{s=o.__wbindgen_malloc(r.length,1)}if(!s||typeof s!="number"||s<=0)throw new Error("Failed to allocate WASM memory");let a=s+r.length;if(a>o.memory.buffer.byteLength&&typeof o.memory.grow=="function"){let m=a-o.memory.buffer.byteLength,x=Math.ceil(m/65536);if(x>0)try{o.memory.grow(x)}catch{}}new Uint8Array(o.memory.buffer,s,r.length).set(r);let c=o.get_pawtected_endpoint_payload(s,r.length);return d(c)}catch(a){throw new Error(`WASM computation failed: ${a.message}`)}finally{if(s)try{typeof o.__wbindgen_free=="function"&&(o.__wbindgen_free.length>=2?o.__wbindgen_free(s,r.length):o.__wbindgen_free(s))}catch{}}}async seedPawtect(){try{u("[pawtect] seeding computation..."),await this.computePawtect({colors:[0],coords:[1,1],t:"seed",fp:"seed"},{force:!0}),u("[pawtect] seed computation completed")}catch(e){u("[pawtect] seed computation failed:",e)}}getMetrics(){let e=this._cache.size,o=this.metrics.cacheHits/Math.max(1,this.metrics.cacheHits+this.metrics.cacheMisses),n=this.metrics.errors/Math.max(1,this.metrics.computations+this.metrics.errors);return{...this.metrics,cacheSize:e,cacheHitRate:o,errorRate:n,recentErrors:this.errorHistory.slice(-5)}}clearCache(){let e=this._cache.size;this._cache.clear(),u(`[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,u("[pawtect] cleanup completed")}},et=new Qe;async function Rt(t,e={}){return await et.computePawtect(t,e)}async function Bt(){return await et.seedPawtect()}typeof window!="undefined"&&typeof window.setTimeout=="function"&&window.setTimeout(()=>{et.seedPawtect()},1e3);V();async function ze(t){if(!t)return{ok:!1,status:0,json:{},text:"",parseError:"no-response"};let e=t.status,o="";try{o=await t.text()}catch(n){return{ok:t.ok,status:e,json:{},text:"",parseError:n.message}}if(!o)return{ok:t.ok,status:e,json:{},text:""};try{let n=JSON.parse(o);return{ok:t.ok,status:e,json:n,text:o}}catch(n){return{ok:t.ok,status:e,json:{},text:o,parseError:n.message}}}var Ne="https://backend.wplace.live";async function Ce(){var t,e,o,n;try{let i=await fetch(`${Ne}/me`,{credentials:"include"}).then(c=>c.json()),d=i||null,r=(i==null?void 0:i.charges)||{},s=(t=i==null?void 0:i.droplets)!=null?t:0,a={count:(e=r.count)!=null?e:0,max:(o=r.max)!=null?o:0,cooldownMs:(n=r.cooldownMs)!=null?n:3e4};return{success:!0,data:{user:d,charges:a.count,maxCharges:a.max,chargeRegen:a.cooldownMs,droplets:s}}}catch(i){return{success:!1,error:i.message,data:{user:null,charges:0,maxCharges:0,chargeRegen:3e4,droplets:0}}}}async function Mt(t,e,o,n,i){var d,r,s;try{let a=h=>{if(!Array.isArray(h))return[];let E=[];if(h.length>0&&typeof h[0]=="number"){for(let C=0;C<h.length;C+=2){let S=Math.trunc(h[C]),T=Math.trunc(h[C+1]);Number.isFinite(S)&&Number.isFinite(T)&&E.push((S%1e3+1e3)%1e3,(T%1e3+1e3)%1e3)}return E}if(typeof h[0]=="object"&&h[0]&&("x"in h[0]||"y"in h[0])){for(let C of h){let S=Math.trunc(C==null?void 0:C.x),T=Math.trunc(C==null?void 0:C.y);Number.isFinite(S)&&Number.isFinite(T)&&E.push((S%1e3+1e3)%1e3,(T%1e3+1e3)%1e3)}return E}if(Array.isArray(h[0])){for(let C of h){let S=Math.trunc(C==null?void 0:C[0]),T=Math.trunc(C==null?void 0:C[1]);Number.isFinite(S)&&Number.isFinite(T)&&E.push((S%1e3+1e3)%1e3,(T%1e3+1e3)%1e3)}return E}return E},c=h=>Array.isArray(h)?h.map(E=>Math.trunc(Number(E))||0):[],g=a(o),p=c(n);if(g.length===0||p.length===0||g.length/2!==p.length)return u(`[API] Invalid coords/colors for tile ${t},${e} \u2192 coordsPairs=${g.length/2} colors=${p.length}`),{status:400,json:{error:"Invalid coords/colors format"},success:!1,painted:0};let m=ue();if(!m)try{m=await Me({})}catch{}let x=null;try{let h={colors:n,coords:o,t:i||"seed",...m?{fp:m}:{fp:"seed"}},E=await Rt(h);E?x=E:x=de()}catch{x=de()}if(!m){try{await kt(1200)}catch{}m=ue()}let y=JSON.stringify({colors:p,coords:g,t:i,...m?{fp:m}:{}}),w="";try{let h=2166136261;for(let E=0;E<y.length;E++)h^=y.charCodeAt(E),h=Math.imul(h,16777619);w=("00000000"+(h>>>0).toString(16)).slice(-8)}catch{}u(`[API] Sending batch to tile ${t},${e} with ${n.length} pixels, token: ${i?i.substring(0,50)+"...":"null"}`),u(`[API] postPixelBatchImage include: pawtect=${!!x} fp=${!!m} bodyHash=${w}`);let f=await fetch(`${Ne}/s0/pixel/${t}/${e}`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8",...x?{"x-pawtect-token":x}:{}},body:y});if(u(`[API] Response: ${f.status} ${f.statusText}`),f.status===403){try{await f.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 h=await te(!0);if(x=de(),m=ue(),!h)return{status:403,json:{error:"Could not generate new token"},success:!1,painted:0};let E=JSON.stringify({colors:p,coords:g,t:h,...m?{fp:m}:{}});u(`[API] Retrying with fresh token: ${h.substring(0,50)}...`);let C=await fetch(`${Ne}/s0/pixel/${t}/${e}`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8",...x?{"x-pawtect-token":x}:{}},body:E});if(u(`[API] Retry response: ${C.status} ${C.statusText}`),C.status===403)return{status:403,json:{error:"Fresh token still expired or invalid after retry"},success:!1,painted:0};let S=await ze(C),T=((d=S.json)==null?void 0:d.painted)||0;return u(`[API] Retry result: ${T} pixels painted`),{status:C.status,json:S.json,success:C.ok,painted:T}}catch(h){return console.error("\u274C Token regeneration failed:",h),{status:403,json:{error:"Token regeneration failed: "+h.message},success:!1,painted:0}}}if(f.status>=500&&f.status<=504)try{let h=await te(!0);x=de(),m=ue();let E=JSON.stringify({colors:p,coords:g,t:h,...m?{fp:m}:{}});u(`[API] Retrying after ${f.status} with fresh token: ${h.substring(0,50)}...`);let C=await fetch(`${Ne}/s0/pixel/${t}/${e}`,{method:"POST",credentials:"include",headers:{"Content-Type":"text/plain;charset=UTF-8",...x?{"x-pawtect-token":x}:{}},body:E}),S=await ze(C),T=((r=S.json)==null?void 0:r.painted)||0;return u(`[API] Retry after ${f.status}: ${T} pixels painted`),{status:C.status,json:S.json,success:C.ok,painted:T}}catch{}let P=await ze(f),b=((s=P.json)==null?void 0:s.painted)||0;return u(`[API] Success: ${b} pixels painted`),{status:f.status,json:P.json,success:f.ok,painted:b}}catch(a){return a.name==="AbortError"||a.name==="TimeoutError"?(u(`[API] Request timeout for tile ${t},${e}`),{status:408,json:{error:"Request timeout"},success:!1,painted:0}):(u(`[API] Network error: ${a.message}`),{status:0,json:{error:a.message},success:!1,painted:0})}}he();Ie();var zt=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:12e4});function Lo(){var t;try{if(typeof window=="undefined"||!globalThis.URLSearchParams)return{};let e=new globalThis.URLSearchParams(((t=globalThis.location)==null?void 0:t.search)||""),o=e.get("metricsEnabled"),n=e.get("metricsUrl"),i=e.get("metricsKey"),d=e.get("metricsSalt"),r=e.get("metricsVariant"),s=e.get("metricsTimeoutMs"),a=e.get("metricsRetries"),c=e.get("metricsPingMs"),g={};return o!=null&&(g.ENABLED=o==="true"||o==="1"),n&&(g.BASE_URL=n),i&&(g.API_KEY=i),d&&(g.PUBLIC_SALT=d),r&&(g.VARIANT=r),s&&!Number.isNaN(Number(s))&&(g.TIMEOUT_MS=Number(s)),a&&!Number.isNaN(Number(a))&&(g.RETRIES=Number(a)),c&&!Number.isNaN(Number(c))&&(g.PING_INTERVAL_MS=Number(c)),g}catch{return{}}}function Io(){var o;let t=typeof window!="undefined"&&(window.__WPLACE_METRICS__||((o=window.__WPLACE_CONFIG__)==null?void 0:o.metrics))||{},e={};return typeof t.ENABLED=="boolean"&&(e.ENABLED=t.ENABLED),typeof t.BASE_URL=="string"&&(e.BASE_URL=t.BASE_URL),typeof t.API_KEY=="string"&&(e.API_KEY=t.API_KEY),typeof t.PUBLIC_SALT=="string"&&(e.PUBLIC_SALT=t.PUBLIC_SALT),typeof t.VARIANT=="string"&&(e.VARIANT=t.VARIANT),Number.isFinite(t.TIMEOUT_MS)&&(e.TIMEOUT_MS=t.TIMEOUT_MS),Number.isFinite(t.RETRIES)&&(e.RETRIES=t.RETRIES),Number.isFinite(t.PING_INTERVAL_MS)&&(e.PING_INTERVAL_MS=t.PING_INTERVAL_MS),e}function ko(t){let e={...t};return typeof e.BASE_URL=="string"&&(e.BASE_URL=e.BASE_URL.replace(/\/$/,"")),["auto-guard","auto-farm","auto-image","launcher"].includes(e.VARIANT)||(e.VARIANT=zt.VARIANT),e}var tt=null;function re(t={}){let e={...zt,...Io(),...Lo(),...t};return tt=ko(e),tt}async function Ro(t){let e=globalThis.TextEncoder,o=globalThis.crypto;if(!e||!(o!=null&&o.subtle))throw new Error("WebCrypto no disponible");let n=new e,i=await o.subtle.digest("SHA-256",n.encode(t));return Array.from(new Uint8Array(i)).map(d=>d.toString(16).padStart(2,"0")).join("")}async function Nt(t,e){let o=tt||re(),n=typeof e=="string"?e:o.PUBLIC_SALT;return!n||!t?null:Ro(String(n)+String(t))}function $t(){var t,e,o;try{if(typeof window=="undefined")return null;if((t=window.__WPLACE_METRICS__)!=null&&t.anonId)return String(window.__WPLACE_METRICS__.anonId);let n="wplace_metrics_aid",i=null;try{i=localStorage.getItem(n)}catch{}if(i&&typeof i=="string")return i;let d=new Uint8Array(16);(o=(e=globalThis.crypto||{}).getRandomValues)==null||o.call(e,d);let r=Array.from(d).map(s=>s.toString(16).padStart(2,"0")).join("");try{localStorage.setItem(n,r)}catch{}return window.__WPLACE_METRICS__||(window.__WPLACE_METRICS__={}),window.__WPLACE_METRICS__.anonId=r,r}catch{return null}}V();async function Bo(t,e,{timeout:o,apiKey:n}){let i={"Content-Type":"application/json"};return n&&(i["X-API-Key"]=n),await Ve(t,{method:"POST",headers:i,body:JSON.stringify(e),timeout:o})}function Ot(t){return t.text().then(e=>{try{return e?JSON.parse(e):{}}catch{return{}}})}async function Mo(t,e){let o=re(e);if(!o.ENABLED)return{ok:!1,skipped:!0};let n=`${o.BASE_URL}/v1/events`;try{let r=t==null?void 0:t.event_type,s=t==null?void 0:t.bot_variant;(r==="pixel_painted"||r==="pixel_repaired")&&typeof(t==null?void 0:t.pixel_delta)!="undefined"&&u(`[METRICS] ${r} \u2192 \u0394 ${t.pixel_delta} (${s})`)}catch{}let i=0,d=null;for(;i<=o.RETRIES;)try{let r=await Bo(n,t,{timeout:o.TIMEOUT_MS,apiKey:o.API_KEY});if(!r.ok){let a=await Ot(r);return{ok:!1,status:r.status,data:a}}let s=await Ot(r);try{let a=t==null?void 0:t.event_type,c=t==null?void 0:t.bot_variant;a==="session_start"&&u(`[METRICS] session_start (${c})`)}catch{}return{ok:!0,data:s}}catch(r){if(d=r,i++,i>o.RETRIES)break;await new Promise(s=>setTimeout(s,300*i))}return{ok:!1,error:(d==null?void 0:d.message)||String(d)}}async function ve({botVariant:t,eventType:e,pixelDelta:o,timestamp:n,metadata:i}={},d){let r=re(d);if(!r.ENABLED)return{ok:!1,skipped:!0};let s={};s.bot_variant=t||r.VARIANT,s.event_type=e,typeof o=="number"&&(s.pixel_delta=o),n&&(s.timestamp=n),i&&typeof i=="object"&&(s.event_metadata=i);let a=$t();if(a){let c=await Nt(a);c&&(s.user_hash=await c)}return Mo(s,d)}async function Ft({botVariant:t,metadata:e}={},o){return ve({botVariant:t,eventType:"session_start",metadata:e},o)}async function $e({botVariant:t,metadata:e}={},o){return ve({botVariant:t,eventType:"session_ping",metadata:e},o)}async function Dt({botVariant:t,metadata:e}={},o){return ve({botVariant:t,eventType:"session_end",metadata:e},o)}async function Wt(t,{botVariant:e,metadata:o}={},n){let i={message:t,...o||{}};return ve({botVariant:e,eventType:"error",metadata:i},n)}async function Ut(t,{botVariant:e,metadata:o}={},n){return!Number.isFinite(t)||t<=0?{ok:!1,skipped:!0}:ve({botVariant:e,eventType:"pixel_painted",pixelDelta:Math.trunc(t),metadata:o},n)}Oe();var ge=null,Ee=!1,Se=null,Ae=null,we=null;var jt=3e4;function Jo(){ge&&document.removeEventListener("visibilitychange",ge),ge=()=>{document.hidden?(u("\u{1F4F1} Pesta\xF1a oculta - pausando timers"),l.inCooldown&&(Ee=!0)):(u("\u{1F4F1} Pesta\xF1a visible - reanudando timers"),Ee&&l.inCooldown&&(Ko(),Ee=!1))},document.addEventListener("visibilitychange",ge)}function Ko(){if(!Se||!Ae)return;let t=Date.now(),e=t-Se,o=Math.max(0,Ae-e);l.nextBatchCooldown=Math.ceil(o/1e3),l.cooldownEndTime=t+o,u(`\u{1F504} Recalculando cooldown: ${Math.ceil(o/1e3)}s restantes`)}var Fe=0,Ht=12e4;async function Zo(){we&&window.clearInterval(we),Jo(),we=window.setInterval(async()=>{try{if(document.hidden)return;if(l.remainingPixels.length>0&&!l.running){let t=await Ce();if(t.success&&t.data.charges>0){let e=Math.floor(t.data.charges),o=Date.now();o-Fe>Ht&&(u(`\u{1F504} Monitoreo: ${e} cargas disponibles`),Fe=o),l.currentCharges=t.data.charges,l.maxCharges=t.data.maxCharges,e>=l.pixelsPerBatch&&window.imageBot&&typeof window.imageBot.onStartPainting=="function"&&(u(`\u{1F680} Reanudando pintado autom\xE1ticamente con ${e} cargas`),window.imageBot.onStartPainting())}}}catch(t){let e=Date.now();e-Fe>Ht&&(u(`\u26A0\uFE0F Error en monitoreo de cargas: ${t.message}`),Fe=e)}},jt),u(`\u2705 Monitoreo de cargas iniciado (cada ${jt/1e3}s)`)}function rt(){we&&(window.clearInterval(we),we=null,u("\u23F9\uFE0F Monitoreo de cargas detenido")),ge&&(document.removeEventListener("visibilitychange",ge),ge=null),Se=null,Ae=null,Ee=!1}var at=0,Qo=3e4;async function Jt(t,e){if(l.stopFlag)return u("\u{1F6D1} Bot detenido, cancelando verificaci\xF3n de cargas"),!1;let o=await Ce();if(o.success){let n=Math.floor(o.data.charges);if(l.currentCharges=o.data.charges,l.maxCharges=o.data.maxCharges,n<t){if(l.stopFlag)return u("\u{1F6D1} Bot detenido durante verificaci\xF3n de cargas"),!1;let i=Date.now();return i-at>Qo&&(u(`\u23F3 Cargas insuficientes: ${n}/${t}. Esperando regeneraci\xF3n...`),at=i),await ii(t-n,e),l.stopFlag?(u("\u{1F6D1} Bot detenido durante cooldown, cancelando recursi\xF3n"),!1):await Jt(t,e)}return at=0,!0}return u(`\u26A0\uFE0F No se pudo verificar cargas, continuando con valor cached: ${l.currentCharges}`),l.currentCharges>=t}async function Kt(t,e,o,n,i){let{width:d,height:r}=t,{x:s,y:a}=e;u(`Iniciando pintado: imagen(${d}x${r}) inicio LOCAL(${s},${a}) tile(${l.tileX},${l.tileY})`),u(`\u{1F3A8} Patr\xF3n: ${l.paintPattern}`),Zo();try{u("\u{1F511} Generando token Turnstile al inicio del proceso..."),await te()?u("\u2705 Token inicial generado exitosamente"):u("\u26A0\uFE0F No se pudo generar token inicial, continuando con flujo normal")}catch(c){u("\u26A0\uFE0F Error generando token inicial:",c.message)}if(!l.remainingPixels||l.remainingPixels.length===0||l.lastPosition.x===0&&l.lastPosition.y===0){u("Generando cola de p\xEDxeles..."),l.remainingPixels=ni(t,e,l.tileX,l.tileY),l.paintPattern&&l.paintPattern!=="linear_start"&&(u(`\u{1F3A8} Aplicando patr\xF3n de pintado: ${l.paintPattern}`),l.remainingPixels=it(l.remainingPixels,l.paintPattern,t)),(l.lastPosition.x>0||l.lastPosition.y>0)&&(l.remainingPixels=l.remainingPixels.filter(c=>{let g=c.imageY*d+c.imageX,p=l.lastPosition.y*d+l.lastPosition.x;return g>=p})),u(`Cola generada: ${l.remainingPixels.length} p\xEDxeles pendientes`);try{window.__WPA_PLAN_OVERLAY__&&(window.__WPA_PLAN_OVERLAY__.injectStyles(),window.__WPA_PLAN_OVERLAY__.setEnabled(!0),l.startPosition&&l.tileX!==void 0&&l.tileY!==void 0&&window.__WPA_PLAN_OVERLAY__.setAnchor({tileX:l.tileX,tileY:l.tileY,pxX:l.startPosition.x,pxY:l.startPosition.y}),window.__WPA_PLAN_OVERLAY__.setPlan(l.remainingPixels,{enabled:!0,nextBatchCount:l.pixelsPerBatch}))}catch(c){u("\u26A0\uFE0F Error actualizando plan overlay:",c)}}try{for(;l.remainingPixels.length>0&&!l.stopFlag;){let c=Math.floor(l.currentCharges),g;if(u(`\u{1F50D} Estado del primer lote - isFirstBatch: ${l.isFirstBatch}, useAllChargesFirst: ${l.useAllChargesFirst}, availableCharges: ${c}`),l.isFirstBatch&&l.useAllChargesFirst&&c>0?(g=Math.min(c,l.remainingPixels.length),l.isFirstBatch=!1,u(`\u{1F680} Primera pasada: usando ${g} cargas de ${c} disponibles`)):(g=Math.min(l.pixelsPerBatch,l.remainingPixels.length),u(`\u2699\uFE0F Pasada normal: usando ${g} p\xEDxeles (configurado: ${l.pixelsPerBatch})`)),!await Jt(g,o)){u("\u26A0\uFE0F No se pudieron obtener suficientes cargas, pausando pintado");break}c=Math.floor(l.currentCharges);let m=l.remainingPixels.splice(0,g),x=m,y=0;u(`Verificando lote de ${m.length} p\xEDxeles...`),u(`Pintando lote de ${x.length} p\xEDxeles...`);try{window.__WPA_PLAN_OVERLAY__&&window.__WPA_PLAN_OVERLAY__.setPlan(l.remainingPixels,{enabled:!0,nextBatchCount:l.pixelsPerBatch})}catch(f){u("\u26A0\uFE0F Error actualizando plan overlay durante pintado:",f)}let w=await oi(x,o);if(w.success&&w.painted>0){l.paintedPixels+=w.painted+y;try{Ut(w.painted+y,{botVariant:"auto-image"})}catch(h){u("\u26A0\uFE0F Error reportando m\xE9tricas:",h)}if(l.currentCharges=Math.max(0,l.currentCharges-w.painted),u(`Cargas despu\xE9s del lote: ${l.currentCharges.toFixed(1)} (consumidas: ${w.painted})`),x.length>0){let h=x[x.length-1];l.lastPosition={x:h.imageX,y:h.imageY}}u(`Lote exitoso: ${w.painted}/${x.length} p\xEDxeles pintados. Total: ${l.paintedPixels}/${l.totalPixels}`);let f=ai(),P=(l.paintedPixels/l.totalPixels*100).toFixed(1),b=I("image.passCompleted",{painted:w.painted,percent:P,current:l.paintedPixels,total:l.totalPixels});o&&o(l.paintedPixels,l.totalPixels,b,f),await le(2e3)}else w.shouldContinue?u("Lote fall\xF3 despu\xE9s de todos los reintentos, continuando con siguiente lote..."):(l.remainingPixels.unshift(...x),u("Lote fall\xF3: reintentando en 5 segundos..."),await le(5e3));await le(500)}if(l.stopFlag)u(`Pintado pausado en p\xEDxel imagen(${l.lastPosition.x},${l.lastPosition.y})`),n&&n(!1,l.paintedPixels);else{u(`Pintado completado: ${l.paintedPixels} p\xEDxeles pintados`),l.lastPosition={x:0,y:0},l.remainingPixels=[],rt();try{window.__WPA_PLAN_OVERLAY__&&(window.__WPA_PLAN_OVERLAY__.setPlan([],{enabled:!0,nextBatchCount:0}),u("\u2705 Plan overlay limpiado al completar pintado"))}catch(c){u("\u26A0\uFE0F Error limpiando plan overlay:",c)}n&&n(!0,l.paintedPixels)}}catch(c){u("Error en proceso de pintado:",c),rt(),i&&i(c)}}async function ei(t,e=null){var o;try{if(!t||t.length===0)return{success:!1,painted:0,error:"Lote vac\xEDo"};let n=new Map;for(let r of t){let s=`${r.tileX},${r.tileY}`;n.has(s)||n.set(s,{coords:[],colors:[],tx:r.tileX,ty:r.tileY});let a=n.get(s);a.coords.push(r.localX,r.localY),a.colors.push(r.color.id||r.color.value||1)}let i=e||await te(),d=0;for(let{coords:r,colors:s,tx:a,ty:c}of n.values()){if(s.length===0)continue;let g=[];for(let x=0;x<r.length;x+=2){let y=(Number(r[x])%1e3+1e3)%1e3,w=(Number(r[x+1])%1e3+1e3)%1e3;Number.isFinite(y)&&Number.isFinite(w)&&g.push(y,w)}try{let x=999,y=0,w=999,f=0;for(let P=0;P<g.length;P+=2){let b=g[P],h=g[P+1];b<x&&(x=b),b>y&&(y=b),h<w&&(w=h),h>f&&(f=h)}u(`[IMG] Enviando tile ${a},${c}: ${s.length} px | x:[${x},${y}] y:[${w},${f}]`)}catch{}let p=await Mt(a,c,g,s,i);if(p.status!==200)return{success:!1,painted:d,error:((o=p.json)==null?void 0:o.message)||`HTTP ${p.status}`,status:p.status};let m=p.painted||0;if(m===0&&s.length>0)return u(`\u26A0\uFE0F API devolvi\xF3 200 OK pero painted=0 para ${s.length} p\xEDxeles en tile ${a},${c}`),{success:!1,painted:d,error:`API devolvi\xF3 painted=0 para ${s.length} p\xEDxeles`,status:200,shouldRetry:!0};d+=m,u(`\u2705 Tile ${a},${c}: ${m}/${s.length} p\xEDxeles pintados exitosamente`)}return{success:!0,painted:d}}catch(n){return u("Error en paintPixelBatch:",n),{success:!1,painted:0,error:n.message}}}var Vt=0,De=0,ti=6e4;async function oi(t,e){let i=null;try{i=await te()}catch(r){u("\u26A0\uFE0F No se pudo obtener token inicial, se intentar\xE1 en el primer intento:",r.message)}for(let r=1;r<=5;r++)try{i||(i=await te());let s=await ei(t,i);if(s.success)return l.retryCount=0,De=0,s;if(s.status===403){u("\u{1F510} 403 recibido: invalidando y regenerando token para reintento inmediato");try{i=await te(!0);continue}catch(a){u("\u274C Fall\xF3 regeneraci\xF3n de token tras 403:",a.message)}}if(l.retryCount=r,r<5){let a=3e3*Math.pow(2,r-1),c=Math.round(a/1e3),g;if(s.status===0||s.status==="NetworkError"){De++;let m=Date.now();(m-Vt>ti||De===1)&&(u(`\u{1F310} Error de red (${De} consecutivos). Reintento ${r}/5 en ${c}s`),Vt=m),g=I("image.networkError")}else s.status>=500?(g=I("image.serverError"),u(`\u{1F527} Error del servidor ${s.status}. Reintento ${r}/5 en ${c}s`)):s.status===408?(g=I("image.timeoutError"),u(`\u23F1\uFE0F Timeout. Reintento ${r}/5 en ${c}s`)):(g=I("image.retryAttempt",{attempt:r,maxAttempts:5,delay:c}),u(`\u{1F504} Reintento ${r}/5 despu\xE9s de ${c}s. Error: ${s.error}`));e&&e(l.paintedPixels,l.totalPixels,g),await le(a)}}catch(s){if(l.retryCount=r,r<5){let a=3e3*Math.pow(2,r-1),c=Math.round(a/1e3);if(/403/.test((s==null?void 0:s.message)||""))try{u("\u{1F510} Excepci\xF3n potencial de token, regenerando..."),i=await te(!0);continue}catch(p){u("\u274C Fall\xF3 regeneraci\xF3n tras excepci\xF3n 403:",p.message)}(r===1||r%3===0)&&u(`\u274C Excepci\xF3n en intento ${r}:`,s.message);let g=I("image.retryError",{attempt:r,maxAttempts:5,delay:c});e&&e(l.paintedPixels,l.totalPixels,g),await le(a)}}l.retryCount=5;let d=I("image.retryFailed",{maxAttempts:5});return e&&e(l.paintedPixels,l.totalPixels,d),u("\u{1F4A5} Fall\xF3 despu\xE9s de 5 intentos, continuando con siguiente lote"),{success:!1,painted:0,error:"Fall\xF3 despu\xE9s de 5 intentos",shouldContinue:!0}}async function ii(t,e){let n=ne.CHARGE_REGEN_MS*t+5e3;if(l.stopFlag){u("\u{1F6D1} Bot detenido, cancelando cooldown");return}u(`Esperando ${Math.round(n/1e3)}s para obtener ${t} cargas`);let i=Date.now();if(Se=i,Ae=n,l.inCooldown=!0,l.cooldownEndTime=i+n,l.nextBatchCooldown=Math.round(n/1e3),e){let d=Math.floor(n/6e4),r=Math.floor(n%6e4/1e3),s=d>0?`${d}m ${r}s`:`${r}s`,a=I("image.waitingChargesRegen",{current:Math.floor(l.currentCharges),needed:t,time:s});e(l.paintedPixels,l.totalPixels,a)}for(;;){let r=Date.now()-i,s=Math.max(0,n-r);if(l.stopFlag){u(`\u{1F6D1} Bot detenido durante cooldown con ${Math.ceil(s/1e3)}s restantes`);break}if(s<=0)break;let a=Math.ceil(s/1e3);l.nextBatchCooldown=a;let c=a%30===0||a<=30&&a%10===0||a<=5||r<2e3;if(e&&c){let g=Math.floor(a/60),p=a%60,m=g>0?`${g}m ${p}s`:`${p}s`,x=I("image.waitingChargesCountdown",{current:Math.floor(l.currentCharges),needed:t,time:m});e(l.paintedPixels,l.totalPixels,x)}await le(Math.min(1e3,s))}l.inCooldown=!1,l.nextBatchCooldown=0,Se=null,Ae=null,Ee=!1,l.stopFlag||(l.currentCharges=Math.min(l.maxCharges||9999,l.currentCharges+n/ne.CHARGE_REGEN_MS))}function ni(t,e,o,n){let{x:i,y:d}=e,r=[],s;if(t&&t.processor&&typeof t.processor.generatePixelQueue=="function")s=t.processor.generatePixelQueue();else if(t&&typeof t.generatePixelQueue=="function")s=t.generatePixelQueue();else if(t&&Array.isArray(t.pixels))s=t.pixels;else if(t&&typeof t.pixels=="function")s=t.pixels();else if(t&&t.pixels)s=t.pixels;else return u(`\u274C Error: No se pueden obtener p\xEDxeles de imageData. Tipo: ${typeof t}`,t),[];if(!Array.isArray(s))return u(`\u274C Error: pixels no es un array iterable. Tipo: ${typeof s}`,s),[];for(let a of s){if(!a)continue;let c=a.imageX!==void 0?a.imageX:a.x,g=a.imageY!==void 0?a.imageY:a.y,p=a.color!==void 0?a.color:a.targetColor;if(c===void 0||g===void 0){u("\u26A0\uFE0F P\xEDxel con coordenadas inv\xE1lidas:",a);continue}let m=i+c,x=d+g,y=Math.floor(m/1e3),w=Math.floor(x/1e3),f=o+y,P=n+w,b=(m%1e3+1e3)%1e3,h=(x%1e3+1e3)%1e3;r.push({imageX:c,imageY:g,localX:b,localY:h,tileX:f,tileY:P,color:p,originalColor:a.originalColor})}return u(`Cola de p\xEDxeles generada: ${r.length} p\xEDxeles para pintar`),r}function ai(){if(!l.remainingPixels||l.remainingPixels.length===0)return 0;let t=l.remainingPixels.length,e=l.pixelsPerBatch,o=ne.CHARGE_REGEN_MS/1e3,n=Math.ceil(t/e),i=e*o,d=(n-1)*i,r=n*2;return Math.ceil(d+r)}function st(){l.stopFlag=!0,l.running=!1,rt(),u("\u{1F6D1} Deteniendo proceso de pintado...")}V();he();function ri(){return l.imageData?l.imageData.processor&&typeof l.imageData.processor.generatePixelQueue=="function"?l.imageData.processor.generatePixelQueue():l.imageData.fullPixelData&&Array.isArray(l.imageData.fullPixelData)&&l.imageData.fullPixelData.length>0?l.imageData.fullPixelData:l.imageData.pixels&&l.imageData.pixels.length>0?l.imageData.pixels:l.remainingPixels&&l.remainingPixels.length>0?(u("\u26A0\uFE0F Exportando usando remainingPixels (posible subconjunto del proyecto)"),l.remainingPixels):null:null}function lt(t=null){try{if(!l.imageData||l.paintedPixels===0)throw new Error("No hay progreso para guardar");let e=null;try{let a=ri();a&&Array.isArray(a)&&(a.length>5e4?(u(`\u26A0\uFE0F Imagen muy grande (${a.length} p\xEDxeles), guardando solo p\xEDxeles restantes`),e=null):e=a)}catch(a){u("\u26A0\uFE0F Error obteniendo datos completos de p\xEDxeles, continuando sin ellos:",a),e=null}let o={version:"2.0",timestamp:Date.now(),imageData:{width:l.imageData.width,height:l.imageData.height,originalName:l.originalImageName,...e&&{fullPixelData:e}},progress:{paintedPixels:l.paintedPixels,totalPixels:l.totalPixels,lastPosition:{...l.lastPosition}},position:{startPosition:{...l.startPosition},tileX:l.tileX,tileY:l.tileY},config:{pixelsPerBatch:l.pixelsPerBatch,useAllChargesFirst:l.useAllChargesFirst,isFirstBatch:l.isFirstBatch,maxCharges:l.maxCharges,paintPattern:l.paintPattern},colors:l.availableColors.map(a=>({id:a.id,r:a.r,g:a.g,b:a.b})),remainingPixels:l.remainingPixels||[]},n;try{n=JSON.stringify(o,null,2)}catch{u("\u26A0\uFE0F Error serializando datos completos, intentando sin fullPixelData"),delete o.imageData.fullPixelData,n=JSON.stringify(o,null,2)}let i=new window.Blob([n],{type:"application/json"}),d=t||`wplace_progress_${l.originalImageName||"image"}_${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.json`,r=window.URL.createObjectURL(i),s=document.createElement("a");return s.href=r,s.download=d,document.body.appendChild(s),s.click(),document.body.removeChild(s),window.URL.revokeObjectURL(r),u(`\u2705 Progreso guardado: ${d}`),{success:!0,filename:d}}catch(e){return u("\u274C Error guardando progreso:",e),{success:!1,error:e.message}}}async function Qt(t){return new Promise(e=>{try{let o=new window.FileReader;o.onload=n=>{try{let i=JSON.parse(n.target.result),r=["imageData","progress","position","colors"].filter(c=>!(c in i));if(r.length>0)throw new Error(`Campos requeridos faltantes: ${r.join(", ")}`);let s=i.version||"1.0";if(u(`\u{1F4C1} Cargando progreso versi\xF3n ${s}`),(!l.availableColors||l.availableColors.length===0)&&(l.availableColors=Array.isArray(i.colors)?i.colors:[]),l.availableColors.length>0&&Array.isArray(i.colors)){let c=i.colors.map(m=>m.id),g=l.availableColors.map(m=>m.id);c.filter(m=>g.includes(m)).length<c.length*.8&&u("\u26A0\uFE0F Los colores guardados no coinciden completamente con los actuales")}l.imageData={...i.imageData,pixels:[]};let a=i.imageData.fullPixelData||i.fullPixelData;if(Array.isArray(a)&&a.length>0&&(l.imageData.fullPixelData=a,l.imageData.pixels=a,u(`\u2705 Cargados ${a.length} p\xEDxeles completos del proyecto`)),l.paintedPixels=i.progress.paintedPixels,l.totalPixels=i.progress.totalPixels,i.progress.lastPosition?l.lastPosition=i.progress.lastPosition:i.position.lastX!==void 0&&i.position.lastY!==void 0&&(l.lastPosition={x:i.position.lastX,y:i.position.lastY}),i.position.startPosition?l.startPosition=i.position.startPosition:i.position.startX!==void 0&&i.position.startY!==void 0&&(l.startPosition={x:i.position.startX,y:i.position.startY}),l.tileX=i.position.tileX,l.tileY=i.position.tileY,l.originalImageName=i.imageData.originalName,l.remainingPixels=i.remainingPixels||i.progress.remainingPixels||[],i.config&&(l.pixelsPerBatch=i.config.pixelsPerBatch||l.pixelsPerBatch,l.useAllChargesFirst=i.config.useAllChargesFirst!==void 0?i.config.useAllChargesFirst:l.useAllChargesFirst,l.isFirstBatch=l.useAllChargesFirst?!0:i.config.isFirstBatch!==void 0?i.config.isFirstBatch:!1,u(`\u{1F4C1} Progreso cargado - useAllChargesFirst: ${l.useAllChargesFirst}, isFirstBatch: ${l.isFirstBatch}`),l.maxCharges=i.config.maxCharges||l.maxCharges,s>="2.0"&&(l.paintPattern=i.config.paintPattern||"linear_start")),l.paintPattern&&l.paintPattern!=="linear_start"&&l.remainingPixels.length>0)try{Promise.resolve().then(()=>(Oe(),nt)).then(({applyPaintPattern:c})=>{l.remainingPixels=c(l.remainingPixels,l.paintPattern,l.imageData),u(`\u{1F3A8} Patr\xF3n de pintado aplicado: ${l.paintPattern}`)}).catch(c=>{u("\u26A0\uFE0F Error aplicando patr\xF3n de pintado:",c)})}catch(c){u("\u26A0\uFE0F Error cargando m\xF3dulo de patrones:",c)}try{window.__WPA_PLAN_OVERLAY__&&(window.__WPA_PLAN_OVERLAY__.injectStyles(),window.__WPA_PLAN_OVERLAY__.setEnabled(!0),l.startPosition&&l.tileX!==void 0&&l.tileY!==void 0&&(window.__WPA_PLAN_OVERLAY__.setAnchor({tileX:l.tileX,tileY:l.tileY,pxX:l.startPosition.x,pxY:l.startPosition.y}),u(`\u2705 Plan overlay anclado con posici\xF3n cargada: tile(${l.tileX},${l.tileY}) local(${l.startPosition.x},${l.startPosition.y})`)),window.__WPA_PLAN_OVERLAY__.setPlan(l.remainingPixels,{enabled:!0,nextBatchCount:l.pixelsPerBatch}),u(`\u2705 Plan overlay activado con ${l.remainingPixels.length} p\xEDxeles restantes`))}catch(c){u("\u26A0\uFE0F Error activando plan overlay al cargar progreso:",c)}l.imageLoaded=!0,l.colorsChecked=!0,u(`\u2705 Progreso cargado (v${s}): ${l.paintedPixels}/${l.totalPixels} p\xEDxeles`),s>="2.0"&&u(`\u{1F3A8} Patr\xF3n: ${l.paintPattern}`),e({success:!0,data:i,painted:l.paintedPixels,total:l.totalPixels,canContinue:l.remainingPixels.length>0,version:s})}catch(i){u("\u274C Error parseando archivo de progreso:",i),e({success:!1,error:i.message})}},o.onerror=()=>{let n="Error leyendo archivo";u("\u274C",n),e({success:!1,error:n})},o.readAsText(t)}catch(o){u("\u274C Error cargando progreso:",o),e({success:!1,error:o.message})}})}function eo(){l.paintedPixels=0,l.totalPixels=0,l.lastPosition={x:0,y:0},l.remainingPixels=[],l.imageData=null,l.startPosition=null,l.imageLoaded=!1,l.originalImageName=null,l.isFirstBatch=!0,l.nextBatchCooldown=0,l.drawnPixelsMap.clear(),l.lastProtectionCheck=0,u("\u{1F9F9} Progreso limpiado")}function Zt(){return l.imageLoaded&&l.paintedPixels>0&&l.remainingPixels&&l.remainingPixels.length>0}function to(){return{hasProgress:Zt(),painted:l.paintedPixels,total:l.totalPixels,remaining:l.remainingPixels?l.remainingPixels.length:0,percentage:l.totalPixels>0?l.paintedPixels/l.totalPixels*100:0,lastPosition:{...l.lastPosition},canContinue:Zt()}}V();function oo(t=null){let e=document.createElement("div");t&&(e.id=t),e.style.cssText=`
position: fixed;
top: 10px;
right: 10px;
z-index: 0; /* No forzar al frente; el window-manager ajustar\xE1 seg\xFAn corresponda */
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
`;let o=e.attachShadow({mode:"open"});return document.body.appendChild(e),{host:e,root:o}}V();var Te=1e5,se=new Set,We=!1,ae=new Set,ct=!1;function si(t){ct=t}function j(t,e=null){ct&&(e?console.log(`[ModalManager] ${t}`,e):console.log(`[ModalManager] ${t}`))}function Ue(){return document.querySelectorAll("dialog.modal[open], dialog[open], .modal[open], .modal.show").length>0}function xe(){let t=Ue();j(`Modal state changed. Open: ${t}`),j(`Windows registered: ${se.size}`),j(`Windows currently hidden by modal: ${ae.size}`),se.forEach(e=>{if(t){if(!ae.has(e)){j("Hiding window due to modal",e),ae.add(e),e.style.transition="all 0.3s ease-out",e.style.opacity="0",e.style.pointerEvents="none";let o=e.getRootNode&&e.getRootNode();o&&o.host&&o.host.style&&(j("Also hiding Shadow DOM host",o.host),o.host.style.transition="all 0.3s ease-out",o.host.style.opacity="0",o.host.style.pointerEvents="none")}}else if(ae.has(e)){j("Showing window, no modals detected",e),ae.delete(e),e.style.transition="all 0.3s ease-in",e.style.opacity="1",e.style.pointerEvents="auto";let o=e.getRootNode&&e.getRootNode();o&&o.host&&o.host.style&&(j("Also showing Shadow DOM host",o.host),o.host.style.transition="all 0.3s ease-in",o.host.style.opacity="1",o.host.style.pointerEvents="auto")}})}function li(){if(We)return;j("Setting up modal observers");let t=new MutationObserver(i=>{j(`Attribute mutations detected: ${i.length}`),i.forEach(d=>{d.type==="attributes"&&(d.attributeName==="open"||d.attributeName==="class")&&(j(`Attribute changed: ${d.attributeName} on`,d.target),j(`Old value: ${d.oldValue}`),j(`New value: ${d.target.getAttribute(d.attributeName)}`),xe())})}),e=new MutationObserver(i=>{j(`DOM mutations detected: ${i.length}`),i.forEach(d=>{d.type==="childList"&&(d.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE){let s='dialog.modal, dialog, .modal, [role="dialog"], .overlay, .popup';r.matches&&r.matches(s)&&(j("New modal element detected",r),t.observe(r,{attributes:!0,attributeFilter:["open","class","aria-hidden"],attributeOldValue:!0}),xe());let a=r.querySelectorAll?r.querySelectorAll(s):[];a.length>0&&j(`Found ${a.length} nested modals`),a.forEach(c=>{j("Observing nested modal",c),t.observe(c,{attributes:!0,attributeFilter:["open","class","aria-hidden"],attributeOldValue:!0})}),a.length>0&&xe()}}),d.removedNodes.length>0&&(j(`${d.removedNodes.length} nodes removed`),xe()))})}),n=document.querySelectorAll('dialog.modal, dialog, .modal, [role="dialog"], .overlay, .popup');j(`Found ${n.length} existing modals`),n.forEach(i=>{j("Observing existing modal",i),t.observe(i,{attributes:!0,attributeFilter:["open","class","aria-hidden"],attributeOldValue:!0})}),e.observe(document.body,{childList:!0,subtree:!0}),We=!0,j("Modal observers setup complete")}function oe(t){if(!t)return;se.add(t),We||setTimeout(()=>{li()},100);let e=o=>{(o.target===t||t.contains(o.target))&&pe(t)};if(t.addEventListener("mousedown",e),t._bringToFrontHandler=e,!t.style.zIndex){t.style.zIndex=Te++;let o=t.getRootNode&&t.getRootNode();o&&o.host&&o.host.style&&(o.host.style.zIndex=t.style.zIndex)}xe(),j("Window registered successfully",t)}function ie(t){t&&(se.delete(t),ae.delete(t),t._bringToFrontHandler&&(t.removeEventListener("mousedown",t._bringToFrontHandler),delete t._bringToFrontHandler))}function pe(t){if(!t||!se.has(t)||Ue())return;Te++,t.style.zIndex=Te;let e=t.getRootNode&&t.getRootNode();e&&e.host&&e.host.style&&(e.host.style.zIndex=Te)}function ci(){xe()}function di(){console.log("=== MODAL MANAGER DEBUG STATE ==="),console.log("Debug enabled:",ct),console.log("Observers setup:",We),console.log("Windows registered:",se.size),console.log("Windows hidden by modal:",ae.size),console.log("Current max Z-Index:",Te),console.log("Any modal open:",Ue()),console.log(`
--- Registered Windows ---`),se.forEach((e,o)=>{console.log(`Window ${o}:`,{element:e,zIndex:e.style.zIndex,opacity:e.style.opacity,isHidden:ae.has(e)})}),console.log(`
--- Current Modals ---`),document.querySelectorAll('dialog.modal[open], dialog[open], .modal[open], .modal.show, [role="dialog"]').forEach((e,o)=>{console.log(`Modal ${o}:`,{element:e,isOpen:e.hasAttribute("open")||e.classList.contains("show"),display:window.getComputedStyle(e).display,visibility:window.getComputedStyle(e).visibility})})}typeof window!="undefined"&&(window.setModalDebug=si,window.debugModalState=di,window.registerWindow=oe,window.unregisterWindow=ie,window.__modalManagerDebug={windowElements:se,hiddenWindowsByModal:ae,isAnyModalOpen:Ue,refreshWindowsVisibility:ci},console.log("[WindowManager] Funciones expuestas globalmente autom\xE1ticamente"));var Ye=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){u("Error cargando configuraci\xF3n de ventana de logs:",e)}}saveConfig(){try{localStorage.setItem(`wplace-log-window-${this.botName}`,JSON.stringify(this.config))}catch(e){u("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 o=document.createElement("div");o.textContent=`\u{1F4CB} Logs - ${this.botName}`,o.style.cssText=`
font-weight: bold;
font-size: 14px;
color: #e2e8f0;
`;let n=document.createElement("div");n.style.cssText=`
display: flex;
gap: 8px;
`;let i=document.createElement("button");i.innerHTML="\u{1F4BE}",i.title="Descargar logs",i.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;
`,i.addEventListener("mouseenter",()=>{i.style.background="rgba(34, 197, 94, 1)"}),i.addEventListener("mouseleave",()=>{i.style.background="rgba(34, 197, 94, 0.8)"}),i.addEventListener("click",()=>this.downloadLogs());let d=document.createElement("button");d.innerHTML="\u2715",d.title="Cerrar ventana",d.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;
`,d.addEventListener("mouseenter",()=>{d.style.background="rgba(239, 68, 68, 1)"}),d.addEventListener("mouseleave",()=>{d.style.background="rgba(239, 68, 68, 0.8)"}),d.addEventListener("click",()=>this.hide()),n.appendChild(i),n.appendChild(d),e.appendChild(o),e.appendChild(n),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),oe(this.container),this.setupDragging(e),this.setupResizing(),this.isVisible=this.config.visible}setupDragging(e){let o=!1,n={x:0,y:0};e.addEventListener("mousedown",r=>{r.target.tagName!=="BUTTON"&&(o=!0,n.x=r.clientX-this.container.offsetLeft,n.y=r.clientY-this.container.offsetTop,document.addEventListener("mousemove",i),document.addEventListener("mouseup",d),r.preventDefault())});let i=r=>{if(!o)return;let s=Math.max(0,Math.min(window.innerWidth-this.container.offsetWidth,r.clientX-n.x)),a=Math.max(0,Math.min(window.innerHeight-this.container.offsetHeight,r.clientY-n.y));this.container.style.left=s+"px",this.container.style.top=a+"px",this.config.x=s,this.config.y=a},d=()=>{o=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",d),this.saveConfig()}}setupResizing(){let e=!1,o,n,i,d;this.resizeHandle.addEventListener("mousedown",a=>{e=!0,o=a.clientX,n=a.clientY,i=parseInt(document.defaultView.getComputedStyle(this.container).width,10),d=parseInt(document.defaultView.getComputedStyle(this.container).height,10),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s),a.preventDefault()});let r=a=>{if(!e)return;let c=Math.max(300,i+a.clientX-o),g=Math.max(200,d+a.clientY-n);this.container.style.width=c+"px",this.container.style.height=g+"px",this.config.width=c,this.config.height=g},s=()=>{e=!1,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s),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,o){let n=new Date().toLocaleTimeString(),i=o.map(r=>typeof r=="object"?JSON.stringify(r,null,2):String(r)).join(" "),d={timestamp:n,type:e,message:i,raw:o};this.logs.push(d),this.logs.length>this.maxLogs&&this.logs.shift(),this.isVisible&&this.updateLogDisplay()}updateLogDisplay(){if(!this.logContent)return;let e=this.logs.map(o=>`<div style="color: ${this.getLogColor(o.type)}; margin-bottom: 2px;">[${o.timestamp}] ${o.message}</div>`).join("");this.logContent.innerHTML=e,this.logContent.scrollTop=this.logContent.scrollHeight}getLogColor(e){let o={log:"#e2e8f0",info:"#60a5fa",warn:"#fbbf24",error:"#f87171",debug:"#a78bfa"};return o[e]||o.log}downloadLogs(){let e=new Date,o=e.toISOString().split("T")[0],n=e.toTimeString().split(" ")[0].replace(/:/g,"-"),i=`log_${this.botName}_${o}_${n}.log`,d=this.logs.map(c=>`[${c.timestamp}] [${c.type.toUpperCase()}] ${c.message}`).join(`
`),r=new Blob([d],{type:"text/plain"}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s),u(`\u{1F4E5} Logs descargados como: ${i}`)}show(){this.container&&(this.container.style.display="flex",pe(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,o=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>o&&(this.config.y=Math.max(0,o),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&&(ie(this.container),this.container.parentNode.removeChild(this.container)),this.container=null,this.logContent=null,this.logs=[]}};window.__wplaceLogWindows=window.__wplaceLogWindows||{};function dt(t){return window.__wplaceLogWindows[t]||(window.__wplaceLogWindows[t]=new Ye(t)),window.__wplaceLogWindows[t]}V();he();V();var io={0:{id:1,name:"Black",rgb:{r:0,g:0,b:0}},1:{id:2,name:"Dark Gray",rgb:{r:60,g:60,b:60}},2:{id:3,name:"Gray",rgb:{r:120,g:120,b:120}},3:{id:4,name:"Light Gray",rgb:{r:210,g:210,b:210}},4:{id:5,name:"White",rgb:{r:255,g:255,b:255}},5:{id:6,name:"Deep Red",rgb:{r:96,g:0,b:24}},6:{id:7,name:"Red",rgb:{r:237,g:28,b:36}},7:{id:8,name:"Orange",rgb:{r:255,g:127,b:39}},8:{id:9,name:"Gold",rgb:{r:246,g:170,b:9}},9:{id:10,name:"Yellow",rgb:{r:249,g:221,b:59}},10:{id:11,name:"Light Yellow",rgb:{r:255,g:250,b:188}},11:{id:12,name:"Dark Green",rgb:{r:14,g:185,b:104}},12:{id:13,name:"Green",rgb:{r:19,g:230,b:123}},13:{id:14,name:"Light Green",rgb:{r:135,g:255,b:94}},14:{id:15,name:"Dark Teal",rgb:{r:12,g:129,b:110}},15:{id:16,name:"Teal",rgb:{r:16,g:174,b:166}},16:{id:17,name:"Light Teal",rgb:{r:19,g:225,b:190}},17:{id:20,name:"Cyan",rgb:{r:96,g:247,b:242}},18:{id:44,name:"Light Cyan",rgb:{r:187,g:250,b:242}},19:{id:18,name:"Dark Blue",rgb:{r:40,g:80,b:158}},20:{id:19,name:"Blue",rgb:{r:64,g:147,b:228}},21:{id:21,name:"Indigo",rgb:{r:107,g:80,b:246}},22:{id:22,name:"Light Indigo",rgb:{r:153,g:177,b:251}},23:{id:23,name:"Dark Purple",rgb:{r:120,g:12,b:153}},24:{id:24,name:"Purple",rgb:{r:170,g:56,b:185}},25:{id:25,name:"Light Purple",rgb:{r:224,g:159,b:249}},26:{id:26,name:"Dark Pink",rgb:{r:203,g:0,b:122}},27:{id:27,name:"Pink",rgb:{r:236,g:31,b:128}},28:{id:28,name:"Light Pink",rgb:{r:243,g:141,b:169}},29:{id:29,name:"Dark Brown",rgb:{r:104,g:70,b:52}},30:{id:30,name:"Brown",rgb:{r:149,g:104,b:42}},31:{id:31,name:"Beige",rgb:{r:248,g:178,b:119}},32:{id:52,name:"Light Beige",rgb:{r:255,g:197,b:165}},33:{id:32,name:"Medium Gray",rgb:{r:170,g:170,b:170}},34:{id:33,name:"Dark Red",rgb:{r:165,g:14,b:30}},35:{id:34,name:"Light Red",rgb:{r:250,g:128,b:114}},36:{id:35,name:"Dark Orange",rgb:{r:228,g:92,b:26}},37:{id:37,name:"Dark Goldenrod",rgb:{r:156,g:132,b:49}},38:{id:38,name:"Goldenrod",rgb:{r:197,g:173,b:49}},39:{id:39,name:"Light Goldenrod",rgb:{r:232,g:212,b:95}},40:{id:40,name:"Dark Olive",rgb:{r:74,g:107,b:58}},41:{id:41,name:"Olive",rgb:{r:90,g:148,b:74}},42:{id:42,name:"Light Olive",rgb:{r:132,g:197,b:115}},43:{id:43,name:"Dark Cyan",rgb:{r:15,g:121,b:159}},44:{id:45,name:"Light Blue",rgb:{r:125,g:199,b:255}},45:{id:46,name:"Dark Indigo",rgb:{r:77,g:49,b:184}},46:{id:47,name:"Dark Slate Blue",rgb:{r:74,g:66,b:132}},47:{id:48,name:"Slate Blue",rgb:{r:122,g:113,b:196}},48:{id:49,name:"Light Slate Blue",rgb:{r:181,g:174,b:241}},49:{id:53,name:"Dark Peach",rgb:{r:155,g:82,b:73}},50:{id:54,name:"Peach",rgb:{r:209,g:128,b:120}},51:{id:55,name:"Light Peach",rgb:{r:250,g:182,b:164}},52:{id:50,name:"Light Brown",rgb:{r:219,g:164,b:99}},53:{id:56,name:"Dark Tan",rgb:{r:123,g:99,b:82}},54:{id:57,name:"Tan",rgb:{r:156,g:132,b:107}},55:{id:36,name:"Light Tan",rgb:{r:214,g:181,b:148}},56:{id:51,name:"Dark Beige",rgb:{r:209,g:128,b:81}},57:{id:61,name:"Dark Stone",rgb:{r:109,g:100,b:63}},58:{id:62,name:"Stone",rgb:{r:148,g:140,b:107}},59:{id:63,name:"Light Stone",rgb:{r:205,g:197,b:158}},60:{id:58,name:"Dark Slate",rgb:{r:51,g:57,b:65}},61:{id:59,name:"Slate",rgb:{r:109,g:117,b:141}},62:{id:60,name:"Light Slate",rgb:{r:179,g:185,b:209}},63:{id:0,name:"Transparent",rgb:null}};function no(t,e=[]){u("\u{1F3A8} Creando selector de paleta de colores");let o=document.createElement("div");o.className="wplace-section",o.id="color-palette-section",o.style.marginTop="15px",o.innerHTML=`
<div class="wplace-section-title">
<i class="fas fa-palette"></i> Color Palette
</div>
<div class="wplace-controls">
<div class="wplace-row single">
<label style="display: flex; align-items: center; gap: 8px; font-size: 12px;">
<input type="checkbox" id="showAllColorsToggle" style="cursor: pointer;">
<span>Show All Colors (including unavailable)</span>
</label>
</div>
<div class="wplace-row">
<button id="selectAllBtn" class="wplace-btn">Select All</button>
<button id="unselectAllBtn" class="wplace-btn">Unselect All</button>
</div>
<div id="colors-container" class="wplace-color-grid"></div>
</div>
`;let n=document.createElement("style");n.textContent=`
.wplace-section {
background: rgba(255,255,255,0.05);
border-radius: 8px;
padding: 15px;
border: 1px solid rgba(255,255,255,0.1);
}
.wplace-section-title {
font-size: 14px;
font-weight: 600;
color: #60a5fa;
margin-bottom: 12px;
display: flex;
align-items: center;
}
.wplace-controls {
display: flex;
flex-direction: column;
gap: 10px;
}
.wplace-row {
display: flex;
gap: 10px;
align-items: center;
}
.wplace-row.single {
justify-content: flex-start;
}
.wplace-btn {
background: #60a5fa;
color: white;
border: none;
border-radius: 6px;
padding: 6px 12px;
cursor: pointer;
font-size: 12px;
font-weight: 500;
transition: all 0.2s;
}
.wplace-btn:hover {
background: #4facfe;
transform: translateY(-1px);
}
.wplace-color-grid {
display: grid;
grid-template-columns: repeat(8, 1fr);
gap: 8px;
padding: 12px;
max-height: 300px;
overflow-y: auto;
background: rgba(0, 0, 0, 0.1);
border-radius: 6px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.wplace-color-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
min-width: 0;
}
.wplace-color-item-name {
font-size: 9px;
color: #ccc;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
line-height: 1.2;
}
.wplace-color-swatch {
width: 32px;
height: 32px;
border: 2px solid rgba(255,255,255,0.3);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
margin: 0 auto;
background: transparent;
display: flex;
align-items: center;
justify-content: center;
}
.wplace-color-swatch.unavailable {
border-color: #666;
border-style: dashed;
cursor: not-allowed;
opacity: 0.4;
filter: grayscale(70%);
}
.wplace-color-swatch:hover:not(.unavailable) {
transform: scale(1.05);
border-color: #60a5fa;
box-shadow: 0 0 8px rgba(96, 165, 250, 0.3);
z-index: 1;
}
.wplace-color-swatch:not(.active):not(.unavailable) {
opacity: 0.5;
filter: grayscale(60%);
}
.wplace-color-swatch.unavailable:not(.active) {
opacity: 0.3;
filter: grayscale(80%);
}
.wplace-color-swatch.active {
border-color: #10b981;
opacity: 1;
filter: none;
box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}
.wplace-color-swatch.active::after {
content: '\u2713';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 18px;
font-weight: bold;
text-shadow:
-1px -1px 0 #000,
1px -1px 0 #000,
-1px 1px 0 #000,
1px 1px 0 #000,
0 0 3px rgba(0,0,0,0.8);
z-index: 2;
}
.wplace-color-item.unavailable .wplace-color-item-name {
color: #888;
font-style: italic;
}
`;let i=t.getRootNode&&t.getRootNode();i&&i.nodeType===11&&i.host?i.querySelector("#color-palette-styles")||(n.id="color-palette-styles",i.appendChild(n)):document.head.querySelector("#color-palette-styles")||(n.id="color-palette-styles",document.head.appendChild(n)),t.appendChild(o);let r={showAllToggle:o.querySelector("#showAllColorsToggle"),selectAllBtn:o.querySelector("#selectAllBtn"),unselectAllBtn:o.querySelector("#unselectAllBtn"),colorsContainer:o.querySelector("#colors-container")},s=new Set,a=!1,c=null;function g(){s.clear(),r.colorsContainer.querySelectorAll(".wplace-color-swatch.active").forEach(b=>{let h=parseInt(b.dataset.colorId);isNaN(h)||s.add(h)}),c&&c(Array.from(s))}function p(P,b=!1){r.colorsContainer.querySelectorAll(".wplace-color-swatch").forEach(E=>{let C=E.classList.contains("unavailable"),S=parseInt(E.dataset.colorId);(!C||b)&&(C||(E.classList.toggle("active",P),P?s.add(S):s.delete(S)))}),g(),u(`\u{1F3A8} ${P?"Seleccionados":"Deseleccionados"} todos los colores disponibles`)}function m(P=!1){if(r.colorsContainer.innerHTML="",!e||e.length===0){r.colorsContainer.innerHTML='<div style="text-align: center; color: #888; padding: 20px;">Upload an image first to capture available colors</div>';return}let b=0,h=0,E=s.size>0,C=new Set;Object.values(io).filter(L=>L.rgb!==null).forEach(L=>{let{id:_,name:B,rgb:M}=L,G=`${M.r},${M.g},${M.b}`;h++;let U=e.some(Y=>Y.r===M.r&&Y.g===M.g&&Y.b===M.b);if(!P&&!U)return;U&&b++;let Z=document.createElement("div");Z.className="wplace-color-item";let X=document.createElement("button");X.className=`wplace-color-swatch ${U?"":"unavailable"}`,X.title=`${B} (ID: ${_})${U?"":" (Unavailable)"}`,X.dataset.rgb=G,X.dataset.colorId=_,X.style.backgroundColor=`rgb(${M.r}, ${M.g}, ${M.b})`,U||(X.disabled=!0);let J=E?s.has(_):U;X.classList.toggle("active",J),J?C.add(_):C.delete(_);let W=document.createElement("span");W.className="wplace-color-item-name",W.textContent=B+(U?"":" (N/A)"),U||(W.style.color="#888",W.style.fontStyle="italic"),U&&X.addEventListener("click",Y=>{Y.preventDefault(),Y.stopPropagation();let v=X.classList.contains("active");X.classList.toggle("active",!v),v?s.delete(_):s.add(_),g(),u(`\u{1F3A8} Color ${B} (ID: ${_}) ${v?"deseleccionado":"seleccionado"}`)}),Z.appendChild(X),Z.appendChild(W),r.colorsContainer.appendChild(Z)}),s=C,r.colorsContainer.querySelectorAll(".wplace-color-swatch").forEach(L=>{let _=parseInt(L.dataset.colorId),B=s.has(_);L.classList.toggle("active",B)}),g()}r.showAllToggle.addEventListener("change",P=>{a=P.target.checked,m(a)}),r.selectAllBtn.addEventListener("click",()=>{p(!0,a)}),r.unselectAllBtn.addEventListener("click",()=>{p(!1,a)}),m(!1);function x(P){e=P||[],m(a)}function y(){return Array.from(s)}function w(P){s=new Set(P||[]),r.colorsContainer.querySelectorAll(".wplace-color-swatch").forEach(h=>{let E=parseInt(h.dataset.colorId),C=s.has(E);h.classList.toggle("active",C)}),c&&c(Array.from(s))}function f(P){c=P}return u("\u2705 Selector de paleta de colores creado"),{updateAvailableColors:x,getSelectedColors:y,setSelectedColors:w,onSelectionChange:f,element:o}}function ao(){let t=null;function e(r){let s=document.createElement("div");s.style.cssText=`
position: fixed;
top: 50px;
left: 50px;
width: 450px;
min-width: 350px;
max-width: 600px;
min-height: 400px;
max-height: 80vh;
background: #1a1a1a;
border: 1px solid #333;
border-radius: 8px;
color: #eee;
font-family: 'Segoe UI', Roboto, sans-serif;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
resize: both;
overflow: auto;
display: none;
flex-direction: column;
`,s.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="resize-header">
<div style="display: flex; align-items: center; gap: 8px;">
\u{1F527} <span>Redimensionar Imagen</span>
</div>
<div style="display: flex; gap: 5px;">
<button id="minimizeResizeBtn" style="background: none; border: none; color: #eee; cursor: pointer; opacity: 0.7; padding: 5px; transition: opacity 0.2s ease;">\u2796</button>
<button id="closeResizeBtn" style="background: none; border: none; color: #eee; cursor: pointer; opacity: 0.7; padding: 5px; transition: opacity 0.2s ease;">\u2716\uFE0F</button>
</div>
</div>
<div style="padding: 15px; flex: 1; overflow-y: auto;" class="resize-content">
<div class="resize-preview-container" style="display: flex; align-items: center; justify-content: center; text-align: center; margin-bottom: 8px; height: 320px; overflow: hidden; padding: 8px; background: #111; border: 1px solid #333; border-radius: 6px;">
<img class="resize-preview" alt="Vista previa" draggable="false" style="image-rendering: pixelated; image-rendering: crisp-edges; display: block; margin: 0 auto; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none;">
</div>
<div class="resize-preview-info" style="font-size: 12px; color: #aaa; text-align: center; margin-bottom: 12px;"></div>
<div class="resize-controls" style="display: flex; flex-direction: column; gap: 15px;">
<div style="display: flex; align-items: center; gap: 10px;">
<label style="color: #ffffff; font-size: 14px; display: flex; align-items: center; gap: 8px; margin: 0;">
<input type="checkbox" class="toggle-original">
Original
</label>
<div style="display: flex; align-items: center; gap: 8px; margin-left: auto;">
<label style="color: #ffffff; font-size: 14px; white-space: nowrap;">Tolerancia LAB</label>
<input type="range" class="lab-tolerance" min="0" max="100" step="1" value="100">
<span class="lab-tolerance-value" style="color:#aaa; font-size:12px;">100</span>
</div>
</div>
<div style="display: flex; flex-direction: column; gap: 5px;">
<label style="color: #ffffff; font-size: 14px;">Ancho: <span class="width-value"></span>px</label>
<input type="range" class="resize-slider width-slider" min="50" max="2000" step="1" style="width: 100%;">
</div>
<div style="display: flex; flex-direction: column; gap: 5px;">
<label style="color: #ffffff; font-size: 14px;">Alto: <span class="height-value"></span>px</label>
<input type="range" class="resize-slider height-slider" min="50" max="2000" step="1" style="width: 100%;">
</div>
<label style="color: #ffffff; font-size: 14px; display: flex; align-items: center; gap: 8px;">
<input type="checkbox" class="maintain-aspect" checked>
Mantener proporci\xF3n
</label>
</div>
<!-- Aqu\xED se insertar\xE1 el selector de paleta de colores -->
<!-- Secci\xF3n Skip Color -->
<div class="skip-color-section" style="display: none; margin-top: 15px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 15px; border: 1px solid rgba(255,255,255,0.1);">
<div class="skip-color-title" style="font-size: 14px; font-weight: 600; color: #60a5fa; margin-bottom: 12px; display: flex; align-items: center;">
<span>\u{1F3AF} Skip Color</span>
</div>
<div class="skip-color-controls" style="display: flex; flex-direction: column; gap: 12px;">
<label style="color: #ffffff; font-size: 14px; display: flex; align-items: center; gap: 8px;">
<input type="checkbox" class="skip-color-enabled" style="cursor: pointer;">
<span>Skip colors that don't match exactly</span>
</label>
<div class="skip-threshold-container" style="display: none; flex-direction: column; gap: 8px;">
<div style="display: flex; align-items: center; gap: 8px;">
<label style="color: #ffffff; font-size: 14px; white-space: nowrap;">Similarity threshold:</label>
<input type="range" class="skip-threshold-slider" min="0" max="100" step="1" value="100" style="flex: 1;">
<span class="skip-threshold-value" style="color: #aaa; font-size: 12px; min-width: 35px;">100%</span>
</div>
<div class="skip-threshold-description" style="font-size: 12px; color: #aaa; padding: 8px; background: rgba(0,0,0,0.2); border-radius: 4px; border-left: 3px solid #60a5fa;">
<span class="skip-description-text">Only exact color matches will be painted (100% similarity).</span>
</div>
</div>
</div>
</div>
<div class="resize-buttons" style="display: flex; gap: 10px; margin-top: 20px;">
<button class="btn btn-primary confirm-resize" style="flex: 1; padding: 10px; background: #10b981; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;">\u2705 Aplicar</button>
<button class="btn btn-secondary cancel-resize" style="flex: 1; padding: 10px; background: #ef4444; color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer;">\u274C Cancelar</button>
</div>
</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: 8px;
"></div>
`,document.body.appendChild(s),t={overlay:s,container:s,preview:s.querySelector(".resize-preview"),previewContainer:s.querySelector(".resize-preview-container"),widthSlider:s.querySelector(".width-slider"),heightSlider:s.querySelector(".height-slider"),widthValue:s.querySelector(".width-value"),heightValue:s.querySelector(".height-value"),maintainAspect:s.querySelector(".maintain-aspect"),confirmBtn:s.querySelector(".confirm-resize"),cancelBtn:s.querySelector(".cancel-resize"),colorPaletteSelector:null,resizeWindow:s,resizeHeader:s.querySelector(".resize-header"),minimizeBtn:s.querySelector("#minimizeResizeBtn"),closeBtn:s.querySelector("#closeResizeBtn"),resizeContent:s.querySelector(".resize-content"),previewInfo:s.querySelector(".resize-preview-info"),toggleOriginal:s.querySelector(".toggle-original"),labTolerance:s.querySelector(".lab-tolerance"),labToleranceValue:s.querySelector(".lab-tolerance-value"),skipColorSection:s.querySelector(".skip-color-section"),skipColorEnabled:s.querySelector(".skip-color-enabled"),skipThresholdContainer:s.querySelector(".skip-threshold-container"),skipThresholdSlider:s.querySelector(".skip-threshold-slider"),skipThresholdValue:s.querySelector(".skip-threshold-value"),skipDescriptionText:s.querySelector(".skip-description-text")},s.addEventListener("dragstart",c=>c.preventDefault()),t.preview&&t.preview.addEventListener("dragstart",c=>c.preventDefault()),n(s,t.resizeHeader);let a=!1;t.minimizeBtn.addEventListener("click",()=>{a=!a,a?(t.resizeContent.style.display="none",s.style.height="auto",s.style.resize="none",t.minimizeBtn.textContent="\u2795"):(t.resizeContent.style.display="block",s.style.resize="both",t.minimizeBtn.textContent="\u2796")}),t.closeBtn.addEventListener("click",()=>{i()}),oe(s),u("\u2705 Elementos del di\xE1logo de redimensionamiento creados")}function o(r,s={}){var X,J,W,Y,v,q;if(!t){u("\u274C Error: Elementos de redimensionamiento no inicializados");return}let a=r.getDimensions(),c=a.width,g=a.height,p=c,m=g,x=c/g,y=(A=!1,$=null)=>{try{let N=p,F=m,O=null,k=null;if(t.toggleOriginal&&t.toggleOriginal.checked&&typeof r.generateOriginalPreview=="function")O=r.generateOriginalPreview(N,F);else if(A&&typeof r.generatePreviewWithPalette=="function"){Array.isArray($)&&r.setSelectedColors($);let D=r.generatePreviewWithPalette(N,F);O=(D==null?void 0:D.dataUrl)||null,k=(D==null?void 0:D.stats)||null}else O=r.generatePreview(N,F);if(O&&(t.preview.src=O),t.previewInfo){let D=N*F,z="";k&&(z=` | Exact: ${k.exact.toLocaleString()} | LAB: ${k.lab.toLocaleString()} | Removed: ${k.removed.toLocaleString()}`),t.previewInfo.textContent=`${N}\xD7${F} px | Total: ${D.toLocaleString()} p\xEDxeles${z}`}}catch(N){u("\u26A0\uFE0F Error generando vista previa:",N)}};if(t.widthSlider.value=c,t.heightSlider.value=g,t.widthValue.textContent=c,t.heightValue.textContent=g,!t.colorPaletteSelector){let A=t.container.querySelector(".resize-content")||t.container,$=Array.isArray((X=l)==null?void 0:X.availableColors)?l.availableColors:[];t.colorPaletteSelector=no(A,$)}function w(){var O,k,D;p=parseInt(t.widthSlider.value),t.widthValue.textContent=p,t.maintainAspect.checked&&(m=Math.round(p/x),t.heightSlider.value=m,t.heightValue.textContent=m);let A=((k=(O=t.colorPaletteSelector)==null?void 0:O.getSelectedColors)==null?void 0:k.call(O))||[],$=((D=l)==null?void 0:D.availableColors)||[],N=new Map($.map(z=>[z.id,z])),F=A.map(z=>N.get(z)).filter(Boolean);y(!0,F)}function f(){var O,k,D;m=parseInt(t.heightSlider.value),t.heightValue.textContent=m,t.maintainAspect.checked&&(p=Math.round(m*x),t.widthSlider.value=p,t.widthValue.textContent=p);let A=((k=(O=t.colorPaletteSelector)==null?void 0:O.getSelectedColors)==null?void 0:k.call(O))||[],$=((D=l)==null?void 0:D.availableColors)||[],N=new Map($.map(z=>[z.id,z])),F=A.map(z=>N.get(z)).filter(Boolean);y(!0,F)}function P(){var O,k,D;let A=((k=(O=t.colorPaletteSelector)==null?void 0:O.getSelectedColors)==null?void 0:k.call(O))||[],$=((D=l)==null?void 0:D.availableColors)||[],N=new Map($.map(z=>[z.id,z])),F=A.map(z=>N.get(z)).filter(Boolean);y(!0,F)}function b(){var k,D,z;let A=parseInt(t.labTolerance.value)||0;t.labToleranceValue.textContent=String(A);try{r.setLabTolerance(A)}catch{}let $=((D=(k=t.colorPaletteSelector)==null?void 0:k.getSelectedColors)==null?void 0:D.call(k))||[],N=((z=l)==null?void 0:z.availableColors)||[],F=new Map(N.map(H=>[H.id,H])),O=$.map(H=>F.get(H)).filter(Boolean);y(!0,O)}function h(){t.maintainAspect.checked&&(p=parseInt(t.widthSlider.value),m=Math.round(p/x),t.heightSlider.value=m,t.heightValue.textContent=m),y()}if(t.widthSlider.removeEventListener("input",w),t.heightSlider.removeEventListener("input",f),t.maintainAspect.removeEventListener("change",h),t.widthSlider.addEventListener("input",w),t.heightSlider.addEventListener("input",f),t.maintainAspect.addEventListener("change",h),t.toggleOriginal&&(t.toggleOriginal.removeEventListener("change",P),t.toggleOriginal.addEventListener("change",P)),t.labTolerance){t.labTolerance.removeEventListener("input",b),t.labTolerance.addEventListener("input",b);let A=Math.min(100,Math.max(0,Math.round((J=r.labTolerance)!=null?J:100)));t.labTolerance.value=String(A),t.labToleranceValue.textContent=String(A)}function E(){var $,N;if(t.colorPaletteSelector&&t.colorPaletteSelector.getSelectedColors)return t.colorPaletteSelector.getSelectedColors();let A=(N=($=t.colorPaletteSelector)==null?void 0:$.element)==null?void 0:N.querySelectorAll(".wplace-color-swatch.active");return A?Array.from(A).map(F=>parseInt(F.dataset.colorId)):[]}function C(A){!A||!t.colorPaletteSelector||t.colorPaletteSelector.updateAvailableColors&&t.colorPaletteSelector.updateAvailableColors(A)}function S(){let A=E(),$={enabled:t.skipColorEnabled?t.skipColorEnabled.checked:!1,threshold:t.skipThresholdSlider&&parseInt(t.skipThresholdSlider.value)||100};s.onConfirmResize&&s.onConfirmResize(r,p,m,A,$),i()}function T(){i()}if(t.confirmBtn.removeEventListener("click",S),t.cancelBtn.removeEventListener("click",T),t.confirmBtn.addEventListener("click",S),t.cancelBtn.addEventListener("click",T),s.getAvailableColors){let A=s.getAvailableColors();Array.isArray(A)&&A.length>0?C(A):Array.isArray((W=l)==null?void 0:W.availableColors)&&l.availableColors.length>0&&C(l.availableColors)}t.skipColorSection&&(t.skipColorSection.style.display="block");function L(A){t.skipDescriptionText&&(A===100?t.skipDescriptionText.textContent="Only exact color matches will be painted (100% similarity).":A>=90?t.skipDescriptionText.textContent=`Very strict matching: colors must be at least ${A}% similar to be painted.`:A>=70?t.skipDescriptionText.textContent=`Moderate matching: colors must be at least ${A}% similar to be painted.`:A>=50?t.skipDescriptionText.textContent=`Loose matching: colors must be at least ${A}% similar to be painted.`:t.skipDescriptionText.textContent=`Very loose matching: colors must be at least ${A}% similar to be painted.`)}function _(){var k,D,z;let A=t.skipColorEnabled.checked;if(t.skipThresholdContainer&&(t.skipThresholdContainer.style.display=A?"flex":"none"),r&&typeof r.setSkipColorMode=="function"){let H=parseInt(t.skipThresholdSlider.value)||100;r.setSkipColorMode(A,H)}let $=((D=(k=t.colorPaletteSelector)==null?void 0:k.getSelectedColors)==null?void 0:D.call(k))||[],N=((z=l)==null?void 0:z.availableColors)||[],F=new Map(N.map(H=>[H.id,H])),O=$.map(H=>F.get(H)).filter(Boolean);y(!0,O),u(`\u{1F3AF} Skip Color ${A?"enabled":"disabled"}`)}function B(){var k,D,z;let A=parseInt(t.skipThresholdSlider.value)||100;if(t.skipThresholdValue.textContent=`${A}%`,L(A),r&&typeof r.setSkipColorMode=="function"){let H=t.skipColorEnabled.checked;r.setSkipColorMode(H,A)}let $=((D=(k=t.colorPaletteSelector)==null?void 0:k.getSelectedColors)==null?void 0:D.call(k))||[],N=((z=l)==null?void 0:z.availableColors)||[],F=new Map(N.map(H=>[H.id,H])),O=$.map(H=>F.get(H)).filter(Boolean);y(!0,O)}if(t.skipColorEnabled&&(t.skipColorEnabled.removeEventListener("change",_),t.skipColorEnabled.addEventListener("change",_)),t.skipThresholdSlider&&(t.skipThresholdSlider.removeEventListener("input",B),t.skipThresholdSlider.addEventListener("input",B),t.skipThresholdSlider.value="100",t.skipThresholdValue.textContent="100%",L(100)),t.colorPaletteSelector&&t.colorPaletteSelector.onSelectionChange&&t.colorPaletteSelector.onSelectionChange(A=>{var F;let $=[],N=typeof s.getAvailableColors=="function"?s.getAvailableColors():Array.isArray((F=l)==null?void 0:F.availableColors)?l.availableColors:[];if(Array.isArray(N)&&N.length>0){let O=new Map(N.map(k=>[k.id,k]));$=A.map(k=>O.get(k)).filter(Boolean)}if(typeof s.onColorSelectionChange=="function"&&s.onColorSelectionChange(A),y(!0,$),!$||$.length===0)try{t.previewInfo.textContent+=" | Sin colores seleccionados: se ocultar\xE1n los p\xEDxeles sin opci\xF3n disponible"}catch{}}),t.resizeWindow.style.display="flex",pe(t.resizeWindow),t.previewResizeObserver)try{t.previewResizeObserver.disconnect()}catch{}window.ResizeObserver?(t.previewResizeObserver=new window.ResizeObserver(()=>y()),t.previewContainer&&t.previewResizeObserver.observe(t.previewContainer)):(t.onWindowResize=()=>y(),window.addEventListener("resize",t.onWindowResize,{passive:!0}));let M=((v=(Y=t.colorPaletteSelector)==null?void 0:Y.getSelectedColors)==null?void 0:v.call(Y))||[],G=((q=l)==null?void 0:q.availableColors)||[],U=new Map(G.map(A=>[A.id,A])),Z=M.map(A=>U.get(A)).filter(Boolean);y(!0,Z),u("\u{1F4CF} Di\xE1logo de redimensionamiento mostrado")}function n(r,s){let a=!1,c,g,p,m,x=0,y=0,w=h=>!!h.closest("button, input, select, textarea, a, label, .btn");s.addEventListener("mousedown",f),document.addEventListener("mousemove",P,{passive:!1}),document.addEventListener("mouseup",b);function f(h){!s.contains(h.target)||w(h.target)||(h.preventDefault(),p=h.clientX-x,m=h.clientY-y,a=!0,r.style.userSelect="none",document.body.style.userSelect="none")}function P(h){a&&(h.preventDefault(),c=h.clientX-p,g=h.clientY-m,x=c,y=g,r.style.left=c+"px",r.style.top=g+"px")}function b(){a=!1,r.style.userSelect="",document.body.style.userSelect=""}}function i(){if(!t||!t.resizeWindow){u("\u274C Error: Elementos de redimensionamiento no encontrados");return}if(t.resizeWindow.style.display="none",ie(t.resizeWindow),t.previewResizeObserver){try{t.previewResizeObserver.disconnect()}catch{}t.previewResizeObserver=null}t.onWindowResize&&(window.removeEventListener("resize",t.onWindowResize),t.onWindowResize=null),u("\u{1F4CF} Di\xE1logo de redimensionamiento cerrado")}function d(r){e(r),u("\u2705 Ventana de redimensionamiento inicializada")}return{initialize:d,showResizeDialog:o,closeResizeDialog:i}}V();function ut(){function t(i,d,r={}){return new Promise(s=>{let a=document.createElement("div");a.className="modal-overlay",a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.background="rgba(0,0,0,0.7)",a.style.zIndex="10001",a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center";let c=document.createElement("div");c.style.background="#1a1a1a",c.style.border="2px solid #333",c.style.borderRadius="15px",c.style.padding="25px",c.style.color="#eee",c.style.minWidth="350px",c.style.maxWidth="400px",c.style.boxShadow="0 10px 30px rgba(0,0,0,0.5)",c.style.fontFamily="'Segoe UI', Roboto, sans-serif",c.innerHTML=`
<h3 style="margin: 0 0 15px 0; text-align: center; font-size: 18px;">${d}</h3>
<p style="margin: 0 0 20px 0; text-align: center; line-height: 1.4; white-space: pre-line;">${i}</p>
<div style="display: flex; gap: 10px; justify-content: center;">
${r.confirm?`<button class="confirm-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;">${r.confirm}</button>`:""}
${r.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;">${r.save}</button>`:""}
${r.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;">${r.discard}</button>`:""}
${r.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;">${r.cancel}</button>`:""}
</div>
`,a.appendChild(c),document.body.appendChild(a),oe(a);let g=c.querySelector(".confirm-btn"),p=c.querySelector(".save-btn"),m=c.querySelector(".discard-btn"),x=c.querySelector(".cancel-btn"),y=()=>{ie(a),document.body.removeChild(a)};g&&g.addEventListener("click",()=>{y(),s("confirm")}),p&&p.addEventListener("click",()=>{y(),s("save")}),m&&m.addEventListener("click",()=>{y(),s("discard")}),x&&x.addEventListener("click",()=>{y(),s("cancel")}),a.addEventListener("click",f=>{f.target===a&&(y(),s("cancel"))});let w=f=>{f.key==="Escape"&&(y(),document.removeEventListener("keydown",w),s("cancel"))};document.addEventListener("keydown",w)})}function e(i){return new Promise(d=>{let r=i.remainingPixels?i.remainingPixels.length:0,s=i.imageData&&i.imageData.processor?i.imageData.processor:null,a=r;try{if((!a||a===0)&&s&&typeof s.generatePixelQueue=="function"){let y=s.generatePixelQueue();Array.isArray(y)&&(a=y.length)}}catch{}let c=i.imageData?i.imageData.width:0,g=i.imageData?i.imageData.height:0;if((!c||!g)&&s&&typeof s.getDimensions=="function")try{let y=s.getDimensions();y&&y.width&&y.height&&(c=y.width,g=y.height)}catch{}let p=typeof i.tileX=="number"?i.tileX:0,m=typeof i.tileY=="number"?i.tileY:0,x=`\xBFDeseas generar un archivo JSON compatible con Auto-Guard.js?
Este archivo contendr\xE1:
\u2022 \xC1rea de protecci\xF3n: ${c}x${g} p\xEDxeles
\u2022 Posici\xF3n: Tile (${p}, ${m})
\u2022 ${a||0} p\xEDxeles para proteger
El archivo se guardar\xE1 autom\xE1ticamente y podr\xE1s importarlo en Auto-Guard.js.`;t(x,"\u{1F6E1}\uFE0F Generar JSON para Auto-Guard",{confirm:"S\xED, generar JSON",cancel:"No, continuar sin generar"}).then(y=>{d(y==="confirm")}).catch(()=>{d(!1)})})}function o(i){return new Promise(d=>{try{let r=i&&i.protectionData&&i.protectionData.area,s=r?i.protectionData.area:null,a=s&&["x1","y1","x2","y2"].every(P=>Number.isFinite(s[P])),c=Array.isArray(i==null?void 0:i.originalPixels),g=Array.isArray(i==null?void 0:i.colors);if(!r||!a||!c||!g){u("\u274C Estructura inv\xE1lida para JSON del Guard. Abortando guardado.");try{n("Estructura inv\xE1lida del JSON del Guard. Vuelve a intentarlo tras seleccionar la posici\xF3n.","error")}catch{}return d({success:!1,error:"Invalid Guard JSON structure"})}let m=`wplace_GUARD_from_Image_${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.json`,x=JSON.stringify(i,null,2),y=new window.Blob([x],{type:"application/json"}),w=window.URL.createObjectURL(y),f=document.createElement("a");f.href=w,f.download=m,document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(w),u(`\u2705 JSON del Guard guardado: ${m}`),d({success:!0,filename:m})}catch(r){u(`\u274C Error guardando JSON del Guard: ${r.message}`),d({success:!1,error:r.message})}})}function n(i,d="info"){let r=document.createElement("div");switch(r.style.position="fixed",r.style.top="20px",r.style.right="20px",r.style.padding="15px 20px",r.style.borderRadius="8px",r.style.color="white",r.style.fontWeight="bold",r.style.zIndex="10002",r.style.maxWidth="300px",r.style.boxShadow="0 4px 12px rgba(0,0,0,0.3)",r.style.fontFamily="'Segoe UI', Roboto, sans-serif",r.style.fontSize="14px",d){case"success":r.style.background="#10b981";break;case"error":r.style.background="#ef4444";break;case"warning":r.style.background="#f59e0b";break;default:r.style.background="#3b82f6"}r.textContent=i,document.body.appendChild(r),oe(r),setTimeout(()=>{document.body.contains(r)&&(ie(r),document.body.removeChild(r))},3e3)}return{showConfirmDialog:t,showGuardDialog:e,saveGuardJSON:o,showNotification:n}}function ro(t,e,o={}){return ut().showConfirmDialog(t,e,o)}function so(t){return ut().showGuardDialog(t)}function qe(t){return ut().saveGuardJSON(t)}async function lo({texts:t,...e}){if(u("\u{1F3A8} Creando interfaz de Auto-Image"),!document.querySelector('link[href*="font-awesome"]')){let v=document.createElement("link");v.rel="stylesheet",v.href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css",document.head.appendChild(v),u("\u{1F4E6} FontAwesome a\xF1adido al document.head")}let{host:o,root:n}=oo(),i=document.createElement("style");i.textContent=`
@keyframes slideIn {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); }
100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}
.container {
position: fixed;
top: 20px;
right: 70px;
width: 300px;
min-width: 250px;
background: #1a1a1a;
border: 1px solid #333;
border-radius: 8px;
padding: 0;
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
font-family: 'Segoe UI', Roboto, sans-serif;
color: #eee;
animation: slideIn 0.4s ease-out;
resize: both;
overflow: auto;
display: flex;
flex-direction: column;
min-height: 200px;
max-height: 80vh;
}
/* Estado minimizado: el contenedor no fuerza altura m\xEDnima */
.container.minimized {
min-height: 0 !important;
height: auto !important;
}
.header {
padding: 12px 15px;
background: #2d3748;
color: #60a5fa;
font-size: 16px;
font-weight: 600;
display: flex;
justify-content: space-between;
align-items: center;
cursor: move;
user-select: none;
flex-shrink: 0;
}
.header-title {
display: flex;
align-items: center;
gap: 8px;
}
.header-controls {
display: flex;
gap: 10px;
}
.header-btn {
background: none;
border: none;
color: #eee;
cursor: pointer;
opacity: 0.7;
transition: opacity 0.2s;
padding: 5px;
}
.header-btn:hover {
opacity: 1;
}
.content {
padding: 15px;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
display: block;
position: relative;
}
/* Elementos que se ocultan cuando est\xE1 minimizado */
.collapsible-content {
max-height: 1000px;
transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.25s ease;
}
.content.collapsed .collapsible-content {
max-height: 0;
opacity: 0;
overflow: hidden;
padding: 0;
}
/* El content deja de expandir al estar colapsado */
.content.collapsed {
flex: 0;
}
/* Status siempre visible */
.content.collapsed .status {
display: block !important;
margin-top: 8px;
animation: slideIn 0.3s ease-out;
}
.controls {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 15px;
}
.config-panel {
display: none;
background: #2d3748;
padding: 10px;
border-radius: 6px;
margin-bottom: 10px;
}
.config-panel.visible {
display: block;
}
.config-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 6px;
font-size: 14px;
}
.toggle-switch {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ef4444;
transition: .3s;
border-radius: 24px;
}
.toggle-slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
transition: .3s;
border-radius: 50%;
}
input:checked + .toggle-slider {
background-color: #10b981;
}
input:checked + .toggle-slider:before {
transform: translateX(20px);
background-color: white;
}
.config-input {
width: 60px;
padding: 4px;
border: 1px solid #333;
border-radius: 4px;
background: #1a1a1a;
color: #eee;
text-align: center;
font-size: 14px;
}
.config-input.paint-pattern {
width: 140px;
font-size: 15px;
padding: 6px;
}
.config-input[type="text"],
.config-input select {
width: 120px;
text-align: left;
}
.config-checkbox {
margin-right: 8px;
}
.main-config {
background: #2d3748;
padding: 10px;
border-radius: 6px;
margin-bottom: 10px;
border: 1px solid #3a4553;
}
.config-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}
.config-label {
font-size: 13px;
color: #cbd5e0;
display: flex;
align-items: center;
gap: 4px;
}
.batch-value, .cooldown-value {
font-weight: bold;
color: #60a5fa;
}
.btn {
padding: 10px;
border: none;
border-radius: 6px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
transition: all 0.2s;
font-size: 14px;
}
.btn-half {
width: calc(50% - 3px);
}
.btn-full {
width: 100%;
}
.button-row {
display: flex;
gap: 6px;
margin: 3px 0;
}
.btn:hover:not(:disabled) {
transform: translateY(-2px);
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none !important;
}
.btn-primary {
background: #60a5fa;
color: white;
}
.btn-upload {
background: #2d3748;
color: white;
border: 1px dashed #eee;
}
.btn-load {
background: #2196F3;
color: white;
}
.btn-start {
background: #10b981;
color: white;
}
.btn-stop {
background: #ef4444;
color: white;
}
/* Estilo reforzado cuando la pintura est\xE1 activa */
.btn-stop-running {
background: #ef4444 !important;
color: #fff !important;
box-shadow: 0 0 0 2px rgba(239,68,68,0.35);
}
.btn-select {
background: #f59e0b;
color: black;
}
.btn-secondary {
background: #6b7280;
color: white;
}
.progress {
width: 100%;
background: #2d3748;
border-radius: 4px;
margin: 10px 0;
overflow: hidden;
height: 10px;
}
.progress-bar {
height: 100%;
background: #60a5fa;
transition: width 0.3s;
width: 0%;
}
.stats {
background: #2d3748;
padding: 12px;
border-radius: 6px;
margin-bottom: 15px;
}
.stat-item {
display: flex;
justify-content: space-between;
padding: 6px 0;
font-size: 14px;
}
.stat-label {
display: flex;
align-items: center;
gap: 6px;
opacity: 0.8;
}
.status {
padding: 8px;
border-radius: 4px;
text-align: center;
font-size: 13px;
}
.status-default {
background: rgba(255,255,255,0.1);
}
.status-success {
background: rgba(0, 255, 0, 0.1);
color: #10b981;
}
.status-error {
background: rgba(255, 0, 0, 0.1);
color: #ef4444;
}
.status-warning {
background: rgba(255, 165, 0, 0.1);
color: orange;
}
.status-info {
background: rgba(0, 150, 255, 0.1);
color: #60a5fa;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.7);
z-index: 10001;
display: flex;
align-items: center;
justify-content: center;
}
.modal {
background: #1a1a1a;
border: 2px solid #333;
border-radius: 15px;
padding: 25px;
color: #eee;
min-width: 350px;
max-width: 400px;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal h3 {
margin: 0 0 15px 0;
text-align: center;
font-size: 18px;
}
.modal p {
margin: 0 0 20px 0;
text-align: center;
line-height: 1.4;
}
.modal-buttons {
display: flex;
gap: 10px;
justify-content: center;
}
.modal-btn {
padding: 10px 20px;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
transition: all 0.3s;
min-width: 100px;
}
.modal-btn-save {
background: #10b981;
color: white;
}
.modal-btn-discard {
background: #ef4444;
color: white;
}
.modal-btn-cancel {
background: #2d3748;
color: white;
}
.modal-btn:hover {
transform: translateY(-2px);
}
/* Media queries para responsividad */
@media (max-width: 768px) {
.container {
width: calc(100vw - 20px);
max-width: 350px;
left: 10px !important;
right: 10px;
top: 10px !important;
font-size: 14px;
}
.header {
padding: 10px 12px;
font-size: 14px;
}
.content {
padding: 12px;
}
.btn {
padding: 8px;
font-size: 13px;
}
.config-item {
font-size: 13px;
}
.stat-item {
font-size: 13px;
}
}
@media (max-width: 480px) {
.container {
width: calc(100vw - 10px);
left: 5px !important;
right: 5px;
top: 5px !important;
font-size: 13px;
}
.header {
padding: 8px 10px;
font-size: 13px;
}
.content {
padding: 10px;
}
.btn {
padding: 6px;
font-size: 12px;
gap: 4px;
}
.config-item {
font-size: 12px;
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.stat-item {
font-size: 12px;
flex-direction: column;
align-items: flex-start;
}
.config-input {
width: 100%;
max-width: 120px;
}
}
@media (max-height: 600px) {
.container {
max-height: calc(100vh - 20px);
overflow-y: auto;
}
.stats {
margin-bottom: 10px;
}
}
`,n.appendChild(i);let d=document.createElement("div");d.className="container",d.innerHTML=`
<div class="header">
<div class="header-title">
\u{1F5BC}\uFE0F
<span>${t.title}</span>
</div>
<div class="header-controls">
<button class="header-btn config-btn" title="Configuraci\xF3n">
\u2699\uFE0F
</button>
<button class="header-btn minimize-btn" title="${t.minimize}">
\u2796
</button>
</div>
</div>
<div class="content">
<div class="collapsible-content">
<div class="config-panel">
<div class="config-item">
<label>${t.batchSize}:</label>
<input class="config-input pixels-per-batch" type="number" min="1" max="9999" value="20">
</div>
<div class="config-item">
<label>${t.useAllCharges}</label>
<label class="toggle-switch">
<input class="config-checkbox use-all-charges" type="checkbox" checked>
<span class="toggle-slider"></span>