// Compiled by ClojureScript 1.11.60 {:static-fns true, :optimize-constants true, :optimizations :advanced}
goog.provide('reagent.impl.component');
goog.require('cljs.core');
goog.require('cljs.core.constants');
goog.require('reagent.impl.util');
goog.require('reagent.impl.batching');
goog.require('reagent.ratom');
goog.require('reagent.interop');
goog.require('reagent.debug');
reagent.impl.component.state_atom = (function reagent$impl$component$state_atom(this$){
var sa = (this$["cljsState"]);
if((!((sa == null)))){
return sa;
} else {
return (this$["cljsState"] = reagent.ratom.atom.cljs$core$IFn$_invoke$arity$1(null));
}
});
reagent.impl.component.as_element = (function reagent$impl$component$as_element(x){
return reagent.impl.template.as_element(x);
});
reagent.impl.component.reagent_class_QMARK_ = (function reagent$impl$component$reagent_class_QMARK_(c){
return ((cljs.core.fn_QMARK_(c)) && ((!(((c["cljsReactClass"]) == null)))));
});
reagent.impl.component.do_render_sub = (function reagent$impl$component$do_render_sub(c){
while(true){
var f = (c["cljsRender"]);
var _ = ((cljs.core.ifn_QMARK_(f))?null:(function(){throw (new Error("Assert failed: (ifn? f)"))})());
var p = (c["props"]);
var res = ((((c["reagentRender"]) == null))?(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(c) : f.call(null,c)):(function (){var argv = (p["argv"]);
var n = cljs.core.count(argv);
var G__7404 = n;
switch (G__7404) {
case (1):
return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null));

break;
case (2):
var G__7405 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(1));
return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__7405) : f.call(null,G__7405));

break;
case (3):
var G__7406 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(1));
var G__7407 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(2));
return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7406,G__7407) : f.call(null,G__7406,G__7407));

break;
case (4):
var G__7408 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(1));
var G__7409 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(2));
var G__7410 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(3));
return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__7408,G__7409,G__7410) : f.call(null,G__7408,G__7409,G__7410));

break;
case (5):
var G__7411 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(1));
var G__7412 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(2));
var G__7413 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(3));
var G__7414 = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(argv,(4));
return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__7411,G__7412,G__7413,G__7414) : f.call(null,G__7411,G__7412,G__7413,G__7414));

break;
default:
return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f,cljs.core.subvec.cljs$core$IFn$_invoke$arity$2(argv,(1)));

}
})());
if(cljs.core.vector_QMARK_(res)){
return reagent.impl.component.as_element(res);
} else {
if(cljs.core.ifn_QMARK_(res)){
var f__$1 = ((reagent.impl.component.reagent_class_QMARK_(res))?((function (c,f,_,p,res){
return (function() { 
var G__7416__delegate = function (args){
return reagent.impl.component.as_element(cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.vector,res,args));
};
var G__7416 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__7417__i = 0, G__7417__a = new Array(arguments.length -  0);
while (G__7417__i < G__7417__a.length) {G__7417__a[G__7417__i] = arguments[G__7417__i + 0]; ++G__7417__i;}
  args = new cljs.core.IndexedSeq(G__7417__a,0,null);
} 
return G__7416__delegate.call(this,args);};
G__7416.cljs$lang$maxFixedArity = 0;
G__7416.cljs$lang$applyTo = (function (arglist__7418){
var args = cljs.core.seq(arglist__7418);
return G__7416__delegate(args);
});
G__7416.cljs$core$IFn$_invoke$arity$variadic = G__7416__delegate;
return G__7416;
})()
;})(c,f,_,p,res))
:res);
(c["cljsRender"] = f__$1);

