goog.provide('applied_science.js_interop');
applied_science.js_interop.unchecked_set = (function applied_science$js_interop$unchecked_set(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54289 = arguments.length;
var i__5750__auto___54290 = (0);
while(true){
if((i__5750__auto___54290 < len__5749__auto___54289)){
args__5755__auto__.push((arguments[i__5750__auto___54290]));

var G__54291 = (i__5750__auto___54290 + (1));
i__5750__auto___54290 = G__54291;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return applied_science.js_interop.unchecked_set.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});

(applied_science.js_interop.unchecked_set.cljs$core$IFn$_invoke$arity$variadic = (function (obj,keyvals){
var G__53959_54295 = keyvals;
var vec__53961_54296 = G__53959_54295;
var seq__53962_54297 = cljs.core.seq(vec__53961_54296);
var first__53963_54298 = cljs.core.first(seq__53962_54297);
var seq__53962_54299__$1 = cljs.core.next(seq__53962_54297);
var k_54300 = first__53963_54298;
var first__53963_54301__$1 = cljs.core.first(seq__53962_54299__$1);
var seq__53962_54302__$2 = cljs.core.next(seq__53962_54299__$1);
var v_54303 = first__53963_54301__$1;
var keyvals_54304__$1 = seq__53962_54302__$2;
var G__53959_54307__$1 = G__53959_54295;
while(true){
var vec__53964_54308 = G__53959_54307__$1;
var seq__53965_54309 = cljs.core.seq(vec__53964_54308);
var first__53966_54310 = cljs.core.first(seq__53965_54309);
var seq__53965_54311__$1 = cljs.core.next(seq__53965_54309);
var k_54312__$1 = first__53966_54310;
var first__53966_54313__$1 = cljs.core.first(seq__53965_54311__$1);
var seq__53965_54314__$2 = cljs.core.next(seq__53965_54311__$1);
var v_54315__$1 = first__53966_54313__$1;
var keyvals_54316__$2 = seq__53965_54314__$2;
(obj[applied_science.js_interop.impl.wrap_key(k_54312__$1)] = v_54315__$1);

if(keyvals_54316__$2){
var G__54317 = keyvals_54316__$2;
G__53959_54307__$1 = G__54317;
continue;
} else {
}
break;
}

return obj;
}));

(applied_science.js_interop.unchecked_set.cljs$lang$maxFixedArity = (1));

/** @this {Function} */
(applied_science.js_interop.unchecked_set.cljs$lang$applyTo = (function (seq53949){
var G__53950 = cljs.core.first(seq53949);
var seq53949__$1 = cljs.core.next(seq53949);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__53950,seq53949__$1);
}));

applied_science.js_interop.unchecked_get = (function applied_science$js_interop$unchecked_get(obj,k){
return (obj[applied_science.js_interop.impl.wrap_key(k)]);
});
/**
 * Returns the value mapped to key, not-found or nil if key not present.
 * 
 *   ```
 *   (j/get o :k)
 *   (j/get o .-k)
 *   ```
 */
applied_science.js_interop.get = (function applied_science$js_interop$get(var_args){
var G__53972 = arguments.length;
switch (G__53972) {
case 1:
return applied_science.js_interop.get.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return applied_science.js_interop.get.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
case 3:
return applied_science.js_interop.get.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));

break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));

}
});

(applied_science.js_interop.get.cljs$core$IFn$_invoke$arity$1 = (function (k){
return (function (obj){
var obj53978 = obj;
if((!((obj53978 == null)))){
return (obj53978[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
});
}));

(applied_science.js_interop.get.cljs$core$IFn$_invoke$arity$2 = (function (obj,k){
var obj53981 = obj;
if((!((obj53981 == null)))){
return (obj53981[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
}));

(applied_science.js_interop.get.cljs$core$IFn$_invoke$arity$3 = (function (obj,k,not_found){
var val__53520__auto__ = (function (){var obj53983 = obj;
if((!((obj53983 == null)))){
return (obj53983[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
})();
if((void 0 === val__53520__auto__)){
return not_found;
} else {
return val__53520__auto__;
}
}));

(applied_science.js_interop.get.cljs$lang$maxFixedArity = 3);

/**
 * Returns the value in a nested object structure, where ks is
 * a sequence of keys. Returns nil if the key is not present,
 * or the not-found value if supplied.
 * 
 * ```
 * (j/get-in o [:x :y] :fallback-value)
 * (j/get-in o [.-x .-y] :fallback-value)
 * ```
 */
applied_science.js_interop.get_in = (function applied_science$js_interop$get_in(var_args){
var G__53990 = arguments.length;
switch (G__53990) {
case 1:
return applied_science.js_interop.get_in.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return applied_science.js_interop.get_in.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
case 3:
return applied_science.js_interop.get_in.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)]));

break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));

}
});

(applied_science.js_interop.get_in.cljs$core$IFn$_invoke$arity$1 = (function (ks){
var ks__$1 = cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks);
return (function (obj){
return applied_science.js_interop.impl.get_in_STAR_.cljs$core$IFn$_invoke$arity$2(obj,ks__$1);
});
}));

(applied_science.js_interop.get_in.cljs$core$IFn$_invoke$arity$2 = (function (obj,ks){
return applied_science.js_interop.impl.get_in_STAR_.cljs$core$IFn$_invoke$arity$2(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks));
}));

(applied_science.js_interop.get_in.cljs$core$IFn$_invoke$arity$3 = (function (obj,ks,not_found){
return applied_science.js_interop.impl.get_in_STAR_.cljs$core$IFn$_invoke$arity$3(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks),not_found);
}));

