// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.statusbar');
goog.require('cljs.core');
goog.require('crate.binding');
goog.require('lt.util.dom');
goog.require('lt.objs.tabs');
goog.require('lt.util.cljs');
goog.require('lt.util.dom');
goog.require('lt.objs.canvas');
goog.require('lt.util.cljs');
goog.require('lt.objs.command');
goog.require('lt.objs.bottombar');
goog.require('crate.binding');
goog.require('lt.objs.editor');
goog.require('lt.objs.canvas');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.tabs');
goog.require('lt.objs.bottombar');
goog.require('lt.objs.command');
goog.require('lt.objs.editor');
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar-container","lt.objs.statusbar/statusbar-container",2425546359),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"statusbar","statusbar",3238675027),null], null), null),new cljs.core.Keyword(null,"items","items",1114430258),cljs.core.sorted_set_by.call(null,(function (p1__11064_SHARP_){return new cljs.core.Keyword(null,"order","order",1119910592).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__11064_SHARP_));
})),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#statusbar-container","div#statusbar-container",4312198421)], null);
}));
lt.objs.statusbar.container = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar-container","lt.objs.statusbar/statusbar-container",2425546359));
/**
* Add an object to the statusbar container. When you wish the object to be displayed or hidden,
* raise :show! or :hide! respectively. Objects must have :order and :height keys in order to determine
* the space required for the object.
*/
lt.objs.statusbar.add_container = (function add_container(obj){lt.object.add_tags.call(null,obj,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"statusbar-item","statusbar-item",4250035697)], null));
lt.object.update_BANG_.call(null,lt.objs.statusbar.container,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"items","items",1114430258)], null),cljs.core.conj,obj);
var i = lt.util.cljs.index_of.call(null,obj,new cljs.core.Keyword(null,"items","items",1114430258).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.statusbar.container)));if(cljs.core._EQ_.call(null,i,0))
{return lt.util.dom.prepend.call(null,lt.object.__GT_content.call(null,lt.objs.statusbar.container),lt.object.__GT_content.call(null,obj));
} else
{return lt.util.dom.after.call(null,lt.object.__GT_content.call(null,cljs.core.get.call(null,new cljs.core.Keyword(null,"items","items",1114430258).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.statusbar.container)),i)),lt.object.__GT_content.call(null,obj));
}
});
lt.objs.statusbar.__BEH__on_show_BANG_ = (function __BEH__on_show_BANG_(this$){if(cljs.core.truth_(new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return null;
} else
{lt.util.dom.css.call(null,lt.object.__GT_content.call(null,this$),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"height","height",4087841945),new cljs.core.Keyword(null,"height","height",4087841945).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))], null));
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083),true], null));
return lt.object.raise.call(null,lt.objs.tabs.multi,new cljs.core.Keyword(null,"tabset-bottom!","tabset-bottom!",2684870056),new cljs.core.Keyword(null,"height","height",4087841945).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","on-show!","lt.objs.statusbar/on-show!",2528540082),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__on_show_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show!","show!",1123317814),null], null), null));
lt.objs.statusbar.__BEH__on_hide_BANG_ = (function __BEH__on_hide_BANG_(this$){if(cljs.core.truth_(new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{lt.util.dom.css.call(null,lt.object.__GT_content.call(null,this$),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"height","height",4087841945),0], null));
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar","shown","lt.objs.statusbar/shown",1816687083),false], null));
return lt.object.raise.call(null,lt.objs.tabs.multi,new cljs.core.Keyword(null,"tabset-bottom!","tabset-bottom!",2684870056),(- new cljs.core.Keyword(null,"height","height",4087841945).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","on-hide!","lt.objs.statusbar/on-hide!",2534061899),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__on_hide_BANG_,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"hide!","hide!",1113177745),null], null), null));
lt.objs.statusbar.__BEH__init_statusbar = (function __BEH__init_statusbar(app){return lt.util.dom.append.call(null,lt.object.__GT_content.call(null,lt.objs.tabs.multi),lt.object.__GT_content.call(null,lt.objs.statusbar.container));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","init-statusbar","lt.objs.statusbar/init-statusbar",3154736296),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__init_statusbar,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null));
lt.objs.statusbar.statusbar_item = (function statusbar_item(content,class$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),class$], null),content], null));var seq__11071_11077 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__11072_11078 = null;var count__11073_11079 = 0;var i__11074_11080 = 0;while(true){
if((i__11074_11080 < count__11073_11079))
{var vec__11075_11081 = cljs.core._nth.call(null,chunk__11072_11078,i__11074_11080);var ev__3326__auto___11082 = cljs.core.nth.call(null,vec__11075_11081,0,null);var func__3327__auto___11083 = cljs.core.nth.call(null,vec__11075_11081,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11082,func__3327__auto___11083);
{
var G__11084 = seq__11071_11077;
var G__11085 = chunk__11072_11078;
var G__11086 = count__11073_11079;
var G__11087 = (i__11074_11080 + 1);
seq__11071_11077 = G__11084;
chunk__11072_11078 = G__11085;
count__11073_11079 = G__11086;
i__11074_11080 = G__11087;
continue;
}
} else
{var temp__4092__auto___11088 = cljs.core.seq.call(null,seq__11071_11077);if(temp__4092__auto___11088)
{var seq__11071_11089__$1 = temp__4092__auto___11088;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11071_11089__$1))
{var c__4262__auto___11090 = cljs.core.chunk_first.call(null,seq__11071_11089__$1);{
var G__11091 = cljs.core.chunk_rest.call(null,seq__11071_11089__$1);
var G__11092 = c__4262__auto___11090;
var G__11093 = cljs.core.count.call(null,c__4262__auto___11090);
var G__11094 = 0;
seq__11071_11077 = G__11091;
chunk__11072_11078 = G__11092;
count__11073_11079 = G__11093;
i__11074_11080 = G__11094;
continue;
}
} else
{var vec__11076_11095 = cljs.core.first.call(null,seq__11071_11089__$1);var ev__3326__auto___11096 = cljs.core.nth.call(null,vec__11076_11095,0,null);var func__3327__auto___11097 = cljs.core.nth.call(null,vec__11076_11095,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11096,func__3327__auto___11097);
{
var G__11098 = cljs.core.next.call(null,seq__11071_11089__$1);
var G__11099 = null;
var G__11100 = 0;
var G__11101 = 0;
seq__11071_11077 = G__11098;
chunk__11072_11078 = G__11099;
count__11073_11079 = G__11100;
i__11074_11080 = G__11101;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar","lt.objs.statusbar/statusbar",3933351963),new cljs.core.Keyword(null,"items","items",1114430258),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"height","height",4087841945),34,new cljs.core.Keyword(null,"order","order",1119910592),0,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul#statusbar","ul#statusbar",2076227431),crate.binding.map_bound.call(null,(function (p1__11102_SHARP_){return lt.object.__GT_content.call(null,cljs.core.deref.call(null,p1__11102_SHARP_));
}),this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"path","path",1017337751),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"items","items",1114430258)], null)], null))], null);
}));
lt.objs.statusbar.statusbar = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar","lt.objs.statusbar/statusbar",3933351963));
lt.objs.statusbar.add_container.call(null,lt.objs.statusbar.statusbar);
lt.objs.statusbar.__BEH__show_statusbar = (function __BEH__show_statusbar(this$){return lt.object.raise.call(null,lt.objs.statusbar.statusbar,new cljs.core.Keyword(null,"show!","show!",1123317814));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","show-statusbar","lt.objs.statusbar/show-statusbar",3545826539),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__show_statusbar,new cljs.core.Keyword(null,"desc","desc",1016984067),"App: Show statusbar at the bottom of the editor",new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"user","user",1017503549));
lt.objs.statusbar.add_statusbar_item = (function add_statusbar_item(item){return lt.object.update_BANG_.call(null,lt.objs.statusbar.statusbar,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"items","items",1114430258)], null),cljs.core.conj,item);
});
lt.objs.statusbar.__GT_cursor_str = (function __GT_cursor_str(p__11103){var map__11105 = p__11103;var map__11105__$1 = ((cljs.core.seq_QMARK_.call(null,map__11105))?cljs.core.apply.call(null,cljs.core.hash_map,map__11105):map__11105);var pos = cljs.core.get.call(null,map__11105__$1,new cljs.core.Keyword(null,"pos","pos",1014015430));return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.pos","span.pos",3069890850),[cljs.core.str(""),cljs.core.str((new cljs.core.Keyword(null,"line","line",1017226086).cljs$core$IFn$_invoke$arity$1(pos) + 1)),cljs.core.str(" / "),cljs.core.str((new cljs.core.Keyword(null,"ch","ch",1013907415).cljs$core$IFn$_invoke$arity$1(pos) + 1))].join('')], null);
});
lt.objs.statusbar.__BEH__update_cursor_location = (function __BEH__update_cursor_location(this$,pos){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"pos","pos",1014015430),pos], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","update-cursor-location","lt.objs.statusbar/update-cursor-location",3219638212),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__update_cursor_location,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"update!","update!",779473898),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.cursor","lt.objs.statusbar/statusbar.cursor",2923420677),new cljs.core.Keyword(null,"triggers","triggers",2516997421),cljs.core.PersistentHashSet.EMPTY,new cljs.core.Keyword(null,"behaviors","behaviors",607554515),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar","update-cursor-location","lt.objs.statusbar/update-cursor-location",3219638212),null], null), null),new cljs.core.Keyword(null,"pos","pos",1014015430),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"line","line",1017226086),0,new cljs.core.Keyword(null,"ch","ch",1013907415),0], null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.statusbar.statusbar_item.call(null,crate.binding.bound.call(null,this$,lt.objs.statusbar.__GT_cursor_str),"");
}));
lt.objs.statusbar.statusbar_cursor = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.cursor","lt.objs.statusbar/statusbar.cursor",2923420677));
lt.objs.statusbar.add_statusbar_item.call(null,lt.objs.statusbar.statusbar_cursor);
lt.objs.statusbar.__BEH__report_cursor_location = (function __BEH__report_cursor_location(this$){return lt.object.raise.call(null,lt.objs.statusbar.statusbar_cursor,new cljs.core.Keyword(null,"update!","update!",779473898),lt.objs.editor.__GT_cursor.call(null,this$));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","report-cursor-location","lt.objs.statusbar/report-cursor-location",4636515157),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.statusbar.__BEH__report_cursor_location,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"move","move",1017261891),null,new cljs.core.Keyword(null,"active","active",3885920888),null], null), null));
lt.objs.statusbar.loader_disp = (function loader_disp(this$){if((new cljs.core.Keyword(null,"loaders","loaders",1350551090).cljs$core$IFn$_invoke$arity$1(this$) > 0))
{return "";
} else
{return "none";
}
});
lt.objs.statusbar.arrow_disp = (function arrow_disp(this$){if((new cljs.core.Keyword(null,"loaders","loaders",1350551090).cljs$core$IFn$_invoke$arity$1(this$) > 0))
{return "none";
} else
{return "";
}
});
lt.objs.statusbar.loader = (function loader(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.load-wrapper","span.load-wrapper",4427265602),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"style","style",1123684643),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),crate.binding.bound.call(null,this$,lt.objs.statusbar.loader_disp)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span.img","span.img",3069884049)], null)], null));var seq__11112_11118 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"toggle","toggle",4440567494));
})], null)));var chunk__11113_11119 = null;var count__11114_11120 = 0;var i__11115_11121 = 0;while(true){
if((i__11115_11121 < count__11114_11120))
{var vec__11116_11122 = cljs.core._nth.call(null,chunk__11113_11119,i__11115_11121);var ev__3326__auto___11123 = cljs.core.nth.call(null,vec__11116_11122,0,null);var func__3327__auto___11124 = cljs.core.nth.call(null,vec__11116_11122,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11123,func__3327__auto___11124);
{
var G__11125 = seq__11112_11118;
var G__11126 = chunk__11113_11119;
var G__11127 = count__11114_11120;
var G__11128 = (i__11115_11121 + 1);
seq__11112_11118 = G__11125;
chunk__11113_11119 = G__11126;
count__11114_11120 = G__11127;
i__11115_11121 = G__11128;
continue;
}
} else
{var temp__4092__auto___11129 = cljs.core.seq.call(null,seq__11112_11118);if(temp__4092__auto___11129)
{var seq__11112_11130__$1 = temp__4092__auto___11129;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11112_11130__$1))
{var c__4262__auto___11131 = cljs.core.chunk_first.call(null,seq__11112_11130__$1);{
var G__11132 = cljs.core.chunk_rest.call(null,seq__11112_11130__$1);
var G__11133 = c__4262__auto___11131;
var G__11134 = cljs.core.count.call(null,c__4262__auto___11131);
var G__11135 = 0;
seq__11112_11118 = G__11132;
chunk__11113_11119 = G__11133;
count__11114_11120 = G__11134;
i__11115_11121 = G__11135;
continue;
}
} else
{var vec__11117_11136 = cljs.core.first.call(null,seq__11112_11130__$1);var ev__3326__auto___11137 = cljs.core.nth.call(null,vec__11117_11136,0,null);var func__3327__auto___11138 = cljs.core.nth.call(null,vec__11117_11136,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11137,func__3327__auto___11138);
{
var G__11139 = cljs.core.next.call(null,seq__11112_11130__$1);
var G__11140 = null;
var G__11141 = 0;
var G__11142 = 0;
seq__11112_11118 = G__11139;
chunk__11113_11119 = G__11140;
count__11114_11120 = G__11141;
i__11115_11121 = G__11142;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.statusbar.log_item = (function log_item(i){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),crate.binding.bound.call(null,i,new cljs.core.Keyword(null,"text","text",1017460895))], null));var seq__11149_11155 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__11150_11156 = null;var count__11151_11157 = 0;var i__11152_11158 = 0;while(true){
if((i__11152_11158 < count__11151_11157))
{var vec__11153_11159 = cljs.core._nth.call(null,chunk__11150_11156,i__11152_11158);var ev__3326__auto___11160 = cljs.core.nth.call(null,vec__11153_11159,0,null);var func__3327__auto___11161 = cljs.core.nth.call(null,vec__11153_11159,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11160,func__3327__auto___11161);
{
var G__11162 = seq__11149_11155;
var G__11163 = chunk__11150_11156;
var G__11164 = count__11151_11157;
var G__11165 = (i__11152_11158 + 1);
seq__11149_11155 = G__11162;
chunk__11150_11156 = G__11163;
count__11151_11157 = G__11164;
i__11152_11158 = G__11165;
continue;
}
} else
{var temp__4092__auto___11166 = cljs.core.seq.call(null,seq__11149_11155);if(temp__4092__auto___11166)
{var seq__11149_11167__$1 = temp__4092__auto___11166;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11149_11167__$1))
{var c__4262__auto___11168 = cljs.core.chunk_first.call(null,seq__11149_11167__$1);{
var G__11169 = cljs.core.chunk_rest.call(null,seq__11149_11167__$1);
var G__11170 = c__4262__auto___11168;
var G__11171 = cljs.core.count.call(null,c__4262__auto___11168);
var G__11172 = 0;
seq__11149_11155 = G__11169;
chunk__11150_11156 = G__11170;
count__11151_11157 = G__11171;
i__11152_11158 = G__11172;
continue;
}
} else
{var vec__11154_11173 = cljs.core.first.call(null,seq__11149_11167__$1);var ev__3326__auto___11174 = cljs.core.nth.call(null,vec__11154_11173,0,null);var func__3327__auto___11175 = cljs.core.nth.call(null,vec__11154_11173,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11174,func__3327__auto___11175);
{
var G__11176 = cljs.core.next.call(null,seq__11149_11167__$1);
var G__11177 = null;
var G__11178 = 0;
var G__11179 = 0;
seq__11149_11155 = G__11176;
chunk__11150_11156 = G__11177;
count__11151_11157 = G__11178;
i__11152_11158 = G__11179;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.statusbar.__GT_message_class = (function __GT_message_class(m){return [cljs.core.str("message "),cljs.core.str((function (){var or__3520__auto__ = m;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return "";
}
})())].join('');
});
lt.objs.statusbar.log = (function log(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.log","div.log",2686473177),lt.objs.statusbar.loader.call(null,this$),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,(function (p1__11180_SHARP_){return lt.objs.statusbar.__GT_message_class.call(null,new cljs.core.Keyword(null,"class","class",1108647146).cljs$core$IFn$_invoke$arity$1(p1__11180_SHARP_));
}))], null),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"message","message",1968829305))], null)], null));var seq__11187_11193 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__11188_11194 = null;var count__11189_11195 = 0;var i__11190_11196 = 0;while(true){
if((i__11190_11196 < count__11189_11195))
{var vec__11191_11197 = cljs.core._nth.call(null,chunk__11188_11194,i__11190_11196);var ev__3326__auto___11198 = cljs.core.nth.call(null,vec__11191_11197,0,null);var func__3327__auto___11199 = cljs.core.nth.call(null,vec__11191_11197,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11198,func__3327__auto___11199);
{
var G__11200 = seq__11187_11193;
var G__11201 = chunk__11188_11194;
var G__11202 = count__11189_11195;
var G__11203 = (i__11190_11196 + 1);
seq__11187_11193 = G__11200;
chunk__11188_11194 = G__11201;
count__11189_11195 = G__11202;
i__11190_11196 = G__11203;
continue;
}
} else
{var temp__4092__auto___11204 = cljs.core.seq.call(null,seq__11187_11193);if(temp__4092__auto___11204)
{var seq__11187_11205__$1 = temp__4092__auto___11204;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11187_11205__$1))
{var c__4262__auto___11206 = cljs.core.chunk_first.call(null,seq__11187_11205__$1);{
var G__11207 = cljs.core.chunk_rest.call(null,seq__11187_11205__$1);
var G__11208 = c__4262__auto___11206;
var G__11209 = cljs.core.count.call(null,c__4262__auto___11206);
var G__11210 = 0;
seq__11187_11193 = G__11207;
chunk__11188_11194 = G__11208;
count__11189_11195 = G__11209;
i__11190_11196 = G__11210;
continue;
}
} else
{var vec__11192_11211 = cljs.core.first.call(null,seq__11187_11205__$1);var ev__3326__auto___11212 = cljs.core.nth.call(null,vec__11192_11211,0,null);var func__3327__auto___11213 = cljs.core.nth.call(null,vec__11192_11211,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11212,func__3327__auto___11213);
{
var G__11214 = cljs.core.next.call(null,seq__11187_11205__$1);
var G__11215 = null;
var G__11216 = 0;
var G__11217 = 0;
seq__11187_11193 = G__11214;
chunk__11188_11194 = G__11215;
count__11189_11195 = G__11216;
i__11190_11196 = G__11217;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.loader","lt.objs.statusbar/statusbar.loader",2772437308),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"statusbar.console","statusbar.console",4348364476),null], null), null),new cljs.core.Keyword(null,"loaders","loaders",1350551090),0,new cljs.core.Keyword(null,"message","message",1968829305),"",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.statusbar.statusbar_item.call(null,lt.objs.statusbar.log.call(null,this$),"left");
}));
lt.objs.statusbar.statusbar_loader = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.loader","lt.objs.statusbar/statusbar.loader",2772437308));
lt.objs.statusbar.add_statusbar_item.call(null,lt.objs.statusbar.statusbar_loader);
lt.objs.statusbar.loader_set = (function loader_set(){return lt.object.merge_BANG_.call(null,lt.objs.statusbar.statusbar_loader,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"loaders","loaders",1350551090),0], null));
});
lt.objs.statusbar.loader_inc = (function loader_inc(){return lt.object.update_BANG_.call(null,lt.objs.statusbar.statusbar_loader,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaders","loaders",1350551090)], null),cljs.core.inc);
});
lt.objs.statusbar.loader_dec = (function loader_dec(){if((new cljs.core.Keyword(null,"loaders","loaders",1350551090).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.statusbar.statusbar_loader)) > 0))
{return lt.object.update_BANG_.call(null,lt.objs.statusbar.statusbar_loader,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaders","loaders",1350551090)], null),cljs.core.dec);
} else
{return null;
}
});
lt.objs.statusbar.toggle_class = (function toggle_class(p__11218){var map__11220 = p__11218;var map__11220__$1 = ((cljs.core.seq_QMARK_.call(null,map__11220))?cljs.core.apply.call(null,cljs.core.hash_map,map__11220):map__11220);var class$ = cljs.core.get.call(null,map__11220__$1,new cljs.core.Keyword(null,"class","class",1108647146));var dirty = cljs.core.get.call(null,map__11220__$1,new cljs.core.Keyword(null,"dirty","dirty",1109497668));return [cljs.core.str("console-toggle "),cljs.core.str((cljs.core.truth_(class$)?[cljs.core.str(class$),cljs.core.str(" ")].join(''):null)),cljs.core.str((((dirty > 0))?"dirty":null))].join('');
});
lt.objs.statusbar.toggle_span = (function toggle_span(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"span","span",1017440956),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,lt.objs.statusbar.toggle_class)], null),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"dirty","dirty",1109497668))], null));var seq__11227_11233 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"toggle-console","toggle-console",4454540112));
})], null)));var chunk__11228_11234 = null;var count__11229_11235 = 0;var i__11230_11236 = 0;while(true){
if((i__11230_11236 < count__11229_11235))
{var vec__11231_11237 = cljs.core._nth.call(null,chunk__11228_11234,i__11230_11236);var ev__3326__auto___11238 = cljs.core.nth.call(null,vec__11231_11237,0,null);var func__3327__auto___11239 = cljs.core.nth.call(null,vec__11231_11237,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11238,func__3327__auto___11239);
{
var G__11240 = seq__11227_11233;
var G__11241 = chunk__11228_11234;
var G__11242 = count__11229_11235;
var G__11243 = (i__11230_11236 + 1);
seq__11227_11233 = G__11240;
chunk__11228_11234 = G__11241;
count__11229_11235 = G__11242;
i__11230_11236 = G__11243;
continue;
}
} else
{var temp__4092__auto___11244 = cljs.core.seq.call(null,seq__11227_11233);if(temp__4092__auto___11244)
{var seq__11227_11245__$1 = temp__4092__auto___11244;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11227_11245__$1))
{var c__4262__auto___11246 = cljs.core.chunk_first.call(null,seq__11227_11245__$1);{
var G__11247 = cljs.core.chunk_rest.call(null,seq__11227_11245__$1);
var G__11248 = c__4262__auto___11246;
var G__11249 = cljs.core.count.call(null,c__4262__auto___11246);
var G__11250 = 0;
seq__11227_11233 = G__11247;
chunk__11228_11234 = G__11248;
count__11229_11235 = G__11249;
i__11230_11236 = G__11250;
continue;
}
} else
{var vec__11232_11251 = cljs.core.first.call(null,seq__11227_11245__$1);var ev__3326__auto___11252 = cljs.core.nth.call(null,vec__11232_11251,0,null);var func__3327__auto___11253 = cljs.core.nth.call(null,vec__11232_11251,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11252,func__3327__auto___11253);
{
var G__11254 = cljs.core.next.call(null,seq__11227_11245__$1);
var G__11255 = null;
var G__11256 = 0;
var G__11257 = 0;
seq__11227_11233 = G__11254;
chunk__11228_11234 = G__11255;
count__11229_11235 = G__11256;
i__11230_11236 = G__11257;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.console-toggle","lt.objs.statusbar/statusbar.console-toggle",4344040401),new cljs.core.Keyword(null,"dirty","dirty",1109497668),0,new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"statusbar.console-toggle","statusbar.console-toggle",3902398121)], null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.statusbar.statusbar_item.call(null,lt.objs.statusbar.toggle_span.call(null,this$),"");
}));
lt.objs.statusbar.console_toggle = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.statusbar","statusbar.console-toggle","lt.objs.statusbar/statusbar.console-toggle",4344040401));
lt.objs.statusbar.add_statusbar_item.call(null,lt.objs.statusbar.console_toggle);
lt.objs.statusbar.dirty = (function dirty(){return lt.object.update_BANG_.call(null,lt.objs.statusbar.console_toggle,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dirty","dirty",1109497668)], null),cljs.core.inc);
});
lt.objs.statusbar.clean = (function clean(){return lt.object.merge_BANG_.call(null,lt.objs.statusbar.console_toggle,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"dirty","dirty",1109497668),0,new cljs.core.Keyword(null,"class","class",1108647146),null], null));
});
lt.objs.statusbar.console_class = (function console_class(class$){return lt.object.merge_BANG_.call(null,lt.objs.statusbar.console_toggle,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),class$], null));
});
