-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
tuesday_visual.html
executable file
·5947 lines (5944 loc) · 820 KB
/
tuesday_visual.html
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
<!doctype html>
<html>
<head>
<title>Tuesday JS web visual editor</title>
<link rel="shortcut icon" href="icon.jpg" type="image/x-icon">
<meta charset="UTF-8">
<meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>
<style>
*{
font-family:Arial;
border-collapse:collapse;
border:none;
margin:0;
padding:0;
border-spacing:0px;
user-select:none;
outline:none;
color:var(--tx);
overscroll-behavior: none;
}
:root {
--cw:#efefff;
--cb:#cec8e3;
--cl:#6e5fa5;
--cs:rgba(110,95,165,0.25);
--cm:rgba(110,95,165,0.5);
--cf:rgba(90,75,145,1);
--wn:#fff;
--ft:none;
--tx:#000;
--ls:20;
}
#ho_preview::-webkit-scrollbar,#scene_view::-webkit-scrollbar,body::-webkit-scrollbar{display:none;}
#ho_preview::-webkit-scrollbar-thumb,#scene_view::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb{display:none;}
*::-webkit-scrollbar {
width: 6px;
height: 6px;
background-color:var(--cw);
}
*::-webkit-scrollbar-thumb {
background: var(--cb);
border-radius:3px;
}
#boosty{fill:var(--tx);}
.panel{box-shadow:0px 2px 24px var(--cs);border-radius:16px;padding:4px;}
@keyframes flash{0%{box-shadow:0px 2px 32px var(--cf);background-color:var(--cb);}25%{box-shadow:0px 2px 32px var(--cf);background-color:var(--cb);}100%{box-shadow:0px 2px 24px var(--cs);background-color:var(--wn);}}
@keyframes flash2{0%{box-shadow:0px 0px 16px var(--cb);background-color:var(--cw);}50%{box-shadow:0px 0px 12px var(--cb);background-color:var(--cb);}}
.story_block{min-height:28px;width:256px;position:absolute;cursor:all-scroll; background-color:var(--wn);}
#world{position:absolute;-ms-transform:scale(1);transform:scale(1);-webkit-transform-origin: 0 0;-moz-transform-origin: 0 0;background-color:var(--cw);background-blend-mode:overlay;}
#search_block::placeholder{color: var(--cb);}
line{stroke:var(--cl);stroke-dasharray:var(--ls);stroke-width:2;animation:dash 4s linear infinite;}
@keyframes dash{from{stroke-dashoffset:0} to{stroke-dashoffset:200;}}
#toast{
position:fixed;
opacity:0;
bottom:-10%;
transform:translateX(-50%);
padding:4px 32px;
height:40px;
min-width:128px;
box-shadow:0px 2px 24px var(--cs);
z-index:20000;
display:grid;justify-content:center;align-items:center;
}
.toast_anim{left:50%;border-radius:32px;animation:viwe 0.25s,stop 2s 0.25s,close 0.5s 2s linear;}
@keyframes viwe{from{opacity:0;bottom:64px}to{opacity:1;bottom:64px}}
@keyframes stop{from{opacity:1;bottom:64px}to{opacity:1;bottom:64px}}
@keyframes close{from{opacity:1;bottom:64px}to{opacity:0;bottom:-32px}}
#new_story_block,#scene_controll,#ho_controll,.scene_close{
position:fixed;
height:40px;
z-index:10000;
bottom:32px;
right:32px;
border-radius:20px;
background-color:var(--wn);
box-shadow:0px 2px 24px var(--cs);
cursor:pointer;
overflow:hidden;
}
#menu_panel{
z-index:1000;
top:0;
left:0;
background-color:var(--wn);
box-shadow:0px 2px 24px var(--cs);
border-radius:0 0 16px 0;
position:fixed;
height:40px;
max-width:620px;
width:100%;
}
.button_block{height:26px;width:26px;background-size:70% 70%;background-repeat:no-repeat;background-position:center;}
.icon{background-size:22px 22px;background-repeat:no-repeat;background-position:center;filter:var(--ft);}
.icon_m{background-size:18px 18px;background-repeat:no-repeat;background-position:center;cursor:pointer;filter:var(--ft);}
.button_menu{background-position:center;cursor:pointer;}
.button_menu:hover{background-color:var(--cb);}
.icon_new{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M223,52V249H35V6H176ZM223,53H176V6'/%3e%3c/svg%3e")}
.icon_load{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M48,85H252L208,226H5ZM48,85L5,226V51L18,34H65l13,17H208V85H48Z'/%3e%3c/svg%3e")}
.icon_save{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M238,51V228a10,10,0,0,1-10,10H27a10,10,0,0,1-10-10V27A10,10,0,0,1,27,17H203ZM39,238V127a10,10,0,0,1,10-10H205a10,10,0,0,1,10,10V238H39ZM174,95H79a10,10,0,0,1-10-10V17H184V85A10,10,0,0,1,174,95ZM168,42a10,10,0,0,0-10-10H144a10,10,0,0,0-10,10V71a10,10,0,0,0,10,10h14a10,10,0,0,0,10-10V42ZM63,162H192m0,49H63'/%3e%3c/svg%3e")}
.icon_play{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M7,24L248,126V128L7,230V24Z'/%3e%3c/svg%3e")}
.icon_edit{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M164,37l53,53-131,131L33,169ZM225,16L238,29a28,28,0,0,1,0,40l-20,20L164,37,185,16A28,28,0,0,1,225,16ZM59,195L190,64M9,245h0l73-22L32,173Z'/%3e%3c/svg%3e")}
.icon_show{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M246,40H10M246,130H10M246,220H10'/%3e%3c/svg%3e")}
.icon_setup{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' stroke-linecap='round' d='M28,6a14,14,0,1,1-14,14A14,14,0,0,1,28,6Zm74,44A14,14,0,1,1,88,64,14,14,0,0,1,102,50ZM63,93a14,14,0,1,1-14,14A14,14,0,0,1,64,93ZM49,107H2m0-86h11m-11,43H87m37,43H77M42,20h82m-8,44h8'/%3e%3c/svg%3e")}
.icon_about{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' %3e%3cpath d='M106,104h22v86M106,192h42'/%3e%3ccircle fill='none' cx='128' cy='64' r='6'/%3e%3ccircle cx='128' cy='128' r='120'/%3e%3c/g%3e%3c/svg%3e")}
.icon_close{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' cx='128' cy='128' r='120'/%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M71,184L184,70M184,184L71,70'/%3e%3c/svg%3e")}
.icon_ok{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' %3e%3ccircle cx='128' cy='128' r='120'/%3e%3cpath d='M194,82l-86,86L61,124'/%3e%3c/g%3e%3c/svg%3e")}
.icon_build{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M47,17H209a30,30,0,0,1,30,30V209a30,30,0,0,1-30,30H47a30,30,0,0,1-30-30V47A30,30,0,0,1,47,17ZM148,162H38m180,0H176m-107,19-14,24m92-155-67,112m59-62,63,105m-93-155,19,31'/%3e%3c/svg%3e")}
.icon_go{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M82,36l91,91L82,219'/%3e%3c/svg%3e")}
.icon_add{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' cx='128' cy='128' r='120'/%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M47,128h161M128,208V47'/%3e%3c/svg%3e")}
.icon_del{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M194,62V230H63V62M47,45H210M108,23h39V45H108V23ZM128,62V213M92,62V213M164,62V213'/%3e%3c/svg%3e")}
.icon_json{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M177,4h24c7,0,13,1,18,6s6,10,6,18v82l27,17L225,146v82c0,7-1,12-6,17s-10,7-18,7H177M84,7H60c-7,0-13,1-18,6s-6,10-6,18v79L8,128,36,146v79c0,7,1,12,6,17s10,7,18,7H84M113,212c9,0,18-4,22-10,3-4,4-12,4-25V72'/%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' cx='139.375' cy='43.594' r='2.5'/%3e%3c/svg%3e")}
.icon_css{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 65 65'%3e%3cpath fill='none' fill-opacity='0' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round' d='M3,1H61L55,55,33,63,9,55Z M15,13H50L45,46,33.167,51,19,46l-1-6.734M17,28H47'/%3e%3c/svg%3e")}
.icon_text{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M217,196H109L43,249V196H38c-16,0-29-13-29-30V38C9,21,22,9,39,9H218c16,0,29,12,29,29V166A30,30,0,0,1,217,196Z'/%3e%3c/svg%3e")}
.icon_up{background-image:url("data:image/svg+xml,%3csvg width='15' height='15' viewBox='0 0 15 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2.14661 10.5L7.5 4.73481L12.8534 10.5H2.14661Z' stroke-width='0.8' fill='none' stroke='%23000'/%3e%3c/svg%3e")}
.icon_down{background-image:url("data:image/svg+xml,%3csvg width='15' height='15' viewBox='0 0 15 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2.14661 4.5L7.5 10.2652L12.8534 4.5H2.14661Z' stroke-width='0.8' fill='none' stroke='%23000'/%3e%3c/svg%3e")}
.icon_goto{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M118,88l42,40-42,46M70,128h84M34,220V36M248,220H192V36h56'/%3e%3c/svg%3e")}
.icon_back{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M138,88L96,128l42,46M186,128H102M222,220V36M8,220H64V36H8'/%3e%3c/svg%3e")}
.icon_edit2{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' %3e%3cpath d='M152,114h74a20,20,0,0,1,20,20v93a20,20,0,0,1-20,20H30a20,20,0,0,1-20-20V134a20,20,0,0,1,20-20h75M129,161V9M127,204h3l22-44H105Z'/%3e%3crect x='105' y='9' width='47' height='152'/%3e%3c/g%3e%3c/svg%3e")}
.icon_art{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' stroke-linecap='round' cx='60' cy='96' r='19'/%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' stroke-linecap='round' d='M19.563,24.375h217.23a10,10,0,0,1,10,10V228.91a10,10,0,0,1-10,10H19.563a10,10,0,0,1-10-10V34.375A10,10,0,0,1,19.563,24.375ZM71,201H242M28,201H53M91,198l42-43,42,43M157,176l42-42,43,42'/%3e%3c/svg%3e")}
.icon_textadd{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M217,196H109L43,249V196H38c-16,0-29-13-29-30V38C9,21,22,9,39,9H218c16,0,29,12,29,29V166A30,30,0,0,1,217,196ZM86,103h84M128,61v84'/%3e%3c/svg%3e")}
.icon_audio_off{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M52,90L133,30V225L52,164V90ZM10,91H52v73H10V91ZM173,98l59,59m0-59-59,59'/%3e%3c/svg%3e")}
.icon_audio_play{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M52,90L133,30V225L52,164V90ZM10,91H52v73H10V91ZM188,60c25,37,25,97,0,134m-27-94c10,14,10,39,0,53M216,18c40,59,40,156,0,215'/%3e%3c/svg%3e")}
.icon_event{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M128,17A111,111,0,0,0,240,128c0,0,0,0,0-0v1A111,111,0,0,0,129,240h-1A111,111,0,0,0,16,129c-0,0-.88.012-1,0v-1c0,0,.293.006,0,0A111,111,0,0,0,127,16'/%3e%3c/svg%3e")}
.icon_var{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M42,216C25,216,12,176,12,128S25,40,42,40m171,176c16,0,30-39,30-88s-13-88-30-88M80,55l97,145m0-145L80,200'/%3e%3c/svg%3e")}
.icon_controll{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' cx='128' cy='128' r='120'/%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' cx='128' cy='128' r='60'/%3e%3c/svg%3e")}
.icon_choice{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e %3cpath fill='none' fill-opacity='0' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round' d='M2,32L15,19,28,32,15,45ZM42,3H60V21H42V3Zm0,40H60V61H42V43Z M15,20V12H42m0,40H15V44'/%3e%3c/svg%3e")}
.icon_html{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M78,205L1,128,78,52M174,205L250,128,174,52M94,211L159,43'/%3e%3c/svg%3e")}
.icon_equal{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M47,127h161M128,208V47'/%3e%3c/svg%3e")}
.icon_minus{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='M47,127h161'/%3e%3c/svg%3e")}
.icon_scale{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3ccircle fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' cx='128' cy='128' r='92'/%3e%3c/svg%3e")}
.icon_color{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' d='M6,7H41V123H6V7ZM52,51L80,23l25,25L52,100M78,87h44v35H55M41,84H6M6,46H41m11,5L76,75m7,12v35'/%3e%3ccircle ifill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' cx='23.5' cy='104.5' r='6.5'/%3e%3c/svg%3e")}
.icon_right{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' d='m 175,36 -91,91 91,91'/%3e%3c/svg%3e")}
.icon_layout{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' %3e%3cpath d='M77,186c0-21,22-39,50-39S178,164,178,186M3,40H252M216,4V253M252,216H3M40,253V4'/%3e%3ccircle cx='127.5' cy='106.5' r='25.5'/%3e%3c/g%3e%3c/svg%3e")}
.icon_copu{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' %3e%3cpath d='M174,206v26a20,20,0,0,1-20,20H37a20,20,0,0,1-20-20V69A20,20,0,0,1,37,49H82'/%3e%3crect x='82' y='4' width='157' height='203' rx='20' ry='20'/%3e%3c/g%3e%3c/svg%3e")}
.icon_more{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' %3e%3ccircle cx='213' cy='128' r='12'/%3e%3ccircle cx='128' cy='128' r='12'/%3e%3ccircle cx='42' cy='128' r='12'/%3e%3c/g%3e%3c/svg%3e")}
.icon_toast{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' stroke-linejoin='round' %3e%3crect x='28' y='68' width='199' height='100' rx='30' ry='30'/%3e%3cpath d='M251,215H5'/%3e%3c/g%3e%3c/svg%3e")}
.icon_timer{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cg fill='none' stroke='%23000' stroke-width='12' %3e%3cpath d='M128,64V13A115,115,0,1,1,13,128,112,112.384,0,0,1,25,77' /%3e%3cpath d='m 139,134 c -3,5 -12,6 -18,3 l -67,-45 78,26 c 6,2 10,10 7,16 z' /%3e%3c/g%3e%3c/svg%3e")}
.icon_random{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e %3cpath fill='none' fill-opacity='0' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round' d='M5.5,27.9l23.0-6.5A6,6,0,0,1,36.0,25.5l6.5,23.0A6,6,0,0,1,38.4,56.0L15.3,62.5A6,6,0,0,1,7.9,58.4L1.4,35.3A6,6,0,0,1,5.5,27.9ZM11,34a2,2,0,1,1-2,2A2,2,0,0,1,11,34Zm11,6a2,2,0,1,1-2,2A2,2,0,0,1,22,40ZM16,51a2,2,0,1,1-2,2A2,2,0,0,1,16,51Zm17-5a2,2,0,1,1-2,2A2,2,0,0,1,33,46ZM28,29a2,2,0,1,1-2,2A2,2,0,0,1,28,29ZM23.8,17.6l3.6-11.5a6,6,0,0,1,7.5-3.8L57.9,9.5a6,6,0,0,1,3.8,7.5L54.4,39.9a6,6,0,0,1-7.5,3.8M35,9a2,2,0,1,0,2,2A2,2,0,0,0,35,9Zm9,26a2,2,0,1,0,2-2A2,2,0,0,0,44,35Zm3-9a2,2,0,1,0,2-2A2,2,0,0,0,47,26Zm5-11a2,2,0,1,0,2,2A2,2,0,0,0,52,15Z'/%3e%3c/svg%3e")}
.icon_refrash{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='12' d='M251,94l-23,34-34-23M6,161l24-33,35,25M228,128m-15,52c-17.112,28.088-47.628,47-83,47-54.186,0-99.434-43.948-100-98M46,76c17.3-28.1,47.608-47,83-47a99.178,99.178,0,0,1,99,99'/%3e%3c/svg%3e")}
.icon_search{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' d='M46,11c20,0,37,16,37,36A37,37,0,0,1,46,84C25,84,10,67,10,47A35,35,0,0,1,46,11ZM79,77l42,42M47,24A23,23,0,0,1,70,47'/%3e%3c/svg%3e")}
.icon_clear{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' d='M53,113H24L3,92V73L73,3l45,45ZM20,56l45,45M74,28L45,58M9,123H64M120,112h6M105,112h6M70,112H96'/%3e%3c/svg%3e")}
.icon_side{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' d='M32,61V18M43,28L32,17,21,28M62,2H2'/%3e%3c/svg%3e")}
.icon_cent{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' d='M56,41V56H41M8,41V56H23M56,23V8H41M8,23V8H23M21,21H43V43H21V21Z'/%3e%3c/svg%3e")}
.icon_diag{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' d='M47,47L4,4M47,32V47H32M62,32V62H32'/%3e%3c/svg%3e")}
.icon_char{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' d='M5,126c0-25,27-46,60-46s59,20.584,59,46M65,63A30,30,0,1,1,95,33,30,30,0,0,1,65,63Z'/%3e%3c/svg%3e")}
.icon_js{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' stroke-linecap='round' d='M26,69s-5,38,36,38c39,0,36-39,36-39M106,72s12-5,12,5-18,17-18,17M28,107s-17,3-17,6c0,3,29,8,53,8,24,0,50-5,50-8,0-3-19-6-19-6M38,53s-14,2-14,6c0,3,28,5,38,5,9,0,36-3,36-8,0-3-11-5-11-5M47,18C32,30,60,35,53,54M75,4s-8,3-8,14c-0,9,9,18,9,23,0,12-6,13-6,13'/%3e%3c/svg%3e")}
.icon_video{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='6' d='M8,54H120v70H8V54ZM60,54L50,73M21,73L31,54M119,54L109,73M80,73L90,54M120,73H8M58,39L43,23M15,31L30,47M116,23L100,7M72,15L87,31M3,34L110,4l6,19L8,53Z'/%3e%3c/svg%3e")}
.icon_copy{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' d='M8,61L29,40M30,53V39H16M17,31V14a4,4,0,0,1,4-4h6v4H45V10h6a4,4,0,0,1,4,4V48a4,4,0,0,1-4,4H37M27,18V7h5a4,4,0,0,1,8,0h5V18H27Z'/%3e%3c/svg%3e")}
.icon_paste{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' d='M33,39L54,60M55,47V61H41M46,38V14a4,4,0,0,0-4-4H36v4H18V10H12a4,4,0,0,0-4,4V48a4,4,0,0,0,4,4H31M36,18V7H31a4,4,0,0,0-8,0H18V18H36Z'/%3e%3c/svg%3e")}
.icon_undo{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round' d='M17,29L5,17,17,5M6,17H37c11.322,0,20,6.678,20,18S48.322,53,37,53H17'/%3e%3c/svg%3e")}
.icon_cut{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cg fill='none' stroke='%23000' stroke-width='3' stroke-linejoin='round'%3e%3cpath d='M34,34V2l6,12V34m0,6V54m-6-8V40M53.984,40.016h-40l-12-6h44'/%3e%3ccircle cx='32' cy='54' r='8'/%3e%3ccircle cx='54' cy='32' r='8'/%3e%3c/g%3e%3c/svg%3e")}
.icon_map{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='-1 -1 66 66'%3e%3cpath fill='none' fill-opacity='0' stroke='%23000' stroke-width='3' stroke-linejoin='round' stroke-linecap='round' d='M43,62L22,52,2,62V13L22,3,43,13,63,3V52Z M43,19v8M22,17V9 M43,34v8M22,32V24 M43,49v8M22,47V39'/%3e%3c/svg%3e")}
.icon_replace{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3cpath fill='none' fill-opacity='0' stroke='%23000' stroke-width='3' stroke-linejoin='round' d='M4,42l7-7,7,7M60,22l-7,7-7-7M30,56C20,56,11,46,11,36M33,8C44,8,53,17,53,28M38,58L47,38,56,58M9,27L26,6M27,27L10,6M41,51H53'/%3e%3c/svg%3e")}
.icon-telegram{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 512 512'%3e %3cpath fill='none' fill-opacity='0' stroke='%23000' stroke-width='14' stroke-linejoin='round' stroke-linecap='round' d='M8,244L496,51,415,455,194,312,386,144,126.294,287.247ZM126,287l68,149,1-124M193,436l84-70'/%3e%3c/svg%3e")}
.bg_1{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath stroke-opacity='0.4' stroke='%23fff' stroke-width='1' d='M0,1H64M0,17H64M0,49H64M0,9H64M0,41H64M0,25H64M0,57H64M1-4V64M49-4V64M17-4V64M57-4V64M25-4V64M41-4V64M9-4V64'/%3e%3cpath stroke-opacity='1' stroke='%23fff' stroke-width='1' d='M-1,32H68M32-4V65'/%3e%3c/svg%3e")}
.bg_2{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='%23fff' d='M64,14.4v9.2L40.3,0h9.2Zm-64,0L14.4,0h9.2L0,23.6V14.4ZM0,49.5V40.3L23.6,64H14.4ZM8.3,32L32,8.3,55.6,32,32,55.6ZM32,17.5L17.5,32,32,46.4,46.4,32Zm32,32L49.5,64H40.3L64,40.3v9.2Z'/%3e%3c/svg%3e")}
.bg_3{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='%23fff' d='M32,32V0H64V32H32ZM0,64V32H32V64H0Z'/%3e%3c/svg%3e")}
.bg_4{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='%23fff' d='M32,0L64,32,32,64,0,32Z'/%3e%3c/svg%3e")}
.bg_5{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='%23fff' d='M42,35H35v7H29V35H22V29H29V22H35V29h7V35Z'/%3e%3c/svg%3e")}
.bg_6{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='%23fff' d='M64,7A7,7,0,0,1,57,0H64V7Zm-64,0V0H7A7,7,0,0,1,0,7ZM7,64H0V57A7,7,0,0,1,7,64ZM32,39A7,7,0,1,1,39,32,7,7,0,0,1,32,39ZM64,57V64H57A7,7,0,0,1,64,57Z'/%3e%3c/svg%3e")}
.bg_7{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3crect opacity='0.25' fill='%23fff' x='16' width='32' height='64'/%3e%3crect opacity='0.25' fill='%23fff' y='16' width='64' height='32'/%3e%3c/svg%3e")}
.bg_8{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='%23fff' d='M64,53.4v9.2h0L62.7,64H53.4Zm0-8.3L45.1,64H36.0l-0.1-.1h0L64,35.8v9.2h0ZM40.5,4.6L35.9,0h9.2Zm-17.1,0L18.7,0h9.2ZM32,48.4l-5.8,5.8-4.6-4.6L32,39.2,42.4,49.6,37.8,54.2Zm0-17.6L17.3,45.4l-4.6-4.6L32,21.5,51.2,40.8l-4.6,4.6ZM14.6,13.4L1.1,0h9.2l8.8,8.8ZM5.8,22.2L0,16.4V7.2L10.4,17.6ZM32,13.1L8.5,36.6,3.9,32h0L32,3.9,60.0,32l-4.6,4.6Zm26.2,9.1-4.6-4.6L64,7.2v9.2h0ZM44.7,8.8L53.5,0h9.2L49.3,13.4ZM27.9,64h-9.1L0,45.0V35.8L28.0,63.9ZM1.2,64L0,62.7V53.4L10.5,64H1.2Z'/%3e%3c/svg%3e")}
.bg_9{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cg fill='%23fff'%3e%3cpath opacity='0.9' d='M16,16V0L0,8M48,64V48L32,56M0,56V40l16,8m48-8V24L48,32'/%3e%3cpath opacity='0.7' d='M16,16V0L32,8M16,48V32L0,40M16,64V48l16,8m0-16V24l16,8m0,0V16l16,8M32,56V40l16,8m16,8V40L48,48'/%3e%3cpath opacity='0.5' d='M0,72V56l16,8M48,16V0L32,8M0,24V8l16,8M64,72V56L48,64M64,8V-8L48,0M32,24V8L16,16M32,40V24L16,32M32,56V40L16,48M0,8V-8L16,0'/%3e%3cpath opacity='0.3' d='M48,16V0L64,8M48,32V16L32,24M16,32V16L0,24M48,48V32l16,8M16,64V48L0,56M32,72V56l16,8M32,8V-8L48,0'/%3e%3cpath opacity='0.1' d='M16,32V16l16,8M16,48V32l16,8'/%3e%3c/g%3e%3c/svg%3e")}
.bg_0{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cg fill='%23fff' fill-opacity='0.2'%3e%3cpath d='M32,64a16,16,0,0,1,0-32V64Z'/%3e%3ccircle cx='0' cy='16' r='16'/%3e%3c/g%3e%3cg fill='%23fff' fill-opacity='0.5'%3e%3cpath d='M32,32V0A16,16,0,0,1,48,16,16,16,0,0,1,32,32Z'/%3e%3ccircle cx='64' cy='48' r='16'/%3e%3c/g%3e%3c/svg%3e")}
.bg_a{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23fff' stroke-width='1' stroke-linejoin='round' d='M0,43L16,32,32,43m0,0L48,32,64,43M0,21L16,32m0,0L32,21,48,32M0,0L16,11m0,0L32,0,48,11M0,64L16,53,32,64m0,0L48,53,64,64M48,11L64,0M48,32L64,21M16,53V11M32,64V43M32,21V0M48,53V11M0,64V43M0,21V0'/%3e%3c/svg%3e")}
.bg_b{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23fff' stroke-width='2' d='M32,8L56,32,32,56,8,32ZM0,8L24,32,0,56-24,32ZM64,8L88,32,64,56,40,32ZM32-24L56,0,32,24,8,0ZM32,40L56,64,32,88,8,64Z'/%3e%3c/svg%3e")}
.bg_c{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linejoin='round' d='M32,16.7l5.2,9.5L48,28.4l-7.4,7.9,1.3,10.8L32,42.6l-9.8,4.6,1.3-10.8L16,28.4l10.7-2.0L32,16.7zM64-15.2l5.2,9.5L80-3.6,72.5,4.3l1.3,10.8L64,10.6l-9.8,4.6L55.4,4.3,48-3.6,58.7-5.6,64-15.2zM0-15.2L5.2-5.6,16-3.6,8.5,4.3,9.8,15.2,0,10.6l-9.8,4.6L-8.5,4.3-16-3.6-5.2-5.6,0-15.2zM64,48.7l5.2,9.5L80,60.4l-7.4,7.9,1.3,10.8L64,74.6l-9.8,4.6,1.3-10.8L48,60.4l10.7-2.0L64,48.7zM0,48.7l5.2,9.5L16,60.4,8.5,68.3,9.8,79.2,0,74.6l-9.8,4.6,1.3-10.8L-16,60.4l10.7-2.0L0,48.7z'/%3e%3c/svg%3e")}
.bg_d{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 100 100'%3e%3cpath fill='%23fff' opacity='0.5' d='M0,77l23,23H10L0,90V77ZM86,0l14,14V26L75,0H86Zm14,51H86l14,14V77L75,51V40L61,26H75V13L88,26h12V51Zm0,49H75V91L61,77H75V64L88,77h12v23ZM50,38V51H36L50,65V77L25,51V40L11,26H25V13L38,26H50L75,51H63Zm10,62L50,90v10H25V91L11,77H25V64L38,77H50l23,23H60ZM0,38V26L25,51H13ZM36,0L50,14V26L25,0H36Z'/%3e%3c/svg%3e")}
.bg_e{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3e%3cpath fill='none' stroke='%23fff' stroke-width='1' d='M16,10L32,0,16,32V10ZM32,21V0L16,32ZM16,10L0,0,16,32V10ZM0,21V0L16,32ZM32,42L48,32,32,64V42ZM48,53V32L32,64ZM0,42L16,32,0,64V42ZM16,53V32L0,64ZM32,42L16,32,32,64V42ZM16,53V32L32,64ZM64,42L48,32,64,64V42ZM48,53V32L64,64ZM48,10L64,0,48,32V10ZM64,21V0L48,32ZM48,10L32,0,48,32V10ZM32,21V0L48,32ZM32,21L16,32H48ZM16,53L0,64H32ZM48,53L32,64H64ZM32,42L16,32H48ZM16,10L0,0H32ZM48,10L32,0H64ZM0,21L-16,32H16ZM0,42L-16,32H16ZM64,21L48,32H80ZM64,42L48,32H80Z'/%3e%3c/svg%3e")}
.img_mouse{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' d='M128,36a55,55,0,0,1,55,55v73a55,55,0,0,1-111,0v-73A55,55,0,0,1,128,36ZM127,51a8,8,0,0,1,8,8V81a8,8,0,0,1-16,0V59A8,8,0,0,1,127,51Zm55,51H73m54,0V89m0-38V37'/%3e%3c/svg%3e");}
.img_touch{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' d='M42,47H213a10,10,0,0,1,10,10V198a10,10,0,0,1-10,10H42a10,10,0,0,1-10-10V57A10,10,0,0,1,42,47ZM33,166H223m-95,42V167'/%3e%3c/svg%3e")}
.img_html{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M111,27v97H18V3H88ZM111,27H88V3M51,95L30,74,51,53M77,95L97,74,77,53M55,95L72,53'/%3e%3c/svg%3e")}
.img_zip{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M19,4h90a16,16,0,0,1,16,16v88a16,16,0,0,1-16,16H19A16,16,0,0,1,3,108V20A16,16,0,0,1,19,4ZM30,18H41V39H30V18ZM30,39H41V50H30V39ZM125,31a16,16,0,0,0-16-16H19A16,16,0,0,0,3,31m106,84H19M40,91H31m9-6H31m9-6H31m9-6H31m9-6H31m9-6H31m9-6H31m9,60H31m9-6H31m9-6H31m9-6H31'/%3e%3c/svg%3e")}
.img_wait{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3ccircle cx='64' cy='64' r='56' style='stroke: %23000; stroke-dasharray:360; stroke-dashoffset:360; stroke-width:6; fill:transparent'%3e%3canimate attributeName='stroke-dashoffset' dur='1.5s' to='-360' repeatCount='indefinite'/%3e%3canimateTransform attributeName='transform' type='rotate' values='0 64 64;360 64 64' dur='1s' repeatCount='indefinite'/%3e%3c/circle%3e%3c/svg%3e")}
.img_base{filter:var(--ft);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 128 128'%3e%3cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M19,4h90a16,16,0,0,1,16,16v88a16,16,0,0,1-16,16H19A16,16,0,0,1,3,108V20A16,16,0,0,1,19,4ZM64,124V102.926a12,12,0,1,0,0-17.852V64H85.074a12,12,0,1,1,17.852,0H125M64,4V25.074a12,12,0,1,0,0,17.853V64H42.926a12,12,0,1,1-17.853,0H3'/%3e%3c/svg%3e")}
.scene{background-color:var(--cb);border-radius:12px;padding:4px;margin-top:4px;}
.dialog_element{padding:4px;font-size:12px;border-radius:6px;background-color:var(--wn);margin-bottom:4px;}
.dialog{margin-top:4px;padding:4px;border-radius:8px;background-color:var(--cw);}
.scene_bg{
padding:4px 8px;
border-radius:8px;
background-color:#fff;
background-size:cover;
background-repeat:no-repeat;
background-position:center;
width:calc(100% - 16px);
height:128px;
}
.choice_b{
background-color:var(--cw);
margin-bottom:8px;
margin-top:8px;
min-height:20px;
text-align:center;
border-radius:6px;
font-size:12px;
}
#add_element{position:absolute;left:0;top:0;visibility:hidden;width:190px;}
.window{
position:absolute;
top:50%;
transform:translate(-50%,-50%);
left:50%;
background-color: var(--wn) !important;
border-radius:16px;
box-shadow:0px 2px 24px var(--cs);
padding:2px 8px 24px 8px;
}
.win_head{width:100%;height:36px;display:flex;justify-content:center;align-items:center;}
#window_zone{height:100vh;width:100%;position:fixed;left:0;top:0;visibility:hidden;transition-duration:0.5s;z-index:10020;}
#tools_zone{position:fixed;height:100vh;width:100%;left:0;top:0;visibility:hidden;z-index:10000;}
.add_w{
background-color:var(--wn);
border-radius:16px;
box-shadow:0px 2px 24px var(--cs);
}
.button{border-radius:8px;width:100%;height:90%;background-color:var(--cw);}
.button:hover{background-color:var(--cb);}
.big_button{border-radius:20px;height:40px;background-color:var(--cw);cursor:pointer;}
.big_button:hover{background-color:var(--cb);}
.edit_button{background-color:none;cursor:pointer;height:40px;}
.edit_button:hover{background-color:var(--cw);cursor:pointer;}
.search{width:88px;
background-color:var(--wn);
height:40px;
border-left:1px solid var(--cb);
border-right:1px solid var(--cb);
padding:0 2px;
user-select:text;
}
@media screen and (max-width: 620px) {
.small_menu{display:none;}
#language_view{border-left:1px solid var(--cb);}
}
.add_button{height:28px;width:28px;}
.input_text_b{
border:0;
font-family:Arial;
font-size:12px;
-webkit-appearance:none;
background-color:transparent;
cursor:text;
height:20px;
width:100%;
user-select:text;
}
.input_text{
border:0;
font-family:Arial;
font-size:12px;
-webkit-appearance:none;
border-bottom:1px solid var(--cb);
background-color:transparent;
cursor:text;
height:28px;
width:100%;
user-select:text;
}
.input_slider{appearance:none;height:6px;background:var(--cw);outline:none;border-radius:8px;}
.input_slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--cb);cursor:pointer;border:3px solid var(--wn);}
.input_slider_red{-webkit-appearance:none;height:6px;background:#f88;;outline:none;border-radius:8px;}
.input_slider_green{-webkit-appearance:none;height:6px;background:#8f8;outline:none;border-radius:8px;}
.input_slider_blue{-webkit-appearance:none;height:6px;background:#aaf;outline:none;border-radius:8px;}
.input_slider_grey{-webkit-appearance:none;height:6px;background:#ccc;outline:none;border-radius:8px;}
.input_slider::-moz-range-thumb{-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;background:var(--cb);cursor:pointer;border:3px solid var(--wn);}
.input_slider_progress::-moz-range-progress{-moz-appearance:none;height:6px;background: var(--cb);outline:none;border-radius:8px;}
.input_slider_red::-moz-range-progress{-moz-appearance:none;height:6px;background:#f88;outline:none;border-radius:8px;}
.input_slider_green::-moz-range-progress{-moz-appearance:none;height:6px;background:#8f8;outline:none;border-radius:8px;}
.input_slider_blue::-moz-range-progress{-moz-appearance:none;height:6px;background:#aaf;outline:none;border-radius:8px;}
.input_slider_grey::-moz-range-progress {-moz-appearance:none;height:6px;background:#ccc;outline:none;border-radius:8px;}
.input_slider_red::-moz-range-track{appearance:none;height:6px;background:#fee;;outline:none;border-radius:8px;}
.input_slider_green::-moz-range-track{appearance:none;height:6px;background:#efe;outline:none;border-radius:8px;}
.input_slider_blue::-moz-range-track{appearance:none;height:6px;background:#eef;outline:none;border-radius:8px;}
.input_slider_grey::-moz-range-track{appearance:none;height:6px;background:#eee;outline:none;border-radius:8px;}
input[type="text"]{text-indent:4px;}
select{
border:0;
text-align-last:center;
font-family:Arial;
font-size:12px;
-webkit-appearance:none;
border-bottom:1px solid var(--cb);
background-color:transparent;
height:28px;width:100%;
}
.input_text:focus{border-bottom:1px solid #fff;}
hr{border-top:1px solid var(--cb);margin:4px 0px;}
.checkbox_a{filter:var(--ft);content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3ccircle fill='none' stroke='%23000' stroke-width='5' stroke-linejoin='round' cx='32' cy='32' r='28'/%3e%3c/svg%3e");background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;width:16px;cursor:pointer;}
.checkbox_a:checked {filter:var(--ft);content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 64 64'%3e%3ccircle fill='none' stroke='%23000' stroke-width='5' stroke-linejoin='round' cx='32' cy='32' r='28'/%3e%3ccircle fill='%23000' cx='32' cy='32' r='18'/%3e%3c/svg%3e");}
.checkbox_b{height:24px;width:24px;content:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:16px;}
.checkbox_b:checked {content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 -8 256 256'%3e%3cpath fill='none' stroke='%23000' stroke-width='18' stroke-linejoin='round' d='M188,84 114,166 67,122'/%3e%3c/svg%3e");}
.set_button{height:40px;border-right:1px solid var(--cb);padding:0px 12px;background-color:var(--cw);white-space:nowrap;}
.set_select{background-color:var(--cb);}
.set_blank{overflow-x:hidden;position:absolute;overflow-y:auto;width:100%;height:60vh;min-height:360px;}
.window_close{position:absolute;right:0px;top:0px;height:40px;width:40px;cursor:pointer;}
.namber{padding-left:8px;font-size:12px;color:var(--tx);}
.add_el{height:40px;}
.add_el:hover{background-color:var(--cb);}
.text_tutorials_a{font-size:11px;text-align:left;background-color:var(--cw);padding:8px;color:var(--tx);}
.text_tutorials_b{font-size:12px;text-align:left;padding-top:4px;color:var(--tx);}
.select_tutorials{user-select:text;}
.chec_bg{border:2px solid var(--cw);border-radius:8px;background-color:var(--cb);height:68px;width:68px;content:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;}
.chec_bg:checked{background-color:var(--cw);border:2px solid var(--cb);}
#scene_maker{height:100vh;width:100%;position:fixed;left:0px;top:0px;display:none;}
#scene_canvas{height:calc(100vh - 40px);width:calc(98vh - 40px);position:relative;}
@media only screen and (max-width:120vh){
#scene_canvas{height:72vw;width:72vw;}
}
.scene_close{display:none;}
.scene_close div{height:100%;width:100%;}
#scene_layout{
overflow:hidden;
height:100%;
width:50%;
background-color:#000;
position:absolute;
top:50%;left:50%;
transform:translate(-50%,-50%);
border-radius:8px;
background-color:#fff;
background-repeat:no-repeat;
background-position:center;
box-shadow:0px 2px 24px var(--cs);
}
.set_title{background-color:var(--cb);cursor:pointer;}
.input_color{cursor:pointer;border:none;height:100%;width:100%;opacity: 0;}
.show_color{background-color:var(--cb);border-radius:50%;width:26px;height:26px;}
.select_box{visibility:hidden;background-color:var(--cs);opacity:0.6;}
.drag{transform-origin:top left;box-sizing:border-box;width:100px;height:100px;position:absolute;top:100px;left:100px;cursor:move;border: 1px solid var(--cb);outline: dashed 1px var(--cl);outline-offset: -1px;}
.resizer{width:6px;height:6px;position:absolute;z-index:4000;}
.top-right,.top-left,.bottom-left,.bottom-right,.rotate{border-radius:50%;background:#fff;border: 1px solid var(--cl);}
.size-right:after,.size-left:after,.size-bottom:after,.size-top:after{content:'';width:6px;height:6px;position:absolute;transform:translateY(-50%) translateX(-50%);top:50%;left:50%;border-radius:50%;background:#fff;border: 1px solid var(--cl);}
.size-right{right:-4px;top:50%;cursor:ew-resize;height:calc(100% - 32px);transform:translateY(-50%);}
.size-right:before{position:absolute;content:'';top:-8px;right:-12px;left:0px;bottom:-8px;}
.top-right{right:-5px;top:-5px;cursor:nesw-resize;}
.top-right:before{position:absolute;content:'';top:-12px;right:-12px;left:-4px;bottom:-4px;}
.top-left{left:-5px;top:-5px;cursor:nwse-resize;}
.top-left:before{position:absolute;content:'';top:-12px;right:-4px;left:-12px;bottom:-4px;}
.size-left{left:-4px;top:50%;cursor:ew-resize;height:calc(100% - 32px);transform:translateY(-50%);}
.size-left:before{position:absolute;content:'';top:-8px;right:0px;left:-12px;bottom:-8px;}
.bottom-left{left:-5px;bottom:-5px;cursor:nesw-resize;}
.bottom-left:before{position:absolute;content:'';top:-4px;right:-4px;left:-12px;bottom:-12px;}
.size-bottom{left:50%;bottom:-4px;cursor:ns-resize;width:calc(100% - 32px);transform:translateX(-50%);}
.size-bottom:before{position:absolute;content:'';top:4px;right:-8px;left:-8px;bottom:-12px;}
.bottom-right{right:-5px;bottom:-5px;cursor:nwse-resize;}
.bottom-right:before{position:absolute;content:'';top:-4px;right:-12px;left:-4px;bottom:-12px;}
.size-top{left:50%;top:-4px;cursor:ns-resize;width:calc(100% - 32px);transform:translateX(-50%);}
.size-top:before{position:absolute;content:'';bottom:4px;right:-8px;left:-8px;top:-12px;}
.rotate {left:50%;top:-42px;cursor:crosshair;transform:translateX(-50%);}
.rotate:before{position:absolute;content:'';bottom:-8px;right:-8px;left:-8px;top:-8px;}
.proportion_c{filter:var(--ft);content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 512'%3e%3cg fill='none' stroke='%23000' stroke-width='9' stroke-linejoin='round'%3e%3cpath d='M128,188a12,12,0,0,1,12,12v32a12,12,0,0,1-24,0V200A12,12,0,0,1,128,188Z M128,268a12,12,0,0,1,12,12v32a12,12,0,0,1-24,0V280A12,12,0,0,1,128,268Z M128,283V232'/%3e%3ccircle cx='16' cy='85' r='12'/%3e%3ccircle cx='16' cy='428' r='12'/%3e%3c/g%3e%3c/svg%3e");height:64px;width:32px;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;}
.proportion_c:checked{filter:var(--ft);content:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' viewBox='0 0 256 512'%3e%3cg fill='none' stroke='%23000' stroke-width='9' stroke-linejoin='round' %3e%3cpath d='M128,355.5V398a30,30,0,0,1-30,30H29M29,85H98a30,30,0,0,1,30,30v42.5 M128,188a12,12,0,0,1,12,12v32a12,12,0,0,1-24,0V200A12,12,0,0,1,128,188Z M128,268a12,12,0,0,1,12,12v32a12,12,0,0,1-24,0V280A12,12,0,0,1,128,268Z M128,283V232'/%3e%3ccircle cx='16' cy='85' r='12'/%3e%3ccircle cx='16' cy='428' r='12'/%3e%3c/g%3e%3c/svg%3e");}
.align{
-webkit-appearance:none;-moz-appearance:none;appearance:none;
height:32px;width:32px;
border-radius:4px;cursor:pointer;
}
.align:checked {background-color:var(--cb);}
.switchbox {
position:relative;
display:inline-block;
width:32px;
height:18px;
margin-bottom:3px;
}
.switchbox input{opacity:0;width:0;height:0;}
.toggle{
position:absolute;
cursor:pointer;
top:0;
left:0;
right:0;
bottom:0;
background-color:var(--cw);
transition:0.1s;
border-radius:12px;
}
.toggle:before{
position:absolute;
content:"";
height:14px;
width:14px;
left:2px;
bottom:2px;
background-color:#fff;
transition:0.1s;
border-radius:12px;
}
input:checked+.toggle{background-color:var(--cb);}
input:checked+.toggle:before{transform:translateX(14px);}
.offselect{height:100%;width:100%;position:absolute;left:0;top:0;}
#translation_input {width:100%;}
#translation_input input{
border:0;
font-family:Arial;
font-size:13px;
-webkit-appearance:none;
background-color:transparent;
cursor:text;
height:32px;
width:100%;
padding:0px 6px;
box-sizing:border-box;
user-select:text;
}
#translation_input tr:nth-child(odd){background-color:var(--cw);}
#translation_input tr:nth-child(even){background-color:var(--wn);}
#translation_edit span{padding-left:8px;}
#translation_slider{
position:absolute;
cursor:ew-resize;
top:0px;
width:12px;
height:100%;
background-color:#2196F3;
opacity:0;
}
#scene_view:after,#ho_preview:after{
position:absolute;
content:"";
top:0px;
right:0px;
pointer-events: none;
height:100%;
width:28px;
box-shadow:inset -26px 0 16px -28px var(--cs);
}
.translation_data{height:40px;display:flex;justify-content:start;align-items:center;white-space:nowrap;}
.codeView{
overflow: scroll;
position: relative;
padding-left:0px;
height:calc(90vh - 128px);
width:100%;
border-top:1px solid var(--cb);
border-bottom:1px solid var(--cb);
min-height:92px;
}
.codeView *{
box-sizing:border-box;
font-size:12px;
text-align:left;
font-family:monospace;
}
.code_text,.code_show{
background-color:transparent;
font-family:monospace;
text-decoration:none;
position:absolute;
top:0px;left:0px;
overflow:hidden;
outline:none;
resize:none;
padding:8px;
tab-size:4;
margin:0;
}
.code_text{
width:100%;
min-width:100%;
min-height:100%;
border:none;
color:transparent;
caret-color:var(--tx);
}
.code_show{
color:var(--tx);
padding-top:9px;
padding-left:12px;
left:-3.3px;top:-0.5px;
}
.code_elem_1{color:var(--cb);font-style:italic;}
.code_elem_2{color:var(--tx);filter:brightness(0.5) invert(50%);}
.code_elem_3{color:#e88;font-weight:bold;}
.code_elem_4{color:#6b5; }
.code_elem_5{color:#88e; }
</style>
</head>
<body onload="world_size();" style='background-color:var(--cw);font-size:12px;'>
<input type="file" id="json_file" style="display:none;position:fixed;" multiple webkitdirectory/>
<audio id='audio_preplay' onended='this.currentTime=0' style="display:none;position:fixed;"></audio>
<div id="menu_panel" style='overflow:hidden;'>
<table width="100%" height="100%">
<tbody>
<tr>
<td title='New project' onclick='new_project();menu_add.style.visibility="hidden";' class='icon button_menu icon_new'></td>
<td title='Load project folder' onclick='json_file.value=null;load_new=false;json_file.click();menu_add.style.visibility="hidden";' class='icon button_menu icon_load'></td>
<td title='Save JSON script project' onclick='save_file();menu_add.style.visibility="hidden";' class='icon button_menu icon_save'></td>
<td title='Undo' onclick='state_back(1);' class='icon button_menu icon_undo'></td>
<td title='Redo' onclick='state_back(-1);' class='icon button_menu icon_undo' style='transform:scaleX(-1);'></td>
<td title='Settings project' onclick='setup();menu_add.style.visibility="hidden";' class='icon button_menu icon_setup'></td>
<td title='Project code' onclick='global_scripts();menu_add.style.visibility="hidden";' class='icon button_menu icon_json'></td>
<td title='Dialogues & texts' onclick='text_export();menu_add.style.visibility="hidden";' class='icon button_menu icon_text'></td>
<td title='About visual editor' onclick='about();menu_add.style.visibility="hidden";' class='icon button_menu icon_about small_menu'></td>
<td style='width:88px;' class="small_menu"><input type="text" id="search_block" class="search" oninput="search_block()" onkeyup="search_block()" placeholder="Search block" list="list_blocks"><datalist id="list_blocks"></datalist></td>
<td style='width:40px;'><select id='language_view' style='height:40px;border-right:1px solid var(--cb);border-bottom:0;'><option value='en'>EN</option></select></td>
<td title='Build project' onclick='build_choice();menu_add.style.visibility="hidden";' class='icon button_menu icon_build'></td>
<td title='Run preview Project' style='border-radius:0 0 16px 0;' onclick='play_novel();menu_add.style.visibility="hidden";' class='icon button_menu icon_play'></td>
</tr>
</tbody>
</table>
</div>
<div id="new_story_block">
<table height="100%">
<tbody>
<tr>
<td class='button_menu' style='border-radius:20px 0 0 20px;border-right:1px solid var(--cb);'><table onclick='new_block()' height="100%"><tbody><tr><td width='42px' class='icon icon_add'></td><td align='center'>Add story block</td><td width='16px'></td></tr></tbody></table></td>
<td width="42px" class='icon button_menu icon_about' onclick='project_statist()' style='border-right:1px solid var(--cb);'></td>
<td width="42px" class='icon button_menu icon_equal' onclick='world_scale(2)'></td>
<td width="42px" class='icon button_menu icon_scale' onclick='world_scale(1)'></td>
<td width="42px" class='icon button_menu icon_minus' onclick='world_scale(false)' style='border-radius:0 20px 20px 0;'></td>
</tr>
</tbody>
</table>
</div>
<a id="downloadAnchorElem" style="display:none;position:fixed;"></a>
<div id='world'>
<svg id="story_lines" xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"></svg>
<div id="story_blocks"></div>
</div>
<!--scene_maker-->
<div id='scene_maker'>
<table style="height:100vh;width:100%;">
<tbody>
<tr><td rowspan="3" style="position:relative;">
<div id='scene_view' style='width:calc(100vw - 286px);height:100vh;overflow:auto;box-sizing:border-box;' align='center' onmouseover='this.tabindex=1' onmouseout='this.tabindex=0'>
<div id='screen_preview' style='background-color:var(--cw);background-blend-mode:overlay;transform-origin:0 0;min-width:100%;min-height:100%;padding-top:40px;display:flex;justify-content:center;align-items:center;transform:scale(1);'> <!--onmouseup="window.getSelection().removeAllRanges();"-->
<div class="offselect" onclick='if(objFocus){scene_scroll=false;saveResize()};'></div>
<div id='scene_canvas'><div class="offselect" onclick='if(objFocus){scene_scroll=false;saveResize()};'></div>
<div id='scene_layout'><div class="offselect" onclick='if(objFocus){scene_scroll=false;saveResize()};'></div>
<div id='resizers' class='drag' style='visibility:hidden;'>
<div class='resizer size-right'></div>
<div class='resizer size-left'></div>
<div class='resizer size-bottom'></div>
<div class='resizer size-top'></div>
<div class='resizer top-right'></div>
<div class='resizer top-left'></div>
<div class='resizer bottom-right'></div>
<div class='resizer bottom-left'></div>
<div class='resizer rotate'></div>
</div>
<table id="tue_text_block" align="center" onclick='if(objFocus){scene_scroll=false;saveResize()};'>
<tbody>
<tr>
<td id="tue_text_element" style="position:relative;" valign='top'>
<div id="tue_text_view" ></div>
<div id="tue_name_block"></div>
</td>
</tr>
</tbody>
</table>
</div></div>
</div>
</div>
<div id="scene_controll" style="right:320px;">
<table height="100%">
<tbody>
<tr>
<td width="42px" class='icon button_menu icon_right' onclick='scen_compres(scen_data[0],scen_data[1],scen_data[2]);scen_editor(scen_data[0],scen_data[1],scen_data[2]-1);scen_edit_data();menu_add.style.visibility="hidden";' style='border-radius:20px 0 0 20px;'></td>
<td width="42px" class='icon button_menu icon_go' onclick='scen_compres(scen_data[0],scen_data[1],scen_data[2]);scen_editor(scen_data[0],scen_data[1],scen_data[2]+1);scen_edit_data();menu_add.style.visibility="hidden";' style='border-right:1px solid var(--cb);'></td>
<td width="42px" class='icon button_menu icon_equal' onclick='world_scale(2)'></td>
<td width="42px" class='icon button_menu icon_scale' onclick='world_scale(1)'></td>
<td width="42px" class='icon button_menu icon_minus' onclick='world_scale(false)'></td>
<td width="42px" class='icon button_menu icon_play' onclick="play_novel(scen_data[0],true)" style='border-left:1px solid var(--cb);border-radius:0 20px 20px 0;'></td>
</tr>
</tbody>
</table>
</div>
<div class="scene_close" onclick='saveResize();scen_compres(scen_data[0],scen_data[1],scen_data[2]);scen_edit_update(false);'><div class="icon button_menu icon_undo"></div></div>
</td>
<td id='scrnr_title' height="40px" align='center' style="background-color:var(--wn);width:286px;" class='namber set_layout_panel'>block name (scene:1 | dialog:1)</td></tr>
<tr>
<td style="background-color:var(--wn);border-bottom:1px solid var(--cb);border-top:1px solid var(--cb);" class='set_layout_panel'><div id='scen_setup' style='height:calc(100vh - 80px);overflow-x:hidden;overflow-y:auto;position:relative;'>
<table onclick="block_open('set_preview');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Preview</td></tr></tbody></table>
<div class="set_panel" id="set_preview" style="width:100%;display:block;">
<table id="set_layout" style="width:100%;"><tbody>
<tr><td height='40px' align='right' style='width:40%;padding-right:8px;'>Orientation</td><td style='padding-right:8px;'>
<select id='ratio_screen' oninput='setup_editor.preview[1]=this.selectedIndex;localStorage.setItem("editor_setup",JSON.stringify(setup_editor));if(objFocus){scene_scroll=false;saveResize()};preview_size(false);video_size();' style='width:100%;'>
<option value=true selected>landscape</option>
<option value=false>Portrait</option>
</select>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Backstage</td><td style='padding-right:8px;'>
<select id='off_screen' oninput='setup_editor.preview[3]=this.value;scene_layout.style.overflow=(this.value==1)?"visible":"hidden";localStorage.setItem("editor_setup",JSON.stringify(setup_editor));' style='width:100%;'>
<option value="0">Hidden</option>
<option value="1">Show</option>
</select>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Size</td><td style='padding-right:8px;'>
<select id='screen_size' oninput='setup_editor.preview[2]=this.selectedIndex;localStorage.setItem("editor_setup",JSON.stringify(setup_editor));if(objFocus){scene_scroll=false;saveResize()};preview_size(true);' style='width:100%;'>
<option value="0" selected>Default screen</option>
<option value="-1">Preview size</option>
<option value="-2">Screen size</option>
<option disabled></option>
<option value="1080">1080p FHD</option>
<option value="720">720p HD</option>
<option value="480">480i SDTV</option>
<option value="360">360i LDTV</option>
</select>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Screen</td><td style='padding-right:8px;'>
<select id='aspect_ratio' oninput='p_width.value=this.value;setup_editor.preview[0]=this.value;localStorage.setItem("editor_setup",JSON.stringify(setup_editor));if(objFocus){scene_scroll=false;saveResize()};preview_size(false);video_size();' style='width:100%;'>
<option value="100">1:1</option>
<option value="76">4:3</option>
<option value="56">16:9</option>
</select>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Ratio</td><td style='padding-right:8px;'>
<input id='p_width' class='input_slider input_slider_progress' onchange='aspect_ratio.selectedIndex="-1";setup_editor.preview[0]=this.value;localStorage.setItem("editor_setup",JSON.stringify(setup_editor));' oninput='if(objFocus){scene_scroll=false;saveResize();}preview_size(false);video_size();' type="range" value='100' min="50" max="100" style='width:100%;'>
</td></tr>
</tbody></table></div>
<table onclick="block_open('set_scene');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Scene content</td></tr></tbody></table>
<div class="set_panel" id="set_scene" style="width:100%;display:none;">
<table style="width:100%;"><tbody>
<tr><td align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_edit'><tbody><tr><td width='60px' class='icon_m icon_art'></td><td align='left'>Scene edit</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_json'><tbody><tr><td width='60px' class='icon_m icon_json'></td><td align='left'>JSON edit</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_text'><tbody><tr><td width='60px' class='icon_m icon_edit2'></td><td align='left'>Text edit</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_video'><tbody><tr><td width='60px' class='icon_m icon_video'></td><td align='left'>Video</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_audio_play'><tbody><tr><td width='60px' class='icon_m icon_audio_play'></td><td align='left'>Play sound</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_audio_off'><tbody><tr><td width='60px' class='icon_m icon_audio_off'></td><td align='left'>Stop sound</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_var'><tbody><tr><td width='60px' class='icon_m icon_var'></td><td align='left'>Variable</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_html'><tbody><tr><td width='60px' class='icon_m icon_html'></td><td align='left'>HTML</td><td width='42px'></td></tr></tbody></table>
</td></tr><tr><td height='40px' align='center' valign='center' style='border-bottom:1px solid var(--cw);'>
<table class='edit_button' width='100%' id='s_scene_js'><tbody><tr><td width='60px' class='icon_m icon_js'></td><td align='left'>JavaScript</td><td width='42px'></td></tr></tbody></table>
</td></tr>
</tbody></table>
</div>
<table onclick="block_open('text_panel_g');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Text panel</td></tr></tbody></table>
<div class="set_panel" id="text_panel_g" style="width:100%;display:none;">
<table style="width:100%;"><tbody>
<tr><td height='40px' align='right' style='width:40%;padding-right:8px;'>Width size</td><td style='padding-right:8px;' colspan='3'>
<input id='size_w' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.size[0]=this.value;scen_edit_update(true);state_save()' type="text" value='95%' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Height size</td><td style='padding-right:8px;' colspan='3'>
<input id='size_h' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.size[1]=this.value;scen_edit_update(true);state_save()' type="text" value='25%' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Indent text</td><td style='padding-right:8px;' colspan='3'>
<input id='indent_text' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.indent_text=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Text</td>
</tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Color text</td><td style='width:40px;' align='center'><div class='show_color' id='color_text_s'></div></td><td style='padding-right:8px;'>
<input id='color_text' class='input_text' onchange='story_script.parameters.text_panel.color_text=this.value;color_text_s.style.backgroundColor=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td><td height='40px' align='right' style='width:40px;' class='icon icon_color' onclick='edit_color("color_text",color_text.value)'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Font size</td><td style='padding-right:8px;' colspan='3'>
<input id='size_text' class='input_text' onchange='if(this.value.length>0){this.value=correct_value(this.value);story_script.parameters.text_panel.size_text=this.value;}else{delete story_script.parameters.text_panel.size_text}scen_edit_update(true);state_save()' type="text" value='20px' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Font family</td><td style='padding-right:8px;' colspan='3'>
<input id='font_family' class='input_text' onchange='if(this.value.length>0){story_script.parameters.text_panel.font_family=this.value}else{delete story_script.parameters.text_panel.font_family};scen_edit_update(true);state_save()' type="text" value='20px' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Dialog speed</td><td style='padding-right:8px;' colspan='3'>
<input id='dialog_speed' class='input_text' onchange='this.value=correct_value(this.value,true);story_script.parameters.text_panel.dialog_speed=this.value;state_save()' type="text" style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Console mode</td><td style='padding-right:8px;' colspan='3'>
<select id="console_mode" oninput="if(this.selectedIndex!=0){story_script.parameters.text_panel.scroll=true}else{delete story_script.parameters.text_panel.scroll};state_save()">
<option>Off</option>
<option>Text autoscroll</option>
</select>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Position</td>
</tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Top position</td><td style='padding-right:8px;' colspan='3'>
<input id='position_t' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.position[2]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Left position</td><td style='padding-right:8px;' colspan='3'>
<input id='position_l' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.position[0]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Bottom position</td><td style='padding-right:8px;' colspan='3'>
<input id='indent_bottom' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.indent_bottom=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Right position</td><td style='padding-right:8px;' colspan='3'>
<input id='position_r' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.text_panel.position[1]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Style</td>
</tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Style CSS</td><td style='padding-right:8px;' colspan='2'>
<input id='style' class='input_text' onchange='scen_edit_update(true)' type="text" value='' style='width:100%;'>
</td><td height="40px" align="right" style="width:30px;" class="icon icon_edit" onclick="copy_arr=story_script.parameters.text_panel;edit_code('style','Style CSS');">
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Class name</td><td style='padding-right:8px;' colspan='3'>
<input id='className' class='input_text' onchange='scen_edit_update(true)' type="text" value='100' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Color panel</td><td style='width:40px;' align='center'><div class='show_color' id='color_t_s'></div></td><td style='padding-right:8px;'>
<input id='color_t' class='input_text' onchange='story_script.parameters.text_panel.color=this.value;color_t_s.style.backgroundColor=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td><td height='40px' align='right' style='width:40px;' class='icon icon_color' onclick='edit_color("color_t",color_t.value)'>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">End text cursor</td>
</tr>
<tr><td height="40px" align="right" style="padding-right:8px;">Art</td>
<td colspan='2'><input id="etc_i" class="input_text" onchange='if(!story_script.parameters.text_panel.end_text_cursor){story_script.parameters.text_panel.end_text_cursor=[0,0,0,""]};story_script.parameters.text_panel.end_text_cursor[0]=this.value;scen_edit_update(true);' type="text" style="width:100%;height:28px" ></td>
<td height="40px" align="right" style="width:30px;" class="icon icon_load" onclick="if(!story_script.parameters.text_panel.end_text_cursor){story_script.parameters.text_panel.end_text_cursor=[0,0,0,'']};file_catalog('','img','etc_i',1,'story_script.parameters.text_panel.end_text_cursor[0]')">
</td></tr>
<tr><td height='40px' align='right' style='width:40%;padding-right:8px;'>Width size</td><td style='padding-right:8px;' colspan='3'>
<input id='etc_w' class='input_text' onchange='if(!story_script.parameters.text_panel.end_text_cursor){story_script.parameters.text_panel.end_text_cursor=[0,0,0,""]};this.value=correct_value(this.value);story_script.parameters.text_panel.end_text_cursor[1]=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Height size</td><td style='padding-right:8px;' colspan='3'>
<input id='etc_h' class='input_text' onchange='if(!story_script.parameters.text_panel.end_text_cursor){story_script.parameters.text_panel.end_text_cursor=[0,0,0,""]};this.value=correct_value(this.value);story_script.parameters.text_panel.end_text_cursor[2]=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Style CSS</td><td style='padding-right:8px;' colspan='2'>
<input id='etc_s' class='input_text' onchange='if(!story_script.parameters.text_panel.end_text_cursor){story_script.parameters.text_panel.end_text_cursor=[0,0,0,""]};story_script.parameters.text_panel.end_text_cursor[3]=this.value;scen_edit_update(true);' type="text" style='width:100%;'>
</td><td height="40px" align="right" style="width:30px;" class="icon icon_edit" onclick="copy_arr=story_script.parameters.text_panel.end_text_cursor;edit_code('3','Style CSS');">
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Background image</td>
</tr>
</tbody><tbody id='atp_edit'>
</tbody></table>
</div>
<table onclick="block_open('name_panel_g');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Name panel</td></tr></tbody></table>
<div class="set_panel" id="name_panel_g" style="width:100%;display:none;">
<table style="width:100%;"><tbody>
<tr><td height='40px' align='right' style='width:40%;padding-right:8px;'>Width size</td><td style='padding-right:8px;' colspan='3'>
<input id='n_size_w' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.size[0]=this.value;scen_edit_update(true);state_save();' type="text" style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Height size</td><td style='padding-right:8px;' colspan='3'>
<input id='n_size_h' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.size[1]=this.value;scen_edit_update(true);state_save();' type="text" value='48px' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Indent text</td><td style='padding-right:8px;' colspan='3'>
<input id='n_indent_text' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.indent_text=(this.value.length>0)?this.value:0;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Text</td>
</tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Color text</td><td style='width:40px;' align='center'><div class='show_color' id='n_color_text_s'></div></td><td style='padding-right:8px;'>
<input id='n_color_text' class='input_text' onchange='story_script.parameters.name_panel.color_text=n_color_text.value;n_color_text_s.style.backgroundColor=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td><td height='40px' align='right' style='width:40px;' class='icon icon_color' onclick='edit_color("n_color_text",n_color_text.value)'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Font size</td><td style='padding-right:8px;' colspan='3'>
<input id='n_size_text' class='input_text' onchange='if(this.value.length>0){this.value=correct_value(this.value);story_script.parameters.name_panel.size_text=this.value;}else{delete story_script.parameters.name_panel.size_text;}scen_edit_update(true);state_save()' type="text" value='18px' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Font family</td><td style='padding-right:8px;' colspan='3'>
<input id='n_font_family' class='input_text' onchange='if(this.value.length>0){this.value=correct_value(this.value);story_script.parameters.name_panel.font_family=this.value;}else{delete story_script.parameters.name_panel.font_family;}scen_edit_update(true);state_save()' type="text" value='20px' style='width:100%;'>
</tr><tr>
<td height="40px" align="right" style="padding-right:8px;">Align text</td>
<td colspan="3" align="center">
<table style="border-radius:4px;"><tbody id='n_align_tp'></tbody></table>
</td>
</tr><tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Position</td>
</tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Top position</td><td style='padding-right:8px;' colspan='3'>
<input id='n_position_t' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.position[2]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Left position</td><td style='padding-right:8px;' colspan='3'>
<input id='n_position_l' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.position[0]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Bottom position</td><td style='padding-right:8px;' colspan='3'>
<input id='n_position_b' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.position[3]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Right position</td><td style='padding-right:8px;' colspan='3'>
<input id='n_position_r' class='input_text' onchange='this.value=correct_value(this.value);story_script.parameters.name_panel.position[1]=this.value;scen_edit_update(true);state_save()' type="text" value='0' style='width:100%;'>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Style</td>
</tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Style CSS</td><td style='padding-right:8px;' colspan='2'>
<input id='n_style' class='input_text' onchange='scen_edit_update(true)' type="text" style='width:100%;'>
</td><td height="40px" align="right" style="width:30px;" class="icon icon_edit" onclick="copy_arr=story_script.parameters.name_panel;edit_code('style','Style CSS');">
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Class name</td><td style='padding-right:8px;' colspan='3'>
<input id='n_className' class='input_text' onchange='story_script.parameters.name_panel.className=this.value;scen_edit_update();state_save()' type="text" style='width:100%;'>
</td></tr>
<tr><td height='40px' align='right' style='padding-right:8px;'>Color panel</td><td style='width:40px;' align='center'><div class='show_color' id='n_color_s'></div></td><td style='padding-right:8px;'>
<input id='n_color' class='input_text' onchange='story_script.parameters.name_panel.color=this.value;n_color_s.style.backgroundColor=this.value;scen_edit_update(true);state_save()' type="text" style='width:100%;'>
</td><td height='40px' align='right' style='width:40px;' class='icon icon_color' onclick='edit_color("n_color",n_color.value)'>
</td></tr>
<tr><td colspan="4" height="40px" align="left" style="padding-left:8px;border-bottom:1px solid var(--cb);">Background image</td>
</tr>
</tbody><tbody id='anp_edit'>
</tbody></table>
</div>
<table onclick="block_open('interface_buttons');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Interface buttons</td></tr></tbody></table>
<div class="interface_buttons" id="interface_buttons" style="width:100%;display:none;"><div id='interface_buttons_c' style='margin-bottom:12px;'></div>
<div style='width:100%;margin-bottom:16px;' align='center'><div id='add_scen_items' class='add_button icon_m icon_add' onclick='interface_buttons_c.innerHTML+=button_panel_edit(-1);state_save();button_panel_update();'></div></div>
</div>
<table onclick="block_open('arts_e');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Arts</td></tr></tbody></table>
<div class="set_panel" id="arts_e" style="width:100%;display:block;"><div id='arts_ec' style='margin-bottom:12px;'></div>
<div style='width:100%;margin-bottom:16px;' align='center'><div id='add_art' class='add_button icon_m icon_add'></div></div>
</div>
<table onclick="block_open('choice_e');" class="set_title" height='40px' width='100%'><tbody><tr><td width='40px' class='icon_m icon_more'></td><td align='left' valign='center'>Buttons & Choice</td></tr></tbody></table>
<div class="set_panel" id="choice_e" style="width:100%;display:block;"><div id='choice_ec' style='margin-bottom:12px;'></div>
<div style='width:100%;margin-bottom:16px;' align='center'><div id='add_choice' class='add_button icon_m icon_add'></div></div>
</div>
<div id='menu_element' align='center' style='z-index:10040;position:absolute;right:64px;top:0;visibility:hidden;width:190px;'></div>
</div></td>
</tr>
<tr>
<td height="40px" align='center' style="background-color:var(--wn);" class='button_menu set_layout_panel'><table class='button_menu' width='100%' height="100%" onclick='saveResize();scen_compres(scen_data[0],scen_data[1],scen_data[2]);scen_edit_update(false);'><tbody><tr><td width='42px' class='icon icon_ok'></td><td align='center'>Back</td><td width='42px'></td></tr></tbody></table></td>
</tr>
</tbody>
</table>
</div>
<!--scene_maker-->
<div id='tools_zone' align='center'></div>
<div id='window_zone' align='center'></div>
<div id='add_element' align='center' style='z-index:10030;'></div>
<div id="toast"></div>
<script>
function set_ui(t){
var r=document.querySelector(':root');
r.style.setProperty('--cb', color_ui[t][0]);
r.style.setProperty('--cw', color_ui[t][1]);
r.style.setProperty('--cs', color_ui[t][2]);
r.style.setProperty('--cf', color_ui[t][3]);
r.style.setProperty('--cm', color_ui[t][4]);
r.style.setProperty('--cl', color_ui[t][5]);
r.style.setProperty('--wn', color_ui[t][6]);
r.style.setProperty('--ft', color_ui[t][7]);
r.style.setProperty('--tx', color_ui[t][8]);
if(story_script.blocks){block_colors();}
}
function block_colors(){
for(var i=0;i<Object.keys(story_script.blocks).length;i++){
for(var c=0;c<color_bg.length;c++){
if(setup_editor.ui<7&&story_script.blocks[Object.keys(story_script.blocks)[i]][3]==color_dg[c]){
story_script.blocks[Object.keys(story_script.blocks)[i]][3]=color_bg[c];break;
} else if(setup_editor.ui>=7&&story_script.blocks[Object.keys(story_script.blocks)[i]][3]==color_bg[c]){
story_script.blocks[Object.keys(story_script.blocks)[i]][3]=color_dg[c];break;
}
}
}
}
var countWords=0,countSymbols=0,countBytes=0,reg=/[aA-zZаА-яЯёЁ\u2019\u0027\-]+/g;
var body=document.body,html=document.documentElement;
var all_blocks=document.getElementsByClassName("story_block");
var story_lines=document.getElementById("story_lines");
var menu_add=document.getElementById('add_element');
var img_file=document.getElementById('json_file');
var color_chois=document.getElementById('paletr');
var languare="en";
const runtime="var tue_text_view,tue_text_block,tue_text_element,languare,dialog_text,dialog_timeout,tue_story,tue_bg_music,arr_dialog,timers,story_json=[],tuesday=document.getElementById(\"tuesday\"),tue_name_block=document.createElement(\"div\"),scene=0,dialog=0,dialog_speed=50,dialog_letter=0,tue_set_audio=0,tue_fullScreen=!1,controll=!0,ruby_rt=[];function cmenu(){return!1}function get_lang(){languare=void 0!=navigator.languages?navigator.languages[0].substring(0,2):navigator.languagesubstring(0,2);let e;for(let t=0;t<story_json.parameters.languares.length;t++)languare==story_json.parameters.languares[t]&&(e=!0);e||(languare=story_json.parameters.languares[0])}function load_story(e,t){if(\"data\"==e)story_json=t,base_creation(),tuesday.dispatchEvent(new Event(\"script_loaded\")),story_json.parameters.sounds&&creation_sound();else if(\"file\"==e){let a=new XMLHttpRequest;a.onreadystatechange=function(){if(4==this.readyState&&(200==this.status||0==this.status)){try{story_json=JSON.parse(this.responseText)}catch(e){this.status>0&&alert(\"Json structure error\")}base_creation(),tuesday.dispatchEvent(new Event(\"script_loaded\")),story_json.parameters.sounds&&creation_sound()}},a.open(\"GET\",t,!0),a.send(),a.onerror=function(){0==this.status&&alert(\"Error load json file Cross-Origin Resource Sharing(CORS)\")}}}function name_block_update(){story_json.parameters.name_panel.color&&(tue_name_block.style.backgroundColor=story_json.parameters.name_panel.color),story_json.parameters.name_panel.color_text?tue_name_block.style.color=story_json.parameters.name_panel.color_text:tue_name_block.style.color=story_json.parameters.text_panel.color_text,tue_name_block.style.position=\"absolute\",tue_name_block.id=\"tue_name_block\",tue_name_block.style.padding=story_json.parameters.name_panel.indent_text,tue_name_block.style.fontSize=story_json.parameters.name_panel.size_text?story_json.parameters.name_panel.size_text:story_json.parameters.font_size,tue_name_block.style.fontFamily=story_json.parameters.name_panel.font_family?story_json.parameters.name_panel.font_family:story_json.parameters.font,tue_name_block.style.display=\"flex\",tue_name_block.style.justifyContent=story_json.parameters.name_panel.align?story_json.parameters.name_panel.align[0]:\"center\",tue_name_block.style.alignItems=story_json.parameters.name_panel.align?story_json.parameters.name_panel.align[1]:\"center\",(tue_name_block.style.width=0!=story_json.parameters.name_panel.size[0])&&(tue_name_block.style.width=story_json.parameters.name_panel.size[0]),tue_name_block.style.height=story_json.parameters.name_panel.size[1],tue_name_block.style.left=\"\"==story_json.parameters.name_panel.position[0]||\"0\"==story_json.parameters.name_panel.position[0]?null:story_json.parameters.name_panel.position[0],tue_name_block.style.right=\"\"==story_json.parameters.name_panel.position[1]||\"0\"==story_json.parameters.name_panel.position[1]?null:story_json.parameters.name_panel.position[1],tue_name_block.style.top=\"\"==story_json.parameters.name_panel.position[2]||\"0\"==story_json.parameters.name_panel.position[2]?\"\"==story_json.parameters.name_panel.position[3]||\"0\"==story_json.parameters.name_panel.position[3]?\"0px\":null:story_json.parameters.name_panel.position[2],tue_name_block.style.bottom=\"\"==story_json.parameters.name_panel.position[3]||\"0\"==story_json.parameters.name_panel.position[3]?null:story_json.parameters.name_panel.position[3],tue_name_block.style.zIndex=1001}function base_creation(){if(get_lang(),localStorage.getItem(\"tue_set_audio\")&&(tue_set_audio=JSON.parse(localStorage.getItem(\"tue_set_audio\"))),story_json.parameters.style_file&&add_style(story_json.parameters.style_file),dialog_speed=story_json.parameters.text_panel.dialog_speed,story_json.parameters.title&&(story_json.parameters.title[languare]?document.title=story_json.parameters.title[languare]:document.title=story_json.parameters.title),story_json.parameters.pixelmode&&(tuesday.style.imageRendering=\"pixelated\",tuesday.style.fontSmooth=\"never\"),tuesday.style.backgroundRepeat=\"no-repeat\",tuesday.style.backgroundPosition=\"center\",tuesday.style.position=\"relative\",tuesday.style.overflow=\"hidden\",story_json.parameters.cursors&&story_json.parameters.cursors.main&&(tuesday.style.cursor=\"url(\"+art_data(story_json.parameters.cursors.main[0])+\") \"+story_json.parameters.cursors.main[1]+\" \"+story_json.parameters.cursors.main[2]+\",auto\"),tuesday.innerHTML=\"<table id='tue_text_block' align='center'><tbody><tr><td id='tue_text_element'><div id='tue_text_view'></div></td></tr></tbody></table>\",tue_text_block=document.getElementById(\"tue_text_block\"),(tue_text_element=document.getElementById(\"tue_text_element\")).style.position=\"relative\",story_json.parameters.text_panel.className&&(tue_text_block.className=story_json.parameters.text_panel.className),story_json.parameters.text_panel.style&&(tue_text_block.style=story_json.parameters.text_panel.style),tue_text_block.style.position=\"absolute\",story_json.parameters.text_panel.size&&(tue_text_block.style.width=story_json.parameters.text_panel.size[0],tue_text_block.style.height=story_json.parameters.text_panel.size[1],tue_text_element.style.height=story_json.parameters.text_panel.size[1]),story_json.parameters.text_panel.position?(story_json.parameters.text_panel.position[0]&&\"0\"!=story_json.parameters.text_panel.position[0]||story_json.parameters.text_panel.position[1]&&\"0\"!=story_json.parameters.text_panel.position[1]?(tue_text_block.style.left=\"0\"!=story_json.parameters.text_panel.position[0]?story_json.parameters.text_panel.position[0]:null,tue_text_block.style.right=\"0\"!=story_json.parameters.text_panel.position[1]?story_json.parameters.text_panel.position[1]:null,tue_text_block.style.margin=null):(tue_text_block.style.marginLeft=\"auto\",tue_text_block.style.marginRight=\"auto\",tue_text_block.style.left=0,tue_text_block.style.right=0),tue_text_block.style.top=\"0\"!=story_json.parameters.text_panel.position[2]?story_json.parameters.text_panel.position[2]:null):(tue_text_block.style.left=0,tue_text_block.style.right=0),tue_text_block.style.bottom=\"0\"!=story_json.parameters.text_panel.indent_bottom?story_json.parameters.text_panel.indent_bottom:null,tue_text_block.style.zIndex=1e3,tue_text_block.style.borderSpacing=0,(tue_text_view=document.getElementById(\"tue_text_view\")).style.boxSizing=\"border-box\",tue_text_view.style.padding=story_json.parameters.text_panel.indent_text,tue_text_view.style.fontSize=story_json.parameters.text_panel.size_text?story_json.parameters.text_panel.size_text:story_json.parameters.font_size,tue_text_view.style.fontFamily=story_json.parameters.text_panel.font_family?story_json.parameters.text_panel.font_family:story_json.parameters.font,tue_text_view.style.whiteSpace=\"pre-wrap\",tue_text_view.style.height=\"100%\",story_json.parameters.text_panel.scroll&&(tue_text_block.style.paddingTop=story_json.parameters.text_panel.indent_text,tue_text_view.style.height=tue_text_element.offsetHeight+\"px\",tue_text_view.style.position=\"relative\",tue_text_view.style.overflowY=\"hidden\"),story_json.parameters.name_panel&&(story_json.parameters.name_panel.className&&(tue_name_block.className=story_json.parameters.name_panel.className),story_json.parameters.name_panel.style&&(tue_name_block.style=story_json.parameters.name_panel.style),tue_text_element.appendChild(tue_name_block),name_block_update()),(tue_bg_music=document.createElement(\"AUDIO\")).id=\"tue_bg_music\",tuesday.appendChild(tue_bg_music),story_json.parameters.launch_story)tue_story=story_json.parameters.launch_story;else for(let e=0;e<2;e++)if(\"parameters\"!=Object.getOwnPropertyNames(story_json)[e]){story_json.parameters.launch_story=Object.getOwnPropertyNames(story_json)[1],tue_story=story_json.parameters.launch_story;break}bg_art(story_json.parameters.text_panel,\"tue_text_block\"),tuesday.dispatchEvent(new Event(\"script_executed\")),story_json.parameters.autosave&&localStorage.getItem(\"tue_auto_data\")&&(story_json.parameters.variables=JSON.parse(localStorage.getItem(\"tue_auto_data\"))),creation_buttons(),creation_scene()}function bg_art(e,t,a){if((t=document.getElementById(t)).style.backgroundRepeat=\"no-repeat\",t.style.backgroundPosition=e.art_align?e.art_align[0]+\" \"+e.art_align[1]:\"center\",a=a||e.art){let r=art_data(a);r.length>0&&(t.style.backgroundImage=\"url('\"+r+\"')\")}e.art_size&&(\"patch\"==e.art_size&&(t.style.backgroundImage=\"none\"),\"object\"==typeof e.art_size?t.style.backgroundSize=e.art_size[0]+\" \"+e.art_size[1]:\"patch\"==e.art_size?(t.style.backgroundImage=\"none\",t.style.backgroundSize=\"none\",t.style.backgroundClip=\"padding-box\",t.style.borderStyle=\"solid\",t.style.borderWidth=e.patch[0]+\"px \"+e.patch[1]+\"px \"+e.patch[2]+\"px \"+e.patch[3]+\"px\",t.style.borderImage=\"url('\"+art_data(e.art)+\"') \"+e.patch[0]+\" \"+e.patch[1]+\" \"+e.patch[2]+\" \"+e.patch[3]+\" stretch stretch\"):t.style.backgroundSize=e.art_size)}function creation_buttons(){for(i=0;i<story_json.parameters.buttons.length;i++){let e=document.createElement(\"div\"),t=\"\";story_json.parameters.buttons[i].sound&&(t+=story_json.parameters.buttons[i].sound?get_sound(story_json.parameters.buttons[i].sound):(story_json.parameters.buttons[i].sound_stop?\";\"+get_stop_sound(story_json.parameters.buttons[i].sound_stop):\"\")+\";\"),story_json.parameters.buttons[i].js&&(t+=story_json.parameters.buttons[i].js),e.setAttribute(\"onclick\",t+\";\"+(\"tue_audio\"==story_json.parameters.buttons[i].name?\"set_audio(this,story_json.parameters.buttons[\"+i+\"]);\":\"\")+(\"tue_fullScreen\"==story_json.parameters.buttons[i].name?\"full_screen(this,story_json.parameters.buttons[\"+i+\"]);\":\"\")+(\"tue_speech\"==story_json.parameters.buttons[i].name?\"play_synth(art_data(story_json.parameters.buttons[\"+i+\"].text1),art_data(story_json.parameters.buttons[\"+i+\"].text2));\":\"\")+(story_json[story_json.parameters.buttons[i].name]?\"go_to('\"+story_json.parameters.buttons[i].name+\"');\":\"\")),story_json.parameters.buttons[i].className&&(e.className=story_json.parameters.buttons[i].className),story_json.parameters.buttons[i].style&&(e.style=story_json.parameters.buttons[i].style),story_json.parameters.buttons[i].text&&(\"object\"!=typeof story_json.parameters.buttons[i].text||story_json.parameters.buttons[i].text[languare]&&\"object\"!=typeof story_json.parameters.buttons[i].text[languare])&&(e.innerHTML=values_button(art_data(story_json.parameters.buttons[i].text)),e.style.padding=story_json.parameters.buttons[i].indent_text,e.style.display=\"flex\",e.style.whiteSpace=\"pre-wrap\",e.style.justifyContent=story_json.parameters.buttons[i].align?story_json.parameters.buttons[i].align[0]:\"center\",e.style.alignItems=story_json.parameters.buttons[i].align?story_json.parameters.buttons[i].align[1]:\"center\",e.style.textAlign=e.style.justifyContent,e.style.color=story_json.parameters.buttons[i].color_text,e.style.fontSize=story_json.parameters.buttons[i].size_text?story_json.parameters.buttons[i].size_text:story_json.parameters.font_size,e.style.fontFamily=story_json.parameters.buttons[i].font_family?story_json.parameters.buttons[i].font_family:story_json.parameters.font),e.style.zIndex=2e3+i,\"none\"==story_json.parameters.buttons[i].name||story_json[story_json.parameters.buttons[i].name]||(e.id=story_json.parameters.buttons[i].name),e.classList.add(\"tue_controll\"),e.style.position=\"absolute\",e.style.transformOrigin=\"top left\",\"0\"!=story_json.parameters.buttons[i].size[0]&&(e.style.width=story_json.parameters.buttons[i].size[0]),\"0\"!=story_json.parameters.buttons[i].size[1]&&(e.style.height=story_json.parameters.buttons[i].size[1]),e.style.backgroundColor=story_json.parameters.buttons[i].color,e.style.backgroundRepeat=\"no-repeat\",story_json.parameters.cursors&&story_json.parameters.cursors.button&&(e.style.cursor=\"url(\"+art_data(story_json.parameters.cursors.button[0])+\") \"+story_json.parameters.cursors.button[1]+\" \"+story_json.parameters.cursors.button[2]+\",auto\"),e.style.backgroundPosition=story_json.parameters.buttons[i].art_align?story_json.parameters.buttons[i].art_align[0]+\" \"+story_json.parameters.buttons[i].art_align[1]:\"center\",story_json.parameters.buttons[i].art&&(e.style.backgroundImage=\"url('\"+art_data(story_json.parameters.buttons[i].art)+\"')\"),story_json.parameters.buttons[i].art_size&&(\"patch\"==story_json.parameters.buttons[i].art_size&&(e.style.backgroundImage=\"none\"),\"object\"==typeof story_json.parameters.buttons[i].art_size?e.style.backgroundSize=story_json.parameters.buttons[i].art_size[0]+\" \"+story_json.parameters.buttons[i].art_size[1]:\"patch\"==story_json.parameters.buttons[i].art_size?(e.style.backgroundImage=\"none\",e.style.backgroundSize=\"none\",e.style.backgroundClip=\"padding-box\",e.style.borderStyle=\"solid\",e.style.borderWidth=story_json.parameters.buttons[i].patch[0]+\"px \"+story_json.parameters.buttons[i].patch[1]+\"px \"+story_json.parameters.buttons[i].patch[2]+\"px \"+story_json.parameters.buttons[i].patch[3]+\"px\",e.style.borderImage=\"url('\"+art_data(story_json.parameters.buttons[i].art)+\"') \"+story_json.parameters.buttons[i].patch[0]+\" \"+story_json.parameters.buttons[i].patch[1]+\" \"+story_json.parameters.buttons[i].patch[2]+\" \"+story_json.parameters.buttons[i].patch[3]+\" stretch stretch\"):e.style.backgroundSize=story_json.parameters.buttons[i].art_size),e.style.transform=(story_json.parameters.buttons[i].hotspot&&0!=story_json.parameters.buttons[i].hotspot[0]&&0!=story_json.parameters.buttons[i].hotspot[1]?\" translate(\"+story_json.parameters.buttons[i].hotspot[0]+\",\"+story_json.parameters.buttons[i].hotspot[1]+\")\":\"\")+(story_json.parameters.buttons[i].angle?\"rotate(\"+story_json.parameters.buttons[i].angle+\"deg)\":\"\"),0!=story_json.parameters.buttons[i].position[0]&&(e.style.left=story_json.parameters.buttons[i].position[0]),0!=story_json.parameters.buttons[i].position[1]&&(e.style.right=story_json.parameters.buttons[i].position[1]),0!=story_json.parameters.buttons[i].position[2]&&(e.style.top=story_json.parameters.buttons[i].position[2]),0!=story_json.parameters.buttons[i].position[3]&&(e.style.bottom=story_json.parameters.buttons[i].position[3]),tuesday.appendChild(e)}if(document.getElementById(\"tue_next\")&&document.getElementById(\"tue_next\").addEventListener(\"click\",function(){go_story()}),document.getElementById(\"tue_back\")&&document.getElementById(\"tue_back\").addEventListener(\"click\",function(){back_story()}),document.getElementById(\"tue_home\")&&document.getElementById(\"tue_home\").addEventListener(\"click\",function(){go_to(story_json.parameters.launch_story)}),document.getElementById(\"tue_save\")&&document.getElementById(\"tue_save\").addEventListener(\"click\",function(){save_stag(\"bookmark\")}),document.getElementById(\"tue_load\")&&document.getElementById(\"tue_load\").addEventListener(\"click\",function(){load_stag(\"bookmark\")}),document.getElementById(\"tue_fastRewind\")&&document.getElementById(\"tue_fastRewind\").addEventListener(\"click\",function(){fast_rewind()}),document.getElementById(\"tue_load_autosave\")&&document.getElementById(\"tue_load_autosave\").addEventListener(\"click\",function(){load_stag(\"auto\")}),story_json.parameters.languares.length>1)for(let a=0;a<story_json.parameters.languares.length;a++)document.getElementById(\"tue_\"+story_json.parameters.languares[a])&&document.getElementById(\"tue_\"+story_json.parameters.languares[a]).setAttribute(\"onclick\",\"languare ='\"+story_json.parameters.languares[a]+\"'\")}function creation_scene(){if(arr_dialog=story_json[tue_story][scene],del_element(\"tue_html_scene\"),arr_dialog.random_choice){let e=arr_dialog.random_choice[Math.floor(Math.random()*arr_dialog.random_choice.length)][1];\"tue_go\"!=e?go_to(e):(scene++,dialog=0,creation_scene())}else if(arr_dialog.legacy_choice){for(let t=0;t<arr_dialog.legacy_choice.length;t++){let a=arr_dialog.legacy_choice[t][0],r=arr_dialog.legacy_choice[t][1],s=arr_dialog.legacy_choice[t][2],l=arr_dialog.legacy_choice[t][3];if(\">\"==r&&story_json.parameters.variables[a]>s){\"tue_go\"!=l?go_to(l):n();break}if(\"<\"==r&&story_json.parameters.variables[a]<s){\"tue_go\"!=l?go_to(l):n();break}if(\"=\"==r&&story_json.parameters.variables[a]==s){\"tue_go\"!=l?go_to(l):n();break}else if(arr_dialog.legacy_choice[t].go_to){arr_dialog.legacy_choice[t].go_to&&\"tue_go\"!=arr_dialog.legacy_choice[t].go_to?go_to(arr_dialog.legacy_choice[t].go_to):n();break}else if(t==arr_dialog.legacy_choice.length-1){n();break}}function n(){scene++,dialog=0,creation_scene()}}else{if(tuesday.style.backgroundSize=arr_dialog.background_size?arr_dialog.background_size:\"cover\",arr_dialog.background_class?tuesday.className=arr_dialog.background_class:tuesday.className=\"\",arr_dialog.background_color&&(tuesday.style.backgroundColor=arr_dialog.background_color),tuesday.style.backgroundPosition=arr_dialog.background_align?arr_dialog.background_align:\"center\",arr_dialog.background_image?tuesday.style.backgroundImage=\"url('\"+art_data(arr_dialog.background_image)+\"')\":tuesday.style.backgroundImage=null,document.getElementById(\"tue_home\")&&(tue_story==story_json.parameters.launch_story?document.getElementById(\"tue_home\").style.visibility=\"hidden\":document.getElementById(\"tue_home\").style.visibility=\"visible\"),arr_dialog.html){let u=document.createElement(\"div\");u.className=\"tue_html_scene\",arr_dialog.html[languare]?(u.innerHTML=arr_dialog.html[languare],tuesday.appendChild(u)):(u.innerHTML=arr_dialog.html,tuesday.appendChild(u))}arr_dialog.background_music&&(tue_bg_music.paused||!tue_bg_music.src.includes(encodeURI(arr_dialog.background_music)))?search_music():arr_dialog.background_music&&\"\"!=arr_dialog.background_music||tue_bg_music.pause(),arr_dialog.dialogs&&arr_dialog.dialogs.length>0?creation_dialog():(del_element(\"tue_art\"),del_element(\"tue_choice\"),del_element(\"tue_html_dialog\"),tue_text_block.style.visibility=\"hidden\",tue_name_block.style.visibility=\"hidden\"),tuesday.dispatchEvent(new Event(Object.keys(arr_dialog)[0]))}}function creation_dialog(next_scene){if(\"hidden\"!=(arr_dialog=story_json[tue_story][scene].dialogs[dialog]).controll&&\"hidden_here\"!=arr_dialog.controll&&(tue_story!=story_json.parameters.launch_story||arr_dialog||0!=dialog||0!=scene)){if(\"visible\"==arr_dialog.controll||!arr_dialog.controll||!0==controll){controll=!0;let buttons=document.getElementById(\"tuesday\").getElementsByClassName(\"tue_controll\");for(let i=0;i<buttons.length;i++)buttons[i].style.visibility=\"visible\"}}else{controll=\"hidden_here\"==arr_dialog.controll;let buttons=document.getElementById(\"tuesday\").getElementsByClassName(\"tue_controll\");for(let i=0;i<buttons.length;i++)buttons[i].style.visibility=\"hidden\"}if(document.getElementById(\"tue_next\")&&(scene!=story_json[tue_story].length-1||dialog!=story_json[tue_story][scene].dialogs.length-1||arr_dialog.go_to?controll&&(document.getElementById(\"tue_next\").style.visibility=\"visible\"):document.getElementById(\"tue_next\").style.visibility=\"hidden\"),document.getElementById(\"tue_back\")&&(0!=scene||0!=dialog||arr_dialog.back_to?controll&&(document.getElementById(\"tue_back\").style.visibility=\"visible\"):document.getElementById(\"tue_back\").style.visibility=\"hidden\"),arr_dialog.text&&\"\"!=arr_dialog.text&&\"\"!=arr_dialog.text[languare]?(tue_text_view.innerHTML=\"\",tue_text_block.style.visibility=\"visible\",values_in_text(!1),clearTimeout(dialog_timeout),anim_text(),arr_dialog.text.className&&(tue_text_block.className=arr_dialog.text.className)):arr_dialog.text_add&&\"\"!=arr_dialog.text_add&&\"\"!=arr_dialog.text_add[languare]?(tue_text_block.style.visibility=\"visible\",values_in_text(!0),clearTimeout(dialog_timeout),anim_text()):tue_text_block.style.visibility=\"hidden\",arr_dialog.color?tue_text_block.style.backgroundColor=arr_dialog.color:story_json.parameters.text_panel.color&&(tue_text_block.style.backgroundColor=story_json.parameters.text_panel.color),arr_dialog.color_text?tue_text_view.style.color=arr_dialog.color_text:story_json.parameters.text_panel.color_text&&(tue_text_view.style.color=story_json.parameters.text_panel.color_text),arr_dialog.name?(bg_art(story_json.parameters.name_panel,\"tue_name_block\",!!story_json.parameters.characters[arr_dialog.name]&&!!story_json.parameters.characters[arr_dialog.name].art&&story_json.parameters.characters[arr_dialog.name].art),arr_dialog.name[languare]?(tue_name_block.innerHTML=values_button(arr_dialog.name[languare]),tue_name_block.style.backgroundColor=arr_dialog.name.color,tue_name_block.style.color=arr_dialog.name.color_text,arr_dialog.name.className&&(tue_name_block.className=arr_dialog.name.className)):story_json.parameters.characters?story_json.parameters.characters[arr_dialog.name]?(story_json.parameters.characters[arr_dialog.name].style&&(tue_name_block.style=story_json.parameters.characters[arr_dialog.name].style,name_block_update()),tue_name_block.innerHTML=values_button(story_json.parameters.characters[arr_dialog.name][languare]),tue_name_block.style.backgroundColor=story_json.parameters.characters[arr_dialog.name].color,tue_name_block.style.color=story_json.parameters.characters[arr_dialog.name].color_text,story_json.parameters.characters[arr_dialog.name].className&&(tue_name_block.className=story_json.parameters.characters[arr_dialog.name].className)):(tue_name_block.innerHTML=arr_dialog.name,tue_name_block.style.backgroundColor=arr_dialog.name.color,tue_name_block.style.color=arr_dialog.name.color_text,arr_dialog.name.className&&(tue_name_block.className=arr_dialog.name.className)):tue_name_block.innerHTML=arr_dialog.name,tue_name_block.style.visibility=\"visible\"):tue_name_block.style.visibility=\"hidden\",arr_dialog.video){let video=document.getElementById(\"tue_video\");video||((video=document.createElement(\"video\")).id=\"tue_video\",video.classList.add(\"tue_v\")),arr_dialog.video.style?video.style=arr_dialog.video.style:video.style=\"\",arr_dialog.video.className&&(video.style=arr_dialog.video.className+\" tue_v\"),video.style.position=\"absolute\",video.setAttribute(\"onloadedmetadata\",\"\"),video.src=art_data(arr_dialog.video.url),video.style.left=\"50%\",video.style.top=\"50%\",video.style.transform=\"translate(-50%,-50%)\",arr_dialog.video.fit&&(\"contain\"==arr_dialog.video.fit?(video.style.width=\"100%\",video.style.height=\"100%\"):\"position\"==arr_dialog.video.fit&&(video.style.transformOrigin=\"top left\",arr_dialog.video.angle?video.style.transform=\"rotate(\"+arr_dialog.video.angle+\"deg)\":video.style.transform=\"none\",video.style.width=arr_dialog.video.size[0],video.style.height=arr_dialog.video.size[1],0!=arr_dialog.video.position[0]&&(video.style.right=null,video.style.left=arr_dialog.video.position[0]),0!=arr_dialog.video.position[1]&&(video.style.left=null,video.style.right=arr_dialog.video.position[1]),0!=arr_dialog.video.position[2]&&(video.style.bottom=null,video.style.top=arr_dialog.video.position[2]),0!=arr_dialog.video.position[3]&&(video.style.top=null,video.style.bottom=arr_dialog.video.position[3]))),arr_dialog.video.loop?video.loop=arr_dialog.video.loop:video.loop=!1,arr_dialog.video.sound&&arr_dialog.video.sound>0?(video.muted=!1,video.volume=arr_dialog.video.sound/100):video.muted=!0,arr_dialog.video.time_start?video.onloadedmetadata=function(){this.currentTime=arr_dialog.video.time_start,arr_dialog.video.fit&&\"cover\"!=arr_dialog.video.fit||video_size(),arr_dialog.video.stop&&this.pause()}:\"cover\"!=arr_dialog.video.fit&&arr_dialog.video.fit||(video.onloadedmetadata=function(){video_size()}),arr_dialog.video.time_end?arr_dialog.video.loop?video.ontimeupdate=function(){video.currentTime>=arr_dialog.video.time_end&&(video.currentTime=arr_dialog.video.time_start?arr_dialog.video.time_start:0)}:arr_dialog.video.go_to?video.ontimeupdate=function(){video.currentTime>=arr_dialog.video.time_end&&(video.pause(),\"tue_go\"==arr_dialog.video.go_to?go_story(!0):go_to(arr_dialog.video.go_to))}:video.ontimeupdate=function(){video.currentTime>=arr_dialog.video.time_end&&video.pause()}:video.onended=function(){\"tue_go\"==arr_dialog.video.go_to?go_story(!0):go_to(arr_dialog.video.go_to)},arr_dialog.video.stop&&!0==arr_dialog.video.stop||(video.autoplay=!0),tuesday.appendChild(video)}else del_element(\"tue_v\");if(arr_dialog.art){let old=document.getElementById(\"tuesday\").getElementsByClassName(\"tue_art\"),src=!1;if(old.length>0){for(d=0;d<old.length;d++)old[d].classList.add(\"img_del\");for(i=0;i<arr_dialog.art.length;i++){for(o=0,src=!1;o<old.length;o++)if(arr_dialog.art[i].url==old[o].getAttribute(\"volume\")||arr_dialog.art[i].url[languare]==old[o].getAttribute(\"volume\")){arr_dialog.art[i].style&&arr_dialog.art[i].style.length>0&&(old[o].style=\"user-select:text;\"+arr_dialog.art[i].style,old[o].style.position=\"absolute\",old[o].style.transformOrigin=\"top left\"),arr_dialog.art[i].move&&0!=arr_dialog.art[i].move?(old[o].style.transitionDuration=arr_dialog.art[i].move+\"s\",arr_dialog.art[i].speed&&\"\"!=arr_dialog.art[i].speed?old[o].style.transitionTimingFunction=arr_dialog.art[i].speed:old[o].style.transitionTimingFunction=null):(old[o].style.transitionDuration=null,old[o].style.transitionTimingFunction=null),arr_dialog.art[i].opacity?old[o].style.opacity=arr_dialog.art[i].opacity:old[o].style.opacity=null,arr_dialog.art[i].fit&&(old[o].style.objectFit=arr_dialog.art[i].fit),arr_dialog.art[i].size&&(old[o].style.width=arr_dialog.art[i].size[0],old[o].style.height=arr_dialog.art[i].size[1]),arr_dialog.art[i].align?old[o].style.objectPosition=arr_dialog.art[i].align[0]+\" \"+arr_dialog.art[i].align[1]:old[o].style.objectPosition=\"center\",old[o].style.transform=(arr_dialog.art[i].hotspot&&0!=arr_dialog.art[i].hotspot[0]&&0!=arr_dialog.art[i].hotspot[1]?\" translate(\"+arr_dialog.art[i].hotspot[0]+\",\"+arr_dialog.art[i].hotspot[1]+\")\":\"\")+(arr_dialog.art[i].angle?\"rotate(\"+arr_dialog.art[i].angle+\"deg)\":\"\"),0!=arr_dialog.art[i].position[0]&&(old[o].style.left=arr_dialog.art[i].position[0]),0!=arr_dialog.art[i].position[1]&&(old[o].style.left=\"calc(100% - \"+arr_dialog.art[i].position[1]+\" - \"+(\"auto\"==arr_dialog.art[i].size[0]?arr_dialog.art[i].size[1]:arr_dialog.art[i].size[0])+\")\"),0!=arr_dialog.art[i].position[2]&&(old[o].style.top=arr_dialog.art[i].position[2]),0!=arr_dialog.art[i].position[3]&&(old[o].style.top=\"calc(100% - \"+arr_dialog.art[i].position[3]+\" - \"+(\"auto\"==arr_dialog.art[i].size[1]?arr_dialog.art[i].size[0]:arr_dialog.art[i].size[1])+\")\"),src=!0,arr_dialog.art[i].show_if&&show_if(arr_dialog.art[i].show_if,old[o]),old[o].style.zIndex=i,old[o].classList.remove(\"img_del\");break}!1==src&&creation_art(i)}del_element(\"img_del\")}else for(i=0;i<arr_dialog.art.length;i++)creation_art(i);function creation_art(e){let t=document.createElement(\"img\"),a=art_data(arr_dialog.art[e].url);arr_dialog.art[e].className&&(t.classList=arr_dialog.art[e].className),t.src=\"string\"==typeof a&&a.length>0?a:\"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>\",t.setAttribute(\"volume\",arr_dialog.art[e].url[languare]?arr_dialog.art[e].url[languare]:arr_dialog.art[e].url),t.classList.add(\"tue_art\"),t.style=\"user-select:text;\"+(arr_dialog.art[e].style?arr_dialog.art[e].style:\"\"),t.style.position=\"absolute\",t.style.transformOrigin=\"top left\",arr_dialog.art[e].fit&&(t.style.objectFit=arr_dialog.art[e].fit),arr_dialog.art[e].opacity?t.style.opacity=arr_dialog.art[e].opacity:t.style.opacity=null,arr_dialog.art[e].size&&(t.style.width=arr_dialog.art[e].size[0],t.style.height=arr_dialog.art[e].size[1]),t.style.transform=(arr_dialog.art[e].hotspot&&0!=arr_dialog.art[e].hotspot[0]&&0!=arr_dialog.art[e].hotspot[1]?\" translate(\"+arr_dialog.art[e].hotspot[0]+\",\"+arr_dialog.art[e].hotspot[1]+\")\":\"\")+(arr_dialog.art[e].angle?\"rotate(\"+arr_dialog.art[e].angle+\"deg)\":\"\"),arr_dialog.art[e].align&&(t.style.objectPosition=arr_dialog.art[e].align[0]+\" \"+arr_dialog.art[e].align[1]),0!=arr_dialog.art[e].position[0]&&(t.style.left=arr_dialog.art[e].position[0]),0!=arr_dialog.art[e].position[1]&&(t.style.left=\"calc(100% - \"+arr_dialog.art[e].position[1]+\" - \"+arr_dialog.art[e].size[0]+\")\"),0!=arr_dialog.art[e].position[2]&&(t.style.top=arr_dialog.art[e].position[2]),0!=arr_dialog.art[e].position[3]&&(t.style.top=\"calc(100% - \"+arr_dialog.art[e].position[3]+\" - \"+arr_dialog.art[e].size[1]+\")\"),t.setAttribute(\"draggable\",\"false\"),t.style.zIndex=e,arr_dialog.art[e].show_if&&show_if(arr_dialog.art[e].show_if,t),tuesday.appendChild(t)}}else del_element(\"tue_art\");let button_ui=document.getElementsByClassName(\"tue_controll\");for(i=0;i<button_ui.length;i++)\"tue_audio\"==story_json.parameters.buttons[i].name?show_audio(button_ui[i],story_json.parameters.buttons[i]):\"tue_fullScreen\"==story_json.parameters.buttons[i].name?show_fullscreen(button_ui[i],story_json.parameters.buttons[i]):story_json.parameters.buttons[i].text&&art_data(story_json.parameters.buttons[i].text).length>0&&(button_ui[i].innerHTML=values_button(art_data(story_json.parameters.buttons[i].text)));if(arr_dialog.choice){let interfaces=!1;for(i=0;i<arr_dialog.choice.length;i++){let choice=document.createElement(\"div\");arr_dialog.choice[i].className&&(choice.className=arr_dialog.choice[i].className),arr_dialog.choice[i].style&&(choice.style=arr_dialog.choice[i].style),choice.classList.add(\"tue_choice\"),choice.style.position=\"absolute\",choice.style.transformOrigin=\"top left\",choice.style.backgroundColor=arr_dialog.choice[i].color,choice.style.whiteSpace=\"pre-wrap\",choice.style.backgroundRepeat=\"no-repeat\",choice.style.backgroundPosition=arr_dialog.choice[i].art_align?arr_dialog.choice[i].art_align[0]+\" \"+arr_dialog.choice[i].art_align[1]:\"center\",story_json.parameters.cursors&&story_json.parameters.cursors.choice&&(choice.style.cursor=\"url(\"+art_data(story_json.parameters.cursors.choice[0])+\") \"+story_json.parameters.cursors.choice[1]+\" \"+story_json.parameters.cursors.choice[2]+\",auto\"),arr_dialog.choice[i].art&&art_data(arr_dialog.choice[i].art).length>0&&(choice.style.backgroundImage=\"url('\"+art_data(arr_dialog.choice[i].art)+\"')\"),arr_dialog.choice[i].size&&(0!=arr_dialog.choice[i].size[0]&&(choice.style.width=arr_dialog.choice[i].size[0]),0!=arr_dialog.choice[i].size[1]&&(choice.style.height=arr_dialog.choice[i].size[1])),arr_dialog.choice[i].art_size&&(\"patch\"==arr_dialog.choice[i].art_size&&(choice.style.backgroundImage=\"none\"),\"object\"==typeof arr_dialog.choice[i].art_size?choice.style.backgroundSize=arr_dialog.choice[i].art_size[0]+\" \"+arr_dialog.choice[i].art_size[1]:\"patch\"==arr_dialog.choice[i].art_size?(choice.style.backgroundImage=\"none\",choice.style.backgroundSize=\"none\",choice.style.backgroundClip=\"padding-box\",choice.style.borderStyle=\"solid\",choice.style.borderWidth=arr_dialog.choice[i].patch[0]+\"px \"+arr_dialog.choice[i].patch[1]+\"px \"+arr_dialog.choice[i].patch[2]+\"px \"+arr_dialog.choice[i].patch[3]+\"px\",choice.style.borderImage=\"url('\"+art_data(arr_dialog.choice[i].art)+\"') \"+arr_dialog.choice[i].patch[0]+\" \"+arr_dialog.choice[i].patch[1]+\" \"+arr_dialog.choice[i].patch[2]+\" \"+arr_dialog.choice[i].patch[3]+\" stretch stretch\"):choice.style.backgroundSize=arr_dialog.choice[i].art_size),choice.style.transform=(arr_dialog.choice[i].hotspot&&0!=arr_dialog.choice[i].hotspot[0]&&0!=arr_dialog.choice[i].hotspot[1]?\" translate(\"+arr_dialog.choice[i].hotspot[0]+\",\"+arr_dialog.choice[i].hotspot[1]+\")\":\"\")+(arr_dialog.choice[i].angle?\"rotate(\"+arr_dialog.choice[i].angle+\"deg)\":\"\"),0!=arr_dialog.choice[i].position[0]&&(choice.style.left=arr_dialog.choice[i].position[0]),0!=arr_dialog.choice[i].position[1]&&(choice.style.right=arr_dialog.choice[i].position[1]),0!=arr_dialog.choice[i].position[2]&&(choice.style.top=arr_dialog.choice[i].position[2]),0!=arr_dialog.choice[i].position[3]&&(choice.style.bottom=arr_dialog.choice[i].position[3]),choice.style.color=arr_dialog.choice[i].color_text,choice.style.padding=arr_dialog.choice[i].indent_text,choice.style.fontSize=arr_dialog.choice[i].size_text?arr_dialog.choice[i].size_text:story_json.parameters.font_size,choice.style.fontFamily=arr_dialog.choice[i].font_family?arr_dialog.choice[i].font_family:story_json.parameters.font,choice.style.display=\"flex\",choice.style.justifyContent=arr_dialog.choice[i].align?arr_dialog.choice[i].align[0]:\"center\",choice.style.alignItems=arr_dialog.choice[i].align?arr_dialog.choice[i].align[1]:\"center\",choice.style.textAlign=choice.style.justifyContent,choice.style.zIndex=1001+i,arr_dialog.choice[i].show_if&&show_if(arr_dialog.choice[i].show_if,choice),arr_dialog.choice[i].text&&(\"object\"!=typeof arr_dialog.choice[i].text||arr_dialog.choice[i].text[languare]&&\"object\"!=typeof arr_dialog.choice[i].text[languare])&&(choice.innerHTML=values_button(art_data(arr_dialog.choice[i].text))),\"tue_audio\"==arr_dialog.choice[i].go_to?show_audio(choice,arr_dialog.choice[i]):\"tue_fullScreen\"==arr_dialog.choice[i].go_to&&show_fullscreen(choice,arr_dialog.choice[i]);let v=\"\";if(arr_dialog.choice[i].variables)for(let g=0;g<arr_dialog.choice[i].variables.length;g++)\"add\"==arr_dialog.choice[i].variables[g][1]?v+=\"story_json.parameters.variables.\"+arr_dialog.choice[i].variables[g][0]+\"+=\"+(void 0!==story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]?\"number\"==typeof story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]?story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]:\"'\"+story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]+\"'\":\"number\"==typeof arr_dialog.choice[i].variables[g][2]?arr_dialog.choice[i].variables[g][2]:\"'\"+arr_dialog.choice[i].variables[g][2]+\"'\")+\";\":\"set\"==arr_dialog.choice[i].variables[g][1]&&(v+=\"story_json.parameters.variables.\"+arr_dialog.choice[i].variables[g][0]+\"=\"+(void 0!==story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]?\"number\"==typeof story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]?story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]:\"'\"+story_json.parameters.variables[arr_dialog.choice[i].variables[g][2]]+\"'\":\"number\"==typeof arr_dialog.choice[i].variables[g][2]?arr_dialog.choice[i].variables[g][2]:\"'\"+arr_dialog.choice[i].variables[g][2]+\"'\")+\";\");if(arr_dialog.choice[i].js&&(v+=arr_dialog.choice[i].js+\";\"),arr_dialog.choice[i].go_to){let g=arr_dialog.choice[i].go_to;if(interfaces||(interfaces=!arr_dialog.choice[i].url&&\"tue_no\"!=g),story_json.parameters.languares.length>1)for(let l=0;l<story_json.parameters.languares.length;l++)g==\"tue_\"+story_json.parameters.languares[l]&&(g=8,choice.setAttribute(\"onclick\",v+\"languare='\"+story_json.parameters.languares[l]+\"';if(story_json.parameters.title&&story_json.parameters.title[languare]){document.title=story_json.parameters.title[languare];};del_element('tue_choice');go_story(true);\"+add_sound()));\"tue_go\"==g||\"tue_update_scene\"==g?arr_dialog.choice[i].text_from?choice.setAttribute(\"onclick\",v+\"dialog=\"+(dialog+1)+\";creation_dialog(true);\"+add_sound()+(arr_dialog.choice[i].delete?\"this.remove();\":\"\")):choice.setAttribute(\"onclick\",\"del_element('tue_choice'); \"+v+(\"tue_go\"==g?\"go_story(true);\":\"del_element('tue_art');del_element('tue_choice');del_element('tue_html_dialog');creation_dialog();\")+add_sound()):\"tue_load_autosave\"==g?(choice.setAttribute(\"onclick\",v+\"load_stag('auto');\"+add_sound()),story_json.parameters.autosave&&!localStorage.getItem(\"tue_auto_data\")&&(choice.style.visibility=\"hidden\")):\"load\"==g||\"tue_load\"==g?choice.setAttribute(\"onclick\",v+\"load_stag('bookmark');\"+add_sound()):\"tue_save\"==g?choice.setAttribute(\"onclick\",v+\"save_stag('bookmark');\"+add_sound()):\"tue_no\"==g||\"\"==g?choice.setAttribute(\"onclick\",v+add_sound()):\"tue_fullScreen\"==g?choice.setAttribute(\"onclick\",v+\"full_screen(this, story_json['\"+tue_story+\"'][\"+scene+\"].dialogs[\"+dialog+\"].choice[\"+i+\"]);\"+add_sound()):\"tue_fastRewind\"==g?choice.setAttribute(\"onclick\",v+\"fast_rewind();\"+add_sound()):\"tue_audio\"==g?choice.setAttribute(\"onclick\",v+\"set_audio(this, story_json['\"+tue_story+\"'][\"+scene+\"].dialogs[\"+dialog+\"].choice[\"+i+\"]);\"+add_sound()):\"tue_speech\"==g?choice.setAttribute(\"onclick\",v+\"play_synth(art_data(story_json['\"+tue_story+\"'][\"+scene+\"].dialogs[\"+dialog+\"].choice[\"+i+\"].text1),art_data(story_json['\"+tue_story+\"'][\"+scene+\"].dialogs[\"+dialog+\"].choice[\"+i+\"].text2));\"+add_sound()):\"tue_home\"==g?choice.setAttribute(\"onclick\",v+'go_to(\"'+story_json.parameters.launch_story+'\");'+add_sound()):\"tue_back\"==g?choice.setAttribute(\"onclick\",v+\"back_story();\"+add_sound()):\"tue_next\"==g?choice.setAttribute(\"onclick\",v+\"go_story();\"+add_sound()):8!=g&&arr_dialog.choice[i].text_from?choice.setAttribute(\"onclick\",v+\"tue_story='\"+arr_dialog.choice[i].go_to+\"';scene=0;dialog=0;creation_dialog(true);\"+add_sound()+(arr_dialog.choice[i].delete?\"del_element('tue_choice');\":\"\")):8!=g&&arr_dialog.choice[i].url?choice.setAttribute(\"onclick\",v+\"window.open('\"+(arr_dialog.choice[i].go_to[languare]?arr_dialog.choice[i].go_to[languare]:arr_dialog.choice[i].go_to)+\"','_\"+arr_dialog.choice[i].url+\"');\"+add_sound()+(arr_dialog.choice[i].delete?\"del_element('tue_choice');\":\"\")):8!=g&&choice.setAttribute(\"onclick\",v+\"go_to('\"+g+\"');\"+add_sound())}else choice.setAttribute(\"onclick\",v+\"go_story(true);del_element('tue_choice');\"+add_sound());function add_sound(){let e=\"\";return arr_dialog.choice[i].sound&&(e=get_sound(arr_dialog.choice[i].sound)),arr_dialog.choice[i].sound_stop&&(e+=get_stop_sound(arr_dialog.choice[i].sound_stop)),e}tuesday.appendChild(choice)}interfaces&&document.getElementById(\"tue_next\")&&(tue_next.style.visibility=\"hidden\")}if((!next_scene||arr_dialog.html)&&del_element(\"tue_html_dialog\"),arr_dialog.html){if(arr_dialog.html[languare]){let html=document.createElement(\"div\");html.className=\"tue_html_dialog\",html.innerHTML=arr_dialog.html[languare],tuesday.appendChild(html)}else{let html=document.createElement(\"div\");html.className=\"tue_html_dialog\",html.innerHTML=arr_dialog.html,tuesday.appendChild(html)}}if(arr_dialog.variables)for(let i=0;i<arr_dialog.variables.length;i++){let choice_n=arr_dialog.variables[i][0];\"add\"==arr_dialog.variables[i][1]?(story_json.parameters.variables[choice_n]+=arr_dialog.variables[i][2],tuesday.dispatchEvent(new Event(arr_dialog.variables[i][0]+\"_add\"))):\"set\"==arr_dialog.variables[i][1]&&(story_json.parameters.variables[choice_n]=arr_dialog.variables[i][2]),tuesday.dispatchEvent(new Event(arr_dialog.variables[i][0]+\"_set\"))}if(arr_dialog.event&&tuesday.dispatchEvent(new Event(arr_dialog.event)),arr_dialog.sound_stop){let s=arr_dialog.sound_stop[languare]?arr_dialog.sound_stop[languare]:arr_dialog.sound_stop;if(\"object\"==typeof s)for(let i=0;i<s.length;i++)sound_stop(s[i]);else sound_stop(s[languare]?s[languare]:s)}if(arr_dialog.sound&&tue_set_audio<2){let s=arr_dialog.sound[languare]?arr_dialog.sound[languare]:arr_dialog.sound;if(\"object\"==typeof s)for(let i=0;i<s.length;i++)sound_play(s[i]);else sound_play(s[languare]?s[languare]:s)}arr_dialog.js&&eval(arr_dialog.js),clearTimeout(timers),arr_dialog.timer&&!timers&&(timers=setTimeout(function(){\"tue_go\"==arr_dialog.timer[1]?go_story(!0):\"tue_update_scene\"==arr_dialog.timer[1]?(del_element(\"tue_art\"),del_element(\"tue_choice\"),del_element(\"tue_html_dialog\"),creation_dialog()):go_to(arr_dialog.timer[1])},arr_dialog.timer[0])),timers=!1,tuesday.dispatchEvent(new Event(\"creation_dialog\"))}function values_in_text(e){arr_dialog=story_json[tue_story][scene].dialogs[dialog];var t=\"\";e?(dialog_letter=dialog_text?dialog_text.length:0,t=void 0!==dialog_text?dialog_text:\"\",t+=arr_dialog.text_add[languare]?arr_dialog.text_add[languare]:arr_dialog.text_add):(dialog_letter=0,t=arr_dialog.text[languare]?arr_dialog.text[languare]:arr_dialog.text);let a=/<(.*?)>/g;ruby_rt=[];let r=t.matchAll(a);r=Array.from(r);for(var s=0;s<r.length;s++){let l=r[s];if(l[1].includes(\"=\")){var n=l[1].split(\"=\")[0];ruby_rt.push([n,ruby(l[1])]),t=t.replace(l[0],n)}else t=t.replace(l[0],story_json.parameters.variables[l[1]])}dialog_text=t}function values_button(e){let t=e.matchAll(/<(.*?)>/g);t=Array.from(t);for(var a=0;a<t.length;a++){let r=t[a];e=r[1].includes(\"=\")?e.replace(r[0],ruby(r[1])):e.replace(r[0],story_json.parameters.variables[r[1]])}return e}function ruby(e){var t=e.split(\"=\");return\"<ruby>\"+t[0]+\"<rt>\"+t[1]+\"</rt></ruby>\"}function go_story(e){if(0!=story_json[tue_story][scene].dialogs.length&&(check_choice(story_json[tue_story][scene].dialogs)||e)){if((arr_dialog=story_json[tue_story][scene].dialogs[dialog]).choice&&del_element(\"tue_choice\"),arr_dialog.go_to){var t=arr_dialog.go_to;\"tue_go\"==t?(scene++,dialog=0,creation_scene()):go_to(t)}else dialog<story_json[tue_story][scene].dialogs.length-1?(dialog++,arr_dialog.text?\"skip\"==arr_dialog.text[languare]?go_story():creation_dialog():arr_dialog.text_add&&\"skip\"==arr_dialog.text_add[languare]?go_story():creation_dialog()):++scene>=story_json[tue_story].length?scene=story_json[tue_story].length-1:(dialog=0,creation_scene());story_json.parameters.autosave&&!story_json[tue_story][scene].dialogs[dialog].no_autosave&&save_stag(\"auto\")}else story_json[tue_story][scene+1]&&(scene++,dialog=0,creation_scene());e||(timers=!1)}function back_story(){(arr_dialog=story_json[tue_story][scene].dialogs[dialog],del_element(\"tue_choice\"),del_element(\"tue_html_dialog\"),0!=story_json[tue_story][scene].dialogs.length&&arr_dialog.back_to)?go_to(arr_dialog.back_to):dialog>0?(dialog-=1,(arr_dialog=story_json[tue_story][scene].dialogs[dialog]).text?\"skip\"==arr_dialog.text[languare]?back_story():creation_dialog():arr_dialog.text_add?\"skip\"==arr_dialog.text_add[languare]?back_story():(dialog_text=arr_dialog.text?dialog_text.replace(arr_dialog.text_add[languare],\"\"):\"\",creation_dialog()):(creation_dialog(),del_element(\"tue_choice\"),del_element(\"tue_html_dialog\"))):((scene-=1)<0?(scene=0,dialog=0):story_json[tue_story][scene].dialogs&&(dialog=story_json[tue_story][scene].dialogs.length-1),creation_scene()),story_json.parameters.autosave&&!story_json[tue_story][scene].dialogs[dialog].no_autosave&&save_stag(\"auto\")}function save_stag(e){localStorage.setItem(\"tue_\"+e+\"_scene\",scene),localStorage.setItem(\"tue_\"+e+\"_dialog\",dialog),localStorage.setItem(\"tue_\"+e+\"_story\",tue_story),story_json.parameters.variables&&localStorage.setItem(\"tue_\"+e+\"_data\",JSON.stringify(story_json.parameters.variables)),\"bookmark\"==e&&tuesday.dispatchEvent(new Event(\"save\"))}function load_stag(e){story_json[localStorage.getItem(\"tue_\"+e+\"_story\")]&&(del_element(\"tue_choice\"),del_element(\"tue_html_scene\"),scene=localStorage.getItem(\"tue_\"+e+\"_scene\"),dialog=localStorage.getItem(\"tue_\"+e+\"_dialog\"),tue_story=localStorage.getItem(\"tue_\"+e+\"_story\"),story_json.parameters.variables=JSON.parse(localStorage.getItem(\"tue_\"+e+\"_data\")),creation_scene(),search_music(),tuesday.dispatchEvent(new Event(\"load\")))}function go_to(e){e.includes(\",\")?(tue_story=(e=e.split(\",\"))[0],dialog=e[2],scene=e[1]):(tue_story=e,dialog=0,scene=0),del_element(\"tue_choice\"),del_element(\"tue_html_dialog\"),creation_scene()}function del_element(e){for(var t=document.getElementById(\"tuesday\").getElementsByClassName(e),a=t.length,r=0;r<a;r++)t[0].parentNode.removeChild(t[0])}function anim_text(){if(0==dialog_speed){for(var e=0;e<ruby_rt.length;e++)dialog_text=dialog_text.replaceAll(ruby_rt[e][0],ruby_rt[e][1]);tue_text_view.innerHTML=dialog_text.replace(RegExp(\"\\n\",\"g\"),\"<br>\")}else if(0!=dialog_speed&&dialog_letter<=dialog_text.length)dialog_timeout=setTimeout(add_letter,dialog_speed);else if(dialog_letter>=dialog_text.length){if(arr_dialog.end_text_cursor||story_json.parameters.text_panel.end_text_cursor){var t=JSON.parse(JSON.stringify(arr_dialog.end_text_cursor?arr_dialog.end_text_cursor:!!story_json.parameters.text_panel.end_text_cursor&&story_json.parameters.text_panel.end_text_cursor));\"\"==t[1]&&story_json.parameters.text_panel.end_text_cursor[1]&&(t[1]=story_json.parameters.text_panel.end_text_cursor[1]),\"\"==t[2]&&story_json.parameters.text_panel.end_text_cursor[2]&&(t[2]=story_json.parameters.text_panel.end_text_cursor[2]),\"\"==t[3]&&story_json.parameters.text_panel.end_text_cursor[3]&&(t[3]=story_json.parameters.text_panel.end_text_cursor[3])}tue_text_view.innerHTML=\"<span style=''>\"+tue_text_view.innerHTML+(t&&t[0]?' <span style=\"position:relative;\"> <img src=\"'+art_data(t[0])+'\" style=\"position:absolute;width:'+(t[1]?t[1]:\"auto\")+\";height:\"+(t[2]?t[2]:\"auto\")+\";\"+(t[3]?t[3]:\"\")+'\"></span></span>':\"</span>\"),tuesday.dispatchEvent(new Event(\"dialog_end\"))}story_json.parameters.text_panel.scroll&&(tue_text_view.scrollTop=tue_text_view.scrollHeight)}function add_letter(){for(var e=dialog_text.slice(0,dialog_letter).replace(RegExp(\"\\n\",\"g\"),\"<br>\"),t=0;t<ruby_rt.length;t++)e=e.replaceAll(ruby_rt[t][0],ruby_rt[t][1]);tue_text_view.innerHTML=e,dialog_letter++,anim_text()}function search_music(){for(var e=scene;e>=0;e--)if(story_json[tue_story][e].background_music){tue_bg_music.canPlayType(\"audio/mpeg\")?\"number\"==typeof story_json[tue_story][e].background_music?tue_bg_music.src=story_json.base[story_json[tue_story][e].background_music-1]:story_json[tue_story][e].background_music.includes(\"blob:\")?tue_bg_music.src=story_json[tue_story][e].background_music:story_json[tue_story][e].background_music.includes(\".mp3\")?tue_bg_music.src=story_json[tue_story][e].background_music:tue_bg_music.src=story_json[tue_story][e].background_music+\".mp3\":tue_bg_music.src=story_json[tue_story][e].background_music+\".ogg\",tue_bg_music.loop=!0,0==tue_set_audio&&tue_bg_music.play();break}}function creation_sound(){for(var e=0;Object.keys(story_json.parameters.sounds)[e];){var t=document.createElement(\"audio\");t.preload=\"auto\",t.id=Object.keys(story_json.parameters.sounds)[e],t.canPlayType(\"audio/mpeg\")?story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]].includes(\";base64\")?t.src=story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]]:story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]].includes(\"blob:\")?t.src=story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]]:story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]].includes(\".mp3\")?t.src=story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]]:t.src=story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]]+\".mp3\":t.src=story_json.parameters.sounds[Object.keys(story_json.parameters.sounds)[e]]+\".ogg\",tuesday.appendChild(t),e++}}function get_sound(e){return\"if(tue_set_audio<2){\"+(e[languare]?\"sound_play('\"+e[languare]+\"');\":\"sound_play('\"+e+\"');\")+\"}\"}function get_stop_sound(e){return e[languare]?\"sound_stop('\"+e[languare]+\"');\":\"sound_stop('\"+e+\"');\"}function sound_play(e){var t=document.getElementById(e);t&&(t.currentTime=0,t.volume=1,t.play())}function sound_stop(e){document.getElementById(e).currentTime=0,document.getElementById(e).pause()}function add_style(e){var t=document.createElement(\"link\");t.setAttribute(\"rel\",\"stylesheet\"),t.setAttribute(\"type\",\"text/css\"),t.setAttribute(\"href\",e),document.getElementsByTagName(\"head\").item(0).appendChild(t)}function full_screen(e,t){if(tue_fullScreen)tue_fullScreen=!1,t&&t.text&&art_data(t.text).length>0&&(e.innerHTML=values_button(art_data(t.text))),t&&t.art&&art_data(t.art).length>0&&(e.style.backgroundImage=\"url('\"+art_data(t.art)+\"')\"),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen();else{let a=story_json.parameters.resolutions?tuesday.parentNode:tuesday;tue_fullScreen=!0,e&&t&&t.text1&&art_data(t.text1).length>0&&(e.innerHTML=values_button(art_data(t.text1))),e&&t&&t.art1&&art_data(t.art1).length>0&&(e.style.backgroundImage=\"url('\"+art_data(t.art1)+\"')\"),a.requestFullscreen?a.requestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.msRequestFullscreen&&a.msRequestFullscreen()}}function art_data(e){return e[languare]?\"number\"==typeof e[languare]?story_json.base[e[languare]-1]:e[languare]:\"number\"==typeof e?story_json.base[e-1]:e}function video_size(){var e=document.getElementById(\"tue_video\"),t=tuesday.getBoundingClientRect();e.videoWidth/e.videoHeight>t.width/t.height?(e.style.height=\"100%\",e.style.width=\"auto\"):(e.style.height=\"auto\",e.style.width=\"100%\")}function show_if(e,t){show=!0;for(var a=1;a<e.length;a++){var r=e[a][0],s=e[a][1],l=void 0!==story_json.parameters.variables[e[a][2]]?story_json.parameters.variables[e[a][2]]:e[a][2];if(\"=\"==s){if(story_json.parameters.variables[r]!=l){show=!1;break}}else if(\">\"==s){if(story_json.parameters.variables[r]<=l){show=!1;break}}else if(\"<\"==s&&story_json.parameters.variables[r]>=l){show=!1;break}if(!show)break}!show&&e[0]?t.style.visibility=\"hidden\":show&&!e[0]&&(t.style.visibility=\"hidden\")}function fast_rewind(){let e=story_json[tue_story][scene].dialogs;timers=setTimeout(function(){go_story(!0),dialog<e.length&&check_choice(e)?fast_rewind():timers=!1},350)}function check_choice(e){if(!e[dialog].choice)return!0;{let t=!0;return e[dialog].choice.forEach(e=>{\"tue_no\"!=e.go_to&&(t=!1)}),t}}function set_audio(e,t){if(tue_set_audio=tue_set_audio>1?0:tue_set_audio+1,localStorage.setItem(\"tue_set_audio\",tue_set_audio),0==tue_set_audio?tue_bg_music.play():tue_set_audio>0&&tue_bg_music.pause(),2==tue_set_audio){var a=tuesday.getElementsByTagName(\"audio\");for(let r=0;r<a.length;r++)a[r].pause();\"undefined\"!=typeof synth&&synth.speaking&&synth.cancel()}show_audio(e,t)}function show_audio(e,t){var a=0!=tue_set_audio?tue_set_audio:\"\";t[\"text\"+a]&&art_data(t[\"text\"+a]).length>0&&(e.innerHTML=values_button(art_data(t[\"text\"+a]))),t[\"art\"+a]&&art_data(t[\"art\"+a]).length>0&&(e.style.backgroundImage=\"url('\"+art_data(t[\"art\"+a])+\"')\")}function show_fullscreen(e,t){t[\"text\"+(tue_fullScreen?\"1\":\"\")]&&art_data(t[\"text\"+(tue_fullScreen?\"1\":\"\")]).length>0&&(e.innerHTML=values_button(art_data(t[\"text\"+(tue_fullScreen?\"1\":\"\")]))),t[\"art\"+(tue_fullScreen?\"1\":\"\")]&&art_data(t[\"art\"+(tue_fullScreen?\"1\":\"\")]).length>0&&(e.style.backgroundImage=\"url('\"+art_data(t[\"art\"+(tue_fullScreen?\"1\":\"\")])+\"')\")}function autoplaysound(){0==tue_set_audio&&tue_bg_music.play(),tuesday.removeEventListener(\"mousedown\",autoplaysound)}document.oncontextmenu=cmenu,window.onmousedown=window.onselectstart=function(){return!1},document.addEventListener(\"keydown\",function(e){let t=e.code;t==story_json.parameters.key.next&&controll?go_story():t==story_json.parameters.key.back&&controll?back_story():t==story_json.parameters.key.main?go_to(story_json.parameters.launch_story):t==story_json.parameters.key.save?save_stag(\"bookmark\"):t==story_json.parameters.key.load?load_stag(\"bookmark\"):t==story_json.parameters.key.autosave?load_stag(\"auto\"):t==story_json.parameters.key.full_screen?full_screen():t==story_json.parameters.key.fast_rewind&&fast_rewind()}),tuesday.addEventListener(\"mousedown\",autoplaysound);";
let arr_l;
let arr_n;
const color_ui=[
['#cec8e3','#efefff','rgba(110,95,165,0.25)','rgb(90,75,145)','rgba(110,95,165,0.5)','#6e5fa5','#fff','none','#000'],
['#a3cdf0','#e8f3ff','rgba(83,150,204,0.25)','rgb(83,150,204)','rgba(83,150,204,0.5)','#596c7f','#fff','none','#000'],
['#adced1','#def9fb','rgba(103,123,124,0.25)','rgb(103,123,124)','rgba(103,123,124,0.5)','#677b7c','#fff','none','#000'],
['#ccc','#eee','rgba(0,0,0,0.25)','#444','rgba(0,0,0,0.25)','#777','#fff','none','#000'],
['#beb3af','#dfd9d7','rgba(64,55,51,0.25)','rgb(160,142,136)','rgba(160,142,136,0.5)' ,'#5a4d46','#fff','none','#000'],
['#d2c4a5','#efe1c3','rgba(121,103,63,0.25)','rgb(121,103,63)','rgba(121,103,63,0.5)' ,'#7b6f54','#fff','none','#000'],
['#c4cebb','#dfebd5','rgba(109,124,91,0.25)','rgb(109,124,91)','rgba(109,124,91,0.5)' ,'#427e00','#fff','none','#000'],
['#7f7f7f','#1f1f1f','rgba(0,0,0,0.5)','rgba(0,0,0,0.7)','rgba(0,0,0,0.5)','#888','#383838','invert(85%) hue-rotate(180deg)','#d8d8d8',"#7f7f7f"],
['#6178aa','#192543','rgba(0,0,0,0.5)','rgba(0,0,0,0.7)','rgba(0,0,0,0.5)','#888','#303f6a','invert(90%) hue-rotate(180deg)','#ddd',"#6178aa"],
['#7f7f7f','#131a1e','rgba(0,0,0,0.5)','rgba(0,0,0,0.7)','rgba(0,0,0,0.5)','#888','#26343d','invert(90%)','#ddd',"#647f90"],
['#9d7290','#1e111a','rgba(0,0,0,0.5)','rgba(0,0,0,0.7)','rgba(0,0,0,0.5)','#888','#411934','invert(85%) hue-rotate(180deg)','#ddd',"#6B4C61"],
['#8d726d','#24130f','rgba(0,0,0,0.5)','rgba(0,0,0,0.7)','rgba(0,0,0,0.5)','#888','#3a2622','invert(85%) hue-rotate(180deg)','#ddd',"#64452b"]
]
let story_script={};
let line_controll=[];
let scen_data=[];
let copy_arr={};
let scen_element={};
const plugins_list={"tue_aspect_ratio":{
"name":"Aspect ratio",
"text":"fixed screen size while maintaining aspect ratio",
"code":"function TueAspectRatio(){let e=story_json.parameters.resolutions,t=tuesday.parentNode,i=t.getBoundingClientRect();if(0==i.height||0==i.width){var s=e[0]/window.innerWidth>e[1]/window.innerHeight?window.innerWidth/e[0]:window.innerHeight/e[1];tuesday.style.left=(window.innerWidth-e[0]*s)/2+\"px\",tuesday.style.top=(window.innerHeight-e[1]*s)/2+\"px\"}else{var s=e[0]/i.width>e[1]/i.height?i.width/e[0]:i.height/e[1];tuesday.style.left=(i.width-e[0]*s)/2+\"px\",tuesday.style.top=(i.height-e[1]*s)/2+\"px\"}t.style.backgroundColor=e[2]&&e[2].length>0?e[2]:\"#000\",t.style.backgroundImage=\"url('\"+e[3]+\"')\",t.style.backgroundPosition=\"center\",t.style.backgroundSize=\"cover\",t.style.overflow=\"hidden\",t.style.position=\"relative\",tuesday.style.position=\"absolute\",tuesday.style.transformOrigin=\"left top\",tuesday.style.width=e[0]+\"px\",tuesday.style.height=e[1]+\"px\",tuesday.style.transform=\"scale(\"+s+\")\"}window.addEventListener(\"script_executed\",TueAspectRatio,!0),window.addEventListener(\"script_loaded\",TueAspectRatio,!0),window.addEventListener(\"resize\",TueAspectRatio,!0);"
},"game_pad":{
"name":"GamePad",
"text":"Support for external game controllers",
"code":"let gamepad,gamepadPress,gamepad_choice=-1,gamepad_choices,gamepad_cursor=0;function select_choice(e){if(0==gamepad_cursor){gamepad_choices=story_json[tue_story][scene].terrain_map?tuesday.getElementsByClassName(\"tue_map_item\"):tuesday.getElementsByClassName(\"tue_choice\"),(gamepad_cursor=document.createElement(\"div\")).style.position=\"absolute\",gamepad_cursor.style.pointerEvents=\"none\",gamepad_cursor.id=\"gamepad_cursor\";let a=story_json.parameters.gamepad.cursor;gamepad_cursor.innerHTML=\"<div \"+(a[6].length>0?\"class='\"+a[6]+\"'\":\"\")+\" style='\"+(a[5].length>0?a[5]+\";\":\"\")+(\"\"!=a[0]?\" background-size:100% 100%;background-repeat:no-repeat;background-position:center;background-image:url(\"+art_data(a[0])+\");\":\"\")+\"pointer-events:none;position:absolute;top:\"+a[1]+\";left:\"+a[2]+\";\"+(0!=a[3]?\"width:\"+a[3]+\";\":\"\")+(0!=a[3]?\"height:\"+a[4]+\";\":\"\")+\"'></div>\",story_json[tue_story][scene].terrain_map?tue_map.appendChild(gamepad_cursor):tuesday.appendChild(gamepad_cursor)}if(\"hidden\"!=gamepad_choices[gamepad_choice=gamepad_choice+e>=gamepad_choices.length?0:gamepad_choice+e<0?gamepad_choices.length-1:gamepad_choice+e].style.visibility&&(story_json[tue_story][scene].terrain_map||gamepad_choices[gamepad_choice].onclick.toString().includes(\"go_to\")||gamepad_choices[gamepad_choice].onclick.toString().includes(\"go_story\")||gamepad_choices[gamepad_choice].onclick.toString().includes(\"tue_load_autosave\")||gamepad_choices[gamepad_choice].onclick.toString().includes(\"load_stag\"))){if(gamepad_cursor.style.left=gamepad_choices[gamepad_choice].style.left,gamepad_cursor.style.top=gamepad_choices[gamepad_choice].style.top,gamepad_cursor.style.right=gamepad_choices[gamepad_choice].style.right,gamepad_cursor.style.bottom=gamepad_choices[gamepad_choice].style.bottom,gamepad_cursor.style.width=gamepad_choices[gamepad_choice].style.width,gamepad_cursor.style.height=gamepad_choices[gamepad_choice].style.height,gamepad_cursor.style.padding=gamepad_choices[gamepad_choice].style.padding,gamepad_cursor.style.zIndex=gamepad_choices[gamepad_choice].style.zIndex,gamepad_cursor.style.transform=gamepad_choices[gamepad_choice].style.transform,story_json[tue_story][scene].terrain_map){let c=gamepad_choices[gamepad_choice].getBoundingClientRect();tue_world.scrollTop=tue_world.scrollTop+(c.top-tuesday.clientHeight/2),tue_world.scrollLeft=tue_world.scrollLeft+(c.left-tuesday.clientWidth/2)}}else select_choice(e)}function gamepad_cursor_cler(){gamepad_cursor.remove(),gamepad_cursor=0,gamepad_choice=-1}tuesday.addEventListener(\"creation_dialog\",function(e){0!=gamepad_cursor&&gamepad_cursor_cler()}),window.addEventListener(\"keydown\",function(e){37==(e=e.keyCode)?story_json[tue_story][scene].terrain_map||0!=story_json[tue_story][scene].dialogs.length&&!check_choice(story_json[tue_story][scene].dialogs)?select_choice(1):story_json.parameters.key&&story_json.parameters.key.next||back_story():39==e?story_json[tue_story][scene].terrain_map||0!=story_json[tue_story][scene].dialogs.length&&!check_choice(story_json[tue_story][scene].dialogs)?select_choice(-1):story_json.parameters.key&&story_json.parameters.key.back||go_story():38==e?(story_json[tue_story][scene].terrain_map||!check_choice(story_json[tue_story][scene].dialogs))&&select_choice(1):40==e?(story_json[tue_story][scene].terrain_map||!check_choice(story_json[tue_story][scene].dialogs))&&select_choice(-1):13==e||32==e?0!=gamepad_cursor&&(gamepad_choices[gamepad_choice].click(),story_json[tue_story][scene].terrain_map&&gamepad_cursor_cler()):27!=e||story_json.parameters.key&&story_json.parameters.key.launch_story||go_to(story_json.parameters.launch_story)}),window.addEventListener(\"gamepadconnected\",function(e){let a=()=>{for(gamepad of navigator.getGamepads()){if(!gamepad)continue;let e=gamepad.buttons.some(e=>e.pressed);gamepadPress!==e&&(gamepadPress=e,gamepad.buttons[14].pressed?story_json[tue_story][scene].terrain_map||!check_choice(story_json[tue_story][scene].dialogs)?select_choice(1):back_story():gamepad.buttons[15].pressed?story_json[tue_story][scene].terrain_map||!check_choice(story_json[tue_story][scene].dialogs)?select_choice(-1):go_story():gamepad.buttons[12].pressed?(story_json[tue_story][scene].terrain_map||!check_choice(story_json[tue_story][scene].dialogs))&&select_choice(1):gamepad.buttons[13].pressed?(story_json[tue_story][scene].terrain_map||!check_choice(story_json[tue_story][scene].dialogs))&&select_choice(-1):gamepad.buttons[1].pressed||gamepad.buttons[2].pressed||gamepad.buttons[3].pressed||gamepad.buttons[0].pressed?0!=gamepad_cursor&&(gamepad_choices[gamepad_choice].click(),story_json[tue_story][scene].terrain_map&&gamepad_cursor_cler()):(gamepad.buttons[8].pressed||gamepad.buttons[9].pressed)&&(go_to(story_json.parameters.launch_story),story_json[tue_story][scene].terrain_map&&gamepad_cursor_cler()))}requestAnimationFrame(a)};a()});"
},"hidden_objects":{
"name":"Hidden objects",
"text":"player must find items from a list that are hidden within a scene",
"code":"var ho={startmove_x:null,startmove_y:null,scroll_x:null,scroll_y:null,scale:1};function hidden_objects(){clearTimeout(dialog_timeout),arr_dialog=story_json[tue_story][scene].hidden_objects,tue_text_view.innerHTML=\"\",tuesday.style.backgroundImage=\"none\";let e=document.createElement(\"div\"),t=[];arr_dialog.objects.forEach((s,l)=>{if(s.type){var a=document.createElement(\"div\");s.className&&(a.className=s.className),a.style=s.style,a.style.width=s.size[0]+\"px\",a.style.height=s.size[1]+\"px\",a.style.backgroundRepeat=\"no-repeat\",a.style.backgroundPosition=\"center\",a.style.backgroundSize=s.fit,a.style.backgroundImage='url(\"'+art_data(s.art)+'\")',a.style.position=\"absolute\",a.style.transformOrigin=\"top left\",a.style.transform=\"rotate(\"+s.angle+\"deg)\",a.style.top=s.position[1]+\"px\",a.style.left=s.position[0]+\"px\",a.style.zIndex=l,e.appendChild(a)}else s.index=l,t.push(s)}),findobjects=story_json.parameters.hidden_objects.label.items>t.length?t.length:story_json.parameters.hidden_objects.label.items;var s=document.createElement(\"div\");s.id=\"tue_hiddenobjects\",s.style=\"height:100%;width:100%;\"+(navigator.userAgent.indexOf(\"Firefox\")>0?\"overflow:hidden;\":\"overflow:auto;\");var l=Math.round(t.length/findobjects),a=0,o=0;findobjects<t.length&&l<2&&(l=2);var r=Math.round(Math.random()*(l-1));arr_dialog.scale&&(ho.scale=arr_dialog.scale),e.id=\"tue_objectsroom\",e.className=arr_dialog.className,e.style=arr_dialog.style,e.style.width=arr_dialog.size[0]+\"px\",e.style.height=arr_dialog.size[1]+\"px\",e.style.backgroundRepeat=\"no-repeat\",e.style.backgroundPosition=\"center\",e.style.backgroundSize=\"cover\",arr_dialog.color&&(s.style.backgroundColor=art_data(arr_dialog.color)),e.style.backgroundImage='url(\"'+art_data(arr_dialog.art)+'\")',e.style.position=\"relative\",e.style.overflow=\"hidden\";for(var n=story_json.parameters.hidden_objects.label_find.sound?story_json.parameters.hidden_objects.label_find.sound:\"\",i=0;i<t.length;i++){var d=document.createElement(\"div\");t[i].className&&(d.className=t[i].className),d.style=t[i].style,d.style.width=t[i].size[0]+\"px\",d.style.height=t[i].size[1]+\"px\",d.style.backgroundRepeat=\"no-repeat\",d.style.backgroundPosition=\"center\",d.style.backgroundSize=t[i].fit,d.style.backgroundImage='url(\"'+art_data(t[i].art)+'\")',d.style.position=\"absolute\",d.style.transformOrigin=\"top left\",d.style.transform=\"rotate(\"+t[i].angle+\"deg)\",d.style.top=t[i].position[1]+\"px\",d.style.left=t[i].position[0]+\"px\",d.style.zIndex=t[i].index;var c=document.createElement(\"div\");story_json.parameters.hidden_objects.label.style&&(c.style=story_json.parameters.hidden_objects.label.style),story_json.parameters.hidden_objects.label.className&&(c.className=story_json.parameters.hidden_objects.label.className),i==r&&o<findobjects&&(a+=l,d.setAttribute(\"onclick\",'sound_play(\"'+(t[i].sound?t[i].sound:n)+'\");'+(story_json.parameters.hidden_objects.label_find.no_del_item?\"this.setAttribute('onclick','')\":\"this.remove();\")+(t[i].js?t[i].js:\"\")+';find_item(\"item'+i+'\");'),c.style.width=story_json.parameters.hidden_objects.label.size[0],c.style.height=story_json.parameters.hidden_objects.label.size[1],c.style.float=\"left\",c.id=\"item\"+i,\"text\"!=story_json.parameters.hidden_objects.label.tip&&story_json.parameters.hidden_objects.label.tip||(c.style.display=\"flex\",c.style.justifyContent=story_json.parameters.hidden_objects.label.align?story_json.parameters.hidden_objects.label.align[0]:\"center\",c.style.alignItems=story_json.parameters.hidden_objects.label.align?story_json.parameters.hidden_objects.label.align[1]:\"center\",c.innerHTML=art_data(t[i].name)),\"art\"!=story_json.parameters.hidden_objects.label.tip&&story_json.parameters.hidden_objects.label.tip||(c.style.backgroundRepeat=\"no-repeat\",c.style.backgroundPosition=story_json.parameters.hidden_objects.label.art_align?story_json.parameters.hidden_objects.label.art_align:\"center\",story_json.parameters.hidden_objects.label.color_text&&(c.style.color=story_json.parameters.hidden_objects.label.color_text),story_json.parameters.hidden_objects.label.fit?c.style.backgroundSize=story_json.parameters.hidden_objects.label.fit:story_json.parameters.hidden_objects.label.art_size&&(\"object\"==typeof story_json.parameters.hidden_objects.label.art_size?c.style.backgroundSize=story_json.parameters.hidden_objects.label.art_size[0]+\" \"+story_json.parameters.hidden_objects.label.art_size[1]:c.style.backgroundSize=story_json.parameters.hidden_objects.label.art_size),c.style.backgroundImage='url(\"'+art_data(t[i].art)+'\")'),l>1&&(r=a+Math.round(Math.random()*(l-1))),t.length-a<findobjects-o&&(r=a,l=1),story_json.parameters.hidden_objects.label.color&&(c.style.backgroundColor=story_json.parameters.hidden_objects.label.color),tue_text_view.appendChild(c),o++),e.appendChild(d)}tue_text_block.style.visibility=\"visible\",story_json.parameters.text_panel.color&&(tue_text_block.style.backgroundColor=story_json.parameters.text_panel.color),document.getElementById(\"tue_next\")&&(tue_next.style.visibility=\"hidden\"),document.getElementById(\"tue_back\")&&(tue_back.style.visibility=\"hidden\"),s.appendChild(e),tuesday.appendChild(s),objectsroom_resize(),tue_objectsroom.style.transformOrigin=\"left top\",0==tue_set_audio&&arr_dialog.background_music&&!tue_bg_music.src.includes(encodeURI(arr_dialog.background_music))?(tue_bg_music.canPlayType(\"audio/mpeg\")?arr_dialog.background_music.includes(\"blob:\")?tue_bg_music.src=arr_dialog.background_music:arr_dialog.background_music.includes(\".mp3\")?tue_bg_music.src=arr_dialog.background_music:tue_bg_music.src=arr_dialog.background_music+\".mp3\":tue_bg_music.src=arr_dialog.background_music+\".ogg\",tue_bg_music.loop=!0,tue_bg_music.play()):arr_dialog.background_music&&\"\"!=arr_dialog.background_music?0==tue_set_audio&&tue_bg_music.play():tue_bg_music.pause(),s.onmousedown=function(e){ho.startmove_x=e.clientX,ho.startmove_y=e.clientY,ho.scroll_x=s.scrollTop,ho.scroll_y=s.scrollLeft,document.onmousemove=function(e){s.scrollTop=ho.scroll_x-(e.clientY-ho.startmove_y),s.scrollLeft=ho.scroll_y-(e.clientX-ho.startmove_x)},document.onmouseup=function(e){document.onmousemove=null,document.onmouseup=null},document.onmouseleave=function(){document.onmousemove=null,document.onmouseup=null}}}function objectsroom_resize(){if(!story_json.parameters.resolutions){var e=tuesday.getBoundingClientRect();arr_dialog.size[0]/arr_dialog.size[1]>e.width/e.height?tue_objectsroom.style.transform=\"scale(\"+e.height/arr_dialog.size[1]*ho.scale+\")\":tue_objectsroom.style.transform=\"scale(\"+e.width/arr_dialog.size[0]*ho.scale+\")\",tue_objectsroom.style.marginBottom=\"-\"+(e.height+arr_dialog.size[1])+\"px\",tue_objectsroom.style.marginRight=\"-\"+(e.width+arr_dialog.size[0])+\"px\",tue_objectsroom.style.marginTop=\"0px\",tue_objectsroom.style.marginLeft=\"0px\"}}function find_item(id){findobjects--,story_json.parameters.hidden_objects.label_find.no_del_label?(id=document.getElementById(id),story_json.parameters.hidden_objects.label_find.className&&(id.className=story_json.parameters.hidden_objects.label_find.className),story_json.parameters.hidden_objects.label_find.style&&(id.className=story_json.parameters.hidden_objects.label_find.style),story_json.parameters.hidden_objects.label_find.color&&(id.style.backgroundColor=story_json.parameters.hidden_objects.label_find.color),story_json.parameters.hidden_objects.label_find.color_text&&(id.style.color=story_json.parameters.hidden_objects.label_find.color_text)):document.getElementById(id).remove(),findobjects<=0&&(arr_dialog.js&&eval(arr_dialog.js),tue_hiddenobjects.remove(),\"tue_go\"==arr_dialog.go_to?(scene++,dialog=0,creation_scene()):go_to(arr_dialog.go_to))}tuesday.addEventListener(\"hidden_objects\",function(e){hidden_objects()}),window.addEventListener(\"resize\",objectsroom_resize,!0);"
},"screen_control":{
"name":"Screen control",
"text":"switches dialogue by click to screen.",
"code":"let tue_screen_control=!0;tuesday.addEventListener('mouseup',function(e){(0==story_json[tue_story][scene].dialogs||check_choice(story_json[tue_story][scene].dialogs))&&go_story(),tue_screen_control=!0}),tuesday.addEventListener('script_loaded',function(e){document.getElementById('tue_back')&&(tue_back.style.pointerEvents='none'),document.getElementById('tue_next')&&(tue_next.style.pointerEvents='none');for(var t=document.getElementById('tuesday').getElementsByClassName('tue_controll'),n=0;n<t.length;n++)t[n].setAttribute('onmouseup','tue_screen_control=false;')});"
},"speech":{
"name":"Speech",
"text":"Speech synthesis TTS<br>reading text with a synthesized voice",
"code":"const synth=window.speechSynthesis;function play_synth(e,t,s){if(e=e?e=\"object\"==typeof e?e[languare]:e:arr_dialog.text_add?arr_dialog.text_add:dialog_text,\"hidden\"!=tue_text_block.style.visibility&&(story_json.parameters.text_panel.speech||arr_dialog.speech)){let n=new SpeechSynthesisUtterance(e||dialog_text);synth.speaking&&synth.cancel();let a=t&&t.length>0?[t,s||1]:arr_dialog.speech&&arr_dialog.speech[languare][0].length>0?arr_dialog.speech[languare]:story_json.parameters.text_panel.speech[languare],p=speechSynthesis.getVoices(),h=a[0].split(\",\").map(e=>e.trim()),c=!1;for(v=0;v<p.length&&(p.filter(e=>{e.name==h[v]&&(c=e)}),!c);v++);n.voice=c,n.rate=a[1],synth.speak(n)}}tuesday.addEventListener(\"creation_dialog\",()=>{story_json.parameters.text_panel.speech_play&&tue_set_audio<2?play_synth():synth.cancel()});"
},"show_toast":{
"name":"Show toast",
"text":"small message appears for a while",
"code":"let tue_toast;function creation_tost(){var t=document.createElement(\"style\");t.type=\"text/css\",t.innerHTML=\"#toast{position: fixed;opacity: 0;top: -96px;z-index: 1000;}.toast_anim{left: 50%;transform: translateX(-50%);animation: viwe 0.25s, stop 2s 0.25s, close 0.5s 2s linear;}@keyframes viwe {from {opacity: 0;top: 3em}to {opacity: 1;top: 3em}}@keyframes stop {from {opacity: 1;top: 3em}to {opacity: 1;top: 3em}}@keyframes close {from {opacity: 1;top: 3em}to {opacity: 0;top: -96px}}\",document.getElementsByTagName(\"head\")[0].appendChild(t),(tue_toast=document.createElement(\"div\")).id=\"toast\",tue_toast.innerHTML=\"<table border=\'0\' height=\'100%\' width=\'100%\'><tbody><tr><td id=\'toast_message\' align=\'center\' valign=\'center\' ></td></tr></tbody></table>\",document.body.appendChild(tue_toast)}function toast(t){tue_toast.classList.remove(\"toast_anim\"),document.getElementById(\"toast_message\").innerHTML=t,tue_toast.offsetParent,tue_toast.classList.add(\"toast_anim\")}creation_tost(),tuesday.addEventListener(\"creation_dialog\",function(t){story_json[tue_story][scene].dialogs[dialog].toast&&(story_json[tue_story][scene].dialogs[dialog].toast[languare]?toast(story_json[tue_story][scene].dialogs[dialog].toast[languare]):toast(story_json[tue_story][scene].dialogs[dialog].toast))});"
},"terrain_map":{
"name":"Terrain map",
"text":"location with markers for transition to other plot blocks.",
"code":"var wmap={startmove_x:null,startmove_y:null,scroll_x:null,scroll_y:null,scale:1};function terrain_map(){clearTimeout(dialog_timeout),arr_dialog=story_json[tue_story][scene].terrain_map,tue_text_view.innerHTML=\"\",tuesday.style.backgroundImage=\"none\";var e=document.createElement(\"div\");e.id=\"tue_world\",e.style=\"height:100%;width:100%;\"+(navigator.userAgent.indexOf(\"Firefox\")>0?\"overflow:hidden;\":\"overflow:auto;\"),e.className=\"tue_html_scene\";var t=document.createElement(\"div\");arr_dialog.scale&&(wmap.scale=arr_dialog.scale),t.id=\"tue_map\",t.className=arr_dialog.className,t.style=arr_dialog.style,t.style.width=arr_dialog.size[0]+\"px\",t.style.height=arr_dialog.size[1]+\"px\",t.style.backgroundRepeat=arr_dialog.repeat?arr_dialog.repeat:\"no-repeat\",arr_dialog.art_align&&(t.style.backgroundPosition=arr_dialog.art_align),arr_dialog.fit&&(t.style.backgroundSize=\"object\"==typeof arr_dialog.fit?arr_dialog.fit[0]+\" \"+arr_dialog.fit[1]:arr_dialog.fit),arr_dialog.color&&(e.style.backgroundColor=art_data(arr_dialog.color)),arr_dialog.art&&art_data(arr_dialog.art).length>0&&(t.style.backgroundImage='url(\"'+art_data(arr_dialog.art)+'\")'),t.style.position=\"relative\",t.style.overflow=\"hidden\",t.style.transformOrigin=\"left top\";for(var o=0;o<arr_dialog.objects.length;o++){var s=document.createElement(\"div\");s.className=arr_dialog.objects[o].className+\" tue_map_item\",s.style=arr_dialog.objects[o].style,s.style.width=arr_dialog.objects[o].size[0]+\"px\",s.style.height=arr_dialog.objects[o].size[1]+\"px\",\"patch\"!=arr_dialog.objects[o].fit?(s.style.backgroundRepeat=\"no-repeat\",s.style.backgroundPosition=\"center\",s.style.backgroundSize=\"object\"==typeof arr_dialog.objects[o].fit?arr_dialog.objects[o].fit[0]+\" \"+arr_dialog.objects[o].fit[1]:arr_dialog.objects[o].fit,s.style.backgroundImage='url(\"'+art_data(arr_dialog.objects[o].art)+'\")',s.style.backgroundPosition=arr_dialog.objects[o].art_align?arr_dialog.objects[o].art_align[0]+\" \"+arr_dialog.objects[o].art_align[1]:\"center\"):\"patch\"==arr_dialog.objects[o].fit?(s.style.backgroundImage=\"none\",s.style.backgroundSize=\"none\",s.style.backgroundClip=\"padding-box\",s.style.borderStyle=\"solid\",s.style.borderWidth=arr_dialog.objects[o].patch[0]+\"px \"+arr_dialog.objects[o].patch[1]+\"px \"+arr_dialog.objects[o].patch[2]+\"px \"+arr_dialog.objects[o].patch[3]+\"px\",s.style.borderImage=\"url('\"+art_data(arr_dialog.objects[o].art)+\"') \"+arr_dialog.objects[o].patch[0]+\" \"+arr_dialog.objects[o].patch[1]+\" \"+arr_dialog.objects[o].patch[2]+\" \"+arr_dialog.objects[o].patch[3]+\" stretch stretch\"):tue_id.style.backgroundSize=arr_dialog.objects[o].art_size,s.style.position=\"absolute\",s.style.transformOrigin=\"top left\",s.style.transform=\"rotate(\"+arr_dialog.objects[o].angle+\"deg)\",s.style.top=arr_dialog.objects[o].position[1]+\"px\",s.style.left=arr_dialog.objects[o].position[0]+\"px\",s.style.display=\"flex\",arr_dialog.objects[o].color&&(s.style.backgroundColor=arr_dialog.objects[o].color),arr_dialog.objects[o].name&&(s.innerHTML=art_data(arr_dialog.objects[o].name),arr_dialog.objects[o].indent_text&&(s.style.padding=arr_dialog.objects[o].indent_text),arr_dialog.objects[o].color_text&&(s.style.color=arr_dialog.objects[o].color_text),arr_dialog.objects[o].size_text&&(s.style.fontSize=arr_dialog.objects[o].size_text),arr_dialog.objects[o].font_family&&(s.style.fontFamily=arr_dialog.objects[o].font_family),s.style.whiteSpace=\"pre-wrap\",arr_dialog.objects[o].align?(s.style.justifyContent=arr_dialog.objects[o].align?arr_dialog.objects[o].align[0]:\"center\",s.style.alignItems=arr_dialog.objects[o].align?arr_dialog.objects[o].align[1]:\"center\"):(s.style.justifyContent=\"center\",s.style.alignItems=\"center\")),story_json.parameters.cursors&&story_json.parameters.cursors.choice&&(s.style.cursor=\"url(\"+art_data(story_json.parameters.cursors.choice[0])+\") \"+story_json.parameters.cursors.choice[1]+\" \"+story_json.parameters.cursors.choice[2]+\",auto\"),arr_dialog.objects[o].show_if&&show_if(arr_dialog.objects[o].show_if,s);var l=\"\";arr_dialog.objects[o].sound?l+=\"sound_play('\"+arr_dialog.objects[o].sound+\"');\":arr_dialog.sound&&(l+=\"sound_play('\"+arr_dialog.sound+\"');\"),arr_dialog.objects[o].js&&(l+=arr_dialog.objects[o].js+\";\"),arr_dialog.objects[o].go_to&&\"tue_no\"!=arr_dialog.objects[o].go_to&&(arr_dialog.objects[o].text_from?l+=\"tue_story='\"+arr_dialog.objects[o].go_to+\"';scene=0;dialog=0;creation_dialog();\":arr_dialog.objects[o].url?l+=\"window.open('\"+(arr_dialog.objects[o].go_to[languare]?arr_dialog.objects[o].go_to[languare]:arr_dialog.objects[o].go_to)+\"','_\"+arr_dialog.objects[o].url+\"');\":l+=\"tue_world.remove();\"+(\"tue_go\"==arr_dialog.objects[o].go_to?\"scene++;dialog=0;creation_scene();\":\"go_to('\"+arr_dialog.objects[o].go_to+\"');\")),s.setAttribute(\"onclick\",l),t.appendChild(s)}e.onmousedown=function(t){wmap.startmove_x=t.clientX,wmap.startmove_y=t.clientY,wmap.scroll_x=e.scrollTop,wmap.scroll_y=e.scrollLeft,document.onmousemove=function(t){e.scrollTop=wmap.scroll_x-(t.clientY-wmap.startmove_y),e.scrollLeft=wmap.scroll_y-(t.clientX-wmap.startmove_x)},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null,arr_dialog.scroll&&(arr_dialog.scroll[1]=e.scrollTop,arr_dialog.scroll[0]=e.scrollLeft)},document.onmouseleave=function(){document.onmousemove=null,document.onmouseup=null,arr_dialog.scroll[1]=e.scrollTop,arr_dialog.scroll[0]=e.scrollLeft}},0==tue_set_audio&&arr_dialog.background_music&&!tue_bg_music.src.includes(encodeURI(arr_dialog.background_music))?(tue_bg_music.canPlayType(\"audio/mpeg\")?arr_dialog.background_music.includes(\"blob:\")?tue_bg_music.src=arr_dialog.background_music:arr_dialog.background_music.includes(\".mp3\")?tue_bg_music.src=arr_dialog.background_music:tue_bg_music.src=arr_dialog.background_music+\".mp3\":tue_bg_music.src=arr_dialog.background_music+\".ogg\",tue_bg_music.loop=!0,tue_bg_music.play()):arr_dialog.background_music&&\"\"!=arr_dialog.background_music?0==tue_set_audio&&tue_bg_music.play():tue_bg_music.pause(),document.getElementById(\"tue_next\")&&(tue_next.style.visibility=\"hidden\"),document.getElementById(\"tue_back\")&&(tue_back.style.visibility=\"hidden\"),e.appendChild(t),tuesday.appendChild(e),worldmap_resize(),arr_dialog.scroll&&(e.scrollTop=arr_dialog.scroll[1],e.scrollLeft=arr_dialog.scroll[0])}function worldmap_resize(){if(!story_json.parameters.resolutions){var e=tuesday.getBoundingClientRect();arr_dialog.size[0]/arr_dialog.size[1]>e.width/e.height?tue_map.style.transform=\"scale(\"+e.height/arr_dialog.size[1]*wmap.scale+\")\":tue_map.style.transform=\"scale(\"+e.width/arr_dialog.size[0]*wmap.scale+\")\",tue_map.style.marginBottom=\"-\"+(e.height+arr_dialog.size[1])+\"px\",tue_map.style.marginRight=\"-\"+(e.width+arr_dialog.size[0])+\"px\",tue_map.style.marginTop=\"0px\",tue_map.style.marginLeft=\"0px\"}}tuesday.addEventListener(\"terrain_map\",function(e){terrain_map()}),window.addEventListener(\"resize\",worldmap_resize,!0);"
},"touch_swipe":{
"name":"Touch swipe",
"text":"switches dialogue by swiping your finger across the touchscreen",
"code":"var endTime,starttouch=null;window.addEventListener(\"touchstart\",function(t){startTime=new Date,starttouch=1===t.touches.length?t.touches.item(0).clientX:null}),window.addEventListener(\"touchend\",function(t){var e=new Date-startTime;if(starttouch&&e<500&&controll){var n=t.changedTouches.item(0).clientX;n>starttouch+40&&back_story(),n<starttouch-40&&check_choice(story_json[tue_story][scene].dialogs)&&go_story()}});"
}
}
const languares={"English":"en","Japanese":"ja","French":"fr","Russian":"ru","Spanish":"es","Chinese":"zh","Korean":"ko","German":"de","Dutch":"nl","Portuguese":"pt","Afar":"aa","Abkhazian":"ab","Afrikaans":"af","Akan":"ak","Albanian":"sq","Amharic":"am","Arabic":"ar","Aragonese":"an","Armenian":"hy","Assamese":"as","Avaric":"av","Avestan":"ae","Aymara":"ay","Azerbaijani":"az","Bambara":"bm","Bashkir":"ba","Basque":"eu","Belarusian":"be","Bengali (Bangla)":"bn","Bihari":"bh","Bislama":"bi","Bosnian":"bs","Breton":"br","Bulgarian":"bg","Burmese":"my","Catalan":"ca","Chamorro":"ch","Chechen":"ce","Chichewa,Chewa,Nyanja":"ny","Chinese (Simplified)":"zh-Hans","Chinese (Traditional)":"zh-Hant","Chuvash":"cv","Cornish":"kw","Corsican":"co","Cree":"cr","Croatian":"hr","Czech":"cs","Danish":"da","Divehi,Dhivehi,Maldivian":"dv","Dzongkha":"dz","Esperanto":"eo","Estonian":"et","Ewe":"ee","Faroese":"fo","Fijian":"fj","Finnish":"fi","Fula,Fulah,Pulaar,Pular":"ff","Galician":"gl","Gaelic (Scottish)":"gd","Gaelic (Manx)":"gv","Georgian":"ka","Greek":"el","Greenlandic":"kl","Guarani":"gn","Gujarati":"gu","Haitian Creole":"ht","Hausa":"ha","Hebrew":"he","Herero":"hz","Hindi":"hi","Hiri Motu":"ho","Hungarian":"hu","Icelandic":"is","Ido":"io","Igbo":"ig","Indonesian":"id","Interlingua":"ia","Interlingue":"ie","Inuktitut":"iu","Inupiak":"ik","Irish":"ga","Italian":"it","Javanese":"jv","Kalaallisut,Greenlandic":"kl","Kannada":"kn","Kanuri":"kr","Kashmiri":"ks","Kazakh":"kk","Khmer":"km","Kikuyu":"ki","Kinyarwanda (Rwanda)":"rw","Kirundi":"rn","Kyrgyz":"ky","Komi":"kv","Kongo":"kg","Kurdish":"ku","Kwanyama":"kj","Lao":"lo","Latin":"la","Latvian (Lettish)":"lv","Limburgish ( Limburger)":"li","Lingala":"ln","Lithuanian":"lt","Luga-Katanga":"lu","Luganda,Ganda":"lg","Luxembourgish":"lb","Manx":"gv","Macedonian":"mk","Malagasy":"mg","Malay":"ms","Malayalam":"ml","Maltese":"mt","Maori":"mi","Marathi":"mr","Marshallese":"mh","Moldavian":"mo","Mongolian":"mn","Nauru":"na","Navajo":"nv","Ndonga":"ng","Northern Ndebele":"nd","Nepali":"ne","Norwegian":"no","Norwegian bokmål":"nb","Norwegian nynorsk":"nn","Nuosu":"ii","Occitan":"oc","Ojibwe":"oj","Old Church Slavonic,Old Bulgarian":"cu","Oriya":"or","Oromo (Afaan Oromo)":"om","Ossetian":"os","Pāli":"pi","Pashto,Pushto":"ps","Persian (Farsi)":"fa","Polish":"pl","Punjabi (Eastern)":"pa","Quechua":"qu","Romansh":"rm","Romanian":"ro","Sami":"se","Samoan":"sm","Sango":"sg","Sanskrit":"sa","Serbian":"sr","Serbo-Croatian":"sh","Sesotho":"st","Setswana":"tn","Shona":"sn","Sichuan Yi":"ii","Sindhi":"sd","Sinhalese":"si","Siswati":"ss","Slovak":"sk","Slovenian":"sl","Somali":"so","Southern Ndebele":"nr","Sundanese":"su","Swahili (Kiswahili)":"sw","Swati":"ss","Swedish":"sv","Tagalog":"tl","Tahitian":"ty","Tajik":"tg","Tamil":"ta","Tatar":"tt","Telugu":"te","Thai":"th","Tibetan":"bo","Tigrinya":"ti","Tonga":"to","Tsonga":"ts","Turkish":"tr","Turkmen":"tk","Twi":"tw","Uyghur":"ug","Urdu":"ur","Uzbek":"uz","Venda":"ve","Vietnamese":"vi","Volapük":"vo","Wallon":"wa","Welsh":"cy","Wolof":"wo","Western Frisian":"fy","Xhosa":"xh","Yiddish":"yi","Yoruba":"yo","Zhuang,Chuang":"za","Zulu":"zu"}
const color_bg=['#ffd4d4','#ebd4d4','#ffedd2','#edffca','#cfffd8','#deffff',false,'#d3f2ff','#d8e7ff','#d3d1ff','#f0e0ff','#fbddff','#e9e9e9']
const color_dg=['#774C4C','#634C4C','#77654A','#657742','#477750','#567777',false,'#4B6A77','#505F77','#4B4977','#685877','#735577','#616161']
const texts={"tutorials":[{
"en":"Move to the next block based on the values in variables. Variables are created in the 'Settings project' in the 'Variables' section."
},{
"en":"Text and character name settings that will be displayed in the text area. To use data from variable, use \< var_name \>. To add furigana or annotations use \< 簡単 = かんたん \>. If you write only skip then the phrase in the localization will be skipped."
},{
"en":"Customize the look of the scene, its background image and music, for subsequent dialogues and actions."
},{
"en":"Select a working folder with resources for the project."
},{
"en":"Changes in the values of variables, their values can be displayed in the text as \< var_name \> or in \"Legacy Choice\" to go to another block of script."
},{
"en":"Choose the input device that suits you. You can change the device in the settings in the 'editor' section."
},{
"en":"Mouse<br>control with the zoom wheel"
},{
"en":"TouchPad<br>recommended for laptops and MacBooks"
},{
"en":"Html file<br><br>Only index.html file will be created, after its creation it is necessary to transfer it to the working folder of the project."
},{
"en":"Zip file<br><br>All files from the working folder and index.html will be packed into a zip archive."
},{
"en":"Base64<br><br>Not recommended! All files will be combined into one html file in base64 format. Use only with a small number of files."
},{
"en":"CSV Comma-Separated Values."
},{
"en":"TSV tab separated values."
},{
"en":"the limit of the cursor size is 128×128px. Larger cursor images are ignored. However, you should limit yourself to the size 32×32 for maximum compatibility with operating systems and platforms."
},{
"en":"The variables are in story_json.parameters.variables[var_name] array"
},{
"en":"More settings for appearance and position of the choice on layout are located in the scene editor"
},{
"en":"You can set transition to a specific scene and dialogue in blok (the function may cause errors)"
},{
"en":"Telegram bot<br><br>Project export to chat bot for telegram messenger<br>Warning! some features may not be supported by bot"
},{
"en":"You can change the token for bot in the project settings. step-by-step instructions for starting bot can be found in <a href='https://kirilllive.github.io/tuesday-js/doc_editor.html#bot_telegram' target='_blank'>documentation</a>"
},{
"en":"Warning! Voices may vary across OS and browsers."
}
]}
let setup_editor={'wheel':true,'fon':'','ui':0,'lines':false,'preview':[76,0,0,1],'ferst':true,'pvw':[640,480],'lines_anim':true};
let buf=['',''],back_up=[];
if(localStorage.getItem("editor_setup")){setup_editor=JSON.parse(localStorage.getItem("editor_setup"))};
if(setup_editor.ferst){
var sel="<div class='window' style='padding:24px 8px;'><p>Devices control</p><br><hr style='margin:0;'><p class='text_tutorials_a select_tutorials'>"+texts.tutorials[5].en+"</p>"
+"<table style=' border-spacing:10px;border-collapse:separate;'><tbody><tr>"
+"<td><div style='width:256px;height:256px;border-radius:8px;' class='button_menu img_mouse' onclick='setup_editor.ferst=false;setup_editor.wheel=true;modal_window(\"close\");editor_setup();localStorage.setItem(\"editor_setup\",JSON.stringify(setup_editor));'></div><br><p style='font-size:12px;text-align:center;width:256px;' class='select_tutorials'>"+texts.tutorials[6].en+"</p></td>"
+"<td><div style='width:256px;height:256px;border-radius:8px;' class='button_menu img_touch' onclick='setup_editor.ferst=false;setup_editor.wheel=false;modal_window(\"close\");editor_setup();localStorage.setItem(\"editor_setup\",JSON.stringify(setup_editor));'></div><br><p style='font-size:12px;text-align:center;width:256px;' class='select_tutorials'>"+texts.tutorials[7].en+"</p></td>"
+"</tr></tbody></table></div>"
modal_window("open",sel);
}else{editor_setup();}
function editor_setup(){
world.className=setup_editor.fon;
screen_preview.className=setup_editor.fon;
if(setup_editor.wheel){html.style.overflow='hidden';}
if(setup_editor.ui&&setup_editor.ui!=0){set_ui(setup_editor.ui);}
if(!setup_editor.pvw){setup_editor.pvw=[640,480];}
else{html.style.overflow=(navigator.userAgent.indexOf('Firefox')>0)?'hidden':'auto';}
if(setup_editor.lines_anim){document.querySelector(':root').style.setProperty('--ls','20');}else{document.querySelector(':root').style.setProperty('--ls','0');}
document.getElementById('screen_size').getElementsByTagName('option')[1].value=(setup_editor.pvw[0]>=setup_editor.pvw[1])?setup_editor.pvw[0]:setup_editor.pvw[1]
}
// jszip
!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}(function(){return function t(e,r,i){function n(a,o){if(!r[a]){if(!e[a]){var h="function"==typeof require&&require;if(!o&&h)return h(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){return n(e[a][1][t]||t)},l,l.exports,t,e,r,i)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a<i.length;a++)n(i[a]);return n}({1:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,n,a,o,h,u,l=[],f=0,d=t.length,c=d,p="string"!==i.getTypeOf(t);f<t.length;)c=d-f,n=p?(e=t[f++],r=f<d?t[f++]:0,f<d?t[f++]:0):(e=t.charCodeAt(f++),r=f<d?t.charCodeAt(f++):0,f<d?t.charCodeAt(f++):0),a=e>>2,o=(3&e)<<4|r>>4,h=1<c?(15&r)<<2|n>>6:64,u=2<c?63&n:64,l.push(s.charAt(a)+s.charAt(o)+s.charAt(h)+s.charAt(u));return l.join("")},r.decode=function(t){var e,r,i,a,o,h,u=0,l=0,f="data:";if(t.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var d,c=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===s.charAt(64)&&c--,t.charAt(t.length-2)===s.charAt(64)&&c--,c%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=n.uint8array?new Uint8Array(0|c):new Array(0|c);u<t.length;)e=s.indexOf(t.charAt(u++))<<2|(a=s.indexOf(t.charAt(u++)))>>4,r=(15&a)<<4|(o=s.indexOf(t.charAt(u++)))>>2,i=(3&o)<<6|(h=s.indexOf(t.charAt(u++))),d[l++]=e,64!==o&&(d[l++]=r),64!==h&&(d[l++]=i);return d}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n}s=t("./stream/DataLengthProbe"),o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var i=t("./utils"),n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var s=n,a=0+r;t^=-1;for(var o=0;o<a;o++)t=t>>>8^s[255&(t^e[o])];return-1^t}(0|e,t,t.length):function(t,e,r,i){var s=n,a=0+r;t^=-1;for(var o=0;o<a;o++)t=t>>>8^s[255&(t^e.charCodeAt(o))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function i(t,e){var r,i="";for(r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i}function n(t,e,r,n,a,l){var f,d,c=t.file,p=t.compression,m=l!==o.utf8encode,_=s.transformTo("string",l(c.name)),g=s.transformTo("string",o.utf8encode(c.name)),b=c.comment,v=s.transformTo("string",l(b)),y=s.transformTo("string",o.utf8encode(b)),w=g.length!==c.name.length,k=y.length!==b.length,x="",S="",z="",C=c.dir,E=c.date,A={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(A.crc32=t.crc32,A.compressedSize=t.compressedSize,A.uncompressedSize=t.uncompressedSize);var I=0;e&&(I|=8),m||!w&&!k||(I|=2048);var O=0,B=0;C&&(O|=16),"UNIX"===a?(B=798,O|=function(t,e){var r=t;return t||(r=C?16893:33204),(65535&r)<<16}(c.unixPermissions)):(B=20,O|=63&(c.dosPermissions||0)),f=E.getUTCHours(),f<<=6,f|=E.getUTCMinutes(),f<<=5,f|=E.getUTCSeconds()/2,d=E.getUTCFullYear()-1980,d<<=4,d|=E.getUTCMonth()+1,d<<=5,d|=E.getUTCDate(),w&&(S=i(1,1)+i(h(_),4)+g,x+="up"+i(S.length,2)+S),k&&(z=i(1,1)+i(h(v),4)+y,x+="uc"+i(z.length,2)+z);var R="";return R+="\n\0",R+=i(I,2),R+=p.magic,R+=i(f,2),R+=i(d,2),R+=i(A.crc32,4),R+=i(A.compressedSize,4),R+=i(A.uncompressedSize,4),R+=i(_.length,2),R+=i(x.length,2),{fileRecord:u.LOCAL_FILE_HEADER+R+_+x,dirRecord:u.CENTRAL_FILE_HEADER+i(B,2)+R+i(v.length,2)+"\0\0\0\0"+i(O,4)+i(n,4)+_+x+v}}var s=t("../utils"),a=t("../stream/GenericWorker"),o=t("../utf8"),h=t("../crc32"),u=t("../signature");function l(t,e,r,i){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(l,a),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=n(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=n(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return u.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r=this.bytesWritten-t,n=function(t,e,r,n,a){var o=s.transformTo("string",a(n));return u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(t,2)+i(t,2)+i(e,4)+i(r,4)+i(o.length,2)+o}(this.dirRecords.length,r,t,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()}),t.on("error",function(t){e.error(t)}),this},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(t){var e=this._sources;if(!a.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},l.prototype.lock=function(){a.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var i=t("../compressions"),n=t("./ZipFileWorker");r.generateWorker=function(t,e,r){var s=new n(e.streamFiles,r,e.platform,e.encodeFileName),a=0;try{t.forEach(function(t,r){a++;var n=function(t,e){var r=t||e,n=i[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(r.options.compression,e.compression),o=r.options.compressionOptions||e.compressionOptions||{},h=r.dir,u=r.date;r._compressWorker(n,o).withStreamInfo("file",{name:t,dir:h,date:u,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(s)}),s.entriesCount=a}catch(t){s.error(t)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new i;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.5.0",i.loadAsync=function(t,e){return(new i).loadAsync(t,e)},i.external=t("./external"),e.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./external"),s=t("./utf8"),a=(i=t("./utils"),t("./zipEntries")),o=t("./stream/Crc32Probe"),h=t("./nodejsUtils");function u(t){return new n.Promise(function(e,r){var i=t.decompressed.getContentWorker().pipe(new o);i.on("error",function(t){r(t)}).on("end",function(){i.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}e.exports=function(t,e){var r=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),h.isNode&&h.isStream(t)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then(function(t){var r=new a(e);return r.load(t),r}).then(function(t){var r=[n.Promise.resolve(t)],i=t.files;if(e.checkCRC32)for(var s=0;s<i.length;s++)r.push(u(i[s]));return n.Promise.all(r)}).then(function(t){for(var i=t.shift(),n=i.files,s=0;s<n.length;s++){var a=n[s];r.file(a.fileNameStr,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:e.createFolders})}return i.zipComment.length&&(r.comment=i.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../stream/GenericWorker");function s(t,e){n.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}i.inherits(s,n),s.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",function(t){e.push({data:t,meta:{percent:0}})}).on("error",function(t){e.isPaused?this.generatedError=t:e.error(t)}).on("end",function(){e.isPaused?e._upstreamEnded=!0:e.end()})},s.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var i=t("readable-stream").Readable;function n(t,e,r){i.call(this,e),this._helper=t;var n=this;t.on("data",function(t,e){n.push(t)||n._helper.pause(),r&&r(e)}).on("error",function(t){n.emit("error",t)}).on("end",function(){n.push(null)})}t("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},e.exports=n},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,r){"use strict";function i(t,e,r){var i,n=s.getTypeOf(e),o=s.extend(r||{},h);o.date=o.date||new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(t=m(t)),o.createFolders&&(i=p(t))&&_.call(this,i,!0);var f="string"===n&&!1===o.binary&&!1===o.base64;r&&void 0!==r.binary||(o.binary=!f),(e instanceof u&&0===e.uncompressedSize||o.dir||!e||0===e.length)&&(o.base64=!1,o.binary=!0,e="",o.compression="STORE",n="string");var g;g=e instanceof u||e instanceof a?e:d.isNode&&d.isStream(e)?new c(t,e):s.prepareContent(t,e,o.binary,o.optimizedBinaryString,o.base64);var b=new l(t,g,o);this.files[t]=b}var n=t("./utf8"),s=t("./utils"),a=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),h=t("./defaults"),u=t("./compressedObject"),l=t("./zipObject"),f=t("./generate"),d=t("./nodejsUtils"),c=t("./nodejs/NodejsStreamInputAdapter"),p=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},_=function(t,e){return e=void 0!==e?e:h.createFolders,t=m(t),this.files[t]||i.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function g(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,i;for(e in this.files)this.files.hasOwnProperty(e)&&(i=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,i))},filter:function(t){var e=[];return this.forEach(function(r,i){t(r,i)&&e.push(i)}),e},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,i.call(this,t,e,r),this;if(g(t)){var n=t;return this.filter(function(t,e){return!e.dir&&n.test(t)})}var s=this.files[this.root+t];return s&&!s.dir?s:null},folder:function(t){if(!t)return this;if(g(t))return this.filter(function(e,r){return r.dir&&t.test(e)});var e=this.root+t,r=_.call(this,e),i=this.clone();return i.root=r.name,i},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter(function(e,r){return r.name.slice(0,t.length)===t}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var i=r.comment||this.comment||"";e=f.generateWorker(this,r,i)}catch(t){(e=new a("error")).error(t)}return new o(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=b},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data[this.zero+t]},n.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===e&&this.data[s+1]===r&&this.data[s+2]===i&&this.data[s+3]===n)return s-this.zero;return-1},n.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),i=t.charCodeAt(2),n=t.charCodeAt(3),s=this.readData(4);return e===s[0]&&r===s[1]&&i===s[2]&&n===s[3]},n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var i=t("../utils");function n(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,r){"use strict";var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}n.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",function(t){e.processChunk(t)}),t.on("end",function(){e.end()}),t.on("error",function(t){e.error(t)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=i},{}],29:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),a=t("../base64"),o=t("../support"),h=t("../external"),u=null;if(o.nodestream)try{u=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,e,r){var a=e;switch(e){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=e,this._mimeType=r,i.checkSupport(a),this._worker=t.pipe(new n(a)),t.lock()}catch(t){this._worker=new s("error"),this._worker.error(t)}}l.prototype={accumulate:function(t){return function(t,e){return new h.Promise(function(r,n){var s=[],o=t._internalType,h=t._outputType,u=t._mimeType;t.on("data",function(t,r){s.push(t),e&&e(r)}).on("error",function(t){s=[],n(t)}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),r);case"base64":return a.encode(e);default:return i.transformTo(t,e)}}(h,function(t,e){var r,i=0,n=null,s=0;for(r=0;r<e.length;r++)s+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(n=new Uint8Array(s),r=0;r<e.length;r++)n.set(e[r],i),i+=e[r].length;return n;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(o,s),u);r(t)}catch(t){n(t)}s=[]}).resume()})}(this,t)},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,function(t){e.call(r,t.data,t.meta)}):this._worker.on(t,function(){i.delay(e,arguments,r)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(i.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new u(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var i=new ArrayBuffer(0);try{r.blob=0===new Blob([i],{type:"application/zip"}).size}catch(t){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(i),r.blob=0===n.getBlob("application/zip").size}catch(t){r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch(t){r.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,r){"use strict";for(var i=t("./utils"),n=t("./support"),s=t("./nodejsUtils"),a=t("./stream/GenericWorker"),o=new Array(256),h=0;h<256;h++)o[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function u(){a.call(this,"utf-8 decode"),this.leftOver=null}function l(){a.call(this,"utf-8 encode")}o[254]=o[254]=1,r.utf8encode=function(t){return n.nodebuffer?s.newBufferFrom(t,"utf-8"):function(t){var e,r,i,s,a,o=t.length,h=0;for(s=0;s<o;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),h+=r<128?1:r<2048?2:r<65536?3:4;for(e=n.uint8array?new Uint8Array(h):new Array(h),s=a=0;a<h;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?e[a++]=r:(r<2048?e[a++]=192|r>>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return n.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,n,s,a=t.length,h=new Array(2*a);for(e=r=0;e<a;)if((n=t[e++])<128)h[r++]=n;else if(4<(s=o[n]))h[r++]=65533,e+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&e<a;)n=n<<6|63&t[e++],s--;1<s?h[r++]=65533:n<65536?h[r++]=n:(n-=65536,h[r++]=55296|n>>10&1023,h[r++]=56320|1023&n)}return h.length!==r&&(h.subarray?h=h.subarray(0,r):h.length=r),i.applyFromCharCode(h)}(t=i.transformTo(n.uint8array?"uint8array":"array",t))},i.inherits(u,a),u.prototype.processChunk=function(t){var e=i.transformTo(n.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var s=e;(e=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),e.set(s,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+o[t[r]]>e?r:e}(e),h=e;a!==e.length&&(n.uint8array?(h=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(h=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(h),meta:t.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,i.inherits(l,a),l.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var i=t("./support"),n=t("./base64"),s=t("./nodejsUtils"),a=t("set-immediate-shim"),o=t("./external");function h(t){return t}function u(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(r){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return i.append(t),i.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(t,e,r){var i=[],n=0,s=t.length;if(s<=r)return String.fromCharCode.apply(null,t);for(;n<s;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,t.slice(n,Math.min(n+r,s)))):i.push(String.fromCharCode.apply(null,t.subarray(n,Math.min(n+r,s)))),n+=r;return i.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(t){return!1}}()}};function f(t){var e=65536,i=r.getTypeOf(t),n=!0;if("uint8array"===i?n=l.applyCanBeUsed.uint8array:"nodebuffer"===i&&(n=l.applyCanBeUsed.nodebuffer),n)for(;1<e;)try{return l.stringifyByChunk(t,i,e)}catch(t){e=Math.floor(e/2)}return l.stringifyByChar(t)}function d(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}r.applyFromCharCode=f;var c={};c.string={string:h,array:function(t){return u(t,new Array(t.length))},arraybuffer:function(t){return c.string.uint8array(t).buffer},uint8array:function(t){return u(t,new Uint8Array(t.length))},nodebuffer:function(t){return u(t,s.allocBuffer(t.length))}},c.array={string:f,array:h,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(t)}},c.arraybuffer={string:function(t){return f(new Uint8Array(t))},array:function(t){return d(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:h,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return s.newBufferFrom(new Uint8Array(t))}},c.uint8array={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:h,nodebuffer:function(t){return s.newBufferFrom(t)}},c.nodebuffer={string:f,array:function(t){return d(t,new Array(t.length))},arraybuffer:function(t){return c.nodebuffer.uint8array(t).buffer},uint8array:function(t){return d(t,new Uint8Array(t.length))},nodebuffer:h},r.transformTo=function(t,e){if(e=e||"",!t)return e;r.checkSupport(t);var i=r.getTypeOf(e);return c[i][t](e)},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":i.nodebuffer&&s.isBuffer(t)?"nodebuffer":i.uint8array&&t instanceof Uint8Array?"uint8array":i.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){if(!i[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,i="";for(r=0;r<(t||"").length;r++)i+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return i},r.delay=function(t,e,r){a(function(){t.apply(r||null,e||[])})},r.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,s,a,h){return o.Promise.resolve(e).then(function(t){return i.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new o.Promise(function(e,r){var i=new FileReader;i.onload=function(t){e(t.target.result)},i.onerror=function(t){r(t.target.error)},i.readAsArrayBuffer(t)}):t}).then(function(e){var l=r.getTypeOf(e);return l?("arraybuffer"===l?e=r.transformTo("uint8array",e):"string"===l&&(h?e=n.decode(e):s&&!0!==a&&(e=function(t){return u(t,i.uint8array?new Uint8Array(t.length):new Array(t.length))}(e))),e):o.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){"use strict";var i=t("./reader/readerFor"),n=t("./utils"),s=t("./signature"),a=t("./zipEntry"),o=(t("./utf8"),t("./support"));function h(t){this.files=[],this.loadOptions=t}h.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(e)+", expected "+n.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var i=this.reader.readString(4)===e;return this.reader.setIndex(r),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=o.uint8array?"uint8array":"array",r=n.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,i=this.zip64EndOfCentralSize-44;0<i;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(t=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? ifit is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var e=t;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var i=e-r;if(0<i)this.isSignature(e,s.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(t){this.reader=i(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){"use strict";var i=t("./reader/readerFor"),n=t("./utils"),s=t("./compressedObject"),a=t("./crc32"),o=t("./utf8"),h=t("./compressions"),u=t("./support");function l(t,e){this.options=t,this.loadOptions=e}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in h)if(h.hasOwnProperty(e)&&h[e].magic===t)return h[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<n;)e=t.readInt(2),r=t.readInt(2),i=t.readData(r),this.extraFields[e]={id:e,length:r,value:i};t.setIndex(n)},handleUTF8:function(){var t=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=n.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var s=n.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=i(t.value);return 1!==e.readInt(1)?null:a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}return null}},e.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){"use strict";function i(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var n=t("./stream/StreamHelper"),s=t("./stream/DataWorker"),a=t("./utf8"),o=t("./compressedObject"),h=t("./stream/GenericWorker");i.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var i="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var s=!this._dataBinary;s&&!i&&(e=e.pipe(new a.Utf8EncodeWorker)),!s&&i&&(e=e.pipe(new a.Utf8DecodeWorker))}catch(t){(e=new h("error")).error(t)}return new n(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof o&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new s(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)i.prototype[u[f]]=l;e.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,r){(function(t){"use strict";var r,i,n=t.MutationObserver||t.WebKitMutationObserver;if(n){var s=0,a=new n(l),o=t.document.createTextNode("");a.observe(o,{characterData:!0}),r=function(){o.data=s=++s%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var h=new t.MessageChannel;h.port1.onmessage=l,r=function(){h.port2.postMessage(0)}}var u=[];function l(){var t,e;i=!0;for(var r=u.length;r;){for(e=u,u=[],t=-1;++t<r;)e[t]();r=u.length}i=!1}e.exports=function(t){1!==u.push(t)||i||r()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,r){"use strict";var i=t("immediate");function n(){}var s={},a=["REJECTED"],o=["FULFILLED"],h=["PENDING"];function u(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=h,this.queue=[],this.outcome=void 0,t!==n&&c(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(t,e,r){i(function(){var i;try{i=e(r)}catch(i){return s.reject(t,i)}i===t?s.reject(t,new TypeError("Cannot resolve promise with itself")):s.resolve(t,i)})}function d(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function c(t,e){var r=!1;function i(e){r||(r=!0,s.reject(t,e))}function n(e){r||(r=!0,s.resolve(t,e))}var a=p(function(){e(n,i)});"error"===a.status&&i(a.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}(e.exports=u).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then(function(r){return e.resolve(t()).then(function(){return r})},function(r){return e.resolve(t()).then(function(){throw r})})},u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){if("function"!=typeof t&&this.state===o||"function"!=typeof e&&this.state===a)return this;var r=new this.constructor(n);return this.state!==h?f(r,this.state===o?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){s.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){f(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){s.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){f(this.promise,this.onRejected,t)},s.resolve=function(t,e){var r=p(d,e);if("error"===r.status)return s.reject(t,r.value);var i=r.value;if(i)c(t,i);else{t.state=o,t.outcome=e;for(var n=-1,a=t.queue.length;++n<a;)t.queue[n].callFulfilled(e)}return t},s.reject=function(t,e){t.state=a,t.outcome=e;for(var r=-1,i=t.queue.length;++r<i;)t.queue[r].callRejected(e);return t},u.resolve=function(t){return t instanceof this?t:s.resolve(new this(n),t)},u.reject=function(t){var e=new this(n);return s.reject(e,t)},u.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,i=!1;if(!r)return this.resolve([]);for(var a=new Array(r),o=0,h=-1,u=new this(n);++h<r;)l(t[h],h);return u;function l(t,n){e.resolve(t).then(function(t){a[n]=t,++o!==r||i||(i=!0,s.resolve(u,a))},function(t){i||(i=!0,s.reject(u,t))})}},u.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,r=!1;if(!e)return this.resolve([]);for(var i,a=-1,o=new this(n);++a<e;)i=t[a],this.resolve(i).then(function(t){r||(r=!0,s.resolve(o,t))},function(t){r||(r=!0,s.reject(o,t))});return o}},{immediate:36}],38:[function(t,e,r){"use strict";var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";var i=t("./zlib/deflate"),n=t("./utils/common"),s=t("./utils/strings"),a=t("./zlib/messages"),o=t("./zlib/zstream"),h=Object.prototype.toString,u=0,l=-1,f=0,d=8;function c(t){if(!(this instanceof c))return new c(t);this.options=n.assign({level:l,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==u)throw new Error(a[r]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var p;if(p="string"==typeof e.dictionary?s.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(r=i.deflateSetDictionary(this.strm,p))!==u)throw new Error(a[r]);this._dict_set=!0}}function p(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}c.prototype.push=function(t,e){var r,a,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=s.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new n.Buf8(l),o.next_out=0,o.avail_out=l),1!==(r=i.deflate(o,a))&&r!==u)return this.onEnd(r),!(this.ended=!0);0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(n.shrinkBuf(o.output,o.next_out))):this.onData(n.shrinkBuf(o.output,o.next_out)))}while((0<o.avail_in||0===o.avail_out)&&1!==r);return 4===a?(r=i.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u):2!==a||(this.onEnd(u),!(o.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=c,r.deflate=p,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,p(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,p(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";var i=t("./zlib/inflate"),n=t("./utils/common"),s=t("./utils/strings"),a=t("./zlib/constants"),o=t("./zlib/messages"),h=t("./zlib/zstream"),u=t("./zlib/gzheader"),l=Object.prototype.toString;function f(t){if(!(this instanceof f))return new f(t);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var r=i.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(o[r]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function d(t,e){var r=new f(e);if(r.push(t,!0),r.err)throw r.msg||o[r.err];return r.result}f.prototype.push=function(t,e){var r,o,h,u,f,d,c=this.strm,p=this.options.chunkSize,m=this.options.dictionary,_=!1;if(this.ended)return!1;o=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?c.input=s.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?c.input=new Uint8Array(t):c.input=t,c.next_in=0,c.avail_in=c.input.length;do{if(0===c.avail_out&&(c.output=new n.Buf8(p),c.next_out=0,c.avail_out=p),(r=i.inflate(c,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(d="string"==typeof m?s.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,r=i.inflateSetDictionary(this.strm,d)),r===a.Z_BUF_ERROR&&!0===_&&(r=a.Z_OK,_=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),!(this.ended=!0);c.next_out&&(0!==c.avail_out&&r!==a.Z_STREAM_END&&(0!==c.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(h=s.utf8border(c.output,c.next_out),u=c.next_out-h,f=s.buf2string(c.output,h),c.next_out=u,c.avail_out=p-u,u&&n.arraySet(c.output,c.output,h,u,0),this.onData(f)):this.onData(n.shrinkBuf(c.output,c.next_out)))),0===c.avail_in&&0===c.avail_out&&(_=!0)}while((0<c.avail_in||0===c.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(r=i.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(c.avail_out=0))},f.prototype.onData=function(t){this.chunks.push(t)},f.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=f,r.inflate=d,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,d(t,e)},r.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,r,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+i),n);else for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){var e,r,i,n,s,a;for(e=i=0,r=t.length;e<r;e++)i+=t[e].length;for(a=new Uint8Array(i),e=n=0,r=t.length;e<r;e++)s=t[e],a.set(s,n),n+=s.length;return a}},s={arraySet:function(t,e,r,i,n){for(var s=0;s<i;s++)t[n+s]=e[r+s]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(i)},{}],42:[function(t,e,r){"use strict";var i=t("./common"),n=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var a=new i.Buf8(256),o=0;o<256;o++)a[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function h(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&n))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",a=0;a<e;a++)r+=String.fromCharCode(t[a]);return r}a[254]=a[254]=1,r.string2buf=function(t){var e,r,n,s,a,o=t.length,h=0;for(s=0;s<o;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(n=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),h+=r<128?1:r<2048?2:r<65536?3:4;for(e=new i.Buf8(h),s=a=0;a<h;s++)55296==(64512&(r=t.charCodeAt(s)))&&s+1<o&&56320==(64512&(n=t.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),r<128?e[a++]=r:(r<2048?e[a++]=192|r>>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e},r.buf2binstring=function(t){return h(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;r<n;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,n,s,o=e||t.length,u=new Array(2*o);for(r=i=0;r<o;)if((n=t[r++])<128)u[i++]=n;else if(4<(s=a[n]))u[i++]=65533,r+=s-1;else{for(n&=2===s?31:3===s?15:7;1<s&&r<o;)n=n<<6|63&t[r++],s--;1<s?u[i++]=65533:n<65536?u[i++]=n:(n-=65536,u[i++]=55296|n>>10&1023,u[i++]=56320|1023&n)}return h(u,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+a[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(n=n+e[i++]|0)|0,--a;);n%=65521,s%=65521}return n|s<<16|0}},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,n){var s=i,a=n+r;t^=-1;for(var o=n;o<a;o++)t=t>>>8^s[255&(t^e[o])];return-1^t}},{}],46:[function(t,e,r){"use strict";var i,n=t("../utils/common"),s=t("./trees"),a=t("./adler32"),o=t("./crc32"),h=t("./messages"),u=0,l=4,f=0,d=-2,c=-1,p=4,m=2,_=8,g=9,b=286,v=30,y=19,w=2*b+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(t,e){return t.msg=h[e],e}function T(t){return(t<<1)-(4<t?9:0)}function D(t){for(var e=t.length;0<=--e;)t[e]=0}function F(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(n.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function N(t,e){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,F(t.strm)}function U(t,e){t.pending_buf[t.pending++]=e}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-z?t.strstart-(t.w_size-z):0,u=t.window,l=t.w_mask,f=t.prev,d=t.strstart+S,c=u[s+a-1],p=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===c&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<d);if(i=S-(d-s),s=d-S,a<i){if(t.match_start=e,o<=(a=i))break;c=u[s+a-1],p=u[s+a]}}}while((e=f[e&l])>h&&0!=--n);return a<=t.lookahead?a:t.lookahead}function j(t){var e,r,i,s,h,u,l,f,d,c,p=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-z)){for(n.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;i=t.head[--e],t.head[e]=p<=i?i-p:0,--r;);for(e=r=p;i=t.prev[--e],t.prev[e]=p<=i?i-p:0,--r;);s+=p}if(0===t.strm.avail_in)break;if(u=t.strm,l=t.window,f=t.strstart+t.lookahead,c=void 0,(d=s)<(c=u.avail_in)&&(c=d),r=0===c?0:(u.avail_in-=c,n.arraySet(l,u.input,u.next_in,c,f),1===u.state.wrap?u.adler=a(u.adler,l,c,f):2===u.state.wrap&&(u.adler=o(u.adler,l,c,f)),u.next_in+=c,u.total_in+=c,c),t.lookahead+=r,t.lookahead+t.insert>=x)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+x-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<z&&0!==t.strm.avail_in)}function Z(t,e){for(var r,i;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===u)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r)),t.match_length>=x)if(i=s._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===l?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function W(t,e){for(var r,i,n;;){if(t.lookahead<z){if(j(t),t.lookahead<z&&e===u)return A;if(0===t.lookahead)break}if(r=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-z&&(t.match_length=L(t,r),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,i&&(N(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((i=s._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=s._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===l?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}function M(t,e,r,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=i,this.func=n}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(2*w),this.dyn_dtree=new n.Buf16(2*(2*v+1)),this.bl_tree=new n.Buf16(2*(2*y+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(k+1),this.heap=new n.Buf16(2*b+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*b+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=m,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?C:E,t.adler=2===e.wrap?0:1,e.last_flush=u,s._tr_init(e),f):R(t,d)}function K(t){var e=G(t);return e===f&&function(t){t.window_size=2*t.w_size,D(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=x-1,t.match_available=0,t.ins_h=0}(t.state),e}function Y(t,e,r,i,s,a){if(!t)return d;var o=1;if(e===c&&(e=6),i<0?(o=0,i=-i):15<i&&(o=2,i-=16),s<1||g<s||r!==_||i<8||15<i||e<0||9<e||a<0||p<a)return R(t,d);8===i&&(i=9);var h=new H;return(t.state=h).strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=s+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+x-1)/x),h.window=new n.Buf8(2*h.w_size),h.head=new n.Buf16(h.hash_size),h.prev=new n.Buf16(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new n.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=a,h.method=r,K(t)}i=[new M(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(j(t),0===t.lookahead&&e===u)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-z&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===l?(N(t,!0),0===t.strm.avail_out?O:B):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(t,e){return Y(t,e,_,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?d:(t.state.gzhead=e,f):d},r.deflate=function(t,e){var r,n,a,h;if(!t||!t.state||5<e||e<0)return t?R(t,d):d;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&e!==l)return R(t,0===t.avail_out?-5:d);if(n.strm=t,r=n.last_flush,n.last_flush=e,n.status===C)if(2===n.wrap)t.adler=0,U(n,31),U(n,139),U(n,8),n.gzhead?(U(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),U(n,255&n.gzhead.time),U(n,n.gzhead.time>>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=o(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var c=_+(n.w_bits-8<<4)<<8;c|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(c|=32),c+=31-c%31,n.status=E,P(n,c),0!==n.strstart&&(P(n,t.adler>>>16),P(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(a=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),F(t),a=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),F(t),a=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,U(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),0===h&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),F(t),a=n.pending,n.pending===n.pending_buf_size)){h=1;break}h=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,U(n,h)}while(0!==h);n.gzhead.hcrc&&n.pending>a&&(t.adler=o(t.adler,n.pending_buf,n.pending-a,a)),0===h&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(t),n.pending+2<=n.pending_buf_size&&(U(n,255&t.adler),U(n,t.adler>>8&255),t.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(t),0===t.avail_out)return n.last_flush=-1,f}else if(0===t.avail_in&&T(e)<=T(r)&&e!==l)return R(t,-5);if(666===n.status&&0!==t.avail_in)return R(t,-5);if(0!==t.avail_in||0!==n.lookahead||e!==u&&666!==n.status){var p=2===n.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(j(t),0===t.lookahead)){if(e===u)return A;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===l?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(n,e):3===n.strategy?function(t,e){for(var r,i,n,a,o=t.window;;){if(t.lookahead<=S){if(j(t),t.lookahead<=S&&e===u)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(i=o[n=t.strstart-1])===o[++n]&&i===o[++n]&&i===o[++n]){a=t.strstart+S;do{}while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);t.match_length=S-(a-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(r=s._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===l?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(n,e):i[n.level].func(n,e);if(p!==O&&p!==B||(n.status=666),p===A||p===O)return 0===t.avail_out&&(n.last_flush=-1),f;if(p===I&&(1===e?s._tr_align(n):5!==e&&(s._tr_stored_block(n,0,0,!1),3===e&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(t),0===t.avail_out))return n.last_flush=-1,f}return e!==l?f:n.wrap<=0?1:(2===n.wrap?(U(n,255&t.adler),U(n,t.adler>>8&255),U(n,t.adler>>16&255),U(n,t.adler>>24&255),U(n,255&t.total_in),U(n,t.total_in>>8&255),U(n,t.total_in>>16&255),U(n,t.total_in>>24&255)):(P(n,t.adler>>>16),P(n,65535&t.adler)),F(t),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?f:1)},r.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==C&&69!==e&&73!==e&&91!==e&&103!==e&&e!==E&&666!==e?R(t,d):(t.state=null,e===E?R(t,-3):f):d},r.deflateSetDictionary=function(t,e){var r,i,s,o,h,u,l,c,p=e.length;if(!t||!t.state)return d;if(2===(o=(r=t.state).wrap)||1===o&&r.status!==C||r.lookahead)return d;for(1===o&&(t.adler=a(t.adler,e,p,0)),r.wrap=0,p>=r.w_size&&(0===o&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new n.Buf8(r.w_size),n.arraySet(c,e,p-r.w_size,r.w_size,0),e=c,p=r.w_size),h=t.avail_in,u=t.next_in,l=t.input,t.avail_in=p,t.next_in=0,t.input=e,j(r);r.lookahead>=x;){for(i=r.strstart,s=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+x-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++,--s;);r.strstart=i,r.lookahead=x-1,j(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,t.next_in=u,t.input=l,t.avail_in=h,r.wrap=o,f},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,r){"use strict";e.exports=function(t,e){var r,i,n,s,a,o,h,u,l,f,d,c,p,m,_,g,b,v,y,w,k,x,S,z,C;r=t.state,i=t.next_in,z=t.input,n=i+(t.avail_in-5),s=t.next_out,C=t.output,a=s-(e-t.avail_out),o=s+(t.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,d=r.window,c=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=m[c&g];e:for(;;){if(c>>>=y=v>>>24,p-=y,0==(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(c&(1<<y)-1)];continue e}if(32&y){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&v,(y&=15)&&(p<y&&(c+=z[i++]<<p,p+=8),w+=c&(1<<y)-1,c>>>=y,p-=y),p<15&&(c+=z[i++]<<p,p+=8,c+=z[i++]<<p,p+=8),v=_[c&b];r:for(;;){if(c>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(c&(1<<y)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(k=65535&v,p<(y&=15)&&(c+=z[i++]<<p,(p+=8)<y&&(c+=z[i++]<<p,p+=8)),h<(k+=c&(1<<y)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(c>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=d,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=d[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=d[x++],--y;);x=s-k,S=C}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=d[x++],--y;);x=s-k,S=C}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]))}else{for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]))}break}}break}}while(i<n&&s<o);i-=w=p>>3,c&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<o?o-s+257:257-(s-o),r.hold=c,r.bits=p}},{}],49:[function(t,e,r){"use strict";var i=t("../utils/common"),n=t("./adler32"),s=t("./crc32"),a=t("./inffast"),o=t("./inftrees"),h=1,u=2,l=0,f=-2,d=1,c=852,p=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function g(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=d,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(c),e.distcode=e.distdyn=new i.Buf32(p),e.sane=1,e.back=-1,l):f}function b(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,g(t)):f}function v(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?f:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=r,i.wbits=e,b(t))):f}function y(t,e){var r,i;return t?(i=new _,(t.state=i).window=null,(r=v(t,e))!==l&&(t.state=null),r):f}var w,k,x=!0;function S(t){if(x){var e;for(w=new i.Buf32(512),k=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(o(h,t.lens,0,288,w,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;o(u,t.lens,0,32,k,0,t.work,{bits:5}),x=!1}t.lencode=w,t.lenbits=9,t.distcode=k,t.distbits=5}function z(t,e,r,n){var s,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),n>=a.wsize?(i.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n<(s=a.wsize-a.wnext)&&(s=n),i.arraySet(a.window,e,r-n,s,a.wnext),(n-=s)?(i.arraySet(a.window,e,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}r.inflateReset=b,r.inflateReset2=v,r.inflateResetKeep=g,r.inflateInit=function(t){return y(t,15)},r.inflateInit2=y,r.inflate=function(t,e){var r,c,p,_,g,b,v,y,w,k,x,C,E,A,I,O,B,R,T,D,F,N,U,P,L=0,j=new i.Buf8(4),Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return f;12===(r=t.state).mode&&(r.mode=13),g=t.next_out,p=t.output,v=t.avail_out,_=t.next_in,c=t.input,b=t.avail_in,y=r.hold,w=r.bits,k=b,x=v,N=l;t:for(;;)switch(r.mode){case d:if(0===r.wrap){r.mode=13;break}for(;w<16;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(2&r.wrap&&35615===y){j[r.check=0]=255&y,j[1]=y>>>8&255,r.check=s(r.check,j,2,0),w=y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&y)){t.msg="unknown compression method",r.mode=30;break}if(w-=4,F=8+(15&(y>>>=4)),0===r.wbits)r.wbits=F;else if(F>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<F,t.adler=r.check=1,r.mode=512&y?10:12,w=y=0;break;case 2:for(;w<16;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(r.flags=y,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=y>>8&1),512&r.flags&&(j[0]=255&y,j[1]=y>>>8&255,r.check=s(r.check,j,2,0)),w=y=0,r.mode=3;case 3:for(;w<32;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}r.head&&(r.head.time=y),512&r.flags&&(j[0]=255&y,j[1]=y>>>8&255,j[2]=y>>>16&255,j[3]=y>>>24&255,r.check=s(r.check,j,4,0)),w=y=0,r.mode=4;case 4:for(;w<16;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}r.head&&(r.head.xflags=255&y,r.head.os=y>>8),512&r.flags&&(j[0]=255&y,j[1]=y>>>8&255,r.check=s(r.check,j,2,0)),w=y=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}r.length=y,r.head&&(r.head.extra_len=y),512&r.flags&&(j[0]=255&y,j[1]=y>>>8&255,r.check=s(r.check,j,2,0)),w=y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(b<(C=r.length)&&(C=b),C&&(r.head&&(F=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),i.arraySet(r.head.extra,c,_,C,F)),512&r.flags&&(r.check=s(r.check,c,C,_)),b-=C,_+=C,r.length-=C),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===b)break t;for(C=0;F=c[_+C++],r.head&&F&&r.length<65536&&(r.head.name+=String.fromCharCode(F)),F&&C<b;);if(512&r.flags&&(r.check=s(r.check,c,C,_)),b-=C,_+=C,F)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===b)break t;for(C=0;F=c[_+C++],r.head&&F&&r.length<65536&&(r.head.comment+=String.fromCharCode(F)),F&&C<b;);if(512&r.flags&&(r.check=s(r.check,c,C,_)),b-=C,_+=C,F)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;w<16;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(y!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}w=y=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;w<32;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}t.adler=r.check=m(y),w=y=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=g,t.avail_out=v,t.next_in=_,t.avail_in=b,r.hold=y,r.bits=w,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){y>>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}switch(r.last=1&y,w-=1,3&(y>>>=1)){case 0:r.mode=14;break;case 1:if(S(r),r.mode=20,6!==e)break;y>>>=2,w-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}y>>>=2,w-=2;break;case 14:for(y>>>=7&w,w-=7&w;w<32;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if((65535&y)!=(y>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&y,w=y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(C=r.length){if(b<C&&(C=b),v<C&&(C=v),0===C)break t;i.arraySet(p,c,_,C,g),b-=C,_+=C,v-=C,g+=C,r.length-=C;break}r.mode=12;break;case 17:for(;w<14;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(r.nlen=257+(31&y),y>>>=5,w-=5,r.ndist=1+(31&y),y>>>=5,w-=5,r.ncode=4+(15&y),y>>>=4,w-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;w<3;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}r.lens[Z[r.have++]]=7&y,y>>>=3,w-=3}for(;r.have<19;)r.lens[Z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,U={bits:r.lenbits},N=o(0,r.lens,0,19,r.lencode,0,r.work,U),r.lenbits=U.bits,N){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;O=(L=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,B=65535&L,!((I=L>>>24)<=w);){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(B<16)y>>>=I,w-=I,r.lens[r.have++]=B;else{if(16===B){for(P=I+2;w<P;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(y>>>=I,w-=I,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}F=r.lens[r.have-1],C=3+(3&y),y>>>=2,w-=2}else if(17===B){for(P=I+3;w<P;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}w-=I,F=0,C=3+(7&(y>>>=I)),y>>>=3,w-=3}else{for(P=I+7;w<P;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}w-=I,F=0,C=11+(127&(y>>>=I)),y>>>=7,w-=7}if(r.have+C>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;C--;)r.lens[r.have++]=F}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,U={bits:r.lenbits},N=o(h,r.lens,0,r.nlen,r.lencode,0,r.work,U),r.lenbits=U.bits,N){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,U={bits:r.distbits},N=o(u,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,U),r.distbits=U.bits,N){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=b&&258<=v){t.next_out=g,t.avail_out=v,t.next_in=_,t.avail_in=b,r.hold=y,r.bits=w,a(t,x),g=t.next_out,p=t.output,v=t.avail_out,_=t.next_in,c=t.input,b=t.avail_in,y=r.hold,w=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;O=(L=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,B=65535&L,!((I=L>>>24)<=w);){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(O&&0==(240&O)){for(R=I,T=O,D=B;O=(L=r.lencode[D+((y&(1<<R+T)-1)>>R)])>>>16&255,B=65535&L,!(R+(I=L>>>24)<=w);){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}y>>>=R,w-=R,r.back+=R}if(y>>>=I,w-=I,r.back+=I,r.length=B,0===O){r.mode=26;break}if(32&O){r.back=-1,r.mode=12;break}if(64&O){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&O,r.mode=22;case 22:if(r.extra){for(P=r.extra;w<P;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}r.length+=y&(1<<r.extra)-1,y>>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;O=(L=r.distcode[y&(1<<r.distbits)-1])>>>16&255,B=65535&L,!((I=L>>>24)<=w);){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(0==(240&O)){for(R=I,T=O,D=B;O=(L=r.distcode[D+((y&(1<<R+T)-1)>>R)])>>>16&255,B=65535&L,!(R+(I=L>>>24)<=w);){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}y>>>=R,w-=R,r.back+=R}if(y>>>=I,w-=I,r.back+=I,64&O){t.msg="invalid distance code",r.mode=30;break}r.offset=B,r.extra=15&O,r.mode=24;case 24:if(r.extra){for(P=r.extra;w<P;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}r.offset+=y&(1<<r.extra)-1,y>>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===v)break t;if(C=x-v,r.offset>C){if((C=r.offset-C)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}E=C>r.wnext?(C-=r.wnext,r.wsize-C):r.wnext-C,C>r.length&&(C=r.length),A=r.window}else A=p,E=g-r.offset,C=r.length;for(v<C&&(C=v),v-=C,r.length-=C;p[g++]=A[E++],--C;);0===r.length&&(r.mode=21);break;case 26:if(0===v)break t;p[g++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===b)break t;b--,y|=c[_++]<<w,w+=8}if(x-=v,t.total_out+=x,r.total+=x,x&&(t.adler=r.check=r.flags?s(r.check,p,x,g-x):n(r.check,p,x,g-x)),x=v,(r.flags?y:m(y))!==r.check){t.msg="incorrect data check",r.mode=30;break}w=y=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;w<32;){if(0===b)break t;b--,y+=c[_++]<<w,w+=8}if(y!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}w=y=0}r.mode=29;case 29:N=1;break t;case 30:N=-3;break t;case 31:return-4;case 32:default:return f}return t.next_out=g,t.avail_out=v,t.next_in=_,t.avail_in=b,r.hold=y,r.bits=w,(r.wsize||x!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&z(t,t.output,t.next_out,x-t.avail_out)?(r.mode=31,-4):(k-=t.avail_in,x-=t.avail_out,t.total_in+=k,t.total_out+=x,r.total+=x,r.wrap&&x&&(t.adler=r.check=r.flags?s(r.check,p,x,t.next_out-x):n(r.check,p,x,t.next_out-x)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==k&&0===x||4===e)&&N===l&&(N=-5),N)},r.inflateEnd=function(t){if(!t||!t.state)return f;var e=t.state;return e.window&&(e.window=null),t.state=null,l},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?f:((r.head=e).done=!1,l):f},r.inflateSetDictionary=function(t,e){var r,i=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?f:11===r.mode&&n(1,e,i,0)!==r.check?-3:z(t,e,i,i)?(r.mode=31,-4):(r.havedict=1,l):f},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var i=t("../utils/common"),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,h,u,l,f,d){var c,p,m,_,g,b,v,y,w,k=d.bits,x=0,S=0,z=0,C=0,E=0,A=0,I=0,O=0,B=0,R=0,T=null,D=0,F=new i.Buf16(16),N=new i.Buf16(16),U=null,P=0;for(x=0;x<=15;x++)F[x]=0;for(S=0;S<h;S++)F[e[r+S]]++;for(E=k,C=15;1<=C&&0===F[C];C--);if(C<E&&(E=C),0===C)return u[l++]=20971520,u[l++]=20971520,d.bits=1,0;for(z=1;z<C&&0===F[z];z++);for(E<z&&(E=z),x=O=1;x<=15;x++)if(O<<=1,(O-=F[x])<0)return-1;if(0<O&&(0===t||1!==C))return-1;for(N[1]=0,x=1;x<15;x++)N[x+1]=N[x]+F[x];for(S=0;S<h;S++)0!==e[r+S]&&(f[N[e[r+S]]++]=S);if(b=0===t?(T=U=f,19):1===t?(T=n,D-=257,U=s,P-=257,256):(T=a,U=o,-1),x=z,g=l,I=S=R=0,m=-1,_=(B=1<<(A=E))-1,1===t&&852<B||2===t&&592<B)return 1;for(;;){for(v=x-I,w=f[S]<b?(y=0,f[S]):f[S]>b?(y=U[P+f[S]],T[D+f[S]]):(y=96,0),c=1<<x-I,z=p=1<<A;u[g+(R>>I)+(p-=c)]=v<<24|y<<16|w|0,0!==p;);for(c=1<<x-1;R&c;)c>>=1;if(0!==c?(R&=c-1,R+=c):R=0,S++,0==--F[x]){if(x===C)break;x=e[r+f[S]]}if(E<x&&(R&_)!==m){for(0===I&&(I=E),g+=z,O=1<<(A=x-I);A+I<C&&!((O-=F[A+I])<=0);)A++,O<<=1;if(B+=1<<A,1===t&&852<B||2===t&&592<B)return 1;u[m=R&_]=E<<24|A<<16|g-l|0}}return 0!==R&&(u[g+R]=x-I<<24|64<<16|0),d.bits=E,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";var i=t("../utils/common");function n(t){for(var e=t.length;0<=--e;)t[e]=0}var s=0,a=256,o=a+1+29,h=30,u=19,l=2*o+1,f=15,d=16,c=256,p=16,m=17,_=18,g=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],b=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],w=new Array(2*(o+2));n(w);var k=new Array(2*h);n(k);var x=new Array(512);n(x);var S=new Array(256);n(S);var z=new Array(29);n(z);var C,E,A,I=new Array(h);function O(t,e,r,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function B(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function R(t){return t<256?x[t]:x[256+(t>>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function D(t,e,r){t.bi_valid>d-r?(t.bi_buf|=e<<t.bi_valid&65535,T(t,t.bi_buf),t.bi_buf=e>>d-t.bi_valid,t.bi_valid+=r-d):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function F(t,e,r){D(t,r[2*e],r[2*e+1])}function N(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function U(t,e,r){var i,n,s=new Array(f+1),a=0;for(i=1;i<=f;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=N(s[o]++,o))}}function P(t){var e;for(e=0;e<o;e++)t.dyn_ltree[2*e]=0;for(e=0;e<h;e++)t.dyn_dtree[2*e]=0;for(e=0;e<u;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*c]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function L(t){8<t.bi_valid?T(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function j(t,e,r,i){var n=2*e,s=2*r;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[r]}function Z(t,e,r){for(var i=t.heap[r],n=r<<1;n<=t.heap_len&&(n<t.heap_len&&j(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!j(e,i,t.heap[n],t.depth));)t.heap[r]=t.heap[n],r=n,n<<=1;t.heap[r]=i}function W(t,e,r){var i,n,s,o,h=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*h]<<8|t.pending_buf[t.d_buf+2*h+1],n=t.pending_buf[t.l_buf+h],h++,0===i?F(t,n,e):(F(t,(s=S[n])+a+1,e),0!==(o=g[s])&&D(t,n-=z[s],o),F(t,s=R(--i),r),0!==(o=b[s])&&D(t,i-=I[s],o)),h<t.last_lit;);F(t,c,e)}function M(t,e){var r,i,n,s=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=l,r=0;r<h;r++)0!==s[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(n=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=a[2*n+1]);for(e.max_code=u,r=t.heap_len>>1;1<=r;r--)Z(t,s,r);for(n=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Z(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,Z(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,h=e.dyn_tree,u=e.max_code,d=e.stat_desc.static_tree,c=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,m=e.stat_desc.extra_base,_=e.stat_desc.max_length,g=0;for(s=0;s<=f;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<l;r++)_<(s=h[2*h[2*(i=t.heap[r])+1]+1]+1)&&(s=_,g++),h[2*i+1]=s,u<i||(t.bl_count[s]++,a=0,m<=i&&(a=p[i-m]),o=h[2*i],t.opt_len+=o*(s+a),c&&(t.static_len+=o*(d[2*i+1]+a)));if(0!==g){do{for(s=_-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[_]--,g-=2}while(0<g);for(s=_;0!==s;s--)for(i=t.bl_count[s];0!==i;)u<(n=t.heap[--r])||(h[2*n+1]!==s&&(t.opt_len+=(s-h[2*n+1])*h[2*n],h[2*n+1]=s),i--)}}(t,e),U(s,u,t.bl_count)}function H(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),e[2*(r+1)+1]=65535,i=0;i<=r;i++)n=a,a=e[2*(i+1)+1],++o<h&&n===a||(o<u?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[2*p]++):o<=10?t.bl_tree[2*m]++:t.bl_tree[2*_]++,s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4))}function G(t,e,r){var i,n,s=-1,a=e[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),i=0;i<=r;i++)if(n=a,a=e[2*(i+1)+1],!(++o<h&&n===a)){if(o<u)for(;F(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==s&&(F(t,n,t.bl_tree),o--),F(t,p,t.bl_tree),D(t,o-3,2)):o<=10?(F(t,m,t.bl_tree),D(t,o-3,3)):(F(t,_,t.bl_tree),D(t,o-11,7));s=n,u=(o=0)===a?(h=138,3):n===a?(h=6,3):(h=7,4)}}n(I);var K=!1;function Y(t,e,r,n){D(t,(s<<1)+(n?1:0),3),function(t,e,r,n){L(t),T(t,r),T(t,~r),i.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r)}r._tr_init=function(t){K||(function(){var t,e,r,i,n,s=new Array(f+1);for(i=r=0;i<28;i++)for(z[i]=r,t=0;t<1<<g[i];t++)S[r++]=i;for(S[r-1]=i,i=n=0;i<16;i++)for(I[i]=n,t=0;t<1<<b[i];t++)x[n++]=i;for(n>>=7;i<h;i++)for(I[i]=n<<7,t=0;t<1<<b[i]-7;t++)x[256+n++]=i;for(e=0;e<=f;e++)s[e]=0;for(t=0;t<=143;)w[2*t+1]=8,t++,s[8]++;for(;t<=255;)w[2*t+1]=9,t++,s[9]++;for(;t<=279;)w[2*t+1]=7,t++,s[7]++;for(;t<=287;)w[2*t+1]=8,t++,s[8]++;for(U(w,o+1,s),t=0;t<h;t++)k[2*t+1]=5,k[2*t]=N(t,5);C=new O(w,g,a+1,o,f),E=new O(k,b,0,h,f),A=new O(new Array(0),v,0,u,7)}(),K=!0),t.l_desc=new B(t.dyn_ltree,C),t.d_desc=new B(t.dyn_dtree,E),t.bl_desc=new B(t.bl_tree,A),t.bi_buf=0,t.bi_valid=0,P(t)},r._tr_stored_block=Y,r._tr_flush_block=function(t,e,r,i){var n,s,o=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),M(t,t.l_desc),M(t,t.d_desc),o=function(t){var e;for(H(t,t.dyn_ltree,t.l_desc.max_code),H(t,t.dyn_dtree,t.d_desc.max_code),M(t,t.bl_desc),e=u-1;3<=e&&0===t.bl_tree[2*y[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?Y(t,e,r,i):4===t.strategy||s===n?(D(t,2+(i?1:0),3),W(t,w,k)):(D(t,4+(i?1:0),3),function(t,e,r,i){var n;for(D(t,e-257,5),D(t,r-1,5),D(t,i-4,4),n=0;n<i;n++)D(t,t.bl_tree[2*y[n]+1],3);G(t,t.dyn_ltree,e-1),G(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),W(t,t.dyn_ltree,t.dyn_dtree)),P(t),i&&L(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(S[r]+a+1)]++,t.dyn_dtree[2*R(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){D(t,2,3),F(t,c,w),function(t){16===t.bi_valid?(T(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)});
//
document.addEventListener("wheel",function(e){if(setup_editor.wheel&&(!scroll_block||(scene_screen&&scene_view.tabindex==1))){if(e.deltaY>0) world_scale(false);else world_scale(2);}});
let project_files=[];
var load_files
img_file.addEventListener('change',loadFiles);
var load_new=false;
var wf;
var tool_update=false;
function clear_Files(){
for(var i=0;i<project_files.length;i++){URL.revokeObjectURL(project_files[i][1])}
project_files=[];
}
function loadFiles(e){
load_files=e.target.files
wf=e.target.files[0].webkitRelativePath.split("/")[0]+"/";
if(load_new){
clear_Files();countBytes=0;
for(var i=0;i<e.target.files.length;i++){countBytes+=e.target.files[i].size;project_files.push([e.target.files[i].webkitRelativePath.replace(wf,'').replace('.mp3','').replace('.MP3',''),URL.createObjectURL(e.target.files[i]),e.target.files[i].type]);}
if(document.getElementById("project_foler")){project_foler.value=wf};
}else{
var jsons=[];clear_Files();countBytes=0;
for(var i=0;i<e.target.files.length;i++){
countBytes+=e.target.files[i].size
project_files.push([e.target.files[i].webkitRelativePath.replace(wf,'').replace('.mp3','').replace('.MP3',''),URL.createObjectURL(e.target.files[i]),e.target.files[i].type]);
if(e.target.files[i].type=="application/json"&&e.target.files[i].webkitRelativePath.split("/").length==2){jsons.push([i,e.target.files[i].name])}
}
if(jsons.length==1){load_story_edit(URL.createObjectURL(e.target.files[jsons[0][0]]))}
else if(jsons.length>1){
var html="<div class='window'><div class='win_head'>Select JSON project file<div class='window_close icon icon_close' onclick='modal_window(\"close\")'></div></div><hr><div style='margin:0 8px 0 8px;max-height:75vh;overflow-x:hidden;'>"
for(var f=0;f<jsons.length;f++){html+="<table class='button' style='width:412px;margin:8px 0px;' onclick='load_story_edit(open_file(\""+jsons[f][1]+"\"));modal_window(\"close\");'><tbody><tr><td width='48px' height='48px' class='icon icon_new'> </td><td align='left'><div style='width:364px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;'>"+jsons[f][1]+"</div></td></tr></tbody></table>"}
html+="</div></div>"
modal_window("open",html)
}else if(jsons.length==0){alert('JSON file not found')}
}
}
window.addEventListener('load',function(){
var dropEvent=function(e){e.stopPropagation();e.preventDefault();return false;};
var dragEnter=function(e){e.stopPropagation();e.preventDefault();};