-
-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathcljs_SLASH_core$macros.js
11211 lines (10196 loc) · 795 KB
/
cljs_SLASH_core$macros.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
// Compiled by ClojureScript 1.9.946 {:static-fns true, :fn-invoke-direct true, :optimize-constants false}
goog.provide('cljs.core$macros');
goog.require('cljs.core');
goog.require('clojure.walk');
goog.require('clojure.set');
goog.require('clojure.string');
goog.require('cljs.compiler');
goog.require('cljs.env');
goog.require('cljs.core');
goog.require('cljs.analyzer');
var ret__10133__auto___21888 = (function (){
/**
* Threads the expr through the forms. Inserts x as the
* second item in the first form, making a list of it if it is not a
* list already. If there are more forms, inserts the first form as the
* second item in second form, etc.
*/
cljs.core$macros.__GT_ = (function cljs$core$macros$__GT_(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21889 = arguments.length;
var i__10088__auto___21890 = (0);
while(true){
if((i__10088__auto___21890 < len__10087__auto___21889)){
args__10094__auto__.push((arguments[i__10088__auto___21890]));
var G__21891 = (i__10088__auto___21890 + (1));
i__10088__auto___21890 = G__21891;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.__GT_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.__GT_.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,x,forms){
var x__$1 = x;
var forms__$1 = forms;
while(true){
if(cljs.core.truth_(forms__$1)){
var form = cljs.core.first(forms__$1);
var threaded = ((cljs.core.seq_QMARK_(form))?cljs.core.with_meta(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic((function (){var x__9762__auto__ = cljs.core.first(form);
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = x__$1;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.next(form)], 0)))),cljs.core.meta(form)):(function (){var x__9762__auto__ = form;
return cljs.core._conj((function (){var x__9762__auto____$1 = x__$1;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto____$1);
})(),x__9762__auto__);
})());
var G__21892 = threaded;
var G__21893 = cljs.core.next(forms__$1);
x__$1 = G__21892;
forms__$1 = G__21893;
continue;
} else {
return x__$1;
}
break;
}
});
cljs.core$macros.__GT_.cljs$lang$maxFixedArity = (3);
cljs.core$macros.__GT_.cljs$lang$applyTo = (function (seq21884){
var G__21885 = cljs.core.first(seq21884);
var seq21884__$1 = cljs.core.next(seq21884);
var G__21886 = cljs.core.first(seq21884__$1);
var seq21884__$2 = cljs.core.next(seq21884__$1);
var G__21887 = cljs.core.first(seq21884__$2);
var seq21884__$3 = cljs.core.next(seq21884__$2);
return cljs.core$macros.__GT_.cljs$core$IFn$_invoke$arity$variadic(G__21885,G__21886,G__21887,seq21884__$3);
});
return null;
})()
;
cljs.core$macros.__GT_.cljs$lang$macro = true;
var ret__10133__auto___21898 = (function (){
/**
* Threads the expr through the forms. Inserts x as the
* last item in the first form, making a list of it if it is not a
* list already. If there are more forms, inserts the first form as the
* last item in second form, etc.
*/
cljs.core$macros.__GT__GT_ = (function cljs$core$macros$__GT__GT_(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21899 = arguments.length;
var i__10088__auto___21900 = (0);
while(true){
if((i__10088__auto___21900 < len__10087__auto___21899)){
args__10094__auto__.push((arguments[i__10088__auto___21900]));
var G__21901 = (i__10088__auto___21900 + (1));
i__10088__auto___21900 = G__21901;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.__GT__GT_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.__GT__GT_.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,x,forms){
var x__$1 = x;
var forms__$1 = forms;
while(true){
if(cljs.core.truth_(forms__$1)){
var form = cljs.core.first(forms__$1);
var threaded = ((cljs.core.seq_QMARK_(form))?cljs.core.with_meta(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic((function (){var x__9762__auto__ = cljs.core.first(form);
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.next(form),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = x__$1;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0)))),cljs.core.meta(form)):(function (){var x__9762__auto__ = form;
return cljs.core._conj((function (){var x__9762__auto____$1 = x__$1;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto____$1);
})(),x__9762__auto__);
})());
var G__21902 = threaded;
var G__21903 = cljs.core.next(forms__$1);
x__$1 = G__21902;
forms__$1 = G__21903;
continue;
} else {
return x__$1;
}
break;
}
});
cljs.core$macros.__GT__GT_.cljs$lang$maxFixedArity = (3);
cljs.core$macros.__GT__GT_.cljs$lang$applyTo = (function (seq21894){
var G__21895 = cljs.core.first(seq21894);
var seq21894__$1 = cljs.core.next(seq21894);
var G__21896 = cljs.core.first(seq21894__$1);
var seq21894__$2 = cljs.core.next(seq21894__$1);
var G__21897 = cljs.core.first(seq21894__$2);
var seq21894__$3 = cljs.core.next(seq21894__$2);
return cljs.core$macros.__GT__GT_.cljs$core$IFn$_invoke$arity$variadic(G__21895,G__21896,G__21897,seq21894__$3);
});
return null;
})()
;
cljs.core$macros.__GT__GT_.cljs$lang$macro = true;
var ret__10133__auto___21911 = (function (){
/**
* form => fieldName-symbol or (instanceMethodName-symbol args*)
*
* Expands into a member access (.) of the first member on the first
* argument, followed by the next member on the result, etc. For
* instance:
*
* (.. System (getProperties) (get "os.name"))
*
* expands to:
*
* (. (. System (getProperties)) (get "os.name"))
*
* but is easier to write, read, and understand.
*/
cljs.core$macros._DOT__DOT_ = (function cljs$core$macros$_DOT__DOT_(var_args){
var G__21910 = arguments.length;
switch (G__21910) {
case 4:
return cljs.core$macros._DOT__DOT_.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
default:
var args_arr__10110__auto__ = [];
var len__10087__auto___21913 = arguments.length;
var i__10088__auto___21914 = (0);
while(true){
if((i__10088__auto___21914 < len__10087__auto___21913)){
args_arr__10110__auto__.push((arguments[i__10088__auto___21914]));
var G__21915 = (i__10088__auto___21914 + (1));
i__10088__auto___21914 = G__21915;
continue;
} else {
}
break;
}
var argseq__10111__auto__ = (new cljs.core.IndexedSeq(args_arr__10110__auto__.slice((4)),(0),null));
return cljs.core$macros._DOT__DOT_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),argseq__10111__auto__);
}
});
cljs.core$macros._DOT__DOT_.cljs$core$IFn$_invoke$arity$4 = (function (_AMPERSAND_form,_AMPERSAND_env,x,form){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,".",".",1975675962,null)),(function (){var x__9762__auto__ = x;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = form;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
});
cljs.core$macros._DOT__DOT_.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,x,form,more){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"..","..",-300507420,null)),(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,".",".",1975675962,null)),(function (){var x__9762__auto__ = x;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = form;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([more], 0))));
});
cljs.core$macros._DOT__DOT_.cljs$lang$applyTo = (function (seq21905){
var G__21906 = cljs.core.first(seq21905);
var seq21905__$1 = cljs.core.next(seq21905);
var G__21907 = cljs.core.first(seq21905__$1);
var seq21905__$2 = cljs.core.next(seq21905__$1);
var G__21908 = cljs.core.first(seq21905__$2);
var seq21905__$3 = cljs.core.next(seq21905__$2);
var G__21909 = cljs.core.first(seq21905__$3);
var seq21905__$4 = cljs.core.next(seq21905__$3);
return cljs.core$macros._DOT__DOT_.cljs$core$IFn$_invoke$arity$variadic(G__21906,G__21907,G__21908,G__21909,seq21905__$4);
});
cljs.core$macros._DOT__DOT_.cljs$lang$maxFixedArity = (4);
return null;
})()
;
cljs.core$macros._DOT__DOT_.cljs$lang$macro = true;
var ret__10133__auto___21919 = (function (){
/**
* Ignores body, yields nil
*/
cljs.core$macros.comment = (function cljs$core$macros$comment(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21920 = arguments.length;
var i__10088__auto___21921 = (0);
while(true){
if((i__10088__auto___21921 < len__10087__auto___21920)){
args__10094__auto__.push((arguments[i__10088__auto___21921]));
var G__21922 = (i__10088__auto___21921 + (1));
i__10088__auto___21921 = G__21922;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((2) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((2)),(0),null)):null);
return cljs.core$macros.comment.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__10095__auto__);
});
cljs.core$macros.comment.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,body){
return null;
});
cljs.core$macros.comment.cljs$lang$maxFixedArity = (2);
cljs.core$macros.comment.cljs$lang$applyTo = (function (seq21916){
var G__21917 = cljs.core.first(seq21916);
var seq21916__$1 = cljs.core.next(seq21916);
var G__21918 = cljs.core.first(seq21916__$1);
var seq21916__$2 = cljs.core.next(seq21916__$1);
return cljs.core$macros.comment.cljs$core$IFn$_invoke$arity$variadic(G__21917,G__21918,seq21916__$2);
});
return null;
})()
;
cljs.core$macros.comment.cljs$lang$macro = true;
var ret__10133__auto___21926 = (function (){
/**
* Takes a set of test/expr pairs. It evaluates each test one at a
* time. If a test returns logical true, cond evaluates and returns
* the value of the corresponding expr and doesn't evaluate any of the
* other tests or exprs. (cond) returns nil.
*/
cljs.core$macros.cond = (function cljs$core$macros$cond(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21927 = arguments.length;
var i__10088__auto___21928 = (0);
while(true){
if((i__10088__auto___21928 < len__10087__auto___21927)){
args__10094__auto__.push((arguments[i__10088__auto___21928]));
var G__21929 = (i__10088__auto___21928 + (1));
i__10088__auto___21928 = G__21929;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((2) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((2)),(0),null)):null);
return cljs.core$macros.cond.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__10095__auto__);
});
cljs.core$macros.cond.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,clauses){
if(cljs.core.truth_(clauses)){
return cljs.core._conj((function (){var x__9762__auto__ = cljs.core.first(clauses);
return cljs.core._conj((function (){var x__9762__auto____$1 = ((cljs.core.next(clauses))?cljs.core.second(clauses):(function(){throw (new Error("cond requires an even number of forms"))})());
return cljs.core._conj((function (){var x__9762__auto____$2 = cljs.core.cons(new cljs.core.Symbol("cljs.core","cond","cljs.core/cond",2005388338,null),cljs.core.next(cljs.core.next(clauses)));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto____$2);
})(),x__9762__auto____$1);
})(),x__9762__auto__);
})(),new cljs.core.Symbol(null,"if","if",1181717262,null));
} else {
return null;
}
});
cljs.core$macros.cond.cljs$lang$maxFixedArity = (2);
cljs.core$macros.cond.cljs$lang$applyTo = (function (seq21923){
var G__21924 = cljs.core.first(seq21923);
var seq21923__$1 = cljs.core.next(seq21923);
var G__21925 = cljs.core.first(seq21923__$1);
var seq21923__$2 = cljs.core.next(seq21923__$1);
return cljs.core$macros.cond.cljs$core$IFn$_invoke$arity$variadic(G__21924,G__21925,seq21923__$2);
});
return null;
})()
;
cljs.core$macros.cond.cljs$lang$macro = true;
var ret__10133__auto___21934 = (function (){
/**
* defs the supplied var names with no bindings, useful for making forward declarations.
*/
cljs.core$macros.declare = (function cljs$core$macros$declare(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21935 = arguments.length;
var i__10088__auto___21936 = (0);
while(true){
if((i__10088__auto___21936 < len__10087__auto___21935)){
args__10094__auto__.push((arguments[i__10088__auto___21936]));
var G__21937 = (i__10088__auto___21936 + (1));
i__10088__auto___21936 = G__21937;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((2) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((2)),(0),null)):null);
return cljs.core$macros.declare.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__10095__auto__);
});
cljs.core$macros.declare.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,names){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"do","do",1686842252,null)),cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__21930_SHARP_){
return cljs.core._conj((function (){var x__9762__auto__ = cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$4(p1__21930_SHARP_,cljs.core.assoc,new cljs.core.Keyword(null,"declared","declared",92336021),true);
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),new cljs.core.Symbol(null,"def","def",597100991,null));
}),names))));
});
cljs.core$macros.declare.cljs$lang$maxFixedArity = (2);
cljs.core$macros.declare.cljs$lang$applyTo = (function (seq21931){
var G__21932 = cljs.core.first(seq21931);
var seq21931__$1 = cljs.core.next(seq21931);
var G__21933 = cljs.core.first(seq21931__$1);
var seq21931__$2 = cljs.core.next(seq21931__$1);
return cljs.core$macros.declare.cljs$core$IFn$_invoke$arity$variadic(G__21932,G__21933,seq21931__$2);
});
return null;
})()
;
cljs.core$macros.declare.cljs$lang$macro = true;
var ret__10133__auto___21942 = (function (){
/**
* Evaluates x then calls all of the methods and functions with the
* value of x supplied at the front of the given arguments. The forms
* are evaluated in order. Returns x.
*
* (doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
*/
cljs.core$macros.doto = (function cljs$core$macros$doto(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21943 = arguments.length;
var i__10088__auto___21944 = (0);
while(true){
if((i__10088__auto___21944 < len__10087__auto___21943)){
args__10094__auto__.push((arguments[i__10088__auto___21944]));
var G__21945 = (i__10088__auto___21944 + (1));
i__10088__auto___21944 = G__21945;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.doto.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.doto.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,x,forms){
var gx = cljs.core.gensym.cljs$core$IFn$_invoke$arity$0();
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","let","cljs.core$macros/let",-160286726,null)),(function (){var x__9762__auto__ = cljs.core.vec(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2((function (){var x__9762__auto__ = gx;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = x;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (gx){
return (function (f){
if(cljs.core.seq_QMARK_(f)){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic((function (){var x__9762__auto__ = cljs.core.first(f);
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = gx;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.next(f)], 0))));
} else {
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2((function (){var x__9762__auto__ = f;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = gx;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})())));
}
});})(gx))
,forms),(function (){var x__9762__auto__ = gx;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
});
cljs.core$macros.doto.cljs$lang$maxFixedArity = (3);
cljs.core$macros.doto.cljs$lang$applyTo = (function (seq21938){
var G__21939 = cljs.core.first(seq21938);
var seq21938__$1 = cljs.core.next(seq21938);
var G__21940 = cljs.core.first(seq21938__$1);
var seq21938__$2 = cljs.core.next(seq21938__$1);
var G__21941 = cljs.core.first(seq21938__$2);
var seq21938__$3 = cljs.core.next(seq21938__$2);
return cljs.core$macros.doto.cljs$core$IFn$_invoke$arity$variadic(G__21939,G__21940,G__21941,seq21938__$3);
});
return null;
})()
;
cljs.core$macros.doto.cljs$lang$macro = true;
cljs.core$macros.parse_impls = (function cljs$core$macros$parse_impls(specs){
var ret = cljs.core.PersistentArrayMap.EMPTY;
var s = specs;
while(true){
if(cljs.core.seq(s)){
var G__21946 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret,cljs.core.first(s),cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(cljs.core.seq_QMARK_,cljs.core.next(s)));
var G__21947 = cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2(cljs.core.seq_QMARK_,cljs.core.next(s));
ret = G__21946;
s = G__21947;
continue;
} else {
return ret;
}
break;
}
});
cljs.core$macros.emit_extend_protocol = (function cljs$core$macros$emit_extend_protocol(p,specs){
var impls = cljs.core$macros.parse_impls(specs);
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"do","do",1686842252,null)),cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (impls){
return (function (p__21948){
var vec__21949 = p__21948;
var t = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__21949,(0),null);
var fs = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__21949,(1),null);
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","extend-type","cljs.core$macros/extend-type",1713295201,null)),(function (){var x__9762__auto__ = t;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = p;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),fs], 0))));
});})(impls))
,impls))));
});
var ret__10133__auto___21956 = (function (){
/**
* Useful when you want to provide several implementations of the same
* protocol all at once. Takes a single protocol and the implementation
* of that protocol for one or more types. Expands into calls to
* extend-type:
*
* (extend-protocol Protocol
* AType
* (foo [x] ...)
* (bar [x y] ...)
* BType
* (foo [x] ...)
* (bar [x y] ...)
* AClass
* (foo [x] ...)
* (bar [x y] ...)
* nil
* (foo [x] ...)
* (bar [x y] ...))
*
* expands into:
*
* (do
* (clojure.core/extend-type AType Protocol
* (foo [x] ...)
* (bar [x y] ...))
* (clojure.core/extend-type BType Protocol
* (foo [x] ...)
* (bar [x y] ...))
* (clojure.core/extend-type AClass Protocol
* (foo [x] ...)
* (bar [x y] ...))
* (clojure.core/extend-type nil Protocol
* (foo [x] ...)
* (bar [x y] ...)))
*/
cljs.core$macros.extend_protocol = (function cljs$core$macros$extend_protocol(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21957 = arguments.length;
var i__10088__auto___21958 = (0);
while(true){
if((i__10088__auto___21958 < len__10087__auto___21957)){
args__10094__auto__.push((arguments[i__10088__auto___21958]));
var G__21959 = (i__10088__auto___21958 + (1));
i__10088__auto___21958 = G__21959;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.extend_protocol.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.extend_protocol.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,p,specs){
return cljs.core$macros.emit_extend_protocol(p,specs);
});
cljs.core$macros.extend_protocol.cljs$lang$maxFixedArity = (3);
cljs.core$macros.extend_protocol.cljs$lang$applyTo = (function (seq21952){
var G__21953 = cljs.core.first(seq21952);
var seq21952__$1 = cljs.core.next(seq21952);
var G__21954 = cljs.core.first(seq21952__$1);
var seq21952__$2 = cljs.core.next(seq21952__$1);
var G__21955 = cljs.core.first(seq21952__$2);
var seq21952__$3 = cljs.core.next(seq21952__$2);
return cljs.core$macros.extend_protocol.cljs$core$IFn$_invoke$arity$variadic(G__21953,G__21954,G__21955,seq21952__$3);
});
return null;
})()
;
cljs.core$macros.extend_protocol.cljs$lang$macro = true;
cljs.core$macros.maybe_destructured = (function cljs$core$macros$maybe_destructured(params,body){
if(cljs.core.every_QMARK_(cljs.core.symbol_QMARK_,params)){
return cljs.core.cons(params,body);
} else {
var params__$1 = params;
var new_params = cljs.core.with_meta(cljs.core.PersistentVector.EMPTY,cljs.core.meta(params__$1));
var lets = cljs.core.PersistentVector.EMPTY;
while(true){
if(cljs.core.truth_(params__$1)){
if((cljs.core.first(params__$1) instanceof cljs.core.Symbol)){
var G__21960 = cljs.core.next(params__$1);
var G__21961 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(new_params,cljs.core.first(params__$1));
var G__21962 = lets;
params__$1 = G__21960;
new_params = G__21961;
lets = G__21962;
continue;
} else {
var gparam = cljs.core.gensym.cljs$core$IFn$_invoke$arity$1("p__");
var G__21963 = cljs.core.next(params__$1);
var G__21964 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(new_params,gparam);
var G__21965 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.conj.cljs$core$IFn$_invoke$arity$2(lets,cljs.core.first(params__$1)),gparam);
params__$1 = G__21963;
new_params = G__21964;
lets = G__21965;
continue;
}
} else {
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2((function (){var x__9762__auto__ = new_params;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","let","cljs.core$macros/let",-160286726,null)),(function (){var x__9762__auto__ = lets;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([body], 0))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})())));
}
break;
}
}
});
var ret__10133__auto___21972 = (function (){
/**
* params => positional-params* , or positional-params* & next-param
* positional-param => binding-form
* next-param => binding-form
* name => symbol
*
* Defines a function
*/
cljs.core$macros.fn = (function cljs$core$macros$fn(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21973 = arguments.length;
var i__10088__auto___21974 = (0);
while(true){
if((i__10088__auto___21974 < len__10087__auto___21973)){
args__10094__auto__.push((arguments[i__10088__auto___21974]));
var G__21975 = (i__10088__auto___21974 + (1));
i__10088__auto___21974 = G__21975;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((2) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((2)),(0),null)):null);
return cljs.core$macros.fn.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__10095__auto__);
});
cljs.core$macros.fn.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,sigs){
var name = (((cljs.core.first(sigs) instanceof cljs.core.Symbol))?cljs.core.first(sigs):null);
var sigs__$1 = (cljs.core.truth_(name)?cljs.core.next(sigs):sigs);
var sigs__$2 = ((cljs.core.vector_QMARK_(cljs.core.first(sigs__$1)))?(function (){var x__9762__auto__ = sigs__$1;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})():((cljs.core.seq_QMARK_(cljs.core.first(sigs__$1)))?sigs__$1:(function(){throw (new Error(((cljs.core.seq(sigs__$1))?["Parameter declaration ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.first(sigs__$1))," should be a vector"].join(''):["Parameter declaration missing"].join(''))))})()));
var psig = ((function (name,sigs__$1,sigs__$2){
return (function (sig){
if(!(cljs.core.seq_QMARK_(sig))){
throw (new Error(["Invalid signature ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(sig)," should be a list"].join('')));
} else {
}
var vec__21969 = sig;
var seq__21970 = cljs.core.seq(vec__21969);
var first__21971 = cljs.core.first(seq__21970);
var seq__21970__$1 = cljs.core.next(seq__21970);
var params = first__21971;
var body = seq__21970__$1;
var _ = ((!(cljs.core.vector_QMARK_(params)))?(function(){throw (new Error(((cljs.core.seq_QMARK_(cljs.core.first(sigs__$2)))?["Parameter declaration ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(params)," should be a vector"].join(''):["Invalid signature ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(sig)," should be a list"].join(''))))})():null);
var conds = (((cljs.core.next(body)) && (cljs.core.map_QMARK_(cljs.core.first(body))))?cljs.core.first(body):null);
var body__$1 = (cljs.core.truth_(conds)?cljs.core.next(body):body);
var conds__$1 = (function (){var or__8808__auto__ = conds;
if(cljs.core.truth_(or__8808__auto__)){
return or__8808__auto__;
} else {
return cljs.core.meta(params);
}
})();
var pre = new cljs.core.Keyword(null,"pre","pre",2118456869).cljs$core$IFn$_invoke$arity$1(conds__$1);
var post = new cljs.core.Keyword(null,"post","post",269697687).cljs$core$IFn$_invoke$arity$1(conds__$1);
var body__$2 = (cljs.core.truth_(post)?cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$1((function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","let","cljs.core$macros/let",-160286726,null)),(function (){var x__9762__auto__ = cljs.core.vec(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"%","%",-950237169,null)),(function (){var x__9762__auto__ = ((((1) < cljs.core.count(body__$1)))?cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"do","do",1686842252,null)),body__$1))):cljs.core.first(body__$1));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (vec__21969,seq__21970,first__21971,seq__21970__$1,params,body,_,conds,body__$1,conds__$1,pre,post,name,sigs__$1,sigs__$2){
return (function (c){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","assert","cljs.core$macros/assert",1333198789,null)),(function (){var x__9762__auto__ = c;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})())));
});})(vec__21969,seq__21970,first__21971,seq__21970__$1,params,body,_,conds,body__$1,conds__$1,pre,post,name,sigs__$1,sigs__$2))
,post),cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"%","%",-950237169,null))], 0))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()))):body__$1);
var body__$3 = (cljs.core.truth_(pre)?cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (vec__21969,seq__21970,first__21971,seq__21970__$1,params,body,_,conds,body__$1,conds__$1,pre,post,body__$2,name,sigs__$1,sigs__$2){
return (function (c){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","assert","cljs.core$macros/assert",1333198789,null)),(function (){var x__9762__auto__ = c;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})())));
});})(vec__21969,seq__21970,first__21971,seq__21970__$1,params,body,_,conds,body__$1,conds__$1,pre,post,body__$2,name,sigs__$1,sigs__$2))
,pre),body__$2):body__$2);
return cljs.core$macros.maybe_destructured(params,body__$3);
});})(name,sigs__$1,sigs__$2))
;
var new_sigs = cljs.core.map.cljs$core$IFn$_invoke$arity$2(psig,sigs__$2);
return cljs.core.with_meta((cljs.core.truth_(name)?cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3(new cljs.core.Symbol(null,"fn*","fn*",-752876845,null),name,new_sigs):cljs.core.cons(new cljs.core.Symbol(null,"fn*","fn*",-752876845,null),new_sigs)),cljs.core.meta(_AMPERSAND_form));
});
cljs.core$macros.fn.cljs$lang$maxFixedArity = (2);
cljs.core$macros.fn.cljs$lang$applyTo = (function (seq21966){
var G__21967 = cljs.core.first(seq21966);
var seq21966__$1 = cljs.core.next(seq21966);
var G__21968 = cljs.core.first(seq21966__$1);
var seq21966__$2 = cljs.core.next(seq21966__$1);
return cljs.core$macros.fn.cljs$core$IFn$_invoke$arity$variadic(G__21967,G__21968,seq21966__$2);
});
return null;
})()
;
cljs.core$macros.fn.cljs$lang$macro = true;
var ret__10133__auto___21980 = (function (){
/**
* same as defn, yielding non-public def
*/
cljs.core$macros.defn_ = (function cljs$core$macros$defn_(var_args){
var args__10094__auto__ = [];
var len__10087__auto___21981 = arguments.length;
var i__10088__auto___21982 = (0);
while(true){
if((i__10088__auto___21982 < len__10087__auto___21981)){
args__10094__auto__.push((arguments[i__10088__auto___21982]));
var G__21983 = (i__10088__auto___21982 + (1));
i__10088__auto___21982 = G__21983;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.defn_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.defn_.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,name,decls){
return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3(new cljs.core.Symbol("cljs.core$macros","defn","cljs.core$macros/defn",-728332354,null),cljs.core.with_meta(name,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.meta(name),new cljs.core.Keyword(null,"private","private",-558947994),true)),decls);
});
cljs.core$macros.defn_.cljs$lang$maxFixedArity = (3);
cljs.core$macros.defn_.cljs$lang$applyTo = (function (seq21976){
var G__21977 = cljs.core.first(seq21976);
var seq21976__$1 = cljs.core.next(seq21976);
var G__21978 = cljs.core.first(seq21976__$1);
var seq21976__$2 = cljs.core.next(seq21976__$1);
var G__21979 = cljs.core.first(seq21976__$2);
var seq21976__$3 = cljs.core.next(seq21976__$2);
return cljs.core$macros.defn_.cljs$core$IFn$_invoke$arity$variadic(G__21977,G__21978,G__21979,seq21976__$3);
});
return null;
})()
;
cljs.core$macros.defn_.cljs$lang$macro = true;
var ret__10133__auto___21993 = (function (){
/**
* bindings => binding-form test
*
* If test is true, evaluates then with binding-form bound to the value of
* test, if not, yields else
*/
cljs.core$macros.if_let = (function cljs$core$macros$if_let(var_args){
var G__21992 = arguments.length;
switch (G__21992) {
case 4:
return cljs.core$macros.if_let.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
default:
var args_arr__10110__auto__ = [];
var len__10087__auto___21995 = arguments.length;
var i__10088__auto___21996 = (0);
while(true){
if((i__10088__auto___21996 < len__10087__auto___21995)){
args_arr__10110__auto__.push((arguments[i__10088__auto___21996]));
var G__21997 = (i__10088__auto___21996 + (1));
i__10088__auto___21996 = G__21997;
continue;
} else {
}
break;
}
var argseq__10111__auto__ = (new cljs.core.IndexedSeq(args_arr__10110__auto__.slice((5)),(0),null));
return cljs.core$macros.if_let.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),argseq__10111__auto__);
}
});
cljs.core$macros.if_let.cljs$core$IFn$_invoke$arity$4 = (function (_AMPERSAND_form,_AMPERSAND_env,bindings,then){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","if-let","cljs.core$macros/if-let",1291543946,null)),(function (){var x__9762__auto__ = bindings;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = then;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core._conj(cljs.core.List.EMPTY,null)], 0))));
});
cljs.core$macros.if_let.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,bindings,then,else$,oldform){
if(cljs.core.vector_QMARK_(bindings)){
} else {
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2("if-let requires a vector for its binding",cljs.core.PersistentArrayMap.EMPTY);
}
if(cljs.core.empty_QMARK_(oldform)){
} else {
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2("if-let requires 1 or 2 forms after binding vector",cljs.core.PersistentArrayMap.EMPTY);
}
if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((2),cljs.core.count(bindings))){
} else {
throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2("if-let requires exactly 2 forms in binding vector",cljs.core.PersistentArrayMap.EMPTY);
}
var form = (bindings.cljs$core$IFn$_invoke$arity$1 ? bindings.cljs$core$IFn$_invoke$arity$1((0)) : bindings((0)));
var tst = (bindings.cljs$core$IFn$_invoke$arity$1 ? bindings.cljs$core$IFn$_invoke$arity$1((1)) : bindings((1)));
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","let","cljs.core$macros/let",-160286726,null)),(function (){var x__9762__auto__ = cljs.core.vec(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"temp__21984__auto__","temp__21984__auto__",1944888127,null)),(function (){var x__9762__auto__ = tst;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"if","if",1181717262,null)),cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"temp__21984__auto__","temp__21984__auto__",1944888127,null)),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","let","cljs.core$macros/let",-160286726,null)),(function (){var x__9762__auto__ = cljs.core.vec(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2((function (){var x__9762__auto__ = form;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"temp__21984__auto__","temp__21984__auto__",1944888127,null))))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = then;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = else$;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
});
cljs.core$macros.if_let.cljs$lang$applyTo = (function (seq21986){
var G__21987 = cljs.core.first(seq21986);
var seq21986__$1 = cljs.core.next(seq21986);
var G__21988 = cljs.core.first(seq21986__$1);
var seq21986__$2 = cljs.core.next(seq21986__$1);
var G__21989 = cljs.core.first(seq21986__$2);
var seq21986__$3 = cljs.core.next(seq21986__$2);
var G__21990 = cljs.core.first(seq21986__$3);
var seq21986__$4 = cljs.core.next(seq21986__$3);
var G__21991 = cljs.core.first(seq21986__$4);
var seq21986__$5 = cljs.core.next(seq21986__$4);
return cljs.core$macros.if_let.cljs$core$IFn$_invoke$arity$variadic(G__21987,G__21988,G__21989,G__21990,G__21991,seq21986__$5);
});
cljs.core$macros.if_let.cljs$lang$maxFixedArity = (5);
return null;
})()
;
cljs.core$macros.if_let.cljs$lang$macro = true;
var ret__10133__auto___22000 = (function (){
/**
* Evaluates test. If logical false, evaluates and returns then expr,
* otherwise else expr, if supplied, else nil.
*/
cljs.core$macros.if_not = (function cljs$core$macros$if_not(var_args){
var G__21999 = arguments.length;
switch (G__21999) {
case 4:
return cljs.core$macros.if_not.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]));
break;
case 5:
return cljs.core$macros.if_not.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]));
break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((arguments.length - (2)))].join('')));
}
});
cljs.core$macros.if_not.cljs$core$IFn$_invoke$arity$4 = (function (_AMPERSAND_form,_AMPERSAND_env,test,then){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","if-not","cljs.core$macros/if-not",-1825285737,null)),(function (){var x__9762__auto__ = test;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = then;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core._conj(cljs.core.List.EMPTY,null)], 0))));
});
cljs.core$macros.if_not.cljs$core$IFn$_invoke$arity$5 = (function (_AMPERSAND_form,_AMPERSAND_env,test,then,else$){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"if","if",1181717262,null)),(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core","not","cljs.core/not",100665144,null)),(function (){var x__9762__auto__ = test;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})())));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = then;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),(function (){var x__9762__auto__ = else$;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
});
cljs.core$macros.if_not.cljs$lang$maxFixedArity = 5;
return null;
})()
;
cljs.core$macros.if_not.cljs$lang$macro = true;
var ret__10133__auto___22007 = (function (){
/**
* fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+)
*
* Takes a vector of function specs and a body, and generates a set of
* bindings of functions to their names. All of the names are available
* in all of the definitions of the functions, as well as the body.
*/
cljs.core$macros.letfn = (function cljs$core$macros$letfn(var_args){
var args__10094__auto__ = [];
var len__10087__auto___22008 = arguments.length;
var i__10088__auto___22009 = (0);
while(true){
if((i__10088__auto___22009 < len__10087__auto___22008)){
args__10094__auto__.push((arguments[i__10088__auto___22009]));
var G__22010 = (i__10088__auto___22009 + (1));
i__10088__auto___22009 = G__22010;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.letfn.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.letfn.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,fnspecs,body){
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,"letfn*","letfn*",-110097810,null)),(function (){var x__9762__auto__ = cljs.core.vec(cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.first,fnspecs),cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__22002_SHARP_){
return cljs.core.cons(new cljs.core.Symbol("cljs.core$macros","fn","cljs.core$macros/fn",-187522821,null),p1__22002_SHARP_);
}),fnspecs)));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([body], 0))));
});
cljs.core$macros.letfn.cljs$lang$maxFixedArity = (3);
cljs.core$macros.letfn.cljs$lang$applyTo = (function (seq22003){
var G__22004 = cljs.core.first(seq22003);
var seq22003__$1 = cljs.core.next(seq22003);
var G__22005 = cljs.core.first(seq22003__$1);
var seq22003__$2 = cljs.core.next(seq22003__$1);
var G__22006 = cljs.core.first(seq22003__$2);
var seq22003__$3 = cljs.core.next(seq22003__$2);
return cljs.core$macros.letfn.cljs$core$IFn$_invoke$arity$variadic(G__22004,G__22005,G__22006,seq22003__$3);
});
return null;
})()
;
cljs.core$macros.letfn.cljs$lang$macro = true;
var ret__10133__auto___22015 = (function (){
/**
* Expands into code that creates a fn that expects to be passed an
* object and any args and calls the named instance method on the
* object passing the args. Use when you want to treat a JavaScript
* method as a first-class fn.
*/
cljs.core$macros.memfn = (function cljs$core$macros$memfn(var_args){
var args__10094__auto__ = [];
var len__10087__auto___22016 = arguments.length;
var i__10088__auto___22017 = (0);
while(true){
if((i__10088__auto___22017 < len__10087__auto___22016)){
args__10094__auto__.push((arguments[i__10088__auto___22017]));
var G__22018 = (i__10088__auto___22017 + (1));
i__10088__auto___22017 = G__22018;
continue;
} else {
}
break;
}
var argseq__10095__auto__ = ((((3) < args__10094__auto__.length))?(new cljs.core.IndexedSeq(args__10094__auto__.slice((3)),(0),null)):null);
return cljs.core$macros.memfn.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__10095__auto__);
});
cljs.core$macros.memfn.cljs$core$IFn$_invoke$arity$variadic = (function (_AMPERSAND_form,_AMPERSAND_env,name,args){
var t = cljs.core.with_meta(cljs.core.gensym.cljs$core$IFn$_invoke$arity$1("target"),cljs.core.meta(name));
return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol("cljs.core$macros","fn","cljs.core$macros/fn",-187522821,null)),(function (){var x__9762__auto__ = cljs.core.vec(cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2((function (){var x__9762__auto__ = t;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),args))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(cljs.core._conj(cljs.core.List.EMPTY,new cljs.core.Symbol(null,".",".",1975675962,null)),(function (){var x__9762__auto__ = t;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([(function (){var x__9762__auto__ = cljs.core.sequence.cljs$core$IFn$_invoke$arity$1(cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2((function (){var x__9762__auto__ = name;
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})(),args)));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
return cljs.core._conj(cljs.core.List.EMPTY,x__9762__auto__);
})()], 0))));
});
cljs.core$macros.memfn.cljs$lang$maxFixedArity = (3);