(applied_science.js_interop.get_in.cljs$lang$maxFixedArity = 3);

/**
 * Returns true if `obj` contains `k`.
 * 
 *   ```
 *   (j/contains? o :k)
 *   (j/contains? o .-k)
 *   ```
 */
applied_science.js_interop.contains_QMARK_ = (function applied_science$js_interop$contains_QMARK_(obj,k){
return applied_science.js_interop.impl.contains_QMARK__STAR_(obj,applied_science.js_interop.impl.wrap_key(k));
});
/**
 * Returns an object containing only those entries in `o` whose key is in `ks`.
 * 
 *   ```
 *   (j/select-keys o [:a :b :c])
 *   (j/select-keys o [.-a .-b .-c])
 *   ```
 */
applied_science.js_interop.select_keys = (function applied_science$js_interop$select_keys(obj,ks){
return applied_science.js_interop.impl.select_keys_STAR_(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks));
});

/**
* @constructor
 * @implements {cljs.core.IDeref}
 * @implements {cljs.core.ILookup}
*/
applied_science.js_interop.JSLookup = (function (obj){
this.obj = obj;
this.cljs$lang$protocol_mask$partition0$ = 33024;
this.cljs$lang$protocol_mask$partition1$ = 0;
});
(applied_science.js_interop.JSLookup.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (_,k){
var self__ = this;
var ___$1 = this;
var obj54000 = self__.obj;
if((!((obj54000 == null)))){
return (obj54000[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
}));

(applied_science.js_interop.JSLookup.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (_,k,not_found){
var self__ = this;
var ___$1 = this;
var val__53520__auto__ = (function (){var obj54002 = self__.obj;
if((!((obj54002 == null)))){
return (obj54002[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
})();
if((void 0 === val__53520__auto__)){
return not_found;
} else {
return val__53520__auto__;
}
}));

(applied_science.js_interop.JSLookup.prototype.cljs$core$IDeref$_deref$arity$1 = (function (o){
var self__ = this;
var o__$1 = this;
return self__.obj;
}));

(applied_science.js_interop.JSLookup.getBasis = (function (){
return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"obj","obj",-1672671807,null)], null);
}));

(applied_science.js_interop.JSLookup.cljs$lang$type = true);

(applied_science.js_interop.JSLookup.cljs$lang$ctorStr = "applied-science.js-interop/JSLookup");

(applied_science.js_interop.JSLookup.cljs$lang$ctorPrWriter = (function (this__5310__auto__,writer__5311__auto__,opt__5312__auto__){
return cljs.core._write(writer__5311__auto__,"applied-science.js-interop/JSLookup");
}));

/**
 * Positional factory function for applied-science.js-interop/JSLookup.
 */
applied_science.js_interop.__GT_JSLookup = (function applied_science$js_interop$__GT_JSLookup(obj){
return (new applied_science.js_interop.JSLookup(obj));
});

/**
 * Wraps `obj` with an ILookup implementation, to support reading/destructuring. Does not support renamable keys.
 * 
 *   ```
 *   (let [{:keys [a b c]} (j/lookup o)]
 * ...)
 *   ```
 */
applied_science.js_interop.lookup = (function applied_science$js_interop$lookup(obj){
if(cljs.core.truth_(obj)){
return (new applied_science.js_interop.JSLookup(obj));
} else {
return null;
}
});
/**
 * Sets key-value pairs on `obj`, returns `obj`.
 * 
 *   ```
 *   (j/assoc! o :x 10)
 *   (j/assoc! o .-x 10)
 *   ```
 */
applied_science.js_interop.assoc_BANG_ = (function applied_science$js_interop$assoc_BANG_(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54358 = arguments.length;
var i__5750__auto___54359 = (0);
while(true){
if((i__5750__auto___54359 < len__5749__auto___54358)){
args__5755__auto__.push((arguments[i__5750__auto___54359]));

var G__54362 = (i__5750__auto___54359 + (1));
i__5750__auto___54359 = G__54362;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((1) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((1)),(0),null)):null);
return applied_science.js_interop.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__5756__auto__);
});

