forked from doomeer/factorio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
factorio.js
1876 lines (1875 loc) · 88.1 KB
/
factorio.js
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
// Generated by js_of_ocaml 2.7
(function(ak){"use strict";var
aU=254,M=255,eR=224,c5="i",e1="Invalid_argument",bV='"',ad=16777215,bS=250,e9=1.25,e_="Light Oil Cracking",bi="Basic Oil Processing",bo=1024,g=0.5,cS=65599,eE="jsError",fh="o",ex="input",e8="r",e7=246,aT=862212904,fw=512,eD="End_of_file",fg=120,eC="Failure",eP=2.5,eQ=-10,c4="Steel Furnace",cR="Chemical Plant",eO="% ",fv="result",c3="Advanced Oil Processing + Cracking",f="",e6="Stack_overflow",Q=128,eB="Shared Resources",eN="goals",aR=100,Y="0",D=248,fn="Offshore Pump",e5="Not_found",c2="%#",eZ="Sys_blocked_io",e0="p",ao="outputh1",fm=103,c1="oilprocessing",fu="fd ",ft=1023,eM="Match_failure",C="camlinternalFormat.ml",ff="Division_by_zero",bR=1e3,cO="Stone Furnace",e4="setvisible",eA="Sys_error",eL="Oil_processing",bT="Advanced Oil Processing",bU="x",bn=".",bj="+",bm=65535,cQ=3.5,eY=-97,eX="Heavy Oil Cracking",bQ=1073741823,eW="%u",fe="%d",fs="Basic_oil_processing",eV=110,fd=57343,fl=785140586,eK=127,cU="Burner Mining Drill",fc="'",bk=997943714,c0="Assembling Machine 2",eU="2",fb=982028505,ah=" ",cV="Assembling Machine 3",fr="1",cZ="e",ew="Undefined_recursive_module",eJ=")",eT="Pumpjack",cX="button",cY="d",bP="Electric Mining Drill",eI=-65,eS="X",aS="-",eH="nan",fa=-48,e2=" \xc3\x97 ",bl="setting",e3=192,fk=65520,ez=240,cP=" : file already exists",e$=2048,fj=56320,fq="b",eG="%+",az="%",eF="/",fi="Assert_failure",bX=114,ev="%i",fp="Out_of_memory",cT=767175342,bW="Electric Furnace",ey="Assembling Machine 1",fo="index out of bounds",cW="Petroleum Gas";function
db(a,b,c){var
e=new
Array(c);for(var
d=0;d<c;d++)e[d]=a[b+d];return e}function
da(a,b,c){var
d=String.fromCharCode;if(b==0&&c<=4096&&c==a.length)return d.apply(null,a);var
e=f;for(;0<c;b+=bo,c-=bo)e+=d.apply(null,db(a,b,Math.min(c,bo)));return e}function
bZ(a){var
c=new
Array(a.l),e=a.c,d=e.length,b=0;for(;b<d;b++)c[b]=e.charCodeAt(b);for(d=a.l;b<d;b++)c[b]=0;a.c=c;a.t=4;return c}function
aa(a,b,c,d,e){if(e==0)return 0;if(d==0&&(e>=c.l||c.t==2&&e>=c.c.length)){c.c=a.t==4?da(a.c,b,e):b==0&&a.c.length==e?a.c:a.c.substr(b,e);c.t=c.c.length==c.l?0:2}else
if(c.t==2&&d==c.c.length){c.c+=a.t==4?da(a.c,b,e):b==0&&a.c.length==e?a.c:a.c.substr(b,e);c.t=c.c.length==c.l?0:2}else{if(c.t!=4)bZ(c);var
g=a.c,h=c.c;if(a.t==4)for(var
f=0;f<e;f++)h[d+f]=g[b+f];else{var
i=Math.min(e,g.length-b);for(var
f=0;f<i;f++)h[d+f]=g.charCodeAt(b+f);for(;f<e;f++)h[d+f]=0}}return 0}function
pt(a,b){var
e=a.length,d=new
Array(e+1),c=0;for(;c<e;c++)d[c]=a[c];d[c]=b;return d}function
bp(c,b){if(c.fun)return bp(c.fun,b);var
a=c.length,d=b.length,e=a-d;if(e==0)return c.apply(null,b);else
if(e<0)return bp(c.apply(null,db(b,0,a)),db(b,a,d-a));else
return function(a){return bp(c,pt(b,a))}}function
pf(a,b){throw[0,a,b]}function
b6(a,b){if(b.repeat)return b.repeat(a);var
c=f,d=0;if(a==0)return c;for(;;){if(a&1)c+=b;a>>=1;if(a==0)return c;b+=b;d++;if(d==9)b.slice(0,1)}}function
ai(a){if(a.t==2)a.c+=b6(a.l-a.c.length,"\0");else
a.c=da(a.c,0,a.c.length);a.t=0}function
fA(a){if(a.length<24){for(var
b=0;b<a.length;b++)if(a.charCodeAt(b)>eK)return false;return true}else
return!/[^\x00-\x7f]/.test(a)}function
pp(a){for(var
k=f,d=f,h,g,i,b,c=0,j=a.length;c<j;c++){g=a.charCodeAt(c);if(g<Q){for(var
e=c+1;e<j&&(g=a.charCodeAt(e))<Q;e++);if(e-c>fw){d.substr(0,1);k+=d;d=f;k+=a.slice(c,e)}else
d+=a.slice(c,e);if(e==j)break;c=e}b=1;if(++c<j&&((i=a.charCodeAt(c))&-64)==Q){h=i+(g<<6);if(g<eR){b=h-12416;if(b<Q)b=1}else{b=2;if(++c<j&&((i=a.charCodeAt(c))&-64)==Q){h=i+(h<<6);if(g<ez){b=h-925824;if(b<e$||b>=55295&&b<57344)b=2}else{b=3;if(++c<j&&((i=a.charCodeAt(c))&-64)==Q&&g<245){b=i-63447168+(h<<6);if(b<65536||b>1114111)b=3}}}}}if(b<4){c-=b;d+="\ufffd"}else
if(b>bm)d+=String.fromCharCode(55232+(b>>10),fj+(b&ft));else
d+=String.fromCharCode(b);if(d.length>bo){d.substr(0,1);k+=d;d=f}}return k+d}function
po(a){switch(a.t){case
9:return a.c;default:ai(a);case
0:if(fA(a.c)){a.t=9;return a.c}a.t=8;case
8:return pp(a.c)}}function
V(a,b,c){this.t=a;this.c=b;this.l=c}V.prototype.toString=function(){return po(this)};function
d(a){return new
V(0,a,a.length)}function
c$(a,b){pf(a,d(b))}var
E=[0];function
aV(a){c$(E.Invalid_argument,a)}function
oL(){aV(fo)}function
N(a,b){if(b>>>0>=a.length-1)oL();return a}function
oM(a){if(isFinite(a)){if(Math.abs(a)>=2.22507385850720138e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function
oX(a,b){var
c=a[3]<<16,d=b[3]<<16;if(c>d)return 1;if(c<d)return-1;if(a[2]>b[2])return 1;if(a[2]<b[2])return-1;if(a[1]>b[1])return 1;if(a[1]<b[1])return-1;return 0}function
o8(a,b){if(a<b)return-1;if(a==b)return 0;return 1}function
pj(a,b){a.t&6&&ai(a);b.t&6&&ai(b);return a.c<b.c?-1:a.c>b.c?1:0}function
c6(a,b,c){var
e=[];for(;;){if(!(c&&a===b))if(a
instanceof
V)if(b
instanceof
V){if(a!==b){var
d=pj(a,b);if(d!=0)return d}}else
return 1;else
if(a
instanceof
Array&&a[0]===(a[0]|0)){var
f=a[0];if(f===aU)f=0;if(f===bS){a=a[1];continue}else
if(b
instanceof
Array&&b[0]===(b[0]|0)){var
g=b[0];if(g===aU)g=0;if(g===bS){b=b[1];continue}else
if(f!=g)return f<g?-1:1;else
switch(f){case
248:var
d=o8(a[2],b[2]);if(d!=0)return d;break;case
251:aV("equal: abstract value");case
255:var
d=oX(a,b);if(d!=0)return d;break;default:if(a.length!=b.length)return a.length<b.length?-1:1;if(a.length>1)e.push(a,b,1)}}else
return 1}else
if(b
instanceof
V||b
instanceof
Array&&b[0]===(b[0]|0))return-1;else
if(typeof
a!="number"&&a&&a.compare)return a.compare(b,c);else{if(a<b)return-1;if(a>b)return 1;if(a!=b){if(!c)return NaN;if(a==a)return 1;if(b==b)return-1}}if(e.length==0)return 0;var
h=e.pop();b=e.pop();a=e.pop();if(h+1<a.length)e.push(a,b,h+1);a=a[h];b=b[h]}}function
bq(a,b){return c6(a,b,true)}function
J(a){if(a<0)aV("String.create");return new
V(a?2:9,f,a)}function
oP(a,b,c,d){if(c>0)if(b==0&&(c>=a.l||a.t==2&&c>=a.c.length))if(d==0){a.c=f;a.t=2}else{a.c=b6(c,String.fromCharCode(d));a.t=c==a.l?0:2}else{if(a.t!=4)bZ(a);for(c+=b;b<c;b++)a.c[b]=d}return 0}function
oQ(a,b){if(a===b)return 0;if(a<b)return-1;if(a>b)return 1;if(a===a)return 1;if(b===b)return-1;return 0}function
oO(a){c$(E.Failure,a)}function
bY(a){if((a.t&6)!=0)ai(a);return a.c}function
oR(a){var
b;a=bY(a);b=+a;if(a.length>0&&b===b)return b;a=a.replace(/_/g,f);b=+a;if(a.length>0&&b===b||/^[+-]?nan$/i.test(a))return b;if(/^ *0x[0-9a-f_]+p[+-]?[0-9_]+/i.test(a)){var
c=a.indexOf(e0);c=c==-1?a.indexOf("P"):c;var
d=+a.substring(c+1);b=+a.substring(0,c);return b*Math.pow(2,d)}if(/^\+?inf(inity)?$/i.test(a))return Infinity;if(/^-inf(inity)?$/i.test(a))return-Infinity;oO("float_of_string")}function
c_(a){a=bY(a);var
e=a.length;if(e>31)aV("format_int: format too long");var
b={justify:bj,signstyle:aS,filler:ah,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var
d=0;d<e;d++){var
c=a.charAt(d);switch(c){case"-":b.justify=aS;break;case"+":case" ":b.signstyle=c;break;case"0":b.filler=Y;break;case"#":b.alternate=true;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":b.width=0;while(c=a.charCodeAt(d)-48,c>=0&&c<=9){b.width=b.width*10+c;d++}d--;break;case".":b.prec=0;d++;while(c=a.charCodeAt(d)-48,c>=0&&c<=9){b.prec=b.prec*10+c;d++}d--;case"d":case"i":b.signedconv=true;case"u":b.base=10;break;case"x":b.base=16;break;case"X":b.base=16;b.uppercase=true;break;case"o":b.base=8;break;case"e":case"f":case"g":b.signedconv=true;b.conv=c;break;case"E":case"F":case"G":b.signedconv=true;b.uppercase=true;b.conv=c.toLowerCase();break}}return b}function
c7(a,b){if(a.uppercase)b=b.toUpperCase();var
g=b.length;if(a.signedconv&&(a.sign<0||a.signstyle!=aS))g++;if(a.alternate){if(a.base==8)g+=1;if(a.base==16)g+=2}var
c=f;if(a.justify==bj&&a.filler==ah)for(var
e=g;e<a.width;e++)c+=ah;if(a.signedconv)if(a.sign<0)c+=aS;else
if(a.signstyle!=aS)c+=a.signstyle;if(a.alternate&&a.base==8)c+=Y;if(a.alternate&&a.base==16)c+="0x";if(a.justify==bj&&a.filler==Y)for(var
e=g;e<a.width;e++)c+=Y;c+=b;if(a.justify==aS)for(var
e=g;e<a.width;e++)c+=ah;return d(c)}function
oS(a,b){var
c,f=c_(a),e=f.prec<0?6:f.prec;if(b<0){f.sign=-1;b=-b}if(isNaN(b)){c=eH;f.filler=ah}else
if(!isFinite(b)){c="inf";f.filler=ah}else
switch(f.conv){case"e":var
c=b.toExponential(e),d=c.length;if(c.charAt(d-3)==cZ)c=c.slice(0,d-1)+Y+c.slice(d-1);break;case"f":c=b.toFixed(e);break;case"g":e=e?e:1;c=b.toExponential(e-1);var
i=c.indexOf(cZ),h=+c.slice(i+1);if(h<-4||b>=1e+21||b.toFixed(0).length>e){var
d=i-1;while(c.charAt(d)==Y)d--;if(c.charAt(d)==bn)d--;c=c.slice(0,d+1)+c.slice(i);d=c.length;if(c.charAt(d-3)==cZ)c=c.slice(0,d-1)+Y+c.slice(d-1);break}else{var
g=e;if(h<0){g-=h+1;c=b.toFixed(g)}else
while(c=b.toFixed(g),c.length>e+1)g--;if(g){var
d=c.length-1;while(c.charAt(d)==Y)d--;if(c.charAt(d)==bn)d--;c=c.slice(0,d+1)}}break}return c7(f,c)}function
b0(a,b){if(bY(a)==fe)return d(f+b);var
c=c_(a);if(b<0)if(c.signedconv){c.sign=-1;b=-b}else
b>>>=0;var
e=b.toString(c.base);if(c.prec>=0){c.filler=ah;var
g=c.prec-e.length;if(g>0)e=b6(g,Y)+e}return c7(c,e)}function
oU(a,b){return+(c6(a,b,false)>=0)}function
fx(a){if(!isFinite(a)){if(isNaN(a))return[M,1,0,fk];return a>0?[M,0,0,32752]:[M,0,0,fk]}var
f=a>=0?0:32768;if(f)a=-a;var
b=Math.floor(Math.LOG2E*Math.log(a))+ft;if(b<=0){b=0;a/=Math.pow(2,-1026)}else{a/=Math.pow(2,b-1027);if(a<16){a*=2;b-=1}if(b==0)a/=2}var
d=Math.pow(2,24),c=a|0;a=(a-c)*d;var
e=a|0;a=(a-e)*d;var
g=a|0;c=c&15|f|b<<4;return[M,g,e,c]}if(!Math.imul)Math.imul=function(a,b){b|=0;return((a>>16)*b<<16)+(a&bm)*b|0};var
aX=Math.imul,oV=function(){var
o=256;function
c(a,b){return a<<b|a>>>32-b}function
g(a,b){b=aX(b,3432918353|0);b=c(b,15);b=aX(b,461845907);a^=b;a=c(a,13);return(a+(a<<2)|0)+(3864292196|0)|0}function
q(a){a^=a>>>16;a=aX(a,2246822507|0);a^=a>>>13;a=aX(a,3266489909|0);a^=a>>>16;return a}function
r(a,b){var
d=b[1]|b[2]<<24,c=b[2]>>>8|b[3]<<16;a=g(a,d);a=g(a,c);return a}function
s(a,b){var
d=b[1]|b[2]<<24,c=b[2]>>>8|b[3]<<16;a=g(a,c^d);return a}function
u(a,b){var
e=b.length,c,d;for(c=0;c+4<=e;c+=4){d=b.charCodeAt(c)|b.charCodeAt(c+1)<<8|b.charCodeAt(c+2)<<16|b.charCodeAt(c+3)<<24;a=g(a,d)}d=0;switch(e&3){case
3:d=b.charCodeAt(c+2)<<16;case
2:d|=b.charCodeAt(c+1)<<8;case
1:d|=b.charCodeAt(c);a=g(a,d)}a^=e;return a}function
t(a,b){var
e=b.length,c,d;for(c=0;c+4<=e;c+=4){d=b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24;a=g(a,d)}d=0;switch(e&3){case
3:d=b[c+2]<<16;case
2:d|=b[c+1]<<8;case
1:d|=b[c];a=g(a,d)}a^=e;return a}return function(a,b,c,d){var
k,l,m,i,h,f,e,j,n;i=b;if(i<0||i>o)i=o;h=a;f=c;k=[d];l=0;m=1;while(l<m&&h>0){e=k[l++];if(e
instanceof
Array&&e[0]===(e[0]|0))switch(e[0]){case
248:f=g(f,e[2]);h--;break;case
250:k[--l]=e[1];break;case
255:f=s(f,e);h--;break;default:var
p=e.length-1<<10|e[0];f=g(f,p);for(j=1,n=e.length;j<n;j++){if(m>=i)break;k[m++]=e[j]}break}else
if(e
instanceof
V){switch(e.t&6){default:ai(e);case
0:f=u(f,e.c);break;case
2:f=t(f,e.c)}h--}else
if(e===(e|0)){f=g(f,e+e+1);h--}else
if(e===+e){f=r(f,fx(e));h--}}f=q(f);return f&bQ}}();function
o5(a){return[a[3]>>8,a[3]&M,a[2]>>16,a[2]>>8&M,a[2]&M,a[1]>>16,a[1]>>8&M,a[1]&M]}function
oW(e,b,c){var
d=0;function
g(a){b--;if(e<0||b<0)return;if(a
instanceof
Array&&a[0]===(a[0]|0))switch(a[0]){case
248:e--;d=d*cS+a[2]|0;break;case
250:b++;g(a);break;case
255:e--;d=d*cS+a[1]+(a[2]<<24)|0;break;default:e--;d=d*19+a[0]|0;for(var
c=a.length-1;c>0;c--)g(a[c])}else
if(a
instanceof
V){e--;switch(a.t&6){default:ai(a);case
0:for(var
i=a.c,f=a.l,c=0;c<f;c++)d=d*19+i.charCodeAt(c)|0;break;case
2:for(var
h=a.c,f=a.l,c=0;c<f;c++)d=d*19+h[c]|0}}else
if(a===(a|0)){e--;d=d*cS+a|0}else
if(a===+a){e--;var
j=o5(fx(a));for(var
c=7;c>=0;c--)d=d*19+j[c]|0}}g(c);return d&bQ}function
o0(a){return(a[3]|a[2]|a[1])==0}function
o3(a){return[M,a&ad,a>>24&ad,a>>31&bm]}function
fF(a){var
d=a.length,c=new
Array(d);for(var
b=0;b<d;b++)c[b]=a[b];return c}function
o4(a,b){var
c=a[1]-b[1],d=a[2]-b[2]+(c>>24),e=a[3]-b[3]+(d>>24);return[M,c&ad,d&ad,e&bm]}function
fz(a,b){if(a[3]>b[3])return 1;if(a[3]<b[3])return-1;if(a[2]>b[2])return 1;if(a[2]<b[2])return-1;if(a[1]>b[1])return 1;if(a[1]<b[1])return-1;return 0}function
fy(a){a[3]=a[3]<<1|a[2]>>23;a[2]=(a[2]<<1|a[1]>>23)&ad;a[1]=a[1]<<1&ad}function
o1(a){a[1]=(a[1]>>>1|a[2]<<23)&ad;a[2]=(a[2]>>>1|a[3]<<23)&ad;a[3]=a[3]>>>1}function
o7(a,b){var
e=0,d=fF(a),c=fF(b),f=[M,0,0,0];while(fz(d,c)>0){e++;fy(c)}while(e>=0){e--;fy(f);if(fz(d,c)>=0){f[1]++;d=o4(d,c)}o1(c)}return[0,f,d]}function
o6(a){return a[1]|a[2]<<24}function
oZ(a){return a[3]<<16<0}function
o2(a){var
b=-a[1],c=-a[2]+(b>>24),d=-a[3]+(c>>24);return[M,b&ad,c&ad,d&bm]}function
oY(a,b){var
c=c_(a);if(c.signedconv&&oZ(b)){c.sign=-1;b=o2(b)}var
d=f,i=o3(c.base),h="0123456789abcdef";do{var
g=o7(b,i);b=g[1];d=h.charAt(o6(g[2]))+d}while(!o0(b));if(c.prec>=0){c.filler=ah;var
e=c.prec-d.length;if(e>0)d=b6(e,Y)+d}return c7(c,d)}function
b1(a){return+(a>31&&a<eK)}var
b2={amp:/&/g,lt:/</g,quot:/\"/g,all:/[&<\"]/};function
fB(a){if(!b2.all.test(a))return a;return a.replace(b2.amp,"&").replace(b2.lt,"<").replace(b2.quot,""")}function
pq(a){for(var
g=f,c=g,b,i,d=0,h=a.length;d<h;d++){b=a.charCodeAt(d);if(b<Q){for(var
e=d+1;e<h&&(b=a.charCodeAt(e))<Q;e++);if(e-d>fw){c.substr(0,1);g+=c;c=f;g+=a.slice(d,e)}else
c+=a.slice(d,e);if(e==h)break;d=e}if(b<e$){c+=String.fromCharCode(e3|b>>6);c+=String.fromCharCode(Q|b&63)}else
if(b<55296||b>=fd)c+=String.fromCharCode(eR|b>>12,Q|b>>6&63,Q|b&63);else
if(b>=56319||d+1==h||(i=a.charCodeAt(d+1))<fj||i>fd)c+="\xef\xbf\xbd";else{d++;b=(b<<10)+i-56613888;c+=String.fromCharCode(ez|b>>18,Q|b>>12&63,Q|b>>6&63,Q|b&63)}if(c.length>bo){c.substr(0,1);g+=c;c=f}}return g+c}function
aW(a){var
b=9;if(!fA(a))b=8,a=pq(a);return new
V(b,a,a.length)}function
c9(a,b){var
a=a+1|0,c=new
Array(a);c[0]=0;for(var
d=1;d<a;d++)c[d]=b;return c}function
fL(a){return new
V(4,a,a.length)}var
o9=function(){function
m(a,b){return a+b|0}function
l(a,b,c,d,e,f){b=m(m(b,a),m(d,f));return m(b<<e|b>>>32-e,c)}function
h(a,b,c,d,e,f,g){return l(b&c|~b&d,a,b,e,f,g)}function
i(a,b,c,d,e,f,g){return l(b&d|c&~d,a,b,e,f,g)}function
j(a,b,c,d,e,f,g){return l(b^c^d,a,b,e,f,g)}function
k(a,b,c,d,e,f,g){return l(c^(b|~d),a,b,e,f,g)}function
n(a,b){var
g=b;a[g>>2]|=Q<<8*(g&3);for(g=(g&~3)+8;(g&63)<60;g+=4)a[(g>>2)-1]=0;a[(g>>2)-1]=b<<3;a[g>>2]=b>>29&536870911;var
l=[1732584193,4023233417,2562383102,271733878];for(g=0;g<a.length;g+=16){var
c=l[0],d=l[1],e=l[2],f=l[3];c=h(c,d,e,f,a[g+0],7,3614090360);f=h(f,c,d,e,a[g+1],12,3905402710);e=h(e,f,c,d,a[g+2],17,606105819);d=h(d,e,f,c,a[g+3],22,3250441966);c=h(c,d,e,f,a[g+4],7,4118548399);f=h(f,c,d,e,a[g+5],12,1200080426);e=h(e,f,c,d,a[g+6],17,2821735955);d=h(d,e,f,c,a[g+7],22,4249261313);c=h(c,d,e,f,a[g+8],7,1770035416);f=h(f,c,d,e,a[g+9],12,2336552879);e=h(e,f,c,d,a[g+10],17,4294925233);d=h(d,e,f,c,a[g+11],22,2304563134);c=h(c,d,e,f,a[g+12],7,1804603682);f=h(f,c,d,e,a[g+13],12,4254626195);e=h(e,f,c,d,a[g+14],17,2792965006);d=h(d,e,f,c,a[g+15],22,1236535329);c=i(c,d,e,f,a[g+1],5,4129170786);f=i(f,c,d,e,a[g+6],9,3225465664);e=i(e,f,c,d,a[g+11],14,643717713);d=i(d,e,f,c,a[g+0],20,3921069994);c=i(c,d,e,f,a[g+5],5,3593408605);f=i(f,c,d,e,a[g+10],9,38016083);e=i(e,f,c,d,a[g+15],14,3634488961);d=i(d,e,f,c,a[g+4],20,3889429448);c=i(c,d,e,f,a[g+9],5,568446438);f=i(f,c,d,e,a[g+14],9,3275163606);e=i(e,f,c,d,a[g+3],14,4107603335);d=i(d,e,f,c,a[g+8],20,1163531501);c=i(c,d,e,f,a[g+13],5,2850285829);f=i(f,c,d,e,a[g+2],9,4243563512);e=i(e,f,c,d,a[g+7],14,1735328473);d=i(d,e,f,c,a[g+12],20,2368359562);c=j(c,d,e,f,a[g+5],4,4294588738);f=j(f,c,d,e,a[g+8],11,2272392833);e=j(e,f,c,d,a[g+11],16,1839030562);d=j(d,e,f,c,a[g+14],23,4259657740);c=j(c,d,e,f,a[g+1],4,2763975236);f=j(f,c,d,e,a[g+4],11,1272893353);e=j(e,f,c,d,a[g+7],16,4139469664);d=j(d,e,f,c,a[g+10],23,3200236656);c=j(c,d,e,f,a[g+13],4,681279174);f=j(f,c,d,e,a[g+0],11,3936430074);e=j(e,f,c,d,a[g+3],16,3572445317);d=j(d,e,f,c,a[g+6],23,76029189);c=j(c,d,e,f,a[g+9],4,3654602809);f=j(f,c,d,e,a[g+12],11,3873151461);e=j(e,f,c,d,a[g+15],16,530742520);d=j(d,e,f,c,a[g+2],23,3299628645);c=k(c,d,e,f,a[g+0],6,4096336452);f=k(f,c,d,e,a[g+7],10,1126891415);e=k(e,f,c,d,a[g+14],15,2878612391);d=k(d,e,f,c,a[g+5],21,4237533241);c=k(c,d,e,f,a[g+12],6,1700485571);f=k(f,c,d,e,a[g+3],10,2399980690);e=k(e,f,c,d,a[g+10],15,4293915773);d=k(d,e,f,c,a[g+1],21,2240044497);c=k(c,d,e,f,a[g+8],6,1873313359);f=k(f,c,d,e,a[g+15],10,4264355552);e=k(e,f,c,d,a[g+6],15,2734768916);d=k(d,e,f,c,a[g+13],21,1309151649);c=k(c,d,e,f,a[g+4],6,4149444226);f=k(f,c,d,e,a[g+11],10,3174756917);e=k(e,f,c,d,a[g+2],15,718787259);d=k(d,e,f,c,a[g+9],21,3951481745);l[0]=m(c,l[0]);l[1]=m(d,l[1]);l[2]=m(e,l[2]);l[3]=m(f,l[3])}var
o=new
Array(16);for(var
g=0;g<4;g++)for(var
n=0;n<4;n++)o[g*4+n]=l[g]>>8*n&M;return o}return function(a,b,c){var
h=[];switch(a.t&6){default:ai(a);case
0:var
g=a.c;for(var
d=0;d<c;d+=4){var
e=d+b;h[d>>2]=g.charCodeAt(e)|g.charCodeAt(e+1)<<8|g.charCodeAt(e+2)<<16|g.charCodeAt(e+3)<<24}for(;d<c;d++)h[d>>2]|=g.charCodeAt(d+b)<<8*(d&3);break;case
4:var
f=a.c;for(var
d=0;d<c;d+=4){var
e=d+b;h[d>>2]=f[e]|f[e+1]<<8|f[e+2]<<16|f[e+3]<<24}for(;d<c;d++)h[d>>2]|=f[d+b]<<8*(d&3)}return fL(n(h,c))}}();function
ae(a){c$(E.Sys_error,a)}function
o_(a){if(!a.opened)ae("Cannot flush a closed channel");if(a.buffer==f)return 0;if(a.output)switch(a.output.length){case
2:a.output(a,a.buffer);break;default:a.output(a.buffer)}a.buffer=f;return 0}var
fN=0;function
pu(){return new
Date().getTime()/bR}function
dc(){return Math.floor(pu())}function
ap(a){this.data=a;this.inode=fN++;var
b=dc();this.atime=b;this.mtime=b;this.ctime=b}ap.prototype={truncate:function(){this.data=J(0);this.modified()},modified:function(){var
a=dc();this.atime=a;this.mtime=a}};function
j(a){return a.l}function
fI(a){a=a
instanceof
V?a.toString():a;ae(a+": No such file or directory")}var
oN=eF;function
b3(a){a=a
instanceof
V?a.toString():a;if(a.charCodeAt(0)!=47)a=oN+a;var
d=a.split(eF),b=[];for(var
c=0;c<d.length;c++)switch(d[c]){case"..":if(b.length>1)b.pop();break;case".":break;case"":if(b.length==0)b.push(f);break;default:b.push(d[c]);break}b.orig=a;return b}function
aA(){this.content={};this.inode=fN++;var
a=dc();this.atime=a;this.mtime=a;this.ctime=a}aA.prototype={exists:function(a){return this.content[a]?1:0},mk:function(a,b){this.content[a]=b},get:function(a){return this.content[a]},list:function(){var
a=[];for(var
b
in
this.content)a.push(b);return a},remove:function(a){delete
this.content[a]}};var
b5=new
aA();b5.mk(f,new
aA());function
c8(a){var
b=b5;for(var
c=0;c<a.length;c++){if(!(b.exists&&b.exists(a[c])))fI(a.orig);b=b.get(a[c])}return b}function
pm(a){var
c=b3(a),b=c8(c);return b
instanceof
aA?1:0}function
pz(a){if(a.t!=4)bZ(a);return a.c}function
oT(a,b){var
f=b3(a),c=b5;for(var
g=0;g<f.length-1;g++){var
e=f[g];if(!c.exists(e))c.mk(e,new
aA());c=c.get(e);if(!(c
instanceof
aA))ae(f.orig+cP)}var
e=f[f.length-1];if(c.exists(e))ae(f.orig+cP);if(b
instanceof
aA)c.mk(e,b);else
if(b
instanceof
ap)c.mk(e,b);else
if(b
instanceof
V)c.mk(e,new
ap(b));else
if(b
instanceof
Array)c.mk(e,new
ap(fL(b)));else
if(b.toString)c.mk(e,new
ap(d(b.toString())));else
aV("caml_fs_register");return 0}function
pl(a){var
b=b5,d=b3(a),e,f;for(var
c=0;c<d.length;c++){if(b.auto){e=b.auto;f=c}if(!(b.exists&&b.exists(d[c])))return e?e(d,f):0;b=b.get(d[c])}return 1}function
bs(a,b,c){if(E.fds===undefined)E.fds=new
Array();c=c?c:{};var
d={};d.file=b;d.offset=c.append?j(b.data):0;d.flags=c;E.fds[a]=d;E.fd_last_idx=a;return a}function
pA(a,b,c){var
d={};while(b){switch(b[1]){case
0:d.rdonly=1;break;case
1:d.wronly=1;break;case
2:d.append=1;break;case
3:d.create=1;break;case
4:d.truncate=1;break;case
5:d.excl=1;break;case
6:d.binary=1;break;case
7:d.text=1;break;case
8:d.nonblock=1;break}b=b[2]}var
f=a.toString(),h=b3(a);if(d.rdonly&&d.wronly)ae(f+" : flags Open_rdonly and Open_wronly are not compatible");if(d.text&&d.binary)ae(f+" : flags Open_text and Open_binary are not compatible");if(pl(a)){if(pm(a))ae(f+" : is a directory");if(d.create&&d.excl)ae(f+cP);var
g=E.fd_last_idx?E.fd_last_idx:0,e=c8(h);if(d.truncate)e.truncate();return bs(g+1,e,d)}else
if(d.create){var
g=E.fd_last_idx?E.fd_last_idx:0;oT(a,J(0));var
e=c8(h);return bs(g+1,e,d)}else
fI(a)}bs(0,new
ap(J(0)));bs(1,new
ap(J(0)));bs(2,new
ap(J(0)));function
o$(a){var
b=E.fds[a];if(b.flags.wronly)ae(fu+a+" is writeonly");return{file:b.file,offset:b.offset,fd:a,opened:true,refill:null}}function
pr(a){if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var
b=ak.console;b&&b.error&&b.error(a)}function
ps(a){if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var
b=ak.console;b&&b.log&&b.log(a)}var
b4=new
Array();function
pi(a,b){var
h=d(b),c=j(h),g=j(a.file.data),f=a.offset;if(f+c>=g){var
e=J(f+c);aa(a.file.data,0,e,0,g);aa(h,0,e,f,c);a.file.data=e}a.offset+=c;a.file.modified();return 0}function
fC(a){var
b;switch(a){case
1:b=ps;break;case
2:b=pr;break;default:b=pi}var
d=E.fds[a];if(d.flags.rdonly)ae(fu+a+" is readonly");var
c={file:d.file,offset:d.offset,fd:a,opened:true,buffer:f,output:b};b4[c.fd]=c;return c}function
pa(){var
a=0;for(var
b
in
b4)if(b4[b].opened)a=[0,b4[b],a];return a}function
fH(a){throw a}function
pg(){fH(E.Division_by_zero)}function
fD(a,b){if(b==0)pg();return a%b}function
aY(a,b){return+(c6(a,b,false)!=0)}function
pc(a,b){a[0]=b;return 0}function
fG(a){return a
instanceof
Array?a[0]:a
instanceof
V?252:bR}function
_(a,b,c){E[a+1]=b;if(c)E[c]=b}var
fE={};function
ph(a,b){fE[bY(a)]=b;return 0}var
pd=0;function
aB(a){a[2]=pd++;return a}function
K(a,b){a.t&6&&ai(a);b.t&6&&ai(b);return a.c==b.c?1:0}function
fK(){aV(fo)}function
br(a,b){switch(a.t&6){default:if(b>=a.c.length)return 0;case
0:return a.c.charCodeAt(b);case
4:return a.c[b]}}function
w(a,b){if(b>>>0>=a.l)fK();return br(a,b)}function
b7(a,b){return 1-K(a,b)}function
y(a,b,c){c&=M;if(a.t!=4){if(b==a.c.length){a.c+=String.fromCharCode(c);if(b+1==a.l)a.t=0;return 0}bZ(a)}a.c[b]=c;return 0}function
aq(a,b,c){if(b>>>0>=a.l)fK();return y(a,b,c)}function
pk(){return 32}function
pe(){fH(E.Not_found)}function
fM(a){var
b=ak,c=a.toString();if(b.process&&b.process.env&&b.process.env[c]!=undefined)return aW(b.process.env[c]);pe()}function
pn(){var
a=new
Date()^4294967295*Math.random();return[0,a]}function
ar(a){var
b=1;while(a&&a.joo_tramp){a=a.joo_tramp.apply(null,a.joo_args);b++}return a}function
k(a,b){return{joo_tramp:a,joo_args:b}}function
fJ(a){return a}function
pb(a){return fE[a]}function
aj(a){if(a
instanceof
Array)return a;if(ak.RangeError&&a
instanceof
ak.RangeError&&a.message&&a.message.match(/maximum call stack/i))return fJ(E.Stack_overflow);if(ak.InternalError&&a
instanceof
ak.InternalError&&a.message&&a.message.match(/too much recursion/i))return fJ(E.Stack_overflow);if(a
instanceof
ak.Error)return[0,pb(eE),a];return[0,E.Failure,aW(String(a))]}function
h(a,b){return a.length==1?a(b):bp(a,[b])}function
Z(a,b,c){return a.length==2?a(b,c):bp(a,[b,c])}var
b8=[D,d(eC),-3],dd=[D,d(e1),-4],T=[D,d(e5),-7],x=[D,d(fi),-11],dL=d("body"),bf=[aU,0,0];_(11,[D,d(ew),-12],ew);_(10,x,fi);_(9,[D,d(eZ),eQ],eZ);_(8,[D,d(e6),-9],e6);_(7,[D,d(eM),-8],eM);_(6,T,e5);_(5,[D,d(ff),-6],ff);_(4,[D,d(eD),-5],eD);_(3,dd,e1);_(2,b8,eC);_(1,[D,d(eA),-2],eA);_(0,[D,d(fp),-1],fp);var
fP=d("true"),fQ=d("false"),fO=d("Pervasives.Exit"),fS=d("Array.Bottom"),fT=[0,d("list.ml"),223,11],fX=d("\\b"),fY=d("\\t"),fZ=d("\\n"),f0=d("\\r"),fW=d("\\\\"),fV=d("\\'"),fU=d("Char.chr"),f7=d("String.contains_from / Bytes.contains_from"),f4=d("String.blit / Bytes.blit_string"),f3=d("Bytes.blit"),f2=d("String.sub / Bytes.sub"),f8=d(f),f_=d("Sys.Break"),f$=d("CamlinternalLazy.Undefined"),gd=d("Buffer.add: cannot grow buffer"),gm=d("%c"),gn=d("%s"),go=d(ev),gp=d("%li"),gq=d("%ni"),gr=d("%Li"),gs=d("%f"),gt=d("%B"),gu=d("%{"),gv=d("%}"),gw=d("%("),gx=d("%)"),gy=d("%a"),gz=d("%t"),gA=d("%?"),gB=d("%r"),gC=d("%_r"),gD=[0,d(C),816,23],gO=[0,d(C),780,21],gG=[0,d(C),781,21],gP=[0,d(C),784,21],gH=[0,d(C),785,21],gQ=[0,d(C),788,19],gI=[0,d(C),789,19],gR=[0,d(C),792,22],gJ=[0,d(C),793,22],gS=[0,d(C),797,30],gK=[0,d(C),798,30],gM=[0,d(C),802,26],gE=[0,d(C),803,26],gN=[0,d(C),812,28],gF=[0,d(C),813,28],gL=[0,d(C),817,23],hs=d(eW),hq=[0,d(C),1449,4],hr=d("Printf: bad conversion %["),ht=[0,d(C),1517,39],hu=[0,d(C),1540,31],hv=[0,d(C),1541,31],dx=d("Printf: bad conversion %_"),hw=d("@{"),hx=d("@["),ho=[0,d(fc),[0,d(fc),0]],hm=d(eH),hn=d(bn),hk=d("neg_infinity"),hl=d("infinity"),hj=d("%.12g"),g8=[0,d(az),[0,d(cY),0]],g9=[0,d(eG),[0,d(cY),0]],g_=[0,d(eO),[0,d(cY),0]],g$=[0,d(az),[0,d(c5),0]],ha=[0,d(eG),[0,d(c5),0]],hb=[0,d(eO),[0,d(c5),0]],hc=[0,d(az),[0,d(bU),0]],hd=[0,d(c2),[0,d(bU),0]],he=[0,d(az),[0,d(eS),0]],hf=[0,d(c2),[0,d(eS),0]],hg=[0,d(az),[0,d(fh),0]],hh=[0,d(c2),[0,d(fh),0]],hi=[0,d(az),[0,d("u"),0]],gV=d(fe),gW=d("%+d"),gX=d("% d"),gY=d(ev),gZ=d("%+i"),g0=d("% i"),g1=d("%x"),g2=d("%#x"),g3=d("%X"),g4=d("%#X"),g5=d("%o"),g6=d("%#o"),g7=d(eW),gU=[0,d(bV),[0,d(bV),0]],ge=d("@]"),gf=d("@}"),gg=d("@?"),gh=d("@\n"),gi=d("@."),gj=d("@@"),gk=d("@%"),gl=d("@"),gT=d("CamlinternalFormat.Type_mismatch"),hy=d(bU),oI=d("OCAMLRUNPARAM"),oG=d("CAMLRUNPARAM"),hz=d(f),hE=d("Js.Error"),hF=d(eE),hM=d("span"),hL=d("img"),hK=d("a"),hJ=d(e0),hI=d("div"),hH=d(cX),hG=d(ex),hN=d("Dom_html.Canvas_not_available"),h3=d(f),h4=d(f),h1=d(eJ),h2=d("find_tag("),hZ=d(f),hY=d(f),hX=d(f),hW=d(f),hV=d(f),hU=d(f),hT=d(f),hS=d(f),hR=d(f),hQ=d(f),hP=d(f),h5=d(cU),h6=d(bP),h7=d(ey),h8=d(c0),h9=d(cV),h_=d(cO),h$=d(c4),ia=d(bW),ib=d(cR),ic=d("Raw Wood"),id=[0,0],ie=d("Coal"),ig=[0,0],ih=d("Iron Ore"),ii=d("Copper Ore"),ij=d("Stone"),ik=d("Alien Artifact"),il=[0,0],im=d(fn),io=d("Water"),ip=[0,0],iq=[0,60],ir=d(eT),is=d("Crude Oil"),it=d("Wood"),iu=[0,2],iv=d("Iron Plate"),iw=[0,0],ix=d("Copper Plate"),iy=[0,0],iz=d("Steel Plate"),iA=d("Stone Brick"),iB=d(bi),iC=d(cW),iD=[0,0],iE=[0,4],iF=d(bT),iG=d(cW),iH=[0,0],iI=[0,5.5],iK=d(c3),iL=d(cW),iM=[0,0],iN=[0,9],iP=d("Sulfur"),iQ=[0,2],iR=d("Sulfuric Acid"),iS=[0,5],iT=d("Plastic Bar"),iU=[0,2],iV=d("Battery"),iW=d("Iron Stick"),iX=[0,2],iY=d("Iron Gear Wheel"),iZ=d("Copper Cable"),i0=[0,2],i1=d("Electronic Circuit"),i2=d("Advanced Circuit"),i3=d("Processing Unit"),i4=d("Pipe"),i5=d("Engine Unit"),i6=d(bi),i7=d("Heavy Oil"),i8=[0,3],i9=d(bi),i_=d("Light Oil"),i$=[0,3],ja=d("Lubricant"),jb=d("Electric Engine Unit"),jc=d("Flying Robot Frame"),jd=d("Science Pack 1"),jf=d("Inserter"),jg=d("Transport Belt"),jh=[0,2],ji=d("Science Pack 2"),jk=d("Fast Inserter"),jl=d("Smart Inserter"),jm=d("Science Pack 3"),jo=d("Alien Science Pack"),jp=[0,10],jq=d("Empty Barrel"),jr=d("Explosives"),js=d("Land Mine"),jt=d("Basic Grenade"),ju=d("Piercing Rounds Magazine"),jv=d("Defender Capsule"),jw=d("Poison Capsule"),jx=d("Slowdown Capsule"),jy=d("Distractor Capsule"),jz=d("Speed Module"),jA=d("Destroyer Capsule"),jB=d("Regular Magazine"),jC=d("Shotgun Shells"),jD=d("Piercing Shotgun Shells"),jE=d("Rocket"),jF=d("Explosive Rocket"),jG=d("Flamethrower Ammo"),jH=d("Cannon Shells"),jI=d("Explosive Cannon Shells"),jJ=d("Efficiency Module"),jK=d("Efficiency Module 2"),jL=d("Efficiency Module 3"),jM=d("Productivity Module"),jN=d("Productivity Module 2"),jO=d("Productivity Module 3"),jP=d("Speed Module 2"),jQ=d("Speed Module 3"),jR=d("Logistic Robot"),jS=d("Construction Robot"),jT=d("Roboport"),jV=d("Underground Belt"),jW=[0,2],jX=d("Splitter"),jY=d("Fast Transport Belt"),jZ=d("Fast Underground Belt"),j0=[0,2],j1=d("Fast Splitter"),j2=d("Express Transport Belt"),j4=d("Express Underground Belt"),j5=[0,2],j6=d("Express Splitter"),j8=d("Burner Inserter"),j_=d("Long Handed Inserter"),j$=d("Wooden Chest"),ka=d("Iron Chest"),kc=d("Steel Chest"),kd=d("Smart Chest"),ke=d("Active Provider Chest"),kf=d("Passive Provider Chest"),kg=d("Storage Chest"),kh=d("Requester Chest"),ki=d("Wall"),kj=d("Gun Turret"),kk=d("Laser Turret"),km=d(cO),kn=d(cU),kp=d(bP),kr=d(c4),kt=d(bW),kw=d("Lab"),ky=d("Basic Beacon"),kA=d("Radar"),kC=d("Small Electric Pole"),kD=d("medium Electric Pole"),kE=d("Big Electric Pole"),kF=d("Substation"),kH=d("Boiler"),kJ=d("Steam Engine"),kK=d("Solar Panel"),kM=d("Basic Accumulator"),kN=d("Lamp"),kO=d("Straight Rail"),kP=[0,2],kR=d("Curved Rail"),kS=[0,2],kU=d("Pipe To Ground"),kV=[0,2],kW=d(fn),kY=d("Storage Tank"),k0=d("Oil Refinery"),k2=d(cR),k4=d(eT),k6=d("Small Pump"),k8=d("Low Density Structure"),k9=d("Rocket Control Unit"),k_=d("Solid Fuel"),k$=d("Rocket Fuel"),la=d("Rocket Silo"),lb=d("Rocket Part"),mH=d(c3),mI=d(e_),mJ=d(bj),mK=d(eX),mL=d(bj),mM=d(bT),mN=d(".png"),mO=d("http://wiki.factorio.com/images/"),mP=d("http://wiki.factorio.com/index.php?title="),mQ=[0,d("icon")],ow=[0,d("count")],ox=[0,d("resourceinput")],n2=d(f),n3=[0,d(eN)],n4=d("Non-Shared Resources"),n5=[0,d(ao)],n6=[0,d(eN)],n7=d(eB),n8=[0,d(ao)],n9=d("Thanks to Nick Sheffield for the great style sheet! And thanks to everyone who helped finding bugs or posted suggestions. This tool greatly improved thanks to you."),n_=d("Acknowledgments"),n$=[0,d(ao)],oa=d(bn),ob=d("Reddit post"),oc=[0,d("https://www.reddit.com/r/factorio/comments/4dmxib/my_factorio_planner_now_has_a_web_interface/")],od=d("See also the "),oe=d(bn),of=d("GitHub"),og=[0,d("https://github.com/doomeer/factorio")],oh=d("Source code is available on "),oi=d("Links"),oj=[0,d(ao)],ok=d("Instead of entering the requested throughput, you can enter a number of machines that should run at full speed. To this end, simply prefix the number by the letter A to use the fastest machine, B to use the second best or C to use the third best. For instance, requesting b2 laser turrets means that 2 blue assembling machines should run at full speed."),ol=d("Tips"),om=[0,d(ao)],on=d("See the part after the # in the URL? It encodes your settings and updates automatically. It means you can share your settings easily with other people. You can also bookmark them and even use the Back button."),oo=d("Share Your Settings"),op=[0,d(ao)],oq=d("The checkbox controls whether the resource is shared. For instance, to produce Assembling Machine 1, you need iron plates for the machines themselves, but also for gears and for electronic circuits. Not sharing the plates means having three sets of furnaces, one for the circuits, one for the gears and one for the machines. Sharing the plates means having one set of furnaces to produce the plates which you then dispatch to other assemblers."),or=d(eB),os=[0,d(ao)],ot=d("Set the number next to each resource to the requested throughput."),ou=d("Getting Started"),ov=[0,d(ao)],nt=d(f),np=d(az),nq=d("% productivity bonus: "),nr=d(" speed bonus: "),ns=[0,d(bl)],no=[0,d("settings")],nu=d("Note: if you use both blue and yellow machines, the productivity bonus which is used is the yellow one."),nv=d(cR),nw=[0,d(" (not applied to Petroleum Gas)")],nx=d(cV),ny=d(c0),nz=d(bW),nA=d(bP),nB=d(c3),nC=d(c1),nD=d(bT),nE=d(c1),nF=d(bi),nG=d(c1),nH=d("Petroleum Gas: "),nI=[0,d(bl)],nJ=d(cV),nK=d(c0),nL=d(ey),nM=d("Assembling Machines: "),nN=[0,d(bl)],nO=d(bW),nP=d(c4),nQ=d(cO),nR=d("Furnaces: "),nS=[0,d(bl)],nT=d(bP),nU=d(cU),nV=d("Drills: "),nW=[0,d(bl)],nX=d("Hide Advanced Settings"),nY=[0,d(e4)],nZ=d("Advanced Settings"),n0=[0,d(e4)],n1=[0,d(fv)],oy=[0,d(fv)],oz=[0,d("rightcolumn")],oA=d("Reset"),oB=[0,d("index.html")],oC=[0,d(cX)],oD=[0,d(cX)],oE=[0,d("leftcolumn")],oF=[0,d("main")],nn=d(f),nl=d(f),nm=d(f),ng=d("7"),nf=d("6"),ne=d("5"),nd=d("4"),nc=d("3"),nb=d(eU),na=d(fr),m$=d(Y),m_=d(f),m6=d("g"),m8=d(f),m9=d(e8),m7=d(e8),m4=d(fq),m5=d(fq),m3=d(f),nj=d(fr),nk=d(Y),nh=d(eU),ni=d(f),m1=d(f),mR=d(e2),mS=d(f),mT=d(" or "),mU=d(eJ),mV=d("("),mW=d(ah),mX=[0,d("makerspace")],mY=d("/s"),mZ=d(e2),m0=[0,d("goal")],le=[0,[8,15,0,0,0],d("%F")],ld=d(Y),lf=d("Land-mine-research"),lg=d("Explosive-cannon-shell"),lh=d("Cannon-shell"),li=d("Flame-thrower-ammo"),lj=d("Piercing-bullet-magazine"),lk=d("Basic-bullet-magazine"),ll=d("Small-lamp"),lm=d("Medium-electric-pole"),ln=d("Stone-wall"),lo=d("Logistic-chest-requester"),lp=d("Logistic-chest-storage"),lq=d("Logistic-chest-passive-provider"),lr=d("Logistic-chest-active-provider"),ls=d("Basic-mining-drill"),lt=d("Rocket-structure"),lu=d("Effectivity-module-3"),lv=d("Effectivity-module-2"),lw=d("Effectivity-module"),lx=d("Inserter-icon"),ly=d("Basic-splitter"),lz=d("Express-transport-belt-to-ground"),lA=d("Fast-transport-belt-to-ground"),lB=d("Basic-transport-belt-to-ground"),lC=d("Basic-transport-belt"),lD=d("Barrel-empty"),lE=d("Alien-science-pack"),lF=d("Flying-robot-frame"),lG=d("Electric-engine-unit"),lH=d("Engine-unit"),lI=d("Heavy-oil"),lJ=d("Alien-artifact"),lK=d("Raw-wood"),lM=[0,[0,d(bi),d(fs)],[0,[0,d(bT),d("Advanced_oil_processing")],[0,[0,d(eX),d(eL)],[0,[0,d(e_),d(eL)],0]]]],lN=d("Basic_grenade"),lO=d("Land_mine"),lP=d("Destroyer_capsule"),lQ=d("Distractor_capsule"),lR=d("Slowdown_capsule"),lS=d("Poison_capsule"),lT=d("Defender_capsule"),lU=d("Explosive_cannon_shells"),lV=d("Explosive_rocket"),lW=d("Piercing_shotgun_shells"),lX=d("Shotgun_shells"),lY=d("Pipe-to-Ground"),lZ=d("Steam_engine"),l0=d("Big_electric_pole"),l1=d("Medium_electric_pole"),l2=d("Small_electric_pole"),l3=d("Gun_turret"),l4=d("Wooden_chest"),l5=d("Long_handed_inserter"),l6=d("Express_underground_belt"),l7=d("Fast_underground_belt"),l8=d("Underground_belt"),l9=d("Assembling_machine_3"),l_=d("Assembling_machine_2"),l$=d("Assembling_machine"),ma=d(fs),mb=d("Rocket_part"),mc=d("Rocket_fuel"),md=d("Solid_fuel"),me=d("Rocket_control_unit"),mf=d("Low_density_structure"),mg=d("Construction_robot"),mh=d("Logistic_robot"),mi=d("Speed_module_3"),mj=d("Speed_module_2"),mk=d("Speed_module"),ml=d("Productivity_module_3"),mm=d("Productivity_module_2"),mn=d("Efficiency_module_3"),mo=d("Efficiency_module_2"),mp=d("Productivity_module"),mq=d("Efficiency_module"),mr=d("Basic_accumulator"),ms=d("Smart_inserter"),mt=d("Fast_inserter"),mu=d("Empty_barrel"),mv=d("Alien_science_pack"),mw=d("Flying_robot_frame"),mx=d("Electric_engine_unit"),my=d("Engine_unit"),mz=d("Heavy_oil"),mA=d("Plastic_bar"),mB=d("Copper_cable"),mC=d("Copper_ore"),mD=d("Iron_ore"),mE=d("Alien_artifact"),mF=d("Raw_wood"),m2=d(f);function
u(a){if(typeof
a==="number")return 0;else
switch(a[0]){case
0:return[0,u(a[1])];case
1:return[1,u(a[1])];case
2:return[2,u(a[1])];case
3:return[3,u(a[1])];case
4:return[4,u(a[1])];case
5:return[5,u(a[1])];case
6:return[6,u(a[1])];case
7:return[7,u(a[1])];case
8:var
c=a[1];return[8,c,u(a[2])];case
9:var
b=a[1];return[9,b,b,u(a[3])];case
10:return[10,u(a[1])];case
11:return[11,u(a[1])];case
12:return[12,u(a[1])];case
13:return[13,u(a[1])];default:return[14,u(a[1])]}}function
L(a,b){if(typeof
a==="number")return b;else
switch(a[0]){case
0:return[0,L(a[1],b)];case
1:return[1,L(a[1],b)];case
2:return[2,L(a[1],b)];case
3:return[3,L(a[1],b)];case
4:return[4,L(a[1],b)];case
5:return[5,L(a[1],b)];case
6:return[6,L(a[1],b)];case
7:return[7,L(a[1],b)];case
8:var
c=a[1];return[8,c,L(a[2],b)];case
9:var
d=a[2],e=a[1];return[9,e,d,L(a[3],b)];case
10:return[10,L(a[1],b)];case
11:return[11,L(a[1],b)];case
12:return[12,L(a[1],b)];case
13:return[13,L(a[1],b)];default:return[14,L(a[1],b)]}}function
t(a,b){if(typeof
a==="number")return b;else
switch(a[0]){case
0:return[0,t(a[1],b)];case
1:return[1,t(a[1],b)];case
2:var
c=a[1];return[2,c,t(a[2],b)];case
3:var
d=a[1];return[3,d,t(a[2],b)];case
4:var
e=a[3],f=a[2],g=a[1];return[4,g,f,e,t(a[4],b)];case
5:var
h=a[3],i=a[2],j=a[1];return[5,j,i,h,t(a[4],b)];case
6:var
k=a[3],l=a[2],m=a[1];return[6,m,l,k,t(a[4],b)];case
7:var
n=a[3],o=a[2],p=a[1];return[7,p,o,n,t(a[4],b)];case
8:var
q=a[3],r=a[2],s=a[1];return[8,s,r,q,t(a[4],b)];case
9:return[9,t(a[1],b)];case
10:return[10,t(a[1],b)];case
11:var
u=a[1];return[11,u,t(a[2],b)];case
12:var
v=a[1];return[12,v,t(a[2],b)];case
13:var
w=a[2],x=a[1];return[13,x,w,t(a[3],b)];case
14:var
y=a[2],z=a[1];return[14,z,y,t(a[3],b)];case
15:return[15,t(a[1],b)];case
16:return[16,t(a[1],b)];case
17:var
A=a[1];return[17,A,t(a[2],b)];case
18:var
B=a[1];return[18,B,t(a[2],b)];case
19:return[19,t(a[1],b)];case
20:var
C=a[2],D=a[1];return[20,D,C,t(a[3],b)];case
21:var
E=a[1];return[21,E,t(a[2],b)];case
22:return[22,t(a[1],b)];case
23:var
F=a[1];return[23,F,t(a[2],b)];default:var
G=a[2],H=a[1];return[24,H,G,t(a[3],b)]}}function
de(a){throw[0,b8,a]}function
aC(a){throw[0,dd,a]}aB([D,fO,0]);function
df(a,b){return oU(a,b)?a:b}function
bt(a){return 0<=a?a:-a|0}function
O(a,b){var
c=j(a),e=j(b),d=J(c+e|0);aa(a,0,d,0,c);aa(b,0,d,c,e);return d}function
as(a,b){if(a){var
c=a[1];return[0,c,as(a[2],b)]}return b}o$(0);fC(1);fC(2);function
fR(a){function
b(a){var
b=a;for(;;){if(b){var
c=b[2],d=b[1];try{o_(d)}catch(f){}var
b=c;continue}return 0}}return b(pa(0))}aB([D,fS,0]);function
aZ(a,b){var
c=a,d=b;for(;;){if(c){var
e=[0,c[1],d],c=c[2],d=e;continue}return d}}function
a0(a){return aZ(a,0)}function
R(a,b){if(b){var
c=b[2],d=h(a,b[1]);return[0,d,R(a,c)]}return 0}function
S(a,b){var
c=b;for(;;){if(c){var
d=c[2];h(a,c[1]);var
c=d;continue}return 0}}function
dg(f){var
g=0;return function(a){var
c=g,b=a;for(;;){if(b){var
d=b[2],e=b[1];if(h(f,e)){var
c=[0,e,c],b=d;continue}var
b=d;continue}return a0(c)}}}function
dh(a,b){var
d=a,c=b;for(;;){if(0===d)return c;if(c){var
d=d-1|0,c=c[2];continue}throw[0,x,fT]}}function
f1(a){var
b=65<=a?90<a?0:1:0;if(!b){var
c=e3<=a?214<a?0:1:0;if(!c){var
d=216<=a?222<a?1:0:1;if(d)return a}}return a+32|0}function
a1(a,b){var
c=J(a);oP(c,0,a,b);return c}function
di(a){var
b=j(a),c=J(b);aa(a,0,c,0,b);return c}function
dj(a){return di(a)}function
dk(a,b,c){if(0<=b)if(0<=c)if(!((j(a)-c|0)<b)){var
d=J(c);aa(a,b,d,0,c);return d}return aC(f2)}function
dl(a,b,c){return dk(a,b,c)}function
dm(a,b,c,d,e){if(0<=e)if(0<=b)if(!((j(a)-e|0)<b))if(0<=d)if(!((j(c)-e|0)<d))return aa(a,b,c,d,e);return aC(f3)}function
ab(a,b,c,d,e){if(0<=e)if(0<=b)if(!((j(a)-e|0)<b))if(0<=d)if(!((j(c)-e|0)<d))return aa(a,b,c,d,e);return aC(f4)}function
f5(a,b,c,d){var
e=c;for(;;){if(b<=e)throw T;if(br(a,e)===d)return e;var
e=e+1|0;continue}}function
f6(a,b,c){var
d=j(a);if(0<=b)if(!(d<b))try{f5(a,d,b,c);var
e=1;return e}catch(f){f=aj(f);if(f===T)return 0;throw f}return aC(f7)}function
aD(a,b){return a1(a,b)}function
b9(a,b,c){return dk(a,b,c)}function
aE(d,b){if(b){var
a=b[1],g=[0,0],f=[0,0],h=b[2];S(function(a){g[1]++;f[1]=f[1]+j(a)|0;return 0},b);var
e=J(f[1]+aX(j(d),g[1]-1|0)|0);aa(a,0,e,0,j(a));var
c=[0,j(a)];S(function(a){aa(d,0,e,c[1],j(d));c[1]=c[1]+j(d)|0;aa(a,0,e,c[1],j(a));c[1]=c[1]+j(a)|0;return 0},h);return e}return f8}var
b_=pk(0),b$=(1<<(b_+eQ|0))-1|0,a2=aX(b_/8|0,b$)-1|0;function
f9(a,b){return f6(a,0,b)}aB([D,f_,0]);var
ga=aB([D,f$,0]);function
gb(a){throw ga}function
gc(a){var
c=a[1];a[1]=gb;try{var
b=h(c,0);a[1]=b;pc(a,bS);return b}catch(f){f=aj(f);a[1]=function(a){throw f};throw f}}function
dn(a,b){var
c=[0,a[3]];for(;;){if(c[1]<(a[2]+b|0)){c[1]=2*c[1]|0;continue}if(a2<c[1])if((a[2]+b|0)<=a2)c[1]=a2;else
de(gd);var
d=J(c[1]);dm(a[1],0,d,0,a[2]);a[1]=d;a[3]=c[1];return 0}}function
a3(a,b){var
c=j(b),d=a[2]+c|0;if(a[3]<d)dn(a,c);ab(b,0,a[1],a[2],c);a[2]=d;return 0}var
ca=6;function
dp(a){return[0,0,J(a)]}function
dq(a,b){var
c=j(a[2]),d=a[1]+b|0,e=c<d?1:0;if(e){var
f=J(df(c*2|0,d));dm(a[2],0,f,0,c);a[2]=f;var
g=0}else
var
g=e;return g}function
a4(a,b){dq(a,1);aq(a[2],a[1],b);a[1]=a[1]+1|0;return 0}function
F(a,b){var
c=j(b);dq(a,c);ab(b,0,a[2],a[1],c);a[1]=a[1]+c|0;return 0}function
dr(a){return dl(a[2],0,a[1])}function
cb(a,b){var
c=b;for(;;)if(typeof
c==="number")return 0;else
switch(c[0]){case
0:var
d=c[1];F(a,gm);var
c=d;continue;case
1:var
e=c[1];F(a,gn);var
c=e;continue;case
2:var
f=c[1];F(a,go);var
c=f;continue;case
3:var
g=c[1];F(a,gp);var
c=g;continue;case
4:var
h=c[1];F(a,gq);var
c=h;continue;case
5:var
i=c[1];F(a,gr);var
c=i;continue;case
6:var
j=c[1];F(a,gs);var
c=j;continue;case
7:var
k=c[1];F(a,gt);var
c=k;continue;case
8:var
l=c[2],m=c[1];F(a,gu);cb(a,m);F(a,gv);var
c=l;continue;case
9:var
n=c[3],o=c[1];F(a,gw);cb(a,o);F(a,gx);var
c=n;continue;case
10:var
p=c[1];F(a,gy);var
c=p;continue;case
11:var
q=c[1];F(a,gz);var
c=q;continue;case
12:var
r=c[1];F(a,gA);var
c=r;continue;case
13:var
s=c[1];F(a,gB);var
c=s;continue;default:var
t=c[1];F(a,gC);var
c=t;continue}}function
z(a){if(typeof
a==="number")return 0;else
switch(a[0]){case
0:return[0,z(a[1])];case
1:return[1,z(a[1])];case
2:return[2,z(a[1])];case
3:return[3,z(a[1])];case
4:return[4,z(a[1])];case
5:return[5,z(a[1])];case
6:return[6,z(a[1])];case
7:return[7,z(a[1])];case
8:var
b=a[1];return[8,b,z(a[2])];case
9:var
c=a[2],d=a[1];return[9,c,d,z(a[3])];case
10:return[10,z(a[1])];case
11:return[11,z(a[1])];case
12:return[12,z(a[1])];case
13:return[13,z(a[1])];default:return[14,z(a[1])]}}function
G(a){if(typeof
a==="number"){var
s=function(a){return 0},t=function(a){return 0},u=function(a){return 0};return[0,function(a){return 0},u,t,s]}else
switch(a[0]){case
0:var
b=G(a[1]),v=b[4],w=b[3],x=b[2],y=b[1],A=function(a){h(x,0);return 0};return[0,function(a){h(y,0);return 0},A,w,v];case
1:var
c=G(a[1]),C=c[4],D=c[3],E=c[2],F=c[1],H=function(a){h(E,0);return 0};return[0,function(a){h(F,0);return 0},H,D,C];case
2:var
d=G(a[1]),I=d[4],J=d[3],K=d[2],L=d[1],M=function(a){h(K,0);return 0};return[0,function(a){h(L,0);return 0},M,J,I];case
3:var
e=G(a[1]),N=e[4],O=e[3],P=e[2],Q=e[1],R=function(a){h(P,0);return 0};return[0,function(a){h(Q,0);return 0},R,O,N];case
4:var
f=G(a[1]),S=f[4],T=f[3],U=f[2],V=f[1],W=function(a){h(U,0);return 0};return[0,function(a){h(V,0);return 0},W,T,S];case
5:var
g=G(a[1]),X=g[4],Y=g[3],Z=g[2],_=g[1],$=function(a){h(Z,0);return 0};return[0,function(a){h(_,0);return 0},$,Y,X];case
6:var
i=G(a[1]),aa=i[4],ab=i[3],ac=i[2],ad=i[1],ae=function(a){h(ac,0);return 0};return[0,function(a){h(ad,0);return 0},ae,ab,aa];case
7:var
j=G(a[1]),af=j[4],ag=j[3],ah=j[2],ai=j[1],aj=function(a){h(ah,0);return 0};return[0,function(a){h(ai,0);return 0},aj,ag,af];case
8:var
k=G(a[2]),ak=k[4],al=k[3],am=k[2],an=k[1],ao=function(a){h(am,0);return 0};return[0,function(a){h(an,0);return 0},ao,al,ak];case
9:var
ap=a[2],aq=a[1],l=G(a[3]),ar=l[4],as=l[3],at=l[2],au=l[1],m=G(B(z(aq),ap)),av=m[4],aw=m[3],ax=m[2],ay=m[1],az=function(a){h(av,0);h(ar,0);return 0},aA=function(a){h(as,0);h(aw,0);return 0},aB=function(a){h(ax,0);h(at,0);return 0};return[0,function(a){h(au,0);h(ay,0);return 0},aB,aA,az];case
10:var
n=G(a[1]),aC=n[4],aD=n[3],aE=n[2],aF=n[1],aG=function(a){h(aE,0);return 0};return[0,function(a){h(aF,0);return 0},aG,aD,aC];case
11:var
o=G(a[1]),aH=o[4],aI=o[3],aJ=o[2],aK=o[1],aL=function(a){h(aJ,0);return 0};return[0,function(a){h(aK,0);return 0},aL,aI,aH];case
12:var
p=G(a[1]),aM=p[4],aN=p[3],aO=p[2],aP=p[1],aQ=function(a){h(aO,0);return 0};return[0,function(a){h(aP,0);return 0},aQ,aN,aM];case
13:var
q=G(a[1]),aR=q[4],aS=q[3],aT=q[2],aU=q[1],aV=function(a){h(aR,0);return 0},aW=function(a){h(aS,0);return 0},aX=function(a){h(aT,0);return 0};return[0,function(a){h(aU,0);return 0},aX,aW,aV];default:var
r=G(a[1]),aY=r[4],aZ=r[3],a0=r[2],a1=r[1],a2=function(a){h(aY,0);return 0},a3=function(a){h(aZ,0);return 0},a4=function(a){h(a0,0);return 0};return[0,function(a){h(a1,0);return 0},a4,a3,a2]}}function
B(a,b){if(typeof
a==="number")if(typeof
b==="number")return 0;else
switch(b[0]){case
10:var
c=0;break;case
11:var
c=1;break;case
12:var
c=2;break;case
13:var
c=3;break;case
14:var
c=4;break;case
8:var
c=5;break;case
9:var
c=6;break;default:throw[0,x,gD]}else
switch(a[0]){case
0:var
t=a[1];if(typeof
b==="number")var
d=1;else
switch(b[0]){case
0:return[0,B(t,b[1])];case
8:var
c=5,d=0;break;case
9:var
c=6,d=0;break;case
10:var
c=0,d=0;break;case
11:var
c=1,d=0;break;case
12:var
c=2,d=0;break;case
13:var
c=3,d=0;break;case
14:var
c=4,d=0;break;default:var
d=1}if(d)var
c=7;break;case
1:var
u=a[1];if(typeof
b==="number")var
e=1;else
switch(b[0]){case
1:return[1,B(u,b[1])];case
8:var
c=5,e=0;break;case
9:var
c=6,e=0;break;case
10:var
c=0,e=0;break;case
11:var
c=1,e=0;break;case
12:var
c=2,e=0;break;case
13:var
c=3,e=0;break;case
14:var
c=4,e=0;break;default:var
e=1}if(e)var
c=7;break;case
2:var
v=a[1];if(typeof
b==="number")var
f=1;else
switch(b[0]){case
2:return[2,B(v,b[1])];case
8:var
c=5,f=0;break;case
9:var
c=6,f=0;break;case
10:var
c=0,f=0;break;case
11:var
c=1,f=0;break;case
12:var
c=2,f=0;break;case
13:var
c=3,f=0;break;case
14:var
c=4,f=0;break;default:var
f=1}if(f)var
c=7;break;case
3:var
w=a[1];if(typeof
b==="number")var
g=1;else
switch(b[0]){case
3:return[3,B(w,b[1])];case
8:var
c=5,g=0;break;case
9:var
c=6,g=0;break;case
10:var
c=0,g=0;break;case
11:var
c=1,g=0;break;case
12:var
c=2,g=0;break;case
13:var
c=3,g=0;break;case
14:var
c=4,g=0;break;default:var
g=1}if(g)var
c=7;break;case
4:var
y=a[1];if(typeof
b==="number")var
i=1;else
switch(b[0]){case
4:return[4,B(y,b[1])];case
8:var
c=5,i=0;break;case
9:var
c=6,i=0;break;case
10:var
c=0,i=0;break;case
11:var
c=1,i=0;break;case
12:var
c=2,i=0;break;case
13:var
c=3,i=0;break;case
14:var
c=4,i=0;break;default:var
i=1}if(i)var
c=7;break;case
5:var
A=a[1];if(typeof
b==="number")var
j=1;else
switch(b[0]){case
5:return[5,B(A,b[1])];case
8:var
c=5,j=0;break;case
9:var
c=6,j=0;break;case
10:var
c=0,j=0;break;case
11:var
c=1,j=0;break;case
12:var
c=2,j=0;break;case
13:var
c=3,j=0;break;case
14:var
c=4,j=0;break;default:var
j=1}if(j)var
c=7;break;case
6:var
C=a[1];if(typeof
b==="number")var
k=1;else
switch(b[0]){case
6:return[6,B(C,b[1])];case
8:var
c=5,k=0;break;case
9:var
c=6,k=0;break;case
10:var
c=0,k=0;break;case
11:var
c=1,k=0;break;case
12:var
c=2,k=0;break;case
13:var
c=3,k=0;break;case
14:var
c=4,k=0;break;default:var
k=1}if(k)var
c=7;break;case
7:var
D=a[1];if(typeof
b==="number")var
l=1;else
switch(b[0]){case
7:return[7,B(D,b[1])];case
8:var
c=5,l=0;break;case
9:var
c=6,l=0;break;case
10:var
c=0,l=0;break;case
11:var
c=1,l=0;break;case
12:var
c=2,l=0;break;case
13:var
c=3,l=0;break;case
14:var
c=4,l=0;break;default:var
l=1}if(l)var
c=7;break;case
8:var
E=a[2],F=a[1];if(typeof
b==="number")var
n=1;else
switch(b[0]){case
8:var
H=b[1],I=B(E,b[2]);return[8,B(F,H),I];case
10:var
c=0,n=0;break;case
11:var
c=1,n=0;break;case
12:var
c=2,n=0;break;case
13:var
c=3,n=0;break;case
14:var
c=4,n=0;break;default:var
n=1}if(n)throw[0,x,gM];break;case
9:var
J=a[3],K=a[2],L=a[1];if(typeof
b==="number")var
m=1;else
switch(b[0]){case
8:var
c=5,m=0;break;case
9:var
M=b[3],N=b[2],O=b[1],s=G(B(z(K),O)),P=s[4];h(s[2],0);h(P,0);return[9,L,N,B(J,M)];case
10:var
c=0,m=0;break;case
11:var
c=1,m=0;break;case
12:var
c=2,m=0;break;case
13:var
c=3,m=0;break;case
14:var
c=4,m=0;break;default:var
m=1}if(m)throw[0,x,gN];break;case
10:var
Q=a[1];if(typeof
b!=="number"&&10===b[0])return[10,B(Q,b[1])];throw[0,x,gO];case
11:var
R=a[1];if(typeof
b==="number")var
r=1;else
switch(b[0]){case
10:var
c=0,r=0;break;case
11:return[11,B(R,b[1])];default:var
r=1}if(r)throw[0,x,gP];break;case
12:var
S=a[1];if(typeof
b==="number")var
q=1;else
switch(b[0]){case
10:var
c=0,q=0;break;case
11:var
c=1,q=0;break;case
12:return[12,B(S,b[1])];default:var
q=1}if(q)throw[0,x,gQ];break;case
13:var
T=a[1];if(typeof
b==="number")var
p=1;else
switch(b[0]){case
10:var
c=0,p=0;break;case
11:var
c=1,p=0;break;case
12:var
c=2,p=0;break;case
13:return[13,B(T,b[1])];default:var
p=1}if(p)throw[0,x,gR];break;default:var
U=a[1];if(typeof
b==="number")var
o=1;else
switch(b[0]){case
10:var
c=0,o=0;break;case
11:var
c=1,o=0;break;case
12:var
c=2,o=0;break;case
13:var
c=3,o=0;break;case
14:return[14,B(U,b[1])];default:var
o=1}if(o)throw[0,x,gS]}switch(c){case
0:throw[0,x,gG];case
1:throw[0,x,gH];case
2:throw[0,x,gI];case
3:throw[0,x,gJ];case
4:throw[0,x,gK];case
5:throw[0,x,gE];case
6:throw[0,x,gF];default:throw[0,x,gL]}}var
H=aB([D,gT,0]);function
cc(a,b){if(typeof
a==="number")return[0,0,b];else{if(0===a[0])return[0,[0,a[1],a[2]],b];if(typeof
b!=="number"&&2===b[0])return[0,[1,a[1]],b[1]];throw H}}function
a5(a,b,c){var
d=cc(a,c);if(typeof
b==="number"){if(0===b)return[0,d[1],0,d[2]];var
e=d[2];if(typeof
e!=="number"&&2===e[0])return[0,d[1],1,e[1]];throw H}return[0,d[1],[0,b[1]],d[2]]}function
oK(a,b,c){if(typeof
b==="number")return[0,0,c];else
switch(b[0]){case
0:if(typeof
c!=="number"&&0===c[0]){var
w=p(b[1],c[1]);return[0,[0,w[1]],w[2]]}break;case
1:if(typeof
c!=="number"&&0===c[0]){var
x=p(b[1],c[1]);return[0,[1,x[1]],x[2]]}break;case
2:var
af=b[2],y=cc(b[1],c),f=y[2],ag=y[1];if(typeof
f!=="number"&&1===f[0]){var
z=p(af,f[1]);return[0,[2,ag,z[1]],z[2]]}throw H;case
3:var
ah=b[2],A=cc(b[1],c),g=A[2],ai=A[1];if(typeof
g!=="number"&&1===g[0]){var
B=p(ah,g[1]);return[0,[3,ai,B[1]],B[2]]}throw H;case
4:var
aj=b[4],ak=b[1],h=a5(b[2],b[3],c),i=h[3],al=h[2],am=h[1];if(typeof
i!=="number"&&2===i[0]){var
C=p(aj,i[1]);return[0,[4,ak,am,al,C[1]],C[2]]}throw H;case
5:var
an=b[4],ao=b[1],j=a5(b[2],b[3],c),l=j[3],ap=j[2],aq=j[1];if(typeof
l!=="number"&&3===l[0]){var