var G__7419 = c;
c = G__7419;
continue;
} else {
return res;
}
}
break;
}
});
reagent.impl.component.do_render = (function reagent$impl$component$do_render(c){
var _STAR_current_component_STAR__orig_val__7420 = reagent.impl.component._STAR_current_component_STAR_;
var _STAR_current_component_STAR__temp_val__7421 = c;
(reagent.impl.component._STAR_current_component_STAR_ = _STAR_current_component_STAR__temp_val__7421);

try{var ok = [false];
try{var res = reagent.impl.component.do_render_sub(c);
(ok[(0)] = true);

return res;
}finally {if(cljs.core.truth_((ok[(0)]))){
} else {
console.error(["Error rendering component ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((reagent.impl.component.comp_name.cljs$core$IFn$_invoke$arity$0 ? reagent.impl.component.comp_name.cljs$core$IFn$_invoke$arity$0() : reagent.impl.component.comp_name.call(null)))].join(''));
}
}
}finally {(reagent.impl.component._STAR_current_component_STAR_ = _STAR_current_component_STAR__orig_val__7420);
}});
reagent.impl.component.static_fns = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$render,(function (){
var c = this;
if(cljs.core.not(reagent.impl.component._STAR_non_reactive_STAR_)){
return reagent.impl.batching.run_reactively(c,(function (){
return reagent.impl.component.do_render(c);
}));
} else {
return reagent.impl.component.do_render(c);
}
})], null);
reagent.impl.component.custom_wrapper = (function reagent$impl$component$custom_wrapper(key,f){
var G__7422 = key;
var G__7422__$1 = (((G__7422 instanceof cljs.core.Keyword))?G__7422.fqn:null);
switch (G__7422__$1) {
case "getDefaultProps":
throw (new Error(["Assert failed: ","getDefaultProps not supported yet","\n","false"].join('')));


break;
case "getInitialState":
return (function (){
var c = this;
return cljs.core.reset_BANG_(reagent.impl.component.state_atom(c),(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(c) : f.call(null,c)));
});

break;
case "componentWillReceiveProps":
return (function (props){
var c = this;
var G__7423 = c;
var G__7424 = (props["argv"]);
return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7423,G__7424) : f.call(null,G__7423,G__7424));
});

break;
case "shouldComponentUpdate":
return (function (nextprops,nextstate){
var or__5045__auto__ = reagent.impl.util._STAR_always_update_STAR_;
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
var c = this;
var old_argv = (c["props"]["argv"]);
var new_argv = (nextprops["argv"]);
if((f == null)){
return (((old_argv == null)) || ((((new_argv == null)) || (cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(old_argv,new_argv)))));
} else {
return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(c,old_argv,new_argv) : f.call(null,c,old_argv,new_argv));
}
}
});

break;
case "componentWillUpdate":
return (function (nextprops){
var c = this;
var G__7425 = c;
var G__7426 = (nextprops["argv"]);
return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7425,G__7426) : f.call(null,G__7425,G__7426));
});

break;
case "componentDidUpdate":
return (function (oldprops){
var c = this;
var G__7427 = c;
var G__7428 = (oldprops["argv"]);
return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__7427,G__7428) : f.call(null,G__7427,G__7428));
});

break;
case "componentWillMount":
return (function (){
var c = this;
(c["cljsMountOrder"] = reagent.impl.batching.next_mount_count());

if((f == null)){
return null;
} else {
return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(c) : f.call(null,c));
}
});

break;
case "componentWillUnmount":
return (function (){
var c = this;
reagent.impl.batching.dispose(c);

if((f == null)){
return null;
} else {
return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(c) : f.call(null,c));
}
});

