// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.find');
goog.require('cljs.core');
goog.require('lt.util.style');
goog.require('crate.binding');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.statusbar');
goog.require('lt.util.dom');
goog.require('lt.objs.context');
goog.require('lt.objs.context');
goog.require('lt.util.dom');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.canvas');
goog.require('lt.objs.statusbar');
goog.require('lt.util.load');
goog.require('crate.binding');
goog.require('lt.objs.keyboard');
goog.require('lt.objs.editor');
goog.require('lt.objs.canvas');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.util.load');
goog.require('lt.util.style');
goog.require('lt.objs.editor');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.keyboard');
lt.objs.find.find_height = 30;
lt.objs.find.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.find","input.find",2354911439),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"find"], null)], null));var seq__10955_10961 = 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,"input","input",1114262332),(function (){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.util.dom.val.call(null,me));
}),new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"find-bar","find-bar",4628501873),this$);
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"find-bar","find-bar",4628501873));
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
})], null)));var chunk__10956_10962 = null;var count__10957_10963 = 0;var i__10958_10964 = 0;while(true){
if((i__10958_10964 < count__10957_10963))
{var vec__10959_10965 = cljs.core._nth.call(null,chunk__10956_10962,i__10958_10964);var ev__3326__auto___10966 = cljs.core.nth.call(null,vec__10959_10965,0,null);var func__3327__auto___10967 = cljs.core.nth.call(null,vec__10959_10965,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___10966,func__3327__auto___10967);
{
var G__10968 = seq__10955_10961;
var G__10969 = chunk__10956_10962;
var G__10970 = count__10957_10963;
var G__10971 = (i__10958_10964 + 1);
seq__10955_10961 = G__10968;
chunk__10956_10962 = G__10969;
count__10957_10963 = G__10970;
i__10958_10964 = G__10971;
continue;
}
} else
{var temp__4092__auto___10972 = cljs.core.seq.call(null,seq__10955_10961);if(temp__4092__auto___10972)
{var seq__10955_10973__$1 = temp__4092__auto___10972;if(cljs.core.chunked_seq_QMARK_.call(null,seq__10955_10973__$1))
{var c__4262__auto___10974 = cljs.core.chunk_first.call(null,seq__10955_10973__$1);{
var G__10975 = cljs.core.chunk_rest.call(null,seq__10955_10973__$1);
var G__10976 = c__4262__auto___10974;
var G__10977 = cljs.core.count.call(null,c__4262__auto___10974);
var G__10978 = 0;
seq__10955_10961 = G__10975;
chunk__10956_10962 = G__10976;
count__10957_10963 = G__10977;
i__10958_10964 = G__10978;
continue;
}
} else
{var vec__10960_10979 = cljs.core.first.call(null,seq__10955_10973__$1);var ev__3326__auto___10980 = cljs.core.nth.call(null,vec__10960_10979,0,null);var func__3327__auto___10981 = cljs.core.nth.call(null,vec__10960_10979,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___10980,func__3327__auto___10981);
{
var G__10982 = cljs.core.next.call(null,seq__10955_10973__$1);
var G__10983 = null;
var G__10984 = 0;
var G__10985 = 0;
seq__10955_10961 = G__10982;
chunk__10956_10962 = G__10983;
count__10957_10963 = G__10984;
i__10958_10964 = G__10985;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.find.replace_input = (function replace_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.replace","input.replace",1121297410),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"replace"], null)], null));var seq__10992_10998 = 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,"input","input",1114262332),(function (){var me = this;return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"replace.changed","replace.changed",762914028),lt.util.dom.val.call(null,me));
}),new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"find-bar.replace","find-bar.replace",4492994871),this$);
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"active","active",3885920888));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"find-bar.replace","find-bar.replace",4492994871));
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"inactive","inactive",1038569437));
})], null)));var chunk__10993_10999 = null;var count__10994_11000 = 0;var i__10995_11001 = 0;while(true){
if((i__10995_11001 < count__10994_11000))
{var vec__10996_11002 = cljs.core._nth.call(null,chunk__10993_10999,i__10995_11001);var ev__3326__auto___11003 = cljs.core.nth.call(null,vec__10996_11002,0,null);var func__3327__auto___11004 = cljs.core.nth.call(null,vec__10996_11002,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11003,func__3327__auto___11004);
{
var G__11005 = seq__10992_10998;
var G__11006 = chunk__10993_10999;
var G__11007 = count__10994_11000;
var G__11008 = (i__10995_11001 + 1);
seq__10992_10998 = G__11005;
chunk__10993_10999 = G__11006;
count__10994_11000 = G__11007;
i__10995_11001 = G__11008;
continue;
}
} else
{var temp__4092__auto___11009 = cljs.core.seq.call(null,seq__10992_10998);if(temp__4092__auto___11009)
{var seq__10992_11010__$1 = temp__4092__auto___11009;if(cljs.core.chunked_seq_QMARK_.call(null,seq__10992_11010__$1))
{var c__4262__auto___11011 = cljs.core.chunk_first.call(null,seq__10992_11010__$1);{
var G__11012 = cljs.core.chunk_rest.call(null,seq__10992_11010__$1);
var G__11013 = c__4262__auto___11011;
var G__11014 = cljs.core.count.call(null,c__4262__auto___11011);
var G__11015 = 0;
seq__10992_10998 = G__11012;
chunk__10993_10999 = G__11013;
count__10994_11000 = G__11014;
i__10995_11001 = G__11015;
continue;
}
} else
{var vec__10997_11016 = cljs.core.first.call(null,seq__10992_11010__$1);var ev__3326__auto___11017 = cljs.core.nth.call(null,vec__10997_11016,0,null);var func__3327__auto___11018 = cljs.core.nth.call(null,vec__10997_11016,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11017,func__3327__auto___11018);
{
var G__11019 = cljs.core.next.call(null,seq__10992_11010__$1);
var G__11020 = null;
var G__11021 = 0;
var G__11022 = 0;
seq__10992_10998 = G__11019;
chunk__10993_10999 = G__11020;
count__10994_11000 = G__11021;
i__10995_11001 = G__11022;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.find.replace_all_button = (function replace_all_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,"button","button",3931183780),"all"], null));var seq__11029_11035 = 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.sidebar.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"find.replace-all","find.replace-all",2877618629));
})], null)));var chunk__11030_11036 = null;var count__11031_11037 = 0;var i__11032_11038 = 0;while(true){
if((i__11032_11038 < count__11031_11037))
{var vec__11033_11039 = cljs.core._nth.call(null,chunk__11030_11036,i__11032_11038);var ev__3326__auto___11040 = cljs.core.nth.call(null,vec__11033_11039,0,null);var func__3327__auto___11041 = cljs.core.nth.call(null,vec__11033_11039,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11040,func__3327__auto___11041);
{
var G__11042 = seq__11029_11035;
var G__11043 = chunk__11030_11036;
var G__11044 = count__11031_11037;
var G__11045 = (i__11032_11038 + 1);
seq__11029_11035 = G__11042;
chunk__11030_11036 = G__11043;
count__11031_11037 = G__11044;
i__11032_11038 = G__11045;
continue;
}
} else
{var temp__4092__auto___11046 = cljs.core.seq.call(null,seq__11029_11035);if(temp__4092__auto___11046)
{var seq__11029_11047__$1 = temp__4092__auto___11046;if(cljs.core.chunked_seq_QMARK_.call(null,seq__11029_11047__$1))
{var c__4262__auto___11048 = cljs.core.chunk_first.call(null,seq__11029_11047__$1);{
var G__11049 = cljs.core.chunk_rest.call(null,seq__11029_11047__$1);
var G__11050 = c__4262__auto___11048;
var G__11051 = cljs.core.count.call(null,c__4262__auto___11048);
var G__11052 = 0;
seq__11029_11035 = G__11049;
chunk__11030_11036 = G__11050;
count__11031_11037 = G__11051;
i__11032_11038 = G__11052;
continue;
}
} else
{var vec__11034_11053 = cljs.core.first.call(null,seq__11029_11047__$1);var ev__3326__auto___11054 = cljs.core.nth.call(null,vec__11034_11053,0,null);var func__3327__auto___11055 = cljs.core.nth.call(null,vec__11034_11053,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___11054,func__3327__auto___11055);
{
var G__11056 = cljs.core.next.call(null,seq__11029_11047__$1);
var G__11057 = null;
var G__11058 = 0;
var G__11059 = 0;
seq__11029_11035 = G__11056;
chunk__11030_11036 = G__11057;
count__11031_11037 = G__11058;
i__11032_11038 = G__11059;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.find.current_ed = (function current_ed(){return lt.objs.editor.__GT_cm_ed.call(null,lt.objs.editor.pool.last_active.call(null));
});
lt.objs.find.__GT_shown_width = (function __GT_shown_width(shown_QMARK_){if(cljs.core.truth_(shown_QMARK_))
{return "";
} else
{return "0";
}
});
lt.objs.find.__GT_val = (function __GT_val(this$){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.find","input.find",2354911439),lt.object.__GT_content.call(null,this$)));
});
lt.objs.find.__GT_replacement = (function __GT_replacement(this$){return lt.util.dom.val.call(null,lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input.replace","input.replace",1121297410),lt.object.__GT_content.call(null,this$)));
});
lt.objs.find.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.find","input.find",2354911439),lt.object.__GT_content.call(null,this$)),v);
});
lt.objs.find.__BEH__show_BANG_ = (function __BEH__show_BANG_(this$){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"pos","pos",1014015430),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.__GT_cursor.call(null,ed);
} else
{return null;
}
})()], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","show!","lt.objs.find/show!",2146764764),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__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.find.__BEH__hide_BANG_ = (function __BEH__hide_BANG_(this$){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var ed = temp__4092__auto__;return lt.objs.editor.focus.call(null,ed);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","hide!","lt.objs.find/hide!",2156838397),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__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.find.__BEH__next_BANG_ = (function __BEH__next_BANG_(this$){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;if(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"searching?","searching?",4599032247).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(and__3508__auto__))
{return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"searching.for","searching.for",2610146695).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur)),lt.objs.find.__GT_val.call(null,this$));
} else
{return and__3508__auto__;
}
})()))
{return CodeMirror.commands.findNext(lt.objs.find.current_ed.call(null),new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.objs.find.__GT_val.call(null,this$));
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","next!","lt.objs.find/next!",2149177006),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__next_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,"next!","next!",1118619392),null], null), null));
lt.objs.find.__BEH__prev_BANG_ = (function __BEH__prev_BANG_(this$){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var cur = temp__4092__auto__;if(cljs.core.truth_((function (){var and__3508__auto__ = new cljs.core.Keyword(null,"searching?","searching?",4599032247).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(and__3508__auto__))
{return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"searching.for","searching.for",2610146695).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,cur)),lt.objs.find.__GT_val.call(null,this$));
} else
{return and__3508__auto__;
}
})()))
{return CodeMirror.commands.findPrev(lt.objs.find.current_ed.call(null),new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.objs.find.__GT_val.call(null,this$));
}
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","prev!","lt.objs.find/prev!",2146953582),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__prev_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,"prev!","prev!",1120835520),null], null), null));
lt.objs.find.__BEH__focus_BANG_ = (function __BEH__focus_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.focus.call(null,input);
return input.select();
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","focus!","lt.objs.find/focus!",3523298151),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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.find.__BEH__clear_BANG_ = (function __BEH__clear_BANG_(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searching?","searching?",4599032247),false], null));
var temp__4092__auto___11060 = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto___11060))
{var ed_11061 = temp__4092__auto___11060;CodeMirror.commands.clearSearch(lt.objs.editor.__GT_cm_ed.call(null,ed_11061));
} else
{}
var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));if(cljs.core._EQ_.call(null,"",lt.util.dom.val.call(null,input)))
{return lt.util.dom.val.call(null,input,"");
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","clear!","lt.objs.find/clear!",2808649292),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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.find.__BEH__replace_BANG_ = (function __BEH__replace_BANG_(this$,all_QMARK_){if(cljs.core.truth_(new cljs.core.Keyword(null,"searching?","searching?",4599032247).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{} else
{lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"search!","search!",2982232811),lt.objs.find.__GT_val.call(null,this$));
}
CodeMirror.commands.replace(lt.objs.editor.__GT_cm_ed.call(null,lt.objs.editor.pool.last_active.call(null)),lt.objs.find.__GT_replacement.call(null,this$),new cljs.core.Keyword(null,"reverse?","reverse?",749403407).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),cljs.core.boolean$.call(null,all_QMARK_));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"next!","next!",1118619392));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","replace!","lt.objs.find/replace!",1610475715),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__replace_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,"replace!","replace!",583571295),null], null), null));
lt.objs.find.__BEH__search_BANG_ = (function __BEH__search_BANG_(this$,v){if(cljs.core.empty_QMARK_.call(null,v))
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
} else
{var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var e = temp__4092__auto__;var temp__4092__auto___11062__$1 = new cljs.core.Keyword(null,"pos","pos",1014015430).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));if(cljs.core.truth_(temp__4092__auto___11062__$1))
{var pos_11063 = temp__4092__auto___11062__$1;lt.objs.editor.move_cursor.call(null,e,pos_11063);
} else
{}
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searching?","searching?",4599032247),true], null));
lt.object.merge_BANG_.call(null,e,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"searching.for","searching.for",2610146695),v], null));
var ed = lt.objs.editor.__GT_cm_ed.call(null,e);return CodeMirror.commands.find(ed,v,new cljs.core.Keyword(null,"reverse?","reverse?",749403407).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.find","search!","lt.objs.find/search!",4580588119),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__search_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,"search!","search!",2982232811),null], null), null),new cljs.core.Keyword(null,"debounce","debounce",1556599227),50);
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","find-bar","lt.objs.find/find-bar",1860577053),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"find-bar","find-bar",4628501873),null], null), null),new cljs.core.Keyword(null,"height","height",4087841945),30,new cljs.core.Keyword(null,"order","order",1119910592),-1,new cljs.core.Keyword(null,"searching?","searching?",4599032247),false,new cljs.core.Keyword(null,"reverse?","reverse?",749403407),false,new cljs.core.Keyword(null,"shown","shown",1123317891),false,new cljs.core.Keyword(null,"pos","pos",1014015430),null,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#find-bar","div#find-bar",4400386339),lt.objs.find.input.call(null,this$),lt.objs.find.replace_input.call(null,this$),lt.objs.find.replace_all_button.call(null,this$)], null);
}));
lt.objs.find.__BEH__init = (function __BEH__init(this$){lt.util.load.js.call(null,"core/node_modules/codemirror_addons/search.js",new cljs.core.Keyword(null,"sync","sync",1017449997));
return lt.util.load.js.call(null,"core/node_modules/codemirror/addon/search/searchcursor.js",new cljs.core.Keyword(null,"sync","sync",1017449997));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","init","lt.objs.find/init",2521376816),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__BEH__init,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.find.bar = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.find","find-bar","lt.objs.find/find-bar",1860577053));
lt.objs.statusbar.add_container.call(null,lt.objs.find.bar);
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,"find.show","find.show",1398717828),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: In current editor",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (rev_QMARK_){lt.object.merge_BANG_.call(null,lt.objs.find.bar,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"reverse?","reverse?",749403407),rev_QMARK_], null));
lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"show!","show!",1123317814));
return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"focus!","focus!",4039653819));
})], 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,"find.fill-selection","find.fill-selection",632770057),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Fill with selection",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.editor.pool.last_active.call(null);if(cljs.core.truth_(temp__4092__auto__))
{var e = temp__4092__auto__;var temp__4092__auto____$1 = lt.objs.editor.selection.call(null,e);if(cljs.core.truth_(temp__4092__auto____$1))
{var sel = temp__4092__auto____$1;if(cljs.core.empty_QMARK_.call(null,sel))
{return null;
} else
{return lt.objs.find.set_val.call(null,lt.objs.find.bar,sel);
}
} else
{return null;
}
} else
{return 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,"find.clear","find.clear",4338523466),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Clear the find bar",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
})], 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,"find.hide","find.hide",1398390729),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Hide the find bar",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"hide!","hide!",1113177745));
})], 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,"find.next","find.next",1398566266),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Next find result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"next!","next!",1118619392));
})], 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,"find.prev","find.prev",1398637754),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Previous find result",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"prev!","prev!",1120835520));
})], 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,"find.replace","find.replace",755032817),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Replace current",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"replace!","replace!",583571295));
})], 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,"find.replace-all","find.replace-all",2877618629),new cljs.core.Keyword(null,"desc","desc",1016984067),"Find: Replace all occurrences",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.object.raise.call(null,lt.objs.find.bar,new cljs.core.Keyword(null,"replace!","replace!",583571295),new cljs.core.Keyword(null,"all","all",1014000915));
})], null));
lt.objs.find.line_input = lt.objs.sidebar.command.options_input.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"placeholder","placeholder",1612151013),"line number"], null));
lt.objs.find.__BEH__exec_active_BANG_ = (function __BEH__exec_active_BANG_(this$,l){return lt.objs.sidebar.command.exec_active_BANG_.call(null,l);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.find","exec-active!","lt.objs.find/exec-active!",4519874941),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.find.__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,"select","select",4402849902),null], null), null));
lt.object.add_behavior_BANG_.call(null,lt.objs.find.line_input,new cljs.core.Keyword("lt.objs.find","exec-active!","lt.objs.find/exec-active!",4519874941));
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,"goto-line","goto-line",2802035088),new cljs.core.Keyword(null,"desc","desc",1016984067),"Editor: Goto line",new cljs.core.Keyword(null,"options","options",4059396624),lt.objs.find.line_input,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (l){if((typeof l === 'number') || (!(cljs.core.empty_QMARK_.call(null,l))))
{var cur = lt.objs.editor.pool.last_active.call(null);lt.objs.editor.move_cursor.call(null,cur,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"ch","ch",1013907415),0,new cljs.core.Keyword(null,"line","line",1017226086),(((!(typeof l === 'number'))?parseInt(l):l) - 1)], null));
return lt.objs.editor.center_cursor.call(null,cur);
} else
{return null;
}
})], null));