(applied_science.js_interop.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (obj,keyvals){
var obj__$1 = (((!((obj == null))))?obj:({}));
var G__54018 = keyvals;
var vec__54019 = G__54018;
var seq__54020 = cljs.core.seq(vec__54019);
var first__54021 = cljs.core.first(seq__54020);
var seq__54020__$1 = cljs.core.next(seq__54020);
var k = first__54021;
var first__54021__$1 = cljs.core.first(seq__54020__$1);
var seq__54020__$2 = cljs.core.next(seq__54020__$1);
var v = first__54021__$1;
var kvs = seq__54020__$2;
var G__54018__$1 = G__54018;
while(true){
var vec__54023 = G__54018__$1;
var seq__54024 = cljs.core.seq(vec__54023);
var first__54025 = cljs.core.first(seq__54024);
var seq__54024__$1 = cljs.core.next(seq__54024);
var k__$1 = first__54025;
var first__54025__$1 = cljs.core.first(seq__54024__$1);
var seq__54024__$2 = cljs.core.next(seq__54024__$1);
var v__$1 = first__54025__$1;
var kvs__$1 = seq__54024__$2;
applied_science.js_interop.unchecked_set.cljs$core$IFn$_invoke$arity$variadic(obj__$1,cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([k__$1,v__$1], 0));

if(kvs__$1){
var G__54375 = kvs__$1;
G__54018__$1 = G__54375;
continue;
} else {
return obj__$1;
}
break;
}
}));

(applied_science.js_interop.assoc_BANG_.cljs$lang$maxFixedArity = (1));

/** @this {Function} */
(applied_science.js_interop.assoc_BANG_.cljs$lang$applyTo = (function (seq54012){
var G__54013 = cljs.core.first(seq54012);
var seq54012__$1 = cljs.core.next(seq54012);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54013,seq54012__$1);
}));

/**
 * Mutates the value in a nested object structure, where ks is a
 *   sequence of keys and v is the new value. If any levels do not
 *   exist, objects will be created.
 * 
 *   ```
 *   (j/assoc-in! o [:x :y] 10)
 *   (j/assoc-in! o [.-x .-y] 10)
 *   ```
 */
applied_science.js_interop.assoc_in_BANG_ = (function applied_science$js_interop$assoc_in_BANG_(obj,ks,v){
return applied_science.js_interop.impl.assoc_in_STAR_(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks),v);
});
/**
 * 'Updates' a value in a JavaScript object, where k is a key and
 *   f is a function that will take the old value and any supplied
 *   args and return the new value, which replaces the old value.
 *   If the key does not exist, nil is passed as the old value.
 * 
 *   ```
 *   (j/update! o :a + 10)
 *   (j/update! o .-a + 10)
 *   ```
 */
applied_science.js_interop.update_BANG_ = (function applied_science$js_interop$update_BANG_(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54382 = arguments.length;
var i__5750__auto___54383 = (0);
while(true){
if((i__5750__auto___54383 < len__5749__auto___54382)){
args__5755__auto__.push((arguments[i__5750__auto___54383]));

var G__54384 = (i__5750__auto___54383 + (1));
i__5750__auto___54383 = G__54384;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((3) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((3)),(0),null)):null);
return applied_science.js_interop.update_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__5756__auto__);
});

(applied_science.js_interop.update_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (obj,k,f,args){
var obj__$1 = (((!((obj == null))))?obj:({}));
var k_STAR_ = applied_science.js_interop.impl.wrap_key(k);
var v = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,(obj__$1[k_STAR_]),args);
(obj__$1[k_STAR_] = v);

return obj__$1;
}));

(applied_science.js_interop.update_BANG_.cljs$lang$maxFixedArity = (3));

/** @this {Function} */
(applied_science.js_interop.update_BANG_.cljs$lang$applyTo = (function (seq54033){
var G__54034 = cljs.core.first(seq54033);
var seq54033__$1 = cljs.core.next(seq54033);
var G__54035 = cljs.core.first(seq54033__$1);
var seq54033__$2 = cljs.core.next(seq54033__$1);
var G__54036 = cljs.core.first(seq54033__$2);
var seq54033__$3 = cljs.core.next(seq54033__$2);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54034,G__54035,G__54036,seq54033__$3);
}));