break;
default:
return null;

}
});
reagent.impl.component.default_wrapper = (function reagent$impl$component$default_wrapper(f){
if(cljs.core.ifn_QMARK_(f)){
return (function() { 
var G__7430__delegate = function (args){
var c = this;
return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,c,args);
};
var G__7430 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__7431__i = 0, G__7431__a = new Array(arguments.length -  0);
while (G__7431__i < G__7431__a.length) {G__7431__a[G__7431__i] = arguments[G__7431__i + 0]; ++G__7431__i;}
  args = new cljs.core.IndexedSeq(G__7431__a,0,null);
} 
return G__7430__delegate.call(this,args);};
G__7430.cljs$lang$maxFixedArity = 0;
G__7430.cljs$lang$applyTo = (function (arglist__7432){
var args = cljs.core.seq(arglist__7432);
return G__7430__delegate(args);
});
G__7430.cljs$core$IFn$_invoke$arity$variadic = G__7430__delegate;
return G__7430;
})()
;
} else {
return f;
}
});
reagent.impl.component.dont_wrap = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 4, [cljs.core.cst$kw$cljsRender,null,cljs.core.cst$kw$reagentRender,null,cljs.core.cst$kw$render,null,cljs.core.cst$kw$cljsName,null], null), null);
reagent.impl.component.dont_bind = (function reagent$impl$component$dont_bind(f){
if(cljs.core.fn_QMARK_(f)){
var G__7433 = f;
(G__7433["__reactDontBind"] = true);

return G__7433;
} else {
return f;
}
});
reagent.impl.component.get_wrapper = (function reagent$impl$component$get_wrapper(key,f,name){
if(cljs.core.truth_((reagent.impl.component.dont_wrap.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.dont_wrap.cljs$core$IFn$_invoke$arity$1(key) : reagent.impl.component.dont_wrap.call(null,key)))){
return reagent.impl.component.dont_bind(f);
} else {
var wrap = reagent.impl.component.custom_wrapper(key,f);
if(cljs.core.truth_((function (){var and__5043__auto__ = wrap;
if(cljs.core.truth_(and__5043__auto__)){
return f;
} else {
return and__5043__auto__;
}
})())){
if(cljs.core.ifn_QMARK_(f)){
} else {
throw (new Error(["Assert failed: ",["Expected function in ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(name),cljs.core.str.cljs$core$IFn$_invoke$arity$1(key)," but got ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(f)].join(''),"\n","(ifn? f)"].join('')));
}
} else {
}

var or__5045__auto__ = wrap;
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
return reagent.impl.component.default_wrapper(f);
}
}
});
reagent.impl.component.obligatory = new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$shouldComponentUpdate,null,cljs.core.cst$kw$componentWillMount,null,cljs.core.cst$kw$componentWillUnmount,null], null);
reagent.impl.component.dash_to_camel = reagent.impl.util.memoize_1(reagent.impl.util.dash_to_camel);
reagent.impl.component.camelify_map_keys = (function reagent$impl$component$camelify_map_keys(fun_map){
return cljs.core.reduce_kv((function (m,k,v){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,cljs.core.keyword.cljs$core$IFn$_invoke$arity$1((reagent.impl.component.dash_to_camel.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.dash_to_camel.cljs$core$IFn$_invoke$arity$1(k) : reagent.impl.component.dash_to_camel.call(null,k))),v);
}),cljs.core.PersistentArrayMap.EMPTY,fun_map);
});
reagent.impl.component.add_obligatory = (function reagent$impl$component$add_obligatory(fun_map){
return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([reagent.impl.component.obligatory,fun_map], 0));
});
reagent.impl.component.add_render = (function reagent$impl$component$add_render(fun_map,render_f,name){
var fm = cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(fun_map,cljs.core.cst$kw$cljsRender,render_f,cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([cljs.core.cst$kw$render,cljs.core.cst$kw$render.cljs$core$IFn$_invoke$arity$1(reagent.impl.component.static_fns)], 0));
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(fm,cljs.core.cst$kw$cljsName,(function (){
return name;
}));

});
reagent.impl.component.fun_name = (function reagent$impl$component$fun_name(f){
var or__5045__auto__ = (function (){var and__5043__auto__ = cljs.core.fn_QMARK_(f);
if(and__5043__auto__){
var or__5045__auto__ = (f["displayName"]);
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
return (f["name"]);
}
} else {
return and__5043__auto__;
}
})();
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
var or__5045__auto____$1 = (function (){var and__5043__auto__ = (((!((f == null))))?(((((f.cljs$lang$protocol_mask$partition1$ & (4096))) || ((cljs.core.PROTOCOL_SENTINEL === f.cljs$core$INamed$))))?true:false):false);
if(and__5043__auto__){
return cljs.core.name(f);
} else {
return and__5043__auto__;
}
})();
if(cljs.core.truth_(or__5045__auto____$1)){
return or__5045__auto____$1;
} else {
var m = cljs.core.meta(f);
if(cljs.core.map_QMARK_(m)){
return cljs.core.cst$kw$name.cljs$core$IFn$_invoke$arity$1(m);
} else {
return null;
}
}
}
});
reagent.impl.component.wrap_funs = (function reagent$impl$component$wrap_funs(fmap){
var fun_map = (function (){var temp__4659__auto__ = cljs.core.cst$kw$componentFunction.cljs$core$IFn$_invoke$arity$1(fmap);
if((temp__4659__auto__ == null)){
return fmap;
} else {
var cf = temp__4659__auto__;
return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(fmap,cljs.core.cst$kw$reagentRender,cf),cljs.core.cst$kw$componentFunction);
}
})();
var render_fun = (function (){var or__5045__auto__ = cljs.core.cst$kw$reagentRender.cljs$core$IFn$_invoke$arity$1(fun_map);
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
return cljs.core.cst$kw$render.cljs$core$IFn$_invoke$arity$1(fun_map);
}
})();
var _ = ((cljs.core.ifn_QMARK_(render_fun))?null:(function(){throw (new Error(["Assert failed: ",["Render must be a function, not ",cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2([render_fun], 0))].join(''),"\n","(ifn? render-fun)"].join('')))})());
var name = cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var or__5045__auto__ = cljs.core.cst$kw$displayName.cljs$core$IFn$_invoke$arity$1(fun_map);
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
return reagent.impl.component.fun_name(render_fun);
}
})());
var name_SINGLEQUOTE_ = ((cljs.core.empty_QMARK_(name))?cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.gensym.cljs$core$IFn$_invoke$arity$1("reagent")):clojure.string.replace(name,/\$/,"."));
var fmap__$1 = reagent.impl.component.add_render(cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(fun_map,cljs.core.cst$kw$displayName,name_SINGLEQUOTE_),render_fun,name_SINGLEQUOTE_);
return cljs.core.reduce_kv((function (m,k,v){
return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,reagent.impl.component.get_wrapper(k,v,name_SINGLEQUOTE_));
}),cljs.core.PersistentArrayMap.EMPTY,fmap__$1);
});
reagent.impl.component.map_to_js = (function reagent$impl$component$map_to_js(m){
return cljs.core.reduce_kv((function (o,k,v){
var G__7435 = o;
(G__7435[cljs.core.name(k)] = v);

return G__7435;
}),({}),m);
});
reagent.impl.component.cljsify = (function reagent$impl$component$cljsify(body){
return reagent.impl.component.map_to_js(reagent.impl.component.wrap_funs(reagent.impl.component.add_obligatory(reagent.impl.component.camelify_map_keys(body))));
});
reagent.impl.component.create_class = (function reagent$impl$component$create_class(body){
if(cljs.core.map_QMARK_(body)){
} else {
throw (new Error("Assert failed: (map? body)"));
}

var spec = reagent.impl.component.cljsify(body);
var res = (React["createClass"])(spec);
var f = (function() { 
var G__7436__delegate = function (args){
if((typeof console !== 'undefined')){
console.warn(["Warning: ","Calling the result of create-class as a function is ","deprecated in ",cljs.core.str.cljs$core$IFn$_invoke$arity$1((res["displayName"])),". Use a vector ","instead."].join(''));
} else {
}

return reagent.impl.component.as_element(cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.vector,res,args));
};
var G__7436 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__7437__i = 0, G__7437__a = new Array(arguments.length -  0);
while (G__7437__i < G__7437__a.length) {G__7437__a[G__7437__i] = arguments[G__7437__i + 0]; ++G__7437__i;}
  args = new cljs.core.IndexedSeq(G__7437__a,0,null);
} 
return G__7436__delegate.call(this,args);};
G__7436.cljs$lang$maxFixedArity = 0;
G__7436.cljs$lang$applyTo = (function (arglist__7438){
var args = cljs.core.seq(arglist__7438);
return G__7436__delegate(args);
});
G__7436.cljs$core$IFn$_invoke$arity$variadic = G__7436__delegate;
return G__7436;
})()
;
reagent.impl.util.cache_react_class(f,res);

