-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.bc.js
2795 lines (2795 loc) · 119 KB
/
web.bc.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.11.0
(function(g){"use strict";var
dP="%Li",eq=" : flags Open_text and Open_binary are not compatible",a5="End",ez=1e14,ei="Invalid_argument",ej=" is too large for shifting.",bs='"',eh="@[",ce=1255,d$=", characters ",ey="Fatal error: exception %s\n",cq="<",d1=255,ex=0x800,ag=0xffff,cd="jsError",ad=0x8000,eg="%ni",d_=12520,d9="(Program not linked with -g, cannot print stack backtrace)\n",cp=256,ew=0.012,co="True",d0="End_of_file",bn="_z",cl="Unix.Unix_error",dZ="Failure",eD="infinity",T=0xff,ca="mkdir",dY="\n",aS=1000,d="",ep="Stack_overflow",cn="ENOENT",d8="^",eH=122,bm=": No such file or directory",G="0",eo="/static/",ev="([^/]+)",aR=0x3f,en=-97,em="Not_found",cm=0xf,a7=128,dW=-48,dX=0xdc00,ef="Sys_blocked_io",eG="fd ",eu="ENOTEMPTY",d7="Match_failure",x=248,dO=", ",w="camlinternalFormat.ml",et="Division_by_zero",bw=">",bt=252,eF=1027,dV="Sys_error",af=".",au="+",ck="rmdir",eC=0xf0,ee="%u",dU="EEXIST",br="%d",dT="Printexc.handle_uncaught_exception",d6="%li",el=1026,d5="Error",bp="Invalid integer: ",es="buffer.ml",bo="int_of_string",ch=127,a6=1024,eB=-32,dM="Pervasives.do_at_exit",dN="utf8",ec="bad",ed="@{",S=" ",cj="Fatal error: exception ",Z=0x80,bv="e",dL="Undefined_recursive_module",dR=120,dS=103,eb=" : flags Open_rdonly and Open_wronly are not compatible",ct="False",cc=512,J="-",cg="nan",dQ=0x7ff0,cs=": Not a directory",d4=0xe0,ea=" : file already exists",d3=0xdfff,aq=0xffffff,ek="_",ae="/",ci="compare: functional value",eA="Assert_failure",dK="()",cb="0x",dJ="%i",eE="Out_of_memory",cf="ENOTDIR",aC=1e7,bq=254,cr="index out of bounds",er=100,d2=250,bu="_bigarr02";function
cL(c,b,a){var
e=String.fromCharCode;if(b==0&&a<=4096&&a==c.length)return e.apply(null,c);var
f=d;for(;0<a;b+=a6,a-=a6)f+=e.apply(null,c.slice(b,b+Math.min(a,a6)));return f}function
by(b){if(g.Uint8Array)var
c=new(g.Uint8Array)(b.l);else
var
c=new
Array(b.l);var
e=b.c,d=e.length,a=0;for(;a<d;a++)c[a]=e.charCodeAt(a);for(d=b.l;a<d;a++)c[a]=0;b.c=c;b.t=4;return c}function
aw(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?cL(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?cL(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)by(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
ay(a){return a}function
ax(a,b,c,d,e){aw(ay(a),b,c,d,e);return 0}function
kb(b,a){throw[0,b,a]}function
aV(b,a){if(b==0)return d;if(a.repeat)return a.repeat(b);var
e=d,c=0;for(;;){if(b&1)e+=a;b>>=1;if(b==0)return e;a+=a;c++;if(c==9)a.slice(0,1)}}function
aU(a){if(a.t==2)a.c+=aV(a.l-a.c.length,"\0");else
a.c=cL(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)>ch)return false;return true}else
return!/[^\x00-\x7f]/.test(a)}function
cN(f){for(var
k=d,c=d,h,g,i,a,b=0,j=f.length;b<j;b++){g=f.charCodeAt(b);if(g<Z){for(var
e=b+1;e<j&&(g=f.charCodeAt(e))<Z;e++);if(e-b>cc){c.substr(0,1);k+=c;c=d;k+=f.slice(b,e)}else
c+=f.slice(b,e);if(e==j)break;b=e}a=1;if(++b<j&&((i=f.charCodeAt(b))&-64)==a7){h=i+(g<<6);if(g<d4){a=h-0x3080;if(a<Z)a=1}else{a=2;if(++b<j&&((i=f.charCodeAt(b))&-64)==a7){h=i+(h<<6);if(g<eC){a=h-0xe2080;if(a<ex||a>=0xd7ff&&a<0xe000)a=2}else{a=3;if(++b<j&&((i=f.charCodeAt(b))&-64)==a7&&g<0xf5){a=i-0x3c82080+(h<<6);if(a<0x10000||a>0x10ffff)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else
if(a>ag)c+=String.fromCharCode(0xd7c0+(a>>10),dX+(a&0x3FF));else
c+=String.fromCharCode(a);if(c.length>a6){c.substr(0,1);k+=c;c=d}}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:aU(this);case
0:if(fa(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 cN(a)};ah.prototype.slice=function(){var
a=this.t==4?this.c.slice():this.c;return new
ah(this.t,a,this.l)};function
eS(a){return new
ah(0,a,a.length)}function
a(a){return eS(a)}function
cJ(c,b){kb(c,a(b))}var
t=[0];function
z(a){cJ(t.Invalid_argument,a)}function
eP(){z(cr)}function
a8(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
eR(b,a){if(a>>>0>=b.l)eP();return a8(b,a)}function
s(a,c,b){b&=T;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}by(a)}a.c[c]=b;return 0}function
az(b,a,c){if(a>>>0>=b.l)eP();return s(b,a,c)}function
aA(c,a){if(c.fun)return aA(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 aA(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 aA(c,d)}}function
bx(){z(cr)}function
eT(a,b){if(b>>>0>=a.length-1)bx();return a}function
jC(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)aU(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
cz(c){var
a=new(g.Float32Array)(1);a[0]=c;var
b=new(g.Int32Array)(a.buffer);return b[0]|0}var
e2=Math.pow(2,-24);function
j$(a){throw a}function
bE(){j$(t.Division_by_zero)}function
e(b,c,a){this.lo=b&aq;this.mi=c&aq;this.hi=a&ag}e.prototype.caml_custom="_j";e.prototype.copy=function(){return new
e(this.lo,this.mi,this.hi)};e.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};e.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};e.prototype.neg=function(){var
a=-this.lo,b=-this.mi+(a>>24),c=-this.hi+(b>>24);return new
e(a,b,c)};e.prototype.add=function(a){var
b=this.lo+a.lo,c=this.mi+a.mi+(b>>24),d=this.hi+a.hi+(c>>24);return new
e(b,c,d)};e.prototype.sub=function(a){var
b=this.lo-a.lo,c=this.mi-a.mi+(b>>24),d=this.hi-a.hi+(c>>24);return new
e(b,c,d)};e.prototype.mul=function(a){var
b=this.lo*a.lo,c=(b*e2|0)+this.mi*a.lo+this.lo*a.mi,d=(c*e2|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new
e(b,c,d)};e.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0};e.prototype.isNeg=function(){return this.hi<<16<0};e.prototype.and=function(a){return new
e(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};e.prototype.or=function(a){return new
e(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};e.prototype.xor=function(a){return new
e(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};e.prototype.shift_left=function(a){a=a&63;if(a==0)return this;if(a<24)return new
e(this.lo<<a,this.mi<<a|this.lo>>24-a,this.hi<<a|this.mi>>24-a);if(a<48)return new
e(0,this.lo<<a-24,this.mi<<a-24|this.lo>>48-a);return new
e(0,0,this.lo<<a-48)};e.prototype.shift_right_unsigned=function(a){a=a&63;if(a==0)return this;if(a<24)return new
e(this.lo>>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new
e(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new
e(this.hi>>a-48,0,0)};e.prototype.shift_right=function(a){a=a&63;if(a==0)return this;var
c=this.hi<<16>>16;if(a<24)return new
e(this.lo>>a|this.mi<<24-a,this.mi>>a|c<<24-a,this.hi<<16>>a>>>16);var
b=this.hi<<16>>31;if(a<48)return new
e(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,b&ag);return new
e(this.hi<<16>>a-32,b,b)};e.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&aq;this.lo=this.lo<<1&aq};e.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&aq;this.mi=(this.mi>>>1|this.hi<<23)&aq;this.hi=this.hi>>>1};e.prototype.udivmod=function(f){var
c=0,b=this.copy(),a=f.copy(),d=new
e(0,0,0);while(b.ucompare(a)>0){c++;a.lsl1()}while(c>=0){c--;d.lsl1();if(b.ucompare(a)>=0){d.lo++;b=b.sub(a)}a.lsr1()}return{quotient:d,modulus:b}};e.prototype.div=function(a){var
b=this;if(a.isZero())bE();var
d=b.hi^a.hi;if(b.hi&ad)b=b.neg();if(a.hi&ad)a=a.neg();var
c=b.udivmod(a).quotient;if(d&ad)c=c.neg();return c};e.prototype.mod=function(b){var
a=this;if(b.isZero())bE();var
d=a.hi;if(a.hi&ad)a=a.neg();if(b.hi&ad)b=b.neg();var
c=a.udivmod(b).modulus;if(d&ad)c=c.neg();return c};e.prototype.toInt=function(){return this.lo|this.mi<<24};e.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};e.prototype.toArray=function(){return[this.hi>>8,this.hi&T,this.mi>>16,this.mi>>8&T,this.mi&T,this.lo>>16,this.lo>>8&T,this.lo&T]};e.prototype.lo32=function(){return this.lo|(this.mi&T)<<24};e.prototype.hi32=function(){return this.mi>>>8&ag|this.hi<<16};function
bB(b,c,a){return new
e(b,c,a)}function
bA(a){if(!isFinite(a)){if(isNaN(a))return bB(1,0,dQ);return a>0?bB(0,0,dQ):bB(0,0,0xfff0)}var
f=a==0&&1/a==-Infinity?ad:a>=0?0:ad;if(f)a=-a;var
b=kn(a)+1023;if(b<=0){b=0;a/=Math.pow(2,-el)}else{a/=Math.pow(2,b-eF);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&cm|f|b<<4;return bB(g,e,c)}function
ba(a){return a.toArray()}function
eO(c,b,g){c.write(32,b.dims.length);c.write(32,b.kind|b.layout<<8);if(b.caml_custom==bu)for(var
a=0;a<b.dims.length;a++)if(b.dims[a]<ag)c.write(16,b.dims[a]);else{c.write(16,ag);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=ba(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=ba(bA(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=cz(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,cz(d[1]));c.write(32,cz(d[2]))}break;case
11:for(var
a=0;a<b.data.length/2;a++){var
f=b.get(a),e=ba(bA(f[1]));for(var
d=0;d<8;d++)c.write(8,e[d]);var
e=ba(bA(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
eM(a){switch(a){case
7:case
10:case
11:return 2;default:return 1}}function
jx(c,e){var
b=g,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)z("Bigarray.create: unsupported kind");var
d=new
a(e*eM(c));return d}function
cA(c){var
a=new(g.Int32Array)(1);a[0]=c;var
b=new(g.Float32Array)(a.buffer);return b[0]}function
a$(a){return new
e(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
cB(d){var
f=d.lo,g=d.mi,b=d.hi,c=(b&0x7fff)>>4;if(c==2047)return(f|g|b&cm)==0?b&ad?-Infinity:Infinity:NaN;var
e=Math.pow(2,-24),a=(f*e+g)*e+(b&cm);if(c>0){a+=16;a*=Math.pow(2,c-eF)}else
a*=Math.pow(2,-el);if(b&ad)a=-a;return a}function
cu(b){var
d=b.length,c=1;for(var
a=0;a<d;a++){if(b[a]<0)z("Bigarray.create: negative dimension");c=c*b[a]}return c}function
jO(b,a){return new
e(b&aq,b>>>24&T|(a&ag)<<8,a>>>16&ag)}function
cC(a){return a.hi32()}function
cD(a){return a.lo32()}var
jy=bu;function
av(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}av.prototype.caml_custom=jy;av.prototype.offset=function(b){var
c=0;if(typeof
b==="number")b=[b];if(!(b
instanceof
Array))z("bigarray.js: invalid offset");if(this.dims.length!=b.length)z("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])bx();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])bx();c=c*this.dims[a]+(b[a]-1)}return c};av.prototype.get=function(a){switch(this.kind){case
7:var
d=this.data[a*2+0],b=this.data[a*2+1];return jO(d,b);case
10:case
11:var
e=this.data[a*2+0],c=this.data[a*2+1];return[bq,e,c];default:return this.data[a]}};av.prototype.set=function(a,b){switch(this.kind){case
7:this.data[a*2+0]=cD(b);this.data[a*2+1]=cC(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};av.prototype.fill=function(b){switch(this.kind){case
7:var
c=cD(b),e=cC(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}};av.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
aT(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}aT.prototype=new
av();aT.prototype.offset=function(a){if(typeof
a!=="number")if(a
instanceof
Array&&a.length==1)a=a[0];else
z("Ml_Bigarray_c_1_1.offset");if(a<0||a>=this.dims[0])bx();return a};aT.prototype.get=function(a){return this.data[a]};aT.prototype.set=function(a,b){this.data[a]=b;return 0};aT.prototype.fill=function(a){this.data.fill(a);return 0};function
eK(c,d,a,b){var
e=eM(c);if(cu(a)*e!=b.length)z("length doesn't match dims");if(d==0&&a.length==1&&e==1)return new
aT(c,d,a,b);return new
av(c,d,a,b)}function
U(a){cJ(t.Failure,a)}function
eL(b,v,r){var
i=b.read32s();if(i<0||i>16)U("input_value: wrong number of bigarray dimensions");var
p=b.read32s(),j=p&T,o=p>>8&1,h=[];if(r==bu)for(var
a=0;a<i;a++){var
n=b.read16u();if(n==ag){var
t=b.read32u(),u=b.read32u();if(t!=0)U("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=cu(h),f=jx(j,d),g=eK(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)U("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=a$(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=cB(a$(e));g.set(a,k)}break;case
0:for(var
a=0;a<d;a++){var
k=cA(b.read32s());g.set(a,k)}break;case
10:for(var
a=0;a<d;a++){var
m=cA(b.read32s()),l=cA(b.read32s());g.set(a,[bq,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=cB(a$(e));for(var
c=0;c<8;c++)e[c]=b.read8u();var
l=cB(a$(e));g.set(a,[bq,m,l])}break}v[0]=(4+i)*4;return eK(j,o,h,f)}function
eJ(a,b,c){return a.compare(b,c)}function
cH(a,b){return Math.imul(a,b)}function
_(b,a){a=cH(a,0xcc9e2d51|0);a=a<<15|a>>>32-15;a=cH(a,0x1b873593);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(0xe6546b64|0)|0}function
jK(a,b){a=_(a,cD(b));a=_(a,cC(b));return a}function
e1(a,b){return jK(a,bA(b))}function
eN(c){var
b=cu(c.dims),d=0;switch(c.kind){case
2:case
3:case
12:if(b>cp)b=cp;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=_(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=_(d,e)}break;case
4:case
5:if(b>a7)b=a7;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=_(d,e)}if((b&1)!=0)d=_(d,c.data[a]);break;case
6:if(b>64)b=64;for(var
a=0;a<b;a++)d=_(d,c.data[a]);break;case
8:case
9:if(b>64)b=64;for(var
a=0;a<b;a++)d=_(d,c.data[a]);break;case
7:if(b>32)b=32;b*=2;for(var
a=0;a<b;a++)d=_(d,c.data[a]);break;case
10:b*=2;case
0:if(b>64)b=64;for(var
a=0;a<b;a++)d=e1(d,c.data[a]);break;case
11:b*=2;case
1:if(b>32)b=32;for(var
a=0;a<b;a++)d=e1(d,c.data[a]);break}return d}function
jM(a,b){b[0]=4;return a.read32s()}function
j8(a,b){switch(a.read8u()){case
1:b[0]=4;return a.read32s();case
2:U("input_value: native integer value too large");default:U("input_value: ill-formed native integer")}}function
jX(c,d){var
b=new
Array(8);for(var
a=0;a<8;a++)b[a]=c.read8u();d[0]=8;return a$(b)}function
jT(e,d,b){var
c=ba(d);for(var
a=0;a<8;a++)e.write(8,c[a]);b[0]=8;b[1]=8}function
jN(a,b,c){return a.compare(b)}function
jQ(a){return a.lo32()^a.hi32()}var
cw={"_j":{deserialize:jX,serialize:jT,fixed_length:8,compare:jN,hash:jQ},"_i":{deserialize:jM,fixed_length:4},"_n":{deserialize:j8,fixed_length:4},"_bigarray":{deserialize:function(a,b){return eL(a,b,"_bigarray")},serialize:eO,compare:eJ,hash:eN},"_bigarr02":{deserialize:function(a,b){return eL(a,b,bu)},serialize:eO,compare:eJ,hash:eN}};function
cv(a){return cw[a.caml_custom]&&cw[a.caml_custom].compare}function
eU(f,c,d,e){var
b=cv(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
bC(a){return a
instanceof
ah}function
cE(a){return bC(a)}function
eV(a){if(typeof
a==="number")return aS;else
if(bC(a))return bt;else
if(cE(a))return 1252;else
if(a
instanceof
Array&&a[0]===a[0]>>>0&&a[0]<=d1){var
b=a[0]|0;return b==bq?0:b}else
if(a
instanceof
String)return d_;else
if(typeof
a=="string")return d_;else
if(a
instanceof
Number)return aS;else
if(a&&a.caml_custom)return ce;else
if(a&&a.compare)return 1256;else
if(typeof
a=="function")return 1247;else
if(typeof
a=="symbol")return 1251;return 1001}function
jY(a,b){if(a<b)return-1;if(a==b)return 0;return 1}function
eQ(a,b){a.t&6&&aU(a);b.t&6&&aU(b);return a.c<b.c?-1:a.c>b.c?1:0}function
kz(a,b){return eQ(a,b)}function
a9(a,b,d){var
e=[];for(;;){if(!(d&&a===b)){var
f=eV(a);if(f==d2){a=a[1];continue}var
g=eV(b);if(g==d2){b=b[1];continue}if(f!==g){if(f==aS){if(g==ce)return eU(a,b,-1,d);return-1}if(g==aS){if(f==ce)return eU(b,a,1,d);return 1}return f<g?-1:1}switch(f){case
247:z(ci);break;case
248:var
c=jY(a[2],b[2]);if(c!=0)return c|0;break;case
249:z(ci);break;case
250:z("equal: got Forward_tag, should not happen");break;case
251:z("equal: abstract value");break;case
252:if(a!==b){var
c=eQ(a,b);if(c!=0)return c|0}break;case
253:z("equal: got Double_tag, should not happen");break;case
254:z("equal: got Double_array_tag, should not happen");break;case
255:z("equal: got Custom_tag, should not happen");break;case
1247:z(ci);break;case
1255:var
i=cv(a);if(i!=cv(b))return a.caml_custom<b.caml_custom?-1:1;if(!i)z("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
jD(a,b){return a9(a,b,true)}function
jE(){return[0]}function
y(a){if(a<0)z("Bytes.create");return new
ah(a?2:9,d,a)}function
jF(b,a){if(a==0)bE();return b/a|0}function
eX(a,b){return+(a9(a,b,false)==0)}function
jG(a,c,b,e){if(b>0)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(e==0){a.c=d;a.t=2}else{a.c=aV(b,String.fromCharCode(e));a.t=b==a.l?0:2}else{if(a.t!=4)by(a);for(b+=c;c<b;c++)a.c[c]=e}return 0}function
cI(d){d=aj(d);var
e=d.length;if(e>31)z("format_int: format too long");var
a={justify:au,signstyle:J,filler:S,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=J;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
cx(b,g){if(b.uppercase)g=g.toUpperCase();var
f=g.length;if(b.signedconv&&(b.sign<0||b.signstyle!=J))f++;if(b.alternate){if(b.base==8)f+=1;if(b.base==16)f+=2}var
c=d;if(b.justify==au&&b.filler==S)for(var
e=f;e<b.width;e++)c+=S;if(b.signedconv)if(b.sign<0)c+=J;else
if(b.signstyle!=J)c+=b.signstyle;if(b.alternate&&b.base==8)c+=G;if(b.alternate&&b.base==16)c+=cb;if(b.justify==au&&b.filler==G)for(var
e=f;e<b.width;e++)c+=G;c+=g;if(b.justify==J)for(var
e=f;e<b.width;e++)c+=S;return a(c)}function
cy(i,c){function
j(a,b){if(Math.abs(a)<1.0)return a.toFixed(b);else{var
c=parseInt(a.toString().split(au)[1]);if(c>20){c-=20;a/=Math.pow(10,c);a+=new
Array(c+1).join(G);if(b>0)a=a+af+new
Array(b+1).join(G);return a}else
return a.toFixed(b)}}var
a,e=cI(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=cg;e.filler=S}else
if(!isFinite(c)){a="inf";e.filler=S}else
switch(e.conv){case"e":var
a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==bv)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(bv),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)==af)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==bv)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)==af)b--;a=a.slice(0,b+1)}}break}return cx(e,a)}function
bz(f,c){if(aj(f)==br)return a(d+c);var
b=cI(f);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else
c>>>=0;var
e=c.toString(b.base);if(b.prec>=0){b.filler=S;var
g=b.prec-e.length;if(g>0)e=aV(g,G)+e}return cx(b,e)}var
j9=0;function
ar(){return j9++}function
cF(a){return a.toUtf16()}function
kp(){function
a(a){if(a.charAt(0)===ae)return[d,a.substring(1)];return}function
b(c){var
h=/^([a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?([\\/])?([\s\S]*?)$/,a=h.exec(c),b=a[1]||d,f=Boolean(b&&b.charAt(1)!==":");if(Boolean(a[2]||f)){var
e=a[1]||d,g=a[2]||d;return[e,c.substring(e.length+g.length)]}return}return g.process&&g.process.platform?g.process.platform==="win32"?b:a:a}var
cO=kp();function
e_(a){return a.slice(-1)!==ae?a+ae:a}if(g.process&&g.process.cwd)var
a_=g.process.cwd().replace(/\\/g,ae);else
var
a_="/static";a_=e_(a_);function
j3(a){a=cF(a);if(!cO(a))a=a_+a;var
e=cO(a),d=e[1].split(ae),b=[];for(var
c=0;c<d.length;c++)switch(d[c]){case"..":if(b.length>1)b.pop();break;case".":break;default:b.push(d[c]);break}b.unshift(e[0]);b.orig=a;return b}function
ki(f){for(var
g=d,b=g,a,i,c=0,h=f.length;c<h;c++){a=f.charCodeAt(c);if(a<Z){for(var
e=c+1;e<h&&(a=f.charCodeAt(e))<Z;e++);if(e-c>cc){b.substr(0,1);g+=b;b=d;g+=f.slice(c,e)}else
b+=f.slice(c,e);if(e==h)break;c=e}if(a<ex){b+=String.fromCharCode(0xc0|a>>6);b+=String.fromCharCode(Z|a&aR)}else
if(a<0xd800||a>=d3)b+=String.fromCharCode(d4|a>>12,Z|a>>6&aR,Z|a&aR);else
if(a>=0xdbff||c+1==h||(i=f.charCodeAt(c+1))<dX||i>d3)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+i-0x35fdc00;b+=String.fromCharCode(eC|a>>18,Z|a>>12&aR,Z|a>>6&aR,Z|a&aR)}if(b.length>a6){b.substr(0,1);g+=b;b=d}}return g+b}function
jB(a){var
b=9;if(!fa(a))b=8,a=ki(a);return new
ah(b,a,a.length)}function
Y(a){return jB(a)}var
ky=["E2BIG","EACCES","EAGAIN","EBADF","EBUSY","ECHILD","EDEADLK","EDOM",dU,"EFAULT","EFBIG","EINTR","EINVAL","EIO","EISDIR","EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",cn,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",cf,eu,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS","ESPIPE","ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function
aG(e,g,f,a){var
b=ky.indexOf(e);if(b<0){if(a==null)a=-9999;b=[0,a]}var
c=[b,Y(g||d),Y(f||d)];return c}var
e5={};function
aE(a){return e5[a]}function
aF(b,a){throw[0,b].concat(a)}function
jA(a){return new
ah(4,a,a.length)}function
l(a){cJ(t.Sys_error,a)}function
ka(a){a=aj(a);l(a+bm)}function
H(a){return a.l}function
eI(){}function
B(a){this.data=a}B.prototype=new
eI();B.prototype.truncate=function(a){var
b=this.data;this.data=y(a|0);aw(b,0,this.data,0,a)};B.prototype.length=function(){return H(this.data)};B.prototype.write=function(b,d,g,a){var
c=this.length();if(b+a>=c){var
e=y(b+a),f=this.data;this.data=e;aw(f,0,this.data,0,c)}ax(d,g,this.data,b,a);return 0};B.prototype.read=function(c,a,d,b){var
e=this.length();aw(this.data,c,a,d,b);return 0};B.prototype.read_one=function(a){return eR(this.data,a)};B.prototype.close=function(){};B.prototype.constructor=B;function
K(b,a){this.content={};this.root=b;this.lookupFun=a}K.prototype.nm=function(a){return this.root+a};K.prototype.create_dir_if_needed=function(e){var
c=e.split(ae),b=d;for(var
a=0;a<c.length-1;a++){b+=c[a]+ae;if(this.content[b])continue;this.content[b]=Symbol("directory")}};K.prototype.slash=function(a){return/\/$/.test(a)?a:a+ae};K.prototype.lookup=function(b){if(!this.content[b]&&this.lookupFun){var
c=this.lookupFun(a(this.root),a(b));if(c!==0){this.create_dir_if_needed(b);this.content[b]=new
B(ay(c[1]))}}};K.prototype.exists=function(a){if(a==d)return 1;var
b=this.slash(a);if(this.content[b])return 1;this.lookup(a);return this.content[a]?1:0};K.prototype.mkdir=function(c,f,e){var
b=e&&aE(cl);if(this.exists(c))if(b)aF(b,aG(dU,ca,this.nm(c)));else
l(c+": File exists");var
a=/^(.*)\/[^/]+/.exec(c);a=a&&a[1]||d;if(!this.exists(a))if(b)aF(b,aG(cn,ca,this.nm(a)));else
l(a+bm);if(!this.is_dir(a))if(b)aF(b,aG(cf,ca,this.nm(a)));else
l(a+cs);this.create_dir_if_needed(this.slash(c))};K.prototype.rmdir=function(a,g){var
b=g&&aE(cl),c=a==d?d:this.slash(a),f=new
RegExp(d8+c+ev);if(!this.exists(a))if(b)aF(b,aG(cn,ck,this.nm(a)));else
l(a+bm);if(!this.is_dir(a))if(b)aF(b,aG(cf,ck,this.nm(a)));else
l(a+cs);for(var
e
in
this.content)if(e.match(f))if(b)aF(b,aG(eu,ck,this.nm(a)));else
l(this.nm(a)+": Directory not empty");delete
this.content[c]};K.prototype.readdir=function(a){var
g=a==d?d:this.slash(a);if(!this.exists(a))l(a+bm);if(!this.is_dir(a))l(a+cs);var
h=new
RegExp(d8+g+ev),e={},c=[];for(var
f
in
this.content){var
b=f.match(h);if(b&&!e[b[1]]){e[b[1]]=true;c.push(b[1])}}return c};K.prototype.is_dir=function(a){if(a==d)return true;var
b=this.slash(a);return this.content[b]?1:0};K.prototype.unlink=function(a){var
b=this.content[a]?true:false;delete
this.content[a];return b};K.prototype.open=function(a,b){if(b.rdonly&&b.wronly)l(this.nm(a)+eb);if(b.text&&b.binary)l(this.nm(a)+eq);this.lookup(a);if(this.content[a]){if(this.is_dir(a))l(this.nm(a)+" : is a directory");if(b.create&&b.excl)l(this.nm(a)+ea);var
c=this.content[a];if(b.truncate)c.truncate();return c}else
if(b.create){this.create_dir_if_needed(a);this.content[a]=new
B(y(0));return this.content[a]}else
ka(this.nm(a))};K.prototype.register=function(c,a){var
b;if(this.content[c])l(this.nm(c)+ea);if(bC(a))b=new
B(a);if(cE(a))b=new
B(ay(a));else
if(a
instanceof
Array)b=new
B(jA(a));else
if(typeof
a==="string")b=new
B(eS(a));else
if(a.toString){var
d=ay(Y(a.toString()));b=new
B(d)}if(b){this.create_dir_if_needed(c);this.content[c]=b}else
l(this.nm(c)+" : registering file with invalid content type")};K.prototype.constructor=K;function
n(a){return H(a)}function
$(b,a){return a8(b,a)}function
jw(d){var
c=n(d),b=new
Array(c),a=0;for(;a<c;a++)b[a]=$(d,a);return b}function
jv(a){if(a.t!=4)by(a);return a.c}function
ai(a){this.fs=require("fs");this.fd=a}ai.prototype=new
eI();ai.prototype.truncate=function(a){try{this.fs.ftruncateSync(this.fd,a|0)}catch(a){l(a.toString())}};ai.prototype.length=function(){try{return this.fs.fstatSync(this.fd).size}catch(a){l(a.toString())}};ai.prototype.write=function(f,b,c,e){var
a=jw(b);if(!(a
instanceof
g.Uint8Array))a=new(g.Uint8Array)(a);var
d=g.Buffer.from(a);try{this.fs.writeSync(this.fd,d,c,e,f)}catch(a){l(a.toString())}return 0};ai.prototype.read=function(h,d,c,f){var
a=jv(d);if(!(a
instanceof
g.Uint8Array))a=new(g.Uint8Array)(a);var
e=g.Buffer.from(a);try{this.fs.readSync(this.fd,e,c,f,h)}catch(a){l(a.toString())}for(var
b=0;b<f;b++)az(d,c+b,e[c+b]);return 0};ai.prototype.read_one=function(c){var
b=new(g.Uint8Array)(1),a=g.Buffer.from(b);try{this.fs.readSync(this.fd,a,0,1,c)}catch(a){l(a.toString())}return a[0]};ai.prototype.close=function(){try{this.fs.closeSync(this.fd)}catch(a){l(a.toString())}};ai.prototype.constructor=ai;function
C(a){this.fs=require("fs");this.root=a}C.prototype.nm=function(a){return this.root+a};C.prototype.exists=function(a){try{return this.fs.existsSync(this.nm(a))?1:0}catch(a){return 0}};C.prototype.mkdir=function(b,a,c){try{this.fs.mkdirSync(this.nm(b),{mode:a});return 0}catch(a){this.raise_nodejs_error(a,c)}};C.prototype.rmdir=function(a,b){try{this.fs.rmdirSync(this.nm(a));return 0}catch(a){this.raise_nodejs_error(a,b)}};C.prototype.readdir=function(a,b){try{return this.fs.readdirSync(this.nm(a))}catch(a){this.raise_nodejs_error(a,b)}};C.prototype.is_dir=function(a){try{return this.fs.statSync(this.nm(a)).isDirectory()?1:0}catch(a){l(a.toString())}};C.prototype.unlink=function(a,c){try{var
b=this.fs.existsSync(this.nm(a))?1:0;this.fs.unlinkSync(this.nm(a));return b}catch(a){this.raise_nodejs_error(a,c)}};C.prototype.open=function(f,c,g){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
ai(d)}catch(a){this.raise_nodejs_error(a,g)}};C.prototype.rename=function(b,a,c){try{this.fs.renameSync(this.nm(b),this.nm(a))}catch(a){this.raise_nodejs_error(a,c)}};C.prototype.stat=function(b,c){try{var
a=this.fs.statSync(this.nm(b));return this.stats_from_js(a)}catch(a){this.raise_nodejs_error(a,c)}};C.prototype.lstat=function(b,c){try{var
a=this.fs.lstatSync(this.nm(b));return this.stats_from_js(a)}catch(a){this.raise_nodejs_error(a,c)}};C.prototype.symlink=function(d,c,a,b){try{this.fs.symlinkSync(this.nm(c),this.nm(a),d?"dir":"file");return 0}catch(a){this.raise_nodejs_error(a,b)}};C.prototype.readlink=function(b,c){try{var
a=this.fs.readlinkSync(this.nm(b),dN);return Y(a)}catch(a){this.raise_nodejs_error(a,c)}};C.prototype.raise_nodejs_error=function(a,d){var
b=aE(cl);if(d&&b){var
c=aG(a.code,a.syscall,a.path,a.errno);aF(b,c)}else
l(a.toString())};C.prototype.stats_from_js=function(a){var
b;if(a.isFile())b=0;else
if(a.isDirectory())b=1;else
if(a.isCharacterDevice())b=2;else
if(a.isBlockDevice())b=3;else
if(a.isSymbolicLink())b=4;else
if(a.isFIFO())b=5;else
if(a.isSocket())b=6;return[0,a.dev,a.ino,b,a.mode,a.nlink,a.uid,a.gid,a.rdev,a.size,a.atimeMs,a.mtimeMs,a.ctimeMs]};C.prototype.constructor=C;function
e0(b){var
a=cO(b);if(!a)return;return a[0]+ae}var
bF=e0(a_)||U("unable to compute caml_root");function
e$(){return typeof
g.process!=="undefined"&&typeof
g.process.versions!=="undefined"&&typeof
g.process.versions.node!=="undefined"&&g.process.platform!=="browser"}var
aW=[];if(e$())aW.push({path:bF,device:new
C(bF)});else
aW.push({path:bF,device:new
K(bF)});aW.push({path:eo,device:new
K(eo)});function
fe(b){var
g=j3(b),b=g.join(ae),f=e_(b),c;for(var
e=0;e<aW.length;e++){var
a=aW[e];if(f.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)}}if(!c){var
d=e0(b);if(d&&d.match(/^[a-zA-Z]:\/$/)){var
a={path:d,device:new
C(d)};aW.push(a);c={path:a.path,device:a.device,rest:b.substring(a.path.length,b.length)}}}if(c)return c;l("no device found for "+f)}function
eW(c,b){var
c=typeof
c=="string"?a(c):c,b=typeof
b=="string"?a(b):b,d=fe(c);if(!d.device.register)U("cannot register file");d.device.register(d.rest,b);return 0}function
jI(){var
b=g.caml_fs_tmp;if(b)for(var
a=0;a<b.length;a++)eW(b[a].name,b[a].content);g.caml_create_file=eW;g.caml_fs_tmp=[];return 0}function
jJ(){return 0}function
eZ(){return[0]}function
jL(a,c,l){if(!isFinite(a)){if(isNaN(a))return Y(cg);return Y(a>0?eD:"-infinity")}var
j=a==0&&1/a==-Infinity?1:a>=0?0:1;if(j)a=-a;var
e=0;if(a==0);else
if(a<1)while(a<1&&e>-1022){a*=2;e--}else
while(a>=2){a/=2;e++}var
k=e<0?d:au,f=d;if(j)f=J;else
switch(l){case
43:f=au;break;case
32:f=S;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(af);if(i<0)b+=af+aV(c,G);else{var
g=i+1+c;if(b.length<g)b+=aV(g-b.length,G);else
b=b.substr(0,g)}}return Y(f+cb+b+"p"+k+e.toString(10))}function
jS(a){return+a.isZero()}function
jV(a){return new
e(a&aq,a>>24&aq,a>>31&ag)}function
jW(a){return a.toInt()}function
jR(a){return+a.isNeg()}function
jU(a){return a.neg()}function
jP(h,c){var
a=cI(h);if(a.signedconv&&jR(c)){a.sign=-1;c=jU(c)}var
b=d,i=jV(a.base),g="0123456789abcdef";do{var
f=c.udivmod(i);c=f.quotient;b=g.charAt(jW(f.modulus))+b}while(!jS(c));if(a.prec>=0){a.filler=S;var
e=a.prec-b.length;if(e>0)b=aV(e,G)+b}return cx(a,b)}function
j_(c){var
a=0,e=n(c),b=10,d=1;if(e>0)switch($(c,a)){case
45:a++;d=-1;break;case
43:a++;d=1;break}if(a+1<e&&$(c,a)==48)switch($(c,a+1)){case
120:case
88:b=16;a+=2;break;case
111:case
79:b=8;a+=2;break;case
98:case
66:b=2;a+=2;break;case
117:case
85:a+=2;break}return[a,d,b]}function
e6(a){if(a>=48&&a<=57)return a-48;if(a>=65&&a<=90)return a-55;if(a>=97&&a<=eH)return a-87;return-1}function
jZ(f){var
h=j_(f),c=h[0],i=h[1],d=h[2],g=n(f),j=-1>>>0,e=c<g?$(f,c):0,b=e6(e);if(b<0||b>=d)U(bo);var
a=b;for(c++;c<g;c++){e=$(f,c);if(e==95)continue;b=e6(e);if(b<0||b>=d)break;a=d*a+b;if(a>j)U(bo)}if(c!=g)U(bo);a=i*a;if(d==10&&(a|0)!=a)U(bo);return a|0}function
j1(a,b){return+(a9(a,b,false)<=0)}function
j2(a,b){return+(a9(a,b,false)<0)}function
j4(){return 0}var
ak=new
Array();function
aD(c){var
a=ak[c];if(!a.opened)l("Cannot flush a closed channel");if(!a.buffer||a.buffer==d)return 0;if(a.fd&&t.fds[a.fd]&&t.fds[a.fd].output){var
b=t.fds[a.fd].output;switch(b.length){case
2:b(c,a.buffer);break;default:b(a.buffer)}}a.buffer=d;return 0}function
e8(e,f){var
b=ak[e],d=a(f),c=n(d);b.file.write(b.offset,d,0,c);b.offset+=c;return 0}function
kl(a){var
a=cN(a),b=g;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=cN(a),b=g;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
bG(c,e,d,a){if(t.fds===undefined)t.fds=new
Array();a=a?a:{};var
b={};b.file=d;b.offset=a.append?d.length():0;b.flags=a;b.output=e;t.fds[c]=b;if(!t.fd_last_idx||c>t.fd_last_idx)t.fd_last_idx=c;return c}function
kA(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)l(aj(c)+eb);if(a.text&&a.binary)l(aj(c)+eq);var
d=fe(c),e=d.device.open(d.rest,a),f=t.fd_last_idx?t.fd_last_idx:0;return bG(f+1,e8,e,a)}bG(0,e8,new
B(y(0)));bG(1,km,new
B(y(0)));bG(2,kl,new
B(y(0)));function
j5(a){var
c=t.fds[a];if(c.flags.wronly)l(eG+a+" is writeonly");var
d=null;if(a==0&&e$()){var
e=require("fs");d=function(){return Y(e.readFileSync(0,dN))}}var
b={file:c.file,offset:c.offset,fd:a,opened:true,out:false,refill:d};ak[b.fd]=b;return b.fd}function
e3(c){var
b=t.fds[c];if(b.flags.rdonly)l(eG+c+" is readonly");var
a={file:b.file,offset:b.offset,fd:c,opened:true,out:true,buffer:d};ak[a.fd]=a;return a.fd}function
j6(){var
b=0;for(var
a=0;a<ak.length;a++)if(ak[a]&&ak[a].opened&&ak[a].out)b=[0,ak[a].fd,b];return b}function
L(a){return a}function
j7(g,d,h,f){var
b=ak[g];if(!b.opened)l("Cannot output to a closed channel");var
a;if(h==0&&H(d)==f)a=d;else{a=y(f);aw(d,h,a,0,f)}var
i=L(a),c=aj(i),e=c.lastIndexOf(dY);if(e<0)b.buffer+=c;else{b.buffer+=c.substr(0,e+1);aD(g);b.buffer+=c.substr(e+1)}return 0}function
cG(b,a,d,c){return j7(b,ay(a),d,c)}function
e4(c,b){var
d=a(String.fromCharCode(b));cG(c,d,0,1);return 0}function
bb(a,b){return+(a9(a,b,false)!=0)}function
bD(a){if(a
instanceof
Array&&a[0]==a[0]>>>0)return a[0];else
if(bC(a))return bt;else
if(cE(a))return bt;else
if(a
instanceof
Function||typeof
a=="function")return 247;else
if(a&&a.caml_custom)return d1;else
return aS}function
X(b,c,a){if(a&&g.toplevelReloc)b=g.toplevelReloc(a);t[b+1]=c;if(a)t[a]=c}function
cK(a,b){e5[aj(a)]=b;return 0}function
jz(a,b){if(a===b)return 1;a.t&6&&aU(a);b.t&6&&aU(b);return a.c==b.c?1:0}function
e9(a,b){return jz(a,b)}function
kd(){z(cr)}function
P(b,a){if(a>>>0>=n(b))kd();return $(b,a)}function
ke(a,b){return 1-e9(a,b)}function
kf(){return[0,a("js_of_ocaml")]}function
kg(){return 0x7FFFFFFF/4|0}function
kh(a){return 0}function
cM(a){var
b=1;while(a&&a.joo_tramp){a=a.joo_tramp.apply(null,a.joo_args);b++}return a}function
D(b,a){return{joo_tramp:b,joo_args:a}}function
e7(a){return a}function
bH(a){if(a
instanceof
Array)return a;if(g.RangeError&&a
instanceof
g.RangeError&&a.message&&a.message.match(/maximum call stack/i))return e7(t.Stack_overflow);if(g.InternalError&&a
instanceof
g.InternalError&&a.message&&a.message.match(/too much recursion/i))return e7(t.Stack_overflow);if(a
instanceof
g.Error&&aE(cd))return[0,aE(cd),a];return[0,t.Failure,Y(String(a))]}var
h=function(A){"use strict";var
i=aC,ac=7,u=9007199254740992,K=r(u),P="0123456789abcdefghijklmnopqrstuvwxyz",j=g.BigInt,H=typeof
j==="function";function
e(a,b,c,d){if(typeof
a==="undefined")return e[0];if(typeof
b!=="undefined")return+b===10&&!c?f(a):ah(a,b,c,d);return f(a)}function
a(b,a){this.value=b;this.sign=a;this.isSmall=false;this.caml_custom=bn}a.prototype=Object.create(e.prototype);function
b(a){this.value=a;this.sign=a<0;this.isSmall=true;this.caml_custom=bn}b.prototype=Object.create(e.prototype);function
c(a){this.value=a;this.caml_custom=bn}c.prototype=Object.create(e.prototype);function
q(a){return-u<a&&a<u}function
r(a){if(a<aC)return[a];if(a<ez)return[a%aC,Math.floor(a/aC)];return[a%aC,Math.floor(a/aC)%aC,Math.floor(a/ez)]}function
n(a){s(a);var
b=a.length;if(b<4&&o(a,K)<0)switch(b){case
0:return 0;case
1:return a[0];case
2:return a[0]+a[1]*i;default:return a[0]+(a[1]+a[2]*i)*i}return a}function
s(a){var
b=a.length;while(a[--b]===0);a.length=b+1}function
C(b){var
c=new
Array(b),a=-1;while(++a<b)c[a]=0;return c}function
t(a){if(a>0)return Math.floor(a);return Math.ceil(a)}function
Q(f,g){var
h=f.length,j=g.length,e=new
Array(h),b=0,d=i,c,a;for(a=0;a<j;a++){c=f[a]+g[a]+b;b=c>=d?1:0;e[a]=c-b*d}while(a<h){c=f[a]+b;b=c===d?1:0;e[a++]=c-b*d}if(b>0)e.push(b);return e}function
v(a,b){if(a.length>=b.length)return Q(a,b);return Q(b,a)}function
B(f,a){var
g=f.length,d=new
Array(g),c=i,e,b;for(b=0;b<g;b++){e=f[b]-c+a;a=Math.floor(e/c);d[b]=e-a*c;a+=1}while(a>0){d[b++]=a%c;a=Math.floor(a/c)}return d}a.prototype.add=function(e){var
b=f(e);if(this.sign!==b.sign)return this.subtract(b.negate());var
c=this.value,d=b.value;if(b.isSmall)return new
a(B(c,Math.abs(d)),this.sign);return new
a(v(c,d),this.sign)};a.prototype.plus=a.prototype.add;b.prototype.add=function(g){var
e=f(g),c=this.value;if(c<0!==e.sign)return this.subtract(e.negate());var
d=e.value;if(e.isSmall){if(q(c+d))return new
b(c+d);d=r(Math.abs(d))}return new
a(B(d,Math.abs(c)),c<0)};b.prototype.plus=b.prototype.add;c.prototype.add=function(a){return new
c(this.value+f(a).value)};c.prototype.plus=c.prototype.add;function
y(d,g){var
f=d.length,h=g.length,c=new
Array(f),e=0,j=i,a,b;for(a=0;a<h;a++){b=d[a]-e-g[a];if(b<0){b+=j;e=1}else
e=0;c[a]=b}for(a=h;a<f;a++){b=d[a]-e;if(b<0)b+=j;else{c[a++]=b;break}c[a]=b}for(;a<f;a++)c[a]=d[a];s(c);return c}function
al(e,f,d){var
c;if(o(e,f)>=0)c=y(e,f);else{c=y(f,e);d=!d}c=n(c);if(typeof
c==="number"){if(d)c=-c;return new
b(c)}return new
a(c,d)}function
F(g,l,k){var
j=g.length,c=new
Array(j),h=-l,f=i,e,d;for(e=0;e<j;e++){d=g[e]+h;h=Math.floor(d/f);d%=f;c[e]=d<0?d+f:d}c=n(c);if(typeof
c==="number"){if(k)c=-c;return new
b(c)}return new
a(c,k)}a.prototype.subtract=function(d){var
a=f(d);if(this.sign!==a.sign)return this.add(a.negate());var
b=this.value,c=a.value;if(a.isSmall)return F(b,Math.abs(c),this.sign);return al(b,c,this.sign)};a.prototype.minus=a.prototype.subtract;b.prototype.subtract=function(e){var
c=f(e),a=this.value;if(a<0!==c.sign)return this.add(c.negate());var
d=c.value;if(c.isSmall)return new
b(a-d);return F(d,Math.abs(a),a>=0)};b.prototype.minus=b.prototype.subtract;c.prototype.subtract=function(a){return new
c(this.value-f(a).value)};c.prototype.minus=c.prototype.subtract;a.prototype.negate=function(){return new
a(this.value,!this.sign)};b.prototype.negate=function(){var
c=this.sign,a=new
b(-this.value);a.sign=!c;return a};c.prototype.negate=function(){return new
c(-this.value)};a.prototype.abs=function(){return new
a(this.value,false)};b.prototype.abs=function(){return new
b(Math.abs(this.value))};c.prototype.abs=function(){return new
c(this.value>=0?this.value:-this.value)};function
O(f,j){var
h=f.length,l=j.length,n=h+l,c=C(n),m=i,e,d,a,g,k;for(a=0;a<h;++a){g=f[a];for(var
b=0;b<l;++b){k=j[b];e=g*k+c[a+b];d=Math.floor(e/m);c[a+b]=e-d*m;c[a+b+1]+=d}}s(c);return c}function
w(f,h){var
g=f.length,e=new
Array(g),c=i,a=0,d,b;for(b=0;b<g;b++){d=f[b]*h+a;a=Math.floor(d/c);e[b]=d-a*c}while(a>0){e[b++]=a%c;a=Math.floor(a/c)}return e}function
Z(c,b){var
a=[];while(b-->0)a.push(0);return a.concat(c)}function
D(b,c){var
a=Math.max(b.length,c.length);if(a<=30)return O(b,c);a=Math.ceil(a/2);var
f=b.slice(a),d=b.slice(0,a),i=c.slice(a),h=c.slice(0,a),e=D(d,h),g=D(f,i),k=D(v(d,f),v(h,i)),j=v(v(e,Z(y(y(k,e),g),a)),Z(g,2*a));s(j);return j}function
am(a,b){return-(ew*a)-ew*b+0.000015*a*b>0}a.prototype.multiply=function(j){var
g=f(j),c=this.value,b=g.value,h=this.sign!==g.sign,d;if(g.isSmall){if(b===0)return e[0];if(b===1)return this;if(b===-1)return this.negate();d=Math.abs(b);if(d<i)return new
a(w(c,d),h);b=r(d)}if(am(c.length,b.length))return new
a(D(c,b),h);return new
a(O(c,b),h)};a.prototype.times=a.prototype.multiply;function
W(b,c,d){if(b<i)return new
a(w(c,b),d);return new
a(O(c,r(b)),d)}b.prototype._multiplyBySmall=function(a){if(q(a.value*this.value))return new
b(a.value*this.value);return W(Math.abs(a.value),r(Math.abs(this.value)),this.sign!==a.sign)};a.prototype._multiplyBySmall=function(a){if(a.value===0)return e[0];if(a.value===1)return this;if(a.value===-1)return this.negate();return W(Math.abs(a.value),this.value,this.sign!==a.sign)};b.prototype.multiply=function(a){return f(a)._multiplyBySmall(this)};b.prototype.times=b.prototype.multiply;c.prototype.multiply=function(a){return new
c(this.value*f(a).value)};c.prototype.times=c.prototype.multiply;function
$(g){var
d=g.length,e=C(d+d),k=i,h,b,a,f,j;for(a=0;a<d;a++){f=g[a];b=0-f*f;for(var
c=a;c<d;c++){j=g[c];h=2*(f*j)+e[a+c]+b;b=Math.floor(h/k);e[a+c]=h-b*k}e[a+d]=b}s(e);return e}a.prototype.square=function(){return new
a($(this.value),false)};b.prototype.square=function(){var
c=this.value*this.value;if(q(c))return new
b(c);return new
a($(r(Math.abs(this.value))),false)};c.prototype.square=function(a){return new
c(this.value*this.value)};function
ad(q,k){var
r=q.length,g=k.length,f=i,s=C(k.length),l=k[g-1],o=Math.ceil(f/(2*l)),b=w(q,o),h=w(k,o),j,d,c,e,a,m,p;if(b.length<=r)b.push(0);h.push(0);l=h[g-1];for(d=r-g;d>=0;d--){j=f-1;if(b[d+g]!==l)j=Math.floor((b[d+g]*f+b[d+g-1])/l);c=0;e=0;m=h.length;for(a=0;a<m;a++){c+=j*h[a];p=Math.floor(c/f);e+=b[d+a]-(c-p*f);c=p;if(e<0){b[d+a]=e+f;e=-1}else{b[d+a]=e;e=0}}while(e!==0){j-=1;c=0;for(a=0;a<m;a++){c+=b[d+a]-f+h[a];if(c<0){b[d+a]=c+f;c=0}else{b[d+a]=c;c=1}}e+=c}s[d]=j}b=R(b,o)[0];return[n(s),n(b)]}function
ae(k,b){var
l=k.length,g=b.length,e=[],a=[],h=i,c,f,d,m,j;while(l){a.unshift(k[--l]);s(a);if(o(a,b)<0){e.push(0);continue}f=a.length;d=a[f-1]*h+a[f-2];m=b[g-1]*h+b[g-2];if(f>g)d=(d+1)*h;c=Math.ceil(d/m);do{j=w(b,c);if(o(j,a)<=0)break;c--}while(c);e.push(c);a=y(a,j)}e.reverse();return[n(e),n(a)]}function
R(h,e){var
f=h.length,g=C(f),j=i,a,d,b,c;b=0;for(a=f-1;a>=0;--a){c=b*j+h[a];d=t(c/e);b=c-d*e;g[a]=d|0}return[g,b|0]}function
l(g,w){var
m,j=f(w);if(H)return[new
c(g.value/j.value),new
c(g.value%j.value)];var
l=g.value,h=j.value,d;if(h===0)throw new
Error("Cannot divide by zero");if(g.isSmall){if(j.isSmall)return[new
b(t(l/h)),new
b(l%h)];return[e[0],g]}if(j.isSmall){if(h===1)return[g,e[0]];if(h==-1)return[g.negate(),e[0]];var
q=Math.abs(h);if(q<i){m=R(l,q);d=n(m[0]);var
p=m[1];if(g.sign)p=-p;if(typeof
d==="number"){if(g.sign!==j.sign)d=-d;return[new
b(d),new
b(p)]}return[new
a(d,g.sign!==j.sign),new
b(p)]}h=r(q)}var
s=o(l,h);if(s===-1)return[e[0],g];if(s===0)return[e[g.sign===j.sign?1:-1],e[0]];if(l.length+h.length<=200)m=ad(l,h);else
m=ae(l,h);d=m[0];var
v=g.sign!==j.sign,k=m[1],u=g.sign;if(typeof
d==="number"){if(v)d=-d;d=new
b(d)}else
d=new
a(d,v);if(typeof
k==="number"){if(u)k=-k;k=new
b(k)}else
k=new
a(k,u);return[d,k]}a.prototype.divmod=function(b){var
a=l(this,b);return{quotient:a[0],remainder:a[1]}};c.prototype.divmod=b.prototype.divmod=a.prototype.divmod;a.prototype.divide=function(a){return l(this,a)[0]};c.prototype.over=c.prototype.divide=function(a){return new
c(this.value/f(a).value)};b.prototype.over=b.prototype.divide=a.prototype.over=a.prototype.divide;a.prototype.mod=function(a){return l(this,a)[1]};c.prototype.mod=c.prototype.remainder=function(a){return new
c(this.value%f(a).value)};b.prototype.remainder=b.prototype.mod=a.prototype.remainder=a.prototype.mod;a.prototype.pow=function(j){var
c=f(j),d=this.value,a=c.value,i,g,h;if(a===0)return e[1];if(d===0)return e[0];if(d===1)return e[1];if(d===-1)return c.isEven()?e[1]:e[-1];if(c.sign)return e[0];if(!c.isSmall)throw new
Error("The exponent "+c.toString()+" is too large.");if(this.isSmall)if(q(i=Math.pow(d,a)))return new
b(t(i));g=this;h=e[1];while(true){if(a&1===1){h=h.times(g);--a}if(a===0)break;a/=2;g=g.square()}return h};b.prototype.pow=a.prototype.pow;c.prototype.pow=function(m){var
h=f(m),g=this.value,a=h.value,b=j(0),d=j(1),l=j(2);if(a===b)return e[1];if(g===b)return e[0];if(g===d)return e[1];if(g===j(-1))return h.isEven()?e[1]:e[-1];if(h.isNegative())return new
c(b);var
i=this,k=e[1];while(true){if((a&d)===d){k=k.times(i);--a}if(a===b)break;a/=l;i=i.square()}return k};a.prototype.modPow=function(a,b){a=f(a);b=f(b);if(b.isZero())throw new
Error("Cannot take modPow with modulus 0");var
d=e[1],c=this.mod(b);if(a.isNegative()){a=a.multiply(e[-1]);c=c.modInv(b)}while(a.isPositive()){if(c.isZero())return e[0];if(a.isOdd())d=d.multiply(c).mod(b);a=a.divide(2);c=c.square().mod(b)}return d};c.prototype.modPow=b.prototype.modPow=a.prototype.modPow;function
o(b,c){if(b.length!==c.length)return b.length>c.length?1:-1;for(var
a=b.length-1;a>=0;a--)if(b[a]!==c[a])return b[a]>c[a]?1:-1;return 0}a.prototype.compareAbs=function(d){var
a=f(d),b=this.value,c=a.value;if(a.isSmall)return 1;return o(b,c)};b.prototype.compareAbs=function(d){var
c=f(d),b=Math.abs(this.value),a=c.value;if(c.isSmall){a=Math.abs(a);return b===a?0:b>a?1:-1}return-1};c.prototype.compareAbs=function(c){var
a=this.value,b=f(c).value;a=a>=0?a:-a;b=b>=0?b:-b;return a===b?0:a>b?1:-1};a.prototype.compare=function(b){if(b===Infinity)return-1;if(b===-Infinity)return 1;var
a=f(b),c=this.value,d=a.value;if(this.sign!==a.sign)return a.sign?1:-1;if(a.isSmall)return this.sign?-1:1;return o(c,d)*(this.sign?-1:1)};a.prototype.compareTo=a.prototype.compare;b.prototype.compare=function(c){if(c===Infinity)return-1;if(c===-Infinity)return 1;var
b=f(c),a=this.value,d=b.value;if(b.isSmall)return a==d?0:a>d?1:-1;if(a<0!==b.sign)return a<0?-1:1;return a<0?1:-1};b.prototype.compareTo=b.prototype.compare;c.prototype.compare=function(a){if(a===Infinity)return-1;if(a===-Infinity)return 1;var
b=this.value,c=f(a).value;return b===c?0:b>c?1:-1};c.prototype.compareTo=c.prototype.compare;a.prototype.equals=function(a){return this.compare(a)===0};c.prototype.eq=c.prototype.equals=b.prototype.eq=b.prototype.equals=a.prototype.eq=a.prototype.equals;a.prototype.notEquals=function(a){return this.compare(a)!==0};c.prototype.neq=c.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=a.prototype.neq=a.prototype.notEquals;a.prototype.greater=function(a){return this.compare(a)>0};c.prototype.gt=c.prototype.greater=b.prototype.gt=b.prototype.greater=a.prototype.gt=a.prototype.greater;a.prototype.lesser=function(a){return this.compare(a)<0};c.prototype.lt=c.prototype.lesser=b.prototype.lt=b.prototype.lesser=a.prototype.lt=a.prototype.lesser;a.prototype.greaterOrEquals=function(a){return this.compare(a)>=0};c.prototype.geq=c.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals;a.prototype.lesserOrEquals=function(a){return this.compare(a)<=0};c.prototype.leq=c.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals;a.prototype.isEven=function(){return(this.value[0]&1)===0};b.prototype.isEven=function(){return(this.value&1)===0};c.prototype.isEven=function(){return(this.value&j(1))===j(0)};a.prototype.isOdd=function(){return(this.value[0]&1)===1};b.prototype.isOdd=function(){return(this.value&1)===1};c.prototype.isOdd=function(){return(this.value&j(1))===j(1)};a.prototype.isPositive=function(){return!this.sign};b.prototype.isPositive=function(){return this.value>0};c.prototype.isPositive=b.prototype.isPositive;a.prototype.isNegative=function(){return this.sign};b.prototype.isNegative=function(){return this.value<0};c.prototype.isNegative=b.prototype.isNegative;a.prototype.isUnit=function(){return false};b.prototype.isUnit=function(){return Math.abs(this.value)===1};c.prototype.isUnit=function(){return this.abs().value===j(1)};a.prototype.isZero=function(){return false};b.prototype.isZero=function(){return this.value===0};c.prototype.isZero=function(){return this.value===j(0)};a.prototype.isDivisibleBy=function(b){var
a=f(b);if(a.isZero())return false;if(a.isUnit())return true;if(a.compareAbs(2)===0)return this.isEven();return this.mod(a).isZero()};c.prototype.isDivisibleBy=b.prototype.isDivisibleBy=a.prototype.isDivisibleBy;function
U(b){var
a=b.abs();if(a.isUnit())return false;if(a.equals(2)||a.equals(3)||a.equals(5))return true;if(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))return false;if(a.lesser(49))return true}function
M(d,e){var
g=d.prev(),c=g,i=0,f,j,b,a;while(c.isEven())c=c.divide(2),i++;next:for(b=0;b<e.length;b++){if(d.lesser(e[b]))continue;a=h(e[b]).modPow(c,d);if(a.isUnit()||a.equals(g))continue;for(f=i-1;f!=0;f--){a=a.square().mod(d);if(a.isUnit())return false;if(a.equals(g))continue next}return false}return true}a.prototype.isPrime=function(g){var
e=U(this);if(e!==A)return e;var
b=this.abs(),d=b.bitLength();if(d<=64)return M(b,[2,3,5,7,11,13,17,19,23,29,31,37]);var
f=Math.log(2)*d.toJSNumber(),i=Math.ceil(g===true?2*Math.pow(f,2):f);for(var
c=[],a=0;a<i;a++)c.push(h(a+2));return M(b,c)};c.prototype.isPrime=b.prototype.isPrime=a.prototype.isPrime;a.prototype.isProbablePrime=function(d){var
c=U(this);if(c!==A)return c;var
e=this.abs(),f=d===A?5:d;for(var
a=[],b=0;b<f;b++)a.push(h.randBetween(2,e.minus(2)));return M(e,a)};c.prototype.isProbablePrime=b.prototype.isProbablePrime=a.prototype.isProbablePrime;a.prototype.modInv=function(d){var
a=h.zero,e=h.one,c=f(d),b=this.abs(),g,j,i;while(!b.isZero()){g=c.divide(b);j=a;i=c;a=e;c=b;e=j.subtract(g.multiply(e));b=i.subtract(g.multiply(b))}if(!c.isUnit())throw new
Error(this.toString()+" and "+d.toString()+" are not co-prime");if(a.compare(0)===-1)a=a.add(d);if(this.isNegative())return a.negate();return a};c.prototype.modInv=b.prototype.modInv=a.prototype.modInv;a.prototype.next=function(){var
b=this.value;if(this.sign)return F(b,1,this.sign);return new
a(B(b,1),this.sign)};b.prototype.next=function(){var
c=this.value;if(c+1<u)return new
b(c+1);return new
a(K,false)};c.prototype.next=function(){return new
c(this.value+j(1))};a.prototype.prev=function(){var
b=this.value;if(this.sign)return new
a(B(b,1),true);return F(b,1,this.sign)};b.prototype.prev=function(){var
c=this.value;if(c-1>-u)return new
b(c-1);return new
a(K,true)};c.prototype.prev=function(){return new
c(this.value-j(1))};var
k=[1];while(2*k[k.length-1]<=i)k.push(2*k[k.length-1]);var
x=k.length,m=k[x-1];function
_(a){return Math.abs(a)<=i}a.prototype.shiftLeft=function(c){var
a=f(c).toJSNumber();if(!_(a))throw new
Error(String(a)+ej);if(a<0)return this.shiftRight(-a);var
b=this;if(b.isZero())return b;while(a>=x){b=b.multiply(m);a-=x-1}return b.multiply(k[a])};c.prototype.shiftLeft=b.prototype.shiftLeft=a.prototype.shiftLeft;a.prototype.shiftRight=function(d){var
a,b=f(d).toJSNumber();if(!_(b))throw new
Error(String(b)+ej);if(b<0)return this.shiftLeft(-b);var
c=this;while(b>=x){if(c.isZero()||c.isNegative()&&c.isUnit())return c;a=l(c,m);c=a[1].isNegative()?a[0].prev():a[0];b-=x-1}a=l(c,k[b]);return a[1].isNegative()?a[0].prev():a[0]};c.prototype.shiftRight=b.prototype.shiftRight=a.prototype.shiftRight;function
L(i,a,r){a=f(a);var
n=i.isNegative(),q=a.isNegative(),k=n?i.not():i,p=q?a.not():a,b=0,c=0,j=null,o=null,e=[];while(!k.isZero()||!p.isZero()){j=l(k,m);b=j[1].toJSNumber();if(n)b=m-1-b;o=l(p,m);c=o[1].toJSNumber();if(q)c=m-1-c;k=j[0];p=o[0];e.push(r(b,c))}var
g=r(n?1:0,q?1:0)!==0?h(-1):h(0);for(var
d=e.length-1;d>=0;d-=1)g=g.multiply(m).add(h(e[d]));return g}a.prototype.not=function(){return this.negate().prev()};c.prototype.not=b.prototype.not=a.prototype.not;a.prototype.and=function(a){return L(this,a,function(a,b){return a&b})};c.prototype.and=b.prototype.and=a.prototype.and;a.prototype.or=function(a){return L(this,a,function(a,b){return a|b})};c.prototype.or=b.prototype.or=a.prototype.or;a.prototype.xor=function(a){return L(this,a,function(a,b){return a^b})};c.prototype.xor=b.prototype.xor=a.prototype.xor;var
I=1<<30,ab=(i&-i)*(i&-i)|I;function
E(c){var
a=c.value,b=typeof
a==="number"?a|I:typeof
a==="bigint"?a|j(I):a[0]+a[1]*i|ab;return b&-b}function
T(b,a){if(a.compareTo(b)<=0){var
f=T(b,a.square(a)),d=f.p,c=f.e,e=d.multiply(a);return e.compareTo(b)<=0?{p:e,e:c*2+1}:{p:d,e:c*2}}return{p:h(1),e:0}}a.prototype.bitLength=function(){var
a=this;if(a.compareTo(h(0))<0)a=a.negate().subtract(h(1));if(a.compareTo(h(0))===0)return h(0);return h(T(a,h(2)).e).add(h(1))};c.prototype.bitLength=b.prototype.bitLength=a.prototype.bitLength;function
V(a,b){a=f(a);b=f(b);return a.greater(b)?a:b}function
N(a,b){a=f(a);b=f(b);return a.lesser(b)?a:b}function
S(a,b){a=f(a).abs();b=f(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var
c=e[1],d,g;while(a.isEven()&&b.isEven()){d=N(E(a),E(b));a=a.divide(d);b=b.divide(d);c=c.multiply(d)}while(a.isEven())a=a.divide(E(a));do{while(b.isEven())b=b.divide(E(b));if(a.greater(b)){g=b;b=a;a=g}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function
ag(a,b){a=f(a).abs();b=f(b).abs();return a.divide(S(a,b)).multiply(b)}function
aj(a,b){a=f(a);b=f(b);var
d=N(a,b),n=V(a,b),g=n.subtract(d).add(1);if(g.isSmall)return d.add(Math.floor(Math.random()*g));var
j=z(g,i).value,l=[],k=true;for(var
c=0;c<j.length;c++){var
m=k?j[c]:i,h=t(Math.random()*m);l.push(h);if(h<m)k=false}return d.add(e.fromArray(l,i,false))}function
ah(b,g,d,k){d=d||P;b=String(b);if(!k){b=b.toLowerCase();d=d.toLowerCase()}var
l=b.length,a,i=Math.abs(g),e={};for(a=0;a<d.length;a++)e[d[a]]=a;for(a=0;a<l;a++){var
c=b[a];if(c===J)continue;if(c
in
e)if(e[c]>=i){if(c==="1"&&i===1)continue;throw new
Error(c+" is not a valid digit in base "+g+af)}}g=f(g);var
h=[],j=b[0]===J;for(a=j?1:0;a<b.length;a++){var
c=b[a];if(c
in
e)h.push(f(e[c]));else
if(c===cq){var
m=a;do
a++;while(b[a]!==bw&&a<b.length);h.push(f(b.slice(m+1,a)))}else
throw new
Error(c+" is not a valid character")}return X(h,g,j)}function
X(d,f,g){var
b=e[0],c=e[1],a;for(a=d.length-1;a>=0;a--){b=b.add(d[a].times(c));c=c.times(f)}return g?b.negate():b}function
ak(b,a){a=a||P;if(b<a.length)return a[b];return cq+b+bw}function
z(a,b){b=h(b);if(b.isZero()){if(a.isZero())return{value:[0],isNegative:false};throw new
Error("Cannot convert nonzero numbers to base 0.")}if(b.equals(-1)){if(a.isZero())return{value:[0],isNegative:false};if(a.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-a.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:false};var
i=Array.apply(null,Array(a.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);i.unshift([1]);return{value:[].concat.apply([],i),isNegative:false}}var
f=false;if(a.isNegative()&&b.isPositive()){f=true;a=a.abs()}if(b.isUnit()){if(a.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(a.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:f}}var
g=[],c=a,e;while(c.isNegative()||c.compareAbs(b)>=0){e=c.divmod(b);c=e.quotient;var
d=e.remainder;if(d.isNegative()){d=b.minus(d).abs();c=c.next()}g.push(d.toJSNumber())}g.push(c.toJSNumber());return{value:g.reverse(),isNegative:f}}function
aa(e,c,b){var
a=z(e,c);return(a.isNegative?J:d)+a.value.map(function(a){return ak(a,b)}).join(d)}a.prototype.toArray=function(a){return z(this,a)};b.prototype.toArray=function(a){return z(this,a)};c.prototype.toArray=function(a){return z(this,a)};a.prototype.toString=function(a,g){if(a===A)a=10;if(a!==10)return aa(this,a,g);var
e=this.value,c=e.length,f=String(e[--c]),i="0000000",b;while(--c>=0){b=String(e[c]);f+=i.slice(b.length)+b}var
h=this.sign?J:d;return h+f};b.prototype.toString=function(a,b){if(a===A)a=10;if(a!=10)return aa(this,a,b);return String(this.value)};c.prototype.toString=b.prototype.toString;c.prototype.toJSON=a.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()};a.prototype.valueOf=function(){return parseInt(this.toString(),10)};a.prototype.toJSNumber=a.prototype.valueOf;b.prototype.valueOf=function(){return this.value};b.prototype.toJSNumber=b.prototype.valueOf;c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function
Y(d){if(q(+d)){var
l=+d;if(l===t(l))return H?new
c(j(l)):new
b(l);throw new
Error(bp+d)}var
o=d[0]===J;if(o)d=d.slice(1);var
g=d.split(/e/i);if(g.length>2)throw new
Error(bp+g.join(bv));if(g.length===2){var
e=g[1];if(e[0]===au)e=e.slice(1);e=+e;if(e!==t(e)||!q(e))throw new
Error(bp+e+" is not a valid exponent.");var
f=g[0],h=f.indexOf(af);if(h>=0){e-=f.length-h-1;f=f.slice(0,h)+f.slice(h+1)}if(e<0)throw new
Error("Cannot include negative exponent part for integers");f+=new
Array(e+1).join(G);d=f}var
p=/^([0-9][0-9]*)$/.test(d);if(!p)throw new
Error(bp+d);if(H)return new
c(j(o?J+d:d));var
n=[],i=d.length,m=ac,k=i-m;while(i>0){n.push(+d.slice(k,i));k-=m;if(k<0)k=0;i-=m}s(n);return new
a(n,o)}function
ai(a){if(H)return new
c(j(a));if(q(a)){if(a!==t(a))throw new
Error(a+" is not an integer.");return new
b(a)}return Y(a.toString())}function
f(a){if(typeof
a==="number")return ai(a);if(typeof
a==="string")return Y(a);if(typeof
a==="bigint")return new
c(a);return a}for(var
p=0;p<aS;p++){e[p]=f(p);if(p>0)e[-p]=f(-p)}e.one=e[1];e.zero=e[0];e.minusOne=e[-1];e.max=V;e.min=N;e.gcd=S;e.lcm=ag;e.isInstance=function(d){return d
instanceof
a||d
instanceof