/**
 * 'Updates' a value in a nested object structure, where ks is a
 *   sequence of keys and f is a function that will take the old value
 *   and any supplied args and return the new value, mutating the
 *   nested structure.  If any levels do not exist, objects will be
 *   created.
 * 
 *   ```
 *   (j/update-in! o [:x :y] + 10)
 *   (j/update-in! o [.-x .-y] + 10)
 *   ```
 */
applied_science.js_interop.update_in_BANG_ = (function applied_science$js_interop$update_in_BANG_(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54398 = arguments.length;
var i__5750__auto___54400 = (0);
while(true){
if((i__5750__auto___54400 < len__5749__auto___54398)){
args__5755__auto__.push((arguments[i__5750__auto___54400]));

var G__54402 = (i__5750__auto___54400 + (1));
i__5750__auto___54400 = G__54402;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((3) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((3)),(0),null)):null);
return applied_science.js_interop.update_in_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__5756__auto__);
});

(applied_science.js_interop.update_in_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (obj,ks,f,args){
return applied_science.js_interop.impl.update_in_STAR_(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks),f,args);
}));

(applied_science.js_interop.update_in_BANG_.cljs$lang$maxFixedArity = (3));

/** @this {Function} */
(applied_science.js_interop.update_in_BANG_.cljs$lang$applyTo = (function (seq54049){
var G__54050 = cljs.core.first(seq54049);
var seq54049__$1 = cljs.core.next(seq54049);
var G__54051 = cljs.core.first(seq54049__$1);
var seq54049__$2 = cljs.core.next(seq54049__$1);
var G__54052 = cljs.core.first(seq54049__$2);
var seq54049__$3 = cljs.core.next(seq54049__$2);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54050,G__54051,G__54052,seq54049__$3);
}));

/**
 * Extends `obj` with the properties of one or more objects, overwriting
 * existing properties, moving left to right. Returns `obj`.
 * An empty starting object is provided if `obj` is nil.
 *   ```
 *   (j/extend! o other)
 *   (j/extend! o other #js{:x 1})
 *   ```
 *   Not IE6-friendly
 */
applied_science.js_interop.merge_BANG_ = (function applied_science$js_interop$merge_BANG_(var_args){
var G__54059 = arguments.length;
switch (G__54059) {
case 1:
return applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
default:
var args_arr__5774__auto__ = [];
var len__5749__auto___54417 = arguments.length;
var i__5750__auto___54418 = (0);
while(true){
if((i__5750__auto___54418 < len__5749__auto___54417)){
args_arr__5774__auto__.push((arguments[i__5750__auto___54418]));

var G__54425 = (i__5750__auto___54418 + (1));
i__5750__auto___54418 = G__54425;
continue;
} else {
}
break;
}

var argseq__5775__auto__ = ((((2) < args_arr__5774__auto__.length))?(new cljs.core.IndexedSeq(args_arr__5774__auto__.slice((2)),(0),null)):null);
return applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__5775__auto__);

}
});

(applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (obj){
return obj;
}));

(applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (obj,x){
var obj__$1 = (((!((obj == null))))?obj:({}));
if((!((x == null)))){
var seq__54068_54433 = cljs.core.seq(cljs.core.js_keys(x));
var chunk__54069_54434 = null;
var count__54070_54435 = (0);
var i__54071_54436 = (0);
while(true){
if((i__54071_54436 < count__54070_54435)){
var k_54438 = chunk__54069_54434.cljs$core$IIndexed$_nth$arity$2(null,i__54071_54436);
applied_science.js_interop.unchecked_set.cljs$core$IFn$_invoke$arity$variadic(obj__$1,cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([k_54438,applied_science.js_interop.unchecked_get(x,k_54438)], 0));


var G__54439 = seq__54068_54433;
var G__54440 = chunk__54069_54434;
var G__54441 = count__54070_54435;
var G__54442 = (i__54071_54436 + (1));
seq__54068_54433 = G__54439;
chunk__54069_54434 = G__54440;
count__54070_54435 = G__54441;
i__54071_54436 = G__54442;
continue;
} else {
var temp__5804__auto___54443 = cljs.core.seq(seq__54068_54433);
if(temp__5804__auto___54443){
var seq__54068_54445__$1 = temp__5804__auto___54443;
if(cljs.core.chunked_seq_QMARK_(seq__54068_54445__$1)){
var c__5548__auto___54450 = cljs.core.chunk_first(seq__54068_54445__$1);
var G__54451 = cljs.core.chunk_rest(seq__54068_54445__$1);
var G__54452 = c__5548__auto___54450;
var G__54453 = cljs.core.count(c__5548__auto___54450);
var G__54454 = (0);
seq__54068_54433 = G__54451;
chunk__54069_54434 = G__54452;
count__54070_54435 = G__54453;
i__54071_54436 = G__54454;
continue;
} else {
var k_54457 = cljs.core.first(seq__54068_54445__$1);
applied_science.js_interop.unchecked_set.cljs$core$IFn$_invoke$arity$variadic(obj__$1,cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([k_54457,applied_science.js_interop.unchecked_get(x,k_54457)], 0));


var G__54459 = cljs.core.next(seq__54068_54445__$1);
var G__54460 = null;
var G__54461 = (0);
var G__54462 = (0);
seq__54068_54433 = G__54459;
chunk__54069_54434 = G__54460;
count__54070_54435 = G__54461;
i__54071_54436 = G__54462;
continue;
}
} else {
}
}
break;
}
} else {
}

return obj__$1;
}));

(applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (obj,x,more){
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(applied_science.js_interop.merge_BANG_,applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$2(obj,x),more);
}));

/** @this {Function} */
(applied_science.js_interop.merge_BANG_.cljs$lang$applyTo = (function (seq54056){
var G__54057 = cljs.core.first(seq54056);
var seq54056__$1 = cljs.core.next(seq54056);
var G__54058 = cljs.core.first(seq54056__$1);
var seq54056__$2 = cljs.core.next(seq54056__$1);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54057,G__54058,seq54056__$2);
}));

(applied_science.js_interop.merge_BANG_.cljs$lang$maxFixedArity = (2));

/**
 * alias for merge!
 */
applied_science.js_interop.extend_BANG_ = (function applied_science$js_interop$extend_BANG_(var_args){
var G__54088 = arguments.length;
switch (G__54088) {
case 1:
return applied_science.js_interop.extend_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return applied_science.js_interop.extend_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
default:
var args_arr__5774__auto__ = [];
var len__5749__auto___54464 = arguments.length;
var i__5750__auto___54465 = (0);
while(true){
if((i__5750__auto___54465 < len__5749__auto___54464)){
args_arr__5774__auto__.push((arguments[i__5750__auto___54465]));

var G__54466 = (i__5750__auto___54465 + (1));
i__5750__auto___54465 = G__54466;
continue;
} else {
}
break;
}

var argseq__5775__auto__ = ((((2) < args_arr__5774__auto__.length))?(new cljs.core.IndexedSeq(args_arr__5774__auto__.slice((2)),(0),null)):null);
return applied_science.js_interop.extend_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__5775__auto__);

}
});

(applied_science.js_interop.extend_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (obj){
return obj;
}));

(applied_science.js_interop.extend_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (obj,x){
return applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$2(obj,x);
}));

(applied_science.js_interop.extend_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (obj,x,more){
return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(applied_science.js_interop.merge_BANG_,applied_science.js_interop.merge_BANG_.cljs$core$IFn$_invoke$arity$2(obj,x),more);
}));

/** @this {Function} */
(applied_science.js_interop.extend_BANG_.cljs$lang$applyTo = (function (seq54085){
var G__54086 = cljs.core.first(seq54085);
var seq54085__$1 = cljs.core.next(seq54085);
var G__54087 = cljs.core.first(seq54085__$1);
var seq54085__$2 = cljs.core.next(seq54085__$1);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54086,G__54087,seq54085__$2);
}));

(applied_science.js_interop.extend_BANG_.cljs$lang$maxFixedArity = (2));