reagent.impl.util.cache_react_class(res,res);

return f;
});
reagent.impl.component.component_path = (function reagent$impl$component$component_path(c){
var elem = (function (){var G__7439 = (function (){var or__5045__auto__ = (function (){var G__7440 = c;
if((G__7440 == null)){
return null;
} else {
return (G__7440["_reactInternalInstance"]);
}
})();
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
return c;
}
})();
if((G__7439 == null)){
return null;
} else {
return (G__7439["_currentElement"]);
}
})();
var name = (function (){var G__7441 = elem;
var G__7441__$1 = (((G__7441 == null))?null:(G__7441["type"]));
if((G__7441__$1 == null)){
return null;
} else {
return (G__7441__$1["displayName"]);
}
})();
var path = (function (){var G__7442 = elem;
var G__7442__$1 = (((G__7442 == null))?null:(G__7442["_owner"]));
var G__7442__$2 = (((G__7442__$1 == null))?null:(reagent.impl.component.component_path.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.component_path.cljs$core$IFn$_invoke$arity$1(G__7442__$1) : reagent.impl.component.component_path.call(null,G__7442__$1)));
if((G__7442__$2 == null)){
return null;
} else {
return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__7442__$2)," > "].join('');
}
})();
var res = [path,cljs.core.str.cljs$core$IFn$_invoke$arity$1(name)].join('');
if(cljs.core.empty_QMARK_(res)){
return null;
} else {
return res;
}
});
reagent.impl.component.comp_name = (function reagent$impl$component$comp_name(){
var c = reagent.impl.component._STAR_current_component_STAR_;
var n = (function (){var or__5045__auto__ = reagent.impl.component.component_path(c);
if(cljs.core.truth_(or__5045__auto__)){
return or__5045__auto__;
} else {
var G__7443 = c;
if((G__7443 == null)){
return null;
} else {
return (G__7443["cljsName"])();
}
}
})();
if((!(cljs.core.empty_QMARK_(n)))){
return [" (in ",cljs.core.str.cljs$core$IFn$_invoke$arity$1(n),")"].join('');
} else {
return "";
}

});
reagent.impl.component.shallow_obj_to_map = (function reagent$impl$component$shallow_obj_to_map(o){
return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,(function (){var iter__5523__auto__ = (function reagent$impl$component$shallow_obj_to_map_$_iter__7444(s__7445){
return (new cljs.core.LazySeq(null,(function (){
var s__7445__$1 = s__7445;
while(true){
var temp__4657__auto__ = cljs.core.seq(s__7445__$1);
if(temp__4657__auto__){
var s__7445__$2 = temp__4657__auto__;
if(cljs.core.chunked_seq_QMARK_(s__7445__$2)){
var c__5521__auto__ = cljs.core.chunk_first(s__7445__$2);
var size__5522__auto__ = cljs.core.count(c__5521__auto__);
var b__7447 = cljs.core.chunk_buffer(size__5522__auto__);
if((function (){var i__7446 = (0);
while(true){
if((i__7446 < size__5522__auto__)){
var k = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c__5521__auto__,i__7446);
cljs.core.chunk_append(b__7447,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(k),(o[k])], null));

var G__7448 = (i__7446 + (1));
i__7446 = G__7448;
continue;
} else {
return true;
}
break;
}
})()){
return cljs.core.chunk_cons(cljs.core.chunk(b__7447),reagent$impl$component$shallow_obj_to_map_$_iter__7444(cljs.core.chunk_rest(s__7445__$2)));
} else {
return cljs.core.chunk_cons(cljs.core.chunk(b__7447),null);
}
} else {
var k = cljs.core.first(s__7445__$2);
return cljs.core.cons(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(k),(o[k])], null),reagent$impl$component$shallow_obj_to_map_$_iter__7444(cljs.core.rest(s__7445__$2)));
}
} else {
return null;
}
break;
}
}),null,null));
});
return iter__5523__auto__(cljs.core.js_keys(o));
})());
});
reagent.impl.component.elem_counter = (0);
reagent.impl.component.reactify_component = (function reagent$impl$component$reactify_component(comp){
return (React["createClass"])(({"displayName": "react-wrapper", "render": (function (){
var this$ = this;
return reagent.impl.component.as_element(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [comp,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(reagent.impl.component.shallow_obj_to_map((this$["props"])),cljs.core.cst$kw$_DASH_elem_DASH_count,(reagent.impl.component.elem_counter = (reagent.impl.component.elem_counter + (1))))], null));
})}));
});
