// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.sidebar.workspace');
goog.require('cljs.core');
goog.require('lt.util.cljs');
goog.require('crate.binding');
goog.require('lt.objs.menu');
goog.require('lt.objs.files');
goog.require('lt.objs.opener');
goog.require('lt.util.dom');
goog.require('lt.objs.sidebar');
goog.require('lt.objs.context');
goog.require('lt.objs.popup');
goog.require('lt.objs.dialogs');
goog.require('lt.objs.popup');
goog.require('lt.objs.workspace');
goog.require('lt.objs.context');
goog.require('lt.objs.workspace');
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.menu');
goog.require('lt.objs.files');
goog.require('lt.objs.opener');
goog.require('clojure.string');
goog.require('crate.binding');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.dialogs');
goog.require('lt.objs.command');
lt.objs.sidebar.workspace.files_and_folders = (function files_and_folders(path){var fs = lt.objs.workspace.files_and_folders.call(null,path);return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"files","files",1111338473),cljs.core.mapv.call(null,(function (p1__12731_SHARP_){return lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.file","lt.objs.sidebar.workspace/workspace.file",4597702653),p1__12731_SHARP_);
}),new cljs.core.Keyword(null,"files","files",1111338473).cljs$core$IFn$_invoke$arity$1(fs)),new cljs.core.Keyword(null,"folders","folders",4625622327),cljs.core.mapv.call(null,(function (p1__12732_SHARP_){return lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.folder","lt.objs.sidebar.workspace/workspace.folder",1951235275),p1__12732_SHARP_);
}),new cljs.core.Keyword(null,"folders","folders",4625622327).cljs$core$IFn$_invoke$arity$1(fs))], null);
});
lt.objs.sidebar.workspace.root_folder = (function root_folder(path){return lt.object.add_tags.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.folder","lt.objs.sidebar.workspace/workspace.folder",1951235275),path),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"workspace.folder.root","workspace.folder.root",4665807355)], null));
});
lt.objs.sidebar.workspace.root_file = (function root_file(path){return lt.object.add_tags.call(null,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.file","lt.objs.sidebar.workspace/workspace.file",4597702653),path),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"workspace.file.root","workspace.file.root",532025197)], null));
});
lt.objs.sidebar.workspace.remove_child = (function remove_child(p,child){if(cljs.core.truth_(lt.object.has_tag_QMARK_.call(null,child,new cljs.core.Keyword(null,"workspace.file","workspace.file",1768213159))))
{return lt.object.update_BANG_.call(null,p,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"files","files",1111338473)], null),(function (cur){return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.PersistentHashSet.fromArray([child], true),cur));
}));
} else
{return lt.object.update_BANG_.call(null,p,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"folders","folders",4625622327)], null),(function (cur){return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.PersistentHashSet.fromArray([child], true),cur));
}));
}
});
lt.objs.sidebar.workspace.find_by_path = (function find_by_path(path){return cljs.core.first.call(null,cljs.core.filter.call(null,(function (p1__12733_SHARP_){return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__12733_SHARP_)),path);
}),lt.object.by_tag.call(null,new cljs.core.Keyword(null,"tree-item","tree-item",999403348))));
});
lt.objs.sidebar.workspace.__BEH__add_ws_folder = (function __BEH__add_ws_folder(this$,path){return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"add.folder!","add.folder!",2151595160),path);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","add-ws-folder","lt.objs.sidebar.workspace/add-ws-folder",3077183263),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__add_ws_folder,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"workspace.add.folder!","workspace.add.folder!",1443047615),null], null), null));
lt.objs.sidebar.workspace.__BEH__add_ws_file = (function __BEH__add_ws_file(this$,path){lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"add.file!","add.file!",4237252106),path);
return lt.object.raise.call(null,cljs.core.first.call(null,lt.object.by_tag.call(null,new cljs.core.Keyword(null,"opener","opener",4298292201))),new cljs.core.Keyword(null,"open!","open!",1119852169),path);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","add-ws-file","lt.objs.sidebar.workspace/add-ws-file",3890882145),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__add_ws_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"workspace.add.file!","workspace.add.file!",821993457),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_open_ls = (function __BEH__on_open_ls(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open?","open?",1119852199),true], null));
if(cljs.core.truth_(new cljs.core.Keyword(null,"realized?","realized?",4433874243).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return null;
} else
{lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"realized?","realized?",4433874243),true], null));
lt.object.merge_BANG_.call(null,this$,lt.objs.sidebar.workspace.files_and_folders.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));
var folder = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"ul","ul",1013907977),lt.object.__GT_content.call(null,this$));var width = lt.util.dom.scroll_width.call(null,folder);var seq__12738 = cljs.core.seq.call(null,lt.util.dom.children.call(null,folder));var chunk__12739 = null;var count__12740 = 0;var i__12741 = 0;while(true){
if((i__12741 < count__12740))
{var child = cljs.core._nth.call(null,chunk__12739,i__12741);lt.util.dom.css.call(null,child,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"width","width",1127031096),width], null));
{
var G__12742 = seq__12738;
var G__12743 = chunk__12739;
var G__12744 = count__12740;
var G__12745 = (i__12741 + 1);
seq__12738 = G__12742;
chunk__12739 = G__12743;
count__12740 = G__12744;
i__12741 = G__12745;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__12738);if(temp__4092__auto__)
{var seq__12738__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12738__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__12738__$1);{
var G__12746 = cljs.core.chunk_rest.call(null,seq__12738__$1);
var G__12747 = c__4262__auto__;
var G__12748 = cljs.core.count.call(null,c__4262__auto__);
var G__12749 = 0;
seq__12738 = G__12746;
chunk__12739 = G__12747;
count__12740 = G__12748;
i__12741 = G__12749;
continue;
}
} else
{var child = cljs.core.first.call(null,seq__12738__$1);lt.util.dom.css.call(null,child,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"width","width",1127031096),width], null));
{
var G__12750 = cljs.core.next.call(null,seq__12738__$1);
var G__12751 = null;
var G__12752 = 0;
var G__12753 = 0;
seq__12738 = G__12750;
chunk__12739 = G__12751;
count__12740 = G__12752;
i__12741 = G__12753;
continue;
}
}
} else
{return null;
}
}
break;
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-open-ls","lt.objs.sidebar.workspace/on-open-ls",636886726),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_open_ls,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open!","open!",1119852169),null], null), null));
lt.objs.sidebar.workspace.__BEH__refresh = (function __BEH__refresh(this$){var seq__12758_12762 = cljs.core.seq.call(null,cljs.core.concat.call(null,new cljs.core.Keyword(null,"files","files",1111338473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"folders","folders",4625622327).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));var chunk__12759_12763 = null;var count__12760_12764 = 0;var i__12761_12765 = 0;while(true){
if((i__12761_12765 < count__12760_12764))
{var f_12766 = cljs.core._nth.call(null,chunk__12759_12763,i__12761_12765);lt.object.destroy_BANG_.call(null,f_12766);
{
var G__12767 = seq__12758_12762;
var G__12768 = chunk__12759_12763;
var G__12769 = count__12760_12764;
var G__12770 = (i__12761_12765 + 1);
seq__12758_12762 = G__12767;
chunk__12759_12763 = G__12768;
count__12760_12764 = G__12769;
i__12761_12765 = G__12770;
continue;
}
} else
{var temp__4092__auto___12771 = cljs.core.seq.call(null,seq__12758_12762);if(temp__4092__auto___12771)
{var seq__12758_12772__$1 = temp__4092__auto___12771;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12758_12772__$1))
{var c__4262__auto___12773 = cljs.core.chunk_first.call(null,seq__12758_12772__$1);{
var G__12774 = cljs.core.chunk_rest.call(null,seq__12758_12772__$1);
var G__12775 = c__4262__auto___12773;
var G__12776 = cljs.core.count.call(null,c__4262__auto___12773);
var G__12777 = 0;
seq__12758_12762 = G__12774;
chunk__12759_12763 = G__12775;
count__12760_12764 = G__12776;
i__12761_12765 = G__12777;
continue;
}
} else
{var f_12778 = cljs.core.first.call(null,seq__12758_12772__$1);lt.object.destroy_BANG_.call(null,f_12778);
{
var G__12779 = cljs.core.next.call(null,seq__12758_12772__$1);
var G__12780 = null;
var G__12781 = 0;
var G__12782 = 0;
seq__12758_12762 = G__12779;
chunk__12759_12763 = G__12780;
count__12760_12764 = G__12781;
i__12761_12765 = G__12782;
continue;
}
}
} else
{}
}
break;
}
lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"refresh","refresh",2099349069),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.merge_BANG_.call(null,this$,lt.objs.sidebar.workspace.files_and_folders.call(null,new cljs.core.Keyword(null,"path","path",1017337751).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.workspace","refresh","lt.objs.sidebar.workspace/refresh",4526611623),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__refresh,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.workspace.__BEH__on_close = (function __BEH__on_close(this$){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open?","open?",1119852199),false], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-close","lt.objs.sidebar.workspace/on-close",2768332408),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_close,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close!","close!",3951350939),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_open_file = (function __BEH__on_open_file(this$){return lt.object.raise.call(null,lt.objs.opener.opener,new cljs.core.Keyword(null,"open!","open!",1119852169),new cljs.core.Keyword(null,"path","path",1017337751).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.workspace","on-open-file","lt.objs.sidebar.workspace/on-open-file",535182993),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_open_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open!","open!",1119852169),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_remove = (function __BEH__on_remove(this$,item){if(cljs.core.truth_(lt.object.has_tag_QMARK_.call(null,item,new cljs.core.Keyword(null,"workspace.folder","workspace.folder",4355811161))))
{return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"remove.folder!","remove.folder!",1531423099),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,item)));
} else
{return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"remove.file!","remove.file!",3382976429),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,item)));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-remove","lt.objs.sidebar.workspace/on-remove",3327022336),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_remove,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"remove!","remove!",2105740175),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_clear = (function __BEH__on_clear(this$){return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-clear","lt.objs.sidebar.workspace/on-clear",2768322211),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_clear,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.workspace.__BEH__on_ws_add = (function __BEH__on_ws_add(ws,f){if(cljs.core.truth_(lt.objs.files.file_QMARK_.call(null,f)))
{return lt.object.update_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"files","files",1111338473)], null),cljs.core.conj,lt.objs.sidebar.workspace.root_file.call(null,f));
} else
{return lt.object.update_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"folders","folders",4625622327)], null),cljs.core.conj,lt.objs.sidebar.workspace.root_folder.call(null,f));
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-ws-add","lt.objs.sidebar.workspace/on-ws-add",2946370468),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_ws_add,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"add","add",1014000659),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_ws_remove = (function __BEH__on_ws_remove(ws,f){var item = lt.objs.sidebar.workspace.find_by_path.call(null,f);if(cljs.core.truth_(lt.objs.files.file_QMARK_.call(null,f)))
{lt.object.update_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"files","files",1111338473)], null),(function (cur){return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.PersistentHashSet.fromArray([item], true),cur));
}));
} else
{lt.object.update_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"folders","folders",4625622327)], null),(function (cur){return cljs.core.vec.call(null,cljs.core.remove.call(null,cljs.core.PersistentHashSet.fromArray([item], true),cur));
}));
}
return lt.object.destroy_BANG_.call(null,item);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-ws-remove","lt.objs.sidebar.workspace/on-ws-remove",3507655435),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_ws_remove,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"remove","remove",4374260726),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_ws_set = (function __BEH__on_ws_set(ws){var map__12784 = cljs.core.deref.call(null,ws);var map__12784__$1 = ((cljs.core.seq_QMARK_.call(null,map__12784))?cljs.core.apply.call(null,cljs.core.hash_map,map__12784):map__12784);var files = cljs.core.get.call(null,map__12784__$1,new cljs.core.Keyword(null,"files","files",1111338473));var folders = cljs.core.get.call(null,map__12784__$1,new cljs.core.Keyword(null,"folders","folders",4625622327));return lt.object.merge_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"files","files",1111338473),cljs.core.mapv.call(null,lt.objs.sidebar.workspace.root_file,files),new cljs.core.Keyword(null,"folders","folders",4625622327),cljs.core.mapv.call(null,lt.objs.sidebar.workspace.root_folder,folders),new cljs.core.Keyword(null,"open-dirs","open-dirs",2513590939),cljs.core.PersistentHashSet.EMPTY], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-ws-set","lt.objs.sidebar.workspace/on-ws-set",2946355043),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_ws_set,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","set",1014018004),null], null), null));
lt.objs.sidebar.workspace.__BEH__track_and_watch_open_dirs = (function __BEH__track_and_watch_open_dirs(this$){lt.objs.workspace.watch_BANG_.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.update_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"open-dirs","open-dirs",2513590939)], null),cljs.core.conj,new cljs.core.Keyword(null,"path","path",1017337751).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.workspace","track-and-watch-open-dirs","lt.objs.sidebar.workspace/track-and-watch-open-dirs",3304823039),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__track_and_watch_open_dirs,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open!","open!",1119852169),null], null), null));
lt.objs.sidebar.workspace.__BEH__untrack_closed_dirs = (function __BEH__untrack_closed_dirs(this$){return lt.object.update_BANG_.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"open-dirs","open-dirs",2513590939)], null),cljs.core.disj,new cljs.core.Keyword(null,"path","path",1017337751).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.workspace","untrack-closed-dirs","lt.objs.sidebar.workspace/untrack-closed-dirs",3049036598),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__untrack_closed_dirs,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"close!","close!",3951350939),null], null), null));
lt.objs.sidebar.workspace.__BEH__watch_open_dirs_paths = (function __BEH__watch_open_dirs_paths(this$,cur){return cljs.core.concat.call(null,cur,new cljs.core.Keyword(null,"open-dirs","open-dirs",2513590939).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.sidebar.workspace.tree)));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","watch-open-dirs-paths","lt.objs.sidebar.workspace/watch-open-dirs-paths",4677839158),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__watch_open_dirs_paths,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watch-paths+","watch-paths+",2265407277),null], null), null));
lt.objs.sidebar.workspace.__BEH__watched__DOT__delete = (function __BEH__watched__DOT__delete(ws,path){var temp__4092__auto__ = lt.objs.sidebar.workspace.find_by_path.call(null,path);if(cljs.core.truth_(temp__4092__auto__))
{var child = temp__4092__auto__;var temp__4092__auto___12785__$1 = lt.objs.sidebar.workspace.find_by_path.call(null,lt.objs.files.parent.call(null,path));if(cljs.core.truth_(temp__4092__auto___12785__$1))
{var p_12786 = temp__4092__auto___12785__$1;lt.objs.sidebar.workspace.remove_child.call(null,p_12786,child);
} else
{}
return lt.object.destroy_BANG_.call(null,child);
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","watched.delete","lt.objs.sidebar.workspace/watched.delete",3594533591),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__watched__DOT__delete,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watched.delete","watched.delete",766354781),null], null), null));
lt.objs.sidebar.workspace.__BEH__watched__DOT__create = (function __BEH__watched__DOT__create(ws,path){if(cljs.core.truth_((function (){var and__3508__auto__ = lt.objs.sidebar.workspace.find_by_path.call(null,path);if(cljs.core.truth_(and__3508__auto__))
{return cljs.core.not.call(null,cljs.core.re_seq.call(null,lt.objs.files.ignore_pattern,lt.objs.files.basename.call(null,path)));
} else
{return and__3508__auto__;
}
})()))
{return null;
} else
{var temp__4092__auto__ = lt.objs.sidebar.workspace.find_by_path.call(null,lt.objs.files.parent.call(null,path));if(cljs.core.truth_(temp__4092__auto__))
{var parent = temp__4092__auto__;if(cljs.core.truth_(new cljs.core.Keyword(null,"realized?","realized?",4433874243).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,parent))))
{if(cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null,path)))
{return lt.object.update_BANG_.call(null,parent,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"folders","folders",4625622327)], null),cljs.core.conj,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.folder","lt.objs.sidebar.workspace/workspace.folder",1951235275),path));
} else
{return lt.object.update_BANG_.call(null,parent,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"files","files",1111338473)], null),cljs.core.conj,lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.file","lt.objs.sidebar.workspace/workspace.file",4597702653),path));
}
} else
{return null;
}
} else
{return null;
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","watched.create","lt.objs.sidebar.workspace/watched.create",3712177670),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__watched__DOT__create,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"watched.create","watched.create",749519022),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_drop = (function __BEH__on_drop(this$,e){var size = e.dataTransfer.files.length;var i = 0;while(true){
if((i < size))
{var path_12787 = (e.dataTransfer.files[i]).path;if(cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null,path_12787)))
{lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"add.folder!","add.folder!",2151595160),path_12787);
} else
{lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"add.file!","add.file!",4237252106),path_12787);
}
{
var G__12788 = (i + 1);
i = G__12788;
continue;
}
} else
{return null;
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-drop","lt.objs.sidebar.workspace/on-drop",2605653733),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_drop,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"drop","drop",1016996449),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_menu = (function __BEH__on_menu(this$,e){var items = cljs.core.sort_by.call(null,new cljs.core.Keyword(null,"order","order",1119910592),lt.object.raise_reduce.call(null,this$,new cljs.core.Keyword(null,"menu-items","menu-items",3782623556),cljs.core.PersistentVector.EMPTY));return lt.objs.menu.show_menu.call(null,lt.objs.menu.menu.call(null,items));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-menu","lt.objs.sidebar.workspace/on-menu",2605385333),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_menu,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu!","menu!",1117686292),null], null), null));
lt.objs.sidebar.workspace.__BEH__on_root_menu = (function __BEH__on_root_menu(this$,items){return cljs.core.conj.call(null,items,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"separator",new cljs.core.Keyword(null,"order","order",1119910592),9], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Remove from workspace",new cljs.core.Keyword(null,"order","order",1119910592),10,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.Keyword(null,"remove!","remove!",2105740175),this$);
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","on-root-menu","lt.objs.sidebar.workspace/on-root-menu",2948325830),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__on_root_menu,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu-items","menu-items",3782623556),null], null), null));
lt.objs.sidebar.workspace.__BEH__subfile_menu = (function __BEH__subfile_menu(this$,items){return cljs.core.conj.call(null,items,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Duplicate",new cljs.core.Keyword(null,"order","order",1119910592),1,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"duplicate!","duplicate!",3906488296));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Rename",new cljs.core.Keyword(null,"order","order",1119910592),2,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Delete",new cljs.core.Keyword(null,"order","order",1119910592),3,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"delete!","delete!",2564367176));
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","subfile-menu","lt.objs.sidebar.workspace/subfile-menu",2571608754),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__subfile_menu,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu-items","menu-items",3782623556),null], null), null));
lt.objs.sidebar.workspace.__BEH__subfolder_menu = (function __BEH__subfolder_menu(this$,items){return cljs.core.conj.call(null,items,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"New file",new cljs.core.Keyword(null,"order","order",1119910592),0,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"new-file!","new-file!",3612062506));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Rename",new cljs.core.Keyword(null,"order","order",1119910592),2,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522));
})], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"separator",new cljs.core.Keyword(null,"order","order",1119910592),3], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"New folder",new cljs.core.Keyword(null,"order","order",1119910592),4,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"new-folder!","new-folder!",2639811000));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Delete folder",new cljs.core.Keyword(null,"order","order",1119910592),5,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"delete!","delete!",2564367176));
})], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"label","label",1116631654),"Refresh folder",new cljs.core.Keyword(null,"order","order",1119910592),6,new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","subfolder-menu","lt.objs.sidebar.workspace/subfolder-menu",1537446372),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__subfolder_menu,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu-items","menu-items",3782623556),null], null), null));
lt.objs.sidebar.workspace.__BEH__force_delete_file = (function __BEH__force_delete_file(this$){lt.objs.files.delete_BANG_.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
lt.util.dom.remove.call(null,lt.object.__GT_content.call(null,this$));
lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"watched.delete","watched.delete",766354781),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.destroy_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","force-delete-file","lt.objs.sidebar.workspace/force-delete-file",1104151110),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__force_delete_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"force-delete!","force-delete!",2129098342),null], null), null));
lt.objs.sidebar.workspace.__BEH__delete_file = (function __BEH__delete_file(this$){return lt.objs.popup.popup_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"header","header",4087600639),"Delete this file?",new cljs.core.Keyword(null,"body","body",1016933652),[cljs.core.str("This will delete "),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),cljs.core.str(" from disk and cannot be undone.")].join(''),new cljs.core.Keyword(null,"buttons","buttons",1255256819),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Delete file",new cljs.core.Keyword(null,"action","action",3885920680),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"force-delete!","force-delete!",2129098342));
})], null),lt.objs.popup.cancel_button], null)], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","delete-file","lt.objs.sidebar.workspace/delete-file",2141449508),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__delete_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"delete!","delete!",2564367176),null], null), null));
lt.objs.sidebar.workspace.__BEH__force_delete_folder = (function __BEH__force_delete_folder(this$){lt.objs.files.delete_BANG_.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
lt.util.dom.remove.call(null,lt.object.__GT_content.call(null,this$));
lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"watched.delete","watched.delete",766354781),new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.destroy_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","force-delete-folder","lt.objs.sidebar.workspace/force-delete-folder",3126323540),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__force_delete_folder,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"force-delete!","force-delete!",2129098342),null], null), null));
lt.objs.sidebar.workspace.__BEH__delete_folder = (function __BEH__delete_folder(this$){return lt.objs.popup.popup_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"header","header",4087600639),"Delete this folder?",new cljs.core.Keyword(null,"body","body",1016933652),[cljs.core.str("This will delete "),cljs.core.str(new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),cljs.core.str(" from disk and cannot be undone.")].join(''),new cljs.core.Keyword(null,"buttons","buttons",1255256819),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Delete folder",new cljs.core.Keyword(null,"action","action",3885920680),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"force-delete!","force-delete!",2129098342));
})], null),lt.objs.popup.cancel_button], null)], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","delete-folder","lt.objs.sidebar.workspace/delete-folder",915989682),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__delete_folder,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"delete!","delete!",2564367176),null], null), null));
lt.objs.sidebar.workspace.__BEH__new_file_BANG_ = (function __BEH__new_file_BANG_(this$){var ext = (function (){var temp__4090__auto__ = cljs.core.first.call(null,new cljs.core.Keyword(null,"files","files",1111338473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));if(cljs.core.truth_(temp__4090__auto__))
{var ffile = temp__4090__auto__;var temp__4092__auto__ = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,ffile));if(cljs.core.truth_(temp__4092__auto__))
{var path = temp__4092__auto__;return lt.objs.files.ext.call(null,path);
} else
{return null;
}
} else
{return "txt";
}
})();var path = lt.objs.files.join.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),[cljs.core.str("untitled."),cljs.core.str(ext)].join(''));var final_path = lt.objs.files.next_available_name.call(null,path);var folder = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.file","lt.objs.sidebar.workspace/workspace.file",4597702653),final_path);lt.object.update_BANG_.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"files","files",1111338473)], null),cljs.core.conj,folder);
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open?","open?",1119852199),true], null));
lt.objs.files.save.call(null,final_path,"");
lt.object.raise.call(null,lt.objs.opener.opener,new cljs.core.Keyword(null,"open!","open!",1119852169),final_path);
return lt.object.raise.call(null,folder,new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","new-file!","lt.objs.sidebar.workspace/new-file!",539117946),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__new_file_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,"new-file!","new-file!",3612062506),null], null), null));
lt.objs.sidebar.workspace.__BEH__new_folder_BANG_ = (function __BEH__new_folder_BANG_(this$){var path = lt.objs.files.join.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),"NewFolder");var final_path = lt.objs.files.next_available_name.call(null,path);var folder = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.folder","lt.objs.sidebar.workspace/workspace.folder",1951235275),final_path);lt.object.update_BANG_.call(null,this$,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"folders","folders",4625622327)], null),cljs.core.conj,folder);
lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"open?","open?",1119852199),true], null));
lt.objs.files.mkdir.call(null,final_path);
return lt.object.raise.call(null,folder,new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","new-folder!","lt.objs.sidebar.workspace/new-folder!",3994412844),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__new_folder_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,"new-folder!","new-folder!",2639811000),null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_folder = (function __BEH__rename_folder(this$,n){var path = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var neue = lt.objs.files.join.call(null,lt.objs.files.parent.call(null,path),n);if(cljs.core._EQ_.call(null,path,neue))
{return null;
} else
{if(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core.not_EQ_.call(null,clojure.string.lower_case.call(null,path),clojure.string.lower_case.call(null,neue));if(and__3508__auto__)
{return lt.objs.files.exists_QMARK_.call(null,neue);
} else
{return and__3508__auto__;
}
})()))
{return lt.objs.popup.popup_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"header","header",4087600639),"Folder already exists.",new cljs.core.Keyword(null,"body","body",1016933652),[cljs.core.str("The folder "),cljs.core.str(neue),cljs.core.str(" already exists, you'll have to pick a different name.")].join(''),new cljs.core.Keyword(null,"buttons","buttons",1255256819),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"ok",new cljs.core.Keyword(null,"post-action","post-action",4039331701),(function (){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"rename.cancel","rename.cancel",1388940956));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522));
})], null)], null)], null));
} else
{var root_QMARK_ = lt.object.has_tag_QMARK_.call(null,this$,new cljs.core.Keyword(null,"workspace.folder.root","workspace.folder.root",4665807355));lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"path","path",1017337751),neue,new cljs.core.Keyword(null,"realized?","realized?",4433874243),false], null));
lt.objs.files.move_BANG_.call(null,path,neue);
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"refresh!","refresh!",4597922840));
if(cljs.core.truth_(root_QMARK_))
{return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"rename!","rename!",2106237973),path,neue);
} else
{return lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"watched.rename","watched.rename",1167218416),path,neue);
}
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","rename-folder","lt.objs.sidebar.workspace/rename-folder",3567769509),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__rename_folder,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"rename","rename",4374276784),null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_file = (function __BEH__rename_file(this$,n){var path = new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$));var neue = lt.objs.files.join.call(null,lt.objs.files.parent.call(null,path),n);if(cljs.core._EQ_.call(null,path,neue))
{return null;
} else
{if(cljs.core.truth_((function (){var and__3508__auto__ = cljs.core.not_EQ_.call(null,clojure.string.lower_case.call(null,path),clojure.string.lower_case.call(null,neue));if(and__3508__auto__)
{return lt.objs.files.exists_QMARK_.call(null,neue);
} else
{return and__3508__auto__;
}
})()))
{return lt.objs.popup.popup_BANG_.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"header","header",4087600639),"File already exists.",new cljs.core.Keyword(null,"body","body",1016933652),[cljs.core.str("The file"),cljs.core.str(neue),cljs.core.str(" already exists, you'll have to pick a different name.")].join(''),new cljs.core.Keyword(null,"buttons","buttons",1255256819),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"ok",new cljs.core.Keyword(null,"post-action","post-action",4039331701),(function (){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"rename.cancel","rename.cancel",1388940956));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522));
})], null)], null)], null));
} else
{if(cljs.core.truth_((function (){var or__3520__auto__ = lt.object.has_tag_QMARK_.call(null,this$,new cljs.core.Keyword(null,"workspace.folder.root","workspace.folder.root",4665807355));if(cljs.core.truth_(or__3520__auto__))
{return or__3520__auto__;
} else
{return lt.object.has_tag_QMARK_.call(null,this$,new cljs.core.Keyword(null,"workspace.file.root","workspace.file.root",532025197));
}
})()))
{lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"rename!","rename!",2106237973),path,neue);
} else
{lt.object.raise.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"watched.rename","watched.rename",1167218416),path,neue);
}
lt.objs.files.move_BANG_.call(null,path,neue);
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"path","path",1017337751),neue], null));
}
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","rename-file","lt.objs.sidebar.workspace/rename-file",3270197399),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__rename_file,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"rename","rename",4374276784),null], null), null));
lt.objs.sidebar.workspace.__BEH__start_rename = (function __BEH__start_rename(this$){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"renaming?","renaming?",2774795926),true], null));
var input = lt.util.dom.$.call(null,new cljs.core.Keyword(null,"input","input",1114262332),lt.object.__GT_content.call(null,this$));var len = cljs.core.count.call(null,lt.objs.files.without_ext.call(null,lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))));var width = lt.util.dom.scroll_width.call(null,lt.util.dom.parent.call(null,input));lt.util.dom.css.call(null,input,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"width","width",1127031096),width], null));
lt.util.dom.focus.call(null,input);
return lt.util.dom.selection.call(null,input,0,len,"forward");
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","start-rename","lt.objs.sidebar.workspace/start-rename",2390201321),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__start_rename,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"start-rename!","start-rename!",3285764522),null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_focus = (function __BEH__rename_focus(this$){return lt.objs.context.in_BANG_.call(null,new cljs.core.Keyword(null,"tree.rename","tree.rename",1095020288),this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","rename-focus","lt.objs.sidebar.workspace/rename-focus",2321367913),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__rename_focus,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"rename.focus","rename.focus",4215768474),null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_submit = (function __BEH__rename_submit(this$){var val = 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.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"renaming?","renaming?",2774795926),false], null));
return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"rename","rename",4374276784),val);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","rename-submit","lt.objs.sidebar.workspace/rename-submit",3408558955),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__rename_submit,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"rename.submit!","rename.submit!",1632100299),null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_blur = (function __BEH__rename_blur(this$){lt.objs.context.out_BANG_.call(null,new cljs.core.Keyword(null,"tree.rename","tree.rename",1095020288));
if(cljs.core.truth_(new cljs.core.Keyword(null,"renaming?","renaming?",2774795926).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"rename.submit!","rename.submit!",1632100299));
} else
{return null;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","rename-blur","lt.objs.sidebar.workspace/rename-blur",3270310748),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__rename_blur,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"rename.blur","rename.blur",839974025),null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_cancel = (function __BEH__rename_cancel(this$){return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"renaming?","renaming?",2774795926),false], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","rename-cancel","lt.objs.sidebar.workspace/rename-cancel",1720510665),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__rename_cancel,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"rename.cancel!","rename.cancel!",4050107817),null], null), null));
lt.objs.sidebar.workspace.__BEH__duplicate = (function __BEH__duplicate(this$){var base_name = lt.objs.files.without_ext.call(null,lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));var new_name = [cljs.core.str(base_name),cljs.core.str(" copy."),cljs.core.str(lt.objs.files.ext.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))].join('');var new_path = lt.objs.files.join.call(null,lt.objs.files.parent.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))),new_name);return lt.objs.files.copy.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new_path);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","duplicate","lt.objs.sidebar.workspace/duplicate",4108375543),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__duplicate,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"duplicate!","duplicate!",3906488296),null], null), null));
lt.objs.sidebar.workspace.__BEH__destroy_sub_tree = (function __BEH__destroy_sub_tree(this$){var seq__12793 = cljs.core.seq.call(null,cljs.core.concat.call(null,new cljs.core.Keyword(null,"files","files",1111338473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"folders","folders",4625622327).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))));var chunk__12794 = null;var count__12795 = 0;var i__12796 = 0;while(true){
if((i__12796 < count__12795))
{var f = cljs.core._nth.call(null,chunk__12794,i__12796);lt.object.destroy_BANG_.call(null,f);
{
var G__12797 = seq__12793;
var G__12798 = chunk__12794;
var G__12799 = count__12795;
var G__12800 = (i__12796 + 1);
seq__12793 = G__12797;
chunk__12794 = G__12798;
count__12795 = G__12799;
i__12796 = G__12800;
continue;
}
} else
{var temp__4092__auto__ = cljs.core.seq.call(null,seq__12793);if(temp__4092__auto__)
{var seq__12793__$1 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12793__$1))
{var c__4262__auto__ = cljs.core.chunk_first.call(null,seq__12793__$1);{
var G__12801 = cljs.core.chunk_rest.call(null,seq__12793__$1);
var G__12802 = c__4262__auto__;
var G__12803 = cljs.core.count.call(null,c__4262__auto__);
var G__12804 = 0;
seq__12793 = G__12801;
chunk__12794 = G__12802;
count__12795 = G__12803;
i__12796 = G__12804;
continue;
}
} else
{var f = cljs.core.first.call(null,seq__12793__$1);lt.object.destroy_BANG_.call(null,f);
{
var G__12805 = cljs.core.next.call(null,seq__12793__$1);
var G__12806 = null;
var G__12807 = 0;
var G__12808 = 0;
seq__12793 = G__12805;
chunk__12794 = G__12806;
count__12795 = G__12807;
i__12796 = G__12808;
continue;
}
}
} else
{return null;
}
}
break;
}
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","destroy-sub-tree","lt.objs.sidebar.workspace/destroy-sub-tree",2888041796),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__destroy_sub_tree,new cljs.core.Keyword(null,"trigger","trigger",4248979754),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"destroy","destroy",2571277164),null], null), null));
lt.objs.sidebar.workspace.file_toggle = (function file_toggle(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,"p","p",1013904354),crate.binding.bound.call(null,this$,(function (){return lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
}))], null));var seq__12815_12821 = 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,"contextmenu","contextmenu",911789824),(function (e){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"menu!","menu!",1117686292),e);
lt.util.dom.prevent.call(null,e);
return lt.util.dom.stop_propagation.call(null,e);
}),new cljs.core.Keyword(null,"dblclick","dblclick",3463991820),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"dblopen!","dblopen!",3475189659));
}),new cljs.core.Keyword(null,"click","click",1108654330),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"open!","open!",1119852169));
})], null)));var chunk__12816_12822 = null;var count__12817_12823 = 0;var i__12818_12824 = 0;while(true){
if((i__12818_12824 < count__12817_12823))
{var vec__12819_12825 = cljs.core._nth.call(null,chunk__12816_12822,i__12818_12824);var ev__3326__auto___12826 = cljs.core.nth.call(null,vec__12819_12825,0,null);var func__3327__auto___12827 = cljs.core.nth.call(null,vec__12819_12825,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12826,func__3327__auto___12827);
{
var G__12828 = seq__12815_12821;
var G__12829 = chunk__12816_12822;
var G__12830 = count__12817_12823;
var G__12831 = (i__12818_12824 + 1);
seq__12815_12821 = G__12828;
chunk__12816_12822 = G__12829;
count__12817_12823 = G__12830;
i__12818_12824 = G__12831;
continue;
}
} else
{var temp__4092__auto___12832 = cljs.core.seq.call(null,seq__12815_12821);if(temp__4092__auto___12832)
{var seq__12815_12833__$1 = temp__4092__auto___12832;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12815_12833__$1))
{var c__4262__auto___12834 = cljs.core.chunk_first.call(null,seq__12815_12833__$1);{
var G__12835 = cljs.core.chunk_rest.call(null,seq__12815_12833__$1);
var G__12836 = c__4262__auto___12834;
var G__12837 = cljs.core.count.call(null,c__4262__auto___12834);
var G__12838 = 0;
seq__12815_12821 = G__12835;
chunk__12816_12822 = G__12836;
count__12817_12823 = G__12837;
i__12818_12824 = G__12838;
continue;
}
} else
{var vec__12820_12839 = cljs.core.first.call(null,seq__12815_12833__$1);var ev__3326__auto___12840 = cljs.core.nth.call(null,vec__12820_12839,0,null);var func__3327__auto___12841 = cljs.core.nth.call(null,vec__12820_12839,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12840,func__3327__auto___12841);
{
var G__12842 = cljs.core.next.call(null,seq__12815_12833__$1);
var G__12843 = null;
var G__12844 = 0;
var G__12845 = 0;
seq__12815_12821 = G__12842;
chunk__12816_12822 = G__12843;
count__12817_12823 = G__12844;
i__12818_12824 = G__12845;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.folder_toggle = (function folder_toggle(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,"p.folder","p.folder",3836630814),crate.binding.bound.call(null,this$,(function (){return [cljs.core.str(lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))),cljs.core.str(lt.objs.files.separator)].join('');
}))], null));var seq__12852_12858 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"contextmenu","contextmenu",911789824),(function (e){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"menu!","menu!",1117686292),e);
lt.util.dom.prevent.call(null,e);
return lt.util.dom.stop_propagation.call(null,e);
}),new cljs.core.Keyword(null,"click","click",1108654330),(function (){if(cljs.core.not.call(null,new cljs.core.Keyword(null,"open?","open?",1119852199).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$))))
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"open!","open!",1119852169));
} else
{return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"close!","close!",3951350939));
}
})], null)));var chunk__12853_12859 = null;var count__12854_12860 = 0;var i__12855_12861 = 0;while(true){
if((i__12855_12861 < count__12854_12860))
{var vec__12856_12862 = cljs.core._nth.call(null,chunk__12853_12859,i__12855_12861);var ev__3326__auto___12863 = cljs.core.nth.call(null,vec__12856_12862,0,null);var func__3327__auto___12864 = cljs.core.nth.call(null,vec__12856_12862,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12863,func__3327__auto___12864);
{
var G__12865 = seq__12852_12858;
var G__12866 = chunk__12853_12859;
var G__12867 = count__12854_12860;
var G__12868 = (i__12855_12861 + 1);
seq__12852_12858 = G__12865;
chunk__12853_12859 = G__12866;
count__12854_12860 = G__12867;
i__12855_12861 = G__12868;
continue;
}
} else
{var temp__4092__auto___12869 = cljs.core.seq.call(null,seq__12852_12858);if(temp__4092__auto___12869)
{var seq__12852_12870__$1 = temp__4092__auto___12869;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12852_12870__$1))
{var c__4262__auto___12871 = cljs.core.chunk_first.call(null,seq__12852_12870__$1);{
var G__12872 = cljs.core.chunk_rest.call(null,seq__12852_12870__$1);
var G__12873 = c__4262__auto___12871;
var G__12874 = cljs.core.count.call(null,c__4262__auto___12871);
var G__12875 = 0;
seq__12852_12858 = G__12872;
chunk__12853_12859 = G__12873;
count__12854_12860 = G__12874;
i__12855_12861 = G__12875;
continue;
}
} else
{var vec__12857_12876 = cljs.core.first.call(null,seq__12852_12870__$1);var ev__3326__auto___12877 = cljs.core.nth.call(null,vec__12857_12876,0,null);var func__3327__auto___12878 = cljs.core.nth.call(null,vec__12857_12876,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12877,func__3327__auto___12878);
{
var G__12879 = cljs.core.next.call(null,seq__12852_12870__$1);
var G__12880 = null;
var G__12881 = 0;
var G__12882 = 0;
seq__12852_12858 = G__12879;
chunk__12853_12859 = G__12880;
count__12854_12860 = G__12881;
i__12855_12861 = G__12882;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.sub_folders = (function sub_folders(p__12885){var map__12901 = p__12885;var map__12901__$1 = ((cljs.core.seq_QMARK_.call(null,map__12901))?cljs.core.apply.call(null,cljs.core.hash_map,map__12901):map__12901);var root_QMARK_ = cljs.core.get.call(null,map__12901__$1,new cljs.core.Keyword(null,"root?","root?",1122602767));var path = cljs.core.get.call(null,map__12901__$1,new cljs.core.Keyword(null,"path","path",1017337751));var open_QMARK_ = cljs.core.get.call(null,map__12901__$1,new cljs.core.Keyword(null,"open?","open?",1119852199));var files = cljs.core.get.call(null,map__12901__$1,new cljs.core.Keyword(null,"files","files",1111338473));var folders = cljs.core.get.call(null,map__12901__$1,new cljs.core.Keyword(null,"folders","folders",4625622327));var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul","ul",1013907977),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),[cljs.core.str((cljs.core.truth_(root_QMARK_)?null:"sub ")),cljs.core.str((cljs.core.truth_(open_QMARK_)?"opened":null))].join('')], null),(function (){var iter__4231__auto__ = (function iter__12902(s__12903){return (new cljs.core.LazySeq(null,(function (){var s__12903__$1 = s__12903;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__12903__$1);if(temp__4092__auto__)
{var s__12903__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__12903__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__12903__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__12905 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__12904 = 0;while(true){
if((i__12904 < size__4230__auto__))
{var f = cljs.core._nth.call(null,c__4229__auto__,i__12904);cljs.core.chunk_append.call(null,b__12905,lt.object.__GT_content.call(null,f));
{
var G__12916 = (i__12904 + 1);
i__12904 = G__12916;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12905),iter__12902.call(null,cljs.core.chunk_rest.call(null,s__12903__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12905),null);
}
} else
{var f = cljs.core.first.call(null,s__12903__$2);return cljs.core.cons.call(null,lt.object.__GT_content.call(null,f),iter__12902.call(null,cljs.core.rest.call(null,s__12903__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,cljs.core.sort_by.call(null,((function (iter__4231__auto__){
return (function (p1__12883_SHARP_){return clojure.string.lower_case.call(null,lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__12883_SHARP_))));
});})(iter__4231__auto__))
,folders));
})(),(function (){var iter__4231__auto__ = (function iter__12906(s__12907){return (new cljs.core.LazySeq(null,(function (){var s__12907__$1 = s__12907;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__12907__$1);if(temp__4092__auto__)
{var s__12907__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__12907__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__12907__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__12909 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__12908 = 0;while(true){
if((i__12908 < size__4230__auto__))
{var f = cljs.core._nth.call(null,c__4229__auto__,i__12908);cljs.core.chunk_append.call(null,b__12909,lt.object.__GT_content.call(null,f));
{
var G__12917 = (i__12908 + 1);
i__12908 = G__12917;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12909),iter__12906.call(null,cljs.core.chunk_rest.call(null,s__12907__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__12909),null);
}
} else
{var f = cljs.core.first.call(null,s__12907__$2);return cljs.core.cons.call(null,lt.object.__GT_content.call(null,f),iter__12906.call(null,cljs.core.rest.call(null,s__12907__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,cljs.core.sort_by.call(null,((function (iter__4231__auto__){
return (function (p1__12884_SHARP_){return clojure.string.lower_case.call(null,lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,p1__12884_SHARP_))));
});})(iter__4231__auto__))
,files));
})()], null));var seq__12910_12918 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__12911_12919 = null;var count__12912_12920 = 0;var i__12913_12921 = 0;while(true){
if((i__12913_12921 < count__12912_12920))
{var vec__12914_12922 = cljs.core._nth.call(null,chunk__12911_12919,i__12913_12921);var ev__3326__auto___12923 = cljs.core.nth.call(null,vec__12914_12922,0,null);var func__3327__auto___12924 = cljs.core.nth.call(null,vec__12914_12922,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12923,func__3327__auto___12924);
{
var G__12925 = seq__12910_12918;
var G__12926 = chunk__12911_12919;
var G__12927 = count__12912_12920;
var G__12928 = (i__12913_12921 + 1);
seq__12910_12918 = G__12925;
chunk__12911_12919 = G__12926;
count__12912_12920 = G__12927;
i__12913_12921 = G__12928;
continue;
}
} else
{var temp__4092__auto___12929 = cljs.core.seq.call(null,seq__12910_12918);if(temp__4092__auto___12929)
{var seq__12910_12930__$1 = temp__4092__auto___12929;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12910_12930__$1))
{var c__4262__auto___12931 = cljs.core.chunk_first.call(null,seq__12910_12930__$1);{
var G__12932 = cljs.core.chunk_rest.call(null,seq__12910_12930__$1);
var G__12933 = c__4262__auto___12931;
var G__12934 = cljs.core.count.call(null,c__4262__auto___12931);
var G__12935 = 0;
seq__12910_12918 = G__12932;
chunk__12911_12919 = G__12933;
count__12912_12920 = G__12934;
i__12913_12921 = G__12935;
continue;
}
} else
{var vec__12915_12936 = cljs.core.first.call(null,seq__12910_12930__$1);var ev__3326__auto___12937 = cljs.core.nth.call(null,vec__12915_12936,0,null);var func__3327__auto___12938 = cljs.core.nth.call(null,vec__12915_12936,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12937,func__3327__auto___12938);
{
var G__12939 = cljs.core.next.call(null,seq__12910_12930__$1);
var G__12940 = null;
var G__12941 = 0;
var G__12942 = 0;
seq__12910_12918 = G__12939;
chunk__12911_12919 = G__12940;
count__12912_12920 = G__12941;
i__12913_12921 = G__12942;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.rename_input = (function rename_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.rename","input.rename",1571488084),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1017479852),"text",new cljs.core.Keyword(null,"value","value",1125876963),lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))], null)], null));var seq__12949_12955 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"focus","focus",1111509066),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"rename.focus","rename.focus",4215768474));
}),new cljs.core.Keyword(null,"blur","blur",1016931289),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"rename.blur","rename.blur",839974025));
})], null)));var chunk__12950_12956 = null;var count__12951_12957 = 0;var i__12952_12958 = 0;while(true){
if((i__12952_12958 < count__12951_12957))
{var vec__12953_12959 = cljs.core._nth.call(null,chunk__12950_12956,i__12952_12958);var ev__3326__auto___12960 = cljs.core.nth.call(null,vec__12953_12959,0,null);var func__3327__auto___12961 = cljs.core.nth.call(null,vec__12953_12959,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12960,func__3327__auto___12961);
{
var G__12962 = seq__12949_12955;
var G__12963 = chunk__12950_12956;
var G__12964 = count__12951_12957;
var G__12965 = (i__12952_12958 + 1);
seq__12949_12955 = G__12962;
chunk__12950_12956 = G__12963;
count__12951_12957 = G__12964;
i__12952_12958 = G__12965;
continue;
}
} else
{var temp__4092__auto___12966 = cljs.core.seq.call(null,seq__12949_12955);if(temp__4092__auto___12966)
{var seq__12949_12967__$1 = temp__4092__auto___12966;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12949_12967__$1))
{var c__4262__auto___12968 = cljs.core.chunk_first.call(null,seq__12949_12967__$1);{
var G__12969 = cljs.core.chunk_rest.call(null,seq__12949_12967__$1);
var G__12970 = c__4262__auto___12968;
var G__12971 = cljs.core.count.call(null,c__4262__auto___12968);
var G__12972 = 0;
seq__12949_12955 = G__12969;
chunk__12950_12956 = G__12970;
count__12951_12957 = G__12971;
i__12952_12958 = G__12972;
continue;
}
} else
{var vec__12954_12973 = cljs.core.first.call(null,seq__12949_12967__$1);var ev__3326__auto___12974 = cljs.core.nth.call(null,vec__12954_12973,0,null);var func__3327__auto___12975 = cljs.core.nth.call(null,vec__12954_12973,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12974,func__3327__auto___12975);
{
var G__12976 = cljs.core.next.call(null,seq__12949_12967__$1);
var G__12977 = null;
var G__12978 = 0;
var G__12979 = 0;
seq__12949_12955 = G__12976;
chunk__12950_12956 = G__12977;
count__12951_12957 = G__12978;
i__12952_12958 = G__12979;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.renameable = (function renameable(this$,cur,content){if(cljs.core.truth_(cur))
{return lt.objs.sidebar.workspace.rename_input.call(null,this$);
} else
{return content;
}
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.file","lt.objs.sidebar.workspace/workspace.file",4597702653),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"tree-item","tree-item",999403348),null,new cljs.core.Keyword(null,"workspace.file","workspace.file",1768213159),null], null), null),new cljs.core.Keyword(null,"path","path",1017337751),"",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,path){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"path","path",1017337751),path], null));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,(function (p1__12980_SHARP_){if(cljs.core.truth_(new cljs.core.Keyword(null,"renaming?","renaming?",2774795926).cljs$core$IFn$_invoke$arity$1(p1__12980_SHARP_)))
{return "renaming";
} else
{return "";
}
}))], null),lt.objs.sidebar.workspace.rename_input.call(null,this$),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.tree-item","div.tree-item",4651075127),lt.objs.sidebar.workspace.file_toggle.call(null,this$)], null)], null);
}));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.folder","lt.objs.sidebar.workspace/workspace.folder",1951235275),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"tree-item","tree-item",999403348),null,new cljs.core.Keyword(null,"workspace.folder","workspace.folder",4355811161),null], null), null),new cljs.core.Keyword(null,"path","path",1017337751),"",new cljs.core.Keyword(null,"open?","open?",1119852199),false,new cljs.core.Keyword(null,"realized?","realized?",4433874243),false,new cljs.core.Keyword(null,"folders","folders",4625622327),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"files","files",1111338473),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,path){lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"path","path",1017337751),path], null));
return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"class","class",1108647146),crate.binding.bound.call(null,this$,(function (p1__12981_SHARP_){if(cljs.core.truth_(new cljs.core.Keyword(null,"renaming?","renaming?",2774795926).cljs$core$IFn$_invoke$arity$1(p1__12981_SHARP_)))
{return "renaming";
} else
{return "";
}
}))], null),lt.objs.sidebar.workspace.rename_input.call(null,this$),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.tree-item","div.tree-item",4651075127),(cljs.core.truth_(path)?lt.objs.sidebar.workspace.folder_toggle.call(null,this$):null),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,this$,lt.objs.sidebar.workspace.sub_folders)], null)], null)], null);
}));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.root","lt.objs.sidebar.workspace/workspace.root",4597214311),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"workspace.root","workspace.root",1768576525),null], null), null),new cljs.core.Keyword(null,"root?","root?",1122602767),true,new cljs.core.Keyword(null,"open-dirs","open-dirs",2513590939),cljs.core.PersistentHashSet.EMPTY,new cljs.core.Keyword(null,"files","files",1111338473),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"folders","folders",4625622327),cljs.core.PersistentVector.EMPTY,new cljs.core.Keyword(null,"open?","open?",1119852199),true,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.tree-root","div.tree-root",4651338758),crate.binding.bound.call(null,this$,lt.objs.sidebar.workspace.sub_folders)], null);
}));
lt.objs.sidebar.workspace.tree = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.root","lt.objs.sidebar.workspace/workspace.root",4597214311));
lt.objs.sidebar.workspace.input = (function input(type,event){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","input",1114262332),new cljs.core.PersistentArrayMap.fromArray([new cljs.core.Keyword(null,"type","type",1017479852),"file",type,true,new cljs.core.Keyword(null,"style","style",1123684643),"display:none;"], true, false)], null));var seq__12988_12994 = 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,"change","change",3947235106),(function (){var me = this;if(cljs.core.empty_QMARK_.call(null,lt.util.dom.val.call(null,me)))
{return null;
} else
{return lt.object.raise.call(null,lt.objs.sidebar.workspace.tree,event,lt.util.dom.val.call(null,me));
}
})], null)));var chunk__12989_12995 = null;var count__12990_12996 = 0;var i__12991_12997 = 0;while(true){
if((i__12991_12997 < count__12990_12996))
{var vec__12992_12998 = cljs.core._nth.call(null,chunk__12989_12995,i__12991_12997);var ev__3326__auto___12999 = cljs.core.nth.call(null,vec__12992_12998,0,null);var func__3327__auto___13000 = cljs.core.nth.call(null,vec__12992_12998,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___12999,func__3327__auto___13000);
{
var G__13001 = seq__12988_12994;
var G__13002 = chunk__12989_12995;
var G__13003 = count__12990_12996;
var G__13004 = (i__12991_12997 + 1);
seq__12988_12994 = G__13001;
chunk__12989_12995 = G__13002;
count__12990_12996 = G__13003;
i__12991_12997 = G__13004;
continue;
}
} else
{var temp__4092__auto___13005 = cljs.core.seq.call(null,seq__12988_12994);if(temp__4092__auto___13005)
{var seq__12988_13006__$1 = temp__4092__auto___13005;if(cljs.core.chunked_seq_QMARK_.call(null,seq__12988_13006__$1))
{var c__4262__auto___13007 = cljs.core.chunk_first.call(null,seq__12988_13006__$1);{
var G__13008 = cljs.core.chunk_rest.call(null,seq__12988_13006__$1);
var G__13009 = c__4262__auto___13007;
var G__13010 = cljs.core.count.call(null,c__4262__auto___13007);
var G__13011 = 0;
seq__12988_12994 = G__13008;
chunk__12989_12995 = G__13009;
count__12990_12996 = G__13010;
i__12991_12997 = G__13011;
continue;
}
} else
{var vec__12993_13012 = cljs.core.first.call(null,seq__12988_13006__$1);var ev__3326__auto___13013 = cljs.core.nth.call(null,vec__12993_13012,0,null);var func__3327__auto___13014 = cljs.core.nth.call(null,vec__12993_13012,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13013,func__3327__auto___13014);
{
var G__13015 = cljs.core.next.call(null,seq__12988_13006__$1);
var G__13016 = null;
var G__13017 = 0;
var G__13018 = 0;
seq__12988_12994 = G__13015;
chunk__12989_12995 = G__13016;
count__12990_12996 = G__13017;
i__12991_12997 = G__13018;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.open_folder = (function open_folder(){return lt.objs.dialogs.dir.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.Keyword(null,"workspace.add.folder!","workspace.add.folder!",1443047615));
});
lt.objs.sidebar.workspace.open_file = (function open_file(){return lt.objs.dialogs.file.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.Keyword(null,"workspace.add.file!","workspace.add.file!",821993457));
});
lt.objs.sidebar.workspace.button = (function button(name,action){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),name], null));var seq__13025_13031 = 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),action], null)));var chunk__13026_13032 = null;var count__13027_13033 = 0;var i__13028_13034 = 0;while(true){
if((i__13028_13034 < count__13027_13033))
{var vec__13029_13035 = cljs.core._nth.call(null,chunk__13026_13032,i__13028_13034);var ev__3326__auto___13036 = cljs.core.nth.call(null,vec__13029_13035,0,null);var func__3327__auto___13037 = cljs.core.nth.call(null,vec__13029_13035,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13036,func__3327__auto___13037);
{
var G__13038 = seq__13025_13031;
var G__13039 = chunk__13026_13032;
var G__13040 = count__13027_13033;
var G__13041 = (i__13028_13034 + 1);
seq__13025_13031 = G__13038;
chunk__13026_13032 = G__13039;
count__13027_13033 = G__13040;
i__13028_13034 = G__13041;
continue;
}
} else
{var temp__4092__auto___13042 = cljs.core.seq.call(null,seq__13025_13031);if(temp__4092__auto___13042)
{var seq__13025_13043__$1 = temp__4092__auto___13042;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13025_13043__$1))
{var c__4262__auto___13044 = cljs.core.chunk_first.call(null,seq__13025_13043__$1);{
var G__13045 = cljs.core.chunk_rest.call(null,seq__13025_13043__$1);
var G__13046 = c__4262__auto___13044;
var G__13047 = cljs.core.count.call(null,c__4262__auto___13044);
var G__13048 = 0;
seq__13025_13031 = G__13045;
chunk__13026_13032 = G__13046;
count__13027_13033 = G__13047;
i__13028_13034 = G__13048;
continue;
}
} else
{var vec__13030_13049 = cljs.core.first.call(null,seq__13025_13043__$1);var ev__3326__auto___13050 = cljs.core.nth.call(null,vec__13030_13049,0,null);var func__3327__auto___13051 = cljs.core.nth.call(null,vec__13030_13049,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13050,func__3327__auto___13051);
{
var G__13052 = cljs.core.next.call(null,seq__13025_13043__$1);
var G__13053 = null;
var G__13054 = 0;
var G__13055 = 0;
seq__13025_13031 = G__13052;
chunk__13026_13032 = G__13053;
count__13027_13033 = G__13054;
i__13028_13034 = G__13055;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.recent = (function recent(this$){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"recent!","recent!",2096199832));
});
lt.objs.sidebar.workspace.recents_item = (function recents_item(this$){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.folders","ul.folders",4036689120),(function (){var iter__4231__auto__ = (function iter__13070(s__13071){return (new cljs.core.LazySeq(null,(function (){var s__13071__$1 = s__13071;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__13071__$1);if(temp__4092__auto__)
{var s__13071__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__13071__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__13071__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__13073 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__13072 = 0;while(true){
if((i__13072 < size__4230__auto__))
{var f = cljs.core._nth.call(null,c__4229__auto__,i__13072);cljs.core.chunk_append.call(null,b__13073,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),lt.objs.files.basename.call(null,f),lt.objs.files.separator], null));
{
var G__13084 = (i__13072 + 1);
i__13072 = G__13084;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13073),iter__13070.call(null,cljs.core.chunk_rest.call(null,s__13071__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13073),null);
}
} else
{var f = cljs.core.first.call(null,s__13071__$2);return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),lt.objs.files.basename.call(null,f),lt.objs.files.separator], null),iter__13070.call(null,cljs.core.rest.call(null,s__13071__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,new cljs.core.Keyword(null,"folders","folders",4625622327).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
})()], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.files","ul.files",1539775442),(function (){var iter__4231__auto__ = (function iter__13074(s__13075){return (new cljs.core.LazySeq(null,(function (){var s__13075__$1 = s__13075;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__13075__$1);if(temp__4092__auto__)
{var s__13075__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__13075__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__13075__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__13077 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__13076 = 0;while(true){
if((i__13076 < size__4230__auto__))
{var f = cljs.core._nth.call(null,c__4229__auto__,i__13076);cljs.core.chunk_append.call(null,b__13077,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),lt.objs.files.basename.call(null,f)], null));
{
var G__13085 = (i__13076 + 1);
i__13076 = G__13085;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13077),iter__13074.call(null,cljs.core.chunk_rest.call(null,s__13075__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13077),null);
}
} else
{var f = cljs.core.first.call(null,s__13075__$2);return cljs.core.cons.call(null,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li","li",1013907695),lt.objs.files.basename.call(null,f)], null),iter__13074.call(null,cljs.core.rest.call(null,s__13075__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,new cljs.core.Keyword(null,"files","files",1111338473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
})()], null)], null));var seq__13078_13086 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"contextmenu","contextmenu",911789824),(function (e){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"menu!","menu!",1117686292),e);
lt.util.dom.prevent.call(null,e);
return lt.util.dom.stop_propagation.call(null,e);
}),new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"select!","select!",2992004631));
})], null)));var chunk__13079_13087 = null;var count__13080_13088 = 0;var i__13081_13089 = 0;while(true){
if((i__13081_13089 < count__13080_13088))
{var vec__13082_13090 = cljs.core._nth.call(null,chunk__13079_13087,i__13081_13089);var ev__3326__auto___13091 = cljs.core.nth.call(null,vec__13082_13090,0,null);var func__3327__auto___13092 = cljs.core.nth.call(null,vec__13082_13090,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13091,func__3327__auto___13092);
{
var G__13093 = seq__13078_13086;
var G__13094 = chunk__13079_13087;
var G__13095 = count__13080_13088;
var G__13096 = (i__13081_13089 + 1);
seq__13078_13086 = G__13093;
chunk__13079_13087 = G__13094;
count__13080_13088 = G__13095;
i__13081_13089 = G__13096;
continue;
}
} else
{var temp__4092__auto___13097 = cljs.core.seq.call(null,seq__13078_13086);if(temp__4092__auto___13097)
{var seq__13078_13098__$1 = temp__4092__auto___13097;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13078_13098__$1))
{var c__4262__auto___13099 = cljs.core.chunk_first.call(null,seq__13078_13098__$1);{
var G__13100 = cljs.core.chunk_rest.call(null,seq__13078_13098__$1);
var G__13101 = c__4262__auto___13099;
var G__13102 = cljs.core.count.call(null,c__4262__auto___13099);
var G__13103 = 0;
seq__13078_13086 = G__13100;
chunk__13079_13087 = G__13101;
count__13080_13088 = G__13102;
i__13081_13089 = G__13103;
continue;
}
} else
{var vec__13083_13104 = cljs.core.first.call(null,seq__13078_13098__$1);var ev__3326__auto___13105 = cljs.core.nth.call(null,vec__13083_13104,0,null);var func__3327__auto___13106 = cljs.core.nth.call(null,vec__13083_13104,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13105,func__3327__auto___13106);
{
var G__13107 = cljs.core.next.call(null,seq__13078_13098__$1);
var G__13108 = null;
var G__13109 = 0;
var G__13110 = 0;
seq__13078_13086 = G__13107;
chunk__13079_13087 = G__13108;
count__13080_13088 = G__13109;
i__13081_13089 = G__13110;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.back_button = (function back_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),"Select a workspace"], null));var seq__13117_13123 = 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,"tree!","tree!",1124529077));
})], null)));var chunk__13118_13124 = null;var count__13119_13125 = 0;var i__13120_13126 = 0;while(true){
if((i__13120_13126 < count__13119_13125))
{var vec__13121_13127 = cljs.core._nth.call(null,chunk__13118_13124,i__13120_13126);var ev__3326__auto___13128 = cljs.core.nth.call(null,vec__13121_13127,0,null);var func__3327__auto___13129 = cljs.core.nth.call(null,vec__13121_13127,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13128,func__3327__auto___13129);
{
var G__13130 = seq__13117_13123;
var G__13131 = chunk__13118_13124;
var G__13132 = count__13119_13125;
var G__13133 = (i__13120_13126 + 1);
seq__13117_13123 = G__13130;
chunk__13118_13124 = G__13131;
count__13119_13125 = G__13132;
i__13120_13126 = G__13133;
continue;
}
} else
{var temp__4092__auto___13134 = cljs.core.seq.call(null,seq__13117_13123);if(temp__4092__auto___13134)
{var seq__13117_13135__$1 = temp__4092__auto___13134;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13117_13135__$1))
{var c__4262__auto___13136 = cljs.core.chunk_first.call(null,seq__13117_13135__$1);{
var G__13137 = cljs.core.chunk_rest.call(null,seq__13117_13135__$1);
var G__13138 = c__4262__auto___13136;
var G__13139 = cljs.core.count.call(null,c__4262__auto___13136);
var G__13140 = 0;
seq__13117_13123 = G__13137;
chunk__13118_13124 = G__13138;
count__13119_13125 = G__13139;
i__13120_13126 = G__13140;
continue;
}
} else
{var vec__13122_13141 = cljs.core.first.call(null,seq__13117_13135__$1);var ev__3326__auto___13142 = cljs.core.nth.call(null,vec__13122_13141,0,null);var func__3327__auto___13143 = cljs.core.nth.call(null,vec__13122_13141,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13142,func__3327__auto___13143);
{
var G__13144 = cljs.core.next.call(null,seq__13117_13135__$1);
var G__13145 = null;
var G__13146 = 0;
var G__13147 = 0;
seq__13117_13123 = G__13144;
chunk__13118_13124 = G__13145;
count__13119_13125 = G__13146;
i__13120_13126 = G__13147;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.recents = (function recents(this$,rs){var e__3325__auto__ = crate.core.html.call(null,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div","div",1014003715),lt.objs.sidebar.workspace.back_button.call(null,this$),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul","ul",1013907977),(function (){var iter__4231__auto__ = (function iter__13158(s__13159){return (new cljs.core.LazySeq(null,(function (){var s__13159__$1 = s__13159;while(true){
var temp__4092__auto__ = cljs.core.seq.call(null,s__13159__$1);if(temp__4092__auto__)
{var s__13159__$2 = temp__4092__auto__;if(cljs.core.chunked_seq_QMARK_.call(null,s__13159__$2))
{var c__4229__auto__ = cljs.core.chunk_first.call(null,s__13159__$2);var size__4230__auto__ = cljs.core.count.call(null,c__4229__auto__);var b__13161 = cljs.core.chunk_buffer.call(null,size__4230__auto__);if((function (){var i__13160 = 0;while(true){
if((i__13160 < size__4230__auto__))
{var r = cljs.core._nth.call(null,c__4229__auto__,i__13160);cljs.core.chunk_append.call(null,b__13161,lt.object.__GT_content.call(null,r));
{
var G__13168 = (i__13160 + 1);
i__13160 = G__13168;
continue;
}
} else
{return true;
}
break;
}
})())
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13161),iter__13158.call(null,cljs.core.chunk_rest.call(null,s__13159__$2)));
} else
{return cljs.core.chunk_cons.call(null,cljs.core.chunk.call(null,b__13161),null);
}
} else
{var r = cljs.core.first.call(null,s__13159__$2);return cljs.core.cons.call(null,lt.object.__GT_content.call(null,r),iter__13158.call(null,cljs.core.rest.call(null,s__13159__$2)));
}
} else
{return null;
}
break;
}
}),null,null));
});return iter__4231__auto__.call(null,rs);
})()], null)], null));var seq__13162_13169 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,cljs.core.PersistentVector.EMPTY));var chunk__13163_13170 = null;var count__13164_13171 = 0;var i__13165_13172 = 0;while(true){
if((i__13165_13172 < count__13164_13171))
{var vec__13166_13173 = cljs.core._nth.call(null,chunk__13163_13170,i__13165_13172);var ev__3326__auto___13174 = cljs.core.nth.call(null,vec__13166_13173,0,null);var func__3327__auto___13175 = cljs.core.nth.call(null,vec__13166_13173,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13174,func__3327__auto___13175);
{
var G__13176 = seq__13162_13169;
var G__13177 = chunk__13163_13170;
var G__13178 = count__13164_13171;
var G__13179 = (i__13165_13172 + 1);
seq__13162_13169 = G__13176;
chunk__13163_13170 = G__13177;
count__13164_13171 = G__13178;
i__13165_13172 = G__13179;
continue;
}
} else
{var temp__4092__auto___13180 = cljs.core.seq.call(null,seq__13162_13169);if(temp__4092__auto___13180)
{var seq__13162_13181__$1 = temp__4092__auto___13180;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13162_13181__$1))
{var c__4262__auto___13182 = cljs.core.chunk_first.call(null,seq__13162_13181__$1);{
var G__13183 = cljs.core.chunk_rest.call(null,seq__13162_13181__$1);
var G__13184 = c__4262__auto___13182;
var G__13185 = cljs.core.count.call(null,c__4262__auto___13182);
var G__13186 = 0;
seq__13162_13169 = G__13183;
chunk__13163_13170 = G__13184;
count__13164_13171 = G__13185;
i__13165_13172 = G__13186;
continue;
}
} else
{var vec__13167_13187 = cljs.core.first.call(null,seq__13162_13181__$1);var ev__3326__auto___13188 = cljs.core.nth.call(null,vec__13167_13187,0,null);var func__3327__auto___13189 = cljs.core.nth.call(null,vec__13167_13187,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13188,func__3327__auto___13189);
{
var G__13190 = cljs.core.next.call(null,seq__13162_13181__$1);
var G__13191 = null;
var G__13192 = 0;
var G__13193 = 0;
seq__13162_13169 = G__13190;
chunk__13163_13170 = G__13191;
count__13164_13171 = G__13192;
i__13165_13172 = G__13193;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.sidebar.workspace.__BEH__recent_BANG_ = (function __BEH__recent_BANG_(this$){var seq__13199_13203 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"recents","recents",2096199914).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var chunk__13200_13204 = null;var count__13201_13205 = 0;var i__13202_13206 = 0;while(true){
if((i__13202_13206 < count__13201_13205))
{var r_13207 = cljs.core._nth.call(null,chunk__13200_13204,i__13202_13206);lt.object.destroy_BANG_.call(null,r_13207);
{
var G__13208 = seq__13199_13203;
var G__13209 = chunk__13200_13204;
var G__13210 = count__13201_13205;
var G__13211 = (i__13202_13206 + 1);
seq__13199_13203 = G__13208;
chunk__13200_13204 = G__13209;
count__13201_13205 = G__13210;
i__13202_13206 = G__13211;
continue;
}
} else
{var temp__4092__auto___13212 = cljs.core.seq.call(null,seq__13199_13203);if(temp__4092__auto___13212)
{var seq__13199_13213__$1 = temp__4092__auto___13212;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13199_13213__$1))
{var c__4262__auto___13214 = cljs.core.chunk_first.call(null,seq__13199_13213__$1);{
var G__13215 = cljs.core.chunk_rest.call(null,seq__13199_13213__$1);
var G__13216 = c__4262__auto___13214;
var G__13217 = cljs.core.count.call(null,c__4262__auto___13214);
var G__13218 = 0;
seq__13199_13203 = G__13215;
chunk__13200_13204 = G__13216;
count__13201_13205 = G__13217;
i__13202_13206 = G__13218;
continue;
}
} else
{var r_13219 = cljs.core.first.call(null,seq__13199_13213__$1);lt.object.destroy_BANG_.call(null,r_13219);
{
var G__13220 = cljs.core.next.call(null,seq__13199_13213__$1);
var G__13221 = null;
var G__13222 = 0;
var G__13223 = 0;
seq__13199_13203 = G__13220;
chunk__13200_13204 = G__13221;
count__13201_13205 = G__13222;
i__13202_13206 = G__13223;
continue;
}
}
} else
{}
}
break;
}
return lt.object.merge_BANG_.call(null,this$,cljs.core.PersistentHashMap.fromArrays.call(null,[new cljs.core.Keyword(null,"recents","recents",2096199914)],[cljs.core.map.call(null,(function (p1__13194_SHARP_){return lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","recent-workspace","lt.objs.sidebar.workspace/recent-workspace",4144769423),p1__13194_SHARP_);
}),lt.objs.workspace.all.call(null))]));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","recent!","lt.objs.sidebar.workspace/recent!",4521365004),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__recent_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,"recent!","recent!",2096199832),null], null), null));
lt.objs.sidebar.workspace.__BEH__tree_BANG_ = (function __BEH__tree_BANG_(this$){var seq__13228_13232 = cljs.core.seq.call(null,new cljs.core.Keyword(null,"recents","recents",2096199914).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));var chunk__13229_13233 = null;var count__13230_13234 = 0;var i__13231_13235 = 0;while(true){
if((i__13231_13235 < count__13230_13234))
{var r_13236 = cljs.core._nth.call(null,chunk__13229_13233,i__13231_13235);lt.object.destroy_BANG_.call(null,r_13236);
{
var G__13237 = seq__13228_13232;
var G__13238 = chunk__13229_13233;
var G__13239 = count__13230_13234;
var G__13240 = (i__13231_13235 + 1);
seq__13228_13232 = G__13237;
chunk__13229_13233 = G__13238;
count__13230_13234 = G__13239;
i__13231_13235 = G__13240;
continue;
}
} else
{var temp__4092__auto___13241 = cljs.core.seq.call(null,seq__13228_13232);if(temp__4092__auto___13241)
{var seq__13228_13242__$1 = temp__4092__auto___13241;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13228_13242__$1))
{var c__4262__auto___13243 = cljs.core.chunk_first.call(null,seq__13228_13242__$1);{
var G__13244 = cljs.core.chunk_rest.call(null,seq__13228_13242__$1);
var G__13245 = c__4262__auto___13243;
var G__13246 = cljs.core.count.call(null,c__4262__auto___13243);
var G__13247 = 0;
seq__13228_13232 = G__13244;
chunk__13229_13233 = G__13245;
count__13230_13234 = G__13246;
i__13231_13235 = G__13247;
continue;
}
} else
{var r_13248 = cljs.core.first.call(null,seq__13228_13242__$1);lt.object.destroy_BANG_.call(null,r_13248);
{
var G__13249 = cljs.core.next.call(null,seq__13228_13242__$1);
var G__13250 = null;
var G__13251 = 0;
var G__13252 = 0;
seq__13228_13232 = G__13249;
chunk__13229_13233 = G__13250;
count__13230_13234 = G__13251;
i__13231_13235 = G__13252;
continue;
}
}
} else
{}
}
break;
}
return lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"recents","recents",2096199914),null], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","tree!","lt.objs.sidebar.workspace/tree!",3018393903),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__tree_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,"tree!","tree!",1124529077),null], null), null));
lt.objs.sidebar.workspace.__BEH__recent__DOT__select_BANG_ = (function __BEH__recent__DOT__select_BANG_(this$){lt.objs.workspace.open.call(null,lt.objs.workspace.current_ws,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.raise.call(null,lt.objs.sidebar.workspace.sidebar_workspace,new cljs.core.Keyword(null,"tree!","tree!",1124529077));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","recent.select!","lt.objs.sidebar.workspace/recent.select!",2595077856),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__recent__DOT__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.workspace.__BEH__recent__DOT__delete_BANG_ = (function __BEH__recent__DOT__delete_BANG_(this$){if(cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"file","file",1017047278).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,lt.objs.workspace.current_ws)),lt.objs.files.basename.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)))))
{lt.object.raise.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
} else
{}
lt.objs.files.delete_BANG_.call(null,new cljs.core.Keyword(null,"path","path",1017337751).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)));
return lt.object.raise.call(null,lt.objs.sidebar.workspace.sidebar_workspace,new cljs.core.Keyword(null,"recent!","recent!",2096199832));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","recent.delete!","lt.objs.sidebar.workspace/recent.delete!",959251503),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__recent__DOT__delete_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,"delete!","delete!",2564367176),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","recent-workspace","lt.objs.sidebar.workspace/recent-workspace",4144769423),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"recent-workspace","recent-workspace",2388792085),null], null), null),new cljs.core.Keyword(null,"init","init",1017141378),(function (this$,r){lt.object.merge_BANG_.call(null,this$,r);
return lt.objs.sidebar.workspace.recents_item.call(null,this$);
}));
lt.objs.sidebar.workspace.ws_class = (function ws_class(ws){return [cljs.core.str("workspace"),cljs.core.str((cljs.core.truth_(new cljs.core.Keyword(null,"recents","recents",2096199914).cljs$core$IFn$_invoke$arity$1(ws))?" recents":null))].join('');
});
lt.objs.sidebar.workspace.workspace_ui = (function workspace_ui(this$){var e__3325__auto__ = crate.core.html.call(null,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.workspace.ws_class)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.wstree","div.wstree",2918560745),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.buttons","ul.buttons",666323612),lt.objs.sidebar.workspace.button.call(null,"folder",lt.objs.sidebar.workspace.open_folder),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li.sep","li.sep",4204306399),"|"], null),lt.objs.sidebar.workspace.button.call(null,"file",lt.objs.sidebar.workspace.open_file),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"li.sep","li.sep",4204306399),"|"], null),lt.objs.sidebar.workspace.button.call(null,"recent",(function (){return lt.objs.sidebar.workspace.recent.call(null,this$);
}))], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"ul.root","ul.root",615589195),lt.object.__GT_content.call(null,lt.objs.sidebar.workspace.tree)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.recent","div.recent",2761967050),crate.binding.bound.call(null,this$,(function (sw){return lt.objs.sidebar.workspace.recents.call(null,this$,new cljs.core.Keyword(null,"recents","recents",2096199914).cljs$core$IFn$_invoke$arity$1(sw));
}))], null)], null));var seq__13259_13265 = 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,"dragover","dragover",4468024186),(function (e){e.dataTransfer.dropEffect = "move";
lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"dragover","dragover",4468024186),e);
lt.util.dom.prevent.call(null,e);
return false;
}),new cljs.core.Keyword(null,"drop","drop",1016996449),(function (e){lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"drop","drop",1016996449),e);
lt.util.dom.stop_propagation.call(null,e);
return lt.util.dom.prevent.call(null,e);
}),new cljs.core.Keyword(null,"contextmenu","contextmenu",911789824),(function (e){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"menu!","menu!",1117686292),e);
})], null)));var chunk__13260_13266 = null;var count__13261_13267 = 0;var i__13262_13268 = 0;while(true){
if((i__13262_13268 < count__13261_13267))
{var vec__13263_13269 = cljs.core._nth.call(null,chunk__13260_13266,i__13262_13268);var ev__3326__auto___13270 = cljs.core.nth.call(null,vec__13263_13269,0,null);var func__3327__auto___13271 = cljs.core.nth.call(null,vec__13263_13269,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13270,func__3327__auto___13271);
{
var G__13272 = seq__13259_13265;
var G__13273 = chunk__13260_13266;
var G__13274 = count__13261_13267;
var G__13275 = (i__13262_13268 + 1);
seq__13259_13265 = G__13272;
chunk__13260_13266 = G__13273;
count__13261_13267 = G__13274;
i__13262_13268 = G__13275;
continue;
}
} else
{var temp__4092__auto___13276 = cljs.core.seq.call(null,seq__13259_13265);if(temp__4092__auto___13276)
{var seq__13259_13277__$1 = temp__4092__auto___13276;if(cljs.core.chunked_seq_QMARK_.call(null,seq__13259_13277__$1))
{var c__4262__auto___13278 = cljs.core.chunk_first.call(null,seq__13259_13277__$1);{
var G__13279 = cljs.core.chunk_rest.call(null,seq__13259_13277__$1);
var G__13280 = c__4262__auto___13278;
var G__13281 = cljs.core.count.call(null,c__4262__auto___13278);
var G__13282 = 0;
seq__13259_13265 = G__13279;
chunk__13260_13266 = G__13280;
count__13261_13267 = G__13281;
i__13262_13268 = G__13282;
continue;
}
} else
{var vec__13264_13283 = cljs.core.first.call(null,seq__13259_13277__$1);var ev__3326__auto___13284 = cljs.core.nth.call(null,vec__13264_13283,0,null);var func__3327__auto___13285 = cljs.core.nth.call(null,vec__13264_13283,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___13284,func__3327__auto___13285);
{
var G__13286 = cljs.core.next.call(null,seq__13259_13277__$1);
var G__13287 = null;
var G__13288 = 0;
var G__13289 = 0;
seq__13259_13265 = G__13286;
chunk__13260_13266 = G__13287;
count__13261_13267 = G__13288;
i__13262_13268 = G__13289;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","sidebar.workspace","lt.objs.sidebar.workspace/sidebar.workspace",705450607),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.workspace","sidebar.workspace",3781278709),null], null), null),new cljs.core.Keyword(null,"label","label",1116631654),"workspace",new cljs.core.Keyword(null,"order","order",1119910592),-7,new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){return lt.objs.sidebar.workspace.workspace_ui.call(null,this$);
}));
lt.objs.sidebar.workspace.__BEH__sidebar_menu = (function __BEH__sidebar_menu(this$,items){return cljs.core.conj.call(null,items,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Add folder",new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"workspace.add-folder","workspace.add-folder",2772643205));
})], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Add file",new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"workspace.add-file","workspace.add-file",2669358035));
})], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Open recent workspace",new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"workspace.show-recents","workspace.show-recents",1806500563));
})], null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"type","type",1017479852),"separator"], null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Clear workspace",new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,lt.objs.sidebar.workspace.tree,new cljs.core.Keyword(null,"clear!","clear!",3951036134));
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","sidebar-menu","lt.objs.sidebar.workspace/sidebar-menu",3021041170),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__sidebar_menu,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu-items","menu-items",3782623556),null], null), null));
lt.objs.sidebar.workspace.__BEH__recent_menu = (function __BEH__recent_menu(this$,items){return cljs.core.conj.call(null,items,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"label","label",1116631654),"Delete Workspace",new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.object.raise.call(null,this$,new cljs.core.Keyword(null,"delete!","delete!",2564367176));
})], null));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","recent-menu","lt.objs.sidebar.workspace/recent-menu",1238711153),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__recent_menu,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"menu-items","menu-items",3782623556),null], null), null));
lt.objs.sidebar.workspace.__BEH__workspace__DOT__open_on_start = (function __BEH__workspace__DOT__open_on_start(this$){return lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"workspace.show","workspace.show",1768599592));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","workspace.open-on-start","lt.objs.sidebar.workspace/workspace.open-on-start",2867305284),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.sidebar.workspace.__BEH__workspace__DOT__open_on_start,new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: Show workspace on start",new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"init","init",1017141378),null], null), null),new cljs.core.Keyword(null,"type","type",1017479852),new cljs.core.Keyword(null,"user","user",1017503549));
lt.objs.sidebar.workspace.sidebar_workspace = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.sidebar.workspace","sidebar.workspace","lt.objs.sidebar.workspace/sidebar.workspace",705450607));
lt.objs.sidebar.add_item.call(null,lt.objs.sidebar.sidebar,lt.objs.sidebar.workspace.sidebar_workspace);
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"workspace.add-folder","workspace.add-folder",2772643205),new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: add folder",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.workspace.open_folder.call(null);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"workspace.add-file","workspace.add-file",2669358035),new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: add file",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){return lt.objs.sidebar.workspace.open_file.call(null);
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"workspace.show","workspace.show",1768599592),new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: Toggle workspace tree",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (force_QMARK_){return lt.object.raise.call(null,lt.objs.sidebar.sidebar,new cljs.core.Keyword(null,"toggle","toggle",4440567494),lt.objs.sidebar.workspace.sidebar_workspace,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"transient?","transient?",3584270951),false,new cljs.core.Keyword(null,"force?","force?",4040082982),force_QMARK_], null));
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"workspace.rename.cancel!","workspace.rename.cancel!",1179487266),new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: Cancel rename",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"tree.rename","tree.rename",1095020288));if(cljs.core.truth_(temp__4092__auto__))
{var c = temp__4092__auto__;return lt.object.raise.call(null,c,new cljs.core.Keyword(null,"rename.cancel!","rename.cancel!",4050107817));
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"workspace.rename.submit!","workspace.rename.submit!",3056447044),new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: Submit rename",new cljs.core.Keyword(null,"hidden","hidden",4091384092),true,new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){var temp__4092__auto__ = lt.objs.context.__GT_obj.call(null,new cljs.core.Keyword(null,"tree.rename","tree.rename",1095020288));if(cljs.core.truth_(temp__4092__auto__))
{var c = temp__4092__auto__;return lt.object.raise.call(null,c,new cljs.core.Keyword(null,"rename.submit!","rename.submit!",1632100299));
} else
{return null;
}
})], null));
lt.objs.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"workspace.show-recents","workspace.show-recents",1806500563),new cljs.core.Keyword(null,"desc","desc",1016984067),"Workspace: Open recent workspace",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (){lt.objs.command.exec_BANG_.call(null,new cljs.core.Keyword(null,"workspace.show","workspace.show",1768599592),new cljs.core.Keyword(null,"force","force",1111522909));
return lt.objs.sidebar.workspace.recent.call(null,lt.objs.sidebar.workspace.sidebar_workspace);
})], null));
