// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.sidebar.command');
goog.require('cljs.core');
goog.require('lt.util.cljs');
goog.require('crate.binding');
goog.require('lt.objs.app');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('lt.objs.context');
goog.require('crate.core');
goog.require('lt.objs.context');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('clojure.string');
goog.require('lt.util.cljs');
goog.require('lt.objs.command');
goog.require('lt.objs.app');
goog.require('lt.util.load');
goog.require('clojure.string');
goog.require('crate.binding');
goog.require('lt.objs.keyboard');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.util.load');
goog.require('crate.core');
goog.require('lt.objs.command');
goog.require('lt.objs.keyboard');
lt.util.load.js.call(null,"core/node_modules/lighttable/util/fuzzy.js",new cljs.core.Keyword(null,"sync","sync",1017449997));
lt.objs.sidebar.command.__BEH__op_select_BANG_ = (function __BEH__op_select_BANG_(this$,idx){var input = lt.object.__GT_content.call(null,this$);lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select","select",4402849902),lt.util.dom.val.call(null,input));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"selected","selected",2205476365));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","op-select!","lt.objs.sidebar.command/op-select!",3738729249),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__op_select_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,"select!","select!",2992004631),null], null), null));
lt.objs.sidebar.command.__BEH__op_clear_BANG_ = (function __BEH__op_clear_BANG_(this$){var input = lt.object.__GT_content.call(null,this$);lt.util.dom.val.call(null,input,"");
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),"");
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","op-clear!","lt.objs.sidebar.command/op-clear!",4705248442),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__op_clear_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,"clear!","clear!",3951036134),null], null), null));
lt.objs.sidebar.command.__BEH__op_focus_BANG_ = (function __BEH__op_focus_BANG_(this$){var input = lt.object.__GT_content.call(null,this$);lt.util.dom.focus.call(null,input);
return input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","op-focus!","lt.objs.sidebar.command/op-focus!",597430821),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__op_focus_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,"focus!","focus!",4039653819),null], null), null));
lt.objs.sidebar.command.__GT_value = (function __GT_value(p__12451){var map__12453 = p__12451;var map__12453__$1 = ((cljs.core.seq_QMARK_.call(null,map__12453))?cljs.core.apply.call(null,cljs.core.hash_map,map__12453):map__12453);var value = cljs.core.get.call(null,map__12453__$1,new cljs.core.Keyword(null,"value","value",1125876963));if(cljs.core.not.call(null,value))
{return "";
} else
{return value;
}
});
lt.objs.sidebar.command.input__GT_value = (function input__GT_value(this$){return lt.util.dom.val.call(null,lt.object.__GT_content.call(null,this$));
});
lt.objs.sidebar.command.op_input = (function op_input(this$){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,"input.option","input.option",1495945867),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"placeholder","placeholder",1612151013)),new cljs.core.Keyword(null,"value","value",1125876963),crate.binding.bound.call(null,this$,lt.objs.sidebar.command.__GT_value)], null)], null));var seq__12460_12466 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (e){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637),this$);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (e){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637),this$);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
}),new cljs.core.Keyword(null,"keyup","keyup",1115849900),(function (e){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),lt.util.dom.val.call(null,me));
})], null)));var chunk__12461_12467 = null;var count__12462_12468 = 0;var i__12463_12469 = 0;while(true){
if((i__12463_12469 < count__12462_12468))
{var vec__12464_12470 = cljs.core._nth.call(null,chunk__12461_12467,i__12463_12469);var ev__3326__auto___12471 = cljs.core.nth.call(null,vec__12464_12470,0,null);var func__3327__auto___12472 = cljs.core.nth.call(null,vec__12464_12470,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12471,func__3327__auto___12472);
{
var G__12473 = seq__12460_12466;
var G__12474 = chunk__12461_12467;
var G__12475 = count__12462_12468;
var G__12476 = (i__12463_12469 + 1);
seq__12460_12466 = G__12473;
chunk__12461_12467 = G__12474;
count__12462_12468 = G__12475;
i__12463_12469 = G__12476;
continue;
}
} else
{var temp__4092__auto___12477 = cljs.core.seq.call(null,seq__12460_12466);if(temp__4092__auto___12477)
{var seq__12460_12478__$1 = temp__4092__auto___12477;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12460_12478__$1))
{var c__4262__auto___12479 = cljs.core.chunk_first.call(null,seq__12460_12478__$1);{
var G__12480 = cljs.core.chunk_rest.call(null,seq__12460_12478__$1);
var G__12481 = c__4262__auto___12479;
var G__12482 = cljs.core.count.call(null,c__4262__auto___12479);
var G__12483 = 0;
seq__12460_12466 = G__12480;
chunk__12461_12467 = G__12481;
count__12462_12468 = G__12482;
i__12463_12469 = G__12483;
continue;
}
} else
{var vec__12465_12484 = cljs.core.first.call(null,seq__12460_12478__$1);var ev__3326__auto___12485 = cljs.core.nth.call(null,vec__12465_12484,0,null);var func__3327__auto___12486 = cljs.core.nth.call(null,vec__12465_12484,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12485,func__3327__auto___12486);
{
var G__12487 = cljs.core.next.call(null,seq__12460_12478__$1);
var G__12488 = null;
var G__12489 = 0;
var G__12490 = 0;
seq__12460_12466 = G__12487;
chunk__12461_12467 = G__12488;
count__12462_12468 = G__12489;
i__12463_12469 = G__12490;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","options-input","lt.objs.sidebar.command/options-input",3682181571),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"options-input","options-input",2975266637),null], null), null),new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"search",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,opts){lt.object.merge_BANG_.call(null,this$,opts);
return lt.objs.sidebar.command.op_input.call(null,this$);
}));
lt.objs.sidebar.command.options_input = (function options_input(opts){var lst = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","options-input","lt.objs.sidebar.command/options-input",3682181571),opts);lt.object.raise.call(null,lst,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
return lst;
});
lt.objs.sidebar.command.input_val = (function input_val(this$){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)));
});
lt.objs.sidebar.command.set_val = (function set_val(this$,v){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$)),v);
});
lt.objs.sidebar.command.set_and_select = (function set_and_select(this$,v){lt.objs.sidebar.command.set_val.call(null,this$,v);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),v);
});
lt.objs.sidebar.command.ensure_visible = (function ensure_visible(this$){var list = lt.util.dom.$.call(null,"ul",lt.object.__GT_content.call(null,this$));var elem = lt.util.dom.$.call(null,".selected",list);if((elem.offsetTop < list.scrollTop))
{return list.scrollTop = (elem.offsetTop - 15);
} else
{if(((elem.offsetTop + elem.offsetHeight) > (list.scrollTop + list.clientHeight)))
{return list.scrollTop = (((elem.offsetTop + elem.offsetHeight) + 15) - list.clientHeight);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return null;
} else
{return null;
}
}
}
});
lt.objs.sidebar.command.fill_lis = (function fill_lis(p__12494,results){var map__12508 = p__12494;var map__12508__$1 = ((cljs.core.seq_QMARK_.call(null,map__12508))?cljs.core.apply.call(null,cljs.core.hash_map,map__12508):map__12508);var this$ = map__12508__$1;var transform = cljs.core.get.call(null,map__12508__$1,new cljs.core.Keyword(null,"transform","transform",2066570974));var key = cljs.core.get.call(null,map__12508__$1,new cljs.core.Keyword(null,"key","key",1014010321));var selected = cljs.core.get.call(null,map__12508__$1,new cljs.core.Keyword(null,"selected","selected",2205476365));var search = cljs.core.get.call(null,map__12508__$1,new cljs.core.Keyword(null,"search","search",4402534682));var size = cljs.core.get.call(null,map__12508__$1,new cljs.core.Keyword(null,"size","size",1017434995));var lis = cljs.core.get.call(null,map__12508__$1,new cljs.core.Keyword(null,"lis","lis",1014011400));var cnt = cljs.core.count.call(null,results);var cur = cljs.core.mod.call(null,selected,(((cnt > size))?size:cnt));var transform__$1 = (cljs.core.truth_(transform)?transform:((function (cnt,cur){
return (function (p1__12492_SHARP_,p2__12493_SHARP_,p3__12491_SHARP_){return p3__12491_SHARP_;
});})(cnt,cur))
);if(cljs.core._EQ_.call(null,cnt,0))
{lt.util.dom.add_class.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(this$),new cljs.core.Keyword(null,"empty","empty",1110538431));
} else
{lt.util.dom.remove_class.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(this$),new cljs.core.Keyword(null,"empty","empty",1110538431));
}
var seq__12509_12521 = cljs.core.seq.call(null,cljs.core.map.call(null,cljs.core.vector,cljs.core.range.call(null),lis,results));var chunk__12511_12522 = null;var count__12512_12523 = 0;var i__12513_12524 = 0;while(true){
if((i__12513_12524 < count__12512_12523))
{var vec__12515_12525 = cljs.core._nth.call(null,chunk__12511_12522,i__12513_12524);var i_12526 = cljs.core.nth.call(null,vec__12515_12525,0,null);var li_12527 = cljs.core.nth.call(null,vec__12515_12525,1,null);var res_12528 = cljs.core.nth.call(null,vec__12515_12525,2,null);if(cljs.core.truth_(res_12528))
{lt.util.dom.html.call(null,li_12527,transform__$1.call(null,(res_12528[1]),(res_12528[4]),((!(cljs.core.empty_QMARK_.call(null,search)))?wrapMatch((res_12528[1]),(res_12528[4])):(res_12528[1])),(res_12528[0])));
lt.util.dom.css.call(null,li_12527,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"block"], null));
if(cljs.core._EQ_.call(null,i_12526,cur))
{lt.util.dom.add_class.call(null,li_12527,new cljs.core.Keyword(null,"selected","selected",2205476365));
} else
{lt.util.dom.remove_class.call(null,li_12527,new cljs.core.Keyword(null,"selected","selected",2205476365));
}
{
var G__12529 = seq__12509_12521;
var G__12530 = chunk__12511_12522;
var G__12531 = count__12512_12523;
var G__12532 = (i__12513_12524 + 1);
seq__12509_12521 = G__12529;
chunk__12511_12522 = G__12530;
count__12512_12523 = G__12531;
i__12513_12524 = G__12532;
continue;
}
} else
{{
var G__12533 = seq__12509_12521;
var G__12534 = chunk__12511_12522;
var G__12535 = count__12512_12523;
var G__12536 = (i__12513_12524 + 1);
seq__12509_12521 = G__12533;
chunk__12511_12522 = G__12534;
count__12512_12523 = G__12535;
i__12513_12524 = G__12536;
continue;
}
}
} else
{var temp__4092__auto___12537 = cljs.core.seq.call(null,seq__12509_12521);if(temp__4092__auto___12537)
{var seq__12509_12538__$1 = temp__4092__auto___12537;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12509_12538__$1))
{var c__4262__auto___12539 = cljs.core.chunk_first.call(null,seq__12509_12538__$1);{
var G__12540 = cljs.core.chunk_rest.call(null,seq__12509_12538__$1);
var G__12541 = c__4262__auto___12539;
var G__12542 = cljs.core.count.call(null,c__4262__auto___12539);
var G__12543 = 0;
seq__12509_12521 = G__12540;
chunk__12511_12522 = G__12541;
count__12512_12523 = G__12542;
i__12513_12524 = G__12543;
continue;
}
} else
{var vec__12516_12544 = cljs.core.first.call(null,seq__12509_12538__$1);var i_12545 = cljs.core.nth.call(null,vec__12516_12544,0,null);var li_12546 = cljs.core.nth.call(null,vec__12516_12544,1,null);var res_12547 = cljs.core.nth.call(null,vec__12516_12544,2,null);if(cljs.core.truth_(res_12547))
{lt.util.dom.html.call(null,li_12546,transform__$1.call(null,(res_12547[1]),(res_12547[4]),((!(cljs.core.empty_QMARK_.call(null,search)))?wrapMatch((res_12547[1]),(res_12547[4])):(res_12547[1])),(res_12547[0])));
lt.util.dom.css.call(null,li_12546,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"block"], null));
if(cljs.core._EQ_.call(null,i_12545,cur))
{lt.util.dom.add_class.call(null,li_12546,new cljs.core.Keyword(null,"selected","selected",2205476365));
} else
{lt.util.dom.remove_class.call(null,li_12546,new cljs.core.Keyword(null,"selected","selected",2205476365));
}
{
var G__12548 = cljs.core.next.call(null,seq__12509_12538__$1);
var G__12549 = null;
var G__12550 = 0;
var G__12551 = 0;
seq__12509_12521 = G__12548;
chunk__12511_12522 = G__12549;
count__12512_12523 = G__12550;
i__12513_12524 = G__12551;
continue;
}
} else
{{
var G__12552 = cljs.core.next.call(null,seq__12509_12538__$1);
var G__12553 = null;
var G__12554 = 0;
var G__12555 = 0;
seq__12509_12521 = G__12552;
chunk__12511_12522 = G__12553;
count__12512_12523 = G__12554;
i__12513_12524 = G__12555;
continue;
}
}
}
} else
{}
}
break;
}
var seq__12517 = cljs.core.seq.call(null,cljs.core.drop.call(null,cnt,lis));var chunk__12518 = null;var count__12519 = 0;var i__12520 = 0;while(true){
if((i__12520 < count__12519))
{var li = cljs.core._nth.call(null,chunk__12518,i__12520);lt.util.dom.css.call(null,li,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"none"], null));
{
var G__12556 = seq__12517;
var G__12557 = chunk__12518;
var G__12558 = count__12519;
var G__12559 = (i__12520 + 1);
seq__12517 = G__12556;
chunk__12518 = G__12557;
count__12519 = G__12558;
i__12520 = G__12559;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__12517);if(temp__4092__auto__)
{var seq__12517__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12517__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__12517__$1);{
var G__12560 = cljs.core.chunk_rest.call(null,seq__12517__$1);
var G__12561 = c__4262__auto__;
var G__12562 = cljs.core.count.call(null,c__4262__auto__);
var G__12563 = 0;
seq__12517 = G__12560;
chunk__12518 = G__12561;
count__12519 = G__12562;
i__12520 = G__12563;
continue;
}
} else
{var li = cljs.core.first.call(null,seq__12517__$1);lt.util.dom.css.call(null,li,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"display","display",2685668404),"none"], null));
{
var G__12564 = cljs.core.next.call(null,seq__12517__$1);
var G__12565 = null;
var G__12566 = 0;
var G__12567 = 0;
seq__12517 = G__12564;
chunk__12518 = G__12565;
count__12519 = G__12566;
i__12520 = G__12567;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.objs.sidebar.command.__BEH__move_selection = (function __BEH__move_selection(this$,dir){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"set-selection!","set-selection!",4610208210),(dir + new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));
return lt.objs.sidebar.command.ensure_visible.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","move-selection","lt.objs.sidebar.command/move-selection",3585134442),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__move_selection,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"move-selection","move-selection",2808852994),null], null), null));
lt.objs.sidebar.command.__BEH__set_selection_BANG_ = (function __BEH__set_selection_BANG_(this$,idx){var cnt = cljs.core.count.call(null,new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var neue_idx = (((cnt > 0))?cljs.core.mod.call(null,idx,(((cnt > new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))?new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)):cnt)):null);if(cljs.core.truth_(neue_idx))
{var old = cljs.core.nth.call(null,new cljs.core.Keyword(null,"lis","lis",1014011400).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var neue = cljs.core.nth.call(null,new cljs.core.Keyword(null,"lis","lis",1014011400).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),neue_idx);if(cljs.core.truth_(neue))
{lt.util.dom.remove_class.call(null,old,new cljs.core.Keyword(null,"selected","selected",2205476365));
lt.util.dom.add_class.call(null,neue,new cljs.core.Keyword(null,"selected","selected",2205476365));
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"selected","selected",2205476365),neue_idx], null));
} else
{return null;
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","set-selection!","lt.objs.sidebar.command/set-selection!",991317818),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__set_selection_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,"set-selection!","set-selection!",4610208210),null], null), null));
lt.objs.sidebar.command.__BEH__change_BANG_ = (function __BEH__change_BANG_(this$,v){var v__$1 = lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"change+","change+",1752847853),v);if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"search","search",4402534682).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),v__$1))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"selected","selected",2205476365),0,new cljs.core.Keyword(null,"search","search",4402534682),v__$1], null));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","change!","lt.objs.sidebar.command/change!",2493907785),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__change_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,"change!","change!",1752847843),null], null), null));
lt.objs.sidebar.command.__BEH__escape_BANG_ = (function __BEH__escape_BANG_(this$){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"close-sidebar","close-sidebar",1108494329));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","escape!","lt.objs.sidebar.command/escape!",4419624474),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__escape_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,"escape!","escape!",3844244274),null], null), null));
lt.objs.sidebar.command.__BEH__options_escape_BANG_ = (function __BEH__options_escape_BANG_(this$){lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"cancel!","cancel!",1564120153));
return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"close-sidebar","close-sidebar",1108494329));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","options-escape!","lt.objs.sidebar.command/options-escape!",1907886697),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__options_escape_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,"escape!","escape!",3844244274),null], null), null));
lt.objs.sidebar.command.__BEH__set_on_select = (function __BEH__set_on_select(this$,thing){if(cljs.core.truth_(new cljs.core.Keyword(null,"set-on-select","set-on-select",3587180657).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.objs.sidebar.command.set_val.call(null,this$,new cljs.core.Keyword(null,"key","key",1014010321).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)).call(null,thing));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","set-on-select","lt.objs.sidebar.command/set-on-select",4160534751),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__set_on_select,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.objs.sidebar.command.__BEH__select_BANG_ = (function __BEH__select_BANG_(this$,idx){var cur = lt.objs.sidebar.command.indexed_results.call(null,cljs.core.deref.call(null,this$));var cnt = cljs.core.count.call(null,cur);var idx__$1 = (function (){var or__3520__auto__ = idx;if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));
}
})();var i = cljs.core.mod.call(null,idx__$1,(((cnt > new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))?new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)):cnt));if((cnt > 0))
{lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select","select",4402849902),((cur[i])[0]));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"selected","selected",2205476365));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select-unknown","select-unknown",2733767659),lt.objs.sidebar.command.input_val.call(null,this$));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","select!","lt.objs.sidebar.command/select!",3665427221),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__select_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,"select!","select!",2992004631),null], null), null));
lt.objs.sidebar.command.__BEH__filter_active = (function __BEH__filter_active(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-active","lt.objs.sidebar.command/filter-active",3579569891),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__filter_active,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null), null));
lt.objs.sidebar.command.__BEH__filter_inactive = (function __BEH__filter_inactive(this$){return lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-inactive","lt.objs.sidebar.command/filter-inactive",2320829050),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__filter_inactive,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"inactive","inactive",1038569437),null], null), null));
lt.objs.sidebar.command.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));lt.util.dom.val.call(null,input,"");
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),"");
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","clear!","lt.objs.sidebar.command/clear!",4593594982),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__clear_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,"clear!","clear!",3951036134),null], null), null));
lt.objs.sidebar.command.__BEH__filter_list__DOT__focus_BANG_ = (function __BEH__filter_list__DOT__focus_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));lt.util.dom.focus.call(null,input);
return input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-list.focus!","lt.objs.sidebar.command/filter-list.focus!",1166243638),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__filter_list__DOT__focus_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,"focus!","focus!",4039653819),null], null), null));
lt.objs.sidebar.command.__BEH__update_lis = (function __BEH__update_lis(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"cur","cur",1014003122),lt.objs.sidebar.command.indexed_results.call(null,cljs.core.deref.call(null,this$))], null));
return lt.objs.sidebar.command.fill_lis.call(null,cljs.core.deref.call(null,this$),new cljs.core.Keyword(null,"cur","cur",1014003122).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","update-lis","lt.objs.sidebar.command/update-lis",1390862956),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__update_lis,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"refresh!","refresh!",4597922840),null], null), null));
lt.objs.sidebar.command.input = (function input(this$){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,"input.search","input.search",1599745982),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),crate.binding.bound.call(null,this$,new cljs.core.Keyword(null,"placeholder","placeholder",1612151013)),new cljs.core.Keyword(null,"tabindex","tabindex",4410954191),"0"], null)], null));var seq__12574_12580 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
}),new cljs.core.Keyword(null,"keyup","keyup",1115849900),(function (e){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"change!","change!",1752847843),lt.util.dom.val.call(null,me));
})], null)));var chunk__12575_12581 = null;var count__12576_12582 = 0;var i__12577_12583 = 0;while(true){
if((i__12577_12583 < count__12576_12582))
{var vec__12578_12584 = cljs.core._nth.call(null,chunk__12575_12581,i__12577_12583);var ev__3326__auto___12585 = cljs.core.nth.call(null,vec__12578_12584,0,null);var func__3327__auto___12586 = cljs.core.nth.call(null,vec__12578_12584,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12585,func__3327__auto___12586);
{
var G__12587 = seq__12574_12580;
var G__12588 = chunk__12575_12581;
var G__12589 = count__12576_12582;
var G__12590 = (i__12577_12583 + 1);
seq__12574_12580 = G__12587;
chunk__12575_12581 = G__12588;
count__12576_12582 = G__12589;
i__12577_12583 = G__12590;
continue;
}
} else
{var temp__4092__auto___12591 = cljs.core.seq.call(null,seq__12574_12580);if(temp__4092__auto___12591)
{var seq__12574_12592__$1 = temp__4092__auto___12591;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12574_12592__$1))
{var c__4262__auto___12593 = cljs.core.chunk_first.call(null,seq__12574_12592__$1);{
var G__12594 = cljs.core.chunk_rest.call(null,seq__12574_12592__$1);
var G__12595 = c__4262__auto___12593;
var G__12596 = cljs.core.count.call(null,c__4262__auto___12593);
var G__12597 = 0;
seq__12574_12580 = G__12594;
chunk__12575_12581 = G__12595;
count__12576_12582 = G__12596;
i__12577_12583 = G__12597;
continue;
}
} else
{var vec__12579_12598 = cljs.core.first.call(null,seq__12574_12592__$1);var ev__3326__auto___12599 = cljs.core.nth.call(null,vec__12579_12598,0,null);var func__3327__auto___12600 = cljs.core.nth.call(null,vec__12579_12598,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12599,func__3327__auto___12600);
{
var G__12601 = cljs.core.next.call(null,seq__12574_12592__$1);
var G__12602 = null;
var G__12603 = 0;
var G__12604 = 0;
seq__12574_12580 = G__12601;
chunk__12575_12581 = G__12602;
count__12576_12582 = G__12603;
i__12577_12583 = G__12604;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.command.__GT_items = (function __GT_items(items){if((function (){var G__12606 = items;if(G__12606)
{var bit__4164__auto__ = (G__12606.cljs$lang$protocol_mask$partition0$ & 32768);if((bit__4164__auto__) || (G__12606.cljs$core$IDeref$))
{return true;
} else
{if((!G__12606.cljs$lang$protocol_mask$partition0$))
{return cljs.core.native_satisfies_QMARK_.call(null,cljs.core.IDeref,G__12606);
} else
{return false;
}
}
} else
{return cljs.core.native_satisfies_QMARK_.call(null,cljs.core.IDeref,G__12606);
}
})())
{return cljs.core.deref.call(null,items);
} else
{if(cljs.core.fn_QMARK_.call(null,items))
{return items.call(null);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{return items;
} else
{return null;
}
}
}
});
lt.objs.sidebar.command.score_sort = (function score_sort(x,y){return ((y[3]) - (x[3]));
});
lt.objs.sidebar.command.score_sort2 = (function score_sort2(x,y){return ((y[4]).score - (x[4]).score);
});
lt.objs.sidebar.command.indexed_results = (function indexed_results(p__12613){var map__12615 = p__12613;var map__12615__$1 = ((cljs.core.seq_QMARK_.call(null,map__12615))?cljs.core.apply.call(null,cljs.core.hash_map,map__12615):map__12615);var key = cljs.core.get.call(null,map__12615__$1,new cljs.core.Keyword(null,"key","key",1014010321));var items = cljs.core.get.call(null,map__12615__$1,new cljs.core.Keyword(null,"items","items",1114430258));var size = cljs.core.get.call(null,map__12615__$1,new cljs.core.Keyword(null,"size","size",1017434995));var search = cljs.core.get.call(null,map__12615__$1,new cljs.core.Keyword(null,"search","search",4402534682));var items__$1 = cljs.core.apply.call(null,cljs.core.array,lt.objs.sidebar.command.__GT_items.call(null,items));var map_func3 = ((function (items__$1){
return (function (p1__12607_SHARP_){return [p1__12607_SHARP_,key.call(null,p1__12607_SHARP_),fastScore(key.call(null,p1__12607_SHARP_),search),null,null];
});})(items__$1))
;var map_func = ((function (items__$1,map_func3){
return (function (p1__12608_SHARP_){(p1__12608_SHARP_[3] = (p1__12608_SHARP_[1]).score(search));
return p1__12608_SHARP_;
});})(items__$1,map_func3))
;var map_func2 = ((function (items__$1,map_func3,map_func){
return (function (p1__12609_SHARP_){(p1__12609_SHARP_[4] = score((p1__12609_SHARP_[1]),search));
return p1__12609_SHARP_;
});})(items__$1,map_func3,map_func))
;var has_score = ((function (items__$1,map_func3,map_func,map_func2){
return (function (p1__12610_SHARP_){return ((p1__12610_SHARP_[4]).score > 0);
});})(items__$1,map_func3,map_func,map_func2))
;if(!(cljs.core.empty_QMARK_.call(null,search)))
{var score0 = items__$1.map(map_func3).filter((function (p1__12611_SHARP_){return (p1__12611_SHARP_[2]);
}));var score1 = score0.map(map_func).sort(lt.objs.sidebar.command.score_sort);var score2 = score1.slice(0,50).map(map_func2).filter(has_score).sort(lt.objs.sidebar.command.score_sort2);return score2;
} else
{return items__$1.map((function (p1__12612_SHARP_){return [p1__12612_SHARP_,key.call(null,p1__12612_SHARP_),null,null];
}));
}
});
lt.objs.sidebar.command.current_selected = (function current_selected(this$){var cur = lt.objs.sidebar.command.indexed_results.call(null,cljs.core.deref.call(null,this$));var cnt = cljs.core.count.call(null,cur);var idx = new cljs.core.Keyword(null,"selected","selected",2205476365).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var i = cljs.core.mod.call(null,idx,(((cnt > new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))?new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)):cnt));if((cnt > 0))
{return ((cur[i])[0]);
} else
{return null;
}
});
lt.objs.sidebar.command.item = (function item(this$,x){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),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"index","index",1114250308),x], null)], null));var seq__12622_12628 = 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,"mousedown","mousedown",1600748089),(function (e){lt.util.dom.prevent.call(null,e);
lt.util.dom.stop_propagation.call(null,e);
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"set-selection!","set-selection!",4610208210),x);
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select!","select!",2992004631),x);
})], null)));var chunk__12623_12629 = null;var count__12624_12630 = 0;var i__12625_12631 = 0;while(true){
if((i__12625_12631 < count__12624_12630))
{var vec__12626_12632 = cljs.core._nth.call(null,chunk__12623_12629,i__12625_12631);var ev__3326__auto___12633 = cljs.core.nth.call(null,vec__12626_12632,0,null);var func__3327__auto___12634 = cljs.core.nth.call(null,vec__12626_12632,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12633,func__3327__auto___12634);
{
var G__12635 = seq__12622_12628;
var G__12636 = chunk__12623_12629;
var G__12637 = count__12624_12630;
var G__12638 = (i__12625_12631 + 1);
seq__12622_12628 = G__12635;
chunk__12623_12629 = G__12636;
count__12624_12630 = G__12637;
i__12625_12631 = G__12638;
continue;
}
} else
{var temp__4092__auto___12639 = cljs.core.seq.call(null,seq__12622_12628);if(temp__4092__auto___12639)
{var seq__12622_12640__$1 = temp__4092__auto___12639;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12622_12640__$1))
{var c__4262__auto___12641 = cljs.core.chunk_first.call(null,seq__12622_12640__$1);{
var G__12642 = cljs.core.chunk_rest.call(null,seq__12622_12640__$1);
var G__12643 = c__4262__auto___12641;
var G__12644 = cljs.core.count.call(null,c__4262__auto___12641);
var G__12645 = 0;
seq__12622_12628 = G__12642;
chunk__12623_12629 = G__12643;
count__12624_12630 = G__12644;
i__12625_12631 = G__12645;
continue;
}
} else
{var vec__12627_12646 = cljs.core.first.call(null,seq__12622_12640__$1);var ev__3326__auto___12647 = cljs.core.nth.call(null,vec__12627_12646,0,null);var func__3327__auto___12648 = cljs.core.nth.call(null,vec__12627_12646,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12647,func__3327__auto___12648);
{
var G__12649 = cljs.core.next.call(null,seq__12622_12640__$1);
var G__12650 = null;
var G__12651 = 0;
var G__12652 = 0;
seq__12622_12628 = G__12649;
chunk__12623_12629 = G__12650;
count__12624_12630 = G__12651;
i__12625_12631 = G__12652;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-list","lt.objs.sidebar.command/filter-list",686625835),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"filter-list","filter-list",4372522309),null], null), null),new cljs.core.Keyword(null,"selected","selected",2205476365),0,new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"search",new cljs.core.Keyword(null,"items","items",1114430258),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"search","search",4402534682),"",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,opts){var opts__$1 = cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"size","size",1017434995),100], null),opts);var lis = (function (){var iter__4231__auto__ = ((function (opts__$1){
return (function iter__12653(s__12654){return (new cljs.core.LazySeq(null,((function (opts__$1){
return (function (){var s__12654__$1 = s__12654;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__12654__$1);if(temp__4092__auto__)
{var s__12654__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__12654__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__12654__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__12656 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__12655 = 0;while(true){
if((i__12655 < size__4230__auto__))
{var x = cljs.core._nth.call(null,c__4229__auto__,i__12655);cljs.core.chunk_append.call(null,b__12656,lt.objs.sidebar.command.item.call(null,this$,x));
{
var G__12657 = (i__12655 + 1);
i__12655 = G__12657;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12656),iter__12653.call(null,cljs.core.chunk_rest.call(null,s__12654__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12656),null);
}
} else
{var x = cljs.core.first.call(null,s__12654__$2);return cljs.core.cons.call(null,lt.objs.sidebar.command.item.call(null,this$,x),iter__12653.call(null,cljs.core.rest.call(null,s__12654__$2)));
}
} else
{return null;
}
break;
}
});})(opts__$1))
,null,null));
});})(opts__$1))
;return iter__4231__auto__.call(null,cljs.core.range.call(null,new cljs.core.Keyword(null,"size","size",1017434995).cljs$core$IFn$_invoke$arity$1(opts__$1)));
})();lt.object.merge_BANG_.call(null,this$,cljs.core.merge.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"lis","lis",1014011400),cljs.core.vec.call(null,lis)], null),opts__$1));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.filter-list.empty","div.filter-list.empty",3131797703),lt.objs.sidebar.command.input.call(null,this$),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul","ul",1013907977),lis], null)], null);
}));
lt.objs.sidebar.command.filter_list = (function filter_list(opts){var lst = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","filter-list","lt.objs.sidebar.command/filter-list",686625835),opts);lt.object.raise.call(null,lst,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
return lst;
});
lt.objs.sidebar.command.__BEH__select_command = (function __BEH__select_command(this$,sel){var temp__4092__auto__ = lt.objs.command.by_id.call(null,sel);if(cljs.core.truth_(temp__4092__auto__))
{var cmd = temp__4092__auto__;if(cljs.core.truth_(new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd)))
{lt.object.merge_BANG_.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),cmd], null));
return lt.object.raise.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd),new cljs.core.Keyword(null,"focus!","focus!",4039653819));
} else
{lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"exec!","exec!",1110854946),cmd);
lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"selected-exec","selected-exec",2423866357),cmd);
return lt.object.merge_BANG_.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null));
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","select-command","lt.objs.sidebar.command/select-command",4575873636),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__select_command,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select","select",4402849902),null], null), null));
lt.objs.sidebar.command.__BEH__select_hidden = (function __BEH__select_hidden(this$,v){var temp__4092__auto__ = lt.objs.command.by_id.call(null,cljs.core.keyword.call(null,v));if(cljs.core.truth_(temp__4092__auto__))
{var cmd = temp__4092__auto__;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select","select",4402849902),cmd);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","select-hidden","lt.objs.sidebar.command/select-hidden",878710275),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__select_hidden,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"select-unknown","select-unknown",2733767659),null], null), null));
lt.objs.sidebar.command.__BEH__post_select_pop = (function __BEH__post_select_pop(this$){if(cljs.core._EQ_.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.sidebar.rightbar))))
{return lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"close!","close!",3951350939),cljs.core.not.call(null,(function (){var or__3520__auto__ = lt.objs.context.in_QMARK_.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.objs.context.in_QMARK_.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637));
}
})()));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","post-select-pop","lt.objs.sidebar.command/post-select-pop",4406886573),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__post_select_pop,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"selected-exec","selected-exec",2423866357),null], null), null));
/**
* @param {...*} var_args
*/
lt.objs.sidebar.command.__BEH__exec_command = (function() { 
var __BEH__exec_command__delegate = function (this$,sel,args){var cmd = lt.objs.command.by_id.call(null,sel);if(cljs.core.not.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd)))
{return cljs.core.apply.call(null,lt.objs.command.exec_BANG_,cmd,args);
} else
{if(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(cmd);if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.seq.call(null,args);
} else
{return and__3508__auto__;
}
})()))
{return cljs.core.apply.call(null,new cljs.core.Keyword(null,"exec","exec",1017031683).cljs$core$IFn$_invoke$arity$1(cmd),args);
} else
{if(new cljs.core.Keyword(null,"else","else",1017020587))
{lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"show-commandbar-transient","show-commandbar-transient",3110127655));
return lt.object.raise.call(null,new cljs.core.Keyword(null,"selector","selector",2205476689).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"select","select",4402849902),cmd);
} else
{return null;
}
}
}
};
var __BEH__exec_command = function (this$,sel,var_args){
var args = null;if (arguments.length > 2) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2),0);} 
return __BEH__exec_command__delegate.call(this,this$,sel,args);};
__BEH__exec_command.cljs$lang$maxFixedArity = 2;
__BEH__exec_command.cljs$lang$applyTo = (function (arglist__12658){
var this$ = cljs.core.first(arglist__12658);
arglist__12658 = cljs.core.next(arglist__12658);
var sel = cljs.core.first(arglist__12658);
var args = cljs.core.rest(arglist__12658);
return __BEH__exec_command__delegate(this$,sel,args);
});
__BEH__exec_command.cljs$core$IFn$_invoke$arity$variadic = __BEH__exec_command__delegate;
return __BEH__exec_command;
})()
;
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","exec-command","lt.objs.sidebar.command/exec-command",1772645359),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__exec_command,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"exec!","exec!",1110854946),null], null), null));
lt.objs.sidebar.command.__BEH__exec_active_BANG_ = (function __BEH__exec_active_BANG_(this$,args){var cmd = new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));cljs.core.apply.call(null,new cljs.core.Keyword(null,"exec","exec",1017031683).cljs$core$IFn$_invoke$arity$1(cmd),args);
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"selected-exec","selected-exec",2423866357),cmd);
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","exec-active!","lt.objs.sidebar.command/exec-active!",3886149887),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__exec_active_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,"exec-active!","exec-active!",3313422353),null], null), null));
lt.objs.sidebar.command.__BEH__focus_on_show = (function __BEH__focus_on_show(this$){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","focus-on-show","lt.objs.sidebar.command/focus-on-show",2355413928),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__focus_on_show,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",1017433711),null], null), null));
lt.objs.sidebar.command.__BEH__focus_BANG_ = (function __BEH__focus_BANG_(this$){if(cljs.core.not.call(null,new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));lt.util.dom.focus.call(null,input);
return input.select();
} else
{return lt.object.raise.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),new cljs.core.Keyword(null,"focus!","focus!",4039653819));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","focus!","lt.objs.sidebar.command/focus!",4782843825),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__focus_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,"focus!","focus!",4039653819),null], null), null));
lt.objs.sidebar.command.__BEH__soft_focus_BANG_ = (function __BEH__soft_focus_BANG_(this$){var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,this$));return lt.util.dom.focus.call(null,input);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","soft-focus!","lt.objs.sidebar.command/soft-focus!",1534012590),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__soft_focus_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,"soft-focus!","soft-focus!",824282302),null], null), null));
lt.objs.sidebar.command.__BEH__refresh_BANG_ = (function __BEH__refresh_BANG_(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"selector","selector",2205476689).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","refresh!","lt.objs.sidebar.command/refresh!",978443544),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__refresh_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,"refresh!","refresh!",4597922840),null], null), null));
lt.objs.sidebar.command.__BEH__cancel_BANG_ = (function __BEH__cancel_BANG_(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"active","active",3885920888),null], null));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","cancel!","lt.objs.sidebar.command/cancel!",2137375959),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__cancel_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,"cancel!","cancel!",1564120153),null], null), null));
lt.objs.sidebar.command.header_button = (function header_button(this$){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,"h2","h2",1013907516),crate.binding.bound.call(null,this$,(function (p1__12659_SHARP_){return new cljs.core.Keyword(null,"desc","desc",1016984067).cljs$core$IFn$_invoke$arity$1(new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(p1__12659_SHARP_));
}))], null));var seq__12666_12672 = 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,"cancel!","cancel!",1564120153));
})], null)));var chunk__12667_12673 = null;var count__12668_12674 = 0;var i__12669_12675 = 0;while(true){
if((i__12669_12675 < count__12668_12674))
{var vec__12670_12676 = cljs.core._nth.call(null,chunk__12667_12673,i__12669_12675);var ev__3326__auto___12677 = cljs.core.nth.call(null,vec__12670_12676,0,null);var func__3327__auto___12678 = cljs.core.nth.call(null,vec__12670_12676,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12677,func__3327__auto___12678);
{
var G__12679 = seq__12666_12672;
var G__12680 = chunk__12667_12673;
var G__12681 = count__12668_12674;
var G__12682 = (i__12669_12675 + 1);
seq__12666_12672 = G__12679;
chunk__12667_12673 = G__12680;
count__12668_12674 = G__12681;
i__12669_12675 = G__12682;
continue;
}
} else
{var temp__4092__auto___12683 = cljs.core.seq.call(null,seq__12666_12672);if(temp__4092__auto___12683)
{var seq__12666_12684__$1 = temp__4092__auto___12683;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12666_12684__$1))
{var c__4262__auto___12685 = cljs.core.chunk_first.call(null,seq__12666_12684__$1);{
var G__12686 = cljs.core.chunk_rest.call(null,seq__12666_12684__$1);
var G__12687 = c__4262__auto___12685;
var G__12688 = cljs.core.count.call(null,c__4262__auto___12685);
var G__12689 = 0;
seq__12666_12672 = G__12686;
chunk__12667_12673 = G__12687;
count__12668_12674 = G__12688;
i__12669_12675 = G__12689;
continue;
}
} else
{var vec__12671_12690 = cljs.core.first.call(null,seq__12666_12684__$1);var ev__3326__auto___12691 = cljs.core.nth.call(null,vec__12671_12690,0,null);var func__3327__auto___12692 = cljs.core.nth.call(null,vec__12671_12690,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12691,func__3327__auto___12692);
{
var G__12693 = cljs.core.next.call(null,seq__12666_12684__$1);
var G__12694 = null;
var G__12695 = 0;
var G__12696 = 0;
seq__12666_12672 = G__12693;
chunk__12667_12673 = G__12694;
count__12668_12674 = G__12695;
i__12669_12675 = G__12696;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.command.__GT_options = (function __GT_options(this$,active){if(cljs.core.truth_(new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(active)))
{return lt.object.__GT_content.call(null,new cljs.core.Keyword(null,"options","options",4059396624).cljs$core$IFn$_invoke$arity$1(active));
} else
{return null;
}
});
lt.objs.sidebar.command.__GT_command_class = (function __GT_command_class(this$){return [cljs.core.str("command "),cljs.core.str((cljs.core.truth_(new cljs.core.Keyword(null,"active","active",3885920888).cljs$core$IFn$_invoke$arity$1(this$))?"options":"selector")),cljs.core.str((cljs.core.truth_(lt.util.dom.has_class_QMARK_.call(null,new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(this$),new cljs.core.Keyword(null,"active","active",3885920888)))?" active":null))].join('');
});
lt.objs.sidebar.command.__GT_binding = (function __GT_binding(p__12697){var vec__12699 = p__12697;var k = cljs.core.nth.call(null,vec__12699,0,null);var v = cljs.core.nth.call(null,vec__12699,1,null);return [cljs.core.str(v),cljs.core.str(((([cljs.core.str(k)].join('').indexOf("emacs") > -1))?" (Emacs)":null)),cljs.core.str(((([cljs.core.str(k)].join('').indexOf("vim") > -1))?" (Vim)":null))].join('');
});
lt.objs.sidebar.command.command__GT_display = (function command__GT_display(orig,scored,highlighted,item){return [cljs.core.str("<p>"),cljs.core.str(highlighted),cljs.core.str("<p>"),cljs.core.str((function (){var temp__4092__auto__ = cljs.core.seq.call(null,lt.objs.keyboard.cmd__GT_bindings.call(null,item.call(null,new cljs.core.Keyword(null,"command","command",1964298941))));if(temp__4092__auto__)
{var binding = temp__4092__auto__;return [cljs.core.str("<p class='binding'>"),cljs.core.str(clojure.string.join.call(null," | ",cljs.core.map.call(null,lt.objs.sidebar.command.__GT_binding,cljs.core.reverse.call(null,binding)))),cljs.core.str("</p>")].join('');
} else
{return null;
}
})())].join('');
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","sidebar.command","lt.objs.sidebar.command/sidebar.command",4586401569),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"sidebar.command","sidebar.command",3945910827),null], null), null),new cljs.core.Keyword(null,"label","label",1116631654),"command",new cljs.core.Keyword(null,"active","active",3885920888),null,new cljs.core.Keyword(null,"order","order",1119910592),3,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){var commands = crate.binding.subatom.call(null,lt.objs.command.manager,new cljs.core.Keyword(null,"commands","commands",4706336250));var f2 = crate.binding.computed.call(null,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [commands], null),((function (commands){
return (function (cmds){return cljs.core.filter.call(null,((function (commands){
return (function (p1__12700_SHARP_){return cljs.core.not.call(null,new cljs.core.Keyword(null,"hidden","hidden",4091384092).cljs$core$IFn$_invoke$arity$1(p1__12700_SHARP_));
});})(commands))
,cljs.core.vals.call(null,cmds));
});})(commands))
);var s2 = lt.objs.sidebar.command.filter_list.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"items","items",1114430258),f2,new cljs.core.Keyword(null,"transform","transform",2066570974),((function (commands,f2){
return (function (p1__12701_SHARP_,p2__12702_SHARP_,p3__12703_SHARP_,p4__12704_SHARP_){return lt.objs.sidebar.command.command__GT_display.call(null,p1__12701_SHARP_,p2__12702_SHARP_,p3__12703_SHARP_,p4__12704_SHARP_);
});})(commands,f2))
,new cljs.core.Keyword(null,"key","key",1014010321),new cljs.core.Keyword(null,"desc","desc",1016984067)], null));lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"selector","selector",2205476689),s2], null));
lt.object.add_tags.call(null,s2,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"command.selector","command.selector",1674182292)], null));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,lt.objs.sidebar.command.__GT_command_class)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.selector","div.selector",3570198542),lt.object.__GT_content.call(null,s2)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.options","div.options",1332473267),lt.objs.sidebar.command.header_button.call(null,this$),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),crate.binding.bound.call(null,crate.binding.subatom.call(null,this$,new cljs.core.Keyword(null,"active","active",3885920888)),(function (p1__12705_SHARP_){return lt.objs.sidebar.command.__GT_options.call(null,this$,p1__12705_SHARP_);
}))], null)], null)], null);
}));
lt.objs.sidebar.command.__BEH__init_commands = (function __BEH__init_commands(app){return lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","init-commands","lt.objs.sidebar.command/init-commands",802745109),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.command.__BEH__init_commands,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"post-init","post-init",2970371471),null], null), null));
lt.objs.sidebar.command.sidebar_command = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.command","sidebar.command","lt.objs.sidebar.command/sidebar.command",4586401569));
lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"commandbar","commandbar",1798064218),lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.add_item.call(null,lt.objs.sidebar.rightbar,lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.command.command = lt.objs.command.command;
lt.objs.sidebar.command.show_and_focus = (function show_and_focus(opts){return lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"toggle","toggle",4440567494),lt.objs.sidebar.command.sidebar_command,opts);
});
lt.objs.sidebar.command.pre_fill = (function pre_fill(v){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,".search",".search",2278031048),lt.object.__GT_content.call(null,lt.objs.sidebar.command.sidebar_command)),v);
});
lt.objs.sidebar.command.show_filled = (function show_filled(fill,opts){lt.objs.sidebar.command.pre_fill.call(null,fill);
lt.object.raise.call(null,lt.objs.sidebar.rightbar,new cljs.core.Keyword(null,"toggle","toggle",4440567494),lt.objs.sidebar.command.sidebar_command,cljs.core.assoc.call(null,opts,new cljs.core.Keyword(null,"soft?","soft?",1123517639),true));
return lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"soft-focus!","soft-focus!",824282302));
});
lt.objs.sidebar.command.exec_BANG_ = lt.objs.command.exec_BANG_;
/**
* @param {...*} var_args
*/
lt.objs.sidebar.command.exec_active_BANG_ = (function() { 
var exec_active_BANG___delegate = function (args){return lt.object.raise.call(null,lt.objs.sidebar.command.sidebar_command,new cljs.core.Keyword(null,"exec-active!","exec-active!",3313422353),args);
};
var exec_active_BANG_ = function (var_args){
var args = null;if (arguments.length > 0) {
  args = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0),0);} 
return exec_active_BANG___delegate.call(this,args);};
exec_active_BANG_.cljs$lang$maxFixedArity = 0;
exec_active_BANG_.cljs$lang$applyTo = (function (arglist__12706){
var args = cljs.core.seq(arglist__12706);
return exec_active_BANG___delegate(args);
});
exec_active_BANG_.cljs$core$IFn$_invoke$arity$variadic = exec_active_BANG___delegate;
return exec_active_BANG_;
})()
;
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"show-commandbar","show-commandbar",3043887402),new cljs.core.Keyword(null,"desc","desc",1016984067),"Command: Show command bar",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.show_and_focus.call(null,cljs.core.PersistentArrayMap.EMPTY);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"show-commandbar-transient","show-commandbar-transient",3110127655),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"Command: Show command bar transiently",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.command.show_and_focus.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"transient?","transient?",3584270951),true], null));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"quit","quit",1017386433),new cljs.core.Keyword(null,"desc","desc",1016984067),"Window: Quit Light Table",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.app.close.call(null);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"passthrough","passthrough",3850081542),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"No-op key passthrough",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.keyboard.passthrough.call(null);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"filter-list.input.move-selection","filter-list.input.move-selection",2715992545),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"FilterList: move selection",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (dir){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401)),new cljs.core.Keyword(null,"move-selection","move-selection",2808852994),dir);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"filter-list.input.select!","filter-list.input.select!",2873744152),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"FilterList: select",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401)),new cljs.core.Keyword(null,"select!","select!",2992004631));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"filter-list.input.escape!","filter-list.input.escape!",3725983795),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"FilterList: escape",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (force_QMARK_){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"filter-list.input","filter-list.input",2936258401)),new cljs.core.Keyword(null,"escape!","escape!",3844244274),force_QMARK_);
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"options-input.select!","options-input.select!",4522272516),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"OptionsInput: select",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637)),new cljs.core.Keyword(null,"select!","select!",2992004631));
})], null));
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"options-input.escape!","options-input.escape!",1079544863),new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"desc","desc",1016984067),"OptionsInput: escape",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"options-input","options-input",2975266637)),new cljs.core.Keyword(null,"escape!","escape!",3844244274));
})], null));