applied_science.js_interop.update_keys_BANG_ = (function applied_science$js_interop$update_keys_BANG_(obj,f){

if(cljs.core.truth_(obj)){
var seq__54089_54469 = cljs.core.seq(Object.keys(obj));
var chunk__54091_54470 = null;
var count__54092_54471 = (0);
var i__54093_54472 = (0);
while(true){
if((i__54093_54472 < count__54092_54471)){
var k_54473 = chunk__54091_54470.cljs$core$IIndexed$_nth$arity$2(null,i__54093_54472);
var v_54474 = (obj[k_54473]);
delete obj[k_54473];

(obj[(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(k_54473) : f.call(null,k_54473))] = v_54474);


var G__54475 = seq__54089_54469;
var G__54476 = chunk__54091_54470;
var G__54477 = count__54092_54471;
var G__54478 = (i__54093_54472 + (1));
seq__54089_54469 = G__54475;
chunk__54091_54470 = G__54476;
count__54092_54471 = G__54477;
i__54093_54472 = G__54478;
continue;
} else {
var temp__5804__auto___54480 = cljs.core.seq(seq__54089_54469);
if(temp__5804__auto___54480){
var seq__54089_54482__$1 = temp__5804__auto___54480;
if(cljs.core.chunked_seq_QMARK_(seq__54089_54482__$1)){
var c__5548__auto___54483 = cljs.core.chunk_first(seq__54089_54482__$1);
var G__54484 = cljs.core.chunk_rest(seq__54089_54482__$1);
var G__54485 = c__5548__auto___54483;
var G__54486 = cljs.core.count(c__5548__auto___54483);
var G__54487 = (0);
seq__54089_54469 = G__54484;
chunk__54091_54470 = G__54485;
count__54092_54471 = G__54486;
i__54093_54472 = G__54487;
continue;
} else {
var k_54488 = cljs.core.first(seq__54089_54482__$1);
var v_54489 = (obj[k_54488]);
delete obj[k_54488];

(obj[(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(k_54488) : f.call(null,k_54488))] = v_54489);


var G__54498 = cljs.core.next(seq__54089_54482__$1);
var G__54499 = null;
var G__54500 = (0);
var G__54501 = (0);
seq__54089_54469 = G__54498;
chunk__54091_54470 = G__54499;
count__54092_54471 = G__54500;
i__54093_54472 = G__54501;
continue;
}
} else {
}
}
break;
}

return obj;
} else {
return null;
}
});
applied_science.js_interop.update_vals_BANG_ = (function applied_science$js_interop$update_vals_BANG_(obj,f){

if(cljs.core.truth_(obj)){
var seq__54114_54503 = cljs.core.seq(Object.entries(obj));
var chunk__54115_54504 = null;
var count__54116_54505 = (0);
var i__54117_54506 = (0);
while(true){
if((i__54117_54506 < count__54116_54505)){
var entry_54509 = chunk__54115_54504.cljs$core$IIndexed$_nth$arity$2(null,i__54117_54506);
var vec__54134_54510 = entry_54509;
var some_vec__54135_54511 = (!((vec__54134_54510 == null)));
var k_54512 = ((some_vec__54135_54511)?(vec__54134_54510[(0)]):null);
var v_54513 = ((some_vec__54135_54511)?(vec__54134_54510[(1)]):null);
(obj[k_54512] = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(v_54513) : f.call(null,v_54513)));


var G__54514 = seq__54114_54503;
var G__54515 = chunk__54115_54504;
var G__54516 = count__54116_54505;
var G__54517 = (i__54117_54506 + (1));
seq__54114_54503 = G__54514;
chunk__54115_54504 = G__54515;
count__54116_54505 = G__54516;
i__54117_54506 = G__54517;
continue;
} else {
var temp__5804__auto___54518 = cljs.core.seq(seq__54114_54503);
if(temp__5804__auto___54518){
var seq__54114_54519__$1 = temp__5804__auto___54518;
if(cljs.core.chunked_seq_QMARK_(seq__54114_54519__$1)){
var c__5548__auto___54520 = cljs.core.chunk_first(seq__54114_54519__$1);
var G__54522 = cljs.core.chunk_rest(seq__54114_54519__$1);
var G__54523 = c__5548__auto___54520;
var G__54524 = cljs.core.count(c__5548__auto___54520);
var G__54525 = (0);
seq__54114_54503 = G__54522;
chunk__54115_54504 = G__54523;
count__54116_54505 = G__54524;
i__54117_54506 = G__54525;
continue;
} else {
var entry_54527 = cljs.core.first(seq__54114_54519__$1);
var vec__54139_54528 = entry_54527;
var some_vec__54140_54529 = (!((vec__54139_54528 == null)));
var k_54530 = ((some_vec__54140_54529)?(vec__54139_54528[(0)]):null);
var v_54531 = ((some_vec__54140_54529)?(vec__54139_54528[(1)]):null);
(obj[k_54530] = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(v_54531) : f.call(null,v_54531)));


var G__54532 = cljs.core.next(seq__54114_54519__$1);
var G__54533 = null;
var G__54534 = (0);
var G__54535 = (0);
seq__54114_54503 = G__54532;
chunk__54115_54504 = G__54533;
count__54116_54505 = G__54534;
i__54117_54506 = G__54535;
continue;
}
} else {
}
}
break;
}

return obj;
} else {
return null;
}
});
/**
 * Appends `v` to `array` and returns the mutated array.
 * 
 *   ```
 *   (j/push! arr 10)
 *   ```
 */
