-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlightbulb.js
2386 lines (2386 loc) · 94.8 KB
/
lightbulb.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 3.9.1
(function(d){"use strict";var
db="%Li",dM=" : flags Open_text and Open_binary are not compatible",dF="Invalid_argument",bo="Map.bal",dE="@[",d0=640,b2=1255,dw=", characters ",ae=255,dQ=0x800,X=0xffff,b1="jsError",W=0x8000,dD="%ni",dv=12520,du="(Program not linked with -g, cannot print stack backtrace)\n",dP=256,dm="End_of_file",dL="Unix.Unix_error",dl="Failure",dV="infinity",R=0xff,aT=1000,e="",dK="Stack_overflow",b4="^",G="0",aE=0x3f,dJ=-97,dI="Not_found",b8=0xf,aV=128,dj=-48,dk=0xdc00,dC="Sys_blocked_io",dZ="fd ",dt="Match_failure",q=248,b0=", ",dH="px ",da="static/",v="camlinternalFormat.ml",dO="Division_by_zero",bq=252,dY=1027,di="Sys_error",av=".",aD="+",dU=0xf0,dB=246,dA="%u",b7="%d",ds="%li",dG=1026,bZ=480,dN="buffer.ml",dh="Unix",b5=127,aU=1024,dT=-32,dz="@{",ad=" ",Q=0x80,b_="e",c$="Undefined_recursive_module",df=120,dg=103,dy=" : flags Open_rdonly and Open_wronly are not compatible",dX="([^/]*)",de=512,au="-",dr="Lwt.%s",b3="nan",bn="Graphics.Graphic_failure",dd=0x7ff0,dS="Lwt.",dq=0xe0,dx=" : file already exists",dp=0xdfff,ag=0xffffff,af="/",b6="compare: functional value",dR="Assert_failure",dc="0x",c_="%i",dW="Out_of_memory",dn=1073741823,bp=254,b9="index out of bounds",aF=100,bm=250,br="_bigarr02";function
bz(c,b,a){var
d=String.fromCharCode;if(b==0&&a<=4096&&a==c.length)return d.apply(null,c);var
f=e;for(;0<a;b+=aU,a-=aU)f+=d.apply(null,c.slice(b,b+Math.min(a,aU)));return f}function
bs(b){if(d.Uint8Array)var
c=new(d.Uint8Array)(b.l);else
var
c=new
Array(b.l);var
f=b.c,e=f.length,a=0;for(;a<e;a++)c[a]=f.charCodeAt(a);for(e=b.l;a<e;a++)c[a]=0;b.c=c;b.t=4;return c}function
ao(d,e,b,f,c){if(c==0)return 0;if(f==0&&(c>=b.l||b.t==2&&c>=b.c.length)){b.c=d.t==4?bz(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else
if(b.t==2&&f==b.c.length){b.c+=d.t==4?bz(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else{if(b.t!=4)bs(b);var
g=d.c,h=b.c;if(d.t==4)if(f<=e)for(var
a=0;a<c;a++)h[f+a]=g[e+a];else
for(var
a=c-1;a>=0;a--)h[f+a]=g[e+a];else{var
i=Math.min(c,g.length-e);for(var
a=0;a<i;a++)h[f+a]=g.charCodeAt(e+a);for(;a<c;a++)h[f+a]=0}}return 0}function
ap(a){return a}function
aw(a,b,c,d,e){ao(ap(a),b,c,d,e);return 0}function
kx(b,a){throw[0,b,a]}function
aJ(b,a){if(b==0)return e;if(a.repeat)return a.repeat(b);var
d=e,c=0;for(;;){if(b&1)d+=a;b>>=1;if(b==0)return d;a+=a;c++;if(c==9)a.slice(0,1)}}function
ay(a){if(a.t==2)a.c+=aJ(a.l-a.c.length,"\0");else
a.c=bz(a.c,0,a.c.length);a.t=0}function
ex(a){if(a.length<24){for(var
b=0;b<a.length;b++)if(a.charCodeAt(b)>b5)return false;return true}else
return!/[^\x00-\x7f]/.test(a)}function
cp(f){for(var
k=e,c=e,h,g,i,a,b=0,j=f.length;b<j;b++){g=f.charCodeAt(b);if(g<Q){for(var
d=b+1;d<j&&(g=f.charCodeAt(d))<Q;d++);if(d-b>de){c.substr(0,1);k+=c;c=e;k+=f.slice(b,d)}else
c+=f.slice(b,d);if(d==j)break;b=d}a=1;if(++b<j&&((i=f.charCodeAt(b))&-64)==aV){h=i+(g<<6);if(g<dq){a=h-0x3080;if(a<Q)a=1}else{a=2;if(++b<j&&((i=f.charCodeAt(b))&-64)==aV){h=i+(h<<6);if(g<dU){a=h-0xe2080;if(a<dQ||a>=0xd7ff&&a<0xe000)a=2}else{a=3;if(++b<j&&((i=f.charCodeAt(b))&-64)==aV&&g<0xf5){a=i-0x3c82080+(h<<6);if(a<0x10000||a>0x10ffff)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else
if(a>X)c+=String.fromCharCode(0xd7c0+(a>>10),dk+(a&0x3FF));else
c+=String.fromCharCode(a);if(c.length>aU){c.substr(0,1);k+=c;c=e}}return k+c}function
ah(c,a,b){this.t=c;this.c=a;this.l=b}ah.prototype.toString=function(){switch(this.t){case
9:return this.c;default:ay(this);case
0:if(ex(this.c)){this.t=9;return this.c}this.t=8;case
8:return this.c}};ah.prototype.toUtf16=function(){var
a=this.toString();if(this.t==9)return a;return cp(a)};ah.prototype.slice=function(){var
a=this.t==4?this.c.slice():this.c;return new
ah(this.t,a,this.l)};function
d_(a){return new
ah(0,a,a.length)}function
a(a){return d_(a)}function
cn(c,b){kx(c,a(b))}var
p=[0];function
t(a){cn(p.Invalid_argument,a)}function
d8(){t(b9)}function
o(a,c,b){b&=R;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}bs(a)}a.c[c]=b;return 0}function
ax(b,a,c){if(a>>>0>=b.l)d8();return o(b,a,c)}function
aX(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
_(c,a){if(c.fun)return _(c.fun,a);if(typeof
c!=="function")return c;var
b=c.length|0;if(b===0)return c.apply(null,a);var
e=a.length|0,d=b-e|0;if(d==0)return c.apply(null,a);else
if(d<0)return _(c.apply(null,a.slice(0,b)),a.slice(b));else
return function(){var
e=arguments.length==0?1:arguments.length,d=new
Array(a.length+e);for(var
b=0;b<a.length;b++)d[b]=a[b];for(var
b=0;b<arguments.length;b++)d[a.length+b]=arguments[b];return _(c,d)}}function
aW(){t(b9)}function
aq(a,b){if(b>>>0>=a.length-1)aW();return a}function
jP(a){if(isFinite(a)){if(Math.abs(a)>=2.2250738585072014e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function
aj(a){if((a.t&6)!=0)ay(a);return a.c}var
kO=Math.log2&&Math.log2(1.1235582092889474E+307)==1020;function
kN(a){if(kO)return Math.floor(Math.log2(a));var
b=0;if(a==0)return-Infinity;if(a>=1)while(a>=2){a/=2;b++}else
while(a<1){a*=2;b--}return b}function
cf(c){var
a=new(d.Float32Array)(1);a[0]=c;var
b=new(d.Int32Array)(a.buffer);return b[0]|0}var
em=Math.pow(2,-24);function
et(a){throw a}function
co(){et(p.Division_by_zero)}function
c(b,c,a){this.lo=b&ag;this.mi=c&ag;this.hi=a&X}c.prototype.caml_custom="_j";c.prototype.copy=function(){return new
c(this.lo,this.mi,this.hi)};c.prototype.ucompare=function(a){if(this.hi>a.hi)return 1;if(this.hi<a.hi)return-1;if(this.mi>a.mi)return 1;if(this.mi<a.mi)return-1;if(this.lo>a.lo)return 1;if(this.lo<a.lo)return-1;return 0};c.prototype.compare=function(a){var
b=this.hi<<16,c=a.hi<<16;if(b>c)return 1;if(b<c)return-1;if(this.mi>a.mi)return 1;if(this.mi<a.mi)return-1;if(this.lo>a.lo)return 1;if(this.lo<a.lo)return-1;return 0};c.prototype.neg=function(){var
a=-this.lo,b=-this.mi+(a>>24),d=-this.hi+(b>>24);return new
c(a,b,d)};c.prototype.add=function(a){var
b=this.lo+a.lo,d=this.mi+a.mi+(b>>24),e=this.hi+a.hi+(d>>24);return new
c(b,d,e)};c.prototype.sub=function(a){var
b=this.lo-a.lo,d=this.mi-a.mi+(b>>24),e=this.hi-a.hi+(d>>24);return new
c(b,d,e)};c.prototype.mul=function(a){var
b=this.lo*a.lo,d=(b*em|0)+this.mi*a.lo+this.lo*a.mi,e=(d*em|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new
c(b,d,e)};c.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0};c.prototype.isNeg=function(){return this.hi<<16<0};c.prototype.and=function(a){return new
c(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};c.prototype.or=function(a){return new
c(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};c.prototype.xor=function(a){return new
c(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};c.prototype.shift_left=function(a){a=a&63;if(a==0)return this;if(a<24)return new
c(this.lo<<a,this.mi<<a|this.lo>>24-a,this.hi<<a|this.mi>>24-a);if(a<48)return new
c(0,this.lo<<a-24,this.mi<<a-24|this.lo>>48-a);return new
c(0,0,this.lo<<a-48)};c.prototype.shift_right_unsigned=function(a){a=a&63;if(a==0)return this;if(a<24)return new
c(this.lo>>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new
c(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new
c(this.hi>>a-48,0,0)};c.prototype.shift_right=function(a){a=a&63;if(a==0)return this;var
d=this.hi<<16>>16;if(a<24)return new
c(this.lo>>a|this.mi<<24-a,this.mi>>a|d<<24-a,this.hi<<16>>a>>>16);var
b=this.hi<<16>>31;if(a<48)return new
c(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,b&X);return new
c(this.hi<<16>>a-32,b,b)};c.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&ag;this.lo=this.lo<<1&ag};c.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&ag;this.mi=(this.mi>>>1|this.hi<<23)&ag;this.hi=this.hi>>>1};c.prototype.udivmod=function(f){var
d=0,b=this.copy(),a=f.copy(),e=new
c(0,0,0);while(b.ucompare(a)>0){d++;a.lsl1()}while(d>=0){d--;e.lsl1();if(b.ucompare(a)>=0){e.lo++;b=b.sub(a)}a.lsr1()}return{quotient:e,modulus:b}};c.prototype.div=function(a){var
b=this;if(a.isZero())co();var
d=b.hi^a.hi;if(b.hi&W)b=b.neg();if(a.hi&W)a=a.neg();var
c=b.udivmod(a).quotient;if(d&W)c=c.neg();return c};c.prototype.mod=function(b){var
a=this;if(b.isZero())co();var
d=a.hi;if(a.hi&W)a=a.neg();if(b.hi&W)b=b.neg();var
c=a.udivmod(b).modulus;if(d&W)c=c.neg();return c};c.prototype.toInt=function(){return this.lo|this.mi<<24};c.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};c.prototype.toArray=function(){return[this.hi>>8,this.hi&R,this.mi>>16,this.mi>>8&R,this.mi&R,this.lo>>16,this.lo>>8&R,this.lo&R]};c.prototype.lo32=function(){return this.lo|(this.mi&R)<<24};c.prototype.hi32=function(){return this.mi>>>8&X|this.hi<<16};function
bv(b,d,a){return new
c(b,d,a)}function
bu(a){if(!isFinite(a)){if(isNaN(a))return bv(1,0,dd);return a>0?bv(0,0,dd):bv(0,0,0xfff0)}var
f=a==0&&1/a==-Infinity?W:a>=0?0:W;if(f)a=-a;var
b=kN(a)+1023;if(b<=0){b=0;a/=Math.pow(2,-dG)}else{a/=Math.pow(2,b-dY);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&b8|f|b<<4;return bv(g,e,c)}function
a0(a){return a.toArray()}function
d7(c,b,g){c.write(32,b.dims.length);c.write(32,b.kind|b.layout<<8);if(b.caml_custom==br)for(var
a=0;a<b.dims.length;a++)if(b.dims[a]<X)c.write(16,b.dims[a]);else{c.write(16,X);c.write(32,0);c.write(32,b.dims[a])}else
for(var
a=0;a<b.dims.length;a++)c.write(32,b.dims[a]);switch(b.kind){case
2:case
3:case
12:for(var
a=0;a<b.data.length;a++)c.write(8,b.data[a]);break;case
4:case
5:for(var
a=0;a<b.data.length;a++)c.write(16,b.data[a]);break;case
6:for(var
a=0;a<b.data.length;a++)c.write(32,b.data[a]);break;case
8:case
9:c.write(8,0);for(var
a=0;a<b.data.length;a++)c.write(32,b.data[a]);break;case
7:for(var
a=0;a<b.data.length/2;a++){var
e=a0(b.get(a));for(var
d=0;d<8;d++)c.write(8,e[d])}break;case
1:for(var
a=0;a<b.data.length;a++){var
e=a0(bu(b.get(a)));for(var
d=0;d<8;d++)c.write(8,e[d])}break;case
0:for(var
a=0;a<b.data.length;a++){var
e=cf(b.get(a));c.write(32,e)}break;case
10:for(var
a=0;a<b.data.length/2;a++){var
d=b.get(a);c.write(32,cf(d[1]));c.write(32,cf(d[2]))}break;case
11:for(var
a=0;a<b.data.length/2;a++){var
f=b.get(a),e=a0(bu(f[1]));for(var
d=0;d<8;d++)c.write(8,e[d]);var
e=a0(bu(f[2]));for(var
d=0;d<8;d++)c.write(8,e[d])}break}g[0]=(4+b.dims.length)*4;g[1]=(4+b.dims.length)*8}function
d5(a){switch(a){case
7:case
10:case
11:return 2;default:return 1}}function
jJ(c,f){var
b=d,a;switch(c){case
0:a=b.Float32Array;break;case
1:a=b.Float64Array;break;case
2:a=b.Int8Array;break;case
3:a=b.Uint8Array;break;case
4:a=b.Int16Array;break;case
5:a=b.Uint16Array;break;case
6:a=b.Int32Array;break;case
7:a=b.Int32Array;break;case
8:a=b.Int32Array;break;case
9:a=b.Int32Array;break;case
10:a=b.Float32Array;break;case
11:a=b.Float64Array;break;case
12:a=b.Uint8Array;break}if(!a)t("Bigarray.create: unsupported kind");var
e=new
a(f*d5(c));return e}function
cg(c){var
a=new(d.Int32Array)(1);a[0]=c;var
b=new(d.Float32Array)(a.buffer);return b[0]}function
aZ(a){return new
c(a[7]<<0|a[6]<<8|a[5]<<16,a[4]<<0|a[3]<<8|a[2]<<16,a[1]<<0|a[0]<<8)}function
ch(d){var
f=d.lo,g=d.mi,b=d.hi,c=(b&0x7fff)>>4;if(c==2047)return(f|g|b&b8)==0?b&W?-Infinity:Infinity:NaN;var
e=Math.pow(2,-24),a=(f*e+g)*e+(b&b8);if(c>0){a+=16;a*=Math.pow(2,c-dY)}else
a*=Math.pow(2,-dG);if(b&W)a=-a;return a}function
b$(b){var
d=b.length,c=1;for(var
a=0;a<d;a++){if(b[a]<0)t("Bigarray.create: negative dimension");c=c*b[a]}return c}function
j_(b,a){return new
c(b&ag,b>>>24&R|(a&X)<<8,a>>>16&X)}function
ci(a){return a.hi32()}function
cj(a){return a.lo32()}var
jK=br;function
an(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}an.prototype.caml_custom=jK;an.prototype.offset=function(b){var
c=0;if(typeof
b==="number")b=[b];if(!(b
instanceof
Array))t("bigarray.js: invalid offset");if(this.dims.length!=b.length)t("Bigarray.get/set: bad number of dimensions");if(this.layout==0)for(var
a=0;a<this.dims.length;a++){if(b[a]<0||b[a]>=this.dims[a])aW();c=c*this.dims[a]+b[a]}else
for(var
a=this.dims.length-1;a>=0;a--){if(b[a]<1||b[a]>this.dims[a])aW();c=c*this.dims[a]+(b[a]-1)}return c};an.prototype.get=function(a){switch(this.kind){case
7:var
d=this.data[a*2+0],b=this.data[a*2+1];return j_(d,b);case
10:case
11:var
e=this.data[a*2+0],c=this.data[a*2+1];return[bp,e,c];default:return this.data[a]}};an.prototype.set=function(a,b){switch(this.kind){case
7:this.data[a*2+0]=cj(b);this.data[a*2+1]=ci(b);break;case
10:case
11:this.data[a*2+0]=b[1];this.data[a*2+1]=b[2];break;default:this.data[a]=b;break}return 0};an.prototype.fill=function(b){switch(this.kind){case
7:var
c=cj(b),e=ci(b);if(c==e)this.data.fill(c);else
for(var
a=0;a<this.data.length;a++)this.data[a]=a%2==0?c:e;break;case
10:case
11:var
d=b[1],f=b[2];if(d==f)this.data.fill(d);else
for(var
a=0;a<this.data.length;a++)this.data[a]=a%2==0?d:f;break;default:this.data.fill(b);break}};an.prototype.compare=function(b,g){if(this.layout!=b.layout||this.kind!=b.kind){var
e=this.kind|this.layout<<8,f=b.kind|b.layout<<8;return f-e}if(this.dims.length!=b.dims.length)return b.dims.length-this.dims.length;for(var
a=0;a<this.dims.length;a++)if(this.dims[a]!=b.dims[a])return this.dims[a]<b.dims[a]?-1:1;switch(this.kind){case
0:case
1:case
10:case
11:var
c,d;for(var
a=0;a<this.data.length;a++){c=this.data[a];d=b.data[a];if(c<d)return-1;if(c>d)return 1;if(c!=d){if(!g)return NaN;if(c==c)return 1;if(d==d)return-1}}break;case
7:for(var
a=0;a<this.data.length;a+=2){if(this.data[a+1]<b.data[a+1])return-1;if(this.data[a+1]>b.data[a+1])return 1;if(this.data[a]>>>0<b.data[a]>>>0)return-1;if(this.data[a]>>>0>b.data[a]>>>0)return 1}break;case
2:case
3:case
4:case
5:case
6:case
8:case
9:case
12:for(var
a=0;a<this.data.length;a++){if(this.data[a]<b.data[a])return-1;if(this.data[a]>b.data[a])return 1}break}return 0};function
aG(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}aG.prototype=new
an();aG.prototype.offset=function(a){if(typeof
a!=="number")if(a
instanceof
Array&&a.length==1)a=a[0];else
t("Ml_Bigarray_c_1_1.offset");if(a<0||a>=this.dims[0])aW();return a};aG.prototype.get=function(a){return this.data[a]};aG.prototype.set=function(a,b){this.data[a]=b;return 0};aG.prototype.fill=function(a){this.data.fill(a);return 0};function
d3(c,d,a,b){var
e=d5(c);if(b$(a)*e!=b.length)t("length doesn't match dims");if(d==0&&a.length==1&&e==1)return new
aG(c,d,a,b);return new
an(c,d,a,b)}function
aH(a){cn(p.Failure,a)}function
d4(b,v,r){var
i=b.read32s();if(i<0||i>16)aH("input_value: wrong number of bigarray dimensions");var
p=b.read32s(),j=p&R,o=p>>8&1,h=[];if(r==br)for(var
a=0;a<i;a++){var
n=b.read16u();if(n==X){var
t=b.read32u(),u=b.read32u();if(t!=0)aH("input_value: bigarray dimension overflow in 32bit");n=u}h.push(n)}else
for(var
a=0;a<i;a++)h.push(b.read32u());var
d=b$(h),f=jJ(j,d),g=d3(j,o,h,f);switch(j){case
2:for(var
a=0;a<d;a++)f[a]=b.read8s();break;case
3:case
12:for(var
a=0;a<d;a++)f[a]=b.read8u();break;case
4:for(var
a=0;a<d;a++)f[a]=b.read16s();break;case
5:for(var
a=0;a<d;a++)f[a]=b.read16u();break;case
6:for(var
a=0;a<d;a++)f[a]=b.read32s();break;case
8:case
9:var
s=b.read8u();if(s)aH("input_value: cannot read bigarray with 64-bit OCaml ints");for(var
a=0;a<d;a++)f[a]=b.read32s();break;case
7:var
e=new
Array(8);for(var
a=0;a<d;a++){for(var
c=0;c<8;c++)e[c]=b.read8u();var
q=aZ(e);g.set(a,q)}break;case
1:var
e=new
Array(8);for(var
a=0;a<d;a++){for(var
c=0;c<8;c++)e[c]=b.read8u();var
k=ch(aZ(e));g.set(a,k)}break;case
0:for(var
a=0;a<d;a++){var
k=cg(b.read32s());g.set(a,k)}break;case
10:for(var
a=0;a<d;a++){var
m=cg(b.read32s()),l=cg(b.read32s());g.set(a,[bp,m,l])}break;case
11:var
e=new
Array(8);for(var
a=0;a<d;a++){for(var
c=0;c<8;c++)e[c]=b.read8u();var
m=ch(aZ(e));for(var
c=0;c<8;c++)e[c]=b.read8u();var
l=ch(aZ(e));g.set(a,[bp,m,l])}break}v[0]=(4+i)*4;return d3(j,o,h,f)}function
d2(a,b,c){return a.compare(b,c)}function
er(a,b){return Math.imul(a,b)}function
ai(b,a){a=er(a,0xcc9e2d51|0);a=a<<15|a>>>32-15;a=er(a,0x1b873593);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(0xe6546b64|0)|0}function
j6(a,b){a=ai(a,cj(b));a=ai(a,ci(b));return a}function
el(a,b){return j6(a,bu(b))}function
d6(c){var
b=b$(c.dims),d=0;switch(c.kind){case
2:case
3:case
12:if(b>dP)b=dP;var
e=0,a=0;for(a=0;a+4<=c.data.length;a+=4){e=c.data[a+0]|c.data[a+1]<<8|c.data[a+2]<<16|c.data[a+3]<<24;d=ai(d,e)}e=0;switch(b&3){case
3:e=c.data[a+2]<<16;case
2:e|=c.data[a+1]<<8;case
1:e|=c.data[a+0];d=ai(d,e)}break;case
4:case
5:if(b>aV)b=aV;var
e=0,a=0;for(a=0;a+2<=c.data.length;a+=2){e=c.data[a+0]|c.data[a+1]<<16;d=ai(d,e)}if((b&1)!=0)d=ai(d,c.data[a]);break;case
6:if(b>64)b=64;for(var
a=0;a<b;a++)d=ai(d,c.data[a]);break;case
8:case
9:if(b>64)b=64;for(var
a=0;a<b;a++)d=ai(d,c.data[a]);break;case
7:if(b>32)b=32;b*=2;for(var
a=0;a<b;a++)d=ai(d,c.data[a]);break;case
10:b*=2;case
0:if(b>64)b=64;for(var
a=0;a<b;a++)d=el(d,c.data[a]);break;case
11:b*=2;case
1:if(b>32)b=32;for(var
a=0;a<b;a++)d=el(d,c.data[a]);break}return d}function
j8(a,b){b[0]=4;return a.read32s()}function
ks(a,b){switch(a.read8u()){case
1:b[0]=4;return a.read32s();case
2:aH("input_value: native integer value too large");default:aH("input_value: ill-formed native integer")}}function
kh(c,d){var
b=new
Array(8);for(var
a=0;a<8;a++)b[a]=c.read8u();d[0]=8;return aZ(b)}function
kd(e,d,b){var
c=a0(d);for(var
a=0;a<8;a++)e.write(8,c[a]);b[0]=8;b[1]=8}function
j9(a,b,c){return a.compare(b)}function
ka(a){return a.lo32()^a.hi32()}var
ed={"_j":{deserialize:kh,serialize:kd,fixed_length:8,compare:j9,hash:ka},"_i":{deserialize:j8,fixed_length:4},"_n":{deserialize:ks,fixed_length:4},"_bigarray":{deserialize:function(a,b){return d4(a,b,"_bigarray")},serialize:d7,compare:d2,hash:d6},"_bigarr02":{deserialize:function(a,b){return d4(a,b,br)},serialize:d7,compare:d2,hash:d6}};function
cb(a){return ed[a.caml_custom]&&ed[a.caml_custom].compare}function
ea(f,c,d,e){var
b=cb(c);if(b){var
a=d>0?b(c,f,e):b(f,c,e);if(e&&a!=a)return d;if(+a!=+a)return+a;if((a|0)!=0)return a|0}return d}function
bw(a){return a
instanceof
ah}function
ck(a){return bw(a)}function
eb(a){if(typeof
a==="number")return aT;else
if(bw(a))return bq;else
if(ck(a))return 1252;else
if(a
instanceof
Array&&a[0]===a[0]>>>0&&a[0]<=ae){var
b=a[0]|0;return b==bp?0:b}else
if(a
instanceof
String)return dv;else
if(typeof
a=="string")return dv;else
if(a
instanceof
Number)return aT;else
if(a&&a.caml_custom)return b2;else
if(a&&a.compare)return 1256;else
if(typeof
a=="function")return 1247;else
if(typeof
a=="symbol")return 1251;return 1001}function
ki(a,b){if(a<b)return-1;if(a==b)return 0;return 1}function
d9(a,b){a.t&6&&ay(a);b.t&6&&ay(b);return a.c<b.c?-1:a.c>b.c?1:0}function
kP(a,b){return d9(a,b)}function
ca(a,b,d){var
e=[];for(;;){if(!(d&&a===b)){var
f=eb(a);if(f==bm){a=a[1];continue}var
g=eb(b);if(g==bm){b=b[1];continue}if(f!==g){if(f==aT){if(g==b2)return ea(a,b,-1,d);return-1}if(g==aT){if(f==b2)return ea(b,a,1,d);return 1}return f<g?-1:1}switch(f){case
247:t(b6);break;case
248:var
c=ki(a[2],b[2]);if(c!=0)return c|0;break;case
249:t(b6);break;case
250:t("equal: got Forward_tag, should not happen");break;case
251:t("equal: abstract value");break;case
252:if(a!==b){var
c=d9(a,b);if(c!=0)return c|0}break;case
253:t("equal: got Double_tag, should not happen");break;case
254:t("equal: got Double_array_tag, should not happen");break;case
255:t("equal: got Custom_tag, should not happen");break;case
1247:t(b6);break;case
1255:var
i=cb(a);if(i!=cb(b))return a.caml_custom<b.caml_custom?-1:1;if(!i)t("compare: abstract value");var
c=i(a,b,d);if(c!=c)return d?-1:c;if(c!==(c|0))return-1;if(c!=0)return c|0;break;case
1256:var
c=a.compare(b,d);if(c!=c)return d?-1:c;if(c!==(c|0))return-1;if(c!=0)return c|0;break;case
1000:a=+a;b=+b;if(a<b)return-1;if(a>b)return 1;if(a!=b){if(!d)return NaN;if(a==a)return 1;if(b==b)return-1}break;case
1001:if(a<b)return-1;if(a>b)return 1;if(a!=b){if(!d)return NaN;if(a==a)return 1;if(b==b)return-1}break;case
1251:if(a!==b){if(!d)return NaN;return 1}break;case
1252:var
a=aj(a),b=aj(b);if(a!==b){if(a<b)return-1;if(a>b)return 1}break;case
12520:var
a=a.toString(),b=b.toString();if(a!==b){if(a<b)return-1;if(a>b)return 1}break;case
246:case
254:default:if(a.length!=b.length)return a.length<b.length?-1:1;if(a.length>1)e.push(a,b,1);break}}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
d$(a,b){return ca(a,b,true)}function
jQ(){return[0]}function
w(a){if(a<0)t("Bytes.create");return new
ah(a?2:9,e,a)}function
jR(a,c,b,d){if(b>0)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(d==0){a.c=e;a.t=2}else{a.c=aJ(b,String.fromCharCode(d));a.t=b==a.l?0:2}else{if(a.t!=4)bs(a);for(b+=c;c<b;c++)a.c[c]=d}return 0}function
cm(d){d=aj(d);var
e=d.length;if(e>31)t("format_int: format too long");var
a={justify:aD,signstyle:au,filler:ad,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var
c=0;c<e;c++){var
b=d.charAt(c);switch(b){case"-":a.justify=au;break;case"+":case" ":a.signstyle=b;break;case"0":a.filler=G;break;case"#":a.alternate=true;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":a.width=0;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.width=a.width*10+b;c++}c--;break;case".":a.prec=0;c++;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.prec=a.prec*10+b;c++}c--;case"d":case"i":a.signedconv=true;case"u":a.base=10;break;case"x":a.base=16;break;case"X":a.base=16;a.uppercase=true;break;case"o":a.base=8;break;case"e":case"f":case"g":a.signedconv=true;a.conv=b;break;case"E":case"F":case"G":a.signedconv=true;a.uppercase=true;a.conv=b.toLowerCase();break}}return a}function
cc(b,g){if(b.uppercase)g=g.toUpperCase();var
f=g.length;if(b.signedconv&&(b.sign<0||b.signstyle!=au))f++;if(b.alternate){if(b.base==8)f+=1;if(b.base==16)f+=2}var
c=e;if(b.justify==aD&&b.filler==ad)for(var
d=f;d<b.width;d++)c+=ad;if(b.signedconv)if(b.sign<0)c+=au;else
if(b.signstyle!=au)c+=b.signstyle;if(b.alternate&&b.base==8)c+=G;if(b.alternate&&b.base==16)c+=dc;if(b.justify==aD&&b.filler==G)for(var
d=f;d<b.width;d++)c+=G;c+=g;if(b.justify==au)for(var
d=f;d<b.width;d++)c+=ad;return a(c)}function
cd(i,c){function
j(a,b){if(Math.abs(a)<1.0)return a.toFixed(b);else{var
c=parseInt(a.toString().split(aD)[1]);if(c>20){c-=20;a/=Math.pow(10,c);a+=new
Array(c+1).join(G);if(b>0)a=a+av+new
Array(b+1).join(G);return a}else
return a.toFixed(b)}}var
a,e=cm(i),d=e.prec<0?6:e.prec;if(c<0||c==0&&1/c==-Infinity){e.sign=-1;c=-c}if(isNaN(c)){a=b3;e.filler=ad}else
if(!isFinite(c)){a="inf";e.filler=ad}else
switch(e.conv){case"e":var
a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==b_)a=a.slice(0,b-1)+G+a.slice(b-1);break;case"f":a=j(c,d);break;case"g":d=d?d:1;a=c.toExponential(d-1);var
h=a.indexOf(b_),g=+a.slice(h+1);if(g<-4||c>=1e21||c.toFixed(0).length>d){var
b=h-1;while(a.charAt(b)==G)b--;if(a.charAt(b)==av)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==b_)a=a.slice(0,b-1)+G+a.slice(b-1);break}else{var
f=d;if(g<0){f-=g+1;a=c.toFixed(f)}else
while(a=c.toFixed(f),a.length>d+1)f--;if(f){var
b=a.length-1;while(a.charAt(b)==G)b--;if(a.charAt(b)==av)b--;a=a.slice(0,b+1)}}break}return cc(e,a)}function
bt(f,c){if(aj(f)==b7)return a(e+c);var
b=cm(f);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else
c>>>=0;var
d=c.toString(b.base);if(b.prec>=0){b.filler=ad;var
g=b.prec-d.length;if(g>0)d=aJ(g,G)+d}return cc(b,d)}var
ku=0;function
M(){return ku++}function
ar(a){return a.toUtf16()}if(d.process&&d.process.cwd)var
aY=d.process.cwd().replace(/\\/g,af);else
var
aY="/static";if(aY.slice(-1)!==af)aY+=af;function
kl(a){a=ar(a);if(a.charCodeAt(0)!=47)a=aY+a;var
d=a.split(af),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(e);break;default:b.push(d[c]);break}b.orig=a;return b}function
jN(a){return new
ah(4,a,a.length)}function
kJ(f){for(var
g=e,b=g,a,i,c=0,h=f.length;c<h;c++){a=f.charCodeAt(c);if(a<Q){for(var
d=c+1;d<h&&(a=f.charCodeAt(d))<Q;d++);if(d-c>de){b.substr(0,1);g+=b;b=e;g+=f.slice(c,d)}else
b+=f.slice(c,d);if(d==h)break;c=d}if(a<dQ){b+=String.fromCharCode(0xc0|a>>6);b+=String.fromCharCode(Q|a&aE)}else
if(a<0xd800||a>=dp)b+=String.fromCharCode(dq|a>>12,Q|a>>6&aE,Q|a&aE);else
if(a>=0xdbff||c+1==h||(i=f.charCodeAt(c+1))<dk||i>dp)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+i-0x35fdc00;b+=String.fromCharCode(dU|a>>18,Q|a>>12&aE,Q|a>>6&aE,Q|a&aE)}if(b.length>aU){b.substr(0,1);g+=b;b=e}}return g+b}function
jO(a){var
b=9;if(!ex(a))b=8,a=kJ(a);return new
ah(b,a,a.length)}function
ak(a){return jO(a)}function
h(a){cn(p.Sys_error,a)}function
kv(a){a=aj(a);h(a+": No such file or directory")}function
jM(b,a){if(a>>>0>=b.l)d8();return aX(b,a)}function
O(a){return a.l}function
d1(){}function
y(a){this.data=a}y.prototype=new
d1();y.prototype.truncate=function(a){var
b=this.data;this.data=w(a|0);ao(b,0,this.data,0,a)};y.prototype.length=function(){return O(this.data)};y.prototype.write=function(b,d,g,a){var
c=this.length();if(b+a>=c){var
e=w(b+a),f=this.data;this.data=e;ao(f,0,this.data,0,c)}aw(d,g,this.data,b,a);return 0};y.prototype.read=function(c,a,d,b){var
e=this.length();ao(this.data,c,a,d,b);return 0};y.prototype.read_one=function(a){return jM(this.data,a)};y.prototype.close=function(){};y.prototype.constructor=y;function
S(b,a){this.content={};this.root=b;this.lookupFun=a}S.prototype.nm=function(a){return this.root+a};S.prototype.lookup=function(b){if(!this.content[b]&&this.lookupFun){var
c=this.lookupFun(a(this.root),a(b));if(c!==0)this.content[b]=new
y(ap(c[1]))}};S.prototype.exists=function(a){if(a==e)return 1;var
c=a+af,d=new
RegExp(b4+c);for(var
b
in
this.content)if(b.match(d))return 1;this.lookup(a);return this.content[a]?1:0};S.prototype.readdir=function(c){var
g=c==e?e:c+af,h=new
RegExp(b4+g+dX),d={},b=[];for(var
f
in
this.content){var
a=f.match(h);if(a&&!d[a[1]]){d[a[1]]=true;b.push(a[1])}}return b};S.prototype.is_dir=function(a){var
d=a==e?e:a+af,f=new
RegExp(b4+d+dX),g=[];for(var
c
in
this.content){var
b=c.match(f);if(b)return 1}return 0};S.prototype.unlink=function(a){var
b=this.content[a]?true:false;delete
this.content[a];return b};S.prototype.open=function(a,b){if(b.rdonly&&b.wronly)h(this.nm(a)+dy);if(b.text&&b.binary)h(this.nm(a)+dM);this.lookup(a);if(this.content[a]){if(this.is_dir(a))h(this.nm(a)+" : is a directory");if(b.create&&b.excl)h(this.nm(a)+dx);var
c=this.content[a];if(b.truncate)c.truncate();return c}else
if(b.create){this.content[a]=new
y(w(0));return this.content[a]}else
kv(this.nm(a))};S.prototype.register=function(b,a){if(this.content[b])h(this.nm(b)+dx);if(bw(a))this.content[b]=new
y(a);if(ck(a))this.content[b]=new
y(ap(a));else
if(a
instanceof
Array)this.content[b]=new
y(jN(a));else
if(typeof
a==="string")this.content[b]=new
y(d_(a));else
if(a.toString){var
c=ap(ak(a.toString()));this.content[b]=new
y(c)}else
h(this.nm(b)+" : registering file with invalid content type")};S.prototype.constructor=S;function
r(a){return O(a)}function
aK(b,a){return aX(b,a)}function
jI(d){var
c=r(d),b=new
Array(c),a=0;for(;a<c;a++)b[a]=aK(d,a);return b}function
jH(a){if(a.t!=4)bs(a);return a.c}function
Z(a){this.fs=require("fs");this.fd=a}Z.prototype=new
d1();Z.prototype.truncate=function(a){try{this.fs.ftruncateSync(this.fd,a|0)}catch(a){h(a.toString())}};Z.prototype.length=function(){try{return this.fs.fstatSync(this.fd).size}catch(a){h(a.toString())}};Z.prototype.write=function(g,b,c,f){var
a=jI(b);if(!(a
instanceof
d.Uint8Array))a=new(d.Uint8Array)(a);var
e=d.Buffer.from(a);try{this.fs.writeSync(this.fd,e,c,f,g)}catch(a){h(a.toString())}return 0};Z.prototype.read=function(i,e,c,g){var
a=jH(e);if(!(a
instanceof
d.Uint8Array))a=new(d.Uint8Array)(a);var
f=d.Buffer.from(a);try{this.fs.readSync(this.fd,f,c,g,i)}catch(a){h(a.toString())}for(var
b=0;b<g;b++)ax(e,c+b,f[c+b]);return 0};Z.prototype.read_one=function(c){var
b=new(d.Uint8Array)(1),a=d.Buffer.from(b);try{this.fs.readSync(this.fd,a,0,1,c)}catch(a){h(a.toString())}return a[0]};Z.prototype.close=function(){try{this.fs.closeSync(this.fd)}catch(a){h(a.toString())}};Z.prototype.constructor=Z;function
Y(a){this.fs=require("fs");this.root=a}Y.prototype.nm=function(a){return this.root+a};Y.prototype.exists=function(a){try{return this.fs.existsSync(this.nm(a))?1:0}catch(a){h(a.toString())}};Y.prototype.readdir=function(a){try{return this.fs.readdirSync(this.nm(a))}catch(a){h(a.toString())}};Y.prototype.is_dir=function(a){try{return this.fs.statSync(this.nm(a)).isDirectory()?1:0}catch(a){h(a.toString())}};Y.prototype.unlink=function(a){try{var
b=this.fs.existsSync(this.nm(a))?1:0;this.fs.unlinkSync(this.nm(a))}catch(a){h(a.toString())}return b};Y.prototype.open=function(f,c){var
a=require("constants"),b=0;for(var
e
in
c)switch(e){case"rdonly":b|=a.O_RDONLY;break;case"wronly":b|=a.O_WRONLY;break;case"append":b|=a.O_WRONLY|a.O_APPEND;break;case"create":b|=a.O_CREAT;break;case"truncate":b|=a.O_TRUNC;break;case"excl":b|=a.O_EXCL;break;case"binary":b|=a.O_BINARY;break;case"text":b|=a.O_TEXT;break;case"nonblock":b|=a.O_NONBLOCK;break}try{var
d=this.fs.openSync(this.nm(f),b);return new
Z(d)}catch(a){h(a.toString())}};Y.prototype.rename=function(b,a){try{this.fs.renameSync(this.nm(b),this.nm(a))}catch(a){h(a.toString())}};Y.prototype.constructor=Y;var
aI=aY.match(/[^\/]*\//)[0];function
kK(){return typeof
d.process!=="undefined"&&typeof
d.process.versions!=="undefined"&&typeof
d.process.versions.node!=="undefined"&&d.process.platform!=="browser"}var
a4=[];if(kK())a4.push({path:aI,device:new
Y(aI)});else
a4.push({path:aI,device:new
S(aI)});a4.push({path:aI+da,device:new
S(aI+da)});function
ey(b){var
f=kl(b),b=f.join(af),e=b+af,c;for(var
d=0;d<a4.length;d++){var
a=a4[d];if(e.search(a.path)==0&&(!c||c.path.length<a.path.length))c={path:a.path,device:a.device,rest:b.substring(a.path.length,b.length)}}return c}function
ec(c,b){var
c=typeof
c=="string"?a(c):c,b=typeof
b=="string"?a(b):b,d=ey(c);if(!d.device.register)aH("cannot register file");d.device.register(d.rest,b);return 0}function
jS(){var
b=d.caml_fs_tmp;if(b)for(var
a=0;a<b.length;a++)ec(b[a].name,b[a].content);d.caml_create_file=ec;d.caml_fs_tmp=[];return 0}function
jT(){return 0}function
jU(){return[0]}var
es={};function
cl(a){return es[a]}var
N;function
H(){if(N)return N;throw[0,cl(bn),a("Not initialized")]}function
ee(){var
a=H();a.canvas.width=a.width;a.canvas.height=a.height;return 0}function
jV(a){if(a.canvas.ownerDocument)return a.canvas.ownerDocument}function
jW(b){var
a=H(),d=a.context.measureText(b),c=d.width;a.context.fillText(b,a.x,a.height-a.y);a.x+=c|0;return 0}function
jX(a){jW(ar(a));return 0}function
jY(d,e,c,b){var
a=H();a.context.fillRect(d,a.height-e,c,-b);return 0}function
jZ(b,c){var
a=H();a.context.beginPath();a.context.moveTo(a.x,a.height-a.y);a.context.lineTo(b,a.height-c);a.context.stroke();a.x=b;a.y=c;return 0}function
ce(b,c){var
a=H();a.x=b;a.y=c;return 0}function
ef(c,b){var
a=H();a.width=c;a.height=b;a.canvas.width=c;a.canvas.height=b;return 0}function
eg(a){var
c=H();function
b(b){var
a=e+b.toString(16);while(a.length<2)a=G+a;return a}var
h=a>>16&R,g=a>>8&R,f=a>>0&R;c.color=a;var
d="#"+b(h)+b(g)+b(f);c.context.fillStyle=d;c.context.strokeStyle=d;return 0}function
eh(b){var
a=H();a.font=b;a.context.font=a.text_size+dH+ar(a.font);return 0}function
ei(b){var
a=H();a.line_width=b;a.context.lineWidth=b;return 0}function
ej(b){var
a=H();a.text_size=b;a.context.font=a.text_size+dH+ar(a.font);return 0}function
j1(){var
a=H();return a.height}function
j2(b,f,d){var
c=b.getContext("2d");return{context:c,canvas:b,x:0,y:0,width:f,height:d,line_width:1,font:a("fixed"),text_size:26,color:0x000000,title:a(e)}}function
j0(b){var
a=H();a.title=b;var
c=ar(b);if(a.set_title)a.set_title(c);return 0}function
j3(){ce(N.x,N.y);ef(N.width,N.height);ei(N.line_width);ej(N.text_size);eh(N.font);eg(N.color);j0(N.title);N.context.textBaseline="bottom"}function
j4(a){N=a;j3();return 0}function
ek(b){var
a=H(),c=a.context.measureText(ar(b)).width;return[0,c,a.text_size]}function
j5(a,b){return+(ca(a,b,false)>=0)}function
j7(a,c,l){if(!isFinite(a)){if(isNaN(a))return ak(b3);return ak(a>0?dV:"-infinity")}var
j=a==0&&1/a==-Infinity?1:a>=0?0:1;if(j)a=-a;var
d=0;if(a==0);else
if(a<1)while(a<1&&d>-1022){a*=2;d--}else
while(a>=2){a/=2;d++}var
k=d<0?e:aD,f=e;if(j)f=au;else
switch(l){case
43:f=aD;break;case
32:f=ad;break;default:break}if(c>=0&&c<13){var
h=Math.pow(2,c*4);a=Math.round(a*h)/h}var
b=a.toString(16);if(c>=0){var
i=b.indexOf(av);if(i<0)b+=av+aJ(c,G);else{var
g=i+1+c;if(b.length<g)b+=aJ(g-b.length,G);else
b=b.substr(0,g)}}return ak(f+dc+b+"p"+k+d.toString(10))}function
kc(a){return+a.isZero()}function
kf(a){return new
c(a&ag,a>>24&ag,a>>31&X)}function
kg(a){return a.toInt()}function
kb(a){return+a.isNeg()}function
ke(a){return a.neg()}function
j$(h,c){var
a=cm(h);if(a.signedconv&&kb(c)){a.sign=-1;c=ke(c)}var
b=e,i=kf(a.base),g="0123456789abcdef";do{var
f=c.udivmod(i);c=f.quotient;b=g.charAt(kg(f.modulus))+b}while(!kc(c));if(a.prec>=0){a.filler=ad;var
d=a.prec-b.length;if(d>0)b=aJ(d,G)+b}return cc(a,b)}function
kj(){var
b=d.console?d.console:{},c=["log","debug","info","warn","error","assert","dir","dirxml","trace","group","groupCollapsed","groupEnd","time","timeEnd"];function
e(){}for(var
a=0;a<c.length;a++)if(!b[c[a]])b[c[a]]=e;return b}function
kk(d){return function(){var
b=arguments.length;if(b>0){var
c=new
Array(b);for(var
a=0;a<b;a++)c[a]=arguments[a];return _(d,c)}else
return _(d,[undefined])}}function
en(a,d){if(a<0)aW();var
a=a+1|0,b=new
Array(a);b[0]=0;for(var
c=1;c<a;c++)b[c]=d;return b}function
kB(b){return a(bz(b,0,b.length))}var
km=function(){function
l(a,b){return a+b|0}function
a(d,a,c,f,b,e){a=l(l(a,d),l(f,e));return l(a<<b|a>>>32-b,c)}function
g(c,b,d,e,h,f,g){return a(b&d|~b&e,c,b,h,f,g)}function
h(d,b,e,c,h,f,g){return a(b&c|e&~c,d,b,h,f,g)}function
i(c,b,d,e,h,f,g){return a(b^d^e,c,b,h,f,g)}function
j(c,b,d,e,h,f,g){return a(d^(b|~e),c,b,h,f,g)}function
k(f,n){var
e=n;f[e>>2]|=Q<<8*(e&3);for(e=(e&~0x3)+8;(e&0x3F)<60;e+=4)f[(e>>2)-1]=0;f[(e>>2)-1]=n<<3;f[e>>2]=n>>29&0x1FFFFFFF;var
k=[0x67452301,0xEFCDAB89,0x98BADCFE,0x10325476];for(e=0;e<f.length;e+=16){var
a=k[0],b=k[1],c=k[2],d=k[3];a=g(a,b,c,d,f[e+0],7,0xD76AA478);d=g(d,a,b,c,f[e+1],12,0xE8C7B756);c=g(c,d,a,b,f[e+2],17,0x242070DB);b=g(b,c,d,a,f[e+3],22,0xC1BDCEEE);a=g(a,b,c,d,f[e+4],7,0xF57C0FAF);d=g(d,a,b,c,f[e+5],12,0x4787C62A);c=g(c,d,a,b,f[e+6],17,0xA8304613);b=g(b,c,d,a,f[e+7],22,0xFD469501);a=g(a,b,c,d,f[e+8],7,0x698098D8);d=g(d,a,b,c,f[e+9],12,0x8B44F7AF);c=g(c,d,a,b,f[e+10],17,0xFFFF5BB1);b=g(b,c,d,a,f[e+11],22,0x895CD7BE);a=g(a,b,c,d,f[e+12],7,0x6B901122);d=g(d,a,b,c,f[e+13],12,0xFD987193);c=g(c,d,a,b,f[e+14],17,0xA679438E);b=g(b,c,d,a,f[e+15],22,0x49B40821);a=h(a,b,c,d,f[e+1],5,0xF61E2562);d=h(d,a,b,c,f[e+6],9,0xC040B340);c=h(c,d,a,b,f[e+11],14,0x265E5A51);b=h(b,c,d,a,f[e+0],20,0xE9B6C7AA);a=h(a,b,c,d,f[e+5],5,0xD62F105D);d=h(d,a,b,c,f[e+10],9,0x02441453);c=h(c,d,a,b,f[e+15],14,0xD8A1E681);b=h(b,c,d,a,f[e+4],20,0xE7D3FBC8);a=h(a,b,c,d,f[e+9],5,0x21E1CDE6);d=h(d,a,b,c,f[e+14],9,0xC33707D6);c=h(c,d,a,b,f[e+3],14,0xF4D50D87);b=h(b,c,d,a,f[e+8],20,0x455A14ED);a=h(a,b,c,d,f[e+13],5,0xA9E3E905);d=h(d,a,b,c,f[e+2],9,0xFCEFA3F8);c=h(c,d,a,b,f[e+7],14,0x676F02D9);b=h(b,c,d,a,f[e+12],20,0x8D2A4C8A);a=i(a,b,c,d,f[e+5],4,0xFFFA3942);d=i(d,a,b,c,f[e+8],11,0x8771F681);c=i(c,d,a,b,f[e+11],16,0x6D9D6122);b=i(b,c,d,a,f[e+14],23,0xFDE5380C);a=i(a,b,c,d,f[e+1],4,0xA4BEEA44);d=i(d,a,b,c,f[e+4],11,0x4BDECFA9);c=i(c,d,a,b,f[e+7],16,0xF6BB4B60);b=i(b,c,d,a,f[e+10],23,0xBEBFBC70);a=i(a,b,c,d,f[e+13],4,0x289B7EC6);d=i(d,a,b,c,f[e+0],11,0xEAA127FA);c=i(c,d,a,b,f[e+3],16,0xD4EF3085);b=i(b,c,d,a,f[e+6],23,0x04881D05);a=i(a,b,c,d,f[e+9],4,0xD9D4D039);d=i(d,a,b,c,f[e+12],11,0xE6DB99E5);c=i(c,d,a,b,f[e+15],16,0x1FA27CF8);b=i(b,c,d,a,f[e+2],23,0xC4AC5665);a=j(a,b,c,d,f[e+0],6,0xF4292244);d=j(d,a,b,c,f[e+7],10,0x432AFF97);c=j(c,d,a,b,f[e+14],15,0xAB9423A7);b=j(b,c,d,a,f[e+5],21,0xFC93A039);a=j(a,b,c,d,f[e+12],6,0x655B59C3);d=j(d,a,b,c,f[e+3],10,0x8F0CCC92);c=j(c,d,a,b,f[e+10],15,0xFFEFF47D);b=j(b,c,d,a,f[e+1],21,0x85845DD1);a=j(a,b,c,d,f[e+8],6,0x6FA87E4F);d=j(d,a,b,c,f[e+15],10,0xFE2CE6E0);c=j(c,d,a,b,f[e+6],15,0xA3014314);b=j(b,c,d,a,f[e+13],21,0x4E0811A1);a=j(a,b,c,d,f[e+4],6,0xF7537E82);d=j(d,a,b,c,f[e+11],10,0xBD3AF235);c=j(c,d,a,b,f[e+2],15,0x2AD7D2BB);b=j(b,c,d,a,f[e+9],21,0xEB86D391);k[0]=l(a,k[0]);k[1]=l(b,k[1]);k[2]=l(c,k[2]);k[3]=l(d,k[3])}var
o=new
Array(16);for(var
e=0;e<4;e++)for(var
m=0;m<4;m++)o[e*4+m]=k[e]>>8*m&0xFF;return o}return function(h,g,f){var
e=[];switch(h.t&6){default:ay(h);case
0:var
d=h.c;for(var
a=0;a<f;a+=4){var
b=a+g;e[a>>2]=d.charCodeAt(b)|d.charCodeAt(b+1)<<8|d.charCodeAt(b+2)<<16|d.charCodeAt(b+3)<<24}for(;a<f;a++)e[a>>2]|=d.charCodeAt(a+g)<<8*(a&3);break;case
4:var
c=h.c;for(var
a=0;a<f;a+=4){var
b=a+g;e[a>>2]=c[b]|c[b+1]<<8|c[b+2]<<16|c[b+3]<<24}for(;a<f;a++)e[a>>2]|=c[a+g]<<8*(a&3)}return kB(k(e,f))}}();function
kn(c,b,a){return km(ap(c),b,a)}var
$=new
Array();function
bx(c){var
a=$[c];if(!a.opened)h("Cannot flush a closed channel");if(!a.buffer||a.buffer==e)return 0;if(a.fd&&p.fds[a.fd]&&p.fds[a.fd].output){var
b=p.fds[a.fd].output;switch(b.length){case
2:b(c,a.buffer);break;default:b(a.buffer)}}a.buffer=e;return 0}function
ev(e,f){var
b=$[e],d=a(f),c=r(d);b.file.write(b.offset,d,0,c);b.offset+=c;return 0}function
kL(a){var
a=cp(a),b=d;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stderr.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var
c=b.console;c&&c.error&&c.error(a)}}function
kM(a){var
a=cp(a),b=d;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stdout.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var
c=b.console;c&&c.log&&c.log(a)}}function
bA(c,e,d,a){if(p.fds===undefined)p.fds=new
Array();a=a?a:{};var
b={};b.file=d;b.offset=a.append?d.length():0;b.flags=a;b.output=e;p.fds[c]=b;if(!p.fd_last_idx||c>p.fd_last_idx)p.fd_last_idx=c;return c}function
kQ(c,b,g){var
a={};while(b){switch(b[1]){case
0:a.rdonly=1;break;case
1:a.wronly=1;break;case
2:a.append=1;break;case
3:a.create=1;break;case
4:a.truncate=1;break;case
5:a.excl=1;break;case
6:a.binary=1;break;case
7:a.text=1;break;case
8:a.nonblock=1;break}b=b[2]}if(a.rdonly&&a.wronly)h(aj(c)+dy);if(a.text&&a.binary)h(aj(c)+dM);var
d=ey(c),e=d.device.open(d.rest,a),f=p.fd_last_idx?p.fd_last_idx:0;return bA(f+1,ev,e,a)}bA(0,ev,new
y(w(0)));bA(1,kM,new
y(w(0)));bA(2,kL,new
y(w(0)));function
ko(c){var
b=p.fds[c];if(b.flags.wronly)h(dZ+c+" is writeonly");var
a={file:b.file,offset:b.offset,fd:c,opened:true,out:false,refill:null};$[a.fd]=a;return a.fd}function
eo(c){var
b=p.fds[c];if(b.flags.rdonly)h(dZ+c+" is readonly");var
a={file:b.file,offset:b.offset,fd:c,opened:true,out:true,buffer:e};$[a.fd]=a;return a.fd}function
kp(){var
b=0;for(var
a=0;a<$.length;a++)if($[a]&&$[a].opened&&$[a].out)b=[0,$[a].fd,b];return b}function
I(a){return a}function
kq(g,d,i,f){var
b=$[g];if(!b.opened)h("Cannot output to a closed channel");var
a;if(i==0&&O(d)==f)a=d;else{a=w(f);ao(d,i,a,0,f)}var
j=I(a),c=aj(j),e=c.lastIndexOf("\n");if(e<0)b.buffer+=c;else{b.buffer+=c.substr(0,e+1);bx(g);b.buffer+=c.substr(e+1)}return 0}function
ep(b,a,d,c){return kq(b,ap(a),d,c)}function
eq(c,b){var
d=a(String.fromCharCode(b));ep(c,d,0,1);return 0}function
kr(b,a){if(a==0)co();return b%a}function
a1(a,b){return+(ca(a,b,false)!=0)}function
kt(a,b){a[0]=bm;a[1]=b;return 0}function
a2(a){if(a
instanceof
Array&&a[0]==a[0]>>>0)return a[0];else
if(bw(a))return bq;else
if(ck(a))return bq;else
if(a
instanceof
Function||typeof
a=="function")return 247;else
if(a&&a.caml_custom)return ae;else
return aT}function
T(b,c,a){if(a&&d.toplevelReloc)b=d.toplevelReloc(a);p[b+1]=c;if(a)p[a]=c}function
ky(a,b){es[aj(a)]=b;return 0}function
kz(){t(b9)}function
B(b,a){if(a>>>0>=r(b))kz();return aK(b,a)}function
jL(a,b){if(a===b)return 1;a.t&6&&ay(a);b.t&6&&ay(b);return a.c==b.c?1:0}function
kA(a,b){return jL(a,b)}function
by(a,b){return 1-kA(a,b)}function
kC(){return[0,a("js_of_ocaml")]}function
kD(){return 0x7FFFFFFF/4|0}function
kE(a){return 0}function
kF(b){var
a=d;if(a.quit)a.quit(b);if(a.process&&a.process.exit)a.process.exit(b);t("Function 'exit' not implemented")}function
kG(){return[0,a(dh),32,0]}function
kw(){et(p.Not_found)}function
ew(c){var
a=d,b=ar(c);if(a.process&&a.process.env&&a.process.env[b]!=undefined)return ak(a.process.env[b]);if(d.jsoo_static_env&&d.jsoo_static_env[b])return ak(d.jsoo_static_env[b]);kw()}function
kH(){var
a=new
Date().getTime(),b=a^0xffffffff*Math.random();return[0,b]}function
a3(a){var
b=1;while(a&&a.joo_tramp){a=a.joo_tramp.apply(null,a.joo_args);b++}return a}function
k(b,a){return{joo_tramp:b,joo_args:a}}function
kI(c,a){if(typeof
a==="function"){c.fun=a;return 0}if(a.fun){c.fun=a.fun;return 0}var
b=a.length;while(b--)c[b]=a[b];return 0}function
eu(a){return a}function
al(a){if(a
instanceof
Array)return a;if(d.RangeError&&a
instanceof
d.RangeError&&a.message&&a.message.match(/maximum call stack/i))return eu(p.Stack_overflow);if(d.InternalError&&a
instanceof
d.InternalError&&a.message&&a.message.match(/too much recursion/i))return eu(p.Stack_overflow);if(a
instanceof
d.Error&&cl(b1))return[0,cl(b1),a];return[0,p.Failure,ak(String(a))]}function
bB(){return 0}function
b(a,b){return a.length==1?a(b):_(a,[b])}function
f(a,b,c){return a.length==2?a(b,c):_(a,[b,c])}function
aC(a,b,c,d){return a.length==3?a(b,c,d):_(a,[b,c,d])}function
bY(a,b,c,d,e,f){return a.length==5?a(b,c,d,e,f):_(a,[b,c,d,e,f])}function
jG(a,b,c,d,e,f,g,h){return a.length==7?a(b,c,d,e,f,g,h):_(a,[b,c,d,e,f,g,h])}jS();var
cr=[q,a(dW),-1],ct=[q,a(di),-2],a5=[q,a(dl),-3],aL=[q,a(dF),-4],U=[q,a(dI),-7],cq=[q,a(dt),-8],cs=[q,a(dK),-9],m=[q,a(dR),-11],cu=[q,a(c$),-12],cJ=[0,dg],jF=[4,0,0,0,[12,45,[4,0,0,0,0]]],bL=[0,[11,a('File "'),[2,0,[11,a('", line '),[4,0,0,0,[11,a(dw),[4,0,0,0,[12,45,[4,0,0,0,[11,a(": "),[2,0,0]]]]]]]]]],a('File "%s", line %d, characters %d-%d: %s')],c1=a("wakeup"),c0=[0,0],be=[0,0,0,0],c5=[0,ae,ae,0],bl=[0,3,[0,0,[0,1,[0,2,0]]]];T(11,cu,c$);T(10,m,dR);T(9,[q,a(dC),-10],dC);T(8,cs,dK);T(7,cq,dt);T(6,U,dI);T(5,[q,a(dO),-6],dO);T(4,[q,a(dm),-5],dm);T(3,aL,dF);T(2,a5,dl);T(1,ct,di);T(0,cr,dW);var
eE=a("%.12g"),eD=a(av),eB=a("true"),eC=a("false"),ez=a("char_of_int"),eH=a("\\\\"),eI=a("\\'"),eJ=a("\\b"),eK=a("\\t"),eL=a("\\n"),eM=a("\\r"),eP=a("String.blit / Bytes.blit_string"),eO=a("Bytes.blit"),eN=a("String.sub / Bytes.sub"),eS=a("String.contains_from / Bytes.contains_from"),eY=a("Map.remove_min_elt"),eZ=[0,0,0,0],e0=[0,a("map.ml"),400,10],e1=[0,0,0],eU=a(bo),eV=a(bo),eW=a(bo),eX=a(bo),e3=a("Stdlib.Queue.Empty"),e6=a("CamlinternalLazy.Undefined"),fa=a("Buffer.add: cannot grow buffer"),e$=[0,a(dN),93,2],e_=[0,a(dN),94,2],fj=a("%c"),fk=a("%s"),fl=a(c_),fm=a(ds),fn=a(dD),fo=a(db),fp=a("%f"),fq=a("%B"),fr=a("%{"),fs=a("%}"),ft=a("%("),fu=a("%)"),fv=a("%a"),fw=a("%t"),fx=a("%?"),fy=a("%r"),fz=a("%_r"),fA=[0,a(v),850,23],fL=[0,a(v),814,21],fD=[0,a(v),815,21],fM=[0,a(v),818,21],fE=[0,a(v),819,21],fN=[0,a(v),822,19],fF=[0,a(v),823,19],fO=[0,a(v),826,22],fG=[0,a(v),827,22],fP=[0,a(v),831,30],fH=[0,a(v),832,30],fJ=[0,a(v),836,26],fB=[0,a(v),837,26],fK=[0,a(v),846,28],fC=[0,a(v),847,28],fI=[0,a(v),851,23],gR=a(dA),gP=[0,a(v),1558,4],gQ=a("Printf: bad conversion %["),gS=[0,a(v),1626,39],gT=[0,a(v),1649,31],gU=[0,a(v),1650,31],gV=a("Printf: bad conversion %_"),gW=a(dz),gX=a(dE),gY=a(dz),gZ=a(dE),gN=a(b3),gL=a("neg_infinity"),gM=a(dV),gK=a(av),gu=a("%+nd"),gv=a("% nd"),gx=a("%+ni"),gy=a("% ni"),gz=a("%nx"),gA=a("%#nx"),gB=a("%nX"),gC=a("%#nX"),gD=a("%no"),gE=a("%#no"),gt=a("%nd"),gw=a(dD),gF=a("%nu"),gh=a("%+ld"),gi=a("% ld"),gk=a("%+li"),gl=a("% li"),gm=a("%lx"),gn=a("%#lx"),go=a("%lX"),gp=a("%#lX"),gq=a("%lo"),gr=a("%#lo"),gg=a("%ld"),gj=a(ds),gs=a("%lu"),f6=a("%+Ld"),f7=a("% Ld"),f9=a("%+Li"),f_=a("% Li"),f$=a("%Lx"),ga=a("%#Lx"),gb=a("%LX"),gc=a("%#LX"),gd=a("%Lo"),ge=a("%#Lo"),f5=a("%Ld"),f8=a(db),gf=a("%Lu"),fT=a("%+d"),fU=a("% d"),fW=a("%+i"),fX=a("% i"),fY=a("%x"),fZ=a("%#x"),f0=a("%X"),f1=a("%#X"),f2=a("%o"),f3=a("%#o"),fS=a(b7),fV=a(c_),f4=a(dA),fb=a("@]"),fc=a("@}"),fd=a("@?"),fe=a("@\n"),ff=a("@."),fg=a("@@"),fh=a("@%"),fi=a("@"),fQ=a("CamlinternalFormat.Type_mismatch"),g3=a(e),g4=[0,[11,a(b0),[2,0,[2,0,0]]],a(", %s%s")],hk=[0,[2,0,[12,10,0]],a("%s\n")],hl=[0,[11,a(du),0],a(du)],hc=a("Raised at"),hd=a("Re-raised at"),he=a("Raised by primitive operation at"),hf=a("Called from"),hg=a(" (inlined)"),hi=a(e),hh=[0,[2,0,[12,32,[2,0,[11,a(' in file "'),[2,0,[12,34,[2,0,[11,a(", line "),[4,0,0,0,[11,a(dw),jF]]]]]]]]]],a('%s %s in file "%s"%s, line %d, characters %d-%d')],hj=[0,[2,0,[11,a(" unknown location"),0]],a("%s unknown location")],g9=a("Out of memory"),g_=a("Stack overflow"),g$=a("Pattern matching failed"),ha=a("Assertion failed"),hb=a("Undefined recursive module"),g5=[0,[12,40,[2,0,[2,0,[12,41,0]]]],a("(%s%s)")],g6=a(e),g7=a(e),g8=[0,[12,40,[2,0,[12,41,0]]],a("(%s)")],g2=[0,[4,0,0,0,0],a(b7)],g0=[0,[3,0,0],a("%S")],g1=a("_"),ho=a("Fun.Finally_raised: "),hm=a("Stdlib.Fun.Finally_raised"),hp=a("x"),jD=a("OCAMLRUNPARAM"),jB=a("CAMLRUNPARAM"),hq=a(e),hu=a("Js_of_ocaml__Js.Error"),hv=a(b1),hw=a("Js_of_ocaml__Dom_html.Canvas_not_available"),hI=a("fill_rect"),hH=a("set_line_width"),hz=a(bn),hA=a(e),hB=a(bn),hC=a("Cygwin"),hD=a("MacOS"),hE=a(dh),hF=a("Win32"),hG=a("Graphics: unknown OS type: "),hN=[0,[11,a(dS),[2,0,0]],a(dr)],hO=[0,[11,a(dS),[2,0,0]],a(dr)],hK=a("Fatal error: exception "),hM=a("Lwt.Resolution_loop.Canceled"),hS=a("Exception during Lwt.async: "),hT=a(e),hU=a(bn),hZ=a("E2BIG"),h1=a("EACCES"),h2=a("EAGAIN"),h3=a("EBADF"),h4=a("EBUSY"),h5=a("ECHILD"),h6=a("EDEADLK"),h7=a("EDOM"),h8=a("EEXIST"),h9=a("EFAULT"),h_=a("EFBIG"),h$=a("EINTR"),ia=a("EINVAL"),ib=a("EIO"),ic=a("EISDIR"),id=a("EMFILE"),ie=a("EMLINK"),ig=a("ENAMETOOLONG"),ih=a("ENFILE"),ii=a("ENODEV"),ij=a("ENOENT"),ik=a("ENOEXEC"),il=a("ENOLCK"),im=a("ENOMEM"),io=a("ENOSPC"),ip=a("ENOSYS"),iq=a("ENOTDIR"),ir=a("ENOTEMPTY"),is=a("ENOTTY"),it=a("ENXIO"),iu=a("EPERM"),iv=a("EPIPE"),iw=a("ERANGE"),ix=a("EROFS"),iy=a("ESPIPE"),iz=a("ESRCH"),iA=a("EXDEV"),iB=a("EWOULDBLOCK"),iC=a("EINPROGRESS"),iD=a("EALREADY"),iE=a("ENOTSOCK"),iF=a("EDESTADDRREQ"),iG=a("EMSGSIZE"),iH=a("EPROTOTYPE"),iI=a("ENOPROTOOPT"),iJ=a("EPROTONOSUPPORT"),iK=a("ESOCKTNOSUPPORT"),iL=a("EOPNOTSUPP"),iM=a("EPFNOSUPPORT"),iN=a("EAFNOSUPPORT"),iO=a("EADDRINUSE"),iP=a("EADDRNOTAVAIL"),iQ=a("ENETDOWN"),iR=a("ENETUNREACH"),iS=a("ENETRESET"),iT=a("ECONNABORTED"),iU=a("ECONNRESET"),iV=a("ENOBUFS"),iW=a("EISCONN"),iX=a("ENOTCONN"),iY=a("ESHUTDOWN"),iZ=a("ETOOMANYREFS"),i0=a("ETIMEDOUT"),i1=a("ECONNREFUSED"),i2=a("EHOSTDOWN"),i3=a("EHOSTUNREACH"),i4=a("ELOOP"),i5=a("EOVERFLOW"),i6=[0,[11,a("EUNKNOWNERR "),[4,0,0,0,0]],a("EUNKNOWNERR %d")],h0=[0,[11,a("Unix.Unix_error(Unix."),[2,0,[11,a(b0),[3,0,[11,a(b0),[3,0,[12,41,0]]]]]]],a("Unix.Unix_error(Unix.%s, %S, %S)")],hV=a(dL),hW=a(e),hX=a(e),hY=a(dL),i7=a("0.0.0.0"),i8=a("127.0.0.1"),jA=a("::"),jz=a("::1"),i$=a("Source Sans Pro, Roboto, sans-serif"),i9=[0,1],i_=[0,ae,ae,ae],jf=[0,25,0],jg=[0,0,0],jc=[0,0,0],jd=[0,0,0],je=[0,2,2],jb=[0,2,2],ji=[0,0],jj=[0,1],jk=[0,3],jl=[0,2],jh=[0,0,0,0,0,32],jt=[0,99,99],ju=[0,0,0],js=a("LISTENER LIGHT"),jv=[0,aF,aF],jp=[0,99,99],jq=[0,0,0],jo=a("STATE LIGHT"),jr=[0,aF,aF],jx=[0,10,10];function
n(a){if(typeof
a==="number")return 0;else
switch(a[0]){case
0:return[0,n(a[1])];case
1:return[1,n(a[1])];case
2:return[2,n(a[1])];case
3:return[3,n(a[1])];case
4:return[4,n(a[1])];case
5:return[5,n(a[1])];case
6:return[6,n(a[1])];case
7:return[7,n(a[1])];case
8:var
c=a[1];return[8,c,n(a[2])];case
9:var
b=a[1];return[9,b,b,n(a[3])];case
10:return[10,n(a[1])];case
11:return[11,n(a[1])];case
12:return[12,n(a[1])];case
13:return[13,n(a[1])];default:return[14,n(a[1])]}}function
C(a,b){if(typeof
a==="number")return b;else
switch(a[0]){case
0:return[0,C(a[1],b)];case
1:return[1,C(a[1],b)];case
2:return[2,C(a[1],b)];case
3:return[3,C(a[1],b)];case
4:return[4,C(a[1],b)];case
5:return[5,C(a[1],b)];case
6:return[6,C(a[1],b)];case
7:return[7,C(a[1],b)];case
8:var
c=a[1];return[8,c,C(a[2],b)];case
9:var
d=a[2],e=a[1];return[9,e,d,C(a[3],b)];case
10:return[10,C(a[1],b)];case
11:return[11,C(a[1],b)];case
12:return[12,C(a[1],b)];case
13:return[13,C(a[1],b)];default:return[14,C(a[1],b)]}}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:var
c=a[1];return[2,c,l(a[2],b)];case
3:var
d=a[1];return[3,d,l(a[2],b)];case
4:var
e=a[3],f=a[2],g=a[1];return[4,g,f,e,l(a[4],b)];case
5:var
h=a[3],i=a[2],j=a[1];return[5,j,i,h,l(a[4],b)];case
6:var
k=a[3],m=a[2],n=a[1];return[6,n,m,k,l(a[4],b)];case
7:var
o=a[3],p=a[2],q=a[1];return[7,q,p,o,l(a[4],b)];case
8:var
r=a[3],s=a[2],t=a[1];return[8,t,s,r,l(a[4],b)];case
9:var
u=a[1];return[9,u,l(a[2],b)];case
10:return[10,l(a[1],b)];case
11:var
v=a[1];return[11,v,l(a[2],b)];case
12:var
w=a[1];return[12,w,l(a[2],b)];case
13:var
x=a[2],y=a[1];return[13,y,x,l(a[3],b)];case
14:var
z=a[2],A=a[1];return[14,A,z,l(a[3],b)];case
15:return[15,l(a[1],b)];case
16:return[16,l(a[1],b)];case
17:var
B=a[1];return[17,B,l(a[2],b)];case
18:var
C=a[1];return[18,C,l(a[2],b)];case
19:return[19,l(a[1],b)];case
20:var
D=a[2],E=a[1];return[20,E,D,l(a[3],b)];case
21:var
F=a[1];return[21,F,l(a[2],b)];case
22:return[22,l(a[1],b)];case
23:var
G=a[1];return[23,G,l(a[2],b)];default:var
H=a[2],I=a[1];return[24,I,H,l(a[3],b)]}}function
bC(a,c,b){return a[1]===c?(a[1]=b,1):0}function
D(a){throw[0,aL,a]}M(0);function
bD(b,a){return j5(b,a)?b:a}function
bE(a){return 0<=a?a:-a|0}function
as(d,c){var
a=r(d),e=r(c),b=w(a+e|0);aw(d,0,b,0,a);aw(c,0,b,a,e);return I(b)}function
cv(a){if(0<=a&&!(ae<a))return a;return D(ez)}function
eA(a){return a?eB:eC}function
cw(a,b){if(a){var
c=a[1];return[0,c,cw(a[2],b)]}return b}ko(0);eo(1);var
aM=eo(2);function
eF(b){function
a(b){var
a=b;for(;;){if(a){var
c=a[2],d=a[1];try{bx(d)}catch(a){a=al(a);if(a[1]!==ct)throw a;var
e=a}var
a=c;continue}return 0}}return a(kp(0))}function
aN(b,a){return ep(b,a,0,r(a))}function
cx(a){return aN(aM,a)}var
bF=[0,eF];function
eG(d){for(;;){var
a=bF[1],e=[0,1],c=1-bC(bF,a,function(a,c){return function(e){if(bC(a,1,0))b(d,0);return b(c,0)}}(e,a));if(c)continue;return c}}function
cy(a){return b(bF[1],0)}if(kE(0))eG(function(a){return jT(a)});var
aO=kG(0)[1],cz=kD(0),aP=(4*cz|0)-1|0;M(0);typeof
kC(0)==="number";function
cA(c,a,b){if(a){var
d=a[1];return f(c,d,cA(c,a[2],b))}return b}function
a6(d,c){var
a=c;for(;;){if(a){var
e=a[2],b=0===d$(a[1],d)?1:0;if(b)return b;var
a=e;continue}return 0}}function
at(a,c){var
b=w(a);jR(b,0,a,c);return b}function
cB(d,b,a){var
f=0;if(0<=b&&0<=a&&!((O(d)-a|0)<b)){var
c=w(a);ao(d,b,c,0,a);var
e=c;f=1}if(!f)var
e=D(eN);return I(e)}function
cC(e,c,d,b,a){if(0<=a&&0<=c&&!((O(e)-a|0)<c)&&0<=b&&!((O(d)-a|0)<b))return ao(e,c,d,b,a);return D(eO)}function
aa(e,c,d,b,a){if(0<=a&&0<=c&&!((r(e)-a|0)<c)&&0<=b&&!((O(d)-a|0)<b))return aw(e,c,d,b,a);return D(eP)}function
eQ(e,d,c,b){var
a=c;for(;;){if(d<=a)throw U;if(aK(e,a)===b)return a;var
a=a+1|0;continue}}function
eR(b,a,d){var
c=r(b);if(0<=a&&!(c<a))try{eQ(b,c,a,d);var
e=1;return e}catch(a){a=al(a);if(a===U)return 0;throw a}return D(eS)}function
eT(b,a){return eR(b,0,a)}M(0);function
e2(g){function
h(a){return a?a[5]:0}function
d(b,f,e,a){var
c=h(b),d=h(a),g=d<=c?c+1|0:d+1|0;return[0,b,f,e,a,g]}function
q(b,a){return[0,0,b,a,0,1]}function
a(b,g,f,a){var
i=b?b[5]:0,j=a?a[5]:0;if((j+2|0)<i){if(b){var
c=b[4],m=b[3],n=b[2],k=b[1],q=h(c);if(q<=h(k))return d(k,n,m,d(c,g,f,a));if(c){var
r=c[3],s=c[2],t=c[1],u=d(c[4],g,f,a);return d(d(k,n,m,t),s,r,u)}return D(eU)}return D(eV)}if((i+2|0)<j){if(a){var
l=a[4],o=a[3],p=a[2],e=a[1],v=h(e);if(v<=h(l))return d(d(b,g,f,e),p,o,l);if(e){var
w=e[3],x=e[2],y=e[1],z=d(e[4],p,o,l);return d(d(b,g,f,y),x,w,z)}return D(eW)}return D(eX)}var
A=j<=i?i+1|0:j+1|0;return[0,b,g,f,a,A]}var
B=0;function
P(a){return a?0:1}function
n(d,c,b){if(b){var
e=b[4],i=b[3],j=b[2],h=b[1],o=b[5],k=f(g[1],d,j);if(0===k)return i===c?b:[0,h,d,c,e,o];if(0<=k){var
l=n(d,c,e);return e===l?b:a(h,j,i,l)}var
m=n(d,c,h);return h===m?b:a(m,j,i,e)}return[0,0,d,c,0,1]}function
Q(d,c){var
a=c;for(;;){if(a){var
e=a[4],h=a[3],i=a[1],b=f(g[1],d,a[2]);if(0===b)return h;var
j=0<=b?e:i,a=j;continue}throw U}}function
R(g,l){var
c=l;for(;;){if(c){var
h=c[2],m=c[4],n=c[3],o=c[1];if(b(g,h)){var
e=h,d=n,a=o;for(;;){if(a){var
f=a[2],i=a[4],j=a[3],k=a[1];if(b(g,f)){var
e=f,d=j,a=k;continue}var
a=i;continue}return[0,e,d]}}var
c=m;continue}throw U}}function
S(g,l){var
c=l;for(;;){if(c){var
h=c[2],m=c[4],n=c[3],o=c[1];if(b(g,h)){var
e=h,d=n,a=o;for(;;){if(a){var
f=a[2],i=a[4],j=a[3],k=a[1];if(b(g,f)){var
e=f,d=j,a=k;continue}var
a=i;continue}return[0,[0,e,d]]}}var
c=m;continue}return 0}}function
T(g,l){var
c=l;for(;;){if(c){var
h=c[2],m=c[4],n=c[3],o=c[1];if(b(g,h)){var
e=h,d=n,a=m;for(;;){if(a){var
f=a[2],i=a[4],j=a[3],k=a[1];if(b(g,f)){var
e=f,d=j,a=i;continue}var
a=k;continue}return[0,e,d]}}var
c=o;continue}throw U}}function
V(g,l){var
c=l;for(;;){if(c){var
h=c[2],m=c[4],n=c[3],o=c[1];if(b(g,h)){var
e=h,d=n,a=m;for(;;){if(a){var
f=a[2],i=a[4],j=a[3],k=a[1];if(b(g,f)){var
e=f,d=j,a=i;continue}var
a=k;continue}return[0,[0,e,d]]}}var
c=o;continue}return 0}}function
W(d,c){var
a=c;for(;;){if(a){var
e=a[4],h=a[3],i=a[1],b=f(g[1],d,a[2]);if(0===b)return[0,h];var
j=0<=b?e:i,a=j;continue}return 0}}function
X(e,d){var
a=d;for(;;){if(a){var
h=a[4],i=a[1],b=f(g[1],e,a[2]),c=0===b?1:0;if(c)return c;var
j=0<=b?h:i,a=j;continue}return 0}}function
o(c){var
a=c;for(;;){if(a){var
b=a[1];if(b){var
a=b;continue}return[0,a[2],a[3]]}throw U}}function
C(c){var
a=c;for(;;){if(a){var
b=a[1];if(b){var
a=b;continue}return[0,[0,a[2],a[3]]]}return 0}}function
Y(b){var
a=b;for(;;){if(a){if(a[4]){var
a=a[4];continue}return[0,a[2],a[3]]}throw U}}function
Z(b){var
a=b;for(;;){if(a){if(a[4]){var
a=a[4];continue}return[0,[0,a[2],a[3]]]}return 0}}function
r(b){if(b){var
c=b[1];if(c){var
d=b[4],e=b[3],f=b[2];return a(r(c),f,e,d)}return b[4]}return D(eY)}function
E(c,b){if(c){if(b){var
d=o(b),e=d[2],f=d[1];return a(c,f,e,r(b))}return c}return b}function
s(e,b){if(b){var
c=b[4],i=b[3],h=b[2],d=b[1],j=f(g[1],e,h);if(0===j)return E(d,c);if(0<=j){var
k=s(e,c);return c===k?b:a(d,h,i,k)}var
l=s(e,d);return d===l?b:a(l,h,i,c)}return 0}function
t(d,i,c){if(c){var
e=c[4],j=c[3],k=c[2],h=c[1],r=c[5],l=f(g[1],d,k);if(0===l){var
m=b(i,[0,j]);if(m){var
n=m[1];return j===n?c:[0,h,d,n,e,r]}return E(h,e)}if(0<=l){var
o=t(d,i,e);return e===o?c:a(h,k,j,o)}var
p=t(d,i,h);return h===p?c:a(p,k,j,e)}var
q=b(i,0);return q?[0,0,d,q[1],0,1]:0}function