// Compiled by ClojureScript 0.0-2138
goog.provide('lt.objs.version');
goog.require('cljs.core');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.files');
goog.require('lt.objs.opener');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.files');
goog.require('lt.objs.opener');
goog.require('lt.objs.deploy');
goog.require('lt.objs.editor');
goog.require('lt.object');
goog.require('lt.object');
goog.require('lt.objs.tabs');
goog.require('lt.objs.editor');
goog.require('lt.objs.editor.pool');
goog.require('lt.objs.sidebar.command');
goog.require('lt.objs.deploy');
lt.objs.version.check_button = (function check_button(){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,"div.button","div.button",2319197857),"Check for updates"], null));var seq__14251_14257 = cljs.core.seq.call(null,cljs.core.partition.call(null,2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"click","click",1108654330),(function (){return lt.objs.deploy.check_version.call(null,true);
})], null)));var chunk__14252_14258 = null;var count__14253_14259 = 0;var i__14254_14260 = 0;while(true){
if((i__14254_14260 < count__14253_14259))
{var vec__14255_14261 = cljs.core._nth.call(null,chunk__14252_14258,i__14254_14260);var ev__3326__auto___14262 = cljs.core.nth.call(null,vec__14255_14261,0,null);var func__3327__auto___14263 = cljs.core.nth.call(null,vec__14255_14261,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14262,func__3327__auto___14263);
{
var G__14264 = seq__14251_14257;
var G__14265 = chunk__14252_14258;
var G__14266 = count__14253_14259;
var G__14267 = (i__14254_14260 + 1);
seq__14251_14257 = G__14264;
chunk__14252_14258 = G__14265;
count__14253_14259 = G__14266;
i__14254_14260 = G__14267;
continue;
}
} else
{var temp__4092__auto___14268 = cljs.core.seq.call(null,seq__14251_14257);if(temp__4092__auto___14268)
{var seq__14251_14269__$1 = temp__4092__auto___14268;if(cljs.core.chunked_seq_QMARK_.call(null,seq__14251_14269__$1))
{var c__4262__auto___14270 = cljs.core.chunk_first.call(null,seq__14251_14269__$1);{
var G__14271 = cljs.core.chunk_rest.call(null,seq__14251_14269__$1);
var G__14272 = c__4262__auto___14270;
var G__14273 = cljs.core.count.call(null,c__4262__auto___14270);
var G__14274 = 0;
seq__14251_14257 = G__14271;
chunk__14252_14258 = G__14272;
count__14253_14259 = G__14273;
i__14254_14260 = G__14274;
continue;
}
} else
{var vec__14256_14275 = cljs.core.first.call(null,seq__14251_14269__$1);var ev__3326__auto___14276 = cljs.core.nth.call(null,vec__14256_14275,0,null);var func__3327__auto___14277 = cljs.core.nth.call(null,vec__14256_14275,1,null);lt.util.dom.on.call(null,e__3325__auto__,ev__3326__auto___14276,func__3327__auto___14277);
{
var G__14278 = cljs.core.next.call(null,seq__14251_14269__$1);
var G__14279 = null;
var G__14280 = 0;
var G__14281 = 0;
seq__14251_14257 = G__14278;
chunk__14252_14258 = G__14279;
count__14253_14259 = G__14280;
i__14254_14260 = G__14281;
continue;
}
}
} else
{}
}
break;
}
return e__3325__auto__;
});
lt.objs.version.__BEH__on_show_refresh_eds = (function __BEH__on_show_refresh_eds(this$){return lt.object.raise.call(null,new cljs.core.Keyword(null,"ed","ed",1013907473).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null,this$)),new cljs.core.Keyword(null,"show","show",1017433711));
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.version","on-show-refresh-eds","lt.objs.version/on-show-refresh-eds",3549853297),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.version.__BEH__on_show_refresh_eds,new cljs.core.Keyword(null,"triggers","triggers",2516997421),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"show","show",1017433711),null], null), null));
lt.objs.version.__BEH__destroy_on_close = (function __BEH__destroy_on_close(this$){return lt.object.destroy_BANG_.call(null,this$);
});
lt.object.behavior_STAR_.call(null,new cljs.core.Keyword("lt.objs.version","destroy-on-close","lt.objs.version/destroy-on-close",2424697494),new cljs.core.Keyword(null,"reaction","reaction",4441361819),lt.objs.version.__BEH__destroy_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",1108660586),null], null), null));
lt.object.object_STAR_.call(null,new cljs.core.Keyword("lt.objs.version","version-pane","lt.objs.version/version-pane",1326997590),new cljs.core.Keyword(null,"tags","tags",1017456523),new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"version","version",1365512266),null], null), null),new cljs.core.Keyword(null,"name","name",1017277949),"Version",new cljs.core.Keyword(null,"init","init",1017141378),(function (this$){var main = lt.objs.editor.pool.create.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"mime","mime",1017255846),"markdown",new cljs.core.Keyword(null,"content","content",1965434859),new cljs.core.Keyword(null,"content","content",1965434859).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null,lt.objs.files.lt_home.call(null,"/core/changelog.md")))], null));lt.object.merge_BANG_.call(null,this$,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"ed","ed",1013907473),main], null));
return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div#version-info","div#version-info",3819681447),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"div.info","div.info",1323843421),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dl","dl",1013907450),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dt","dt",1013907458),"Light Table version"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dd","dd",1013907442),new cljs.core.Keyword(null,"version","version",1365512266).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dt","dt",1013907458),"Binary version"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dd","dd",1013907442),lt.objs.deploy.binary_version.call(null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dt","dt",1013907458),"Plugins directory",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dd","dd",1013907442),lt.objs.files.lt_user_dir.call(null,"plugins")], null)], null)], null),lt.objs.version.check_button.call(null)], null),lt.objs.editor.__GT_elem.call(null,main)], null);
}));
lt.objs.version.add = (function add(){var v = lt.object.create.call(null,new cljs.core.Keyword("lt.objs.version","version-pane","lt.objs.version/version-pane",1326997590));lt.objs.tabs.add_BANG_.call(null,v);
return lt.objs.tabs.active_BANG_.call(null,v);
});
lt.objs.sidebar.command.command.call(null,new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"command","command",1964298941),new cljs.core.Keyword(null,"version","version",1365512266),new cljs.core.Keyword(null,"desc","desc",1016984067),"App: Light Table version",new cljs.core.Keyword(null,"exec","exec",1017031683),(function (_){return lt.objs.version.add.call(null);
})], null));