applied_science.js_interop.push_BANG_ = (function applied_science$js_interop$push_BANG_(var_args){
var G__54147 = arguments.length;
switch (G__54147) {
case 0:
return applied_science.js_interop.push_BANG_.cljs$core$IFn$_invoke$arity$0();

break;
case 1:
return applied_science.js_interop.push_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return applied_science.js_interop.push_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
default:
throw (new Error(["Invalid arity: ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(arguments.length)].join('')));

}
});

(applied_science.js_interop.push_BANG_.cljs$core$IFn$_invoke$arity$0 = (function (){
return [];
}));

(applied_science.js_interop.push_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (array){
return array;
}));

(applied_science.js_interop.push_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (array,x){
var G__54152 = array;
G__54152.push(x);

return G__54152;
}));

(applied_science.js_interop.push_BANG_.cljs$lang$maxFixedArity = 2);

/**
 * Prepends `v` to `a` and returns the mutated array.
 * 
 *   ```
 *   (j/unshift! arr 10)
 *   ```
 */
applied_science.js_interop.unshift_BANG_ = (function applied_science$js_interop$unshift_BANG_(array,x){
var G__54155 = array;
G__54155.unshift(x);

return G__54155;
});
/**
 * Call function `k` of `obj`, binding `this` to `obj`.
 * 
 *   ```
 *   (j/call o :someFunction arg1 arg2)
 *   (j/call o .-someFunction arg1 arg2)
 *   ```
 */
applied_science.js_interop.call = (function applied_science$js_interop$call(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54540 = arguments.length;
var i__5750__auto___54541 = (0);
while(true){
if((i__5750__auto___54541 < len__5749__auto___54540)){
args__5755__auto__.push((arguments[i__5750__auto___54541]));

var G__54542 = (i__5750__auto___54541 + (1));
i__5750__auto___54541 = G__54542;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((2) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((2)),(0),null)):null);
return applied_science.js_interop.call.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__5756__auto__);
});

(applied_science.js_interop.call.cljs$core$IFn$_invoke$arity$variadic = (function (obj,k,args){
return (function (){var obj54163 = obj;
if((!((obj54163 == null)))){
return (obj54163[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
})().apply(obj,cljs.core.to_array(args));
}));

(applied_science.js_interop.call.cljs$lang$maxFixedArity = (2));

/** @this {Function} */
(applied_science.js_interop.call.cljs$lang$applyTo = (function (seq54158){
var G__54160 = cljs.core.first(seq54158);
var seq54158__$1 = cljs.core.next(seq54158);
var G__54161 = cljs.core.first(seq54158__$1);
var seq54158__$2 = cljs.core.next(seq54158__$1);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54160,G__54161,seq54158__$2);
}));

/**
 * Apply function `k` of `obj`, binding `this` to `obj`.
 * 
 *   ```
 *   (j/apply o :someFunction #js [arg1 arg2])
 *   (j/apply o .-someFunction #js [arg1 arg2])
 *   ```
 */
applied_science.js_interop.apply = (function applied_science$js_interop$apply(obj,k,arg_array){
return (function (){var obj54170 = obj;
if((!((obj54170 == null)))){
return (obj54170[applied_science.js_interop.impl.wrap_key(k)]);
} else {
return undefined;
}
})().apply(obj,arg_array);
});
/**
 * Call function nested at `path` with `args`, binding `this` to its parent object.
 * 
 *   ```
 *   (j/call-in o [:x :someFunction] arg1 arg2)
 *   ```
 */
applied_science.js_interop.call_in = (function applied_science$js_interop$call_in(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54554 = arguments.length;
var i__5750__auto___54555 = (0);
while(true){
if((i__5750__auto___54555 < len__5749__auto___54554)){
args__5755__auto__.push((arguments[i__5750__auto___54555]));

var G__54558 = (i__5750__auto___54555 + (1));
i__5750__auto___54555 = G__54558;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((2) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((2)),(0),null)):null);
return applied_science.js_interop.call_in.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__5756__auto__);
});

(applied_science.js_interop.call_in.cljs$core$IFn$_invoke$arity$variadic = (function (obj,ks,args){
return applied_science.js_interop.impl.apply_in_STAR_(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks),cljs.core.to_array(args));
}));

(applied_science.js_interop.call_in.cljs$lang$maxFixedArity = (2));

/** @this {Function} */
(applied_science.js_interop.call_in.cljs$lang$applyTo = (function (seq54174){
var G__54175 = cljs.core.first(seq54174);
var seq54174__$1 = cljs.core.next(seq54174);
var G__54176 = cljs.core.first(seq54174__$1);
var seq54174__$2 = cljs.core.next(seq54174__$1);
var self__5734__auto__ = this;
return self__5734__auto__.cljs$core$IFn$_invoke$arity$variadic(G__54175,G__54176,seq54174__$2);
}));

/**
 * Apply function nested at `path` with `arg-array`, binding `this` to its parent object.
 * 
 *   ```
 *   (j/apply-in o [:x :someFunction] arg1 arg2)
 *   ```
 */
applied_science.js_interop.apply_in = (function applied_science$js_interop$apply_in(obj,ks,arg_array){
return applied_science.js_interop.impl.apply_in_STAR_(obj,cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(applied_science.js_interop.impl.wrap_key,ks),arg_array);
});
/**
 * Create JavaScript object from an even number arguments representing
 * interleaved keys and values.
 * 
 * ```
 * (obj :a 1 :b 2 .-c 3 .-d 4)
 * ```
 */
applied_science.js_interop.obj = (function applied_science$js_interop$obj(var_args){
var args__5755__auto__ = [];
var len__5749__auto___54571 = arguments.length;
var i__5750__auto___54573 = (0);
while(true){
if((i__5750__auto___54573 < len__5749__auto___54571)){
args__5755__auto__.push((arguments[i__5750__auto___54573]));

var G__54575 = (i__5750__auto___54573 + (1));
i__5750__auto___54573 = G__54575;
continue;
} else {
}
break;
}

var argseq__5756__auto__ = ((((0) < args__5755__auto__.length))?(new cljs.core.IndexedSeq(args__5755__auto__.slice((0)),(0),null)):null);
return applied_science.js_interop.obj.cljs$core$IFn$_invoke$arity$variadic(argseq__5756__auto__);
});

(applied_science.js_interop.obj.cljs$core$IFn$_invoke$arity$variadic = (function (keyvals){
var obj = ({});
var seq__54213_54580 = cljs.core.seq(cljs.core.partition.cljs$core$IFn$_invoke$arity$2((2),keyvals));
var chunk__54214_54581 = null;
var count__54215_54582 = (0);
var i__54216_54583 = (0);
while(true){
if((i__54216_54583 < count__54215_54582)){
var vec__54243_54586 = chunk__54214_54581.cljs$core$IIndexed$_nth$arity$2(null,i__54216_54583);
var k_54587 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__54243_54586,(0),null);
var v_54588 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__54243_54586,(1),null);
var obj54256_54590 = obj;
var obj54258_54592 = (((!((obj54256_54590 == null))))?obj54256_54590:({}));
(obj54258_54592[applied_science.js_interop.impl.wrap_key(k_54587)] = v_54588);



var G__54596 = seq__54213_54580;
var G__54597 = chunk__54214_54581;
var G__54598 = count__54215_54582;
var G__54599 = (i__54216_54583 + (1));
seq__54213_54580 = G__54596;
chunk__54214_54581 = G__54597;
count__54215_54582 = G__54598;
i__54216_54583 = G__54599;
continue;
} else {
var temp__5804__auto___54601 = cljs.core.seq(seq__54213_54580);
if(temp__5804__auto___54601){
var seq__54213_54603__$1 = temp__5804__auto___54601;
if(cljs.core.chunked_seq_QMARK_(seq__54213_54603__$1)){
var c__5548__auto___54606 = cljs.core.chunk_first(seq__54213_54603__$1);
var G__54607 = cljs.core.chunk_rest(seq__54213_54603__$1);
var G__54608 = c__5548__auto___54606;
var G__54609 = cljs.core.count(c__5548__auto___54606);
var G__54610 = (0);
seq__54213_54580 = G__54607;
chunk__54214_54581 = G__54608;
count__54215_54582 = G__54609;
i__54216_54583 = G__54610;
continue;
} else {
var vec__54263_54612 = cljs.core.first(seq__54213_54603__$1);
var k_54613 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__54263_54612,(0),null);
var v_54614 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__54263_54612,(1),null);
var obj54267_54615 = obj;
var obj54269_54617 = (((!((obj54267_54615 == null))))?obj54267_54615:({}));
(obj54269_54617[applied_science.js_interop.impl.wrap_key(k_54613)] = v_54614);



var G__54622 = cljs.core.next(seq__54213_54603__$1);
var G__54623 = null;
var G__54624 = (0);
var G__54625 = (0);
seq__54213_54580 = G__54622;
chunk__54214_54581 = G__54623;
count__54215_54582 = G__54624;
i__54216_54583 = G__54625;
continue;
}
} else {
}
}
break;
}

return obj;
}));

(applied_science.js_interop.obj.cljs$lang$maxFixedArity = (0));

/** @this {Function} */
(applied_science.js_interop.obj.cljs$lang$applyTo = (function (seq54208){
var self__5735__auto__ = this;
return self__5735__auto__.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq54208));
}));


//# sourceMappingURL=applied_science.js_interop.js.map
