Skip to content

Instantly share code, notes, and snippets.

@ibdknox
Created May 6, 2013 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibdknox/5525785 to your computer and use it in GitHub Desktop.
Save ibdknox/5525785 to your computer and use it in GitHub Desktop.
fixed line endings
This file has been truncated, but you can view the full file.
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.provide = function(a) {
if(!COMPILED) {
if(goog.isProvided_(a)) {
throw Error('Namespace "' + a + '" already declared.');
}
delete goog.implicitNamespaces_[a];
for(var b = a;(b = b.substring(0, b.lastIndexOf("."))) && !goog.getObjectByName(b);) {
goog.implicitNamespaces_[b] = !0
}
}
goog.exportPath_(a)
};
goog.setTestOnly = function(a) {
if(COMPILED && !goog.DEBUG) {
throw a = a || "", Error("Importing test-only code into non-debug environment" + a ? ": " + a : ".");
}
};
COMPILED || (goog.isProvided_ = function(a) {
return!goog.implicitNamespaces_[a] && !!goog.getObjectByName(a)
}, goog.implicitNamespaces_ = {});
goog.exportPath_ = function(a, b, c) {
a = a.split(".");
c = c || goog.global;
!(a[0] in c) && c.execScript && c.execScript("var " + a[0]);
for(var d;a.length && (d = a.shift());) {
!a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {}
}
};
goog.getObjectByName = function(a, b) {
for(var c = a.split("."), d = b || goog.global, e;e = c.shift();) {
if(goog.isDefAndNotNull(d[e])) {
d = d[e]
}else {
return null
}
}
return d
};
goog.globalize = function(a, b) {
var c = b || goog.global, d;
for(d in a) {
c[d] = a[d]
}
};
goog.addDependency = function(a, b, c) {
if(!COMPILED) {
for(var d, a = a.replace(/\\/g, "/"), e = goog.dependencies_, f = 0;d = b[f];f++) {
e.nameToPath[d] = a, a in e.pathToNames || (e.pathToNames[a] = {}), e.pathToNames[a][d] = !0
}
for(d = 0;b = c[d];d++) {
a in e.requires || (e.requires[a] = {}), e.requires[a][b] = !0
}
}
};
goog.ENABLE_DEBUG_LOADER = !0;
goog.require = function(a) {
if(!COMPILED && !goog.isProvided_(a)) {
if(goog.ENABLE_DEBUG_LOADER) {
var b = goog.getPathFromDeps_(a);
if(b) {
goog.included_[b] = !0;
goog.writeScripts_();
return
}
}
a = "goog.require could not find: " + a;
goog.global.console && goog.global.console.error(a);
throw Error(a);
}
};
goog.basePath = "";
goog.nullFunction = function() {
};
goog.identityFunction = function(a) {
return a
};
goog.abstractMethod = function() {
throw Error("unimplemented abstract method");
};
goog.addSingletonGetter = function(a) {
a.getInstance = function() {
if(a.instance_) {
return a.instance_
}
goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a);
return a.instance_ = new a
}
};
goog.instantiatedSingletons_ = [];
!COMPILED && goog.ENABLE_DEBUG_LOADER && (goog.included_ = {}, goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}, goog.inHtmlDocument_ = function() {
var a = goog.global.document;
return"undefined" != typeof a && "write" in a
}, goog.findBasePath_ = function() {
if(goog.global.CLOSURE_BASE_PATH) {
goog.basePath = goog.global.CLOSURE_BASE_PATH
}else {
if(goog.inHtmlDocument_()) {
for(var a = goog.global.document.getElementsByTagName("script"), b = a.length - 1;0 <= b;--b) {
var c = a[b].src, d = c.lastIndexOf("?"), d = -1 == d ? c.length : d;
if("base.js" == c.substr(d - 7, 7)) {
goog.basePath = c.substr(0, d - 7);
break
}
}
}
}
}, goog.importScript_ = function(a) {
var b = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
!goog.dependencies_.written[a] && b(a) && (goog.dependencies_.written[a] = !0)
}, goog.writeScriptTag_ = function(a) {
return goog.inHtmlDocument_() ? (goog.global.document.write('<script type="text/javascript" src="' + a + '"><\/script>'), !0) : !1
}, goog.writeScripts_ = function() {
function a(e) {
if(!(e in d.written)) {
if(!(e in d.visited) && (d.visited[e] = !0, e in d.requires)) {
for(var g in d.requires[e]) {
if(!goog.isProvided_(g)) {
if(g in d.nameToPath) {
a(d.nameToPath[g])
}else {
throw Error("Undefined nameToPath for " + g);
}
}
}
}
e in c || (c[e] = !0, b.push(e))
}
}
var b = [], c = {}, d = goog.dependencies_, e;
for(e in goog.included_) {
d.written[e] || a(e)
}
for(e = 0;e < b.length;e++) {
if(b[e]) {
goog.importScript_(goog.basePath + b[e])
}else {
throw Error("Undefined script input");
}
}
}, goog.getPathFromDeps_ = function(a) {
return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] : null
}, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js"));
goog.typeOf = function(a) {
var b = typeof a;
if("object" == b) {
if(a) {
if(a instanceof Array) {
return"array"
}
if(a instanceof Object) {
return b
}
var c = Object.prototype.toString.call(a);
if("[object Window]" == c) {
return"object"
}
if("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) {
return"array"
}
if("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) {
return"function"
}
}else {
return"null"
}
}else {
if("function" == b && "undefined" == typeof a.call) {
return"object"
}
}
return b
};
goog.isDef = function(a) {
return void 0 !== a
};
goog.isNull = function(a) {
return null === a
};
goog.isDefAndNotNull = function(a) {
return null != a
};
goog.isArray = function(a) {
return"array" == goog.typeOf(a)
};
goog.isArrayLike = function(a) {
var b = goog.typeOf(a);
return"array" == b || "object" == b && "number" == typeof a.length
};
goog.isDateLike = function(a) {
return goog.isObject(a) && "function" == typeof a.getFullYear
};
goog.isString = function(a) {
return"string" == typeof a
};
goog.isBoolean = function(a) {
return"boolean" == typeof a
};
goog.isNumber = function(a) {
return"number" == typeof a
};
goog.isFunction = function(a) {
return"function" == goog.typeOf(a)
};
goog.isObject = function(a) {
var b = typeof a;
return"object" == b && null != a || "function" == b
};
goog.getUid = function(a) {
return a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_)
};
goog.removeUid = function(a) {
"removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
try {
delete a[goog.UID_PROPERTY_]
}catch(b) {
}
};
goog.UID_PROPERTY_ = "closure_uid_" + Math.floor(2147483648 * Math.random()).toString(36);
goog.uidCounter_ = 0;
goog.getHashCode = goog.getUid;
goog.removeHashCode = goog.removeUid;
goog.cloneObject = function(a) {
var b = goog.typeOf(a);
if("object" == b || "array" == b) {
if(a.clone) {
return a.clone()
}
var b = "array" == b ? [] : {}, c;
for(c in a) {
b[c] = goog.cloneObject(a[c])
}
return b
}
return a
};
goog.bindNative_ = function(a, b, c) {
return a.call.apply(a.bind, arguments)
};
goog.bindJs_ = function(a, b, c) {
if(!a) {
throw Error();
}
if(2 < arguments.length) {
var d = Array.prototype.slice.call(arguments, 2);
return function() {
var c = Array.prototype.slice.call(arguments);
Array.prototype.unshift.apply(c, d);
return a.apply(b, c)
}
}
return function() {
return a.apply(b, arguments)
}
};
goog.bind = function(a, b, c) {
goog.bind = Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bindNative_ : goog.bindJs_;
return goog.bind.apply(null, arguments)
};
goog.partial = function(a, b) {
var c = Array.prototype.slice.call(arguments, 1);
return function() {
var b = Array.prototype.slice.call(arguments);
b.unshift.apply(b, c);
return a.apply(this, b)
}
};
goog.mixin = function(a, b) {
for(var c in b) {
a[c] = b[c]
}
};
goog.now = Date.now || function() {
return+new Date
};
goog.globalEval = function(a) {
if(goog.global.execScript) {
goog.global.execScript(a, "JavaScript")
}else {
if(goog.global.eval) {
if(null == goog.evalWorksForGlobals_ && (goog.global.eval("var _et_ = 1;"), "undefined" != typeof goog.global._et_ ? (delete goog.global._et_, goog.evalWorksForGlobals_ = !0) : goog.evalWorksForGlobals_ = !1), goog.evalWorksForGlobals_) {
goog.global.eval(a)
}else {
var b = goog.global.document, c = b.createElement("script");
c.type = "text/javascript";
c.defer = !1;
c.appendChild(b.createTextNode(a));
b.body.appendChild(c);
b.body.removeChild(c)
}
}else {
throw Error("goog.globalEval not available");
}
}
};
goog.evalWorksForGlobals_ = null;
goog.getCssName = function(a, b) {
var c = function(a) {
return goog.cssNameMapping_[a] || a
}, d = function(a) {
for(var a = a.split("-"), b = [], d = 0;d < a.length;d++) {
b.push(c(a[d]))
}
return b.join("-")
}, d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function(a) {
return a
};
return b ? a + "-" + d(b) : d(a)
};
goog.setCssNameMapping = function(a, b) {
goog.cssNameMapping_ = a;
goog.cssNameMappingStyle_ = b
};
!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING);
goog.getMsg = function(a, b) {
var c = b || {}, d;
for(d in c) {
var e = ("" + c[d]).replace(/\$/g, "$$$$"), a = a.replace(RegExp("\\{\\$" + d + "\\}", "gi"), e)
}
return a
};
goog.exportSymbol = function(a, b, c) {
goog.exportPath_(a, b, c)
};
goog.exportProperty = function(a, b, c) {
a[b] = c
};
goog.inherits = function(a, b) {
function c() {
}
c.prototype = b.prototype;
a.superClass_ = b.prototype;
a.prototype = new c;
a.prototype.constructor = a
};
goog.base = function(a, b, c) {
var d = arguments.callee.caller;
if(d.superClass_) {
return d.superClass_.constructor.apply(a, Array.prototype.slice.call(arguments, 1))
}
for(var e = Array.prototype.slice.call(arguments, 2), f = !1, g = a.constructor;g;g = g.superClass_ && g.superClass_.constructor) {
if(g.prototype[b] === d) {
f = !0
}else {
if(f) {
return g.prototype[b].apply(a, e)
}
}
}
if(a[b] === d) {
return a.constructor.prototype[b].apply(a, e)
}
throw Error("goog.base called from a method of one name to a method of a different name");
};
goog.scope = function(a) {
a.call(goog.global)
};
goog.debug = {};
goog.debug.Error = function(a) {
Error.captureStackTrace ? Error.captureStackTrace(this, goog.debug.Error) : this.stack = Error().stack || "";
a && (this.message = String(a))
};
goog.inherits(goog.debug.Error, Error);
goog.debug.Error.prototype.name = "CustomError";
goog.string = {};
goog.string.Unicode = {NBSP:"\u00a0"};
goog.string.startsWith = function(a, b) {
return 0 == a.lastIndexOf(b, 0)
};
goog.string.endsWith = function(a, b) {
var c = a.length - b.length;
return 0 <= c && a.indexOf(b, c) == c
};
goog.string.caseInsensitiveStartsWith = function(a, b) {
return 0 == goog.string.caseInsensitiveCompare(b, a.substr(0, b.length))
};
goog.string.caseInsensitiveEndsWith = function(a, b) {
return 0 == goog.string.caseInsensitiveCompare(b, a.substr(a.length - b.length, b.length))
};
goog.string.subs = function(a, b) {
for(var c = 1;c < arguments.length;c++) {
var d = String(arguments[c]).replace(/\$/g, "$$$$"), a = a.replace(/\%s/, d)
}
return a
};
goog.string.collapseWhitespace = function(a) {
return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "")
};
goog.string.isEmpty = function(a) {
return/^[\s\xa0]*$/.test(a)
};
goog.string.isEmptySafe = function(a) {
return goog.string.isEmpty(goog.string.makeSafe(a))
};
goog.string.isBreakingWhitespace = function(a) {
return!/[^\t\n\r ]/.test(a)
};
goog.string.isAlpha = function(a) {
return!/[^a-zA-Z]/.test(a)
};
goog.string.isNumeric = function(a) {
return!/[^0-9]/.test(a)
};
goog.string.isAlphaNumeric = function(a) {
return!/[^a-zA-Z0-9]/.test(a)
};
goog.string.isSpace = function(a) {
return" " == a
};
goog.string.isUnicodeChar = function(a) {
return 1 == a.length && " " <= a && "~" >= a || "\u0080" <= a && "\ufffd" >= a
};
goog.string.stripNewlines = function(a) {
return a.replace(/(\r\n|\r|\n)+/g, " ")
};
goog.string.canonicalizeNewlines = function(a) {
return a.replace(/(\r\n|\r|\n)/g, "\n")
};
goog.string.normalizeWhitespace = function(a) {
return a.replace(/\xa0|\s/g, " ")
};
goog.string.normalizeSpaces = function(a) {
return a.replace(/\xa0|[ \t]+/g, " ")
};
goog.string.collapseBreakingSpaces = function(a) {
return a.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "")
};
goog.string.trim = function(a) {
return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "")
};
goog.string.trimLeft = function(a) {
return a.replace(/^[\s\xa0]+/, "")
};
goog.string.trimRight = function(a) {
return a.replace(/[\s\xa0]+$/, "")
};
goog.string.caseInsensitiveCompare = function(a, b) {
var c = String(a).toLowerCase(), d = String(b).toLowerCase();
return c < d ? -1 : c == d ? 0 : 1
};
goog.string.numerateCompareRegExp_ = /(\.\d+)|(\d+)|(\D+)/g;
goog.string.numerateCompare = function(a, b) {
if(a == b) {
return 0
}
if(!a) {
return-1
}
if(!b) {
return 1
}
for(var c = a.toLowerCase().match(goog.string.numerateCompareRegExp_), d = b.toLowerCase().match(goog.string.numerateCompareRegExp_), e = Math.min(c.length, d.length), f = 0;f < e;f++) {
var g = c[f], h = d[f];
if(g != h) {
return c = parseInt(g, 10), !isNaN(c) && (d = parseInt(h, 10), !isNaN(d) && c - d) ? c - d : g < h ? -1 : 1
}
}
return c.length != d.length ? c.length - d.length : a < b ? -1 : 1
};
goog.string.urlEncode = function(a) {
return encodeURIComponent(String(a))
};
goog.string.urlDecode = function(a) {
return decodeURIComponent(a.replace(/\+/g, " "))
};
goog.string.newLineToBr = function(a, b) {
return a.replace(/(\r\n|\r|\n)/g, b ? "<br />" : "<br>")
};
goog.string.htmlEscape = function(a, b) {
if(b) {
return a.replace(goog.string.amperRe_, "&amp;").replace(goog.string.ltRe_, "&lt;").replace(goog.string.gtRe_, "&gt;").replace(goog.string.quotRe_, "&quot;")
}
if(!goog.string.allRe_.test(a)) {
return a
}
-1 != a.indexOf("&") && (a = a.replace(goog.string.amperRe_, "&amp;"));
-1 != a.indexOf("<") && (a = a.replace(goog.string.ltRe_, "&lt;"));
-1 != a.indexOf(">") && (a = a.replace(goog.string.gtRe_, "&gt;"));
-1 != a.indexOf('"') && (a = a.replace(goog.string.quotRe_, "&quot;"));
return a
};
goog.string.amperRe_ = /&/g;
goog.string.ltRe_ = /</g;
goog.string.gtRe_ = />/g;
goog.string.quotRe_ = /\"/g;
goog.string.allRe_ = /[&<>\"]/;
goog.string.unescapeEntities = function(a) {
return goog.string.contains(a, "&") ? "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a
};
goog.string.unescapeEntitiesUsingDom_ = function(a) {
var b = {"&amp;":"&", "&lt;":"<", "&gt;":">", "&quot;":'"'}, c = document.createElement("div");
return a.replace(goog.string.HTML_ENTITY_PATTERN_, function(a, e) {
var f = b[a];
if(f) {
return f
}
if("#" == e.charAt(0)) {
var g = Number("0" + e.substr(1));
isNaN(g) || (f = String.fromCharCode(g))
}
f || (c.innerHTML = a + " ", f = c.firstChild.nodeValue.slice(0, -1));
return b[a] = f
})
};
goog.string.unescapePureXmlEntities_ = function(a) {
return a.replace(/&([^;]+);/g, function(a, c) {
switch(c) {
case "amp":
return"&";
case "lt":
return"<";
case "gt":
return">";
case "quot":
return'"';
default:
if("#" == c.charAt(0)) {
var d = Number("0" + c.substr(1));
if(!isNaN(d)) {
return String.fromCharCode(d)
}
}
return a
}
})
};
goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
goog.string.whitespaceEscape = function(a, b) {
return goog.string.newLineToBr(a.replace(/ /g, " &#160;"), b)
};
goog.string.stripQuotes = function(a, b) {
for(var c = b.length, d = 0;d < c;d++) {
var e = 1 == c ? b : b.charAt(d);
if(a.charAt(0) == e && a.charAt(a.length - 1) == e) {
return a.substring(1, a.length - 1)
}
}
return a
};
goog.string.truncate = function(a, b, c) {
c && (a = goog.string.unescapeEntities(a));
a.length > b && (a = a.substring(0, b - 3) + "...");
c && (a = goog.string.htmlEscape(a));
return a
};
goog.string.truncateMiddle = function(a, b, c, d) {
c && (a = goog.string.unescapeEntities(a));
if(d && a.length > b) {
d > b && (d = b);
var e = a.length - d, a = a.substring(0, b - d) + "..." + a.substring(e)
}else {
a.length > b && (d = Math.floor(b / 2), e = a.length - d, a = a.substring(0, d + b % 2) + "..." + a.substring(e))
}
c && (a = goog.string.htmlEscape(a));
return a
};
goog.string.specialEscapeChars_ = {"\x00":"\\0", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\x0B", '"':'\\"', "\\":"\\\\"};
goog.string.jsEscapeCache_ = {"'":"\\'"};
goog.string.quote = function(a) {
a = String(a);
if(a.quote) {
return a.quote()
}
for(var b = ['"'], c = 0;c < a.length;c++) {
var d = a.charAt(c), e = d.charCodeAt(0);
b[c + 1] = goog.string.specialEscapeChars_[d] || (31 < e && 127 > e ? d : goog.string.escapeChar(d))
}
b.push('"');
return b.join("")
};
goog.string.escapeString = function(a) {
for(var b = [], c = 0;c < a.length;c++) {
b[c] = goog.string.escapeChar(a.charAt(c))
}
return b.join("")
};
goog.string.escapeChar = function(a) {
if(a in goog.string.jsEscapeCache_) {
return goog.string.jsEscapeCache_[a]
}
if(a in goog.string.specialEscapeChars_) {
return goog.string.jsEscapeCache_[a] = goog.string.specialEscapeChars_[a]
}
var b = a, c = a.charCodeAt(0);
if(31 < c && 127 > c) {
b = a
}else {
if(256 > c) {
if(b = "\\x", 16 > c || 256 < c) {
b += "0"
}
}else {
b = "\\u", 4096 > c && (b += "0")
}
b += c.toString(16).toUpperCase()
}
return goog.string.jsEscapeCache_[a] = b
};
goog.string.toMap = function(a) {
for(var b = {}, c = 0;c < a.length;c++) {
b[a.charAt(c)] = !0
}
return b
};
goog.string.contains = function(a, b) {
return-1 != a.indexOf(b)
};
goog.string.countOf = function(a, b) {
return a && b ? a.split(b).length - 1 : 0
};
goog.string.removeAt = function(a, b, c) {
var d = a;
0 <= b && (b < a.length && 0 < c) && (d = a.substr(0, b) + a.substr(b + c, a.length - b - c));
return d
};
goog.string.remove = function(a, b) {
var c = RegExp(goog.string.regExpEscape(b), "");
return a.replace(c, "")
};
goog.string.removeAll = function(a, b) {
var c = RegExp(goog.string.regExpEscape(b), "g");
return a.replace(c, "")
};
goog.string.regExpEscape = function(a) {
return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08")
};
goog.string.repeat = function(a, b) {
return Array(b + 1).join(a)
};
goog.string.padNumber = function(a, b, c) {
a = goog.isDef(c) ? a.toFixed(c) : String(a);
c = a.indexOf(".");
-1 == c && (c = a.length);
return goog.string.repeat("0", Math.max(0, b - c)) + a
};
goog.string.makeSafe = function(a) {
return null == a ? "" : String(a)
};
goog.string.buildString = function(a) {
return Array.prototype.join.call(arguments, "")
};
goog.string.getRandomString = function() {
return Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ goog.now()).toString(36)
};
goog.string.compareVersions = function(a, b) {
for(var c = 0, d = goog.string.trim(String(a)).split("."), e = goog.string.trim(String(b)).split("."), f = Math.max(d.length, e.length), g = 0;0 == c && g < f;g++) {
var h = d[g] || "", i = e[g] || "", j = RegExp("(\\d*)(\\D*)", "g"), k = RegExp("(\\d*)(\\D*)", "g");
do {
var m = j.exec(h) || ["", "", ""], l = k.exec(i) || ["", "", ""];
if(0 == m[0].length && 0 == l[0].length) {
break
}
var c = 0 == m[1].length ? 0 : parseInt(m[1], 10), n = 0 == l[1].length ? 0 : parseInt(l[1], 10), c = goog.string.compareElements_(c, n) || goog.string.compareElements_(0 == m[2].length, 0 == l[2].length) || goog.string.compareElements_(m[2], l[2])
}while(0 == c)
}
return c
};
goog.string.compareElements_ = function(a, b) {
return a < b ? -1 : a > b ? 1 : 0
};
goog.string.HASHCODE_MAX_ = 4294967296;
goog.string.hashCode = function(a) {
for(var b = 0, c = 0;c < a.length;++c) {
b = 31 * b + a.charCodeAt(c), b %= goog.string.HASHCODE_MAX_
}
return b
};
goog.string.uniqueStringCounter_ = 2147483648 * Math.random() | 0;
goog.string.createUniqueString = function() {
return"goog_" + goog.string.uniqueStringCounter_++
};
goog.string.toNumber = function(a) {
var b = Number(a);
return 0 == b && goog.string.isEmpty(a) ? NaN : b
};
goog.string.toCamelCase = function(a) {
return String(a).replace(/\-([a-z])/g, function(a, c) {
return c.toUpperCase()
})
};
goog.string.toSelectorCase = function(a) {
return String(a).replace(/([A-Z])/g, "-$1").toLowerCase()
};
goog.string.toTitleCase = function(a, b) {
var c = goog.isString(b) ? goog.string.regExpEscape(b) : "\\s";
return a.replace(RegExp("(^" + (c ? "|[" + c + "]+" : "") + ")([a-z])", "g"), function(a, b, c) {
return b + c.toUpperCase()
})
};
goog.string.parseInt = function(a) {
isFinite(a) && (a = String(a));
return goog.isString(a) ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN
};
goog.asserts = {};
goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
goog.asserts.AssertionError = function(a, b) {
b.unshift(a);
goog.debug.Error.call(this, goog.string.subs.apply(null, b));
b.shift();
this.messagePattern = a
};
goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
goog.asserts.AssertionError.prototype.name = "AssertionError";
goog.asserts.doAssertFailure_ = function(a, b, c, d) {
var e = "Assertion failed";
if(c) {
var e = e + (": " + c), f = d
}else {
a && (e += ": " + a, f = b)
}
throw new goog.asserts.AssertionError("" + e, f || []);
};
goog.asserts.assert = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !a && goog.asserts.doAssertFailure_("", null, b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.fail = function(a, b) {
if(goog.asserts.ENABLE_ASSERTS) {
throw new goog.asserts.AssertionError("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1));
}
};
goog.asserts.assertNumber = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !goog.isNumber(a) && goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.assertString = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !goog.isString(a) && goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.assertFunction = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !goog.isFunction(a) && goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.assertObject = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !goog.isObject(a) && goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.assertArray = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !goog.isArray(a) && goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.assertBoolean = function(a, b, c) {
goog.asserts.ENABLE_ASSERTS && !goog.isBoolean(a) && goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
return a
};
goog.asserts.assertInstanceof = function(a, b, c, d) {
goog.asserts.ENABLE_ASSERTS && !(a instanceof b) && goog.asserts.doAssertFailure_("instanceof check failed.", null, c, Array.prototype.slice.call(arguments, 3));
return a
};
goog.array = {};
goog.NATIVE_ARRAY_PROTOTYPES = !0;
goog.array.peek = function(a) {
return a[a.length - 1]
};
goog.array.ARRAY_PROTOTYPE_ = Array.prototype;
goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.indexOf ? function(a, b, c) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.indexOf.call(a, b, c)
} : function(a, b, c) {
c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
if(goog.isString(a)) {
return!goog.isString(b) || 1 != b.length ? -1 : a.indexOf(b, c)
}
for(;c < a.length;c++) {
if(c in a && a[c] === b) {
return c
}
}
return-1
};
goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.lastIndexOf ? function(a, b, c) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.lastIndexOf.call(a, b, null == c ? a.length - 1 : c)
} : function(a, b, c) {
c = null == c ? a.length - 1 : c;
0 > c && (c = Math.max(0, a.length + c));
if(goog.isString(a)) {
return!goog.isString(b) || 1 != b.length ? -1 : a.lastIndexOf(b, c)
}
for(;0 <= c;c--) {
if(c in a && a[c] === b) {
return c
}
}
return-1
};
goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.forEach ? function(a, b, c) {
goog.asserts.assert(null != a.length);
goog.array.ARRAY_PROTOTYPE_.forEach.call(a, b, c)
} : function(a, b, c) {
for(var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
f in e && b.call(c, e[f], f, a)
}
};
goog.array.forEachRight = function(a, b, c) {
for(var d = a.length, e = goog.isString(a) ? a.split("") : a, d = d - 1;0 <= d;--d) {
d in e && b.call(c, e[d], d, a)
}
};
goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.filter ? function(a, b, c) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.filter.call(a, b, c)
} : function(a, b, c) {
for(var d = a.length, e = [], f = 0, g = goog.isString(a) ? a.split("") : a, h = 0;h < d;h++) {
if(h in g) {
var i = g[h];
b.call(c, i, h, a) && (e[f++] = i)
}
}
return e
};
goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.map ? function(a, b, c) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.map.call(a, b, c)
} : function(a, b, c) {
for(var d = a.length, e = Array(d), f = goog.isString(a) ? a.split("") : a, g = 0;g < d;g++) {
g in f && (e[g] = b.call(c, f[g], g, a))
}
return e
};
goog.array.reduce = function(a, b, c, d) {
if(a.reduce) {
return d ? a.reduce(goog.bind(b, d), c) : a.reduce(b, c)
}
var e = c;
goog.array.forEach(a, function(c, g) {
e = b.call(d, e, c, g, a)
});
return e
};
goog.array.reduceRight = function(a, b, c, d) {
if(a.reduceRight) {
return d ? a.reduceRight(goog.bind(b, d), c) : a.reduceRight(b, c)
}
var e = c;
goog.array.forEachRight(a, function(c, g) {
e = b.call(d, e, c, g, a)
});
return e
};
goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.some ? function(a, b, c) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.some.call(a, b, c)
} : function(a, b, c) {
for(var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
if(f in e && b.call(c, e[f], f, a)) {
return!0
}
}
return!1
};
goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.every ? function(a, b, c) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.every.call(a, b, c)
} : function(a, b, c) {
for(var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
if(f in e && !b.call(c, e[f], f, a)) {
return!1
}
}
return!0
};
goog.array.find = function(a, b, c) {
b = goog.array.findIndex(a, b, c);
return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b]
};
goog.array.findIndex = function(a, b, c) {
for(var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
if(f in e && b.call(c, e[f], f, a)) {
return f
}
}
return-1
};
goog.array.findRight = function(a, b, c) {
b = goog.array.findIndexRight(a, b, c);
return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b]
};
goog.array.findIndexRight = function(a, b, c) {
for(var d = a.length, e = goog.isString(a) ? a.split("") : a, d = d - 1;0 <= d;d--) {
if(d in e && b.call(c, e[d], d, a)) {
return d
}
}
return-1
};
goog.array.contains = function(a, b) {
return 0 <= goog.array.indexOf(a, b)
};
goog.array.isEmpty = function(a) {
return 0 == a.length
};
goog.array.clear = function(a) {
if(!goog.isArray(a)) {
for(var b = a.length - 1;0 <= b;b--) {
delete a[b]
}
}
a.length = 0
};
goog.array.insert = function(a, b) {
goog.array.contains(a, b) || a.push(b)
};
goog.array.insertAt = function(a, b, c) {
goog.array.splice(a, c, 0, b)
};
goog.array.insertArrayAt = function(a, b, c) {
goog.partial(goog.array.splice, a, c, 0).apply(null, b)
};
goog.array.insertBefore = function(a, b, c) {
var d;
2 == arguments.length || 0 > (d = goog.array.indexOf(a, c)) ? a.push(b) : goog.array.insertAt(a, b, d)
};
goog.array.remove = function(a, b) {
var c = goog.array.indexOf(a, b), d;
(d = 0 <= c) && goog.array.removeAt(a, c);
return d
};
goog.array.removeAt = function(a, b) {
goog.asserts.assert(null != a.length);
return 1 == goog.array.ARRAY_PROTOTYPE_.splice.call(a, b, 1).length
};
goog.array.removeIf = function(a, b, c) {
b = goog.array.findIndex(a, b, c);
return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1
};
goog.array.concat = function(a) {
return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments)
};
goog.array.toArray = function(a) {
var b = a.length;
if(0 < b) {
for(var c = Array(b), d = 0;d < b;d++) {
c[d] = a[d]
}
return c
}
return[]
};
goog.array.clone = goog.array.toArray;
goog.array.extend = function(a, b) {
for(var c = 1;c < arguments.length;c++) {
var d = arguments[c], e;
if(goog.isArray(d) || (e = goog.isArrayLike(d)) && d.hasOwnProperty("callee")) {
a.push.apply(a, d)
}else {
if(e) {
for(var f = a.length, g = d.length, h = 0;h < g;h++) {
a[f + h] = d[h]
}
}else {
a.push(d)
}
}
}
};
goog.array.splice = function(a, b, c, d) {
goog.asserts.assert(null != a.length);
return goog.array.ARRAY_PROTOTYPE_.splice.apply(a, goog.array.slice(arguments, 1))
};
goog.array.slice = function(a, b, c) {
goog.asserts.assert(null != a.length);
return 2 >= arguments.length ? goog.array.ARRAY_PROTOTYPE_.slice.call(a, b) : goog.array.ARRAY_PROTOTYPE_.slice.call(a, b, c)
};
goog.array.removeDuplicates = function(a, b) {
for(var c = b || a, d = {}, e = 0, f = 0;f < a.length;) {
var g = a[f++], h = goog.isObject(g) ? "o" + goog.getUid(g) : (typeof g).charAt(0) + g;
Object.prototype.hasOwnProperty.call(d, h) || (d[h] = !0, c[e++] = g)
}
c.length = e
};
goog.array.binarySearch = function(a, b, c) {
return goog.array.binarySearch_(a, c || goog.array.defaultCompare, !1, b)
};
goog.array.binarySelect = function(a, b, c) {
return goog.array.binarySearch_(a, b, !0, void 0, c)
};
goog.array.binarySearch_ = function(a, b, c, d, e) {
for(var f = 0, g = a.length, h;f < g;) {
var i = f + g >> 1, j;
j = c ? b.call(e, a[i], i, a) : b(d, a[i]);
0 < j ? f = i + 1 : (g = i, h = !j)
}
return h ? f : ~f
};
goog.array.sort = function(a, b) {
goog.asserts.assert(null != a.length);
goog.array.ARRAY_PROTOTYPE_.sort.call(a, b || goog.array.defaultCompare)
};
goog.array.stableSort = function(a, b) {
for(var c = 0;c < a.length;c++) {
a[c] = {index:c, value:a[c]}
}
var d = b || goog.array.defaultCompare;
goog.array.sort(a, function(a, b) {
return d(a.value, b.value) || a.index - b.index
});
for(c = 0;c < a.length;c++) {
a[c] = a[c].value
}
};
goog.array.sortObjectsByKey = function(a, b, c) {
var d = c || goog.array.defaultCompare;
goog.array.sort(a, function(a, c) {
return d(a[b], c[b])
})
};
goog.array.isSorted = function(a, b, c) {
for(var b = b || goog.array.defaultCompare, d = 1;d < a.length;d++) {
var e = b(a[d - 1], a[d]);
if(0 < e || 0 == e && c) {
return!1
}
}
return!0
};
goog.array.equals = function(a, b, c) {
if(!goog.isArrayLike(a) || !goog.isArrayLike(b) || a.length != b.length) {
return!1
}
for(var d = a.length, c = c || goog.array.defaultCompareEquality, e = 0;e < d;e++) {
if(!c(a[e], b[e])) {
return!1
}
}
return!0
};
goog.array.compare = function(a, b, c) {
return goog.array.equals(a, b, c)
};
goog.array.compare3 = function(a, b, c) {
for(var c = c || goog.array.defaultCompare, d = Math.min(a.length, b.length), e = 0;e < d;e++) {
var f = c(a[e], b[e]);
if(0 != f) {
return f
}
}
return goog.array.defaultCompare(a.length, b.length)
};
goog.array.defaultCompare = function(a, b) {
return a > b ? 1 : a < b ? -1 : 0
};
goog.array.defaultCompareEquality = function(a, b) {
return a === b
};
goog.array.binaryInsert = function(a, b, c) {
c = goog.array.binarySearch(a, b, c);
return 0 > c ? (goog.array.insertAt(a, b, -(c + 1)), !0) : !1
};
goog.array.binaryRemove = function(a, b, c) {
b = goog.array.binarySearch(a, b, c);
return 0 <= b ? goog.array.removeAt(a, b) : !1
};
goog.array.bucket = function(a, b) {
for(var c = {}, d = 0;d < a.length;d++) {
var e = a[d], f = b(e, d, a);
goog.isDef(f) && (c[f] || (c[f] = [])).push(e)
}
return c
};
goog.array.repeat = function(a, b) {
for(var c = [], d = 0;d < b;d++) {
c[d] = a
}
return c
};
goog.array.flatten = function(a) {
for(var b = [], c = 0;c < arguments.length;c++) {
var d = arguments[c];
goog.isArray(d) ? b.push.apply(b, goog.array.flatten.apply(null, d)) : b.push(d)
}
return b
};
goog.array.rotate = function(a, b) {
goog.asserts.assert(null != a.length);
a.length && (b %= a.length, 0 < b ? goog.array.ARRAY_PROTOTYPE_.unshift.apply(a, a.splice(-b, b)) : 0 > b && goog.array.ARRAY_PROTOTYPE_.push.apply(a, a.splice(0, -b)));
return a
};
goog.array.zip = function(a) {
if(!arguments.length) {
return[]
}
for(var b = [], c = 0;;c++) {
for(var d = [], e = 0;e < arguments.length;e++) {
var f = arguments[e];
if(c >= f.length) {
return b
}
d.push(f[c])
}
b.push(d)
}
};
goog.array.shuffle = function(a, b) {
for(var c = b || Math.random, d = a.length - 1;0 < d;d--) {
var e = Math.floor(c() * (d + 1)), f = a[d];
a[d] = a[e];
a[e] = f
}
};
goog.object = {};
goog.object.forEach = function(a, b, c) {
for(var d in a) {
b.call(c, a[d], d, a)
}
};
goog.object.filter = function(a, b, c) {
var d = {}, e;
for(e in a) {
b.call(c, a[e], e, a) && (d[e] = a[e])
}
return d
};
goog.object.map = function(a, b, c) {
var d = {}, e;
for(e in a) {
d[e] = b.call(c, a[e], e, a)
}
return d
};
goog.object.some = function(a, b, c) {
for(var d in a) {
if(b.call(c, a[d], d, a)) {
return!0
}
}
return!1
};
goog.object.every = function(a, b, c) {
for(var d in a) {
if(!b.call(c, a[d], d, a)) {
return!1
}
}
return!0
};
goog.object.getCount = function(a) {
var b = 0, c;
for(c in a) {
b++
}
return b
};
goog.object.getAnyKey = function(a) {
for(var b in a) {
return b
}
};
goog.object.getAnyValue = function(a) {
for(var b in a) {
return a[b]
}
};
goog.object.contains = function(a, b) {
return goog.object.containsValue(a, b)
};
goog.object.getValues = function(a) {
var b = [], c = 0, d;
for(d in a) {
b[c++] = a[d]
}
return b
};
goog.object.getKeys = function(a) {
var b = [], c = 0, d;
for(d in a) {
b[c++] = d
}
return b
};
goog.object.getValueByKeys = function(a, b) {
for(var c = goog.isArrayLike(b), d = c ? b : arguments, c = c ? 0 : 1;c < d.length && !(a = a[d[c]], !goog.isDef(a));c++) {
}
return a
};
goog.object.containsKey = function(a, b) {
return b in a
};
goog.object.containsValue = function(a, b) {
for(var c in a) {
if(a[c] == b) {
return!0
}
}
return!1
};
goog.object.findKey = function(a, b, c) {
for(var d in a) {
if(b.call(c, a[d], d, a)) {
return d
}
}
};
goog.object.findValue = function(a, b, c) {
return(b = goog.object.findKey(a, b, c)) && a[b]
};
goog.object.isEmpty = function(a) {
for(var b in a) {
return!1
}
return!0
};
goog.object.clear = function(a) {
for(var b in a) {
delete a[b]
}
};
goog.object.remove = function(a, b) {
var c;
(c = b in a) && delete a[b];
return c
};
goog.object.add = function(a, b, c) {
if(b in a) {
throw Error('The object already contains the key "' + b + '"');
}
goog.object.set(a, b, c)
};
goog.object.get = function(a, b, c) {
return b in a ? a[b] : c
};
goog.object.set = function(a, b, c) {
a[b] = c
};
goog.object.setIfUndefined = function(a, b, c) {
return b in a ? a[b] : a[b] = c
};
goog.object.clone = function(a) {
var b = {}, c;
for(c in a) {
b[c] = a[c]
}
return b
};
goog.object.unsafeClone = function(a) {
var b = goog.typeOf(a);
if("object" == b || "array" == b) {
if(a.clone) {
return a.clone()
}
var b = "array" == b ? [] : {}, c;
for(c in a) {
b[c] = goog.object.unsafeClone(a[c])
}
return b
}
return a
};
goog.object.transpose = function(a) {
var b = {}, c;
for(c in a) {
b[a[c]] = c
}
return b
};
goog.object.PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
goog.object.extend = function(a, b) {
for(var c, d, e = 1;e < arguments.length;e++) {
d = arguments[e];
for(c in d) {
a[c] = d[c]
}
for(var f = 0;f < goog.object.PROTOTYPE_FIELDS_.length;f++) {
c = goog.object.PROTOTYPE_FIELDS_[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c])
}
}
};
goog.object.create = function(a) {
var b = arguments.length;
if(1 == b && goog.isArray(arguments[0])) {
return goog.object.create.apply(null, arguments[0])
}
if(b % 2) {
throw Error("Uneven number of arguments");
}
for(var c = {}, d = 0;d < b;d += 2) {
c[arguments[d]] = arguments[d + 1]
}
return c
};
goog.object.createSet = function(a) {
var b = arguments.length;
if(1 == b && goog.isArray(arguments[0])) {
return goog.object.createSet.apply(null, arguments[0])
}
for(var c = {}, d = 0;d < b;d++) {
c[arguments[d]] = !0
}
return c
};
goog.string.format = function(a, b) {
var c = Array.prototype.slice.call(arguments), d = c.shift();
if("undefined" == typeof d) {
throw Error("[goog.string.format] Template required");
}
return d.replace(/%([0\-\ \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g, function(a, b, d, h, i, j, k, m) {
if("%" == j) {
return"%"
}
var l = c.shift();
if("undefined" == typeof l) {
throw Error("[goog.string.format] Not enough arguments");
}
arguments[0] = l;
return goog.string.format.demuxes_[j].apply(null, arguments)
})
};
goog.string.format.demuxes_ = {};
goog.string.format.demuxes_.s = function(a, b, c) {
return isNaN(c) || "" == c || a.length >= c ? a : a = -1 < b.indexOf("-", 0) ? a + goog.string.repeat(" ", c - a.length) : goog.string.repeat(" ", c - a.length) + a
};
goog.string.format.demuxes_.f = function(a, b, c, d, e) {
d = a.toString();
isNaN(e) || "" == e || (d = a.toFixed(e));
var f;
f = 0 > a ? "-" : 0 <= b.indexOf("+") ? "+" : 0 <= b.indexOf(" ") ? " " : "";
0 <= a && (d = f + d);
if(isNaN(c) || d.length >= c) {
return d
}
d = isNaN(e) ? Math.abs(a).toString() : Math.abs(a).toFixed(e);
a = c - d.length - f.length;
0 <= b.indexOf("-", 0) ? d = f + d + goog.string.repeat(" ", a) : (b = 0 <= b.indexOf("0", 0) ? "0" : " ", d = f + goog.string.repeat(b, a) + d);
return d
};
goog.string.format.demuxes_.d = function(a, b, c, d, e, f, g, h) {
return goog.string.format.demuxes_.f(parseInt(a, 10), b, c, d, 0, f, g, h)
};
goog.string.format.demuxes_.i = goog.string.format.demuxes_.d;
goog.string.format.demuxes_.u = goog.string.format.demuxes_.d;
goog.string.StringBuffer = function(a, b) {
null != a && this.append.apply(this, arguments)
};
goog.string.StringBuffer.prototype.buffer_ = "";
goog.string.StringBuffer.prototype.set = function(a) {
this.buffer_ = "" + a
};
goog.string.StringBuffer.prototype.append = function(a, b, c) {
this.buffer_ += a;
if(null != b) {
for(var d = 1;d < arguments.length;d++) {
this.buffer_ += arguments[d]
}
}
return this
};
goog.string.StringBuffer.prototype.clear = function() {
this.buffer_ = ""
};
goog.string.StringBuffer.prototype.getLength = function() {
return this.buffer_.length
};
goog.string.StringBuffer.prototype.toString = function() {
return this.buffer_
};
var cljs = {core:{}};
cljs.core._STAR_unchecked_if_STAR_ = !1;
cljs.core._STAR_print_fn_STAR_ = function() {
throw Error("No *print-fn* fn set for evaluation environment");
};
cljs.core.truth_ = function(a) {
return null != a && !1 !== a
};
cljs.core.identical_QMARK_ = function(a, b) {
return a === b
};
cljs.core.nil_QMARK_ = function(a) {
return null == a
};
cljs.core.not = function(a) {
return cljs.core.truth_(a) ? !1 : !0
};
cljs.core.type_satisfies_ = function(a, b) {
return a[goog.typeOf(null == b ? null : b)] ? !0 : a._ ? !0 : !1
};
cljs.core.is_proto_ = function(a) {
return a.constructor.prototype === a
};
cljs.core._STAR_main_cli_fn_STAR_ = null;
cljs.core.missing_protocol = function(a, b) {
return Error(["No protocol method ", a, " defined for type ", goog.typeOf(b), ": ", b].join(""))
};
cljs.core.aclone = function(a) {
return a.slice()
};
cljs.core.array = function(a) {
return Array.prototype.slice.call(arguments)
};
cljs.core.make_array = function() {
var a = null, b = function(b, d) {
return a.call(null, d)
}, a = function(a, d) {
switch(arguments.length) {
case 1:
return Array(a);
case 2:
return b.call(this, a, d)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = function(a) {
return Array(a)
};
a.cljs$lang$arity$2 = b;
return a
}();
cljs.core.aget = function() {
var a = null, b = function(b, c, f) {
return cljs.core.apply.call(null, a, a.call(null, b, c), f)
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 2:
return a[b];
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$2 = function(a, b) {
return a[b]
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core.aset = function(a, b, c) {
return a[b] = c
};
cljs.core.alength = function(a) {
return a.length
};
cljs.core.into_array = function() {
var a = null, b = function(b) {
return a.call(null, null, b)
}, c = function(a, b) {
return cljs.core.reduce.call(null, function(a, b) {
a.push(b);
return a
}, [], b)
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.Fn = {};
cljs.core.IFn = {};
cljs.core._invoke = function() {
var a = null, b = function(a) {
var b;
b = a ? a.cljs$core$IFn$_invoke$arity$1 : a;
if(b) {
return a.cljs$core$IFn$_invoke$arity$1(a)
}
b = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._invoke._, !b)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return b.call(null, a)
}, c = function(a, b) {
var c;
c = a ? a.cljs$core$IFn$_invoke$arity$2 : a;
if(c) {
return a.cljs$core$IFn$_invoke$arity$2(a, b)
}
c = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._invoke._, !c)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return c.call(null, a, b)
}, d = function(a, b, c) {
var d;
d = a ? a.cljs$core$IFn$_invoke$arity$3 : a;
if(d) {
return a.cljs$core$IFn$_invoke$arity$3(a, b, c)
}
d = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._invoke._, !d)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return d.call(null, a, b, c)
}, e = function(a, b, c, d) {
var e;
e = a ? a.cljs$core$IFn$_invoke$arity$4 : a;
if(e) {
return a.cljs$core$IFn$_invoke$arity$4(a, b, c, d)
}
e = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!e && (e = cljs.core._invoke._, !e)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return e.call(null, a, b, c, d)
}, f = function(a, b, c, d, e) {
var f;
f = a ? a.cljs$core$IFn$_invoke$arity$5 : a;
if(f) {
return a.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e)
}
f = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!f && (f = cljs.core._invoke._, !f)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return f.call(null, a, b, c, d, e)
}, g = function(a, b, c, d, e, f) {
var g;
g = a ? a.cljs$core$IFn$_invoke$arity$6 : a;
if(g) {
return a.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f)
}
g = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!g && (g = cljs.core._invoke._, !g)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return g.call(null, a, b, c, d, e, f)
}, h = function(a, b, c, d, e, f, g) {
var h;
h = a ? a.cljs$core$IFn$_invoke$arity$7 : a;
if(h) {
return a.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g)
}
h = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!h && (h = cljs.core._invoke._, !h)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return h.call(null, a, b, c, d, e, f, g)
}, i = function(a, b, c, d, e, f, g, h) {
var i;
i = a ? a.cljs$core$IFn$_invoke$arity$8 : a;
if(i) {
return a.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h)
}
i = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!i && (i = cljs.core._invoke._, !i)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return i.call(null, a, b, c, d, e, f, g, h)
}, j = function(a, b, c, d, e, f, g, h, i) {
var j;
j = a ? a.cljs$core$IFn$_invoke$arity$9 : a;
if(j) {
return a.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, i)
}
j = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!j && (j = cljs.core._invoke._, !j)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return j.call(null, a, b, c, d, e, f, g, h, i)
}, k = function(a, b, c, d, e, f, g, h, i, j) {
var k;
k = a ? a.cljs$core$IFn$_invoke$arity$10 : a;
if(k) {
return a.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, i, j)
}
k = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!k && (k = cljs.core._invoke._, !k)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return k.call(null, a, b, c, d, e, f, g, h, i, j)
}, m = function(a, b, c, d, e, f, g, h, i, j, k) {
var m;
m = a ? a.cljs$core$IFn$_invoke$arity$11 : a;
if(m) {
return a.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, i, j, k)
}
m = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!m && (m = cljs.core._invoke._, !m)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return m.call(null, a, b, c, d, e, f, g, h, i, j, k)
}, l = function(a, b, c, d, e, f, g, h, i, j, k, m) {
var l;
l = a ? a.cljs$core$IFn$_invoke$arity$12 : a;
if(l) {
return a.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, i, j, k, m)
}
l = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!l && (l = cljs.core._invoke._, !l)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return l.call(null, a, b, c, d, e, f, g, h, i, j, k, m)
}, n = function(a, b, c, d, e, f, g, h, i, j, k, m, l) {
var n;
n = a ? a.cljs$core$IFn$_invoke$arity$13 : a;
if(n) {
return a.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, i, j, k, m, l)
}
n = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!n && (n = cljs.core._invoke._, !n)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return n.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l)
}, p = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n) {
var p;
p = a ? a.cljs$core$IFn$_invoke$arity$14 : a;
if(p) {
return a.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, i, j, k, m, l, n)
}
p = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!p && (p = cljs.core._invoke._, !p)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return p.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n)
}, q = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p) {
var q;
q = a ? a.cljs$core$IFn$_invoke$arity$15 : a;
if(q) {
return a.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p)
}
q = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!q && (q = cljs.core._invoke._, !q)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return q.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p)
}, r = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q) {
var s;
s = a ? a.cljs$core$IFn$_invoke$arity$16 : a;
if(s) {
return a.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q)
}
s = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!s && (s = cljs.core._invoke._, !s)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return s.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q)
}, s = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s) {
var r;
r = a ? a.cljs$core$IFn$_invoke$arity$17 : a;
if(r) {
return a.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s)
}
r = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!r && (r = cljs.core._invoke._, !r)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return r.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s)
}, t = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r) {
var t;
t = a ? a.cljs$core$IFn$_invoke$arity$18 : a;
if(t) {
return a.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r)
}
t = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!t && (t = cljs.core._invoke._, !t)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return t.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r)
}, u = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t) {
var u;
u = a ? a.cljs$core$IFn$_invoke$arity$19 : a;
if(u) {
return a.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t)
}
u = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!u && (u = cljs.core._invoke._, !u)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return u.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t)
}, x = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t, u) {
var x;
x = a ? a.cljs$core$IFn$_invoke$arity$20 : a;
if(x) {
return a.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t, u)
}
x = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!x && (x = cljs.core._invoke._, !x)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return x.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t, u)
}, E = function(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t, u, x) {
var E;
E = a ? a.cljs$core$IFn$_invoke$arity$21 : a;
if(E) {
return a.cljs$core$IFn$_invoke$arity$21(a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t, u, x)
}
E = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
if(!E && (E = cljs.core._invoke._, !E)) {
throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
}
return E.call(null, a, b, c, d, e, f, g, h, i, j, k, m, l, n, p, q, s, r, t, u, x)
}, a = function(a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L, M, N, O, P, Q) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, v);
case 3:
return d.call(this, a, v, w);
case 4:
return e.call(this, a, v, w, y);
case 5:
return f.call(this, a, v, w, y, z);
case 6:
return g.call(this, a, v, w, y, z, A);
case 7:
return h.call(this, a, v, w, y, z, A, B);
case 8:
return i.call(this, a, v, w, y, z, A, B, C);
case 9:
return j.call(this, a, v, w, y, z, A, B, C, D);
case 10:
return k.call(this, a, v, w, y, z, A, B, C, D, F);
case 11:
return m.call(this, a, v, w, y, z, A, B, C, D, F, G);
case 12:
return l.call(this, a, v, w, y, z, A, B, C, D, F, G, H);
case 13:
return n.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I);
case 14:
return p.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J);
case 15:
return q.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K);
case 16:
return r.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L);
case 17:
return s.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L, M);
case 18:
return t.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L, M, N);
case 19:
return u.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L, M, N, O);
case 20:
return x.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L, M, N, O, P);
case 21:
return E.call(this, a, v, w, y, z, A, B, C, D, F, G, H, I, J, K, L, M, N, O, P, Q)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
a.cljs$lang$arity$4 = e;
a.cljs$lang$arity$5 = f;
a.cljs$lang$arity$6 = g;
a.cljs$lang$arity$7 = h;
a.cljs$lang$arity$8 = i;
a.cljs$lang$arity$9 = j;
a.cljs$lang$arity$10 = k;
a.cljs$lang$arity$11 = m;
a.cljs$lang$arity$12 = l;
a.cljs$lang$arity$13 = n;
a.cljs$lang$arity$14 = p;
a.cljs$lang$arity$15 = q;
a.cljs$lang$arity$16 = r;
a.cljs$lang$arity$17 = s;
a.cljs$lang$arity$18 = t;
a.cljs$lang$arity$19 = u;
a.cljs$lang$arity$20 = x;
a.cljs$lang$arity$21 = E;
return a
}();
cljs.core.ICounted = {};
cljs.core._count = function(a) {
var b;
b = a ? a.cljs$core$ICounted$_count$arity$1 : a;
if(b) {
return a.cljs$core$ICounted$_count$arity$1(a)
}
b = cljs.core._count[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._count._, !b)) {
throw cljs.core.missing_protocol.call(null, "ICounted.-count", a);
}
return b.call(null, a)
};
cljs.core.IEmptyableCollection = {};
cljs.core._empty = function(a) {
var b;
b = a ? a.cljs$core$IEmptyableCollection$_empty$arity$1 : a;
if(b) {
return a.cljs$core$IEmptyableCollection$_empty$arity$1(a)
}
b = cljs.core._empty[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._empty._, !b)) {
throw cljs.core.missing_protocol.call(null, "IEmptyableCollection.-empty", a);
}
return b.call(null, a)
};
cljs.core.ICollection = {};
cljs.core._conj = function(a, b) {
var c;
c = a ? a.cljs$core$ICollection$_conj$arity$2 : a;
if(c) {
return a.cljs$core$ICollection$_conj$arity$2(a, b)
}
c = cljs.core._conj[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._conj._, !c)) {
throw cljs.core.missing_protocol.call(null, "ICollection.-conj", a);
}
return c.call(null, a, b)
};
cljs.core.IIndexed = {};
cljs.core._nth = function() {
var a = null, b = function(a, b) {
var c;
c = a ? a.cljs$core$IIndexed$_nth$arity$2 : a;
if(c) {
return a.cljs$core$IIndexed$_nth$arity$2(a, b)
}
c = cljs.core._nth[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._nth._, !c)) {
throw cljs.core.missing_protocol.call(null, "IIndexed.-nth", a);
}
return c.call(null, a, b)
}, c = function(a, b, c) {
var g;
g = a ? a.cljs$core$IIndexed$_nth$arity$3 : a;
if(g) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
}
g = cljs.core._nth[goog.typeOf(null == a ? null : a)];
if(!g && (g = cljs.core._nth._, !g)) {
throw cljs.core.missing_protocol.call(null, "IIndexed.-nth", a);
}
return g.call(null, a, b, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.ASeq = {};
cljs.core.ISeq = {};
cljs.core._first = function(a) {
var b;
b = a ? a.cljs$core$ISeq$_first$arity$1 : a;
if(b) {
return a.cljs$core$ISeq$_first$arity$1(a)
}
b = cljs.core._first[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._first._, !b)) {
throw cljs.core.missing_protocol.call(null, "ISeq.-first", a);
}
return b.call(null, a)
};
cljs.core._rest = function(a) {
var b;
b = a ? a.cljs$core$ISeq$_rest$arity$1 : a;
if(b) {
return a.cljs$core$ISeq$_rest$arity$1(a)
}
b = cljs.core._rest[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._rest._, !b)) {
throw cljs.core.missing_protocol.call(null, "ISeq.-rest", a);
}
return b.call(null, a)
};
cljs.core.INext = {};
cljs.core._next = function(a) {
var b;
b = a ? a.cljs$core$INext$_next$arity$1 : a;
if(b) {
return a.cljs$core$INext$_next$arity$1(a)
}
b = cljs.core._next[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._next._, !b)) {
throw cljs.core.missing_protocol.call(null, "INext.-next", a);
}
return b.call(null, a)
};
cljs.core.ILookup = {};
cljs.core._lookup = function() {
var a = null, b = function(a, b) {
var c;
c = a ? a.cljs$core$ILookup$_lookup$arity$2 : a;
if(c) {
return a.cljs$core$ILookup$_lookup$arity$2(a, b)
}
c = cljs.core._lookup[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._lookup._, !c)) {
throw cljs.core.missing_protocol.call(null, "ILookup.-lookup", a);
}
return c.call(null, a, b)
}, c = function(a, b, c) {
var g;
g = a ? a.cljs$core$ILookup$_lookup$arity$3 : a;
if(g) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, c)
}
g = cljs.core._lookup[goog.typeOf(null == a ? null : a)];
if(!g && (g = cljs.core._lookup._, !g)) {
throw cljs.core.missing_protocol.call(null, "ILookup.-lookup", a);
}
return g.call(null, a, b, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.IAssociative = {};
cljs.core._contains_key_QMARK_ = function(a, b) {
var c;
c = a ? a.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 : a;
if(c) {
return a.cljs$core$IAssociative$_contains_key_QMARK_$arity$2(a, b)
}
c = cljs.core._contains_key_QMARK_[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._contains_key_QMARK_._, !c)) {
throw cljs.core.missing_protocol.call(null, "IAssociative.-contains-key?", a);
}
return c.call(null, a, b)
};
cljs.core._assoc = function(a, b, c) {
var d;
d = a ? a.cljs$core$IAssociative$_assoc$arity$3 : a;
if(d) {
return a.cljs$core$IAssociative$_assoc$arity$3(a, b, c)
}
d = cljs.core._assoc[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._assoc._, !d)) {
throw cljs.core.missing_protocol.call(null, "IAssociative.-assoc", a);
}
return d.call(null, a, b, c)
};
cljs.core.IMap = {};
cljs.core._dissoc = function(a, b) {
var c;
c = a ? a.cljs$core$IMap$_dissoc$arity$2 : a;
if(c) {
return a.cljs$core$IMap$_dissoc$arity$2(a, b)
}
c = cljs.core._dissoc[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._dissoc._, !c)) {
throw cljs.core.missing_protocol.call(null, "IMap.-dissoc", a);
}
return c.call(null, a, b)
};
cljs.core.IMapEntry = {};
cljs.core._key = function(a) {
var b;
b = a ? a.cljs$core$IMapEntry$_key$arity$1 : a;
if(b) {
return a.cljs$core$IMapEntry$_key$arity$1(a)
}
b = cljs.core._key[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._key._, !b)) {
throw cljs.core.missing_protocol.call(null, "IMapEntry.-key", a);
}
return b.call(null, a)
};
cljs.core._val = function(a) {
var b;
b = a ? a.cljs$core$IMapEntry$_val$arity$1 : a;
if(b) {
return a.cljs$core$IMapEntry$_val$arity$1(a)
}
b = cljs.core._val[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._val._, !b)) {
throw cljs.core.missing_protocol.call(null, "IMapEntry.-val", a);
}
return b.call(null, a)
};
cljs.core.ISet = {};
cljs.core._disjoin = function(a, b) {
var c;
c = a ? a.cljs$core$ISet$_disjoin$arity$2 : a;
if(c) {
return a.cljs$core$ISet$_disjoin$arity$2(a, b)
}
c = cljs.core._disjoin[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._disjoin._, !c)) {
throw cljs.core.missing_protocol.call(null, "ISet.-disjoin", a);
}
return c.call(null, a, b)
};
cljs.core.IStack = {};
cljs.core._peek = function(a) {
var b;
b = a ? a.cljs$core$IStack$_peek$arity$1 : a;
if(b) {
return a.cljs$core$IStack$_peek$arity$1(a)
}
b = cljs.core._peek[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._peek._, !b)) {
throw cljs.core.missing_protocol.call(null, "IStack.-peek", a);
}
return b.call(null, a)
};
cljs.core._pop = function(a) {
var b;
b = a ? a.cljs$core$IStack$_pop$arity$1 : a;
if(b) {
return a.cljs$core$IStack$_pop$arity$1(a)
}
b = cljs.core._pop[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._pop._, !b)) {
throw cljs.core.missing_protocol.call(null, "IStack.-pop", a);
}
return b.call(null, a)
};
cljs.core.IVector = {};
cljs.core._assoc_n = function(a, b, c) {
var d;
d = a ? a.cljs$core$IVector$_assoc_n$arity$3 : a;
if(d) {
return a.cljs$core$IVector$_assoc_n$arity$3(a, b, c)
}
d = cljs.core._assoc_n[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._assoc_n._, !d)) {
throw cljs.core.missing_protocol.call(null, "IVector.-assoc-n", a);
}
return d.call(null, a, b, c)
};
cljs.core.IDeref = {};
cljs.core._deref = function(a) {
var b;
b = a ? a.cljs$core$IDeref$_deref$arity$1 : a;
if(b) {
return a.cljs$core$IDeref$_deref$arity$1(a)
}
b = cljs.core._deref[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._deref._, !b)) {
throw cljs.core.missing_protocol.call(null, "IDeref.-deref", a);
}
return b.call(null, a)
};
cljs.core.IDerefWithTimeout = {};
cljs.core._deref_with_timeout = function(a, b, c) {
var d;
d = a ? a.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3 : a;
if(d) {
return a.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3(a, b, c)
}
d = cljs.core._deref_with_timeout[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._deref_with_timeout._, !d)) {
throw cljs.core.missing_protocol.call(null, "IDerefWithTimeout.-deref-with-timeout", a);
}
return d.call(null, a, b, c)
};
cljs.core.IMeta = {};
cljs.core._meta = function(a) {
var b;
b = a ? a.cljs$core$IMeta$_meta$arity$1 : a;
if(b) {
return a.cljs$core$IMeta$_meta$arity$1(a)
}
b = cljs.core._meta[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._meta._, !b)) {
throw cljs.core.missing_protocol.call(null, "IMeta.-meta", a);
}
return b.call(null, a)
};
cljs.core.IWithMeta = {};
cljs.core._with_meta = function(a, b) {
var c;
c = a ? a.cljs$core$IWithMeta$_with_meta$arity$2 : a;
if(c) {
return a.cljs$core$IWithMeta$_with_meta$arity$2(a, b)
}
c = cljs.core._with_meta[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._with_meta._, !c)) {
throw cljs.core.missing_protocol.call(null, "IWithMeta.-with-meta", a);
}
return c.call(null, a, b)
};
cljs.core.IReduce = {};
cljs.core._reduce = function() {
var a = null, b = function(a, b) {
var c;
c = a ? a.cljs$core$IReduce$_reduce$arity$2 : a;
if(c) {
return a.cljs$core$IReduce$_reduce$arity$2(a, b)
}
c = cljs.core._reduce[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._reduce._, !c)) {
throw cljs.core.missing_protocol.call(null, "IReduce.-reduce", a);
}
return c.call(null, a, b)
}, c = function(a, b, c) {
var g;
g = a ? a.cljs$core$IReduce$_reduce$arity$3 : a;
if(g) {
return a.cljs$core$IReduce$_reduce$arity$3(a, b, c)
}
g = cljs.core._reduce[goog.typeOf(null == a ? null : a)];
if(!g && (g = cljs.core._reduce._, !g)) {
throw cljs.core.missing_protocol.call(null, "IReduce.-reduce", a);
}
return g.call(null, a, b, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.IKVReduce = {};
cljs.core._kv_reduce = function(a, b, c) {
var d;
d = a ? a.cljs$core$IKVReduce$_kv_reduce$arity$3 : a;
if(d) {
return a.cljs$core$IKVReduce$_kv_reduce$arity$3(a, b, c)
}
d = cljs.core._kv_reduce[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._kv_reduce._, !d)) {
throw cljs.core.missing_protocol.call(null, "IKVReduce.-kv-reduce", a);
}
return d.call(null, a, b, c)
};
cljs.core.IEquiv = {};
cljs.core._equiv = function(a, b) {
var c;
c = a ? a.cljs$core$IEquiv$_equiv$arity$2 : a;
if(c) {
return a.cljs$core$IEquiv$_equiv$arity$2(a, b)
}
c = cljs.core._equiv[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._equiv._, !c)) {
throw cljs.core.missing_protocol.call(null, "IEquiv.-equiv", a);
}
return c.call(null, a, b)
};
cljs.core.IHash = {};
cljs.core._hash = function(a) {
var b;
b = a ? a.cljs$core$IHash$_hash$arity$1 : a;
if(b) {
return a.cljs$core$IHash$_hash$arity$1(a)
}
b = cljs.core._hash[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._hash._, !b)) {
throw cljs.core.missing_protocol.call(null, "IHash.-hash", a);
}
return b.call(null, a)
};
cljs.core.ISeqable = {};
cljs.core._seq = function(a) {
var b;
b = a ? a.cljs$core$ISeqable$_seq$arity$1 : a;
if(b) {
return a.cljs$core$ISeqable$_seq$arity$1(a)
}
b = cljs.core._seq[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._seq._, !b)) {
throw cljs.core.missing_protocol.call(null, "ISeqable.-seq", a);
}
return b.call(null, a)
};
cljs.core.ISequential = {};
cljs.core.IList = {};
cljs.core.IRecord = {};
cljs.core.IReversible = {};
cljs.core._rseq = function(a) {
var b;
b = a ? a.cljs$core$IReversible$_rseq$arity$1 : a;
if(b) {
return a.cljs$core$IReversible$_rseq$arity$1(a)
}
b = cljs.core._rseq[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._rseq._, !b)) {
throw cljs.core.missing_protocol.call(null, "IReversible.-rseq", a);
}
return b.call(null, a)
};
cljs.core.ISorted = {};
cljs.core._sorted_seq = function(a, b) {
var c;
c = a ? a.cljs$core$ISorted$_sorted_seq$arity$2 : a;
if(c) {
return a.cljs$core$ISorted$_sorted_seq$arity$2(a, b)
}
c = cljs.core._sorted_seq[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._sorted_seq._, !c)) {
throw cljs.core.missing_protocol.call(null, "ISorted.-sorted-seq", a);
}
return c.call(null, a, b)
};
cljs.core._sorted_seq_from = function(a, b, c) {
var d;
d = a ? a.cljs$core$ISorted$_sorted_seq_from$arity$3 : a;
if(d) {
return a.cljs$core$ISorted$_sorted_seq_from$arity$3(a, b, c)
}
d = cljs.core._sorted_seq_from[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._sorted_seq_from._, !d)) {
throw cljs.core.missing_protocol.call(null, "ISorted.-sorted-seq-from", a);
}
return d.call(null, a, b, c)
};
cljs.core._entry_key = function(a, b) {
var c;
c = a ? a.cljs$core$ISorted$_entry_key$arity$2 : a;
if(c) {
return a.cljs$core$ISorted$_entry_key$arity$2(a, b)
}
c = cljs.core._entry_key[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._entry_key._, !c)) {
throw cljs.core.missing_protocol.call(null, "ISorted.-entry-key", a);
}
return c.call(null, a, b)
};
cljs.core._comparator = function(a) {
var b;
b = a ? a.cljs$core$ISorted$_comparator$arity$1 : a;
if(b) {
return a.cljs$core$ISorted$_comparator$arity$1(a)
}
b = cljs.core._comparator[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._comparator._, !b)) {
throw cljs.core.missing_protocol.call(null, "ISorted.-comparator", a);
}
return b.call(null, a)
};
cljs.core.IPrintable = {};
cljs.core._pr_seq = function(a, b) {
var c;
c = a ? a.cljs$core$IPrintable$_pr_seq$arity$2 : a;
if(c) {
return a.cljs$core$IPrintable$_pr_seq$arity$2(a, b)
}
c = cljs.core._pr_seq[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._pr_seq._, !c)) {
throw cljs.core.missing_protocol.call(null, "IPrintable.-pr-seq", a);
}
return c.call(null, a, b)
};
cljs.core.IWriter = {};
cljs.core._write = function(a, b) {
var c;
c = a ? a.cljs$core$IWriter$_write$arity$2 : a;
if(c) {
return a.cljs$core$IWriter$_write$arity$2(a, b)
}
c = cljs.core._write[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._write._, !c)) {
throw cljs.core.missing_protocol.call(null, "IWriter.-write", a);
}
return c.call(null, a, b)
};
cljs.core._flush = function(a) {
var b;
b = a ? a.cljs$core$IWriter$_flush$arity$1 : a;
if(b) {
return a.cljs$core$IWriter$_flush$arity$1(a)
}
b = cljs.core._flush[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._flush._, !b)) {
throw cljs.core.missing_protocol.call(null, "IWriter.-flush", a);
}
return b.call(null, a)
};
cljs.core.IPrintWithWriter = {};
cljs.core._pr_writer = function(a, b, c) {
var d;
d = a ? a.cljs$core$IPrintWithWriter$_pr_writer$arity$3 : a;
if(d) {
return a.cljs$core$IPrintWithWriter$_pr_writer$arity$3(a, b, c)
}
d = cljs.core._pr_writer[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._pr_writer._, !d)) {
throw cljs.core.missing_protocol.call(null, "IPrintWithWriter.-pr-writer", a);
}
return d.call(null, a, b, c)
};
cljs.core.IPending = {};
cljs.core._realized_QMARK_ = function(a) {
var b;
b = a ? a.cljs$core$IPending$_realized_QMARK_$arity$1 : a;
if(b) {
return a.cljs$core$IPending$_realized_QMARK_$arity$1(a)
}
b = cljs.core._realized_QMARK_[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._realized_QMARK_._, !b)) {
throw cljs.core.missing_protocol.call(null, "IPending.-realized?", a);
}
return b.call(null, a)
};
cljs.core.IWatchable = {};
cljs.core._notify_watches = function(a, b, c) {
var d;
d = a ? a.cljs$core$IWatchable$_notify_watches$arity$3 : a;
if(d) {
return a.cljs$core$IWatchable$_notify_watches$arity$3(a, b, c)
}
d = cljs.core._notify_watches[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._notify_watches._, !d)) {
throw cljs.core.missing_protocol.call(null, "IWatchable.-notify-watches", a);
}
return d.call(null, a, b, c)
};
cljs.core._add_watch = function(a, b, c) {
var d;
d = a ? a.cljs$core$IWatchable$_add_watch$arity$3 : a;
if(d) {
return a.cljs$core$IWatchable$_add_watch$arity$3(a, b, c)
}
d = cljs.core._add_watch[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._add_watch._, !d)) {
throw cljs.core.missing_protocol.call(null, "IWatchable.-add-watch", a);
}
return d.call(null, a, b, c)
};
cljs.core._remove_watch = function(a, b) {
var c;
c = a ? a.cljs$core$IWatchable$_remove_watch$arity$2 : a;
if(c) {
return a.cljs$core$IWatchable$_remove_watch$arity$2(a, b)
}
c = cljs.core._remove_watch[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._remove_watch._, !c)) {
throw cljs.core.missing_protocol.call(null, "IWatchable.-remove-watch", a);
}
return c.call(null, a, b)
};
cljs.core.IEditableCollection = {};
cljs.core._as_transient = function(a) {
var b;
b = a ? a.cljs$core$IEditableCollection$_as_transient$arity$1 : a;
if(b) {
return a.cljs$core$IEditableCollection$_as_transient$arity$1(a)
}
b = cljs.core._as_transient[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._as_transient._, !b)) {
throw cljs.core.missing_protocol.call(null, "IEditableCollection.-as-transient", a);
}
return b.call(null, a)
};
cljs.core.ITransientCollection = {};
cljs.core._conj_BANG_ = function(a, b) {
var c;
c = a ? a.cljs$core$ITransientCollection$_conj_BANG_$arity$2 : a;
if(c) {
return a.cljs$core$ITransientCollection$_conj_BANG_$arity$2(a, b)
}
c = cljs.core._conj_BANG_[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._conj_BANG_._, !c)) {
throw cljs.core.missing_protocol.call(null, "ITransientCollection.-conj!", a);
}
return c.call(null, a, b)
};
cljs.core._persistent_BANG_ = function(a) {
var b;
b = a ? a.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 : a;
if(b) {
return a.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(a)
}
b = cljs.core._persistent_BANG_[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._persistent_BANG_._, !b)) {
throw cljs.core.missing_protocol.call(null, "ITransientCollection.-persistent!", a);
}
return b.call(null, a)
};
cljs.core.ITransientAssociative = {};
cljs.core._assoc_BANG_ = function(a, b, c) {
var d;
d = a ? a.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 : a;
if(d) {
return a.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(a, b, c)
}
d = cljs.core._assoc_BANG_[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._assoc_BANG_._, !d)) {
throw cljs.core.missing_protocol.call(null, "ITransientAssociative.-assoc!", a);
}
return d.call(null, a, b, c)
};
cljs.core.ITransientMap = {};
cljs.core._dissoc_BANG_ = function(a, b) {
var c;
c = a ? a.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 : a;
if(c) {
return a.cljs$core$ITransientMap$_dissoc_BANG_$arity$2(a, b)
}
c = cljs.core._dissoc_BANG_[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._dissoc_BANG_._, !c)) {
throw cljs.core.missing_protocol.call(null, "ITransientMap.-dissoc!", a);
}
return c.call(null, a, b)
};
cljs.core.ITransientVector = {};
cljs.core._assoc_n_BANG_ = function(a, b, c) {
var d;
d = a ? a.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 : a;
if(d) {
return a.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(a, b, c)
}
d = cljs.core._assoc_n_BANG_[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._assoc_n_BANG_._, !d)) {
throw cljs.core.missing_protocol.call(null, "ITransientVector.-assoc-n!", a);
}
return d.call(null, a, b, c)
};
cljs.core._pop_BANG_ = function(a) {
var b;
b = a ? a.cljs$core$ITransientVector$_pop_BANG_$arity$1 : a;
if(b) {
return a.cljs$core$ITransientVector$_pop_BANG_$arity$1(a)
}
b = cljs.core._pop_BANG_[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._pop_BANG_._, !b)) {
throw cljs.core.missing_protocol.call(null, "ITransientVector.-pop!", a);
}
return b.call(null, a)
};
cljs.core.ITransientSet = {};
cljs.core._disjoin_BANG_ = function(a, b) {
var c;
c = a ? a.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 : a;
if(c) {
return a.cljs$core$ITransientSet$_disjoin_BANG_$arity$2(a, b)
}
c = cljs.core._disjoin_BANG_[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._disjoin_BANG_._, !c)) {
throw cljs.core.missing_protocol.call(null, "ITransientSet.-disjoin!", a);
}
return c.call(null, a, b)
};
cljs.core.IComparable = {};
cljs.core._compare = function(a, b) {
var c;
c = a ? a.cljs$core$IComparable$_compare$arity$2 : a;
if(c) {
return a.cljs$core$IComparable$_compare$arity$2(a, b)
}
c = cljs.core._compare[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._compare._, !c)) {
throw cljs.core.missing_protocol.call(null, "IComparable.-compare", a);
}
return c.call(null, a, b)
};
cljs.core.IChunk = {};
cljs.core._drop_first = function(a) {
var b;
b = a ? a.cljs$core$IChunk$_drop_first$arity$1 : a;
if(b) {
return a.cljs$core$IChunk$_drop_first$arity$1(a)
}
b = cljs.core._drop_first[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._drop_first._, !b)) {
throw cljs.core.missing_protocol.call(null, "IChunk.-drop-first", a);
}
return b.call(null, a)
};
cljs.core.IChunkedSeq = {};
cljs.core._chunked_first = function(a) {
var b;
b = a ? a.cljs$core$IChunkedSeq$_chunked_first$arity$1 : a;
if(b) {
return a.cljs$core$IChunkedSeq$_chunked_first$arity$1(a)
}
b = cljs.core._chunked_first[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._chunked_first._, !b)) {
throw cljs.core.missing_protocol.call(null, "IChunkedSeq.-chunked-first", a);
}
return b.call(null, a)
};
cljs.core._chunked_rest = function(a) {
var b;
b = a ? a.cljs$core$IChunkedSeq$_chunked_rest$arity$1 : a;
if(b) {
return a.cljs$core$IChunkedSeq$_chunked_rest$arity$1(a)
}
b = cljs.core._chunked_rest[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._chunked_rest._, !b)) {
throw cljs.core.missing_protocol.call(null, "IChunkedSeq.-chunked-rest", a);
}
return b.call(null, a)
};
cljs.core.IChunkedNext = {};
cljs.core._chunked_next = function(a) {
var b;
b = a ? a.cljs$core$IChunkedNext$_chunked_next$arity$1 : a;
if(b) {
return a.cljs$core$IChunkedNext$_chunked_next$arity$1(a)
}
b = cljs.core._chunked_next[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._chunked_next._, !b)) {
throw cljs.core.missing_protocol.call(null, "IChunkedNext.-chunked-next", a);
}
return b.call(null, a)
};
cljs.core.seq = function(a) {
if(null == a) {
a = null
}else {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 32) ? b : a.cljs$core$ASeq$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ASeq, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.ASeq, a);
a = b ? a : cljs.core._seq.call(null, a)
}
return a
};
cljs.core.first = function(a) {
if(null == a) {
return null
}
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 64) ? b : a.cljs$core$ISeq$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISeq, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.ISeq, a);
if(b) {
return cljs.core._first.call(null, a)
}
a = cljs.core.seq.call(null, a);
return null == a ? null : cljs.core._first.call(null, a)
};
cljs.core.rest = function(a) {
if(null != a) {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 64) ? b : a.cljs$core$ISeq$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISeq, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.ISeq, a);
if(b) {
return cljs.core._rest.call(null, a)
}
a = cljs.core.seq.call(null, a);
return null != a ? cljs.core._rest.call(null, a) : cljs.core.List.EMPTY
}
return cljs.core.List.EMPTY
};
cljs.core.next = function(a) {
if(null == a) {
a = null
}else {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 128) ? b : a.cljs$core$INext$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.INext, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.INext, a);
a = b ? cljs.core._next.call(null, a) : cljs.core.seq.call(null, cljs.core.rest.call(null, a))
}
return a
};
cljs.core._EQ_ = function() {
var a = null, b = function(a, b) {
var c = a === b;
return c ? c : cljs.core._equiv.call(null, a, b)
}, c = function(b, c, d) {
for(;;) {
if(cljs.core.truth_(a.call(null, b, c))) {
if(cljs.core.next.call(null, d)) {
b = c, c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d)
}else {
return a.call(null, c, cljs.core.first.call(null, d))
}
}else {
return!1
}
}
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.type = function(a) {
return null == a ? null : a.constructor
};
cljs.core.instance_QMARK_ = function(a, b) {
return b instanceof a
};
cljs.core.IHash["null"] = !0;
cljs.core._hash["null"] = function() {
return 0
};
cljs.core.ILookup["null"] = !0;
cljs.core._lookup["null"] = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return null;
case 3:
return d
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.IAssociative["null"] = !0;
cljs.core._assoc["null"] = function(a, b, c) {
return cljs.core.hash_map.call(null, b, c)
};
cljs.core.INext["null"] = !0;
cljs.core._next["null"] = function() {
return null
};
cljs.core.IPrintWithWriter["null"] = !0;
cljs.core._pr_writer["null"] = function(a, b) {
return cljs.core._write.call(null, b, "nil")
};
cljs.core.ICollection["null"] = !0;
cljs.core._conj["null"] = function(a, b) {
return cljs.core.list.call(null, b)
};
cljs.core.IReduce["null"] = !0;
cljs.core._reduce["null"] = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return c.call(null);
case 3:
return d
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.IPrintable["null"] = !0;
cljs.core._pr_seq["null"] = function() {
return cljs.core.list.call(null, "nil")
};
cljs.core.ISet["null"] = !0;
cljs.core._disjoin["null"] = function() {
return null
};
cljs.core.ICounted["null"] = !0;
cljs.core._count["null"] = function() {
return 0
};
cljs.core.IStack["null"] = !0;
cljs.core._peek["null"] = function() {
return null
};
cljs.core._pop["null"] = function() {
return null
};
cljs.core.ISeq["null"] = !0;
cljs.core._first["null"] = function() {
return null
};
cljs.core._rest["null"] = function() {
return cljs.core.list.call(null)
};
cljs.core.IEquiv["null"] = !0;
cljs.core._equiv["null"] = function(a, b) {
return null == b
};
cljs.core.IWithMeta["null"] = !0;
cljs.core._with_meta["null"] = function() {
return null
};
cljs.core.IMeta["null"] = !0;
cljs.core._meta["null"] = function() {
return null
};
cljs.core.IIndexed["null"] = !0;
cljs.core._nth["null"] = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return null;
case 3:
return d
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.IEmptyableCollection["null"] = !0;
cljs.core._empty["null"] = function() {
return null
};
cljs.core.IMap["null"] = !0;
cljs.core._dissoc["null"] = function() {
return null
};
Date.prototype.cljs$core$IEquiv$ = !0;
Date.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
var c = cljs.core.instance_QMARK_.call(null, Date, b);
return c ? a.toString() === b.toString() : c
};
cljs.core.IHash.number = !0;
cljs.core._hash.number = function(a) {
return a
};
cljs.core.IEquiv.number = !0;
cljs.core._equiv.number = function(a, b) {
return a === b
};
cljs.core.IHash["boolean"] = !0;
cljs.core._hash["boolean"] = function(a) {
return!0 === a ? 1 : 0
};
cljs.core.IWithMeta["function"] = !0;
cljs.core._with_meta["function"] = function(a, b) {
return cljs.core.with_meta.call(null, function() {
if(void 0 === cljs.core.t5559) {
cljs.core.t5559 = {};
cljs.core.t5559 = function(a, b, c) {
this.meta = a;
this.f = b;
this.meta5560 = c;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 393217
};
cljs.core.t5559.cljs$lang$type = !0;
cljs.core.t5559.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/t5559")
};
cljs.core.t5559.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/t5559")
};
var c = cljs.core.t5559.prototype, d = function(a, b) {
return cljs.core.apply.call(null, a.f, b)
}, e = function(a, b) {
var a = this, c = null;
goog.isDef(b) && (c = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return d.call(this, a, c)
};
e.cljs$lang$maxFixedArity = 1;
e.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), a = cljs.core.rest(a);
return d(b, a)
};
e.cljs$lang$arity$variadic = d;
c.call = e;
cljs.core.t5559.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.t5559.prototype.cljs$core$Fn$ = !0;
cljs.core.t5559.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta5560
};
cljs.core.t5559.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.t5559(this.meta, this.f, b)
}
}
return new cljs.core.t5559(b, a, null)
}(), b)
};
cljs.core.IMeta["function"] = !0;
cljs.core._meta["function"] = function() {
return null
};
cljs.core.Fn["function"] = !0;
cljs.core.IHash._ = !0;
cljs.core._hash._ = function(a) {
return goog.getUid(a)
};
cljs.core.inc = function(a) {
return a + 1
};
cljs.core.Reduced = function(a) {
this.val = a;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 32768
};
cljs.core.Reduced.cljs$lang$type = !0;
cljs.core.Reduced.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Reduced")
};
cljs.core.Reduced.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Reduced")
};
cljs.core.Reduced.prototype.cljs$core$IDeref$_deref$arity$1 = function() {
return this.val
};
cljs.core.reduced = function(a) {
return new cljs.core.Reduced(a)
};
cljs.core.reduced_QMARK_ = function(a) {
return cljs.core.instance_QMARK_.call(null, cljs.core.Reduced, a)
};
cljs.core.ci_reduce = function() {
var a = null, b = function(a, b) {
var c = cljs.core._count.call(null, a);
if(0 === c) {
return b.call(null)
}
for(var d = cljs.core._nth.call(null, a, 0), i = 1;;) {
if(i < c) {
d = b.call(null, d, cljs.core._nth.call(null, a, i));
if(cljs.core.reduced_QMARK_.call(null, d)) {
return cljs.core.deref.call(null, d)
}
i += 1
}else {
return d
}
}
}, c = function(a, b, c) {
for(var d = cljs.core._count.call(null, a), i = 0;;) {
if(i < d) {
c = b.call(null, c, cljs.core._nth.call(null, a, i));
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
i += 1
}else {
return c
}
}
}, d = function(a, b, c, d) {
for(var i = cljs.core._count.call(null, a);;) {
if(d < i) {
c = b.call(null, c, cljs.core._nth.call(null, a, d));
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
d += 1
}else {
return c
}
}
}, a = function(a, f, g, h) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, g);
case 4:
return d.call(this, a, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
return a
}();
cljs.core.array_reduce = function() {
var a = null, b = function(a, b) {
var c = a.length;
if(0 === a.length) {
return b.call(null)
}
for(var d = a[0], i = 1;;) {
if(i < c) {
d = b.call(null, d, a[i]);
if(cljs.core.reduced_QMARK_.call(null, d)) {
return cljs.core.deref.call(null, d)
}
i += 1
}else {
return d
}
}
}, c = function(a, b, c) {
for(var d = a.length, i = 0;;) {
if(i < d) {
c = b.call(null, c, a[i]);
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
i += 1
}else {
return c
}
}
}, d = function(a, b, c, d) {
for(var i = a.length;;) {
if(d < i) {
c = b.call(null, c, a[d]);
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
d += 1
}else {
return c
}
}
}, a = function(a, f, g, h) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, g);
case 4:
return d.call(this, a, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
return a
}();
cljs.core.counted_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 2) ? b : a.cljs$core$ICounted$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ICounted, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.ICounted, a)
};
cljs.core.indexed_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 16) ? b : a.cljs$core$IIndexed$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, a)
};
cljs.core.IndexedSeq = function(a, b) {
this.a = a;
this.i = b;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 166199550
};
cljs.core.IndexedSeq.cljs$lang$type = !0;
cljs.core.IndexedSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/IndexedSeq")
};
cljs.core.IndexedSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/IndexedSeq")
};
cljs.core.IndexedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return cljs.core.hash_coll.call(null, a)
};
cljs.core.IndexedSeq.prototype.cljs$core$INext$_next$arity$1 = function() {
return this.i + 1 < this.a.length ? new cljs.core.IndexedSeq(this.a, this.i + 1) : null
};
cljs.core.IndexedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.IndexedSeq.prototype.cljs$core$IReversible$_rseq$arity$1 = function(a) {
var b = a.cljs$core$ICounted$_count$arity$1(a);
return 0 < b ? new cljs.core.RSeq(a, b - 1, null) : cljs.core.List.EMPTY
};
cljs.core.IndexedSeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.counted_QMARK_.call(null, this.a) ? cljs.core.ci_reduce.call(null, this.a, b, this.a[this.i], this.i + 1) : cljs.core.ci_reduce.call(null, a, b, this.a[this.i], 0)
};
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.counted_QMARK_.call(null, this.a) ? cljs.core.ci_reduce.call(null, this.a, b, c, this.i) : cljs.core.ci_reduce.call(null, a, b, c, 0)
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.IndexedSeq.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.a.length - this.i
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return this.a[this.i]
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return this.i + 1 < this.a.length ? new cljs.core.IndexedSeq(this.a, this.i + 1) : cljs.core.list.call(null)
};
cljs.core.IndexedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
var c = b + this.i;
return c < this.a.length ? this.a[c] : null
};
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
a = b + this.i;
return a < this.a.length ? this.a[a] : c
};
cljs.core.IndexedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.List.EMPTY
};
cljs.core.prim_seq = function() {
var a = null, b = function(b) {
return a.call(null, b, 0)
}, c = function(a, b) {
return b < a.length ? new cljs.core.IndexedSeq(a, b) : null
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.array_seq = function() {
var a = null, b = function(a) {
return cljs.core.prim_seq.call(null, a, 0)
}, c = function(a, b) {
return cljs.core.prim_seq.call(null, a, b)
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.IReduce.array = !0;
cljs.core._reduce.array = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return cljs.core.ci_reduce.call(null, a, c);
case 3:
return cljs.core.ci_reduce.call(null, a, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.ILookup.array = !0;
cljs.core._lookup.array = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return a[c];
case 3:
return cljs.core._nth.call(null, a, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.IIndexed.array = !0;
cljs.core._nth.array = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
var e;
e = c < a.length ? a[c] : null;
return e;
case 3:
return e = c < a.length ? a[c] : d, e
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.ICounted.array = !0;
cljs.core._count.array = function(a) {
return a.length
};
cljs.core.ISeqable.array = !0;
cljs.core._seq.array = function(a) {
return cljs.core.array_seq.call(null, a, 0)
};
cljs.core.RSeq = function(a, b, c) {
this.ci = a;
this.i = b;
this.meta = c;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31850574
};
cljs.core.RSeq.cljs$lang$type = !0;
cljs.core.RSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/RSeq")
};
cljs.core.RSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/RSeq")
};
cljs.core.RSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return cljs.core.hash_coll.call(null, a)
};
cljs.core.RSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.RSeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.RSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.RSeq.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.i + 1
};
cljs.core.RSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return cljs.core._nth.call(null, this.ci, this.i)
};
cljs.core.RSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return 0 < this.i ? new cljs.core.RSeq(this.ci, this.i - 1, null) : cljs.core.List.EMPTY
};
cljs.core.RSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.RSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.RSeq(this.ci, this.i, b)
};
cljs.core.RSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.RSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.second = function(a) {
return cljs.core.first.call(null, cljs.core.next.call(null, a))
};
cljs.core.ffirst = function(a) {
return cljs.core.first.call(null, cljs.core.first.call(null, a))
};
cljs.core.nfirst = function(a) {
return cljs.core.next.call(null, cljs.core.first.call(null, a))
};
cljs.core.fnext = function(a) {
return cljs.core.first.call(null, cljs.core.next.call(null, a))
};
cljs.core.nnext = function(a) {
return cljs.core.next.call(null, cljs.core.next.call(null, a))
};
cljs.core.last = function(a) {
for(;;) {
var b = cljs.core.next.call(null, a);
if(null != b) {
a = b
}else {
return cljs.core.first.call(null, a)
}
}
};
cljs.core.IEquiv._ = !0;
cljs.core._equiv._ = function(a, b) {
return a === b
};
cljs.core.conj = function() {
var a = null, b = function(a, b) {
return cljs.core._conj.call(null, a, b)
}, c = function(b, c, d) {
for(;;) {
if(cljs.core.truth_(d)) {
b = a.call(null, b, c), c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d)
}else {
return a.call(null, b, c)
}
}
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.empty = function(a) {
return cljs.core._empty.call(null, a)
};
cljs.core.accumulating_seq_count = function(a) {
for(var a = cljs.core.seq.call(null, a), b = 0;;) {
if(cljs.core.counted_QMARK_.call(null, a)) {
return b + cljs.core._count.call(null, a)
}
a = cljs.core.next.call(null, a);
b += 1
}
};
cljs.core.count = function(a) {
return cljs.core.counted_QMARK_.call(null, a) ? cljs.core._count.call(null, a) : cljs.core.accumulating_seq_count.call(null, a)
};
cljs.core.linear_traversal_nth = function() {
var a = null, b = function(a, b) {
for(;;) {
if(null == a) {
throw Error("Index out of bounds");
}
if(0 === b) {
if(cljs.core.seq.call(null, a)) {
return cljs.core.first.call(null, a)
}
throw Error("Index out of bounds");
}
if(cljs.core.indexed_QMARK_.call(null, a)) {
return cljs.core._nth.call(null, a, b)
}
if(cljs.core.seq.call(null, a)) {
var c = cljs.core.next.call(null, a), g = b - 1, a = c, b = g
}else {
throw Error("Index out of bounds");
}
}
}, c = function(a, b, c) {
for(;;) {
if(null == a) {
return c
}
if(0 === b) {
return cljs.core.seq.call(null, a) ? cljs.core.first.call(null, a) : c
}
if(cljs.core.indexed_QMARK_.call(null, a)) {
return cljs.core._nth.call(null, a, b, c)
}
if(cljs.core.seq.call(null, a)) {
a = cljs.core.next.call(null, a), b -= 1
}else {
return c
}
}
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.nth = function() {
var a = null, b = function(a, b) {
var c;
null == a ? c = null : (a ? (c = (c = a.cljs$lang$protocol_mask$partition0$ & 16) ? c : a.cljs$core$IIndexed$, c = c ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, a)) : c = cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, a), c = c ? cljs.core._nth.call(null, a, Math.floor(b)) : cljs.core.linear_traversal_nth.call(null, a, Math.floor(b)));
return c
}, c = function(a, b, c) {
if(null != a) {
var g;
a ? (g = (g = a.cljs$lang$protocol_mask$partition0$ & 16) ? g : a.cljs$core$IIndexed$, g = g ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, a)) : g = cljs.core.type_satisfies_.call(null, cljs.core.IIndexed, a);
a = g ? cljs.core._nth.call(null, a, Math.floor(b), c) : cljs.core.linear_traversal_nth.call(null, a, Math.floor(b), c)
}else {
a = c
}
return a
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.get = function() {
var a = null, b = function(a, b) {
return cljs.core._lookup.call(null, a, b)
}, c = function(a, b, c) {
return cljs.core._lookup.call(null, a, b, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.assoc = function() {
var a = null, b = function(a, b, c) {
return cljs.core._assoc.call(null, a, b, c)
}, c = function(b, c, d, h) {
for(;;) {
if(b = a.call(null, b, c, d), cljs.core.truth_(h)) {
c = cljs.core.first.call(null, h), d = cljs.core.second.call(null, h), h = cljs.core.nnext.call(null, h)
}else {
return b
}
}
}, d = function(a, b, d, h) {
var i = null;
goog.isDef(h) && (i = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return c.call(this, a, b, d, i)
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), h = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return c(b, d, h, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g, h) {
switch(arguments.length) {
case 3:
return b.call(this, a, c, g);
default:
return d.cljs$lang$arity$variadic(a, c, g, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.dissoc = function() {
var a = null, b = function(a, b) {
return cljs.core._dissoc.call(null, a, b)
}, c = function(b, c, d) {
for(;;) {
if(b = a.call(null, b, c), cljs.core.truth_(d)) {
c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d)
}else {
return b
}
}
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return a;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.with_meta = function(a, b) {
return cljs.core._with_meta.call(null, a, b)
};
cljs.core.meta = function(a) {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 131072) ? b : a.cljs$core$IMeta$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IMeta, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.IMeta, a);
return b ? cljs.core._meta.call(null, a) : null
};
cljs.core.peek = function(a) {
return cljs.core._peek.call(null, a)
};
cljs.core.pop = function(a) {
return cljs.core._pop.call(null, a)
};
cljs.core.disj = function() {
var a = null, b = function(a, b) {
return cljs.core._disjoin.call(null, a, b)
}, c = function(b, c, d) {
for(;;) {
if(b = a.call(null, b, c), cljs.core.truth_(d)) {
c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d)
}else {
return b
}
}
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return a;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.string_hash_cache = {};
cljs.core.string_hash_cache_count = 0;
cljs.core.add_to_string_hash_cache = function(a) {
var b = goog.string.hashCode(a);
cljs.core.string_hash_cache[a] = b;
cljs.core.string_hash_cache_count += 1;
return b
};
cljs.core.check_string_hash_cache = function(a) {
255 < cljs.core.string_hash_cache_count && (cljs.core.string_hash_cache = {}, cljs.core.string_hash_cache_count = 0);
var b = cljs.core.string_hash_cache[a];
return null != b ? b : cljs.core.add_to_string_hash_cache.call(null, a)
};
cljs.core.hash = function() {
var a = null, b = function(b) {
return a.call(null, b, !0)
}, c = function(a, b) {
var c = goog.isString(a);
return(c ? b : c) ? cljs.core.check_string_hash_cache.call(null, a) : cljs.core._hash.call(null, a)
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.empty_QMARK_ = function(a) {
var b = null == a;
return b ? b : cljs.core.not.call(null, cljs.core.seq.call(null, a))
};
cljs.core.coll_QMARK_ = function(a) {
if(null == a) {
return!1
}
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 8) ? b : a.cljs$core$ICollection$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ICollection, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.ICollection, a)
};
cljs.core.set_QMARK_ = function(a) {
if(null == a) {
return!1
}
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 4096) ? b : a.cljs$core$ISet$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISet, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.ISet, a)
};
cljs.core.associative_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 512) ? b : a.cljs$core$IAssociative$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IAssociative, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IAssociative, a)
};
cljs.core.sequential_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 16777216) ? b : a.cljs$core$ISequential$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISequential, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.ISequential, a)
};
cljs.core.reduceable_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 524288) ? b : a.cljs$core$IReduce$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IReduce, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IReduce, a)
};
cljs.core.map_QMARK_ = function(a) {
if(null == a) {
return!1
}
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 1024) ? b : a.cljs$core$IMap$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IMap, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IMap, a)
};
cljs.core.vector_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 16384) ? b : a.cljs$core$IVector$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IVector, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IVector, a)
};
cljs.core.chunked_seq_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition1$ & 512) ? b : a.cljs$core$IChunkedSeq$;
return b ? !0 : a.cljs$lang$protocol_mask$partition1$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IChunkedSeq, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IChunkedSeq, a)
};
cljs.core.js_obj = function() {
var a = null, b = function(a) {
return cljs.core.apply.call(null, goog.object.create, a)
}, c = function(a) {
var c = null;
goog.isDef(a) && (c = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return b.call(this, c)
};
c.cljs$lang$maxFixedArity = 0;
c.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return b(a)
};
c.cljs$lang$arity$variadic = b;
a = function(a) {
switch(arguments.length) {
case 0:
return{};
default:
return c.cljs$lang$arity$variadic(cljs.core.array_seq(arguments, 0))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 0;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$0 = function() {
return{}
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core.js_keys = function(a) {
var b = [];
goog.object.forEach(a, function(a, d) {
return b.push(d)
});
return b
};
cljs.core.js_delete = function(a, b) {
return delete a[b]
};
cljs.core.array_copy = function(a, b, c, d, e) {
for(;;) {
if(0 === e) {
return c
}
c[d] = a[b];
d += 1;
e -= 1;
b += 1
}
};
cljs.core.array_copy_downward = function(a, b, c, d, e) {
b += e - 1;
for(d += e - 1;;) {
if(0 === e) {
return c
}
c[d] = a[b];
d -= 1;
e -= 1;
b -= 1
}
};
cljs.core.lookup_sentinel = {};
cljs.core.false_QMARK_ = function(a) {
return!1 === a
};
cljs.core.true_QMARK_ = function(a) {
return!0 === a
};
cljs.core.undefined_QMARK_ = function(a) {
return void 0 === a
};
cljs.core.seq_QMARK_ = function(a) {
if(null == a) {
return!1
}
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 64) ? b : a.cljs$core$ISeq$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISeq, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.ISeq, a)
};
cljs.core.seqable_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 8388608) ? b : a.cljs$core$ISeqable$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISeqable, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.ISeqable, a)
};
cljs.core.boolean$ = function(a) {
return cljs.core.truth_(a) ? !0 : !1
};
cljs.core.string_QMARK_ = function(a) {
var b = goog.isString(a);
return b ? (a = (b = "\ufdd0" === a.charAt(0)) ? b : "\ufdd1" === a.charAt(0), !a) : b
};
cljs.core.keyword_QMARK_ = function(a) {
var b = goog.isString(a);
return b ? "\ufdd0" === a.charAt(0) : b
};
cljs.core.symbol_QMARK_ = function(a) {
var b = goog.isString(a);
return b ? "\ufdd1" === a.charAt(0) : b
};
cljs.core.number_QMARK_ = function(a) {
return goog.isNumber(a)
};
cljs.core.fn_QMARK_ = function(a) {
var b = goog.isFunction(a);
return b ? b : a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.cljs$core$Fn$) ? !0 : a.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.Fn, a) : cljs.core.type_satisfies_.call(null, cljs.core.Fn, a)
};
cljs.core.ifn_QMARK_ = function(a) {
var b = cljs.core.fn_QMARK_.call(null, a);
return b ? b : a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 1) ? b : a.cljs$core$IFn$, b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IFn, a)) : cljs.core.type_satisfies_.call(null, cljs.core.IFn, a)
};
cljs.core.integer_QMARK_ = function(a) {
var b = cljs.core.number_QMARK_.call(null, a);
return b && (b = !isNaN(a)) ? (b = Infinity !== a) ? parseFloat(a) === parseInt(a, 10) : b : b
};
cljs.core.contains_QMARK_ = function(a, b) {
return cljs.core._lookup.call(null, a, b, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? !1 : !0
};
cljs.core.find = function(a, b) {
var c;
if(c = null != a) {
c = (c = cljs.core.associative_QMARK_.call(null, a)) ? cljs.core.contains_QMARK_.call(null, a, b) : c
}
return c ? cljs.core.PersistentVector.fromArray([b, cljs.core._lookup.call(null, a, b)], !0) : null
};
cljs.core.distinct_QMARK_ = function() {
var a = null, b = function(a, b) {
return!cljs.core._EQ_.call(null, a, b)
}, c = function(a, b, c) {
if(cljs.core._EQ_.call(null, a, b)) {
return!1
}
a = cljs.core.PersistentHashSet.fromArray([b, a]);
for(b = c;;) {
var d = cljs.core.first.call(null, b), c = cljs.core.next.call(null, b);
if(cljs.core.truth_(b)) {
if(cljs.core.contains_QMARK_.call(null, a, d)) {
return!1
}
a = cljs.core.conj.call(null, a, d);
b = c
}else {
return!0
}
}
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.compare = function(a, b) {
if(a === b) {
return 0
}
if(null == a) {
return-1
}
if(null == b) {
return 1
}
if(cljs.core.type.call(null, a) === cljs.core.type.call(null, b)) {
var c;
a ? (c = (c = a.cljs$lang$protocol_mask$partition1$ & 2048) ? c : a.cljs$core$IComparable$, c = c ? !0 : a.cljs$lang$protocol_mask$partition1$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IComparable, a)) : c = cljs.core.type_satisfies_.call(null, cljs.core.IComparable, a);
return c ? cljs.core._compare.call(null, a, b) : goog.array.defaultCompare(a, b)
}
throw Error("compare on non-nil objects of different types");
};
cljs.core.compare_indexed = function() {
var a = null, b = function(b, c) {
var f = cljs.core.count.call(null, b), g = cljs.core.count.call(null, c);
return f < g ? -1 : f > g ? 1 : a.call(null, b, c, f, 0)
}, c = function(a, b, c, g) {
for(;;) {
var h = cljs.core.compare.call(null, cljs.core.nth.call(null, a, g), cljs.core.nth.call(null, b, g)), i;
i = (i = 0 === h) ? g + 1 < c : i;
if(i) {
g += 1
}else {
return h
}
}
}, a = function(a, e, f, g) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 4:
return c.call(this, a, e, f, g)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$4 = c;
return a
}();
cljs.core.fn__GT_comparator = function(a) {
return cljs.core._EQ_.call(null, a, cljs.core.compare) ? cljs.core.compare : function(b, c) {
var d = a.call(null, b, c);
return cljs.core.number_QMARK_.call(null, d) ? d : cljs.core.truth_(d) ? -1 : cljs.core.truth_(a.call(null, c, b)) ? 1 : 0
}
};
cljs.core.sort = function() {
var a = null, b = function(b) {
return a.call(null, cljs.core.compare, b)
}, c = function(a, b) {
if(cljs.core.seq.call(null, b)) {
var c = cljs.core.to_array.call(null, b);
goog.array.stableSort(c, cljs.core.fn__GT_comparator.call(null, a));
return cljs.core.seq.call(null, c)
}
return cljs.core.List.EMPTY
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.sort_by = function() {
var a = null, b = function(b, c) {
return a.call(null, b, cljs.core.compare, c)
}, c = function(a, b, c) {
return cljs.core.sort.call(null, function(c, f) {
return cljs.core.fn__GT_comparator.call(null, b).call(null, a.call(null, c), a.call(null, f))
}, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.seq_reduce = function() {
var a = null, b = function(a, b) {
var c = cljs.core.seq.call(null, b);
return c ? cljs.core.reduce.call(null, a, cljs.core.first.call(null, c), cljs.core.next.call(null, c)) : a.call(null)
}, c = function(a, b, c) {
for(c = cljs.core.seq.call(null, c);;) {
if(c) {
b = a.call(null, b, cljs.core.first.call(null, c));
if(cljs.core.reduced_QMARK_.call(null, b)) {
return cljs.core.deref.call(null, b)
}
c = cljs.core.next.call(null, c)
}else {
return b
}
}
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.shuffle = function(a) {
a = cljs.core.to_array.call(null, a);
goog.array.shuffle(a);
return cljs.core.vec.call(null, a)
};
cljs.core.reduce = function() {
var a = null, b = function(a, b) {
var c;
b ? (c = (c = b.cljs$lang$protocol_mask$partition0$ & 524288) ? c : b.cljs$core$IReduce$, c = c ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IReduce, b)) : c = cljs.core.type_satisfies_.call(null, cljs.core.IReduce, b);
return c ? cljs.core._reduce.call(null, b, a) : cljs.core.seq_reduce.call(null, a, b)
}, c = function(a, b, c) {
var g;
c ? (g = (g = c.cljs$lang$protocol_mask$partition0$ & 524288) ? g : c.cljs$core$IReduce$, g = g ? !0 : c.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IReduce, c)) : g = cljs.core.type_satisfies_.call(null, cljs.core.IReduce, c);
return g ? cljs.core._reduce.call(null, c, a, b) : cljs.core.seq_reduce.call(null, a, b, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.reduce_kv = function(a, b, c) {
return cljs.core._kv_reduce.call(null, c, a, b)
};
cljs.core._PLUS_ = function() {
var a = null, b = function(b, c, f) {
return cljs.core.reduce.call(null, a, b + c, f)
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 0:
return 0;
case 1:
return a;
case 2:
return a + b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$0 = function() {
return 0
};
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = function(a, b) {
return a + b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core._ = function() {
var a = null, b = function(b, c, f) {
return cljs.core.reduce.call(null, a, b - c, f)
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 1:
return-a;
case 2:
return a - b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return-a
};
a.cljs$lang$arity$2 = function(a, b) {
return a - b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core._STAR_ = function() {
var a = null, b = function(b, c, f) {
return cljs.core.reduce.call(null, a, b * c, f)
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 0:
return 1;
case 1:
return a;
case 2:
return a * b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$0 = function() {
return 1
};
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = function(a, b) {
return a * b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core._SLASH_ = function() {
var a = null, b = function(b) {
return a.call(null, 1, b)
}, c = function(b, c, d) {
return cljs.core.reduce.call(null, a, a.call(null, b, c), d)
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return a / c;
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = function(a, b) {
return a / b
};
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core._LT_ = function() {
var a = null, b = function(a, b, c) {
for(;;) {
if(a < b) {
if(cljs.core.next.call(null, c)) {
a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c)
}else {
return b < cljs.core.first.call(null, c)
}
}else {
return!1
}
}
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return a < b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = function(a, b) {
return a < b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core._LT__EQ_ = function() {
var a = null, b = function(a, b, c) {
for(;;) {
if(a <= b) {
if(cljs.core.next.call(null, c)) {
a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c)
}else {
return b <= cljs.core.first.call(null, c)
}
}else {
return!1
}
}
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return a <= b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = function(a, b) {
return a <= b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core._GT_ = function() {
var a = null, b = function(a, b, c) {
for(;;) {
if(a > b) {
if(cljs.core.next.call(null, c)) {
a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c)
}else {
return b > cljs.core.first.call(null, c)
}
}else {
return!1
}
}
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return a > b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = function(a, b) {
return a > b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core._GT__EQ_ = function() {
var a = null, b = function(a, b, c) {
for(;;) {
if(a >= b) {
if(cljs.core.next.call(null, c)) {
a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c)
}else {
return b >= cljs.core.first.call(null, c)
}
}else {
return!1
}
}
}, c = function(a, c, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return b.call(this, a, c, g)
};
c.cljs$lang$maxFixedArity = 2;
c.cljs$lang$applyTo = function(a) {
var c = cljs.core.first(a), f = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return b(c, f, a)
};
c.cljs$lang$arity$variadic = b;
a = function(a, b, f) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return a >= b;
default:
return c.cljs$lang$arity$variadic(a, b, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = c.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = function(a, b) {
return a >= b
};
a.cljs$lang$arity$variadic = c.cljs$lang$arity$variadic;
return a
}();
cljs.core.dec = function(a) {
return a - 1
};
cljs.core.max = function() {
var a = null, b = function(a, b) {
return a > b ? a : b
}, c = function(b, c, d) {
return cljs.core.reduce.call(null, a, b > c ? b : c, d)
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return a;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.min = function() {
var a = null, b = function(a, b) {
return a < b ? a : b
}, c = function(b, c, d) {
return cljs.core.reduce.call(null, a, b < c ? b : c, d)
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return a;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.fix = function(a) {
return 0 <= a ? Math.floor.call(null, a) : Math.ceil.call(null, a)
};
cljs.core.int$ = function(a) {
return cljs.core.fix.call(null, a)
};
cljs.core.long$ = function(a) {
return cljs.core.fix.call(null, a)
};
cljs.core.js_mod = function(a, b) {
return a % b
};
cljs.core.mod = function(a, b) {
return(a % b + b) % b
};
cljs.core.quot = function(a, b) {
return cljs.core.fix.call(null, (a - a % b) / b)
};
cljs.core.rem = function(a, b) {
var c = cljs.core.quot.call(null, a, b);
return a - b * c
};
cljs.core.rand = function() {
var a = null, b = function() {
return Math.random.call(null)
}, c = function(b) {
return b * a.call(null)
}, a = function(a) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return c.call(this, a)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = c;
return a
}();
cljs.core.rand_int = function(a) {
return cljs.core.fix.call(null, cljs.core.rand.call(null, a))
};
cljs.core.bit_xor = function(a, b) {
return a ^ b
};
cljs.core.bit_and = function(a, b) {
return a & b
};
cljs.core.bit_or = function(a, b) {
return a | b
};
cljs.core.bit_and_not = function(a, b) {
return a & ~b
};
cljs.core.bit_clear = function(a, b) {
return a & ~(1 << b)
};
cljs.core.bit_flip = function(a, b) {
return a ^ 1 << b
};
cljs.core.bit_not = function(a) {
return~a
};
cljs.core.bit_set = function(a, b) {
return a | 1 << b
};
cljs.core.bit_test = function(a, b) {
return 0 != (a & 1 << b)
};
cljs.core.bit_shift_left = function(a, b) {
return a << b
};
cljs.core.bit_shift_right = function(a, b) {
return a >> b
};
cljs.core.bit_shift_right_zero_fill = function(a, b) {
return a >>> b
};
cljs.core.bit_count = function(a) {
a -= a >> 1 & 1431655765;
a = (a & 858993459) + (a >> 2 & 858993459);
return 16843009 * (a + (a >> 4) & 252645135) >> 24
};
cljs.core._EQ__EQ_ = function() {
var a = null, b = function(a, b) {
return cljs.core._equiv.call(null, a, b)
}, c = function(b, c, d) {
for(;;) {
if(cljs.core.truth_(a.call(null, b, c))) {
if(cljs.core.next.call(null, d)) {
b = c, c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d)
}else {
return a.call(null, c, cljs.core.first.call(null, d))
}
}else {
return!1
}
}
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return!0;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!0
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.pos_QMARK_ = function(a) {
return 0 < a
};
cljs.core.zero_QMARK_ = function(a) {
return 0 === a
};
cljs.core.neg_QMARK_ = function(a) {
return 0 > a
};
cljs.core.nthnext = function(a, b) {
for(var c = b, d = cljs.core.seq.call(null, a);;) {
if(cljs.core.truth_(function() {
var a = d;
return a ? 0 < c : a
}())) {
var e = c - 1, f = cljs.core.next.call(null, d), c = e, d = f
}else {
return d
}
}
};
cljs.core.str_STAR_ = function() {
var a = null, b = function(a) {
return null == a ? "" : a.toString()
}, c = function(b, c) {
return function(b, c) {
for(;;) {
if(cljs.core.truth_(c)) {
var d = b.append(a.call(null, cljs.core.first.call(null, c))), e = cljs.core.next.call(null, c), b = d, c = e
}else {
return a.call(null, b)
}
}
}.call(null, new goog.string.StringBuffer(a.call(null, b)), c)
}, d = function(a, b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, a, d)
};
d.cljs$lang$maxFixedArity = 1;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), a = cljs.core.rest(a);
return c(b, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c) {
switch(arguments.length) {
case 0:
return"";
case 1:
return b.call(this, a);
default:
return d.cljs$lang$arity$variadic(a, cljs.core.array_seq(arguments, 1))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 1;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$0 = function() {
return""
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.str = function() {
var a = null, b = function(a) {
return cljs.core.symbol_QMARK_.call(null, a) ? a.substring(2, a.length) : cljs.core.keyword_QMARK_.call(null, a) ? cljs.core.str_STAR_.call(null, ":", a.substring(2, a.length)) : null == a ? "" : a.toString()
}, c = function(b, c) {
return function(b, c) {
for(;;) {
if(cljs.core.truth_(c)) {
var d = b.append(a.call(null, cljs.core.first.call(null, c))), e = cljs.core.next.call(null, c), b = d, c = e
}else {
return cljs.core.str_STAR_.call(null, b)
}
}
}.call(null, new goog.string.StringBuffer(a.call(null, b)), c)
}, d = function(a, b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, a, d)
};
d.cljs$lang$maxFixedArity = 1;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), a = cljs.core.rest(a);
return c(b, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c) {
switch(arguments.length) {
case 0:
return"";
case 1:
return b.call(this, a);
default:
return d.cljs$lang$arity$variadic(a, cljs.core.array_seq(arguments, 1))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 1;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$0 = function() {
return""
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.subs = function() {
var a = null, a = function(a, c, d) {
switch(arguments.length) {
case 2:
return a.substring(c);
case 3:
return a.substring(c, d)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = function(a, c) {
return a.substring(c)
};
a.cljs$lang$arity$3 = function(a, c, d) {
return a.substring(c, d)
};
return a
}();
cljs.core.format = function() {
var a = function(a, b) {
var e = cljs.core.map.call(null, function(a) {
var b;
b = (b = cljs.core.keyword_QMARK_.call(null, a)) ? b : cljs.core.symbol_QMARK_.call(null, a);
return b ? "" + cljs.core.str(a) : a
}, b);
return cljs.core.apply.call(null, goog.string.format, a, e)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.symbol = function() {
var a = null, b = function(a) {
return cljs.core.symbol_QMARK_.call(null, a) ? a : cljs.core.keyword_QMARK_.call(null, a) ? cljs.core.str_STAR_.call(null, "\ufdd1", "'", cljs.core.subs.call(null, a, 2)) : cljs.core.str_STAR_.call(null, "\ufdd1", "'", a)
}, c = function(b, c) {
return a.call(null, cljs.core.str_STAR_.call(null, b, "/", c))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.keyword = function() {
var a = null, b = function(a) {
return cljs.core.keyword_QMARK_.call(null, a) ? a : cljs.core.symbol_QMARK_.call(null, a) ? cljs.core.str_STAR_.call(null, "\ufdd0", "'", cljs.core.subs.call(null, a, 2)) : cljs.core.str_STAR_.call(null, "\ufdd0", "'", a)
}, c = function(b, c) {
return a.call(null, cljs.core.str_STAR_.call(null, b, "/", c))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.equiv_sequential = function(a, b) {
return cljs.core.boolean$.call(null, cljs.core.sequential_QMARK_.call(null, b) ? function() {
for(var c = cljs.core.seq.call(null, a), d = cljs.core.seq.call(null, b);;) {
if(null == c) {
return null == d
}
if(null != d && cljs.core._EQ_.call(null, cljs.core.first.call(null, c), cljs.core.first.call(null, d))) {
c = cljs.core.next.call(null, c), d = cljs.core.next.call(null, d)
}else {
return!1
}
}
}() : null)
};
cljs.core.hash_combine = function(a, b) {
return a ^ b + 2654435769 + (a << 6) + (a >> 2)
};
cljs.core.hash_coll = function(a) {
return cljs.core.reduce.call(null, function(a, c) {
return cljs.core.hash_combine.call(null, a, cljs.core.hash.call(null, c, !1))
}, cljs.core.hash.call(null, cljs.core.first.call(null, a), !1), cljs.core.next.call(null, a))
};
cljs.core.hash_imap = function(a) {
for(var b = 0, a = cljs.core.seq.call(null, a);;) {
if(a) {
var c = cljs.core.first.call(null, a), b = (b + (cljs.core.hash.call(null, cljs.core.key.call(null, c)) ^ cljs.core.hash.call(null, cljs.core.val.call(null, c)))) % 4503599627370496, a = cljs.core.next.call(null, a)
}else {
return b
}
}
};
cljs.core.hash_iset = function(a) {
for(var b = 0, a = cljs.core.seq.call(null, a);;) {
if(a) {
var c = cljs.core.first.call(null, a), b = (b + cljs.core.hash.call(null, c)) % 4503599627370496, a = cljs.core.next.call(null, a)
}else {
return b
}
}
};
cljs.core.extend_object_BANG_ = function(a, b) {
for(var c = cljs.core.seq.call(null, b);;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), e = cljs.core.name.call(null, e);
a[e] = d;
c = cljs.core.next.call(null, c)
}else {
break
}
}
return a
};
cljs.core.List = function(a, b, c, d, e) {
this.meta = a;
this.first = b;
this.rest = c;
this.count = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 65413358
};
cljs.core.List.cljs$lang$type = !0;
cljs.core.List.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/List")
};
cljs.core.List.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/List")
};
cljs.core.List.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.List.prototype.cljs$core$INext$_next$arity$1 = function() {
return 1 === this.count ? null : this.rest
};
cljs.core.List.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return new cljs.core.List(this.meta, b, a, this.count + 1, null)
};
cljs.core.List.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.List.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.List.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.count
};
cljs.core.List.prototype.cljs$core$IStack$_peek$arity$1 = function() {
return this.first
};
cljs.core.List.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
return a.cljs$core$ISeq$_rest$arity$1(a)
};
cljs.core.List.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return this.first
};
cljs.core.List.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return 1 === this.count ? cljs.core.List.EMPTY : this.rest
};
cljs.core.List.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.List.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.List(b, this.first, this.rest, this.count, this.__hash)
};
cljs.core.List.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.List.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.List.EMPTY
};
cljs.core.EmptyList = function(a) {
this.meta = a;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 65413326
};
cljs.core.EmptyList.cljs$lang$type = !0;
cljs.core.EmptyList.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/EmptyList")
};
cljs.core.EmptyList.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/EmptyList")
};
cljs.core.EmptyList.prototype.cljs$core$IHash$_hash$arity$1 = function() {
return 0
};
cljs.core.EmptyList.prototype.cljs$core$INext$_next$arity$1 = function() {
return null
};
cljs.core.EmptyList.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return new cljs.core.List(this.meta, b, null, 1, null)
};
cljs.core.EmptyList.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.EmptyList.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
return null
};
cljs.core.EmptyList.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return 0
};
cljs.core.EmptyList.prototype.cljs$core$IStack$_peek$arity$1 = function() {
return null
};
cljs.core.EmptyList.prototype.cljs$core$IStack$_pop$arity$1 = function() {
throw Error("Can't pop empty list");
};
cljs.core.EmptyList.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return null
};
cljs.core.EmptyList.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return cljs.core.List.EMPTY
};
cljs.core.EmptyList.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.EmptyList.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.EmptyList(b)
};
cljs.core.EmptyList.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.EmptyList.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
return a
};
cljs.core.List.EMPTY = new cljs.core.EmptyList(null);
cljs.core.reversible_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 134217728) ? b : a.cljs$core$IReversible$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IReversible, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IReversible, a)
};
cljs.core.rseq = function(a) {
return cljs.core._rseq.call(null, a)
};
cljs.core.reverse = function(a) {
return cljs.core.reversible_QMARK_.call(null, a) ? cljs.core.rseq.call(null, a) : cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, a)
};
cljs.core.list = function() {
var a = null, b = function() {
return cljs.core.List.EMPTY
}, c = function(a) {
return cljs.core.conj.call(null, cljs.core.List.EMPTY, a)
}, d = function(b, c) {
return cljs.core.conj.call(null, a.call(null, c), b)
}, e = function(b, c, d) {
return cljs.core.conj.call(null, a.call(null, c, d), b)
}, f = function(a, b, c, d) {
return cljs.core.conj.call(null, cljs.core.conj.call(null, cljs.core.conj.call(null, cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, cljs.core.reverse.call(null, d)), c), b), a)
}, g = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return f.call(this, a, b, c, e)
};
g.cljs$lang$maxFixedArity = 3;
g.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return f(b, c, d, a)
};
g.cljs$lang$arity$variadic = f;
a = function(a, f, j, k) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return c.call(this, a);
case 2:
return d.call(this, a, f);
case 3:
return e.call(this, a, f, j);
default:
return g.cljs$lang$arity$variadic(a, f, j, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = g.cljs$lang$applyTo;
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = c;
a.cljs$lang$arity$2 = d;
a.cljs$lang$arity$3 = e;
a.cljs$lang$arity$variadic = g.cljs$lang$arity$variadic;
return a
}();
cljs.core.Cons = function(a, b, c, d) {
this.meta = a;
this.first = b;
this.rest = c;
this.__hash = d;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 65405164
};
cljs.core.Cons.cljs$lang$type = !0;
cljs.core.Cons.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Cons")
};
cljs.core.Cons.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Cons")
};
cljs.core.Cons.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.Cons.prototype.cljs$core$INext$_next$arity$1 = function() {
return null == this.rest ? null : cljs.core._seq.call(null, this.rest)
};
cljs.core.Cons.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return new cljs.core.Cons(null, b, a, this.__hash)
};
cljs.core.Cons.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.Cons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.Cons.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return this.first
};
cljs.core.Cons.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return null == this.rest ? cljs.core.List.EMPTY : this.rest
};
cljs.core.Cons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.Cons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.Cons(b, this.first, this.rest, this.__hash)
};
cljs.core.Cons.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.Cons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.cons = function(a, b) {
return function() {
var a = null == b;
return a ? a : b ? (a = (a = b.cljs$lang$protocol_mask$partition0$ & 64) ? a : b.cljs$core$ISeq$, a ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.ISeq, b)) : cljs.core.type_satisfies_.call(null, cljs.core.ISeq, b)
}() ? new cljs.core.Cons(null, a, b, null) : new cljs.core.Cons(null, a, cljs.core.seq.call(null, b), null)
};
cljs.core.list_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 33554432) ? b : a.cljs$core$IList$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IList, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IList, a)
};
cljs.core.IReduce.string = !0;
cljs.core._reduce.string = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return cljs.core.ci_reduce.call(null, a, c);
case 3:
return cljs.core.ci_reduce.call(null, a, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.ILookup.string = !0;
cljs.core._lookup.string = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return cljs.core._nth.call(null, a, c);
case 3:
return cljs.core._nth.call(null, a, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.IIndexed.string = !0;
cljs.core._nth.string = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
var e;
e = c < cljs.core._count.call(null, a) ? a.charAt(c) : null;
return e;
case 3:
return e = c < cljs.core._count.call(null, a) ? a.charAt(c) : d, e
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.ICounted.string = !0;
cljs.core._count.string = function(a) {
return a.length
};
cljs.core.ISeqable.string = !0;
cljs.core._seq.string = function(a) {
return cljs.core.prim_seq.call(null, a, 0)
};
cljs.core.IHash.string = !0;
cljs.core._hash.string = function(a) {
return goog.string.hashCode(a)
};
cljs.core.Keyword = function(a) {
this.k = a;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 1
};
cljs.core.Keyword.cljs$lang$type = !0;
cljs.core.Keyword.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Keyword")
};
cljs.core.Keyword.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Keyword")
};
cljs.core.Keyword.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
var e;
e = a;
e = this;
if(null == c) {
e = null
}else {
var f = c.strobj;
e = null == f ? cljs.core._lookup.call(null, c, e.k, null) : f[e.k]
}
return e;
case 3:
return e = null == c ? d : cljs.core._lookup.call(null, c, this.k, d), e
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.Keyword.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
String.prototype.cljs$core$IFn$ = !0;
String.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return cljs.core._lookup.call(null, c, this.toString(), null);
case 3:
return cljs.core._lookup.call(null, c, this.toString(), d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
String.prototype.apply = function(a, b) {
return a.call.apply(a, [a].concat(b.slice()))
};
String.prototype.apply = function(a, b) {
return 2 > cljs.core.count.call(null, b) ? cljs.core._lookup.call(null, b[0], a, null) : cljs.core._lookup.call(null, b[0], a, b[1])
};
cljs.core.lazy_seq_value = function(a) {
var b = a.x;
if(a.realized) {
return b
}
a.x = b.call(null);
a.realized = !0;
return a.x
};
cljs.core.LazySeq = function(a, b, c, d) {
this.meta = a;
this.realized = b;
this.x = c;
this.__hash = d;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31850700
};
cljs.core.LazySeq.cljs$lang$type = !0;
cljs.core.LazySeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/LazySeq")
};
cljs.core.LazySeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/LazySeq")
};
cljs.core.LazySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.LazySeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
return cljs.core._seq.call(null, a.cljs$core$ISeq$_rest$arity$1(a))
};
cljs.core.LazySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.LazySeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.LazySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return cljs.core.seq.call(null, cljs.core.lazy_seq_value.call(null, a))
};
cljs.core.LazySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
return cljs.core.first.call(null, cljs.core.lazy_seq_value.call(null, a))
};
cljs.core.LazySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
return cljs.core.rest.call(null, cljs.core.lazy_seq_value.call(null, a))
};
cljs.core.LazySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.LazySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.LazySeq(b, this.realized, this.x, this.__hash)
};
cljs.core.LazySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.LazySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.ChunkBuffer = function(a, b) {
this.buf = a;
this.end = b;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 2
};
cljs.core.ChunkBuffer.cljs$lang$type = !0;
cljs.core.ChunkBuffer.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ChunkBuffer")
};
cljs.core.ChunkBuffer.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ChunkBuffer")
};
cljs.core.ChunkBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.end
};
cljs.core.ChunkBuffer.prototype.add = function(a) {
this.buf[this.end] = a;
return this.end += 1
};
cljs.core.ChunkBuffer.prototype.chunk = function() {
var a = new cljs.core.ArrayChunk(this.buf, 0, this.end);
this.buf = null;
return a
};
cljs.core.chunk_buffer = function(a) {
return new cljs.core.ChunkBuffer(cljs.core.make_array.call(null, a), 0)
};
cljs.core.ArrayChunk = function(a, b, c) {
this.arr = a;
this.off = b;
this.end = c;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 524306
};
cljs.core.ArrayChunk.cljs$lang$type = !0;
cljs.core.ArrayChunk.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ArrayChunk")
};
cljs.core.ArrayChunk.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ArrayChunk")
};
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.array_reduce.call(null, this.arr, b, this.arr[this.off], this.off + 1)
};
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.array_reduce.call(null, this.arr, b, c, this.off)
};
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$ = !0;
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$_drop_first$arity$1 = function() {
if(this.off === this.end) {
throw Error("-drop-first of empty chunk");
}
return new cljs.core.ArrayChunk(this.arr, this.off + 1, this.end)
};
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return this.arr[this.off + b]
};
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
a = (a = 0 <= b) ? b < this.end - this.off : a;
return a ? this.arr[this.off + b] : c
};
cljs.core.ArrayChunk.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.end - this.off
};
cljs.core.array_chunk = function() {
var a = null, b = function(b) {
return a.call(null, b, 0, b.length)
}, c = function(b, c) {
return a.call(null, b, c, b.length)
}, d = function(a, b, c) {
return new cljs.core.ArrayChunk(a, b, c)
}, a = function(a, f, g) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, f);
case 3:
return d.call(this, a, f, g)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
return a
}();
cljs.core.ChunkedCons = function(a, b, c, d) {
this.chunk = a;
this.more = b;
this.meta = c;
this.__hash = d;
this.cljs$lang$protocol_mask$partition0$ = 31850604;
this.cljs$lang$protocol_mask$partition1$ = 1536
};
cljs.core.ChunkedCons.cljs$lang$type = !0;
cljs.core.ChunkedCons.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ChunkedCons")
};
cljs.core.ChunkedCons.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ChunkedCons")
};
cljs.core.ChunkedCons.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.ChunkedCons.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return cljs.core._nth.call(null, this.chunk, 0)
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return 1 < cljs.core._count.call(null, this.chunk) ? new cljs.core.ChunkedCons(cljs.core._drop_first.call(null, this.chunk), this.more, this.meta, null) : null == this.more ? cljs.core.List.EMPTY : this.more
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function() {
return null == this.more ? null : this.more
};
cljs.core.ChunkedCons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.ChunkedCons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.ChunkedCons(this.chunk, this.more, b, this.__hash)
};
cljs.core.ChunkedCons.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.ChunkedCons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function() {
return this.chunk
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function() {
return null == this.more ? cljs.core.List.EMPTY : this.more
};
cljs.core.chunk_cons = function(a, b) {
return 0 === cljs.core._count.call(null, a) ? b : new cljs.core.ChunkedCons(a, b, null, null)
};
cljs.core.chunk_append = function(a, b) {
return a.add(b)
};
cljs.core.chunk = function(a) {
return a.chunk()
};
cljs.core.chunk_first = function(a) {
return cljs.core._chunked_first.call(null, a)
};
cljs.core.chunk_rest = function(a) {
return cljs.core._chunked_rest.call(null, a)
};
cljs.core.chunk_next = function(a) {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition1$ & 1024) ? b : a.cljs$core$IChunkedNext$, b = b ? !0 : a.cljs$lang$protocol_mask$partition1$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IChunkedNext, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.IChunkedNext, a);
return b ? cljs.core._chunked_next.call(null, a) : cljs.core.seq.call(null, cljs.core._chunked_rest.call(null, a))
};
cljs.core.to_array = function(a) {
for(var b = [];;) {
if(cljs.core.seq.call(null, a)) {
b.push(cljs.core.first.call(null, a)), a = cljs.core.next.call(null, a)
}else {
return b
}
}
};
cljs.core.to_array_2d = function(a) {
for(var b = cljs.core.make_array.call(null, cljs.core.count.call(null, a)), c = 0, a = cljs.core.seq.call(null, a);;) {
if(a) {
b[c] = cljs.core.to_array.call(null, cljs.core.first.call(null, a)), c += 1, a = cljs.core.next.call(null, a)
}else {
break
}
}
return b
};
cljs.core.long_array = function() {
var a = null, b = function(b) {
if(cljs.core.number_QMARK_.call(null, b)) {
return a.call(null, b, null)
}
if(cljs.core.seq_QMARK_.call(null, b)) {
return cljs.core.into_array.call(null, b)
}
throw Error("long-array called with something other than size or ISeq");
}, c = function(a, b) {
var c = cljs.core.make_array.call(null, a);
if(cljs.core.seq_QMARK_.call(null, b)) {
for(var g = 0, h = cljs.core.seq.call(null, b);;) {
if(cljs.core.truth_(function() {
var b = h;
return b ? g < a : b
}())) {
c[g] = cljs.core.first.call(null, h);
var i = g + 1, j = cljs.core.next.call(null, h), g = i, h = j
}else {
return c
}
}
}else {
for(i = 0;;) {
if(i < a) {
c[i] = b, i += 1
}else {
break
}
}
return c
}
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.double_array = function() {
var a = null, b = function(b) {
if(cljs.core.number_QMARK_.call(null, b)) {
return a.call(null, b, null)
}
if(cljs.core.seq_QMARK_.call(null, b)) {
return cljs.core.into_array.call(null, b)
}
throw Error("double-array called with something other than size or ISeq");
}, c = function(a, b) {
var c = cljs.core.make_array.call(null, a);
if(cljs.core.seq_QMARK_.call(null, b)) {
for(var g = 0, h = cljs.core.seq.call(null, b);;) {
if(cljs.core.truth_(function() {
var b = h;
return b ? g < a : b
}())) {
c[g] = cljs.core.first.call(null, h);
var i = g + 1, j = cljs.core.next.call(null, h), g = i, h = j
}else {
return c
}
}
}else {
for(i = 0;;) {
if(i < a) {
c[i] = b, i += 1
}else {
break
}
}
return c
}
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.object_array = function() {
var a = null, b = function(b) {
if(cljs.core.number_QMARK_.call(null, b)) {
return a.call(null, b, null)
}
if(cljs.core.seq_QMARK_.call(null, b)) {
return cljs.core.into_array.call(null, b)
}
throw Error("object-array called with something other than size or ISeq");
}, c = function(a, b) {
var c = cljs.core.make_array.call(null, a);
if(cljs.core.seq_QMARK_.call(null, b)) {
for(var g = 0, h = cljs.core.seq.call(null, b);;) {
if(cljs.core.truth_(function() {
var b = h;
return b ? g < a : b
}())) {
c[g] = cljs.core.first.call(null, h);
var i = g + 1, j = cljs.core.next.call(null, h), g = i, h = j
}else {
return c
}
}
}else {
for(i = 0;;) {
if(i < a) {
c[i] = b, i += 1
}else {
break
}
}
return c
}
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.bounded_count = function(a, b) {
if(cljs.core.counted_QMARK_.call(null, a)) {
return cljs.core.count.call(null, a)
}
for(var c = a, d = b, e = 0;;) {
if(cljs.core.truth_(function() {
var a = 0 < d;
return a ? cljs.core.seq.call(null, c) : a
}())) {
var f = cljs.core.next.call(null, c), g = d - 1, e = e + 1, c = f, d = g
}else {
return e
}
}
};
cljs.core.spread = function spread(b) {
return null == b ? null : null == cljs.core.next.call(null, b) ? cljs.core.seq.call(null, cljs.core.first.call(null, b)) : cljs.core.cons.call(null, cljs.core.first.call(null, b), spread.call(null, cljs.core.next.call(null, b)))
};
cljs.core.concat = function() {
var a = null, b = function() {
return new cljs.core.LazySeq(null, !1, function() {
return null
}, null)
}, c = function(a) {
return new cljs.core.LazySeq(null, !1, function() {
return a
}, null)
}, d = function(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, b);
return d ? cljs.core.chunked_seq_QMARK_.call(null, d) ? cljs.core.chunk_cons.call(null, cljs.core.chunk_first.call(null, d), a.call(null, cljs.core.chunk_rest.call(null, d), c)) : cljs.core.cons.call(null, cljs.core.first.call(null, d), a.call(null, cljs.core.rest.call(null, d), c)) : c
}, null)
}, e = function(b, c, d) {
return function k(a, b) {
return new cljs.core.LazySeq(null, !1, function() {
var c = cljs.core.seq.call(null, a);
return c ? cljs.core.chunked_seq_QMARK_.call(null, c) ? cljs.core.chunk_cons.call(null, cljs.core.chunk_first.call(null, c), k.call(null, cljs.core.chunk_rest.call(null, c), b)) : cljs.core.cons.call(null, cljs.core.first.call(null, c), k.call(null, cljs.core.rest.call(null, c), b)) : cljs.core.truth_(b) ? k.call(null, cljs.core.first.call(null, b), cljs.core.next.call(null, b)) : null
}, null)
}.call(null, a.call(null, b, c), d)
}, f = function(a, b, c) {
var d = null;
goog.isDef(c) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return e.call(this, a, b, d)
};
f.cljs$lang$maxFixedArity = 2;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return e(b, c, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return c.call(this, a);
case 2:
return d.call(this, a, e);
default:
return f.cljs$lang$arity$variadic(a, e, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = c;
a.cljs$lang$arity$2 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.list_STAR_ = function() {
var a = null, b = function(a) {
return cljs.core.seq.call(null, a)
}, c = function(a, b) {
return cljs.core.cons.call(null, a, b)
}, d = function(a, b, c) {
return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, c))
}, e = function(a, b, c, d) {
return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, d)))
}, f = function(a, b, c, d, e) {
return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, cljs.core.cons.call(null, d, cljs.core.spread.call(null, e)))))
}, g = function(a, b, c, d, e) {
var g = null;
goog.isDef(e) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
return f.call(this, a, b, c, d, g)
};
g.cljs$lang$maxFixedArity = 4;
g.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), e = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(a))));
return f(b, c, d, e, a)
};
g.cljs$lang$arity$variadic = f;
a = function(a, f, j, k, m) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, f);
case 3:
return d.call(this, a, f, j);
case 4:
return e.call(this, a, f, j, k);
default:
return g.cljs$lang$arity$variadic(a, f, j, k, cljs.core.array_seq(arguments, 4))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 4;
a.cljs$lang$applyTo = g.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
a.cljs$lang$arity$4 = e;
a.cljs$lang$arity$variadic = g.cljs$lang$arity$variadic;
return a
}();
cljs.core.transient$ = function(a) {
return cljs.core._as_transient.call(null, a)
};
cljs.core.persistent_BANG_ = function(a) {
return cljs.core._persistent_BANG_.call(null, a)
};
cljs.core.conj_BANG_ = function(a, b) {
return cljs.core._conj_BANG_.call(null, a, b)
};
cljs.core.assoc_BANG_ = function(a, b, c) {
return cljs.core._assoc_BANG_.call(null, a, b, c)
};
cljs.core.dissoc_BANG_ = function(a, b) {
return cljs.core._dissoc_BANG_.call(null, a, b)
};
cljs.core.pop_BANG_ = function(a) {
return cljs.core._pop_BANG_.call(null, a)
};
cljs.core.disj_BANG_ = function(a, b) {
return cljs.core._disjoin_BANG_.call(null, a, b)
};
cljs.core.apply_to = function(a, b, c) {
var d = cljs.core.seq.call(null, c);
if(0 === b) {
return a.call(null)
}
var c = cljs.core._first.call(null, d), e = cljs.core._rest.call(null, d);
if(1 === b) {
return a.cljs$lang$arity$1 ? a.cljs$lang$arity$1(c) : a.call(null, c)
}
var d = cljs.core._first.call(null, e), f = cljs.core._rest.call(null, e);
if(2 === b) {
return a.cljs$lang$arity$2 ? a.cljs$lang$arity$2(c, d) : a.call(null, c, d)
}
var e = cljs.core._first.call(null, f), g = cljs.core._rest.call(null, f);
if(3 === b) {
return a.cljs$lang$arity$3 ? a.cljs$lang$arity$3(c, d, e) : a.call(null, c, d, e)
}
var f = cljs.core._first.call(null, g), h = cljs.core._rest.call(null, g);
if(4 === b) {
return a.cljs$lang$arity$4 ? a.cljs$lang$arity$4(c, d, e, f) : a.call(null, c, d, e, f)
}
g = cljs.core._first.call(null, h);
h = cljs.core._rest.call(null, h);
if(5 === b) {
return a.cljs$lang$arity$5 ? a.cljs$lang$arity$5(c, d, e, f, g) : a.call(null, c, d, e, f, g)
}
var a = cljs.core._first.call(null, h), i = cljs.core._rest.call(null, h);
if(6 === b) {
return a.cljs$lang$arity$6 ? a.cljs$lang$arity$6(c, d, e, f, g, a) : a.call(null, c, d, e, f, g, a)
}
var h = cljs.core._first.call(null, i), j = cljs.core._rest.call(null, i);
if(7 === b) {
return a.cljs$lang$arity$7 ? a.cljs$lang$arity$7(c, d, e, f, g, a, h) : a.call(null, c, d, e, f, g, a, h)
}
var i = cljs.core._first.call(null, j), k = cljs.core._rest.call(null, j);
if(8 === b) {
return a.cljs$lang$arity$8 ? a.cljs$lang$arity$8(c, d, e, f, g, a, h, i) : a.call(null, c, d, e, f, g, a, h, i)
}
var j = cljs.core._first.call(null, k), m = cljs.core._rest.call(null, k);
if(9 === b) {
return a.cljs$lang$arity$9 ? a.cljs$lang$arity$9(c, d, e, f, g, a, h, i, j) : a.call(null, c, d, e, f, g, a, h, i, j)
}
var k = cljs.core._first.call(null, m), l = cljs.core._rest.call(null, m);
if(10 === b) {
return a.cljs$lang$arity$10 ? a.cljs$lang$arity$10(c, d, e, f, g, a, h, i, j, k) : a.call(null, c, d, e, f, g, a, h, i, j, k)
}
var m = cljs.core._first.call(null, l), n = cljs.core._rest.call(null, l);
if(11 === b) {
return a.cljs$lang$arity$11 ? a.cljs$lang$arity$11(c, d, e, f, g, a, h, i, j, k, m) : a.call(null, c, d, e, f, g, a, h, i, j, k, m)
}
var l = cljs.core._first.call(null, n), p = cljs.core._rest.call(null, n);
if(12 === b) {
return a.cljs$lang$arity$12 ? a.cljs$lang$arity$12(c, d, e, f, g, a, h, i, j, k, m, l) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l)
}
var n = cljs.core._first.call(null, p), q = cljs.core._rest.call(null, p);
if(13 === b) {
return a.cljs$lang$arity$13 ? a.cljs$lang$arity$13(c, d, e, f, g, a, h, i, j, k, m, l, n) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n)
}
var p = cljs.core._first.call(null, q), r = cljs.core._rest.call(null, q);
if(14 === b) {
return a.cljs$lang$arity$14 ? a.cljs$lang$arity$14(c, d, e, f, g, a, h, i, j, k, m, l, n, p) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p)
}
var q = cljs.core._first.call(null, r), s = cljs.core._rest.call(null, r);
if(15 === b) {
return a.cljs$lang$arity$15 ? a.cljs$lang$arity$15(c, d, e, f, g, a, h, i, j, k, m, l, n, p, q) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p, q)
}
var r = cljs.core._first.call(null, s), t = cljs.core._rest.call(null, s);
if(16 === b) {
return a.cljs$lang$arity$16 ? a.cljs$lang$arity$16(c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r)
}
var s = cljs.core._first.call(null, t), u = cljs.core._rest.call(null, t);
if(17 === b) {
return a.cljs$lang$arity$17 ? a.cljs$lang$arity$17(c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s)
}
var t = cljs.core._first.call(null, u), x = cljs.core._rest.call(null, u);
if(18 === b) {
return a.cljs$lang$arity$18 ? a.cljs$lang$arity$18(c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s, t) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s, t)
}
u = cljs.core._first.call(null, x);
x = cljs.core._rest.call(null, x);
if(19 === b) {
return a.cljs$lang$arity$19 ? a.cljs$lang$arity$19(c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s, t, u) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s, t, u)
}
var E = cljs.core._first.call(null, x);
cljs.core._rest.call(null, x);
if(20 === b) {
return a.cljs$lang$arity$20 ? a.cljs$lang$arity$20(c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s, t, u, E) : a.call(null, c, d, e, f, g, a, h, i, j, k, m, l, n, p, q, r, s, t, u, E)
}
throw Error("Only up to 20 arguments supported on functions");
};
cljs.core.apply = function() {
var a = null, b = function(a, b) {
var c = a.cljs$lang$maxFixedArity;
if(a.cljs$lang$applyTo) {
var d = cljs.core.bounded_count.call(null, b, c + 1);
return d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)
}
return a.apply(a, cljs.core.to_array.call(null, b))
}, c = function(a, b, c) {
b = cljs.core.list_STAR_.call(null, b, c);
c = a.cljs$lang$maxFixedArity;
if(a.cljs$lang$applyTo) {
var d = cljs.core.bounded_count.call(null, b, c + 1);
return d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)
}
return a.apply(a, cljs.core.to_array.call(null, b))
}, d = function(a, b, c, d) {
b = cljs.core.list_STAR_.call(null, b, c, d);
c = a.cljs$lang$maxFixedArity;
return a.cljs$lang$applyTo ? (d = cljs.core.bounded_count.call(null, b, c + 1), d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)) : a.apply(a, cljs.core.to_array.call(null, b))
}, e = function(a, b, c, d, e) {
b = cljs.core.list_STAR_.call(null, b, c, d, e);
c = a.cljs$lang$maxFixedArity;
return a.cljs$lang$applyTo ? (d = cljs.core.bounded_count.call(null, b, c + 1), d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)) : a.apply(a, cljs.core.to_array.call(null, b))
}, f = function(a, b, c, d, e, f) {
b = cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, cljs.core.cons.call(null, d, cljs.core.cons.call(null, e, cljs.core.spread.call(null, f)))));
c = a.cljs$lang$maxFixedArity;
return a.cljs$lang$applyTo ? (d = cljs.core.bounded_count.call(null, b, c + 1), d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)) : a.apply(a, cljs.core.to_array.call(null, b))
}, g = function(a, b, c, d, e, g) {
var n = null;
goog.isDef(g) && (n = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0));
return f.call(this, a, b, c, d, e, n)
};
g.cljs$lang$maxFixedArity = 5;
g.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), e = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), g = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(cljs.core.next(a))))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(cljs.core.next(a)))));
return f(b, c, d, e, g, a)
};
g.cljs$lang$arity$variadic = f;
a = function(a, f, j, k, m, l) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, j);
case 4:
return d.call(this, a, f, j, k);
case 5:
return e.call(this, a, f, j, k, m);
default:
return g.cljs$lang$arity$variadic(a, f, j, k, m, cljs.core.array_seq(arguments, 5))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 5;
a.cljs$lang$applyTo = g.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
a.cljs$lang$arity$5 = e;
a.cljs$lang$arity$variadic = g.cljs$lang$arity$variadic;
return a
}();
cljs.core.vary_meta = function() {
var a = function(a, b, e) {
return cljs.core.with_meta.call(null, a, cljs.core.apply.call(null, b, cljs.core.meta.call(null, a), e))
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.not_EQ_ = function() {
var a = null, b = function(a, b) {
return!cljs.core._EQ_.call(null, a, b)
}, c = function(a, b, c) {
return cljs.core.not.call(null, cljs.core.apply.call(null, cljs.core._EQ_, a, b, c))
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return!1;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function() {
return!1
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.not_empty = function(a) {
return cljs.core.seq.call(null, a) ? a : null
};
cljs.core.every_QMARK_ = function(a, b) {
for(;;) {
if(null == cljs.core.seq.call(null, b)) {
return!0
}
if(cljs.core.truth_(a.call(null, cljs.core.first.call(null, b)))) {
var c = a, d = cljs.core.next.call(null, b), a = c, b = d
}else {
return!1
}
}
};
cljs.core.not_every_QMARK_ = function(a, b) {
return!cljs.core.every_QMARK_.call(null, a, b)
};
cljs.core.some = function(a, b) {
for(;;) {
if(cljs.core.seq.call(null, b)) {
var c = a.call(null, cljs.core.first.call(null, b));
if(cljs.core.truth_(c)) {
return c
}
var c = a, d = cljs.core.next.call(null, b), a = c, b = d
}else {
return null
}
}
};
cljs.core.not_any_QMARK_ = function(a, b) {
return cljs.core.not.call(null, cljs.core.some.call(null, a, b))
};
cljs.core.even_QMARK_ = function(a) {
if(cljs.core.integer_QMARK_.call(null, a)) {
return 0 === (a & 1)
}
throw Error([cljs.core.str("Argument must be an integer: "), cljs.core.str(a)].join(""));
};
cljs.core.odd_QMARK_ = function(a) {
return!cljs.core.even_QMARK_.call(null, a)
};
cljs.core.identity = function(a) {
return a
};
cljs.core.complement = function(a) {
var b = null, c = function(b, c, d) {
return cljs.core.not.call(null, cljs.core.apply.call(null, a, b, c, d))
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
b = function(b, c, g) {
switch(arguments.length) {
case 0:
return cljs.core.not.call(null, a.call(null));
case 1:
return cljs.core.not.call(null, a.call(null, b));
case 2:
return cljs.core.not.call(null, a.call(null, b, c));
default:
return d.cljs$lang$arity$variadic(b, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = d.cljs$lang$applyTo;
return b
};
cljs.core.constantly = function(a) {
var b = function(b) {
goog.isDef(b) && cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0);
return a
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
cljs.core.seq(b);
return a
};
b.cljs$lang$arity$variadic = function() {
return a
};
return b
};
cljs.core.comp = function() {
var a = null, b = function() {
return cljs.core.identity
}, c = function(a, b) {
var c = null, d = function(c, d, e, f) {
return a.call(null, cljs.core.apply.call(null, b, c, d, e, f))
}, e = function(a, b, c, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return d.call(this, a, b, c, f)
};
e.cljs$lang$maxFixedArity = 3;
e.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), e = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return d(b, c, e, a)
};
e.cljs$lang$arity$variadic = d;
c = function(c, d, f, i) {
switch(arguments.length) {
case 0:
return a.call(null, b.call(null));
case 1:
return a.call(null, b.call(null, c));
case 2:
return a.call(null, b.call(null, c, d));
case 3:
return a.call(null, b.call(null, c, d, f));
default:
return e.cljs$lang$arity$variadic(c, d, f, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
c.cljs$lang$maxFixedArity = 3;
c.cljs$lang$applyTo = e.cljs$lang$applyTo;
return c
}, d = function(a, b, c) {
var d = null, e = function(d, e, f, j) {
return a.call(null, b.call(null, cljs.core.apply.call(null, c, d, e, f, j)))
}, f = function(a, b, c, d) {
var f = null;
goog.isDef(d) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return e.call(this, a, b, c, f)
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return e(b, c, d, a)
};
f.cljs$lang$arity$variadic = e;
d = function(d, e, j, k) {
switch(arguments.length) {
case 0:
return a.call(null, b.call(null, c.call(null)));
case 1:
return a.call(null, b.call(null, c.call(null, d)));
case 2:
return a.call(null, b.call(null, c.call(null, d, e)));
case 3:
return a.call(null, b.call(null, c.call(null, d, e, j)));
default:
return f.cljs$lang$arity$variadic(d, e, j, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = f.cljs$lang$applyTo;
return d
}, e = function(a, b, c, d) {
var e = cljs.core.reverse.call(null, cljs.core.list_STAR_.call(null, a, b, c, d)), f = function(a) {
for(var a = cljs.core.apply.call(null, cljs.core.first.call(null, e), a), b = cljs.core.next.call(null, e);;) {
if(b) {
a = cljs.core.first.call(null, b).call(null, a), b = cljs.core.next.call(null, b)
}else {
return a
}
}
}, a = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return f.call(this, b)
};
a.cljs$lang$maxFixedArity = 0;
a.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return f(a)
};
a.cljs$lang$arity$variadic = f;
return a
}, f = function(a, b, c, d) {
var f = null;
goog.isDef(d) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return e.call(this, a, b, c, f)
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return e(b, c, d, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return a;
case 2:
return c.call(this, a, e);
case 3:
return d.call(this, a, e, i);
default:
return f.cljs$lang$arity$variadic(a, e, i, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.partial = function() {
var a = null, b = function(a, b) {
var c = function(c) {
return cljs.core.apply.call(null, a, b, c)
}, d = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return c.call(this, b)
};
d.cljs$lang$maxFixedArity = 0;
d.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return c(a)
};
d.cljs$lang$arity$variadic = c;
return d
}, c = function(a, b, c) {
var d = function(d) {
return cljs.core.apply.call(null, a, b, c, d)
}, e = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return d.call(this, b)
};
e.cljs$lang$maxFixedArity = 0;
e.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return d(a)
};
e.cljs$lang$arity$variadic = d;
return e
}, d = function(a, b, c, d) {
var e = function(e) {
return cljs.core.apply.call(null, a, b, c, d, e)
}, f = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return e.call(this, b)
};
f.cljs$lang$maxFixedArity = 0;
f.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return e(a)
};
f.cljs$lang$arity$variadic = e;
return f
}, e = function(a, b, c, d, e) {
var f = function(f) {
return cljs.core.apply.call(null, a, b, c, d, cljs.core.concat.call(null, e, f))
}, l = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return f.call(this, b)
};
l.cljs$lang$maxFixedArity = 0;
l.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return f(a)
};
l.cljs$lang$arity$variadic = f;
return l
}, f = function(a, b, c, d, f) {
var m = null;
goog.isDef(f) && (m = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
return e.call(this, a, b, c, d, m)
};
f.cljs$lang$maxFixedArity = 4;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), f = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(a))));
return e(b, c, d, f, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j, k) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, i);
case 4:
return d.call(this, a, e, i, j);
default:
return f.cljs$lang$arity$variadic(a, e, i, j, cljs.core.array_seq(arguments, 4))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 4;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.fnil = function() {
var a = null, b = function(a, b) {
var c = null, d = function(c, d, g, h) {
return cljs.core.apply.call(null, a, null == c ? b : c, d, g, h)
}, i = function(a, b, c, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return d.call(this, a, b, c, f)
};
i.cljs$lang$maxFixedArity = 3;
i.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), e = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return d(b, c, e, a)
};
i.cljs$lang$arity$variadic = d;
c = function(c, d, g, h) {
switch(arguments.length) {
case 1:
return a.call(null, null == c ? b : c);
case 2:
return a.call(null, null == c ? b : c, d);
case 3:
return a.call(null, null == c ? b : c, d, g);
default:
return i.cljs$lang$arity$variadic(c, d, g, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
c.cljs$lang$maxFixedArity = 3;
c.cljs$lang$applyTo = i.cljs$lang$applyTo;
return c
}, c = function(a, b, c) {
var d = null, i = function(d, h, i, j) {
return cljs.core.apply.call(null, a, null == d ? b : d, null == h ? c : h, i, j)
}, j = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return i.call(this, a, b, c, e)
};
j.cljs$lang$maxFixedArity = 3;
j.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return i(b, c, d, a)
};
j.cljs$lang$arity$variadic = i;
d = function(d, h, i, n) {
switch(arguments.length) {
case 2:
return a.call(null, null == d ? b : d, null == h ? c : h);
case 3:
return a.call(null, null == d ? b : d, null == h ? c : h, i);
default:
return j.cljs$lang$arity$variadic(d, h, i, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = j.cljs$lang$applyTo;
return d
}, d = function(a, b, c, d) {
var i = null, j = function(i, j, k, p) {
return cljs.core.apply.call(null, a, null == i ? b : i, null == j ? c : j, null == k ? d : k, p)
}, k = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return j.call(this, a, b, c, e)
};
k.cljs$lang$maxFixedArity = 3;
k.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return j(b, c, d, a)
};
k.cljs$lang$arity$variadic = j;
i = function(i, j, n, p) {
switch(arguments.length) {
case 2:
return a.call(null, null == i ? b : i, null == j ? c : j);
case 3:
return a.call(null, null == i ? b : i, null == j ? c : j, null == n ? d : n);
default:
return k.cljs$lang$arity$variadic(i, j, n, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
i.cljs$lang$maxFixedArity = 3;
i.cljs$lang$applyTo = k.cljs$lang$applyTo;
return i
}, a = function(a, f, g, h) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, g);
case 4:
return d.call(this, a, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
return a
}();
cljs.core.map_indexed = function(a, b) {
return function d(b, f) {
return new cljs.core.LazySeq(null, !1, function() {
var g = cljs.core.seq.call(null, f);
if(g) {
if(cljs.core.chunked_seq_QMARK_.call(null, g)) {
for(var h = cljs.core.chunk_first.call(null, g), i = cljs.core.count.call(null, h), j = cljs.core.chunk_buffer.call(null, i), k = 0;;) {
if(k < i) {
cljs.core.chunk_append.call(null, j, a.call(null, b + k, cljs.core._nth.call(null, h, k))), k += 1
}else {
break
}
}
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, j), d.call(null, b + i, cljs.core.chunk_rest.call(null, g)))
}
return cljs.core.cons.call(null, a.call(null, b, cljs.core.first.call(null, g)), d.call(null, b + 1, cljs.core.rest.call(null, g)))
}
return null
}, null)
}.call(null, 0, b)
};
cljs.core.keep = function keep(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, c);
if(d) {
if(cljs.core.chunked_seq_QMARK_.call(null, d)) {
for(var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), g = cljs.core.chunk_buffer.call(null, f), h = 0;;) {
if(h < f) {
var i = b.call(null, cljs.core._nth.call(null, e, h));
null != i && cljs.core.chunk_append.call(null, g, i);
h += 1
}else {
break
}
}
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), keep.call(null, b, cljs.core.chunk_rest.call(null, d)))
}
e = b.call(null, cljs.core.first.call(null, d));
return null == e ? keep.call(null, b, cljs.core.rest.call(null, d)) : cljs.core.cons.call(null, e, keep.call(null, b, cljs.core.rest.call(null, d)))
}
return null
}, null)
};
cljs.core.keep_indexed = function(a, b) {
return function d(b, f) {
return new cljs.core.LazySeq(null, !1, function() {
var g = cljs.core.seq.call(null, f);
if(g) {
if(cljs.core.chunked_seq_QMARK_.call(null, g)) {
for(var h = cljs.core.chunk_first.call(null, g), i = cljs.core.count.call(null, h), j = cljs.core.chunk_buffer.call(null, i), k = 0;;) {
if(k < i) {
var m = a.call(null, b + k, cljs.core._nth.call(null, h, k));
null != m && cljs.core.chunk_append.call(null, j, m);
k += 1
}else {
break
}
}
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, j), d.call(null, b + i, cljs.core.chunk_rest.call(null, g)))
}
h = a.call(null, b, cljs.core.first.call(null, g));
return null == h ? d.call(null, b + 1, cljs.core.rest.call(null, g)) : cljs.core.cons.call(null, h, d.call(null, b + 1, cljs.core.rest.call(null, g)))
}
return null
}, null)
}.call(null, 0, b)
};
cljs.core.every_pred = function() {
var a = null, b = function(a) {
var b = null, c = function(b) {
return cljs.core.boolean$.call(null, a.call(null, b))
}, d = function(b, c) {
return cljs.core.boolean$.call(null, function() {
var d = a.call(null, b);
return cljs.core.truth_(d) ? a.call(null, c) : d
}())
}, e = function(b, c, d) {
return cljs.core.boolean$.call(null, function() {
var e = a.call(null, b);
return cljs.core.truth_(e) ? (e = a.call(null, c), cljs.core.truth_(e) ? a.call(null, d) : e) : e
}())
}, f = function(c, d, e, f) {
return cljs.core.boolean$.call(null, function() {
var i = b.call(null, c, d, e);
return cljs.core.truth_(i) ? cljs.core.every_QMARK_.call(null, a, f) : i
}())
}, l = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return f.call(this, a, b, c, e)
};
l.cljs$lang$maxFixedArity = 3;
l.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return f(b, c, d, a)
};
l.cljs$lang$arity$variadic = f;
b = function(a, b, f, g) {
switch(arguments.length) {
case 0:
return!0;
case 1:
return c.call(this, a);
case 2:
return d.call(this, a, b);
case 3:
return e.call(this, a, b, f);
default:
return l.cljs$lang$arity$variadic(a, b, f, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = l.cljs$lang$applyTo;
b.cljs$lang$arity$0 = function() {
return!0
};
b.cljs$lang$arity$1 = c;
b.cljs$lang$arity$2 = d;
b.cljs$lang$arity$3 = e;
b.cljs$lang$arity$variadic = l.cljs$lang$arity$variadic;
return b
}, c = function(a, b) {
var c = null, d = function(c) {
return cljs.core.boolean$.call(null, function() {
var d = a.call(null, c);
return cljs.core.truth_(d) ? b.call(null, c) : d
}())
}, e = function(c, d) {
return cljs.core.boolean$.call(null, function() {
var e = a.call(null, c);
return cljs.core.truth_(e) && (e = a.call(null, d), cljs.core.truth_(e)) ? (e = b.call(null, c), cljs.core.truth_(e) ? b.call(null, d) : e) : e
}())
}, f = function(c, d, e) {
return cljs.core.boolean$.call(null, function() {
var f = a.call(null, c);
return cljs.core.truth_(f) && (f = a.call(null, d), cljs.core.truth_(f) && (f = a.call(null, e), cljs.core.truth_(f) && (f = b.call(null, c), cljs.core.truth_(f)))) ? (f = b.call(null, d), cljs.core.truth_(f) ? b.call(null, e) : f) : f
}())
}, l = function(d, e, f, j) {
return cljs.core.boolean$.call(null, function() {
var k = c.call(null, d, e, f);
return cljs.core.truth_(k) ? cljs.core.every_QMARK_.call(null, function(c) {
var d = a.call(null, c);
return cljs.core.truth_(d) ? b.call(null, c) : d
}, j) : k
}())
}, n = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return l.call(this, a, b, c, e)
};
n.cljs$lang$maxFixedArity = 3;
n.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return l(b, c, d, a)
};
n.cljs$lang$arity$variadic = l;
c = function(a, b, c, g) {
switch(arguments.length) {
case 0:
return!0;
case 1:
return d.call(this, a);
case 2:
return e.call(this, a, b);
case 3:
return f.call(this, a, b, c);
default:
return n.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
c.cljs$lang$maxFixedArity = 3;
c.cljs$lang$applyTo = n.cljs$lang$applyTo;
c.cljs$lang$arity$0 = function() {
return!0
};
c.cljs$lang$arity$1 = d;
c.cljs$lang$arity$2 = e;
c.cljs$lang$arity$3 = f;
c.cljs$lang$arity$variadic = n.cljs$lang$arity$variadic;
return c
}, d = function(a, b, c) {
var d = null, e = function(d) {
return cljs.core.boolean$.call(null, function() {
var e = a.call(null, d);
return cljs.core.truth_(e) ? (e = b.call(null, d), cljs.core.truth_(e) ? c.call(null, d) : e) : e
}())
}, f = function(d, e) {
return cljs.core.boolean$.call(null, function() {
var f = a.call(null, d);
return cljs.core.truth_(f) && (f = b.call(null, d), cljs.core.truth_(f) && (f = c.call(null, d), cljs.core.truth_(f) && (f = a.call(null, e), cljs.core.truth_(f)))) ? (f = b.call(null, e), cljs.core.truth_(f) ? c.call(null, e) : f) : f
}())
}, l = function(d, e, f) {
return cljs.core.boolean$.call(null, function() {
var j = a.call(null, d);
return cljs.core.truth_(j) && (j = b.call(null, d), cljs.core.truth_(j) && (j = c.call(null, d), cljs.core.truth_(j) && (j = a.call(null, e), cljs.core.truth_(j) && (j = b.call(null, e), cljs.core.truth_(j) && (j = c.call(null, e), cljs.core.truth_(j) && (j = a.call(null, f), cljs.core.truth_(j))))))) ? (j = b.call(null, f), cljs.core.truth_(j) ? c.call(null, f) : j) : j
}())
}, n = function(e, f, k, l) {
return cljs.core.boolean$.call(null, function() {
var m = d.call(null, e, f, k);
return cljs.core.truth_(m) ? cljs.core.every_QMARK_.call(null, function(d) {
var e = a.call(null, d);
return cljs.core.truth_(e) ? (e = b.call(null, d), cljs.core.truth_(e) ? c.call(null, d) : e) : e
}, l) : m
}())
}, p = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return n.call(this, a, b, c, e)
};
p.cljs$lang$maxFixedArity = 3;
p.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return n(b, c, d, a)
};
p.cljs$lang$arity$variadic = n;
d = function(a, b, c, d) {
switch(arguments.length) {
case 0:
return!0;
case 1:
return e.call(this, a);
case 2:
return f.call(this, a, b);
case 3:
return l.call(this, a, b, c);
default:
return p.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = p.cljs$lang$applyTo;
d.cljs$lang$arity$0 = function() {
return!0
};
d.cljs$lang$arity$1 = e;
d.cljs$lang$arity$2 = f;
d.cljs$lang$arity$3 = l;
d.cljs$lang$arity$variadic = p.cljs$lang$arity$variadic;
return d
}, e = function(a, b, c, d) {
var e = cljs.core.list_STAR_.call(null, a, b, c, d), f = null, l = function(a) {
return cljs.core.every_QMARK_.call(null, function(b) {
return b.call(null, a)
}, e)
}, n = function(a, b) {
return cljs.core.every_QMARK_.call(null, function(c) {
var d = c.call(null, a);
return cljs.core.truth_(d) ? c.call(null, b) : d
}, e)
}, p = function(a, b, c) {
return cljs.core.every_QMARK_.call(null, function(d) {
var e = d.call(null, a);
return cljs.core.truth_(e) ? (e = d.call(null, b), cljs.core.truth_(e) ? d.call(null, c) : e) : e
}, e)
}, q = function(a, b, c, d) {
return cljs.core.boolean$.call(null, function() {
var g = f.call(null, a, b, c);
return cljs.core.truth_(g) ? cljs.core.every_QMARK_.call(null, function(a) {
return cljs.core.every_QMARK_.call(null, a, d)
}, e) : g
}())
}, r = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return q.call(this, a, b, c, e)
};
r.cljs$lang$maxFixedArity = 3;
r.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return q(b, c, d, a)
};
r.cljs$lang$arity$variadic = q;
f = function(a, b, c, d) {
switch(arguments.length) {
case 0:
return!0;
case 1:
return l.call(this, a);
case 2:
return n.call(this, a, b);
case 3:
return p.call(this, a, b, c);
default:
return r.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = r.cljs$lang$applyTo;
f.cljs$lang$arity$0 = function() {
return!0
};
f.cljs$lang$arity$1 = l;
f.cljs$lang$arity$2 = n;
f.cljs$lang$arity$3 = p;
f.cljs$lang$arity$variadic = r.cljs$lang$arity$variadic;
return f
}, f = function(a, b, c, d) {
var f = null;
goog.isDef(d) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return e.call(this, a, b, c, f)
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return e(b, c, d, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e);
case 3:
return d.call(this, a, e, i);
default:
return f.cljs$lang$arity$variadic(a, e, i, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.some_fn = function() {
var a = null, b = function(a) {
var b = null, c = function(b) {
return a.call(null, b)
}, d = function(b, c) {
var d = a.call(null, b);
return cljs.core.truth_(d) ? d : a.call(null, c)
}, e = function(b, c, d) {
b = a.call(null, b);
if(cljs.core.truth_(b)) {
return b
}
c = a.call(null, c);
return cljs.core.truth_(c) ? c : a.call(null, d)
}, f = function(c, d, e, f) {
c = b.call(null, c, d, e);
return cljs.core.truth_(c) ? c : cljs.core.some.call(null, a, f)
}, l = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return f.call(this, a, b, c, e)
};
l.cljs$lang$maxFixedArity = 3;
l.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return f(b, c, d, a)
};
l.cljs$lang$arity$variadic = f;
b = function(a, b, f, g) {
switch(arguments.length) {
case 0:
return null;
case 1:
return c.call(this, a);
case 2:
return d.call(this, a, b);
case 3:
return e.call(this, a, b, f);
default:
return l.cljs$lang$arity$variadic(a, b, f, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = l.cljs$lang$applyTo;
b.cljs$lang$arity$0 = function() {
return null
};
b.cljs$lang$arity$1 = c;
b.cljs$lang$arity$2 = d;
b.cljs$lang$arity$3 = e;
b.cljs$lang$arity$variadic = l.cljs$lang$arity$variadic;
return b
}, c = function(a, b) {
var c = null, d = function(c) {
var d = a.call(null, c);
return cljs.core.truth_(d) ? d : b.call(null, c)
}, e = function(c, d) {
var e = a.call(null, c);
if(cljs.core.truth_(e)) {
return e
}
e = a.call(null, d);
if(cljs.core.truth_(e)) {
return e
}
e = b.call(null, c);
return cljs.core.truth_(e) ? e : b.call(null, d)
}, f = function(c, d, e) {
var f = a.call(null, c);
if(cljs.core.truth_(f)) {
return f
}
f = a.call(null, d);
if(cljs.core.truth_(f)) {
return f
}
f = a.call(null, e);
if(cljs.core.truth_(f)) {
return f
}
c = b.call(null, c);
if(cljs.core.truth_(c)) {
return c
}
d = b.call(null, d);
return cljs.core.truth_(d) ? d : b.call(null, e)
}, l = function(d, e, f, j) {
d = c.call(null, d, e, f);
return cljs.core.truth_(d) ? d : cljs.core.some.call(null, function(c) {
var d = a.call(null, c);
return cljs.core.truth_(d) ? d : b.call(null, c)
}, j)
}, n = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return l.call(this, a, b, c, e)
};
n.cljs$lang$maxFixedArity = 3;
n.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return l(b, c, d, a)
};
n.cljs$lang$arity$variadic = l;
c = function(a, b, c, g) {
switch(arguments.length) {
case 0:
return null;
case 1:
return d.call(this, a);
case 2:
return e.call(this, a, b);
case 3:
return f.call(this, a, b, c);
default:
return n.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
c.cljs$lang$maxFixedArity = 3;
c.cljs$lang$applyTo = n.cljs$lang$applyTo;
c.cljs$lang$arity$0 = function() {
return null
};
c.cljs$lang$arity$1 = d;
c.cljs$lang$arity$2 = e;
c.cljs$lang$arity$3 = f;
c.cljs$lang$arity$variadic = n.cljs$lang$arity$variadic;
return c
}, d = function(a, b, c) {
var d = null, e = function(d) {
var e = a.call(null, d);
if(cljs.core.truth_(e)) {
return e
}
e = b.call(null, d);
return cljs.core.truth_(e) ? e : c.call(null, d)
}, f = function(d, e) {
var f = a.call(null, d);
if(cljs.core.truth_(f)) {
return f
}
f = b.call(null, d);
if(cljs.core.truth_(f)) {
return f
}
f = c.call(null, d);
if(cljs.core.truth_(f)) {
return f
}
f = a.call(null, e);
if(cljs.core.truth_(f)) {
return f
}
f = b.call(null, e);
return cljs.core.truth_(f) ? f : c.call(null, e)
}, l = function(d, e, f) {
var j = a.call(null, d);
if(cljs.core.truth_(j)) {
return j
}
j = b.call(null, d);
if(cljs.core.truth_(j)) {
return j
}
d = c.call(null, d);
if(cljs.core.truth_(d)) {
return d
}
d = a.call(null, e);
if(cljs.core.truth_(d)) {
return d
}
d = b.call(null, e);
if(cljs.core.truth_(d)) {
return d
}
e = c.call(null, e);
if(cljs.core.truth_(e)) {
return e
}
e = a.call(null, f);
if(cljs.core.truth_(e)) {
return e
}
e = b.call(null, f);
return cljs.core.truth_(e) ? e : c.call(null, f)
}, n = function(e, f, k, l) {
e = d.call(null, e, f, k);
return cljs.core.truth_(e) ? e : cljs.core.some.call(null, function(d) {
var e = a.call(null, d);
if(cljs.core.truth_(e)) {
return e
}
e = b.call(null, d);
return cljs.core.truth_(e) ? e : c.call(null, d)
}, l)
}, p = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return n.call(this, a, b, c, e)
};
p.cljs$lang$maxFixedArity = 3;
p.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return n(b, c, d, a)
};
p.cljs$lang$arity$variadic = n;
d = function(a, b, c, d) {
switch(arguments.length) {
case 0:
return null;
case 1:
return e.call(this, a);
case 2:
return f.call(this, a, b);
case 3:
return l.call(this, a, b, c);
default:
return p.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = p.cljs$lang$applyTo;
d.cljs$lang$arity$0 = function() {
return null
};
d.cljs$lang$arity$1 = e;
d.cljs$lang$arity$2 = f;
d.cljs$lang$arity$3 = l;
d.cljs$lang$arity$variadic = p.cljs$lang$arity$variadic;
return d
}, e = function(a, b, c, d) {
var e = cljs.core.list_STAR_.call(null, a, b, c, d), f = null, l = function(a) {
return cljs.core.some.call(null, function(b) {
return b.call(null, a)
}, e)
}, n = function(a, b) {
return cljs.core.some.call(null, function(c) {
var d = c.call(null, a);
return cljs.core.truth_(d) ? d : c.call(null, b)
}, e)
}, p = function(a, b, c) {
return cljs.core.some.call(null, function(d) {
var e = d.call(null, a);
if(cljs.core.truth_(e)) {
return e
}
e = d.call(null, b);
return cljs.core.truth_(e) ? e : d.call(null, c)
}, e)
}, q = function(a, b, c, d) {
a = f.call(null, a, b, c);
return cljs.core.truth_(a) ? a : cljs.core.some.call(null, function(a) {
return cljs.core.some.call(null, a, d)
}, e)
}, r = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return q.call(this, a, b, c, e)
};
r.cljs$lang$maxFixedArity = 3;
r.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return q(b, c, d, a)
};
r.cljs$lang$arity$variadic = q;
f = function(a, b, c, d) {
switch(arguments.length) {
case 0:
return null;
case 1:
return l.call(this, a);
case 2:
return n.call(this, a, b);
case 3:
return p.call(this, a, b, c);
default:
return r.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = r.cljs$lang$applyTo;
f.cljs$lang$arity$0 = function() {
return null
};
f.cljs$lang$arity$1 = l;
f.cljs$lang$arity$2 = n;
f.cljs$lang$arity$3 = p;
f.cljs$lang$arity$variadic = r.cljs$lang$arity$variadic;
return f
}, f = function(a, b, c, d) {
var f = null;
goog.isDef(d) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return e.call(this, a, b, c, f)
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return e(b, c, d, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e);
case 3:
return d.call(this, a, e, i);
default:
return f.cljs$lang$arity$variadic(a, e, i, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.map = function() {
var a = null, b = function(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, c);
if(d) {
if(cljs.core.chunked_seq_QMARK_.call(null, d)) {
for(var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), m = cljs.core.chunk_buffer.call(null, f), l = 0;;) {
if(l < f) {
cljs.core.chunk_append.call(null, m, b.call(null, cljs.core._nth.call(null, e, l))), l += 1
}else {
break
}
}
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, m), a.call(null, b, cljs.core.chunk_rest.call(null, d)))
}
return cljs.core.cons.call(null, b.call(null, cljs.core.first.call(null, d)), a.call(null, b, cljs.core.rest.call(null, d)))
}
return null
}, null)
}, c = function(b, c, d) {
return new cljs.core.LazySeq(null, !1, function() {
var e = cljs.core.seq.call(null, c), f = cljs.core.seq.call(null, d);
return(e ? f : e) ? cljs.core.cons.call(null, b.call(null, cljs.core.first.call(null, e), cljs.core.first.call(null, f)), a.call(null, b, cljs.core.rest.call(null, e), cljs.core.rest.call(null, f))) : null
}, null)
}, d = function(b, c, d, e) {
return new cljs.core.LazySeq(null, !1, function() {
var f = cljs.core.seq.call(null, c), m = cljs.core.seq.call(null, d), l = cljs.core.seq.call(null, e);
return(f ? m ? l : m : f) ? cljs.core.cons.call(null, b.call(null, cljs.core.first.call(null, f), cljs.core.first.call(null, m), cljs.core.first.call(null, l)), a.call(null, b, cljs.core.rest.call(null, f), cljs.core.rest.call(null, m), cljs.core.rest.call(null, l))) : null
}, null)
}, e = function(b, c, d, e, f) {
return a.call(null, function(a) {
return cljs.core.apply.call(null, b, a)
}, function l(b) {
return new cljs.core.LazySeq(null, !1, function() {
var c = a.call(null, cljs.core.seq, b);
return cljs.core.every_QMARK_.call(null, cljs.core.identity, c) ? cljs.core.cons.call(null, a.call(null, cljs.core.first, c), l.call(null, a.call(null, cljs.core.rest, c))) : null
}, null)
}.call(null, cljs.core.conj.call(null, f, e, d, c)))
}, f = function(a, b, c, d, f) {
var m = null;
goog.isDef(f) && (m = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
return e.call(this, a, b, c, d, m)
};
f.cljs$lang$maxFixedArity = 4;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), f = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(a))));
return e(b, c, d, f, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j, k) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, i);
case 4:
return d.call(this, a, e, i, j);
default:
return f.cljs$lang$arity$variadic(a, e, i, j, cljs.core.array_seq(arguments, 4))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 4;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.take = function take(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
if(0 < b) {
var d = cljs.core.seq.call(null, c);
return d ? cljs.core.cons.call(null, cljs.core.first.call(null, d), take.call(null, b - 1, cljs.core.rest.call(null, d))) : null
}
return null
}, null)
};
cljs.core.drop = function(a, b) {
var c = function(a, b) {
for(;;) {
var c = cljs.core.seq.call(null, b);
if(cljs.core.truth_(function() {
var b = 0 < a;
return b ? c : b
}())) {
var g = a - 1, h = cljs.core.rest.call(null, c), a = g, b = h
}else {
return c
}
}
};
return new cljs.core.LazySeq(null, !1, function() {
return c.call(null, a, b)
}, null)
};
cljs.core.drop_last = function() {
var a = null, b = function(b) {
return a.call(null, 1, b)
}, c = function(a, b) {
return cljs.core.map.call(null, function(a) {
return a
}, b, cljs.core.drop.call(null, a, b))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.take_last = function(a, b) {
for(var c = cljs.core.seq.call(null, b), d = cljs.core.seq.call(null, cljs.core.drop.call(null, a, b));;) {
if(d) {
c = cljs.core.next.call(null, c), d = cljs.core.next.call(null, d)
}else {
return c
}
}
};
cljs.core.drop_while = function(a, b) {
var c = function(a, b) {
for(;;) {
var c = cljs.core.seq.call(null, b);
if(cljs.core.truth_(function() {
var b = c;
return b ? a.call(null, cljs.core.first.call(null, c)) : b
}())) {
var g = a, h = cljs.core.rest.call(null, c), a = g, b = h
}else {
return c
}
}
};
return new cljs.core.LazySeq(null, !1, function() {
return c.call(null, a, b)
}, null)
};
cljs.core.cycle = function cycle(b) {
return new cljs.core.LazySeq(null, !1, function() {
var c = cljs.core.seq.call(null, b);
return c ? cljs.core.concat.call(null, c, cycle.call(null, c)) : null
}, null)
};
cljs.core.split_at = function(a, b) {
return cljs.core.PersistentVector.fromArray([cljs.core.take.call(null, a, b), cljs.core.drop.call(null, a, b)], !0)
};
cljs.core.repeat = function() {
var a = null, b = function(b) {
return new cljs.core.LazySeq(null, !1, function() {
return cljs.core.cons.call(null, b, a.call(null, b))
}, null)
}, c = function(b, c) {
return cljs.core.take.call(null, b, a.call(null, c))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.replicate = function(a, b) {
return cljs.core.take.call(null, a, cljs.core.repeat.call(null, b))
};
cljs.core.repeatedly = function() {
var a = null, b = function(b) {
return new cljs.core.LazySeq(null, !1, function() {
return cljs.core.cons.call(null, b.call(null), a.call(null, b))
}, null)
}, c = function(b, c) {
return cljs.core.take.call(null, b, a.call(null, c))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.iterate = function iterate(b, c) {
return cljs.core.cons.call(null, c, new cljs.core.LazySeq(null, !1, function() {
return iterate.call(null, b, b.call(null, c))
}, null))
};
cljs.core.interleave = function() {
var a = null, b = function(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, b), h = cljs.core.seq.call(null, c);
return(d ? h : d) ? cljs.core.cons.call(null, cljs.core.first.call(null, d), cljs.core.cons.call(null, cljs.core.first.call(null, h), a.call(null, cljs.core.rest.call(null, d), cljs.core.rest.call(null, h)))) : null
}, null)
}, c = function(b, c, d) {
return new cljs.core.LazySeq(null, !1, function() {
var h = cljs.core.map.call(null, cljs.core.seq, cljs.core.conj.call(null, d, c, b));
return cljs.core.every_QMARK_.call(null, cljs.core.identity, h) ? cljs.core.concat.call(null, cljs.core.map.call(null, cljs.core.first, h), cljs.core.apply.call(null, a, cljs.core.map.call(null, cljs.core.rest, h))) : null
}, null)
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.interpose = function(a, b) {
return cljs.core.drop.call(null, 1, cljs.core.interleave.call(null, cljs.core.repeat.call(null, a), b))
};
cljs.core.flatten1 = function(a) {
return function c(a, e) {
return new cljs.core.LazySeq(null, !1, function() {
var f = cljs.core.seq.call(null, a);
return f ? cljs.core.cons.call(null, cljs.core.first.call(null, f), c.call(null, cljs.core.rest.call(null, f), e)) : cljs.core.seq.call(null, e) ? c.call(null, cljs.core.first.call(null, e), cljs.core.rest.call(null, e)) : null
}, null)
}.call(null, null, a)
};
cljs.core.mapcat = function() {
var a = null, b = function(a, b) {
return cljs.core.flatten1.call(null, cljs.core.map.call(null, a, b))
}, c = function(a, b, c) {
return cljs.core.flatten1.call(null, cljs.core.apply.call(null, cljs.core.map, a, b, c))
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.filter = function filter(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, c);
if(d) {
if(cljs.core.chunked_seq_QMARK_.call(null, d)) {
for(var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), g = cljs.core.chunk_buffer.call(null, f), h = 0;;) {
if(h < f) {
cljs.core.truth_(b.call(null, cljs.core._nth.call(null, e, h))) && cljs.core.chunk_append.call(null, g, cljs.core._nth.call(null, e, h)), h += 1
}else {
break
}
}
return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), filter.call(null, b, cljs.core.chunk_rest.call(null, d)))
}
e = cljs.core.first.call(null, d);
d = cljs.core.rest.call(null, d);
return cljs.core.truth_(b.call(null, e)) ? cljs.core.cons.call(null, e, filter.call(null, b, d)) : filter.call(null, b, d)
}
return null
}, null)
};
cljs.core.remove = function(a, b) {
return cljs.core.filter.call(null, cljs.core.complement.call(null, a), b)
};
cljs.core.tree_seq = function(a, b, c) {
return function e(c) {
return new cljs.core.LazySeq(null, !1, function() {
return cljs.core.cons.call(null, c, cljs.core.truth_(a.call(null, c)) ? cljs.core.mapcat.call(null, e, b.call(null, c)) : null)
}, null)
}.call(null, c)
};
cljs.core.flatten = function(a) {
return cljs.core.filter.call(null, function(a) {
return!cljs.core.sequential_QMARK_.call(null, a)
}, cljs.core.rest.call(null, cljs.core.tree_seq.call(null, cljs.core.sequential_QMARK_, cljs.core.seq, a)))
};
cljs.core.into = function(a, b) {
var c;
a ? (c = (c = a.cljs$lang$protocol_mask$partition1$ & 4) ? c : a.cljs$core$IEditableCollection$, c = c ? !0 : a.cljs$lang$protocol_mask$partition1$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IEditableCollection, a)) : c = cljs.core.type_satisfies_.call(null, cljs.core.IEditableCollection, a);
return c ? cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, cljs.core._conj_BANG_, cljs.core.transient$.call(null, a), b)) : cljs.core.reduce.call(null, cljs.core._conj, a, b)
};
cljs.core.mapv = function() {
var a = null, b = function(a, b) {
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(b, c) {
return cljs.core.conj_BANG_.call(null, b, a.call(null, c))
}, cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY), b))
}, c = function(a, b, c) {
return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, a, b, c))
}, d = function(a, b, c, d) {
return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, a, b, c, d))
}, e = function(a, b, c, d, e) {
return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.apply.call(null, cljs.core.map, a, b, c, d, e))
}, f = function(a, b, c, d, f) {
var m = null;
goog.isDef(f) && (m = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
return e.call(this, a, b, c, d, m)
};
f.cljs$lang$maxFixedArity = 4;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), f = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(a))));
return e(b, c, d, f, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j, k) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, i);
case 4:
return d.call(this, a, e, i, j);
default:
return f.cljs$lang$arity$variadic(a, e, i, j, cljs.core.array_seq(arguments, 4))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 4;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.filterv = function(a, b) {
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(b, d) {
return cljs.core.truth_(a.call(null, d)) ? cljs.core.conj_BANG_.call(null, b, d) : b
}, cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY), b))
};
cljs.core.partition = function() {
var a = null, b = function(b, c) {
return a.call(null, b, b, c)
}, c = function(b, c, d) {
return new cljs.core.LazySeq(null, !1, function() {
var h = cljs.core.seq.call(null, d);
if(h) {
var i = cljs.core.take.call(null, b, h);
return b === cljs.core.count.call(null, i) ? cljs.core.cons.call(null, i, a.call(null, b, c, cljs.core.drop.call(null, c, h))) : null
}
return null
}, null)
}, d = function(b, c, d, h) {
return new cljs.core.LazySeq(null, !1, function() {
var i = cljs.core.seq.call(null, h);
if(i) {
var j = cljs.core.take.call(null, b, i);
return b === cljs.core.count.call(null, j) ? cljs.core.cons.call(null, j, a.call(null, b, c, d, cljs.core.drop.call(null, c, i))) : cljs.core.list.call(null, cljs.core.take.call(null, b, cljs.core.concat.call(null, j, d)))
}
return null
}, null)
}, a = function(a, f, g, h) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, g);
case 4:
return d.call(this, a, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
return a
}();
cljs.core.get_in = function() {
var a = null, b = function(a, b) {
return cljs.core.reduce.call(null, cljs.core.get, a, b)
}, c = function(a, b, c) {
for(var g = cljs.core.lookup_sentinel, b = cljs.core.seq.call(null, b);;) {
if(b) {
a = cljs.core._lookup.call(null, a, cljs.core.first.call(null, b), g);
if(g === a) {
return c
}
b = cljs.core.next.call(null, b)
}else {
return a
}
}
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.assoc_in = function assoc_in(b, c, d) {
var e = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nthnext.call(null, c, 1);
return cljs.core.truth_(c) ? cljs.core.assoc.call(null, b, e, assoc_in.call(null, cljs.core._lookup.call(null, b, e, null), c, d)) : cljs.core.assoc.call(null, b, e, d)
};
cljs.core.update_in = function() {
var a = function(a, d, e, f) {
var g = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nthnext.call(null, d, 1);
return cljs.core.truth_(d) ? cljs.core.assoc.call(null, a, g, cljs.core.apply.call(null, b, cljs.core._lookup.call(null, a, g, null), d, e, f)) : cljs.core.assoc.call(null, a, g, cljs.core.apply.call(null, e, cljs.core._lookup.call(null, a, g, null), f))
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.Vector = function(a, b, c) {
this.meta = a;
this.array = b;
this.__hash = c;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 32400159
};
cljs.core.Vector.cljs$lang$type = !0;
cljs.core.Vector.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Vector")
};
cljs.core.Vector.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Vector")
};
cljs.core.Vector.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.Vector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, null)
};
cljs.core.Vector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
};
cljs.core.Vector.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
a = this.array.slice();
a[b] = c;
return new cljs.core.Vector(this.meta, a, null)
};
cljs.core.Vector.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.Vector.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.Vector.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
var c = this.array.slice();
c.push(b);
return new cljs.core.Vector(this.meta, c, null)
};
cljs.core.Vector.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.Vector.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.ci_reduce.call(null, this.array, b)
};
cljs.core.Vector.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.ci_reduce.call(null, this.array, b, c)
};
cljs.core.Vector.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
var a = this;
return 0 < a.array.length ? function c(d) {
return new cljs.core.LazySeq(null, !1, function() {
return d < a.array.length ? cljs.core.cons.call(null, a.array[d], c.call(null, d + 1)) : null
}, null)
}.call(null, 0) : null
};
cljs.core.Vector.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.array.length
};
cljs.core.Vector.prototype.cljs$core$IStack$_peek$arity$1 = function() {
var a = this.array.length;
return 0 < a ? this.array[a - 1] : null
};
cljs.core.Vector.prototype.cljs$core$IStack$_pop$arity$1 = function() {
if(0 < this.array.length) {
var a = this.array.slice();
a.pop();
return new cljs.core.Vector(this.meta, a, null)
}
throw Error("Can't pop empty vector");
};
cljs.core.Vector.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
return a.cljs$core$IAssociative$_assoc$arity$3(a, b, c)
};
cljs.core.Vector.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.Vector.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.Vector(b, this.array, this.__hash)
};
cljs.core.Vector.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.Vector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
var c;
c = (c = 0 <= b) ? b < this.array.length : c;
return c ? this.array[b] : null
};
cljs.core.Vector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
a = (a = 0 <= b) ? b < this.array.length : a;
return a ? this.array[b] : c
};
cljs.core.Vector.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.Vector.EMPTY, this.meta)
};
cljs.core.Vector.EMPTY = new cljs.core.Vector(null, [], 0);
cljs.core.Vector.fromArray = function(a) {
return new cljs.core.Vector(null, a, null)
};
cljs.core.VectorNode = function(a, b) {
this.edit = a;
this.arr = b
};
cljs.core.VectorNode.cljs$lang$type = !0;
cljs.core.VectorNode.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/VectorNode")
};
cljs.core.VectorNode.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/VectorNode")
};
cljs.core.pv_fresh_node = function(a) {
return new cljs.core.VectorNode(a, cljs.core.make_array.call(null, 32))
};
cljs.core.pv_aget = function(a, b) {
return a.arr[b]
};
cljs.core.pv_aset = function(a, b, c) {
return a.arr[b] = c
};
cljs.core.pv_clone_node = function(a) {
return new cljs.core.VectorNode(a.edit, a.arr.slice())
};
cljs.core.tail_off = function(a) {
a = a.cnt;
return 32 > a ? 0 : a - 1 >>> 5 << 5
};
cljs.core.new_path = function(a, b, c) {
for(;;) {
if(0 === b) {
return c
}
var d = cljs.core.pv_fresh_node.call(null, a);
cljs.core.pv_aset.call(null, d, 0, c);
c = d;
b -= 5
}
};
cljs.core.push_tail = function push_tail(b, c, d, e) {
var f = cljs.core.pv_clone_node.call(null, d), g = b.cnt - 1 >>> c & 31;
5 === c ? cljs.core.pv_aset.call(null, f, g, e) : (d = cljs.core.pv_aget.call(null, d, g), b = null != d ? push_tail.call(null, b, c - 5, d, e) : cljs.core.new_path.call(null, null, c - 5, e), cljs.core.pv_aset.call(null, f, g, b));
return f
};
cljs.core.array_for = function(a, b) {
var c;
c = (c = 0 <= b) ? b < a.cnt : c;
if(c) {
if(b >= cljs.core.tail_off.call(null, a)) {
return a.tail
}
c = a.root;
for(var d = a.shift;;) {
if(0 < d) {
c = cljs.core.pv_aget.call(null, c, b >>> d & 31), d -= 5
}else {
return c.arr
}
}
}else {
throw Error([cljs.core.str("No item "), cljs.core.str(b), cljs.core.str(" in vector of length "), cljs.core.str(a.cnt)].join(""));
}
};
cljs.core.do_assoc = function do_assoc(b, c, d, e, f) {
var g = cljs.core.pv_clone_node.call(null, d);
if(0 === c) {
cljs.core.pv_aset.call(null, g, e & 31, f)
}else {
var h = e >>> c & 31;
cljs.core.pv_aset.call(null, g, h, do_assoc.call(null, b, c - 5, cljs.core.pv_aget.call(null, d, h), e, f))
}
return g
};
cljs.core.pop_tail = function pop_tail(b, c, d) {
var e = b.cnt - 2 >>> c & 31;
if(5 < c) {
b = pop_tail.call(null, b, c - 5, cljs.core.pv_aget.call(null, d, e));
c = null == b;
if(c ? 0 === e : c) {
return null
}
d = cljs.core.pv_clone_node.call(null, d);
cljs.core.pv_aset.call(null, d, e, b);
return d
}
if(0 === e) {
return null
}
d = cljs.core.pv_clone_node.call(null, d);
cljs.core.pv_aset.call(null, d, e, null);
return d
};
cljs.core.PersistentVector = function(a, b, c, d, e, f) {
this.meta = a;
this.cnt = b;
this.shift = c;
this.root = d;
this.tail = e;
this.__hash = f;
this.cljs$lang$protocol_mask$partition1$ = 4;
this.cljs$lang$protocol_mask$partition0$ = 167668511
};
cljs.core.PersistentVector.cljs$lang$type = !0;
cljs.core.PersistentVector.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentVector")
};
cljs.core.PersistentVector.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentVector")
};
cljs.core.PersistentVector.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function() {
return new cljs.core.TransientVector(this.cnt, this.shift, cljs.core.tv_editable_root.call(null, this.root), cljs.core.tv_editable_tail.call(null, this.tail))
};
cljs.core.PersistentVector.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, null)
};
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
};
cljs.core.PersistentVector.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
var d;
d = (d = 0 <= b) ? b < this.cnt : d;
if(d) {
return cljs.core.tail_off.call(null, a) <= b ? (a = this.tail.slice(), a[b & 31] = c, new cljs.core.PersistentVector(this.meta, this.cnt, this.shift, this.root, a, null)) : new cljs.core.PersistentVector(this.meta, this.cnt, this.shift, cljs.core.do_assoc.call(null, a, this.shift, this.root, b, c), this.tail, null)
}
if(b === this.cnt) {
return a.cljs$core$ICollection$_conj$arity$2(a, c)
}
throw Error([cljs.core.str("Index "), cljs.core.str(b), cljs.core.str(" out of bounds [0,"), cljs.core.str(this.cnt), cljs.core.str("]")].join(""));
};
cljs.core.PersistentVector.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.PersistentVector.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.PersistentVector.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
for(var c = [0, c], d = 0;;) {
if(d < this.cnt) {
var e = cljs.core.array_for.call(null, a, d), f = e.length;
a: {
for(var g = 0, h = c[1];;) {
if(g < f) {
if(h = b.call(null, h, g + d, e[g]), cljs.core.reduced_QMARK_.call(null, h)) {
e = h;
break a
}else {
g += 1
}
}else {
c[0] = f;
e = c[1] = h;
break a
}
}
e = void 0
}
if(cljs.core.reduced_QMARK_.call(null, e)) {
return cljs.core.deref.call(null, e)
}
d += c[0]
}else {
return c[1]
}
}
};
cljs.core.PersistentVector.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
if(32 > this.cnt - cljs.core.tail_off.call(null, a)) {
var c = this.tail.slice();
c.push(b);
return new cljs.core.PersistentVector(this.meta, this.cnt + 1, this.shift, this.root, c, null)
}
var d = this.cnt >>> 5 > 1 << this.shift, c = d ? this.shift + 5 : this.shift;
d ? (d = cljs.core.pv_fresh_node.call(null, null), cljs.core.pv_aset.call(null, d, 0, this.root), cljs.core.pv_aset.call(null, d, 1, cljs.core.new_path.call(null, null, this.shift, new cljs.core.VectorNode(null, this.tail)))) : d = cljs.core.push_tail.call(null, a, this.shift, this.root, new cljs.core.VectorNode(null, this.tail));
return new cljs.core.PersistentVector(this.meta, this.cnt + 1, c, d, [b], null)
};
cljs.core.PersistentVector.prototype.cljs$core$IReversible$_rseq$arity$1 = function(a) {
return 0 < this.cnt ? new cljs.core.RSeq(a, this.cnt - 1, null) : cljs.core.List.EMPTY
};
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_key$arity$1 = function(a) {
return a.cljs$core$IIndexed$_nth$arity$2(a, 0)
};
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_val$arity$1 = function(a) {
return a.cljs$core$IIndexed$_nth$arity$2(a, 1)
};
cljs.core.PersistentVector.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.ci_reduce.call(null, a, b)
};
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.ci_reduce.call(null, a, b, c)
};
cljs.core.PersistentVector.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return 0 === this.cnt ? null : cljs.core.chunked_seq.call(null, a, 0, 0)
};
cljs.core.PersistentVector.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.cnt
};
cljs.core.PersistentVector.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
return 0 < this.cnt ? a.cljs$core$IIndexed$_nth$arity$2(a, this.cnt - 1) : null
};
cljs.core.PersistentVector.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
if(0 === this.cnt) {
throw Error("Can't pop empty vector");
}
if(1 === this.cnt) {
return cljs.core._with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta)
}
if(1 < this.cnt - cljs.core.tail_off.call(null, a)) {
return new cljs.core.PersistentVector(this.meta, this.cnt - 1, this.shift, this.root, this.tail.slice(0, -1), null)
}
var b = cljs.core.array_for.call(null, a, this.cnt - 2), a = cljs.core.pop_tail.call(null, a, this.shift, this.root), a = null == a ? cljs.core.PersistentVector.EMPTY_NODE : a, c = this.cnt - 1, d;
d = (d = 5 < this.shift) ? null == cljs.core.pv_aget.call(null, a, 1) : d;
return d ? new cljs.core.PersistentVector(this.meta, c, this.shift - 5, cljs.core.pv_aget.call(null, a, 0), b, null) : new cljs.core.PersistentVector(this.meta, c, this.shift, a, b, null)
};
cljs.core.PersistentVector.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
return a.cljs$core$IAssociative$_assoc$arity$3(a, b, c)
};
cljs.core.PersistentVector.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.PersistentVector.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentVector(b, this.cnt, this.shift, this.root, this.tail, this.__hash)
};
cljs.core.PersistentVector.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return cljs.core.array_for.call(null, a, b)[b & 31]
};
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
var d;
d = (d = 0 <= b) ? b < this.cnt : d;
return d ? a.cljs$core$IIndexed$_nth$arity$2(a, b) : c
};
cljs.core.PersistentVector.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta)
};
cljs.core.PersistentVector.EMPTY_NODE = cljs.core.pv_fresh_node.call(null, null);
cljs.core.PersistentVector.EMPTY = new cljs.core.PersistentVector(null, 0, 5, cljs.core.PersistentVector.EMPTY_NODE, [], 0);
cljs.core.PersistentVector.fromArray = function(a, b) {
var c = a.length, d = !0 === b ? a : a.slice();
if(32 > c) {
return new cljs.core.PersistentVector(null, c, 5, cljs.core.PersistentVector.EMPTY_NODE, d, null)
}
for(var e = d.slice(0, 32), f = new cljs.core.PersistentVector(null, 32, 5, cljs.core.PersistentVector.EMPTY_NODE, e, null), e = 32, g = cljs.core._as_transient.call(null, f);;) {
if(e < c) {
f = e + 1, g = cljs.core.conj_BANG_.call(null, g, d[e]), e = f
}else {
return cljs.core.persistent_BANG_.call(null, g)
}
}
};
cljs.core.vec = function(a) {
return cljs.core._persistent_BANG_.call(null, cljs.core.reduce.call(null, cljs.core._conj_BANG_, cljs.core._as_transient.call(null, cljs.core.PersistentVector.EMPTY), a))
};
cljs.core.vector = function() {
var a = function(a) {
return cljs.core.vec.call(null, a)
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.ChunkedSeq = function(a, b, c, d, e, f) {
this.vec = a;
this.node = b;
this.i = c;
this.off = d;
this.meta = e;
this.__hash = f;
this.cljs$lang$protocol_mask$partition0$ = 31719660;
this.cljs$lang$protocol_mask$partition1$ = 1536
};
cljs.core.ChunkedSeq.cljs$lang$type = !0;
cljs.core.ChunkedSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ChunkedSeq")
};
cljs.core.ChunkedSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ChunkedSeq")
};
cljs.core.ChunkedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.ChunkedSeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
return this.off + 1 < this.node.length ? (a = cljs.core.chunked_seq.call(null, this.vec, this.node, this.i, this.off + 1), null == a ? null : a) : a.cljs$core$IChunkedNext$_chunked_next$arity$1(a)
};
cljs.core.ChunkedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return this.node[this.off]
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
return this.off + 1 < this.node.length ? (a = cljs.core.chunked_seq.call(null, this.vec, this.node, this.i, this.off + 1), null == a ? cljs.core.List.EMPTY : a) : a.cljs$core$IChunkedSeq$_chunked_rest$arity$1(a)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function() {
var a = this.node.length, a = this.i + a < cljs.core._count.call(null, this.vec) ? cljs.core.chunked_seq.call(null, this.vec, this.i + a, 0) : null;
return null == a ? null : a
};
cljs.core.ChunkedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return cljs.core.chunked_seq.call(null, this.vec, this.node, this.i, this.off, b)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.ChunkedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function() {
return cljs.core.array_chunk.call(null, this.node, this.off)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function() {
var a = this.node.length, a = this.i + a < cljs.core._count.call(null, this.vec) ? cljs.core.chunked_seq.call(null, this.vec, this.i + a, 0) : null;
return null == a ? cljs.core.List.EMPTY : a
};
cljs.core.chunked_seq = function() {
var a = null, b = function(b, c, d) {
return a.call(null, b, cljs.core.array_for.call(null, b, c), c, d, null)
}, c = function(b, c, d, h) {
return a.call(null, b, c, d, h, null)
}, d = function(a, b, c, d, i) {
return new cljs.core.ChunkedSeq(a, b, c, d, i, null)
}, a = function(a, f, g, h, i) {
switch(arguments.length) {
case 3:
return b.call(this, a, f, g);
case 4:
return c.call(this, a, f, g, h);
case 5:
return d.call(this, a, f, g, h, i)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$4 = c;
a.cljs$lang$arity$5 = d;
return a
}();
cljs.core.Subvec = function(a, b, c, d, e) {
this.meta = a;
this.v = b;
this.start = c;
this.end = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 32400159
};
cljs.core.Subvec.cljs$lang$type = !0;
cljs.core.Subvec.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Subvec")
};
cljs.core.Subvec.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Subvec")
};
cljs.core.Subvec.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, null)
};
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
};
cljs.core.Subvec.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
a = this.start + b;
return cljs.core.build_subvec.call(null, this.meta, cljs.core._assoc.call(null, this.v, a, c), this.start, this.end > a + 1 ? this.end : a + 1, null)
};
cljs.core.Subvec.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.Subvec.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.Subvec.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.build_subvec.call(null, this.meta, cljs.core._assoc_n.call(null, this.v, this.end, b), this.start, this.end + 1, null)
};
cljs.core.Subvec.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.ci_reduce.call(null, a, b)
};
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.ci_reduce.call(null, a, b, c)
};
cljs.core.Subvec.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
var a = this;
return function c(d) {
return d === a.end ? null : cljs.core.cons.call(null, cljs.core._nth.call(null, a.v, d), new cljs.core.LazySeq(null, !1, function() {
return c.call(null, d + 1)
}, null))
}.call(null, a.start)
};
cljs.core.Subvec.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.end - this.start
};
cljs.core.Subvec.prototype.cljs$core$IStack$_peek$arity$1 = function() {
return cljs.core._nth.call(null, this.v, this.end - 1)
};
cljs.core.Subvec.prototype.cljs$core$IStack$_pop$arity$1 = function() {
if(this.start === this.end) {
throw Error("Can't pop empty vector");
}
return cljs.core.build_subvec.call(null, this.meta, this.v, this.start, this.end - 1, null)
};
cljs.core.Subvec.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
return a.cljs$core$IAssociative$_assoc$arity$3(a, b, c)
};
cljs.core.Subvec.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.Subvec.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return cljs.core.build_subvec.call(null, b, this.v, this.start, this.end, this.__hash)
};
cljs.core.Subvec.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return cljs.core._nth.call(null, this.v, this.start + b)
};
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
return cljs.core._nth.call(null, this.v, this.start + b, c)
};
cljs.core.Subvec.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.Vector.EMPTY, this.meta)
};
cljs.core.build_subvec = function(a, b, c, d, e) {
var f = cljs.core.count.call(null, b);
if(function() {
var a = 0 > c;
return a || (a = 0 > d) ? a : (a = c > f) ? a : d > f
}()) {
throw Error("Index out of bounds");
}
return new cljs.core.Subvec(a, b, c, d, e)
};
cljs.core.subvec = function() {
var a = null, b = function(b, c) {
return a.call(null, b, c, cljs.core.count.call(null, b))
}, c = function(a, b, c) {
return cljs.core.build_subvec.call(null, null, a, b, c, null)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.tv_ensure_editable = function(a, b) {
return a === b.edit ? b : new cljs.core.VectorNode(a, b.arr.slice())
};
cljs.core.tv_editable_root = function(a) {
return new cljs.core.VectorNode({}, a.arr.slice())
};
cljs.core.tv_editable_tail = function(a) {
var b = cljs.core.make_array.call(null, 32);
cljs.core.array_copy.call(null, a, 0, b, 0, a.length);
return b
};
cljs.core.tv_push_tail = function tv_push_tail(b, c, d, e) {
var f = cljs.core.tv_ensure_editable.call(null, b.root.edit, d), g = b.cnt - 1 >>> c & 31;
cljs.core.pv_aset.call(null, f, g, 5 === c ? e : function() {
var d = cljs.core.pv_aget.call(null, f, g);
return null != d ? tv_push_tail.call(null, b, c - 5, d, e) : cljs.core.new_path.call(null, b.root.edit, c - 5, e)
}());
return f
};
cljs.core.tv_pop_tail = function tv_pop_tail(b, c, d) {
var d = cljs.core.tv_ensure_editable.call(null, b.root.edit, d), e = b.cnt - 2 >>> c & 31;
if(5 < c) {
b = tv_pop_tail.call(null, b, c - 5, cljs.core.pv_aget.call(null, d, e));
c = null == b;
if(c ? 0 === e : c) {
return null
}
cljs.core.pv_aset.call(null, d, e, b);
return d
}
if(0 === e) {
return null
}
cljs.core.pv_aset.call(null, d, e, null);
return d
};
cljs.core.editable_array_for = function(a, b) {
var c;
c = (c = 0 <= b) ? b < a.cnt : c;
if(c) {
if(b >= cljs.core.tail_off.call(null, a)) {
return a.tail
}
for(var d = c = a.root, e = a.shift;;) {
if(0 < e) {
d = cljs.core.tv_ensure_editable.call(null, c.edit, cljs.core.pv_aget.call(null, d, b >>> e & 31)), e -= 5
}else {
return d.arr
}
}
}else {
throw Error([cljs.core.str("No item "), cljs.core.str(b), cljs.core.str(" in transient vector of length "), cljs.core.str(a.cnt)].join(""));
}
};
cljs.core.TransientVector = function(a, b, c, d) {
this.cnt = a;
this.shift = b;
this.root = c;
this.tail = d;
this.cljs$lang$protocol_mask$partition0$ = 275;
this.cljs$lang$protocol_mask$partition1$ = 88
};
cljs.core.TransientVector.cljs$lang$type = !0;
cljs.core.TransientVector.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/TransientVector")
};
cljs.core.TransientVector.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/TransientVector")
};
cljs.core.TransientVector.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.TransientVector.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, null)
};
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
};
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
if(this.root.edit) {
return cljs.core.array_for.call(null, a, b)[b & 31]
}
throw Error("nth after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
var d;
d = (d = 0 <= b) ? b < this.cnt : d;
return d ? a.cljs$core$IIndexed$_nth$arity$2(a, b) : c
};
cljs.core.TransientVector.prototype.cljs$core$ICounted$_count$arity$1 = function() {
if(this.root.edit) {
return this.cnt
}
throw Error("count after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 = function(a, b, c) {
var d = this;
if(d.root.edit) {
var e;
e = (e = 0 <= b) ? b < d.cnt : e;
if(e) {
return cljs.core.tail_off.call(null, a) <= b ? d.tail[b & 31] = c : (e = function g(a, e) {
var j = cljs.core.tv_ensure_editable.call(null, d.root.edit, e);
if(0 === a) {
cljs.core.pv_aset.call(null, j, b & 31, c)
}else {
var k = b >>> a & 31;
cljs.core.pv_aset.call(null, j, k, g.call(null, a - 5, cljs.core.pv_aget.call(null, j, k)))
}
return j
}.call(null, d.shift, d.root), d.root = e), a
}
if(b === d.cnt) {
return a.cljs$core$ITransientCollection$_conj_BANG_$arity$2(a, c)
}
throw Error([cljs.core.str("Index "), cljs.core.str(b), cljs.core.str(" out of bounds for TransientVector of length"), cljs.core.str(d.cnt)].join(""));
}
throw Error("assoc! after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_pop_BANG_$arity$1 = function(a) {
if(this.root.edit) {
if(0 === this.cnt) {
throw Error("Can't pop empty vector");
}
if(1 === this.cnt) {
this.cnt = 0
}else {
if(0 < (this.cnt - 1 & 31)) {
this.cnt -= 1
}else {
var b = cljs.core.editable_array_for.call(null, a, this.cnt - 2), c;
c = cljs.core.tv_pop_tail.call(null, a, this.shift, this.root);
c = null != c ? c : new cljs.core.VectorNode(this.root.edit, cljs.core.make_array.call(null, 32));
var d;
d = (d = 5 < this.shift) ? null == cljs.core.pv_aget.call(null, c, 1) : d;
d ? (this.root = cljs.core.tv_ensure_editable.call(null, this.root.edit, cljs.core.pv_aget.call(null, c, 0)), this.shift -= 5) : this.root = c;
this.cnt -= 1;
this.tail = b
}
}
return a
}
throw Error("pop! after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(a, b, c) {
return a.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(a, b, c)
};
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
if(this.root.edit) {
if(32 > this.cnt - cljs.core.tail_off.call(null, a)) {
this.tail[this.cnt & 31] = b
}else {
var c = new cljs.core.VectorNode(this.root.edit, this.tail), d = cljs.core.make_array.call(null, 32);
d[0] = b;
this.tail = d;
if(this.cnt >>> 5 > 1 << this.shift) {
var d = cljs.core.make_array.call(null, 32), e = this.shift + 5;
d[0] = this.root;
d[1] = cljs.core.new_path.call(null, this.root.edit, this.shift, c);
this.root = new cljs.core.VectorNode(this.root.edit, d);
this.shift = e
}else {
this.root = cljs.core.tv_push_tail.call(null, a, this.shift, this.root, c)
}
}
this.cnt += 1;
return a
}
throw Error("conj! after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(a) {
if(this.root.edit) {
this.root.edit = null;
var a = this.cnt - cljs.core.tail_off.call(null, a), b = cljs.core.make_array.call(null, a);
cljs.core.array_copy.call(null, this.tail, 0, b, 0, a);
return new cljs.core.PersistentVector(null, this.cnt, this.shift, this.root, b, null)
}
throw Error("persistent! called twice");
};
cljs.core.PersistentQueueSeq = function(a, b, c, d) {
this.meta = a;
this.front = b;
this.rear = c;
this.__hash = d;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31850572
};
cljs.core.PersistentQueueSeq.cljs$lang$type = !0;
cljs.core.PersistentQueueSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentQueueSeq")
};
cljs.core.PersistentQueueSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentQueueSeq")
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.PersistentQueueSeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return cljs.core._first.call(null, this.front)
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
var b = cljs.core.next.call(null, this.front);
return b ? new cljs.core.PersistentQueueSeq(this.meta, b, this.rear, null) : null == this.rear ? a.cljs$core$IEmptyableCollection$_empty$arity$1(a) : new cljs.core.PersistentQueueSeq(this.meta, this.rear, null, null)
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentQueueSeq(b, this.front, this.rear, this.__hash)
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.PersistentQueue = function(a, b, c, d, e) {
this.meta = a;
this.count = b;
this.front = c;
this.rear = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31858766
};
cljs.core.PersistentQueue.cljs$lang$type = !0;
cljs.core.PersistentQueue.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentQueue")
};
cljs.core.PersistentQueue.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentQueue")
};
cljs.core.PersistentQueue.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.PersistentQueue.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
var c = this;
return cljs.core.truth_(c.front) ? new cljs.core.PersistentQueue(c.meta, c.count + 1, c.front, cljs.core.conj.call(null, function() {
var a = c.rear;
return cljs.core.truth_(a) ? a : cljs.core.PersistentVector.EMPTY
}(), b), null) : new cljs.core.PersistentQueue(c.meta, c.count + 1, cljs.core.conj.call(null, c.front, b), cljs.core.PersistentVector.EMPTY, null)
};
cljs.core.PersistentQueue.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
var a = this, b = cljs.core.seq.call(null, a.rear);
return cljs.core.truth_(function() {
var c = a.front;
return cljs.core.truth_(c) ? c : b
}()) ? new cljs.core.PersistentQueueSeq(null, a.front, cljs.core.seq.call(null, b), null) : null
};
cljs.core.PersistentQueue.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.count
};
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_peek$arity$1 = function() {
return cljs.core._first.call(null, this.front)
};
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
return cljs.core.truth_(this.front) ? (a = cljs.core.next.call(null, this.front)) ? new cljs.core.PersistentQueue(this.meta, this.count - 1, a, this.rear, null) : new cljs.core.PersistentQueue(this.meta, this.count - 1, cljs.core.seq.call(null, this.rear), cljs.core.PersistentVector.EMPTY, null) : a
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return cljs.core.first.call(null, this.front)
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
return cljs.core.rest.call(null, cljs.core.seq.call(null, a))
};
cljs.core.PersistentQueue.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.PersistentQueue.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentQueue(b, this.count, this.front, this.rear, this.__hash)
};
cljs.core.PersistentQueue.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentQueue.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.PersistentQueue.EMPTY
};
cljs.core.PersistentQueue.EMPTY = new cljs.core.PersistentQueue(null, 0, null, cljs.core.PersistentVector.EMPTY, 0);
cljs.core.NeverEquiv = function() {
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 2097152
};
cljs.core.NeverEquiv.cljs$lang$type = !0;
cljs.core.NeverEquiv.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/NeverEquiv")
};
cljs.core.NeverEquiv.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/NeverEquiv")
};
cljs.core.NeverEquiv.prototype.cljs$core$IEquiv$_equiv$arity$2 = function() {
return!1
};
cljs.core.never_equiv = new cljs.core.NeverEquiv;
cljs.core.equiv_map = function(a, b) {
return cljs.core.boolean$.call(null, cljs.core.map_QMARK_.call(null, b) ? cljs.core.count.call(null, a) === cljs.core.count.call(null, b) ? cljs.core.every_QMARK_.call(null, cljs.core.identity, cljs.core.map.call(null, function(a) {
return cljs.core._EQ_.call(null, cljs.core._lookup.call(null, b, cljs.core.first.call(null, a), cljs.core.never_equiv), cljs.core.second.call(null, a))
}, a)) : null : null)
};
cljs.core.scan_array = function(a, b, c) {
for(var d = c.length, e = 0;;) {
if(e < d) {
if(b === c[e]) {
return e
}
e += a
}else {
return null
}
}
};
cljs.core.obj_map_compare_keys = function(a, b) {
var c = cljs.core.hash.call(null, a), d = cljs.core.hash.call(null, b);
return c < d ? -1 : c > d ? 1 : 0
};
cljs.core.obj_map__GT_hash_map = function(a, b, c) {
for(var d = a.keys, e = d.length, f = a.strobj, g = cljs.core.with_meta.call(null, cljs.core.PersistentHashMap.EMPTY, cljs.core.meta.call(null, a)), a = 0, g = cljs.core.transient$.call(null, g);;) {
if(a < e) {
var h = d[a], a = a + 1, g = cljs.core.assoc_BANG_.call(null, g, h, f[h])
}else {
return cljs.core.persistent_BANG_.call(null, cljs.core.assoc_BANG_.call(null, g, b, c))
}
}
};
cljs.core.obj_clone = function(a, b) {
for(var c = {}, d = b.length, e = 0;;) {
if(e < d) {
var f = b[e];
c[f] = a[f];
e += 1
}else {
break
}
}
return c
};
cljs.core.ObjMap = function(a, b, c, d, e) {
this.meta = a;
this.keys = b;
this.strobj = c;
this.update_count = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 4;
this.cljs$lang$protocol_mask$partition0$ = 16123663
};
cljs.core.ObjMap.cljs$lang$type = !0;
cljs.core.ObjMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ObjMap")
};
cljs.core.ObjMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ObjMap")
};
cljs.core.ObjMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(a) {
return cljs.core.transient$.call(null, cljs.core.into.call(null, cljs.core.hash_map.call(null), a))
};
cljs.core.ObjMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_imap.call(null, a)
};
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
a = (a = goog.isString(b)) ? null != cljs.core.scan_array.call(null, 1, b, this.keys) : a;
return a ? this.strobj[b] : c
};
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
if(goog.isString(b)) {
var d;
d = (d = this.update_count > cljs.core.ObjMap.HASHMAP_THRESHOLD) ? d : this.keys.length >= cljs.core.ObjMap.HASHMAP_THRESHOLD;
if(d) {
return cljs.core.obj_map__GT_hash_map.call(null, a, b, c)
}
if(null != cljs.core.scan_array.call(null, 1, b, this.keys)) {
return a = cljs.core.obj_clone.call(null, this.strobj, this.keys), a[b] = c, new cljs.core.ObjMap(this.meta, this.keys, a, this.update_count + 1, null)
}
a = cljs.core.obj_clone.call(null, this.strobj, this.keys);
d = this.keys.slice();
a[b] = c;
d.push(b);
return new cljs.core.ObjMap(this.meta, d, a, this.update_count + 1, null)
}
return cljs.core.obj_map__GT_hash_map.call(null, a, b, c)
};
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
var c;
c = (c = goog.isString(b)) ? null != cljs.core.scan_array.call(null, 1, b, this.keys) : c;
return c ? !0 : !1
};
cljs.core.ObjMap.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.ObjMap.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.ObjMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
for(a = this.keys.sort(cljs.core.obj_map_compare_keys);;) {
if(cljs.core.seq.call(null, a)) {
var d = cljs.core.first.call(null, a), c = b.call(null, c, d, this.strobj[d]);
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
a = cljs.core.rest.call(null, a)
}else {
return c
}
}
};
cljs.core.ObjMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.vector_QMARK_.call(null, b) ? a.cljs$core$IAssociative$_assoc$arity$3(a, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, a, b)
};
cljs.core.ObjMap.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.ObjMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
var a = this;
return 0 < a.keys.length ? cljs.core.map.call(null, function(b) {
return cljs.core.vector.call(null, b, a.strobj[b])
}, a.keys.sort(cljs.core.obj_map_compare_keys)) : null
};
cljs.core.ObjMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.keys.length
};
cljs.core.ObjMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_map.call(null, a, b)
};
cljs.core.ObjMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.ObjMap(b, this.keys, this.strobj, this.update_count, this.__hash)
};
cljs.core.ObjMap.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.ObjMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.ObjMap.EMPTY, this.meta)
};
cljs.core.ObjMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
var c;
c = (c = goog.isString(b)) ? null != cljs.core.scan_array.call(null, 1, b, this.keys) : c;
if(c) {
c = this.keys.slice();
var d = cljs.core.obj_clone.call(null, this.strobj, this.keys);
c.splice(cljs.core.scan_array.call(null, 1, b, c), 1);
cljs.core.js_delete.call(null, d, b);
return new cljs.core.ObjMap(this.meta, c, d, this.update_count + 1, null)
}
return a
};
cljs.core.ObjMap.EMPTY = new cljs.core.ObjMap(null, [], {}, 0, 0);
cljs.core.ObjMap.HASHMAP_THRESHOLD = 32;
cljs.core.ObjMap.fromObject = function(a, b) {
return new cljs.core.ObjMap(null, a, b, 0, null)
};
cljs.core.HashMap = function(a, b, c, d) {
this.meta = a;
this.count = b;
this.hashobj = c;
this.__hash = d;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 15075087
};
cljs.core.HashMap.cljs$lang$type = !0;
cljs.core.HashMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/HashMap")
};
cljs.core.HashMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/HashMap")
};
cljs.core.HashMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_imap.call(null, a)
};
cljs.core.HashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.HashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
a = this.hashobj[cljs.core.hash.call(null, b)];
b = cljs.core.truth_(a) ? cljs.core.scan_array.call(null, 2, b, a) : null;
return cljs.core.truth_(b) ? a[b + 1] : c
};
cljs.core.HashMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
var a = cljs.core.hash.call(null, b), d = this.hashobj[a];
if(cljs.core.truth_(d)) {
var d = d.slice(), e = goog.object.clone(this.hashobj);
e[a] = d;
a = cljs.core.scan_array.call(null, 2, b, d);
if(cljs.core.truth_(a)) {
return d[a + 1] = c, new cljs.core.HashMap(this.meta, this.count, e, null)
}
d.push(b, c);
return new cljs.core.HashMap(this.meta, this.count + 1, e, null)
}
e = goog.object.clone(this.hashobj);
e[a] = [b, c];
return new cljs.core.HashMap(this.meta, this.count + 1, e, null)
};
cljs.core.HashMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
var c = this.hashobj[cljs.core.hash.call(null, b)], c = cljs.core.truth_(c) ? cljs.core.scan_array.call(null, 2, b, c) : null;
return cljs.core.truth_(c) ? !0 : !1
};
cljs.core.HashMap.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.HashMap.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.HashMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.vector_QMARK_.call(null, b) ? a.cljs$core$IAssociative$_assoc$arity$3(a, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, a, b)
};
cljs.core.HashMap.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.HashMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
var a = this;
if(0 < a.count) {
var b = cljs.core.js_keys.call(null, a.hashobj).sort();
return cljs.core.mapcat.call(null, function(b) {
return cljs.core.map.call(null, cljs.core.vec, cljs.core.partition.call(null, 2, a.hashobj[b]))
}, b)
}
return null
};
cljs.core.HashMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.count
};
cljs.core.HashMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_map.call(null, a, b)
};
cljs.core.HashMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.HashMap(b, this.count, this.hashobj, this.__hash)
};
cljs.core.HashMap.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.HashMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.HashMap.EMPTY, this.meta)
};
cljs.core.HashMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
var c = cljs.core.hash.call(null, b), d = this.hashobj[c], e = cljs.core.truth_(d) ? cljs.core.scan_array.call(null, 2, b, d) : null;
if(cljs.core.not.call(null, e)) {
return a
}
var f = goog.object.clone(this.hashobj);
3 > d.length ? cljs.core.js_delete.call(null, f, c) : (d = d.slice(), d.splice(e, 2), f[c] = d);
return new cljs.core.HashMap(this.meta, this.count - 1, f, null)
};
cljs.core.HashMap.EMPTY = new cljs.core.HashMap(null, 0, {}, 0);
cljs.core.HashMap.fromArrays = function(a, b) {
for(var c = a.length, d = 0, e = cljs.core.HashMap.EMPTY;;) {
if(d < c) {
var f = d + 1, e = cljs.core.assoc.call(null, e, a[d], b[d]), d = f
}else {
return e
}
}
};
cljs.core.array_map_index_of = function(a, b) {
for(var c = a.arr, d = c.length, e = 0;;) {
if(d <= e) {
return-1
}
if(cljs.core._EQ_.call(null, c[e], b)) {
return e
}
e += 2
}
};
cljs.core.PersistentArrayMap = function(a, b, c, d) {
this.meta = a;
this.cnt = b;
this.arr = c;
this.__hash = d;
this.cljs$lang$protocol_mask$partition1$ = 4;
this.cljs$lang$protocol_mask$partition0$ = 16123663
};
cljs.core.PersistentArrayMap.cljs$lang$type = !0;
cljs.core.PersistentArrayMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentArrayMap")
};
cljs.core.PersistentArrayMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentArrayMap")
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function() {
return new cljs.core.TransientArrayMap({}, this.arr.length, this.arr.slice())
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_imap.call(null, a)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
a = cljs.core.array_map_index_of.call(null, a, b);
return-1 === a ? c : this.arr[a + 1]
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
var d = cljs.core.array_map_index_of.call(null, a, b);
if(-1 === d) {
if(this.cnt < cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
var d = cljs.core.PersistentArrayMap, a = this.meta, e = this.cnt + 1, f = this.arr.slice();
f.push(b);
f.push(c);
return new d(a, e, f, null)
}
return cljs.core.persistent_BANG_.call(null, cljs.core.assoc_BANG_.call(null, cljs.core.transient$.call(null, cljs.core.into.call(null, cljs.core.PersistentHashMap.EMPTY, a)), b, c))
}
if(c === this.arr[d + 1]) {
return a
}
b = cljs.core.PersistentArrayMap;
a = this.meta;
e = this.cnt;
f = this.arr.slice();
f[d + 1] = c;
return new b(a, e, f, null)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
return-1 !== cljs.core.array_map_index_of.call(null, a, b)
};
cljs.core.PersistentArrayMap.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.PersistentArrayMap.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
for(var a = this.arr.length, d = 0;;) {
if(d < a) {
c = b.call(null, c, this.arr[d], this.arr[d + 1]);
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
d += 2
}else {
return c
}
}
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.vector_QMARK_.call(null, b) ? a.cljs$core$IAssociative$_assoc$arity$3(a, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, a, b)
};
cljs.core.PersistentArrayMap.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
var a = this;
if(0 < a.cnt) {
var b = a.arr.length;
return function d(e) {
return new cljs.core.LazySeq(null, !1, function() {
return e < b ? cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([a.arr[e], a.arr[e + 1]], !0), d.call(null, e + 2)) : null
}, null)
}.call(null, 0)
}
return null
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.cnt
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_map.call(null, a, b)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentArrayMap(b, this.cnt, this.arr, this.__hash)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core._with_meta.call(null, cljs.core.PersistentArrayMap.EMPTY, this.meta)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
if(0 <= cljs.core.array_map_index_of.call(null, a, b)) {
var c = this.arr.length, d = c - 2;
if(0 === d) {
return a.cljs$core$IEmptyableCollection$_empty$arity$1(a)
}
for(var d = cljs.core.make_array.call(null, d), e = 0, f = 0;;) {
if(e >= c) {
return new cljs.core.PersistentArrayMap(this.meta, this.cnt - 1, d, null)
}
cljs.core._EQ_.call(null, b, this.arr[e]) || (d[f] = this.arr[e], d[f + 1] = this.arr[e + 1], f += 2);
e += 2
}
}else {
return a
}
};
cljs.core.PersistentArrayMap.EMPTY = new cljs.core.PersistentArrayMap(null, 0, [], null);
cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD = 16;
cljs.core.PersistentArrayMap.fromArrays = function(a, b) {
for(var c = cljs.core.count.call(null, a), d = 0, e = cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY);;) {
if(d < c) {
var f = d + 1, e = cljs.core.assoc_BANG_.call(null, e, a[d], b[d]), d = f
}else {
return cljs.core.persistent_BANG_.call(null, e)
}
}
};
cljs.core.TransientArrayMap = function(a, b, c) {
this.editable_QMARK_ = a;
this.len = b;
this.arr = c;
this.cljs$lang$protocol_mask$partition1$ = 56;
this.cljs$lang$protocol_mask$partition0$ = 258
};
cljs.core.TransientArrayMap.cljs$lang$type = !0;
cljs.core.TransientArrayMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/TransientArrayMap")
};
cljs.core.TransientArrayMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/TransientArrayMap")
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(a, b) {
if(cljs.core.truth_(this.editable_QMARK_)) {
var c = cljs.core.array_map_index_of.call(null, a, b);
0 <= c && (this.arr[c] = this.arr[this.len - 2], this.arr[c + 1] = this.arr[this.len - 1], c = this.arr, c.pop(), c.pop(), this.len -= 2);
return a
}
throw Error("dissoc! after persistent!");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(a, b, c) {
if(cljs.core.truth_(this.editable_QMARK_)) {
var d = cljs.core.array_map_index_of.call(null, a, b);
if(-1 === d) {
return this.len + 2 <= 2 * cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD ? (this.len += 2, this.arr.push(b), this.arr.push(c), a) : cljs.core.assoc_BANG_.call(null, cljs.core.array__GT_transient_hash_map.call(null, this.len, this.arr), b, c)
}
c !== this.arr[d + 1] && (this.arr[d + 1] = c);
return a
}
throw Error("assoc! after persistent!");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
if(cljs.core.truth_(this.editable_QMARK_)) {
var c;
b ? (c = (c = b.cljs$lang$protocol_mask$partition0$ & 2048) ? c : b.cljs$core$IMapEntry$, c = c ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, b)) : c = cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, b);
if(c) {
return a.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(a, cljs.core.key.call(null, b), cljs.core.val.call(null, b))
}
c = cljs.core.seq.call(null, b);
for(var d = a;;) {
var e = cljs.core.first.call(null, c);
if(cljs.core.truth_(e)) {
c = cljs.core.next.call(null, c), d = d.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(d, cljs.core.key.call(null, e), cljs.core.val.call(null, e))
}else {
return d
}
}
}else {
throw Error("conj! after persistent!");
}
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function() {
if(cljs.core.truth_(this.editable_QMARK_)) {
return this.editable_QMARK_ = !1, new cljs.core.PersistentArrayMap(null, cljs.core.quot.call(null, this.len, 2), this.arr, null)
}
throw Error("persistent! called twice");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
if(cljs.core.truth_(this.editable_QMARK_)) {
return a = cljs.core.array_map_index_of.call(null, a, b), -1 === a ? c : this.arr[a + 1]
}
throw Error("lookup after persistent!");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
if(cljs.core.truth_(this.editable_QMARK_)) {
return cljs.core.quot.call(null, this.len, 2)
}
throw Error("count after persistent!");
};
cljs.core.array__GT_transient_hash_map = function(a, b) {
for(var c = cljs.core.transient$.call(null, cljs.core.ObjMap.EMPTY), d = 0;;) {
if(d < a) {
c = cljs.core.assoc_BANG_.call(null, c, b[d], b[d + 1]), d += 2
}else {
return c
}
}
};
cljs.core.Box = function(a) {
this.val = a
};
cljs.core.Box.cljs$lang$type = !0;
cljs.core.Box.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Box")
};
cljs.core.Box.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Box")
};
cljs.core.key_test = function(a, b) {
return goog.isString(a) ? a === b : cljs.core._EQ_.call(null, a, b)
};
cljs.core.mask = function(a, b) {
return a >>> b & 31
};
cljs.core.clone_and_set = function() {
var a = null, b = function(a, b, c) {
a = a.slice();
a[b] = c;
return a
}, c = function(a, b, c, g, h) {
a = a.slice();
a[b] = c;
a[g] = h;
return a
}, a = function(a, e, f, g, h) {
switch(arguments.length) {
case 3:
return b.call(this, a, e, f);
case 5:
return c.call(this, a, e, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$5 = c;
return a
}();
cljs.core.remove_pair = function(a, b) {
var c = cljs.core.make_array.call(null, a.length - 2);
cljs.core.array_copy.call(null, a, 0, c, 0, 2 * b);
cljs.core.array_copy.call(null, a, 2 * (b + 1), c, 2 * b, c.length - 2 * b);
return c
};
cljs.core.bitmap_indexed_node_index = function(a, b) {
return cljs.core.bit_count.call(null, a & b - 1)
};
cljs.core.bitpos = function(a, b) {
return 1 << (a >>> b & 31)
};
cljs.core.edit_and_set = function() {
var a = null, b = function(a, b, c, g) {
a = a.ensure_editable(b);
a.arr[c] = g;
return a
}, c = function(a, b, c, g, h, i) {
a = a.ensure_editable(b);
a.arr[c] = g;
a.arr[h] = i;
return a
}, a = function(a, e, f, g, h, i) {
switch(arguments.length) {
case 4:
return b.call(this, a, e, f, g);
case 6:
return c.call(this, a, e, f, g, h, i)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$4 = b;
a.cljs$lang$arity$6 = c;
return a
}();
cljs.core.inode_kv_reduce = function(a, b, c) {
for(var d = a.length, e = 0;;) {
if(e < d) {
var f = a[e];
null != f ? c = b.call(null, c, f, a[e + 1]) : (f = a[e + 1], c = null != f ? f.kv_reduce(b, c) : c);
if(cljs.core.reduced_QMARK_.call(null, c)) {
return cljs.core.deref.call(null, c)
}
e += 2
}else {
return c
}
}
};
cljs.core.BitmapIndexedNode = function(a, b, c) {
this.edit = a;
this.bitmap = b;
this.arr = c
};
cljs.core.BitmapIndexedNode.cljs$lang$type = !0;
cljs.core.BitmapIndexedNode.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/BitmapIndexedNode")
};
cljs.core.BitmapIndexedNode.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/BitmapIndexedNode")
};
cljs.core.BitmapIndexedNode.prototype.edit_and_remove_pair = function(a, b, c) {
if(this.bitmap === b) {
return null
}
var a = this.ensure_editable(a), d = a.arr, e = d.length;
a.bitmap ^= b;
cljs.core.array_copy.call(null, d, 2 * (c + 1), d, 2 * c, e - 2 * (c + 1));
d[e - 2] = null;
d[e - 1] = null;
return a
};
cljs.core.BitmapIndexedNode.prototype.inode_assoc_BANG_ = function(a, b, c, d, e, f) {
var g = 1 << (c >>> b & 31), h = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, g);
if(0 === (this.bitmap & g)) {
var i = cljs.core.bit_count.call(null, this.bitmap);
if(2 * i < this.arr.length) {
return a = this.ensure_editable(a), b = a.arr, f.val = !0, cljs.core.array_copy_downward.call(null, b, 2 * h, b, 2 * (h + 1), 2 * (i - h)), b[2 * h] = d, b[2 * h + 1] = e, a.bitmap |= g, a
}
if(16 <= i) {
h = cljs.core.make_array.call(null, 32);
h[c >>> b & 31] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b + 5, c, d, e, f);
for(e = d = 0;;) {
if(32 > d) {
0 !== (this.bitmap >>> d & 1) && (h[d] = null != this.arr[e] ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b + 5, cljs.core.hash.call(null, this.arr[e]), this.arr[e], this.arr[e + 1], f) : this.arr[e + 1], e += 2), d += 1
}else {
break
}
}
return new cljs.core.ArrayNode(a, i + 1, h)
}
b = cljs.core.make_array.call(null, 2 * (i + 4));
cljs.core.array_copy.call(null, this.arr, 0, b, 0, 2 * h);
b[2 * h] = d;
b[2 * h + 1] = e;
cljs.core.array_copy.call(null, this.arr, 2 * h, b, 2 * (h + 1), 2 * (i - h));
f.val = !0;
a = this.ensure_editable(a);
a.arr = b;
a.bitmap |= g;
return a
}
i = this.arr[2 * h];
g = this.arr[2 * h + 1];
if(null == i) {
return i = g.inode_assoc_BANG_(a, b + 5, c, d, e, f), i === g ? this : cljs.core.edit_and_set.call(null, this, a, 2 * h + 1, i)
}
if(cljs.core.key_test.call(null, d, i)) {
return e === g ? this : cljs.core.edit_and_set.call(null, this, a, 2 * h + 1, e)
}
f.val = !0;
return cljs.core.edit_and_set.call(null, this, a, 2 * h, null, 2 * h + 1, cljs.core.create_node.call(null, a, b + 5, i, g, c, d, e))
};
cljs.core.BitmapIndexedNode.prototype.inode_seq = function() {
return cljs.core.create_inode_seq.call(null, this.arr)
};
cljs.core.BitmapIndexedNode.prototype.inode_without_BANG_ = function(a, b, c, d, e) {
var f = 1 << (c >>> b & 31);
if(0 === (this.bitmap & f)) {
return this
}
var g = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, f), h = this.arr[2 * g], i = this.arr[2 * g + 1];
return null == h ? (b = i.inode_without_BANG_(a, b + 5, c, d, e), b === i ? this : null != b ? cljs.core.edit_and_set.call(null, this, a, 2 * g + 1, b) : this.bitmap === f ? null : this.edit_and_remove_pair(a, f, g)) : cljs.core.key_test.call(null, d, h) ? (e[0] = !0, this.edit_and_remove_pair(a, f, g)) : this
};
cljs.core.BitmapIndexedNode.prototype.ensure_editable = function(a) {
if(a === this.edit) {
return this
}
var b = cljs.core.bit_count.call(null, this.bitmap), c = cljs.core.make_array.call(null, 0 > b ? 4 : 2 * (b + 1));
cljs.core.array_copy.call(null, this.arr, 0, c, 0, 2 * b);
return new cljs.core.BitmapIndexedNode(a, this.bitmap, c)
};
cljs.core.BitmapIndexedNode.prototype.kv_reduce = function(a, b) {
return cljs.core.inode_kv_reduce.call(null, this.arr, a, b)
};
cljs.core.BitmapIndexedNode.prototype.inode_find = function(a, b, c, d) {
var e = 1 << (b >>> a & 31);
if(0 === (this.bitmap & e)) {
return d
}
var f = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, e), e = this.arr[2 * f], f = this.arr[2 * f + 1];
return null == e ? f.inode_find(a + 5, b, c, d) : cljs.core.key_test.call(null, c, e) ? cljs.core.PersistentVector.fromArray([e, f], !0) : d
};
cljs.core.BitmapIndexedNode.prototype.inode_without = function(a, b, c) {
var d = 1 << (b >>> a & 31);
if(0 === (this.bitmap & d)) {
return this
}
var e = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, d), f = this.arr[2 * e], g = this.arr[2 * e + 1];
return null == f ? (a = g.inode_without(a + 5, b, c), a === g ? this : null != a ? new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * e + 1, a)) : this.bitmap === d ? null : new cljs.core.BitmapIndexedNode(null, this.bitmap ^ d, cljs.core.remove_pair.call(null, this.arr, e))) : cljs.core.key_test.call(null, c, f) ? new cljs.core.BitmapIndexedNode(null, this.bitmap ^ d, cljs.core.remove_pair.call(null, this.arr, e)) : this
};
cljs.core.BitmapIndexedNode.prototype.inode_assoc = function(a, b, c, d, e) {
var f = 1 << (b >>> a & 31), g = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, f);
if(0 === (this.bitmap & f)) {
var h = cljs.core.bit_count.call(null, this.bitmap);
if(16 <= h) {
g = cljs.core.make_array.call(null, 32);
g[b >>> a & 31] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a + 5, b, c, d, e);
for(d = c = 0;;) {
if(32 > c) {
0 !== (this.bitmap >>> c & 1) && (g[c] = null != this.arr[d] ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a + 5, cljs.core.hash.call(null, this.arr[d]), this.arr[d], this.arr[d + 1], e) : this.arr[d + 1], d += 2), c += 1
}else {
break
}
}
return new cljs.core.ArrayNode(null, h + 1, g)
}
a = cljs.core.make_array.call(null, 2 * (h + 1));
cljs.core.array_copy.call(null, this.arr, 0, a, 0, 2 * g);
a[2 * g] = c;
a[2 * g + 1] = d;
cljs.core.array_copy.call(null, this.arr, 2 * g, a, 2 * (g + 1), 2 * (h - g));
e.val = !0;
return new cljs.core.BitmapIndexedNode(null, this.bitmap | f, a)
}
h = this.arr[2 * g];
f = this.arr[2 * g + 1];
if(null == h) {
return h = f.inode_assoc(a + 5, b, c, d, e), h === f ? this : new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * g + 1, h))
}
if(cljs.core.key_test.call(null, c, h)) {
return d === f ? this : new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * g + 1, d))
}
e.val = !0;
return new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * g, null, 2 * g + 1, cljs.core.create_node.call(null, a + 5, h, f, b, c, d)))
};
cljs.core.BitmapIndexedNode.prototype.inode_lookup = function(a, b, c, d) {
var e = 1 << (b >>> a & 31);
if(0 === (this.bitmap & e)) {
return d
}
var f = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, e), e = this.arr[2 * f], f = this.arr[2 * f + 1];
return null == e ? f.inode_lookup(a + 5, b, c, d) : cljs.core.key_test.call(null, c, e) ? f : d
};
cljs.core.BitmapIndexedNode.EMPTY = new cljs.core.BitmapIndexedNode(null, 0, cljs.core.make_array.call(null, 0));
cljs.core.pack_array_node = function(a, b, c) {
for(var d = a.arr, a = 2 * (a.cnt - 1), e = cljs.core.make_array.call(null, a), f = 0, g = 1, h = 0;;) {
if(f < a) {
var i;
i = (i = f !== c) ? null != d[f] : i;
i && (e[g] = d[f], g += 2, h |= 1 << f);
f += 1
}else {
return new cljs.core.BitmapIndexedNode(b, h, e)
}
}
};
cljs.core.ArrayNode = function(a, b, c) {
this.edit = a;
this.cnt = b;
this.arr = c
};
cljs.core.ArrayNode.cljs$lang$type = !0;
cljs.core.ArrayNode.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ArrayNode")
};
cljs.core.ArrayNode.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ArrayNode")
};
cljs.core.ArrayNode.prototype.inode_assoc_BANG_ = function(a, b, c, d, e, f) {
var g = c >>> b & 31, h = this.arr[g];
if(null == h) {
return a = cljs.core.edit_and_set.call(null, this, a, g, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b + 5, c, d, e, f)), a.cnt += 1, a
}
b = h.inode_assoc_BANG_(a, b + 5, c, d, e, f);
return b === h ? this : cljs.core.edit_and_set.call(null, this, a, g, b)
};
cljs.core.ArrayNode.prototype.inode_seq = function() {
return cljs.core.create_array_node_seq.call(null, this.arr)
};
cljs.core.ArrayNode.prototype.inode_without_BANG_ = function(a, b, c, d, e) {
var f = c >>> b & 31, g = this.arr[f];
if(null == g) {
return this
}
b = g.inode_without_BANG_(a, b + 5, c, d, e);
if(b === g) {
return this
}
if(null == b) {
if(8 >= this.cnt) {
return cljs.core.pack_array_node.call(null, this, a, f)
}
a = cljs.core.edit_and_set.call(null, this, a, f, b);
a.cnt -= 1;
return a
}
return cljs.core.edit_and_set.call(null, this, a, f, b)
};
cljs.core.ArrayNode.prototype.ensure_editable = function(a) {
return a === this.edit ? this : new cljs.core.ArrayNode(a, this.cnt, this.arr.slice())
};
cljs.core.ArrayNode.prototype.kv_reduce = function(a, b) {
for(var c = this.arr.length, d = 0, e = b;;) {
if(d < c) {
var f = this.arr[d];
if(null != f) {
e = f.kv_reduce(a, e);
if(cljs.core.reduced_QMARK_.call(null, e)) {
return cljs.core.deref.call(null, e)
}
d += 1
}else {
return null
}
}else {
return e
}
}
};
cljs.core.ArrayNode.prototype.inode_find = function(a, b, c, d) {
var e = this.arr[b >>> a & 31];
return null != e ? e.inode_find(a + 5, b, c, d) : d
};
cljs.core.ArrayNode.prototype.inode_without = function(a, b, c) {
var d = b >>> a & 31, e = this.arr[d];
return null != e ? (a = e.inode_without(a + 5, b, c), a === e ? this : null == a ? 8 >= this.cnt ? cljs.core.pack_array_node.call(null, this, null, d) : new cljs.core.ArrayNode(null, this.cnt - 1, cljs.core.clone_and_set.call(null, this.arr, d, a)) : new cljs.core.ArrayNode(null, this.cnt, cljs.core.clone_and_set.call(null, this.arr, d, a))) : this
};
cljs.core.ArrayNode.prototype.inode_assoc = function(a, b, c, d, e) {
var f = b >>> a & 31, g = this.arr[f];
if(null == g) {
return new cljs.core.ArrayNode(null, this.cnt + 1, cljs.core.clone_and_set.call(null, this.arr, f, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a + 5, b, c, d, e)))
}
a = g.inode_assoc(a + 5, b, c, d, e);
return a === g ? this : new cljs.core.ArrayNode(null, this.cnt, cljs.core.clone_and_set.call(null, this.arr, f, a))
};
cljs.core.ArrayNode.prototype.inode_lookup = function(a, b, c, d) {
var e = this.arr[b >>> a & 31];
return null != e ? e.inode_lookup(a + 5, b, c, d) : d
};
cljs.core.hash_collision_node_find_index = function(a, b, c) {
for(var b = 2 * b, d = 0;;) {
if(d < b) {
if(cljs.core.key_test.call(null, c, a[d])) {
return d
}
d += 2
}else {
return-1
}
}
};
cljs.core.HashCollisionNode = function(a, b, c, d) {
this.edit = a;
this.collision_hash = b;
this.cnt = c;
this.arr = d
};
cljs.core.HashCollisionNode.cljs$lang$type = !0;
cljs.core.HashCollisionNode.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/HashCollisionNode")
};
cljs.core.HashCollisionNode.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/HashCollisionNode")
};
cljs.core.HashCollisionNode.prototype.inode_assoc_BANG_ = function(a, b, c, d, e, f) {
if(c === this.collision_hash) {
b = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, d);
if(-1 === b) {
if(this.arr.length > 2 * this.cnt) {
return a = cljs.core.edit_and_set.call(null, this, a, 2 * this.cnt, d, 2 * this.cnt + 1, e), f.val = !0, a.cnt += 1, a
}
b = this.arr.length;
c = cljs.core.make_array.call(null, b + 2);
cljs.core.array_copy.call(null, this.arr, 0, c, 0, b);
c[b] = d;
c[b + 1] = e;
f.val = !0;
return this.ensure_editable_array(a, this.cnt + 1, c)
}
return this.arr[b + 1] === e ? this : cljs.core.edit_and_set.call(null, this, a, b + 1, e)
}
return(new cljs.core.BitmapIndexedNode(a, 1 << (this.collision_hash >>> b & 31), [null, this, null, null])).inode_assoc_BANG_(a, b, c, d, e, f)
};
cljs.core.HashCollisionNode.prototype.inode_seq = function() {
return cljs.core.create_inode_seq.call(null, this.arr)
};
cljs.core.HashCollisionNode.prototype.inode_without_BANG_ = function(a, b, c, d, e) {
b = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, d);
if(-1 === b) {
return this
}
e[0] = !0;
if(1 === this.cnt) {
return null
}
a = this.ensure_editable(a);
e = a.arr;
e[b] = e[2 * this.cnt - 2];
e[b + 1] = e[2 * this.cnt - 1];
e[2 * this.cnt - 1] = null;
e[2 * this.cnt - 2] = null;
a.cnt -= 1;
return a
};
cljs.core.HashCollisionNode.prototype.ensure_editable = function(a) {
if(a === this.edit) {
return this
}
var b = cljs.core.make_array.call(null, 2 * (this.cnt + 1));
cljs.core.array_copy.call(null, this.arr, 0, b, 0, 2 * this.cnt);
return new cljs.core.HashCollisionNode(a, this.collision_hash, this.cnt, b)
};
cljs.core.HashCollisionNode.prototype.kv_reduce = function(a, b) {
return cljs.core.inode_kv_reduce.call(null, this.arr, a, b)
};
cljs.core.HashCollisionNode.prototype.inode_find = function(a, b, c, d) {
a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c);
return 0 > a ? d : cljs.core.key_test.call(null, c, this.arr[a]) ? cljs.core.PersistentVector.fromArray([this.arr[a], this.arr[a + 1]], !0) : d
};
cljs.core.HashCollisionNode.prototype.inode_without = function(a, b, c) {
a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c);
return-1 === a ? this : 1 === this.cnt ? null : new cljs.core.HashCollisionNode(null, this.collision_hash, this.cnt - 1, cljs.core.remove_pair.call(null, this.arr, cljs.core.quot.call(null, a, 2)))
};
cljs.core.HashCollisionNode.prototype.inode_assoc = function(a, b, c, d, e) {
return b === this.collision_hash ? (a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c), -1 === a ? (a = this.arr.length, b = cljs.core.make_array.call(null, a + 2), cljs.core.array_copy.call(null, this.arr, 0, b, 0, a), b[a] = c, b[a + 1] = d, e.val = !0, new cljs.core.HashCollisionNode(null, this.collision_hash, this.cnt + 1, b)) : cljs.core._EQ_.call(null, this.arr[a], d) ? this : new cljs.core.HashCollisionNode(null, this.collision_hash, this.cnt, cljs.core.clone_and_set.call(null,
this.arr, a + 1, d))) : (new cljs.core.BitmapIndexedNode(null, 1 << (this.collision_hash >>> a & 31), [null, this])).inode_assoc(a, b, c, d, e)
};
cljs.core.HashCollisionNode.prototype.inode_lookup = function(a, b, c, d) {
a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c);
return 0 > a ? d : cljs.core.key_test.call(null, c, this.arr[a]) ? this.arr[a + 1] : d
};
cljs.core.HashCollisionNode.prototype.ensure_editable_array = function(a, b, c) {
return a === this.edit ? (this.arr = c, this.cnt = b, this) : new cljs.core.HashCollisionNode(this.edit, this.collision_hash, b, c)
};
cljs.core.create_node = function() {
var a = null, b = function(a, b, c, g, h, i) {
var j = cljs.core.hash.call(null, b);
if(j === g) {
return new cljs.core.HashCollisionNode(null, j, 2, [b, c, h, i])
}
var k = new cljs.core.Box(!1);
return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a, j, b, c, k).inode_assoc(a, g, h, i, k)
}, c = function(a, b, c, g, h, i, j) {
var k = cljs.core.hash.call(null, c);
if(k === h) {
return new cljs.core.HashCollisionNode(null, k, 2, [c, g, i, j])
}
var m = new cljs.core.Box(!1);
return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b, k, c, g, m).inode_assoc_BANG_(a, b, h, i, j, m)
}, a = function(a, e, f, g, h, i, j) {
switch(arguments.length) {
case 6:
return b.call(this, a, e, f, g, h, i);
case 7:
return c.call(this, a, e, f, g, h, i, j)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$6 = b;
a.cljs$lang$arity$7 = c;
return a
}();
cljs.core.NodeSeq = function(a, b, c, d, e) {
this.meta = a;
this.nodes = b;
this.i = c;
this.s = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31850572
};
cljs.core.NodeSeq.cljs$lang$type = !0;
cljs.core.NodeSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/NodeSeq")
};
cljs.core.NodeSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/NodeSeq")
};
cljs.core.NodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.NodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.NodeSeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.NodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return null == this.s ? cljs.core.PersistentVector.fromArray([this.nodes[this.i], this.nodes[this.i + 1]], !0) : cljs.core.first.call(null, this.s)
};
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return null == this.s ? cljs.core.create_inode_seq.call(null, this.nodes, this.i + 2, null) : cljs.core.create_inode_seq.call(null, this.nodes, this.i, cljs.core.next.call(null, this.s))
};
cljs.core.NodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.NodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.NodeSeq(b, this.nodes, this.i, this.s, this.__hash)
};
cljs.core.NodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.NodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.create_inode_seq = function() {
var a = null, b = function(b) {
return a.call(null, b, 0, null)
}, c = function(a, b, c) {
if(null == c) {
for(c = a.length;;) {
if(b < c) {
if(null != a[b]) {
return new cljs.core.NodeSeq(null, a, b, null, null)
}
var g = a[b + 1];
if(cljs.core.truth_(g) && (g = g.inode_seq(), cljs.core.truth_(g))) {
return new cljs.core.NodeSeq(null, a, b + 2, g, null)
}
b += 2
}else {
return null
}
}
}else {
return new cljs.core.NodeSeq(null, a, b, c, null)
}
}, a = function(a, e, f) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.ArrayNodeSeq = function(a, b, c, d, e) {
this.meta = a;
this.nodes = b;
this.i = c;
this.s = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31850572
};
cljs.core.ArrayNodeSeq.cljs$lang$type = !0;
cljs.core.ArrayNodeSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/ArrayNodeSeq")
};
cljs.core.ArrayNodeSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/ArrayNodeSeq")
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.ArrayNodeSeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return cljs.core.first.call(null, this.s)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
return cljs.core.create_array_node_seq.call(null, null, this.nodes, this.i, cljs.core.next.call(null, this.s))
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.ArrayNodeSeq(b, this.nodes, this.i, this.s, this.__hash)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.create_array_node_seq = function() {
var a = null, b = function(b) {
return a.call(null, null, b, 0, null)
}, c = function(a, b, c, g) {
if(null == g) {
for(g = b.length;;) {
if(c < g) {
var h = b[c];
if(cljs.core.truth_(h) && (h = h.inode_seq(), cljs.core.truth_(h))) {
return new cljs.core.ArrayNodeSeq(a, b, c + 1, h, null)
}
c += 1
}else {
return null
}
}
}else {
return new cljs.core.ArrayNodeSeq(a, b, c, g, null)
}
}, a = function(a, e, f, g) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 4:
return c.call(this, a, e, f, g)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$4 = c;
return a
}();
cljs.core.PersistentHashMap = function(a, b, c, d, e, f) {
this.meta = a;
this.cnt = b;
this.root = c;
this.has_nil_QMARK_ = d;
this.nil_val = e;
this.__hash = f;
this.cljs$lang$protocol_mask$partition1$ = 4;
this.cljs$lang$protocol_mask$partition0$ = 16123663
};
cljs.core.PersistentHashMap.cljs$lang$type = !0;
cljs.core.PersistentHashMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentHashMap")
};
cljs.core.PersistentHashMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentHashMap")
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function() {
return new cljs.core.TransientHashMap({}, this.root, this.cnt, this.has_nil_QMARK_, this.nil_val)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_imap.call(null, a)
};
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return null == b ? this.has_nil_QMARK_ ? this.nil_val : c : null == this.root ? c : this.root.inode_lookup(0, cljs.core.hash.call(null, b), b, c)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
if(null == b) {
var d;
d = (d = this.has_nil_QMARK_) ? c === this.nil_val : d;
return d ? a : new cljs.core.PersistentHashMap(this.meta, this.has_nil_QMARK_ ? this.cnt : this.cnt + 1, this.root, !0, c, null)
}
d = new cljs.core.Box(!1);
c = (null == this.root ? cljs.core.BitmapIndexedNode.EMPTY : this.root).inode_assoc(0, cljs.core.hash.call(null, b), b, c, d);
return c === this.root ? a : new cljs.core.PersistentHashMap(this.meta, d.val ? this.cnt + 1 : this.cnt, c, this.has_nil_QMARK_, this.nil_val, null)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
return null == b ? this.has_nil_QMARK_ : null == this.root ? !1 : this.root.inode_lookup(0, cljs.core.hash.call(null, b), b, cljs.core.lookup_sentinel) !== cljs.core.lookup_sentinel
};
cljs.core.PersistentHashMap.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.PersistentHashMap.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.PersistentHashMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
a = this.has_nil_QMARK_ ? b.call(null, c, null, this.nil_val) : c;
return cljs.core.reduced_QMARK_.call(null, a) ? cljs.core.deref.call(null, a) : null != this.root ? this.root.kv_reduce(b, a) : a
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.vector_QMARK_.call(null, b) ? a.cljs$core$IAssociative$_assoc$arity$3(a, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, a, b)
};
cljs.core.PersistentHashMap.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentHashMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
if(0 < this.cnt) {
var a = null != this.root ? this.root.inode_seq() : null;
return this.has_nil_QMARK_ ? cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([null, this.nil_val], !0), a) : a
}
return null
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.cnt
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_map.call(null, a, b)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentHashMap(b, this.cnt, this.root, this.has_nil_QMARK_, this.nil_val, this.__hash)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core._with_meta.call(null, cljs.core.PersistentHashMap.EMPTY, this.meta)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
if(null == b) {
return this.has_nil_QMARK_ ? new cljs.core.PersistentHashMap(this.meta, this.cnt - 1, this.root, !1, null, null) : a
}
if(null == this.root) {
return a
}
var c = this.root.inode_without(0, cljs.core.hash.call(null, b), b);
return c === this.root ? a : new cljs.core.PersistentHashMap(this.meta, this.cnt - 1, c, this.has_nil_QMARK_, this.nil_val, null)
};
cljs.core.PersistentHashMap.EMPTY = new cljs.core.PersistentHashMap(null, 0, null, !1, null, 0);
cljs.core.PersistentHashMap.fromArrays = function(a, b) {
for(var c = a.length, d = 0, e = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);;) {
if(d < c) {
var f = d + 1, e = cljs.core.assoc_BANG_.call(null, e, a[d], b[d]), d = f
}else {
return cljs.core.persistent_BANG_.call(null, e)
}
}
};
cljs.core.TransientHashMap = function(a, b, c, d, e) {
this.edit = a;
this.root = b;
this.count = c;
this.has_nil_QMARK_ = d;
this.nil_val = e;
this.cljs$lang$protocol_mask$partition1$ = 56;
this.cljs$lang$protocol_mask$partition0$ = 258
};
cljs.core.TransientHashMap.cljs$lang$type = !0;
cljs.core.TransientHashMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/TransientHashMap")
};
cljs.core.TransientHashMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/TransientHashMap")
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(a, b) {
return a.without_BANG_(b)
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(a, b, c) {
return a.assoc_BANG_(b, c)
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
return a.conj_BANG_(b)
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(a) {
return a.persistent_BANG_()
};
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return null == b ? this.has_nil_QMARK_ ? this.nil_val : null : null == this.root ? null : this.root.inode_lookup(0, cljs.core.hash.call(null, b), b)
};
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return null == b ? this.has_nil_QMARK_ ? this.nil_val : c : null == this.root ? c : this.root.inode_lookup(0, cljs.core.hash.call(null, b), b, c)
};
cljs.core.TransientHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
if(this.edit) {
return this.count
}
throw Error("count after persistent!");
};
cljs.core.TransientHashMap.prototype.conj_BANG_ = function(a) {
if(this.edit) {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 2048) ? b : a.cljs$core$IMapEntry$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.IMapEntry, a);
if(b) {
return this.assoc_BANG_(cljs.core.key.call(null, a), cljs.core.val.call(null, a))
}
a = cljs.core.seq.call(null, a);
for(b = this;;) {
var c = cljs.core.first.call(null, a);
if(cljs.core.truth_(c)) {
a = cljs.core.next.call(null, a), b = b.assoc_BANG_(cljs.core.key.call(null, c), cljs.core.val.call(null, c))
}else {
return b
}
}
}else {
throw Error("conj! after persistent");
}
};
cljs.core.TransientHashMap.prototype.assoc_BANG_ = function(a, b) {
if(this.edit) {
if(null == a) {
this.nil_val !== b && (this.nil_val = b), this.has_nil_QMARK_ || (this.count += 1, this.has_nil_QMARK_ = !0)
}else {
var c = new cljs.core.Box(!1), d = (null == this.root ? cljs.core.BitmapIndexedNode.EMPTY : this.root).inode_assoc_BANG_(this.edit, 0, cljs.core.hash.call(null, a), a, b, c);
d !== this.root && (this.root = d);
c.val && (this.count += 1)
}
return this
}
throw Error("assoc! after persistent!");
};
cljs.core.TransientHashMap.prototype.without_BANG_ = function(a) {
if(this.edit) {
if(null == a) {
this.has_nil_QMARK_ && (this.has_nil_QMARK_ = !1, this.nil_val = null, this.count -= 1)
}else {
if(null != this.root) {
var b = new cljs.core.Box(!1), a = this.root.inode_without_BANG_(this.edit, 0, cljs.core.hash.call(null, a), a, b);
a !== this.root && (this.root = a);
cljs.core.truth_(b[0]) && (this.count -= 1)
}
}
return this
}
throw Error("dissoc! after persistent!");
};
cljs.core.TransientHashMap.prototype.persistent_BANG_ = function() {
if(this.edit) {
return this.edit = null, new cljs.core.PersistentHashMap(null, this.count, this.root, this.has_nil_QMARK_, this.nil_val, null)
}
throw Error("persistent! called twice");
};
cljs.core.tree_map_seq_push = function(a, b, c) {
for(var d = b;;) {
if(null != a) {
b = c ? a.left : a.right, d = cljs.core.conj.call(null, d, a), a = b
}else {
return d
}
}
};
cljs.core.PersistentTreeMapSeq = function(a, b, c, d, e) {
this.meta = a;
this.stack = b;
this.ascending_QMARK_ = c;
this.cnt = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 31850574
};
cljs.core.PersistentTreeMapSeq.cljs$lang$type = !0;
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentTreeMapSeq")
};
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentTreeMapSeq")
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.PersistentTreeMapSeq.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return a
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
return 0 > this.cnt ? cljs.core.count.call(null, cljs.core.next.call(null, a)) + 1 : this.cnt
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return cljs.core.peek.call(null, this.stack)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function() {
var a = cljs.core.first.call(null, this.stack), a = cljs.core.tree_map_seq_push.call(null, this.ascending_QMARK_ ? a.right : a.left, cljs.core.next.call(null, this.stack), this.ascending_QMARK_);
return null != a ? new cljs.core.PersistentTreeMapSeq(null, a, this.ascending_QMARK_, this.cnt - 1, null) : cljs.core.List.EMPTY
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentTreeMapSeq(b, this.stack, this.ascending_QMARK_, this.cnt, this.__hash)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.create_tree_map_seq = function(a, b, c) {
return new cljs.core.PersistentTreeMapSeq(null, cljs.core.tree_map_seq_push.call(null, a, null, b), b, c, null)
};
cljs.core.balance_left = function(a, b, c, d) {
return cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c) ? cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c.left) ? new cljs.core.RedNode(c.key, c.val, c.left.blacken(), new cljs.core.BlackNode(a, b, c.right, d, null), null) : cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c.right) ? new cljs.core.RedNode(c.right.key, c.right.val, new cljs.core.BlackNode(c.key, c.val, c.left, c.right.left, null), new cljs.core.BlackNode(a, b, c.right.right, d, null), null) : new cljs.core.BlackNode(a,
b, c, d, null) : new cljs.core.BlackNode(a, b, c, d, null)
};
cljs.core.balance_right = function(a, b, c, d) {
return cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d) ? cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d.right) ? new cljs.core.RedNode(d.key, d.val, new cljs.core.BlackNode(a, b, c, d.left, null), d.right.blacken(), null) : cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d.left) ? new cljs.core.RedNode(d.left.key, d.left.val, new cljs.core.BlackNode(a, b, c, d.left.left, null), new cljs.core.BlackNode(d.key, d.val, d.left.right, d.right, null), null) : new cljs.core.BlackNode(a,
b, c, d, null) : new cljs.core.BlackNode(a, b, c, d, null)
};
cljs.core.balance_left_del = function(a, b, c, d) {
if(cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c)) {
return new cljs.core.RedNode(a, b, c.blacken(), d, null)
}
if(cljs.core.instance_QMARK_.call(null, cljs.core.BlackNode, d)) {
return cljs.core.balance_right.call(null, a, b, c, d.redden())
}
var e;
e = (e = cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d)) ? cljs.core.instance_QMARK_.call(null, cljs.core.BlackNode, d.left) : e;
if(e) {
return new cljs.core.RedNode(d.left.key, d.left.val, new cljs.core.BlackNode(a, b, c, d.left.left, null), cljs.core.balance_right.call(null, d.key, d.val, d.left.right, d.right.redden()), null)
}
throw Error("red-black tree invariant violation");
};
cljs.core.balance_right_del = function(a, b, c, d) {
if(cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d)) {
return new cljs.core.RedNode(a, b, c, d.blacken(), null)
}
if(cljs.core.instance_QMARK_.call(null, cljs.core.BlackNode, c)) {
return cljs.core.balance_left.call(null, a, b, c.redden(), d)
}
var e;
e = (e = cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c)) ? cljs.core.instance_QMARK_.call(null, cljs.core.BlackNode, c.right) : e;
if(e) {
return new cljs.core.RedNode(c.right.key, c.right.val, cljs.core.balance_left.call(null, c.key, c.val, c.left.redden(), c.right.left), new cljs.core.BlackNode(a, b, c.right.right, d, null), null)
}
throw Error("red-black tree invariant violation");
};
cljs.core.tree_map_kv_reduce = function tree_map_kv_reduce(b, c, d) {
d = c.call(null, d, b.key, b.val);
if(cljs.core.reduced_QMARK_.call(null, d)) {
return cljs.core.deref.call(null, d)
}
d = null != b.left ? tree_map_kv_reduce.call(null, b.left, c, d) : d;
if(cljs.core.reduced_QMARK_.call(null, d)) {
return cljs.core.deref.call(null, d)
}
b = null != b.right ? tree_map_kv_reduce.call(null, b.right, c, d) : d;
return cljs.core.reduced_QMARK_.call(null, b) ? cljs.core.deref.call(null, b) : b
};
cljs.core.BlackNode = function(a, b, c, d, e) {
this.key = a;
this.val = b;
this.left = c;
this.right = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 32402207
};
cljs.core.BlackNode.cljs$lang$type = !0;
cljs.core.BlackNode.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/BlackNode")
};
cljs.core.BlackNode.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/BlackNode")
};
cljs.core.BlackNode.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, null)
};
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
};
cljs.core.BlackNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
return cljs.core.assoc.call(null, cljs.core.PersistentVector.fromArray([this.key, this.val], !0), b, c)
};
cljs.core.BlackNode.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.BlackNode.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.BlackNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.PersistentVector.fromArray([this.key, this.val, b], !0)
};
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function() {
return this.key
};
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function() {
return this.val
};
cljs.core.BlackNode.prototype.add_right = function(a) {
return a.balance_right(this)
};
cljs.core.BlackNode.prototype.redden = function() {
return new cljs.core.RedNode(this.key, this.val, this.left, this.right, null)
};
cljs.core.BlackNode.prototype.remove_right = function(a) {
return cljs.core.balance_right_del.call(null, this.key, this.val, this.left, a)
};
cljs.core.BlackNode.prototype.replace = function(a, b, c, d) {
return new cljs.core.BlackNode(a, b, c, d, null)
};
cljs.core.BlackNode.prototype.kv_reduce = function(a, b) {
return cljs.core.tree_map_kv_reduce.call(null, this, a, b)
};
cljs.core.BlackNode.prototype.remove_left = function(a) {
return cljs.core.balance_left_del.call(null, this.key, this.val, a, this.right)
};
cljs.core.BlackNode.prototype.add_left = function(a) {
return a.balance_left(this)
};
cljs.core.BlackNode.prototype.balance_left = function(a) {
return new cljs.core.BlackNode(a.key, a.val, this, a.right, null)
};
cljs.core.BlackNode.prototype.toString = function() {
return function() {
switch(arguments.length) {
case 0:
return cljs.core.pr_str.call(null, this)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.BlackNode.prototype.balance_right = function(a) {
return new cljs.core.BlackNode(a.key, a.val, a.left, this, null)
};
cljs.core.BlackNode.prototype.blacken = function() {
return this
};
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.ci_reduce.call(null, a, b)
};
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.ci_reduce.call(null, a, b, c)
};
cljs.core.BlackNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
return cljs.core.list.call(null, this.key, this.val)
};
cljs.core.BlackNode.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return 2
};
cljs.core.BlackNode.prototype.cljs$core$IStack$_peek$arity$1 = function() {
return this.val
};
cljs.core.BlackNode.prototype.cljs$core$IStack$_pop$arity$1 = function() {
return cljs.core.PersistentVector.fromArray([this.key], !0)
};
cljs.core.BlackNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
return cljs.core._assoc_n.call(null, cljs.core.PersistentVector.fromArray([this.key, this.val], !0), b, c)
};
cljs.core.BlackNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.BlackNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.fromArray([this.key, this.val], !0), b)
};
cljs.core.BlackNode.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return null
};
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return 0 === b ? this.key : 1 === b ? this.val : null
};
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
return 0 === b ? this.key : 1 === b ? this.val : c
};
cljs.core.BlackNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.PersistentVector.EMPTY
};
cljs.core.RedNode = function(a, b, c, d, e) {
this.key = a;
this.val = b;
this.left = c;
this.right = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 32402207
};
cljs.core.RedNode.cljs$lang$type = !0;
cljs.core.RedNode.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/RedNode")
};
cljs.core.RedNode.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/RedNode")
};
cljs.core.RedNode.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, null)
};
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return a.cljs$core$IIndexed$_nth$arity$3(a, b, c)
};
cljs.core.RedNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
return cljs.core.assoc.call(null, cljs.core.PersistentVector.fromArray([this.key, this.val], !0), b, c)
};
cljs.core.RedNode.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.RedNode.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.RedNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.PersistentVector.fromArray([this.key, this.val, b], !0)
};
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function() {
return this.key
};
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function() {
return this.val
};
cljs.core.RedNode.prototype.add_right = function(a) {
return new cljs.core.RedNode(this.key, this.val, this.left, a, null)
};
cljs.core.RedNode.prototype.redden = function() {
throw Error("red-black tree invariant violation");
};
cljs.core.RedNode.prototype.remove_right = function(a) {
return new cljs.core.RedNode(this.key, this.val, this.left, a, null)
};
cljs.core.RedNode.prototype.replace = function(a, b, c, d) {
return new cljs.core.RedNode(a, b, c, d, null)
};
cljs.core.RedNode.prototype.kv_reduce = function(a, b) {
return cljs.core.tree_map_kv_reduce.call(null, this, a, b)
};
cljs.core.RedNode.prototype.remove_left = function(a) {
return new cljs.core.RedNode(this.key, this.val, a, this.right, null)
};
cljs.core.RedNode.prototype.add_left = function(a) {
return new cljs.core.RedNode(this.key, this.val, a, this.right, null)
};
cljs.core.RedNode.prototype.balance_left = function(a) {
return cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, this.left) ? new cljs.core.RedNode(this.key, this.val, this.left.blacken(), new cljs.core.BlackNode(a.key, a.val, this.right, a.right, null), null) : cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, this.right) ? new cljs.core.RedNode(this.right.key, this.right.val, new cljs.core.BlackNode(this.key, this.val, this.left, this.right.left, null), new cljs.core.BlackNode(a.key, a.val, this.right.right, a.right, null), null) : new cljs.core.BlackNode(a.key,
a.val, this, a.right, null)
};
cljs.core.RedNode.prototype.toString = function() {
return function() {
switch(arguments.length) {
case 0:
return cljs.core.pr_str.call(null, this)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.RedNode.prototype.balance_right = function(a) {
return cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, this.right) ? new cljs.core.RedNode(this.key, this.val, new cljs.core.BlackNode(a.key, a.val, a.left, this.left, null), this.right.blacken(), null) : cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, this.left) ? new cljs.core.RedNode(this.left.key, this.left.val, new cljs.core.BlackNode(a.key, a.val, a.left, this.left.left, null), new cljs.core.BlackNode(this.key, this.val, this.left.right, this.right, null), null) : new cljs.core.BlackNode(a.key,
a.val, a.left, this, null)
};
cljs.core.RedNode.prototype.blacken = function() {
return new cljs.core.BlackNode(this.key, this.val, this.left, this.right, null)
};
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.ci_reduce.call(null, a, b)
};
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.ci_reduce.call(null, a, b, c)
};
cljs.core.RedNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
return cljs.core.list.call(null, this.key, this.val)
};
cljs.core.RedNode.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return 2
};
cljs.core.RedNode.prototype.cljs$core$IStack$_peek$arity$1 = function() {
return this.val
};
cljs.core.RedNode.prototype.cljs$core$IStack$_pop$arity$1 = function() {
return cljs.core.PersistentVector.fromArray([this.key], !0)
};
cljs.core.RedNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
return cljs.core._assoc_n.call(null, cljs.core.PersistentVector.fromArray([this.key, this.val], !0), b, c)
};
cljs.core.RedNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.RedNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return cljs.core.with_meta.call(null, cljs.core.PersistentVector.fromArray([this.key, this.val], !0), b)
};
cljs.core.RedNode.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return null
};
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return 0 === b ? this.key : 1 === b ? this.val : null
};
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
return 0 === b ? this.key : 1 === b ? this.val : c
};
cljs.core.RedNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.PersistentVector.EMPTY
};
cljs.core.tree_map_add = function tree_map_add(b, c, d, e, f) {
if(null == c) {
return new cljs.core.RedNode(d, e, null, null, null)
}
var g = b.call(null, d, c.key);
if(0 === g) {
return f[0] = c, null
}
if(0 > g) {
return b = tree_map_add.call(null, b, c.left, d, e, f), null != b ? c.add_left(b) : null
}
b = tree_map_add.call(null, b, c.right, d, e, f);
return null != b ? c.add_right(b) : null
};
cljs.core.tree_map_append = function tree_map_append(b, c) {
if(null == b) {
return c
}
if(null == c) {
return b
}
if(cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, b)) {
if(cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c)) {
var d = tree_map_append.call(null, b.right, c.left);
return cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d) ? new cljs.core.RedNode(d.key, d.val, new cljs.core.RedNode(b.key, b.val, b.left, d.left, null), new cljs.core.RedNode(c.key, c.val, d.right, c.right, null), null) : new cljs.core.RedNode(b.key, b.val, b.left, new cljs.core.RedNode(c.key, c.val, d, c.right, null), null)
}
return new cljs.core.RedNode(b.key, b.val, b.left, tree_map_append.call(null, b.right, c), null)
}
if(cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, c)) {
return new cljs.core.RedNode(c.key, c.val, tree_map_append.call(null, b, c.left), c.right, null)
}
d = tree_map_append.call(null, b.right, c.left);
return cljs.core.instance_QMARK_.call(null, cljs.core.RedNode, d) ? new cljs.core.RedNode(d.key, d.val, new cljs.core.BlackNode(b.key, b.val, b.left, d.left, null), new cljs.core.BlackNode(c.key, c.val, d.right, c.right, null), null) : cljs.core.balance_left_del.call(null, b.key, b.val, b.left, new cljs.core.BlackNode(c.key, c.val, d, c.right, null))
};
cljs.core.tree_map_remove = function tree_map_remove(b, c, d, e) {
if(null != c) {
var f = b.call(null, d, c.key);
if(0 === f) {
return e[0] = c, cljs.core.tree_map_append.call(null, c.left, c.right)
}
if(0 > f) {
return b = tree_map_remove.call(null, b, c.left, d, e), e = (d = null != b) ? d : null != e[0], e ? cljs.core.instance_QMARK_.call(null, cljs.core.BlackNode, c.left) ? cljs.core.balance_left_del.call(null, c.key, c.val, b, c.right) : new cljs.core.RedNode(c.key, c.val, b, c.right, null) : null
}
b = tree_map_remove.call(null, b, c.right, d, e);
e = (d = null != b) ? d : null != e[0];
return e ? cljs.core.instance_QMARK_.call(null, cljs.core.BlackNode, c.right) ? cljs.core.balance_right_del.call(null, c.key, c.val, c.left, b) : new cljs.core.RedNode(c.key, c.val, c.left, b, null) : null
}
return null
};
cljs.core.tree_map_replace = function tree_map_replace(b, c, d, e) {
var f = c.key, g = b.call(null, d, f);
return 0 === g ? c.replace(f, e, c.left, c.right) : 0 > g ? c.replace(f, c.val, tree_map_replace.call(null, b, c.left, d, e), c.right) : c.replace(f, c.val, c.left, tree_map_replace.call(null, b, c.right, d, e))
};
cljs.core.PersistentTreeMap = function(a, b, c, d, e) {
this.comp = a;
this.tree = b;
this.cnt = c;
this.meta = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 418776847
};
cljs.core.PersistentTreeMap.cljs$lang$type = !0;
cljs.core.PersistentTreeMap.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentTreeMap")
};
cljs.core.PersistentTreeMap.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentTreeMap")
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_imap.call(null, a)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
a = a.entry_at(b);
return null != a ? a.val : c
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
var d = [null], e = cljs.core.tree_map_add.call(null, this.comp, this.tree, b, c, d);
return null == e ? (d = cljs.core.nth.call(null, d, 0), cljs.core._EQ_.call(null, c, d.val) ? a : new cljs.core.PersistentTreeMap(this.comp, cljs.core.tree_map_replace.call(null, this.comp, this.tree, b, c), this.cnt, this.meta, null)) : new cljs.core.PersistentTreeMap(this.comp, e.blacken(), this.cnt + 1, this.meta, null)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
return null != a.entry_at(b)
};
cljs.core.PersistentTreeMap.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.PersistentTreeMap.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
return null != this.tree ? cljs.core.tree_map_kv_reduce.call(null, this.tree, b, c) : c
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.vector_QMARK_.call(null, b) ? a.cljs$core$IAssociative$_assoc$arity$3(a, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, a, b)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IReversible$_rseq$arity$1 = function() {
return 0 < this.cnt ? cljs.core.create_tree_map_seq.call(null, this.tree, !1, this.cnt) : null
};
cljs.core.PersistentTreeMap.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentTreeMap.prototype.entry_at = function(a) {
for(var b = this.tree;;) {
if(null != b) {
var c = this.comp.call(null, a, b.key);
if(0 === c) {
return b
}
b = 0 > c ? b.left : b.right
}else {
return null
}
}
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(a, b) {
return 0 < this.cnt ? cljs.core.create_tree_map_seq.call(null, this.tree, b, this.cnt) : null
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(a, b, c) {
if(0 < this.cnt) {
for(var a = null, d = this.tree;;) {
if(null != d) {
var e = this.comp.call(null, b, d.key);
if(0 === e) {
return new cljs.core.PersistentTreeMapSeq(null, cljs.core.conj.call(null, a, d), c, -1, null)
}
cljs.core.truth_(c) ? 0 > e ? (a = cljs.core.conj.call(null, a, d), d = d.left) : d = d.right : 0 < e ? (a = cljs.core.conj.call(null, a, d), d = d.right) : d = d.left
}else {
return null == a ? null : new cljs.core.PersistentTreeMapSeq(null, a, c, -1, null)
}
}
}else {
return null
}
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(a, b) {
return cljs.core.key.call(null, b)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_comparator$arity$1 = function() {
return this.comp
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
return 0 < this.cnt ? cljs.core.create_tree_map_seq.call(null, this.tree, !0, this.cnt) : null
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return this.cnt
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_map.call(null, a, b)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentTreeMap(this.comp, this.tree, this.cnt, b, this.__hash)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.PersistentTreeMap.EMPTY, this.meta)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
var c = [null], d = cljs.core.tree_map_remove.call(null, this.comp, this.tree, b, c);
return null == d ? null == cljs.core.nth.call(null, c, 0) ? a : new cljs.core.PersistentTreeMap(this.comp, null, 0, this.meta, null) : new cljs.core.PersistentTreeMap(this.comp, d.blacken(), this.cnt - 1, this.meta, null)
};
cljs.core.PersistentTreeMap.EMPTY = new cljs.core.PersistentTreeMap(cljs.core.compare, null, 0, null, 0);
cljs.core.hash_map = function() {
var a = function(a) {
for(var a = cljs.core.seq.call(null, a), b = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);;) {
if(a) {
var e = cljs.core.nnext.call(null, a), b = cljs.core.assoc_BANG_.call(null, b, cljs.core.first.call(null, a), cljs.core.second.call(null, a)), a = e
}else {
return cljs.core.persistent_BANG_.call(null, b)
}
}
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.array_map = function() {
var a = function(a) {
return new cljs.core.PersistentArrayMap(null, cljs.core.quot.call(null, cljs.core.count.call(null, a), 2), cljs.core.apply.call(null, cljs.core.array, a), null)
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.obj_map = function() {
var a = function(a) {
for(var b = [], e = {}, a = cljs.core.seq.call(null, a);;) {
if(a) {
b.push(cljs.core.first.call(null, a)), e[cljs.core.first.call(null, a)] = cljs.core.second.call(null, a), a = cljs.core.nnext.call(null, a)
}else {
return cljs.core.ObjMap.fromObject.call(null, b, e)
}
}
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.sorted_map = function() {
var a = function(a) {
for(var a = cljs.core.seq.call(null, a), b = cljs.core.PersistentTreeMap.EMPTY;;) {
if(a) {
var e = cljs.core.nnext.call(null, a), b = cljs.core.assoc.call(null, b, cljs.core.first.call(null, a), cljs.core.second.call(null, a)), a = e
}else {
return b
}
}
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.sorted_map_by = function() {
var a = function(a, b) {
for(var e = cljs.core.seq.call(null, b), f = new cljs.core.PersistentTreeMap(cljs.core.fn__GT_comparator.call(null, a), null, 0, null, 0);;) {
if(e) {
var g = cljs.core.nnext.call(null, e), f = cljs.core.assoc.call(null, f, cljs.core.first.call(null, e), cljs.core.second.call(null, e)), e = g
}else {
return f
}
}
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.keys = function(a) {
return cljs.core.seq.call(null, cljs.core.map.call(null, cljs.core.first, a))
};
cljs.core.key = function(a) {
return cljs.core._key.call(null, a)
};
cljs.core.vals = function(a) {
return cljs.core.seq.call(null, cljs.core.map.call(null, cljs.core.second, a))
};
cljs.core.val = function(a) {
return cljs.core._val.call(null, a)
};
cljs.core.merge = function() {
var a = function(a) {
return cljs.core.truth_(cljs.core.some.call(null, cljs.core.identity, a)) ? cljs.core.reduce.call(null, function(a, b) {
return cljs.core.conj.call(null, cljs.core.truth_(a) ? a : cljs.core.ObjMap.EMPTY, b)
}, a) : null
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.merge_with = function() {
var a = function(a, b) {
if(cljs.core.truth_(cljs.core.some.call(null, cljs.core.identity, b))) {
var e = function(b, d) {
var e = cljs.core.first.call(null, d), i = cljs.core.second.call(null, d);
return cljs.core.contains_QMARK_.call(null, b, e) ? cljs.core.assoc.call(null, b, e, a.call(null, cljs.core._lookup.call(null, b, e, null), i)) : cljs.core.assoc.call(null, b, e, i)
};
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.reduce.call(null, e, cljs.core.truth_(a) ? a : cljs.core.ObjMap.EMPTY, cljs.core.seq.call(null, b))
}, b)
}
return null
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.select_keys = function(a, b) {
for(var c = cljs.core.ObjMap.EMPTY, d = cljs.core.seq.call(null, b);;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core._lookup.call(null, a, e, "\ufdd0'cljs.core/not-found"), c = cljs.core.not_EQ_.call(null, f, "\ufdd0'cljs.core/not-found") ? cljs.core.assoc.call(null, c, e, f) : c, d = cljs.core.next.call(null, d)
}else {
return c
}
}
};
cljs.core.PersistentHashSet = function(a, b, c) {
this.meta = a;
this.hash_map = b;
this.__hash = c;
this.cljs$lang$protocol_mask$partition1$ = 4;
this.cljs$lang$protocol_mask$partition0$ = 15077647
};
cljs.core.PersistentHashSet.cljs$lang$type = !0;
cljs.core.PersistentHashSet.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentHashSet")
};
cljs.core.PersistentHashSet.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentHashSet")
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function() {
return new cljs.core.TransientHashSet(cljs.core.transient$.call(null, this.hash_map))
};
cljs.core.PersistentHashSet.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_iset.call(null, a)
};
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return cljs.core.truth_(cljs.core._contains_key_QMARK_.call(null, this.hash_map, b)) ? b : c
};
cljs.core.PersistentHashSet.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.PersistentHashSet.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return new cljs.core.PersistentHashSet(this.meta, cljs.core.assoc.call(null, this.hash_map, b, null), null)
};
cljs.core.PersistentHashSet.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentHashSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
return cljs.core.keys.call(null, this.hash_map)
};
cljs.core.PersistentHashSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(a, b) {
return new cljs.core.PersistentHashSet(this.meta, cljs.core.dissoc.call(null, this.hash_map, b), null)
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
return cljs.core.count.call(null, cljs.core.seq.call(null, a))
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
var c = cljs.core.set_QMARK_.call(null, b);
return c ? (c = cljs.core.count.call(null, a) === cljs.core.count.call(null, b)) ? cljs.core.every_QMARK_.call(null, function(b) {
return cljs.core.contains_QMARK_.call(null, a, b)
}, b) : c : c
};
cljs.core.PersistentHashSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentHashSet(b, this.hash_map, this.__hash)
};
cljs.core.PersistentHashSet.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.PersistentHashSet.EMPTY, this.meta)
};
cljs.core.PersistentHashSet.EMPTY = new cljs.core.PersistentHashSet(null, cljs.core.hash_map.call(null), 0);
cljs.core.PersistentHashSet.fromArray = function(a) {
for(var b = cljs.core.count.call(null, a), c = 0, d = cljs.core.transient$.call(null, cljs.core.PersistentHashSet.EMPTY);;) {
if(c < b) {
var e = c + 1, d = cljs.core.conj_BANG_.call(null, d, a[c]), c = e
}else {
return cljs.core.persistent_BANG_.call(null, d)
}
}
};
cljs.core.TransientHashSet = function(a) {
this.transient_map = a;
this.cljs$lang$protocol_mask$partition0$ = 259;
this.cljs$lang$protocol_mask$partition1$ = 136
};
cljs.core.TransientHashSet.cljs$lang$type = !0;
cljs.core.TransientHashSet.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/TransientHashSet")
};
cljs.core.TransientHashSet.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/TransientHashSet")
};
cljs.core.TransientHashSet.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
var e;
e = cljs.core._lookup.call(null, this.transient_map, c, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? null : c;
return e;
case 3:
return e = cljs.core._lookup.call(null, this.transient_map, c, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? d : c, e
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.TransientHashSet.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
return cljs.core._lookup.call(null, this.transient_map, b, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? c : b
};
cljs.core.TransientHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return cljs.core.count.call(null, this.transient_map)
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 = function(a, b) {
this.transient_map = cljs.core.dissoc_BANG_.call(null, this.transient_map, b);
return a
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
this.transient_map = cljs.core.assoc_BANG_.call(null, this.transient_map, b, null);
return a
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function() {
return new cljs.core.PersistentHashSet(null, cljs.core.persistent_BANG_.call(null, this.transient_map), null)
};
cljs.core.PersistentTreeSet = function(a, b, c) {
this.meta = a;
this.tree_map = b;
this.__hash = c;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 417730831
};
cljs.core.PersistentTreeSet.cljs$lang$type = !0;
cljs.core.PersistentTreeSet.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/PersistentTreeSet")
};
cljs.core.PersistentTreeSet.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/PersistentTreeSet")
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_iset.call(null, a)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
return a.cljs$core$ILookup$_lookup$arity$3(a, b, null)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
a = this.tree_map.entry_at(b);
return null != a ? a.key : c
};
cljs.core.PersistentTreeSet.prototype.call = function() {
var a = null;
return a = function(a, c, d) {
switch(arguments.length) {
case 2:
return this.cljs$core$ILookup$_lookup$arity$2(this, c);
case 3:
return this.cljs$core$ILookup$_lookup$arity$3(this, c, d)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.PersistentTreeSet.prototype.apply = function(a, b) {
a = this;
return a.call.apply(a, [a].concat(b.slice()))
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return new cljs.core.PersistentTreeSet(this.meta, cljs.core.assoc.call(null, this.tree_map, b, null), null)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IReversible$_rseq$arity$1 = function() {
return cljs.core.map.call(null, cljs.core.key, cljs.core.rseq.call(null, this.tree_map))
};
cljs.core.PersistentTreeSet.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(a, b) {
return cljs.core.map.call(null, cljs.core.key, cljs.core._sorted_seq.call(null, this.tree_map, b))
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(a, b, c) {
return cljs.core.map.call(null, cljs.core.key, cljs.core._sorted_seq_from.call(null, this.tree_map, b, c))
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(a, b) {
return b
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_comparator$arity$1 = function() {
return cljs.core._comparator.call(null, this.tree_map)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function() {
return cljs.core.keys.call(null, this.tree_map)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(a, b) {
return new cljs.core.PersistentTreeSet(this.meta, cljs.core.dissoc.call(null, this.tree_map, b), null)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICounted$_count$arity$1 = function() {
return cljs.core.count.call(null, this.tree_map)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
var c = cljs.core.set_QMARK_.call(null, b);
return c ? (c = cljs.core.count.call(null, a) === cljs.core.count.call(null, b)) ? cljs.core.every_QMARK_.call(null, function(b) {
return cljs.core.contains_QMARK_.call(null, a, b)
}, b) : c : c
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.PersistentTreeSet(b, this.tree_map, this.__hash)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.PersistentTreeSet.EMPTY, this.meta)
};
cljs.core.PersistentTreeSet.EMPTY = new cljs.core.PersistentTreeSet(null, cljs.core.sorted_map.call(null), 0);
cljs.core.hash_set = function() {
var a = null, b = function() {
return cljs.core.PersistentHashSet.EMPTY
}, c = function(a) {
for(var a = cljs.core.seq.call(null, a), b = cljs.core.transient$.call(null, cljs.core.PersistentHashSet.EMPTY);;) {
if(cljs.core.seq.call(null, a)) {
var c = cljs.core.next.call(null, a), b = cljs.core.conj_BANG_.call(null, b, cljs.core.first.call(null, a)), a = c
}else {
return cljs.core.persistent_BANG_.call(null, b)
}
}
}, d = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return c.call(this, b)
};
d.cljs$lang$maxFixedArity = 0;
d.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return c(a)
};
d.cljs$lang$arity$variadic = c;
a = function(a) {
switch(arguments.length) {
case 0:
return b.call(this);
default:
return d.cljs$lang$arity$variadic(cljs.core.array_seq(arguments, 0))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 0;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.set = function(a) {
return cljs.core.apply.call(null, cljs.core.hash_set, a)
};
cljs.core.sorted_set = function() {
var a = function(a) {
return cljs.core.reduce.call(null, cljs.core._conj, cljs.core.PersistentTreeSet.EMPTY, a)
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.sorted_set_by = function() {
var a = function(a, b) {
return cljs.core.reduce.call(null, cljs.core._conj, new cljs.core.PersistentTreeSet(null, cljs.core.sorted_map_by.call(null, a), 0), b)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.replace = function(a, b) {
if(cljs.core.vector_QMARK_.call(null, b)) {
var c = cljs.core.count.call(null, b);
return cljs.core.reduce.call(null, function(b, c) {
var f = cljs.core.find.call(null, a, cljs.core.nth.call(null, b, c));
return cljs.core.truth_(f) ? cljs.core.assoc.call(null, b, c, cljs.core.second.call(null, f)) : b
}, b, cljs.core.take.call(null, c, cljs.core.iterate.call(null, cljs.core.inc, 0)))
}
return cljs.core.map.call(null, function(b) {
var c = cljs.core.find.call(null, a, b);
return cljs.core.truth_(c) ? cljs.core.second.call(null, c) : b
}, b)
};
cljs.core.distinct = function(a) {
return function c(a, e) {
return new cljs.core.LazySeq(null, !1, function() {
return function(a, d) {
for(;;) {
var e = a, i = cljs.core.nth.call(null, e, 0, null);
if(e = cljs.core.seq.call(null, e)) {
if(cljs.core.contains_QMARK_.call(null, d, i)) {
i = cljs.core.rest.call(null, e), e = d, a = i, d = e
}else {
return cljs.core.cons.call(null, i, c.call(null, cljs.core.rest.call(null, e), cljs.core.conj.call(null, d, i)))
}
}else {
return null
}
}
}.call(null, a, e)
}, null)
}.call(null, a, cljs.core.PersistentHashSet.EMPTY)
};
cljs.core.butlast = function(a) {
for(var b = cljs.core.PersistentVector.EMPTY;;) {
if(cljs.core.next.call(null, a)) {
b = cljs.core.conj.call(null, b, cljs.core.first.call(null, a)), a = cljs.core.next.call(null, a)
}else {
return cljs.core.seq.call(null, b)
}
}
};
cljs.core.name = function(a) {
if(cljs.core.string_QMARK_.call(null, a)) {
return a
}
var b;
b = (b = cljs.core.keyword_QMARK_.call(null, a)) ? b : cljs.core.symbol_QMARK_.call(null, a);
if(b) {
return b = a.lastIndexOf("/", a.length - 2), 0 > b ? cljs.core.subs.call(null, a, 2) : cljs.core.subs.call(null, a, b + 1)
}
throw Error([cljs.core.str("Doesn't support name: "), cljs.core.str(a)].join(""));
};
cljs.core.namespace = function(a) {
var b;
b = (b = cljs.core.keyword_QMARK_.call(null, a)) ? b : cljs.core.symbol_QMARK_.call(null, a);
if(b) {
return b = a.lastIndexOf("/", a.length - 2), -1 < b ? cljs.core.subs.call(null, a, 2, b) : null
}
throw Error([cljs.core.str("Doesn't support namespace: "), cljs.core.str(a)].join(""));
};
cljs.core.zipmap = function(a, b) {
for(var c = cljs.core.ObjMap.EMPTY, d = cljs.core.seq.call(null, a), e = cljs.core.seq.call(null, b);;) {
var f;
f = (f = d) ? e : f;
if(f) {
c = cljs.core.assoc.call(null, c, cljs.core.first.call(null, d), cljs.core.first.call(null, e)), d = cljs.core.next.call(null, d), e = cljs.core.next.call(null, e)
}else {
return c
}
}
};
cljs.core.max_key = function() {
var a = null, b = function(a, b, c) {
return a.call(null, b) > a.call(null, c) ? b : c
}, c = function(b, c, d, h) {
return cljs.core.reduce.call(null, function(c, d) {
return a.call(null, b, c, d)
}, a.call(null, b, c, d), h)
}, d = function(a, b, d, h) {
var i = null;
goog.isDef(h) && (i = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return c.call(this, a, b, d, i)
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), h = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return c(b, d, h, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g, h) {
switch(arguments.length) {
case 2:
return c;
case 3:
return b.call(this, a, c, g);
default:
return d.cljs$lang$arity$variadic(a, c, g, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$2 = function(a, b) {
return b
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.min_key = function() {
var a = null, b = function(a, b, c) {
return a.call(null, b) < a.call(null, c) ? b : c
}, c = function(b, c, d, h) {
return cljs.core.reduce.call(null, function(c, d) {
return a.call(null, b, c, d)
}, a.call(null, b, c, d), h)
}, d = function(a, b, d, h) {
var i = null;
goog.isDef(h) && (i = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return c.call(this, a, b, d, i)
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), h = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return c(b, d, h, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g, h) {
switch(arguments.length) {
case 2:
return c;
case 3:
return b.call(this, a, c, g);
default:
return d.cljs$lang$arity$variadic(a, c, g, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$2 = function(a, b) {
return b
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.partition_all = function() {
var a = null, b = function(b, c) {
return a.call(null, b, b, c)
}, c = function(b, c, f) {
return new cljs.core.LazySeq(null, !1, function() {
var g = cljs.core.seq.call(null, f);
return g ? cljs.core.cons.call(null, cljs.core.take.call(null, b, g), a.call(null, b, c, cljs.core.drop.call(null, c, g))) : null
}, null)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.take_while = function take_while(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, c);
return d ? cljs.core.truth_(b.call(null, cljs.core.first.call(null, d))) ? cljs.core.cons.call(null, cljs.core.first.call(null, d), take_while.call(null, b, cljs.core.rest.call(null, d))) : null : null
}, null)
};
cljs.core.mk_bound_fn = function(a, b, c) {
return function(d) {
var e = cljs.core._comparator.call(null, a);
return b.call(null, e.call(null, cljs.core._entry_key.call(null, a, d), c), 0)
}
};
cljs.core.subseq = function() {
var a = null, b = function(a, b, c) {
var g = cljs.core.mk_bound_fn.call(null, a, b, c);
return cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._GT_, cljs.core._GT__EQ_]).call(null, b)) ? (a = cljs.core._sorted_seq_from.call(null, a, c, !0), cljs.core.truth_(a) ? (b = cljs.core.nth.call(null, a, 0, null), cljs.core.truth_(g.call(null, b)) ? a : cljs.core.next.call(null, a)) : null) : cljs.core.take_while.call(null, g, cljs.core._sorted_seq.call(null, a, !0))
}, c = function(a, b, c, g, h) {
var i = cljs.core._sorted_seq_from.call(null, a, c, !0);
if(cljs.core.truth_(i)) {
var j = cljs.core.nth.call(null, i, 0, null);
return cljs.core.take_while.call(null, cljs.core.mk_bound_fn.call(null, a, g, h), cljs.core.truth_(cljs.core.mk_bound_fn.call(null, a, b, c).call(null, j)) ? i : cljs.core.next.call(null, i))
}
return null
}, a = function(a, e, f, g, h) {
switch(arguments.length) {
case 3:
return b.call(this, a, e, f);
case 5:
return c.call(this, a, e, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$5 = c;
return a
}();
cljs.core.rsubseq = function() {
var a = null, b = function(a, b, c) {
var g = cljs.core.mk_bound_fn.call(null, a, b, c);
return cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._LT_, cljs.core._LT__EQ_]).call(null, b)) ? (a = cljs.core._sorted_seq_from.call(null, a, c, !1), cljs.core.truth_(a) ? (b = cljs.core.nth.call(null, a, 0, null), cljs.core.truth_(g.call(null, b)) ? a : cljs.core.next.call(null, a)) : null) : cljs.core.take_while.call(null, g, cljs.core._sorted_seq.call(null, a, !1))
}, c = function(a, b, c, g, h) {
var i = cljs.core._sorted_seq_from.call(null, a, h, !1);
if(cljs.core.truth_(i)) {
var j = cljs.core.nth.call(null, i, 0, null);
return cljs.core.take_while.call(null, cljs.core.mk_bound_fn.call(null, a, b, c), cljs.core.truth_(cljs.core.mk_bound_fn.call(null, a, g, h).call(null, j)) ? i : cljs.core.next.call(null, i))
}
return null
}, a = function(a, e, f, g, h) {
switch(arguments.length) {
case 3:
return b.call(this, a, e, f);
case 5:
return c.call(this, a, e, f, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$5 = c;
return a
}();
cljs.core.Range = function(a, b, c, d, e) {
this.meta = a;
this.start = b;
this.end = c;
this.step = d;
this.__hash = e;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 32375006
};
cljs.core.Range.cljs$lang$type = !0;
cljs.core.Range.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Range")
};
cljs.core.Range.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Range")
};
cljs.core.Range.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
var b = this.__hash;
return null != b ? b : this.__hash = a = cljs.core.hash_coll.call(null, a)
};
cljs.core.Range.prototype.cljs$core$INext$_next$arity$1 = function() {
return 0 < this.step ? this.start + this.step < this.end ? new cljs.core.Range(this.meta, this.start + this.step, this.end, this.step, null) : null : this.start + this.step > this.end ? new cljs.core.Range(this.meta, this.start + this.step, this.end, this.step, null) : null
};
cljs.core.Range.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
return cljs.core.cons.call(null, b, a)
};
cljs.core.Range.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
return cljs.core.ci_reduce.call(null, a, b)
};
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
return cljs.core.ci_reduce.call(null, a, b, c)
};
cljs.core.Range.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return 0 < this.step ? this.start < this.end ? a : null : this.start > this.end ? a : null
};
cljs.core.Range.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
return cljs.core.not.call(null, a.cljs$core$ISeqable$_seq$arity$1(a)) ? 0 : Math.ceil((this.end - this.start) / this.step)
};
cljs.core.Range.prototype.cljs$core$ISeq$_first$arity$1 = function() {
return this.start
};
cljs.core.Range.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
return null != a.cljs$core$ISeqable$_seq$arity$1(a) ? new cljs.core.Range(this.meta, this.start + this.step, this.end, this.step, null) : cljs.core.List.EMPTY
};
cljs.core.Range.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return cljs.core.equiv_sequential.call(null, a, b)
};
cljs.core.Range.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
return new cljs.core.Range(b, this.start, this.end, this.step, this.__hash)
};
cljs.core.Range.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
if(b < a.cljs$core$ICounted$_count$arity$1(a)) {
return this.start + b * this.step
}
var c;
c = (c = this.start > this.end) ? 0 === this.step : c;
if(c) {
return this.start
}
throw Error("Index out of bounds");
};
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
if(b < a.cljs$core$ICounted$_count$arity$1(a)) {
return this.start + b * this.step
}
a = (a = this.start > this.end) ? 0 === this.step : a;
return a ? this.start : c
};
cljs.core.Range.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function() {
return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta)
};
cljs.core.range = function() {
var a = null, b = function() {
return a.call(null, 0, Number.MAX_VALUE, 1)
}, c = function(b) {
return a.call(null, 0, b, 1)
}, d = function(b, c) {
return a.call(null, b, c, 1)
}, e = function(a, b, c) {
return new cljs.core.Range(null, a, b, c, null)
}, a = function(a, g, h) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return c.call(this, a);
case 2:
return d.call(this, a, g);
case 3:
return e.call(this, a, g, h)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = c;
a.cljs$lang$arity$2 = d;
a.cljs$lang$arity$3 = e;
return a
}();
cljs.core.take_nth = function take_nth(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, c);
return d ? cljs.core.cons.call(null, cljs.core.first.call(null, d), take_nth.call(null, b, cljs.core.drop.call(null, b, d))) : null
}, null)
};
cljs.core.split_with = function(a, b) {
return cljs.core.PersistentVector.fromArray([cljs.core.take_while.call(null, a, b), cljs.core.drop_while.call(null, a, b)], !0)
};
cljs.core.partition_by = function partition_by(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var d = cljs.core.seq.call(null, c);
if(d) {
var e = cljs.core.first.call(null, d), f = b.call(null, e), e = cljs.core.cons.call(null, e, cljs.core.take_while.call(null, function(c) {
return cljs.core._EQ_.call(null, f, b.call(null, c))
}, cljs.core.next.call(null, d)));
return cljs.core.cons.call(null, e, partition_by.call(null, b, cljs.core.seq.call(null, cljs.core.drop.call(null, cljs.core.count.call(null, e), d))))
}
return null
}, null)
};
cljs.core.frequencies = function(a) {
return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(a, c) {
return cljs.core.assoc_BANG_.call(null, a, c, cljs.core._lookup.call(null, a, c, 0) + 1)
}, cljs.core.transient$.call(null, cljs.core.ObjMap.EMPTY), a))
};
cljs.core.reductions = function() {
var a = null, b = function(b, c) {
return new cljs.core.LazySeq(null, !1, function() {
var f = cljs.core.seq.call(null, c);
return f ? a.call(null, b, cljs.core.first.call(null, f), cljs.core.rest.call(null, f)) : cljs.core.list.call(null, b.call(null))
}, null)
}, c = function(b, c, f) {
return cljs.core.cons.call(null, c, new cljs.core.LazySeq(null, !1, function() {
var g = cljs.core.seq.call(null, f);
return g ? a.call(null, b, b.call(null, c, cljs.core.first.call(null, g)), cljs.core.rest.call(null, g)) : null
}, null))
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.juxt = function() {
var a = null, b = function(a) {
var b = null, c = function(b, c, d, e) {
return cljs.core.vector.call(null, cljs.core.apply.call(null, a, b, c, d, e))
}, d = function(a, b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return c.call(this, a, b, d, f)
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), e = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return c(b, d, e, a)
};
d.cljs$lang$arity$variadic = c;
b = function(b, c, e, f) {
switch(arguments.length) {
case 0:
return cljs.core.vector.call(null, a.call(null));
case 1:
return cljs.core.vector.call(null, a.call(null, b));
case 2:
return cljs.core.vector.call(null, a.call(null, b, c));
case 3:
return cljs.core.vector.call(null, a.call(null, b, c, e));
default:
return d.cljs$lang$arity$variadic(b, c, e, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = d.cljs$lang$applyTo;
return b
}, c = function(a, b) {
var c = null, d = function(c, d, e, f) {
return cljs.core.vector.call(null, cljs.core.apply.call(null, a, c, d, e, f), cljs.core.apply.call(null, b, c, d, e, f))
}, e = function(a, b, c, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return d.call(this, a, b, c, f)
};
e.cljs$lang$maxFixedArity = 3;
e.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), e = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return d(b, c, e, a)
};
e.cljs$lang$arity$variadic = d;
c = function(c, d, f, i) {
switch(arguments.length) {
case 0:
return cljs.core.vector.call(null, a.call(null), b.call(null));
case 1:
return cljs.core.vector.call(null, a.call(null, c), b.call(null, c));
case 2:
return cljs.core.vector.call(null, a.call(null, c, d), b.call(null, c, d));
case 3:
return cljs.core.vector.call(null, a.call(null, c, d, f), b.call(null, c, d, f));
default:
return e.cljs$lang$arity$variadic(c, d, f, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
c.cljs$lang$maxFixedArity = 3;
c.cljs$lang$applyTo = e.cljs$lang$applyTo;
return c
}, d = function(a, b, c) {
var d = null, e = function(d, e, f, j) {
return cljs.core.vector.call(null, cljs.core.apply.call(null, a, d, e, f, j), cljs.core.apply.call(null, b, d, e, f, j), cljs.core.apply.call(null, c, d, e, f, j))
}, f = function(a, b, c, d) {
var f = null;
goog.isDef(d) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return e.call(this, a, b, c, f)
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return e(b, c, d, a)
};
f.cljs$lang$arity$variadic = e;
d = function(d, e, j, k) {
switch(arguments.length) {
case 0:
return cljs.core.vector.call(null, a.call(null), b.call(null), c.call(null));
case 1:
return cljs.core.vector.call(null, a.call(null, d), b.call(null, d), c.call(null, d));
case 2:
return cljs.core.vector.call(null, a.call(null, d, e), b.call(null, d, e), c.call(null, d, e));
case 3:
return cljs.core.vector.call(null, a.call(null, d, e, j), b.call(null, d, e, j), c.call(null, d, e, j));
default:
return f.cljs$lang$arity$variadic(d, e, j, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
d.cljs$lang$maxFixedArity = 3;
d.cljs$lang$applyTo = f.cljs$lang$applyTo;
return d
}, e = function(a, b, c, d) {
var e = cljs.core.list_STAR_.call(null, a, b, c, d), a = null, f = function(a, b, c, d) {
return cljs.core.reduce.call(null, function(e, f) {
return cljs.core.conj.call(null, e, cljs.core.apply.call(null, f, a, b, c, d))
}, cljs.core.PersistentVector.EMPTY, e)
}, l = function(a, b, c, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return f.call(this, a, b, c, e)
};
l.cljs$lang$maxFixedArity = 3;
l.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return f(b, c, d, a)
};
l.cljs$lang$arity$variadic = f;
a = function(a, b, c, d) {
switch(arguments.length) {
case 0:
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.conj.call(null, a, b.call(null))
}, cljs.core.PersistentVector.EMPTY, e);
case 1:
var f = a;
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.conj.call(null, a, b.call(null, f))
}, cljs.core.PersistentVector.EMPTY, e);
case 2:
var g = a, h = b;
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.conj.call(null, a, b.call(null, g, h))
}, cljs.core.PersistentVector.EMPTY, e);
case 3:
var i = a, j = b, m = c;
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.conj.call(null, a, b.call(null, i, j, m))
}, cljs.core.PersistentVector.EMPTY, e);
default:
return l.cljs$lang$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = l.cljs$lang$applyTo;
return a
}, f = function(a, b, c, d) {
var f = null;
goog.isDef(d) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return e.call(this, a, b, c, f)
};
f.cljs$lang$maxFixedArity = 3;
f.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), a = cljs.core.rest(cljs.core.next(cljs.core.next(a)));
return e(b, c, d, a)
};
f.cljs$lang$arity$variadic = e;
a = function(a, e, i, j) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e);
case 3:
return d.call(this, a, e, i);
default:
return f.cljs$lang$arity$variadic(a, e, i, cljs.core.array_seq(arguments, 3))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 3;
a.cljs$lang$applyTo = f.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$3 = d;
a.cljs$lang$arity$variadic = f.cljs$lang$arity$variadic;
return a
}();
cljs.core.dorun = function() {
var a = null, b = function(a) {
for(;;) {
if(cljs.core.seq.call(null, a)) {
a = cljs.core.next.call(null, a)
}else {
return null
}
}
}, c = function(a, b) {
for(;;) {
if(cljs.core.truth_(function() {
var c = cljs.core.seq.call(null, b);
return c ? 0 < a : c
}())) {
var c = a - 1, g = cljs.core.next.call(null, b), a = c, b = g
}else {
return null
}
}
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.doall = function() {
var a = null, b = function(a) {
cljs.core.dorun.call(null, a);
return a
}, c = function(a, b) {
cljs.core.dorun.call(null, a, b);
return b
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.regexp_QMARK_ = function(a) {
return a instanceof RegExp
};
cljs.core.re_matches = function(a, b) {
var c = a.exec(b);
return cljs.core._EQ_.call(null, cljs.core.first.call(null, c), b) ? 1 === cljs.core.count.call(null, c) ? cljs.core.first.call(null, c) : cljs.core.vec.call(null, c) : null
};
cljs.core.re_find = function(a, b) {
var c = a.exec(b);
return null == c ? null : 1 === cljs.core.count.call(null, c) ? cljs.core.first.call(null, c) : cljs.core.vec.call(null, c)
};
cljs.core.re_seq = function re_seq(b, c) {
var d = cljs.core.re_find.call(null, b, c), e = c.search(b), f = cljs.core.coll_QMARK_.call(null, d) ? cljs.core.first.call(null, d) : d, g = cljs.core.subs.call(null, c, e + cljs.core.count.call(null, f));
return cljs.core.truth_(d) ? new cljs.core.LazySeq(null, !1, function() {
return cljs.core.cons.call(null, d, re_seq.call(null, b, g))
}, null) : null
};
cljs.core.re_pattern = function(a) {
var b = cljs.core.re_find.call(null, /^(?:\(\?([idmsux]*)\))?(.*)/, a);
cljs.core.nth.call(null, b, 0, null);
a = cljs.core.nth.call(null, b, 1, null);
b = cljs.core.nth.call(null, b, 2, null);
return RegExp(b, a)
};
cljs.core.pr_sequential = function(a, b, c, d, e, f) {
return cljs.core.concat.call(null, cljs.core.PersistentVector.fromArray([b], !0), cljs.core.flatten1.call(null, cljs.core.interpose.call(null, cljs.core.PersistentVector.fromArray([c], !0), cljs.core.map.call(null, function(b) {
return a.call(null, b, e)
}, f))), cljs.core.PersistentVector.fromArray([d], !0))
};
cljs.core.pr_sequential_writer = function(a, b, c, d, e, f, g) {
cljs.core._write.call(null, a, c);
cljs.core.seq.call(null, g) && b.call(null, cljs.core.first.call(null, g), a, f);
for(c = cljs.core.seq.call(null, cljs.core.next.call(null, g));;) {
if(c) {
g = cljs.core.first.call(null, c), cljs.core._write.call(null, a, d), b.call(null, g, a, f), c = cljs.core.next.call(null, c)
}else {
break
}
}
return cljs.core._write.call(null, a, e)
};
cljs.core.write_all = function() {
var a = function(a, b) {
for(var e = cljs.core.seq.call(null, b);;) {
if(e) {
var f = cljs.core.first.call(null, e);
cljs.core._write.call(null, a, f);
e = cljs.core.next.call(null, e)
}else {
return null
}
}
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.string_print = function(a) {
cljs.core._STAR_print_fn_STAR_.call(null, a);
return null
};
cljs.core.flush = function() {
return null
};
cljs.core.StringBufferWriter = function(a) {
this.sb = a;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 1073741824
};
cljs.core.StringBufferWriter.cljs$lang$type = !0;
cljs.core.StringBufferWriter.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/StringBufferWriter")
};
cljs.core.StringBufferWriter.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/StringBufferWriter")
};
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_write$arity$2 = function(a, b) {
return this.sb.append(b)
};
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_flush$arity$1 = function() {
return null
};
cljs.core.pr_seq = function pr_seq(b, c) {
return null == b ? cljs.core.list.call(null, "nil") : void 0 === b ? cljs.core.list.call(null, "#<undefined>") : cljs.core.concat.call(null, cljs.core.truth_(function() {
var d = cljs.core._lookup.call(null, c, "\ufdd0'meta", null);
return cljs.core.truth_(d) ? (b ? (d = (d = b.cljs$lang$protocol_mask$partition0$ & 131072) ? d : b.cljs$core$IMeta$, d = d ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IMeta, b)) : d = cljs.core.type_satisfies_.call(null, cljs.core.IMeta, b), cljs.core.truth_(d) ? cljs.core.meta.call(null, b) : d) : d
}()) ? cljs.core.concat.call(null, cljs.core.PersistentVector.fromArray(["^"], !0), pr_seq.call(null, cljs.core.meta.call(null, b), c), cljs.core.PersistentVector.fromArray([" "], !0)) : null, function() {
var c = null != b;
return c ? b.cljs$lang$type : c
}() ? b.cljs$lang$ctorPrSeq(b) : function() {
if(b) {
var c;
c = (c = b.cljs$lang$protocol_mask$partition0$ & 536870912) ? c : b.cljs$core$IPrintable$;
return c ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IPrintable, b)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IPrintable, b)
}() ? cljs.core._pr_seq.call(null, b, c) : cljs.core.truth_(cljs.core.regexp_QMARK_.call(null, b)) ? cljs.core.list.call(null, '#"', b.source, '"') : cljs.core.list.call(null, "#<", "" + cljs.core.str(b), ">"))
};
cljs.core.pr_writer = function pr_writer(b, c, d) {
if(null == b) {
return cljs.core._write.call(null, c, "nil")
}
if(void 0 === b) {
return cljs.core._write.call(null, c, "#<undefined>")
}
cljs.core.truth_(function() {
var c = cljs.core._lookup.call(null, d, "\ufdd0'meta", null);
return cljs.core.truth_(c) ? (b ? (c = (c = b.cljs$lang$protocol_mask$partition0$ & 131072) ? c : b.cljs$core$IMeta$, c = c ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IMeta, b)) : c = cljs.core.type_satisfies_.call(null, cljs.core.IMeta, b), cljs.core.truth_(c) ? cljs.core.meta.call(null, b) : c) : c
}()) && (cljs.core._write.call(null, c, "^"), pr_writer.call(null, cljs.core.meta.call(null, b), c, d), cljs.core._write.call(null, c, " "));
var e;
e = (e = null != b) ? b.cljs$lang$type : e;
e ? c = b.cljs$lang$ctorPrWriter(b, c, d) : (b ? (e = (e = b.cljs$lang$protocol_mask$partition0$ & 2147483648) ? e : b.cljs$core$IPrintWithWriter$, e = e ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IPrintWithWriter, b)) : e = cljs.core.type_satisfies_.call(null, cljs.core.IPrintWithWriter, b), e ? c = cljs.core._pr_writer.call(null, b, c, d) : (b ? (e = (e = b.cljs$lang$protocol_mask$partition0$ & 536870912) ? e : b.cljs$core$IPrintable$, e =
e ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IPrintable, b)) : e = cljs.core.type_satisfies_.call(null, cljs.core.IPrintable, b), c = e ? cljs.core.apply.call(null, cljs.core.write_all, c, cljs.core._pr_seq.call(null, b, d)) : cljs.core.truth_(cljs.core.regexp_QMARK_.call(null, b)) ? cljs.core.write_all.call(null, c, '#"', b.source, '"') : cljs.core.write_all.call(null, c, "#<", "" + cljs.core.str(b), ">")));
return c
};
cljs.core.pr_seq_writer = function(a, b, c) {
cljs.core.pr_writer.call(null, cljs.core.first.call(null, a), b, c);
for(a = cljs.core.seq.call(null, cljs.core.next.call(null, a));;) {
if(a) {
var d = cljs.core.first.call(null, a);
cljs.core._write.call(null, b, " ");
cljs.core.pr_writer.call(null, d, b, c);
a = cljs.core.next.call(null, a)
}else {
return null
}
}
};
cljs.core.pr_sb_with_opts = function(a, b) {
var c = new goog.string.StringBuffer, d = new cljs.core.StringBufferWriter(c);
cljs.core.pr_seq_writer.call(null, a, d, b);
cljs.core._flush.call(null, d);
return c
};
cljs.core.pr_str_with_opts = function(a, b) {
return cljs.core.empty_QMARK_.call(null, a) ? "" : "" + cljs.core.str(cljs.core.pr_sb_with_opts.call(null, a, b))
};
cljs.core.prn_str_with_opts = function(a, b) {
if(cljs.core.empty_QMARK_.call(null, a)) {
return"\n"
}
var c = cljs.core.pr_sb_with_opts.call(null, a, b);
c.append("\n");
return"" + cljs.core.str(c)
};
cljs.core.pr_with_opts = function(a, b) {
return cljs.core.string_print.call(null, cljs.core.pr_str_with_opts.call(null, a, b))
};
cljs.core.newline = function(a) {
cljs.core.string_print.call(null, "\n");
return cljs.core.truth_(cljs.core._lookup.call(null, a, "\ufdd0'flush-on-newline", null)) ? cljs.core.flush.call(null) : null
};
cljs.core._STAR_flush_on_newline_STAR_ = !0;
cljs.core._STAR_print_readably_STAR_ = !0;
cljs.core._STAR_print_meta_STAR_ = !1;
cljs.core._STAR_print_dup_STAR_ = !1;
cljs.core.pr_opts = function() {
return cljs.core.ObjMap.fromObject(["\ufdd0'flush-on-newline", "\ufdd0'readably", "\ufdd0'meta", "\ufdd0'dup"], {"\ufdd0'flush-on-newline":cljs.core._STAR_flush_on_newline_STAR_, "\ufdd0'readably":cljs.core._STAR_print_readably_STAR_, "\ufdd0'meta":cljs.core._STAR_print_meta_STAR_, "\ufdd0'dup":cljs.core._STAR_print_dup_STAR_})
};
cljs.core.pr_str = function() {
var a = function(a) {
return cljs.core.pr_str_with_opts.call(null, a, cljs.core.pr_opts.call(null))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.prn_str = function() {
var a = function(a) {
return cljs.core.prn_str_with_opts.call(null, a, cljs.core.pr_opts.call(null))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.pr = function() {
var a = function(a) {
return cljs.core.pr_with_opts.call(null, a, cljs.core.pr_opts.call(null))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.print = function() {
var a = function(a) {
return cljs.core.pr_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0'readably", !1))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.print_str = function() {
var a = function(a) {
return cljs.core.pr_str_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0'readably", !1))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.println = function() {
var a = function(a) {
cljs.core.pr_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0'readably", !1));
return cljs.core.newline.call(null, cljs.core.pr_opts.call(null))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.println_str = function() {
var a = function(a) {
return cljs.core.prn_str_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), "\ufdd0'readably", !1))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.prn = function() {
var a = function(a) {
cljs.core.pr_with_opts.call(null, a, cljs.core.pr_opts.call(null));
return cljs.core.newline.call(null, cljs.core.pr_opts.call(null))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.printf = function() {
var a = function(a, b) {
return cljs.core.print.call(null, cljs.core.apply.call(null, cljs.core.format, a, b))
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.char_escapes = cljs.core.ObjMap.fromObject('"\\\b\f\n\r\t'.split(""), {'"':'\\"', "\\":"\\\\", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t"});
cljs.core.quote_string = function(a) {
return[cljs.core.str('"'), cljs.core.str(a.replace(RegExp('[\\\\"\b\f\n\r\t]', "g"), function(a) {
return cljs.core._lookup.call(null, cljs.core.char_escapes, a, null)
})), cljs.core.str('"')].join("")
};
cljs.core.HashMap.prototype.cljs$core$IPrintable$ = !0;
cljs.core.HashMap.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, function(a) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "", " ", "", b, a)
}, "{", ", ", "}", b, a)
};
cljs.core.IPrintable.number = !0;
cljs.core._pr_seq.number = function(a) {
return cljs.core.list.call(null, "" + cljs.core.str(a))
};
cljs.core.IndexedSeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.IndexedSeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.Subvec.prototype.cljs$core$IPrintable$ = !0;
cljs.core.Subvec.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "[", " ", "]", b, a)
};
cljs.core.ChunkedCons.prototype.cljs$core$IPrintable$ = !0;
cljs.core.ChunkedCons.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, function(a) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "", " ", "", b, a)
}, "{", ", ", "}", b, a)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, function(a) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "", " ", "", b, a)
}, "{", ", ", "}", b, a)
};
cljs.core.PersistentQueue.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentQueue.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "#queue [", " ", "]", b, cljs.core.seq.call(null, a))
};
cljs.core.LazySeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.LazySeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.RSeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.RSeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "#{", " ", "}", b, a)
};
cljs.core.IPrintable["boolean"] = !0;
cljs.core._pr_seq["boolean"] = function(a) {
return cljs.core.list.call(null, "" + cljs.core.str(a))
};
cljs.core.IPrintable.string = !0;
cljs.core._pr_seq.string = function(a, b) {
return cljs.core.keyword_QMARK_.call(null, a) ? cljs.core.list.call(null, [cljs.core.str(":"), cljs.core.str(function() {
var b = cljs.core.namespace.call(null, a);
return cljs.core.truth_(b) ? [cljs.core.str(b), cljs.core.str("/")].join("") : null
}()), cljs.core.str(cljs.core.name.call(null, a))].join("")) : cljs.core.symbol_QMARK_.call(null, a) ? cljs.core.list.call(null, [cljs.core.str(function() {
var b = cljs.core.namespace.call(null, a);
return cljs.core.truth_(b) ? [cljs.core.str(b), cljs.core.str("/")].join("") : null
}()), cljs.core.str(cljs.core.name.call(null, a))].join("")) : cljs.core.list.call(null, cljs.core.truth_((new cljs.core.Keyword("\ufdd0'readably")).call(null, b)) ? cljs.core.quote_string.call(null, a) : a)
};
cljs.core.NodeSeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.NodeSeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.RedNode.prototype.cljs$core$IPrintable$ = !0;
cljs.core.RedNode.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "[", " ", "]", b, a)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, function(a) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "", " ", "", b, a)
}, "{", ", ", "}", b, a)
};
cljs.core.Vector.prototype.cljs$core$IPrintable$ = !0;
cljs.core.Vector.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "[", " ", "]", b, a)
};
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "#{", " ", "}", b, a)
};
cljs.core.PersistentVector.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentVector.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "[", " ", "]", b, a)
};
cljs.core.List.prototype.cljs$core$IPrintable$ = !0;
cljs.core.List.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.IPrintable.array = !0;
cljs.core._pr_seq.array = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "#<Array [", ", ", "]>", b, a)
};
cljs.core.IPrintable["function"] = !0;
cljs.core._pr_seq["function"] = function(a) {
return cljs.core.list.call(null, "#<", "" + cljs.core.str(a), ">")
};
cljs.core.EmptyList.prototype.cljs$core$IPrintable$ = !0;
cljs.core.EmptyList.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function() {
return cljs.core.list.call(null, "()")
};
cljs.core.BlackNode.prototype.cljs$core$IPrintable$ = !0;
cljs.core.BlackNode.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "[", " ", "]", b, a)
};
Date.prototype.cljs$core$IPrintable$ = !0;
Date.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a) {
var b = function(a, b) {
for(var e = "" + cljs.core.str(a);;) {
if(cljs.core.count.call(null, e) < b) {
e = [cljs.core.str("0"), cljs.core.str(e)].join("")
}else {
return e
}
}
};
return cljs.core.list.call(null, [cljs.core.str('#inst "'), cljs.core.str(a.getUTCFullYear()), cljs.core.str("-"), cljs.core.str(b.call(null, a.getUTCMonth() + 1, 2)), cljs.core.str("-"), cljs.core.str(b.call(null, a.getUTCDate(), 2)), cljs.core.str("T"), cljs.core.str(b.call(null, a.getUTCHours(), 2)), cljs.core.str(":"), cljs.core.str(b.call(null, a.getUTCMinutes(), 2)), cljs.core.str(":"), cljs.core.str(b.call(null, a.getUTCSeconds(), 2)), cljs.core.str("."), cljs.core.str(b.call(null, a.getUTCMilliseconds(),
3)), cljs.core.str("-"), cljs.core.str('00:00"')].join(""))
};
cljs.core.Cons.prototype.cljs$core$IPrintable$ = !0;
cljs.core.Cons.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.Range.prototype.cljs$core$IPrintable$ = !0;
cljs.core.Range.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.ObjMap.prototype.cljs$core$IPrintable$ = !0;
cljs.core.ObjMap.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, function(a) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "", " ", "", b, a)
}, "{", ", ", "}", b, a)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintable$ = !0;
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.pr_sequential.call(null, cljs.core.pr_seq, "(", " ", ")", b, a)
};
cljs.core.HashMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.HashMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, function(a) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "", " ", "", c, a)
}, "{", ", ", "}", c, a)
};
cljs.core.IPrintWithWriter.number = !0;
cljs.core._pr_writer.number = function(a, b) {
1 / 0;
return cljs.core._write.call(null, b, "" + cljs.core.str(a))
};
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, a)
};
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, function(a) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "", " ", "", c, a)
}, "{", ", ", "}", c, a)
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, function(a) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "", " ", "", c, a)
}, "{", ", ", "}", c, a)
};
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#queue [", " ", "]", c, cljs.core.seq.call(null, a))
};
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#{", " ", "}", c, a)
};
cljs.core.IPrintWithWriter["boolean"] = !0;
cljs.core._pr_writer["boolean"] = function(a, b) {
return cljs.core._write.call(null, b, "" + cljs.core.str(a))
};
cljs.core.IPrintWithWriter.string = !0;
cljs.core._pr_writer.string = function(a, b, c) {
return cljs.core.keyword_QMARK_.call(null, a) ? (cljs.core._write.call(null, b, ":"), c = cljs.core.namespace.call(null, a), cljs.core.truth_(c) && cljs.core.write_all.call(null, b, "" + cljs.core.str(c), "/"), cljs.core._write.call(null, b, cljs.core.name.call(null, a))) : cljs.core.symbol_QMARK_.call(null, a) ? (c = cljs.core.namespace.call(null, a), cljs.core.truth_(c) && cljs.core.write_all.call(null, b, "" + cljs.core.str(c), "/"), cljs.core._write.call(null, b, cljs.core.name.call(null, a))) :
cljs.core.truth_((new cljs.core.Keyword("\ufdd0'readably")).call(null, c)) ? cljs.core._write.call(null, b, cljs.core.quote_string.call(null, a)) : cljs.core._write.call(null, b, a)
};
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, a)
};
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, function(a) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "", " ", "", c, a)
}, "{", ", ", "}", c, a)
};
cljs.core.Vector.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Vector.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, a)
};
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#{", " ", "}", c, a)
};
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, a)
};
cljs.core.List.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.List.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.IPrintWithWriter.array = !0;
cljs.core._pr_writer.array = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#<Array [", ", ", "]>", c, a)
};
cljs.core.IPrintWithWriter["function"] = !0;
cljs.core._pr_writer["function"] = function(a, b) {
return cljs.core.write_all.call(null, b, "#<", "" + cljs.core.str(a), ">")
};
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b) {
return cljs.core._write.call(null, b, "()")
};
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, a)
};
Date.prototype.cljs$core$IPrintWithWriter$ = !0;
Date.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b) {
var c = function(a, b) {
for(var c = "" + cljs.core.str(a);;) {
if(cljs.core.count.call(null, c) < b) {
c = [cljs.core.str("0"), cljs.core.str(c)].join("")
}else {
return c
}
}
};
return cljs.core.write_all.call(null, b, '#inst "', "" + cljs.core.str(a.getUTCFullYear()), "-", c.call(null, a.getUTCMonth() + 1, 2), "-", c.call(null, a.getUTCDate(), 2), "T", c.call(null, a.getUTCHours(), 2), ":", c.call(null, a.getUTCMinutes(), 2), ":", c.call(null, a.getUTCSeconds(), 2), ".", c.call(null, a.getUTCMilliseconds(), 3), "-", '00:00"')
};
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, function(a) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "", " ", "", c, a)
}, "{", ", ", "}", c, a)
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, a)
};
cljs.core.PersistentVector.prototype.cljs$core$IComparable$ = !0;
cljs.core.PersistentVector.prototype.cljs$core$IComparable$_compare$arity$2 = function(a, b) {
return cljs.core.compare_indexed.call(null, a, b)
};
cljs.core.Atom = function(a, b, c, d) {
this.state = a;
this.meta = b;
this.validator = c;
this.watches = d;
this.cljs$lang$protocol_mask$partition0$ = 2690809856;
this.cljs$lang$protocol_mask$partition1$ = 2
};
cljs.core.Atom.cljs$lang$type = !0;
cljs.core.Atom.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Atom")
};
cljs.core.Atom.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Atom")
};
cljs.core.Atom.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return goog.getUid(a)
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
for(var d = cljs.core.seq.call(null, this.watches);;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null);
cljs.core.nth.call(null, e, 1, null).call(null, f, a, b, c);
d = cljs.core.next.call(null, d)
}else {
return null
}
}
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
return a.watches = cljs.core.assoc.call(null, this.watches, b, c)
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
return a.watches = cljs.core.dissoc.call(null, this.watches, b)
};
cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
cljs.core._write.call(null, b, "#<Atom: ");
cljs.core._pr_writer.call(null, this.state, b, c);
return cljs.core._write.call(null, b, ">")
};
cljs.core.Atom.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function(a, b) {
return cljs.core.concat.call(null, cljs.core.PersistentVector.fromArray(["#<Atom: "], !0), cljs.core._pr_seq.call(null, this.state, b), ">")
};
cljs.core.Atom.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
cljs.core.Atom.prototype.cljs$core$IDeref$_deref$arity$1 = function() {
return this.state
};
cljs.core.Atom.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return a === b
};
cljs.core.atom = function() {
var a = null, b = function(a) {
return new cljs.core.Atom(a, null, null, null)
}, c = function(a, b) {
var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core._lookup.call(null, c, "\ufdd0'validator", null), c = cljs.core._lookup.call(null, c, "\ufdd0'meta", null);
return new cljs.core.Atom(a, c, d, null)
}, d = function(a, b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, a, d)
};
d.cljs$lang$maxFixedArity = 1;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), a = cljs.core.rest(a);
return c(b, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c) {
switch(arguments.length) {
case 1:
return b.call(this, a);
default:
return d.cljs$lang$arity$variadic(a, cljs.core.array_seq(arguments, 1))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 1;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.reset_BANG_ = function(a, b) {
var c = a.validator;
if(cljs.core.truth_(c) && !cljs.core.truth_(c.call(null, b))) {
throw Error([cljs.core.str("Assert failed: "), cljs.core.str("Validator rejected reference state"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.with_meta(cljs.core.list("\ufdd1'validate", "\ufdd1'new-value"), cljs.core.hash_map("\ufdd0'line", 6751))))].join(""));
}
c = a.state;
a.state = b;
cljs.core._notify_watches.call(null, a, c, b);
return b
};
cljs.core.swap_BANG_ = function() {
var a = null, b = function(a, b) {
return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state))
}, c = function(a, b, c) {
return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state, c))
}, d = function(a, b, c, d) {
return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state, c, d))
}, e = function(a, b, c, d, e) {
return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state, c, d, e))
}, f = function(a, b, c, d, e, f) {
return cljs.core.reset_BANG_.call(null, a, cljs.core.apply.call(null, b, a.state, c, d, e, f))
}, g = function(a, b, c, d, e, g) {
var n = null;
goog.isDef(g) && (n = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0));
return f.call(this, a, b, c, d, e, n)
};
g.cljs$lang$maxFixedArity = 5;
g.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), e = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), g = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(cljs.core.next(a))))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(cljs.core.next(a)))));
return f(b, c, d, e, g, a)
};
g.cljs$lang$arity$variadic = f;
a = function(a, f, j, k, m, l) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, j);
case 4:
return d.call(this, a, f, j, k);
case 5:
return e.call(this, a, f, j, k, m);
default:
return g.cljs$lang$arity$variadic(a, f, j, k, m, cljs.core.array_seq(arguments, 5))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 5;
a.cljs$lang$applyTo = g.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
a.cljs$lang$arity$5 = e;
a.cljs$lang$arity$variadic = g.cljs$lang$arity$variadic;
return a
}();
cljs.core.compare_and_set_BANG_ = function(a, b, c) {
return cljs.core._EQ_.call(null, a.state, b) ? (cljs.core.reset_BANG_.call(null, a, c), !0) : !1
};
cljs.core.deref = function(a) {
return cljs.core._deref.call(null, a)
};
cljs.core.set_validator_BANG_ = function(a, b) {
return a.validator = b
};
cljs.core.get_validator = function(a) {
return a.validator
};
cljs.core.alter_meta_BANG_ = function() {
var a = function(a, b, e) {
return a.meta = cljs.core.apply.call(null, b, a.meta, e)
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.reset_meta_BANG_ = function(a, b) {
return a.meta = b
};
cljs.core.add_watch = function(a, b, c) {
return cljs.core._add_watch.call(null, a, b, c)
};
cljs.core.remove_watch = function(a, b) {
return cljs.core._remove_watch.call(null, a, b)
};
cljs.core.gensym_counter = null;
cljs.core.gensym = function() {
var a = null, b = function() {
return a.call(null, "G__")
}, c = function(a) {
null == cljs.core.gensym_counter && (cljs.core.gensym_counter = cljs.core.atom.call(null, 0));
return cljs.core.symbol.call(null, [cljs.core.str(a), cljs.core.str(cljs.core.swap_BANG_.call(null, cljs.core.gensym_counter, cljs.core.inc))].join(""))
}, a = function(a) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return c.call(this, a)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = c;
return a
}();
cljs.core.fixture1 = 1;
cljs.core.fixture2 = 2;
cljs.core.Delay = function(a, b) {
this.state = a;
this.f = b;
this.cljs$lang$protocol_mask$partition1$ = 1;
this.cljs$lang$protocol_mask$partition0$ = 32768
};
cljs.core.Delay.cljs$lang$type = !0;
cljs.core.Delay.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/Delay")
};
cljs.core.Delay.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/Delay")
};
cljs.core.Delay.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = function() {
return(new cljs.core.Keyword("\ufdd0'done")).call(null, cljs.core.deref.call(null, this.state))
};
cljs.core.Delay.prototype.cljs$core$IDeref$_deref$arity$1 = function() {
var a = this;
return(new cljs.core.Keyword("\ufdd0'value")).call(null, cljs.core.swap_BANG_.call(null, a.state, function(b) {
var b = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, c = cljs.core._lookup.call(null, b, "\ufdd0'done", null);
return cljs.core.truth_(c) ? b : cljs.core.ObjMap.fromObject(["\ufdd0'done", "\ufdd0'value"], {"\ufdd0'done":!0, "\ufdd0'value":a.f.call(null)})
}))
};
cljs.core.delay_QMARK_ = function(a) {
return cljs.core.instance_QMARK_.call(null, cljs.core.Delay, a)
};
cljs.core.force = function(a) {
return cljs.core.delay_QMARK_.call(null, a) ? cljs.core.deref.call(null, a) : a
};
cljs.core.realized_QMARK_ = function(a) {
return cljs.core._realized_QMARK_.call(null, a)
};
cljs.core.IEncodeJS = {};
cljs.core._clj__GT_js = function(a) {
var b;
b = a ? a.cljs$core$IEncodeJS$_clj__GT_js$arity$1 : a;
if(b) {
return a.cljs$core$IEncodeJS$_clj__GT_js$arity$1(a)
}
b = cljs.core._clj__GT_js[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._clj__GT_js._, !b)) {
throw cljs.core.missing_protocol.call(null, "IEncodeJS.-clj->js", a);
}
return b.call(null, a)
};
cljs.core._key__GT_js = function(a) {
var b;
b = a ? a.cljs$core$IEncodeJS$_key__GT_js$arity$1 : a;
if(b) {
return a.cljs$core$IEncodeJS$_key__GT_js$arity$1(a)
}
b = cljs.core._key__GT_js[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._key__GT_js._, !b)) {
throw cljs.core.missing_protocol.call(null, "IEncodeJS.-key->js", a);
}
return b.call(null, a)
};
cljs.core.IEncodeJS["null"] = !0;
cljs.core._clj__GT_js["null"] = function() {
return null
};
cljs.core.IEncodeJS._ = !0;
cljs.core._key__GT_js._ = function(a) {
return function() {
var b = cljs.core.string_QMARK_.call(null, a);
return b || (b = cljs.core.number_QMARK_.call(null, a)) ? b : (b = cljs.core.keyword_QMARK_.call(null, a)) ? b : cljs.core.symbol_QMARK_.call(null, a)
}() ? cljs.core._clj__GT_js.call(null, a) : cljs.core.pr_str.call(null, a)
};
cljs.core._clj__GT_js._ = function(a) {
if(cljs.core.keyword_QMARK_.call(null, a)) {
return cljs.core.name.call(null, a)
}
if(cljs.core.symbol_QMARK_.call(null, a)) {
return"" + cljs.core.str(a)
}
if(cljs.core.map_QMARK_.call(null, a)) {
for(var b = {}, a = cljs.core.seq.call(null, a);;) {
if(a) {
var c = cljs.core.first.call(null, a), d = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nth.call(null, c, 1, null);
b[cljs.core._key__GT_js.call(null, d)] = cljs.core._clj__GT_js.call(null, c);
a = cljs.core.next.call(null, a)
}else {
break
}
}
return b
}
return cljs.core.coll_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.array, cljs.core.map.call(null, cljs.core._clj__GT_js, a)) : a
};
cljs.core.clj__GT_js = function(a) {
return cljs.core._clj__GT_js.call(null, a)
};
cljs.core.IEncodeClojure = {};
cljs.core._js__GT_clj = function() {
var a = null, b = function(a) {
var b;
b = a ? a.cljs$core$IEncodeClojure$_js__GT_clj$arity$1 : a;
if(b) {
return a.cljs$core$IEncodeClojure$_js__GT_clj$arity$1(a)
}
b = cljs.core._js__GT_clj[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._js__GT_clj._, !b)) {
throw cljs.core.missing_protocol.call(null, "IEncodeClojure.-js->clj", a);
}
return b.call(null, a)
}, c = function(a, b) {
var c;
c = a ? a.cljs$core$IEncodeClojure$_js__GT_clj$arity$2 : a;
if(c) {
return a.cljs$core$IEncodeClojure$_js__GT_clj$arity$2(a, b)
}
c = cljs.core._js__GT_clj[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._js__GT_clj._, !c)) {
throw cljs.core.missing_protocol.call(null, "IEncodeClojure.-js->clj", a);
}
return c.call(null, a, b)
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.IEncodeClojure._ = !0;
cljs.core._js__GT_clj._ = function() {
var a = null;
return a = function(a, c) {
switch(arguments.length) {
case 1:
return cljs.core._js__GT_clj.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'keywordize-keys"], {"\ufdd0'keywordize-keys":!1}));
case 2:
var d = cljs.core.seq_QMARK_.call(null, c) ? cljs.core.apply.call(null, cljs.core.hash_map, c) : c, d = cljs.core._lookup.call(null, d, "\ufdd0'keywordize-keys", null), e = cljs.core.truth_(d) ? cljs.core.keyword : cljs.core.str;
return function g(a) {
return cljs.core.seq_QMARK_.call(null, a) ? cljs.core.doall.call(null, cljs.core.map.call(null, g, a)) : cljs.core.coll_QMARK_.call(null, a) ? cljs.core.into.call(null, cljs.core.empty.call(null, a), cljs.core.map.call(null, g, a)) : cljs.core.truth_(goog.isArray(a)) ? cljs.core.vec.call(null, cljs.core.map.call(null, g, a)) : cljs.core.type.call(null, a) === Object ? cljs.core.into.call(null, cljs.core.ObjMap.EMPTY, function j(b) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, b)) {
var c = cljs.core.first.call(null, b);
return cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([e.call(null, c), g.call(null, a[c])], !0), j.call(null, cljs.core.rest.call(null, b)))
}
return null
}
}, null)
}.call(null, cljs.core.js_keys.call(null, a))) : a
}.call(null, a)
}
throw Error("Invalid arity: " + arguments.length);
}
}();
cljs.core.js__GT_clj = function() {
var a = function(a, b) {
return cljs.core._js__GT_clj.call(null, a, cljs.core.apply.call(null, cljs.core.array_map, b))
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.memoize = function(a) {
var b = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY), c = function(c) {
var d = cljs.core._lookup.call(null, cljs.core.deref.call(null, b), c, null);
if(cljs.core.truth_(d)) {
return d
}
d = cljs.core.apply.call(null, a, c);
cljs.core.swap_BANG_.call(null, b, cljs.core.assoc, c, d);
return d
}, d = function(a) {
var b = null;
goog.isDef(a) && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return c.call(this, b)
};
d.cljs$lang$maxFixedArity = 0;
d.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return c(a)
};
d.cljs$lang$arity$variadic = c;
return d
};
cljs.core.trampoline = function() {
var a = null, b = function(a) {
for(;;) {
if(a = a.call(null), !cljs.core.fn_QMARK_.call(null, a)) {
return a
}
}
}, c = function(b, c) {
return a.call(null, function() {
return cljs.core.apply.call(null, b, c)
})
}, d = function(a, b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, a, d)
};
d.cljs$lang$maxFixedArity = 1;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), a = cljs.core.rest(a);
return c(b, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c) {
switch(arguments.length) {
case 1:
return b.call(this, a);
default:
return d.cljs$lang$arity$variadic(a, cljs.core.array_seq(arguments, 1))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 1;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
cljs.core.rand = function() {
var a = null, b = function() {
return a.call(null, 1)
}, c = function(a) {
return Math.random.call(null) * a
}, a = function(a) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return c.call(this, a)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = c;
return a
}();
cljs.core.rand_int = function(a) {
return Math.floor.call(null, Math.random.call(null) * a)
};
cljs.core.rand_nth = function(a) {
return cljs.core.nth.call(null, a, cljs.core.rand_int.call(null, cljs.core.count.call(null, a)))
};
cljs.core.group_by = function(a, b) {
return cljs.core.reduce.call(null, function(b, d) {
var e = a.call(null, d);
return cljs.core.assoc.call(null, b, e, cljs.core.conj.call(null, cljs.core._lookup.call(null, b, e, cljs.core.PersistentVector.EMPTY), d))
}, cljs.core.ObjMap.EMPTY, b)
};
cljs.core.make_hierarchy = function() {
return cljs.core.ObjMap.fromObject(["\ufdd0'parents", "\ufdd0'descendants", "\ufdd0'ancestors"], {"\ufdd0'parents":cljs.core.ObjMap.EMPTY, "\ufdd0'descendants":cljs.core.ObjMap.EMPTY, "\ufdd0'ancestors":cljs.core.ObjMap.EMPTY})
};
cljs.core.global_hierarchy = cljs.core.atom.call(null, cljs.core.make_hierarchy.call(null));
cljs.core.isa_QMARK_ = function() {
var a = null, b = function(b, c) {
return a.call(null, cljs.core.deref.call(null, cljs.core.global_hierarchy), b, c)
}, c = function(b, c, f) {
var g = cljs.core._EQ_.call(null, c, f);
if(!g && !(g = cljs.core.contains_QMARK_.call(null, (new cljs.core.Keyword("\ufdd0'ancestors")).call(null, b).call(null, c), f)) && (g = cljs.core.vector_QMARK_.call(null, f))) {
if(g = cljs.core.vector_QMARK_.call(null, c)) {
if(g = cljs.core.count.call(null, f) === cljs.core.count.call(null, c)) {
for(var g = !0, h = 0;;) {
var i;
i = (i = cljs.core.not.call(null, g)) ? i : h === cljs.core.count.call(null, f);
if(i) {
return g
}
g = a.call(null, b, c.call(null, h), f.call(null, h));
h += 1
}
}else {
return g
}
}else {
return g
}
}else {
return g
}
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.parents = function() {
var a = null, b = function(b) {
return a.call(null, cljs.core.deref.call(null, cljs.core.global_hierarchy), b)
}, c = function(a, b) {
return cljs.core.not_empty.call(null, cljs.core._lookup.call(null, (new cljs.core.Keyword("\ufdd0'parents")).call(null, a), b, null))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.ancestors = function() {
var a = null, b = function(b) {
return a.call(null, cljs.core.deref.call(null, cljs.core.global_hierarchy), b)
}, c = function(a, b) {
return cljs.core.not_empty.call(null, cljs.core._lookup.call(null, (new cljs.core.Keyword("\ufdd0'ancestors")).call(null, a), b, null))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.descendants = function() {
var a = null, b = function(b) {
return a.call(null, cljs.core.deref.call(null, cljs.core.global_hierarchy), b)
}, c = function(a, b) {
return cljs.core.not_empty.call(null, cljs.core._lookup.call(null, (new cljs.core.Keyword("\ufdd0'descendants")).call(null, a), b, null))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
cljs.core.derive = function() {
var a = null, b = function(b, c) {
if(!cljs.core.truth_(cljs.core.namespace.call(null, c))) {
throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.with_meta(cljs.core.list("\ufdd1'namespace", "\ufdd1'parent"), cljs.core.hash_map("\ufdd0'line", 7081))))].join(""));
}
cljs.core.swap_BANG_.call(null, cljs.core.global_hierarchy, a, b, c);
return null
}, c = function(a, b, c) {
if(!cljs.core.not_EQ_.call(null, b, c)) {
throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.with_meta(cljs.core.list("\ufdd1'not=", "\ufdd1'tag", "\ufdd1'parent"), cljs.core.hash_map("\ufdd0'line", 7085))))].join(""));
}
var g = (new cljs.core.Keyword("\ufdd0'parents")).call(null, a), h = (new cljs.core.Keyword("\ufdd0'descendants")).call(null, a), i = (new cljs.core.Keyword("\ufdd0'ancestors")).call(null, a), j = function(a, b, c, d, e) {
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.assoc.call(null, a, b, cljs.core.reduce.call(null, cljs.core.conj, cljs.core._lookup.call(null, e, b, cljs.core.PersistentHashSet.EMPTY), cljs.core.cons.call(null, d, e.call(null, d))))
}, a, cljs.core.cons.call(null, b, c.call(null, b)))
};
if(cljs.core.contains_QMARK_.call(null, g.call(null, b), c)) {
b = null
}else {
if(cljs.core.contains_QMARK_.call(null, i.call(null, b), c)) {
throw Error([cljs.core.str(b), cljs.core.str("already has"), cljs.core.str(c), cljs.core.str("as ancestor")].join(""));
}
if(cljs.core.contains_QMARK_.call(null, i.call(null, c), b)) {
throw Error([cljs.core.str("Cyclic derivation:"), cljs.core.str(c), cljs.core.str("has"), cljs.core.str(b), cljs.core.str("as ancestor")].join(""));
}
b = cljs.core.ObjMap.fromObject(["\ufdd0'parents", "\ufdd0'ancestors", "\ufdd0'descendants"], {"\ufdd0'parents":cljs.core.assoc.call(null, (new cljs.core.Keyword("\ufdd0'parents")).call(null, a), b, cljs.core.conj.call(null, cljs.core._lookup.call(null, g, b, cljs.core.PersistentHashSet.EMPTY), c)), "\ufdd0'ancestors":j.call(null, (new cljs.core.Keyword("\ufdd0'ancestors")).call(null, a), b, h, c, i), "\ufdd0'descendants":j.call(null, (new cljs.core.Keyword("\ufdd0'descendants")).call(null,
a), c, i, b, h)})
}
return cljs.core.truth_(b) ? b : a
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.underive = function() {
var a = null, b = function(b, c) {
cljs.core.swap_BANG_.call(null, cljs.core.global_hierarchy, a, b, c);
return null
}, c = function(a, b, c) {
var g = (new cljs.core.Keyword("\ufdd0'parents")).call(null, a), h = cljs.core.truth_(g.call(null, b)) ? cljs.core.disj.call(null, g.call(null, b), c) : cljs.core.PersistentHashSet.EMPTY, h = cljs.core.truth_(cljs.core.not_empty.call(null, h)) ? cljs.core.assoc.call(null, g, b, h) : cljs.core.dissoc.call(null, g, b), h = cljs.core.flatten.call(null, cljs.core.map.call(null, function(a) {
return cljs.core.cons.call(null, cljs.core.first.call(null, a), cljs.core.interpose.call(null, cljs.core.first.call(null, a), cljs.core.second.call(null, a)))
}, cljs.core.seq.call(null, h)));
return cljs.core.contains_QMARK_.call(null, g.call(null, b), c) ? cljs.core.reduce.call(null, function(a, b) {
return cljs.core.apply.call(null, cljs.core.derive, a, b)
}, cljs.core.make_hierarchy.call(null), cljs.core.partition.call(null, 2, h)) : a
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
cljs.core.reset_cache = function(a, b, c, d) {
cljs.core.swap_BANG_.call(null, a, function() {
return cljs.core.deref.call(null, b)
});
return cljs.core.swap_BANG_.call(null, c, function() {
return cljs.core.deref.call(null, d)
})
};
cljs.core.prefers_STAR_ = function prefers_STAR_(b, c, d) {
var e = cljs.core.deref.call(null, d).call(null, b), e = cljs.core.truth_(cljs.core.truth_(e) ? e.call(null, c) : e) ? !0 : null;
if(cljs.core.truth_(e)) {
return e
}
a: {
for(e = cljs.core.parents.call(null, c);;) {
if(0 < cljs.core.count.call(null, e)) {
cljs.core.truth_(prefers_STAR_.call(null, b, cljs.core.first.call(null, e), d)), e = cljs.core.rest.call(null, e)
}else {
e = null;
break a
}
}
e = void 0
}
if(cljs.core.truth_(e)) {
return e
}
a: {
for(b = cljs.core.parents.call(null, b);;) {
if(0 < cljs.core.count.call(null, b)) {
cljs.core.truth_(prefers_STAR_.call(null, cljs.core.first.call(null, b), c, d)), b = cljs.core.rest.call(null, b)
}else {
c = null;
break a
}
}
c = void 0
}
return cljs.core.truth_(c) ? c : !1
};
cljs.core.dominates = function(a, b, c) {
c = cljs.core.prefers_STAR_.call(null, a, b, c);
return cljs.core.truth_(c) ? c : cljs.core.isa_QMARK_.call(null, a, b)
};
cljs.core.find_and_cache_best_method = function find_and_cache_best_method(b, c, d, e, f, g, h) {
var i = cljs.core.reduce.call(null, function(d, e) {
var g = cljs.core.nth.call(null, e, 0, null);
cljs.core.nth.call(null, e, 1, null);
if(cljs.core.isa_QMARK_.call(null, c, g)) {
var h = cljs.core.truth_(function() {
var b = null == d;
return b ? b : cljs.core.dominates.call(null, g, cljs.core.first.call(null, d), f)
}()) ? e : d;
if(!cljs.core.truth_(cljs.core.dominates.call(null, cljs.core.first.call(null, h), g, f))) {
throw Error([cljs.core.str("Multiple methods in multimethod '"), cljs.core.str(b), cljs.core.str("' match dispatch value: "), cljs.core.str(c), cljs.core.str(" -> "), cljs.core.str(g), cljs.core.str(" and "), cljs.core.str(cljs.core.first.call(null, h)), cljs.core.str(", and neither is preferred")].join(""));
}
return h
}
return d
}, null, cljs.core.deref.call(null, e));
if(cljs.core.truth_(i)) {
if(cljs.core._EQ_.call(null, cljs.core.deref.call(null, h), cljs.core.deref.call(null, d))) {
return cljs.core.swap_BANG_.call(null, g, cljs.core.assoc, c, cljs.core.second.call(null, i)), cljs.core.second.call(null, i)
}
cljs.core.reset_cache.call(null, g, e, h, d);
return find_and_cache_best_method.call(null, b, c, d, e, f, g, h)
}
return null
};
cljs.core.IMultiFn = {};
cljs.core._reset = function(a) {
var b;
b = a ? a.cljs$core$IMultiFn$_reset$arity$1 : a;
if(b) {
return a.cljs$core$IMultiFn$_reset$arity$1(a)
}
b = cljs.core._reset[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._reset._, !b)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-reset", a);
}
return b.call(null, a)
};
cljs.core._add_method = function(a, b, c) {
var d;
d = a ? a.cljs$core$IMultiFn$_add_method$arity$3 : a;
if(d) {
return a.cljs$core$IMultiFn$_add_method$arity$3(a, b, c)
}
d = cljs.core._add_method[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._add_method._, !d)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-add-method", a);
}
return d.call(null, a, b, c)
};
cljs.core._remove_method = function(a, b) {
var c;
c = a ? a.cljs$core$IMultiFn$_remove_method$arity$2 : a;
if(c) {
return a.cljs$core$IMultiFn$_remove_method$arity$2(a, b)
}
c = cljs.core._remove_method[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._remove_method._, !c)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-remove-method", a);
}
return c.call(null, a, b)
};
cljs.core._prefer_method = function(a, b, c) {
var d;
d = a ? a.cljs$core$IMultiFn$_prefer_method$arity$3 : a;
if(d) {
return a.cljs$core$IMultiFn$_prefer_method$arity$3(a, b, c)
}
d = cljs.core._prefer_method[goog.typeOf(null == a ? null : a)];
if(!d && (d = cljs.core._prefer_method._, !d)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-prefer-method", a);
}
return d.call(null, a, b, c)
};
cljs.core._get_method = function(a, b) {
var c;
c = a ? a.cljs$core$IMultiFn$_get_method$arity$2 : a;
if(c) {
return a.cljs$core$IMultiFn$_get_method$arity$2(a, b)
}
c = cljs.core._get_method[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._get_method._, !c)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-get-method", a);
}
return c.call(null, a, b)
};
cljs.core._methods = function(a) {
var b;
b = a ? a.cljs$core$IMultiFn$_methods$arity$1 : a;
if(b) {
return a.cljs$core$IMultiFn$_methods$arity$1(a)
}
b = cljs.core._methods[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._methods._, !b)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-methods", a);
}
return b.call(null, a)
};
cljs.core._prefers = function(a) {
var b;
b = a ? a.cljs$core$IMultiFn$_prefers$arity$1 : a;
if(b) {
return a.cljs$core$IMultiFn$_prefers$arity$1(a)
}
b = cljs.core._prefers[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.core._prefers._, !b)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-prefers", a);
}
return b.call(null, a)
};
cljs.core._dispatch = function(a, b) {
var c;
c = a ? a.cljs$core$IMultiFn$_dispatch$arity$2 : a;
if(c) {
return a.cljs$core$IMultiFn$_dispatch$arity$2(a, b)
}
c = cljs.core._dispatch[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.core._dispatch._, !c)) {
throw cljs.core.missing_protocol.call(null, "IMultiFn.-dispatch", a);
}
return c.call(null, a, b)
};
cljs.core.do_dispatch = function(a, b, c) {
b = cljs.core.apply.call(null, b, c);
a = cljs.core._get_method.call(null, a, b);
if(!cljs.core.truth_(a)) {
throw Error([cljs.core.str("No method in multimethod '"), cljs.core.str(cljs.core.name), cljs.core.str("' for dispatch value: "), cljs.core.str(b)].join(""));
}
return cljs.core.apply.call(null, a, c)
};
cljs.core.MultiFn = function(a, b, c, d, e, f, g, h) {
this.name = a;
this.dispatch_fn = b;
this.default_dispatch_val = c;
this.hierarchy = d;
this.method_table = e;
this.prefer_table = f;
this.method_cache = g;
this.cached_hierarchy = h;
this.cljs$lang$protocol_mask$partition0$ = 4194304;
this.cljs$lang$protocol_mask$partition1$ = 256
};
cljs.core.MultiFn.cljs$lang$type = !0;
cljs.core.MultiFn.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/MultiFn")
};
cljs.core.MultiFn.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/MultiFn")
};
cljs.core.MultiFn.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return goog.getUid(a)
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_reset$arity$1 = function(a) {
cljs.core.swap_BANG_.call(null, this.method_table, function() {
return cljs.core.ObjMap.EMPTY
});
cljs.core.swap_BANG_.call(null, this.method_cache, function() {
return cljs.core.ObjMap.EMPTY
});
cljs.core.swap_BANG_.call(null, this.prefer_table, function() {
return cljs.core.ObjMap.EMPTY
});
cljs.core.swap_BANG_.call(null, this.cached_hierarchy, function() {
return null
});
return a
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_add_method$arity$3 = function(a, b, c) {
cljs.core.swap_BANG_.call(null, this.method_table, cljs.core.assoc, b, c);
cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
return a
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_remove_method$arity$2 = function(a, b) {
cljs.core.swap_BANG_.call(null, this.method_table, cljs.core.dissoc, b);
cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
return a
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_get_method$arity$2 = function(a, b) {
cljs.core._EQ_.call(null, cljs.core.deref.call(null, this.cached_hierarchy), cljs.core.deref.call(null, this.hierarchy)) || cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
var c = cljs.core.deref.call(null, this.method_cache).call(null, b);
if(cljs.core.truth_(c)) {
return c
}
c = cljs.core.find_and_cache_best_method.call(null, this.name, b, this.hierarchy, this.method_table, this.prefer_table, this.method_cache, this.cached_hierarchy);
return cljs.core.truth_(c) ? c : cljs.core.deref.call(null, this.method_table).call(null, this.default_dispatch_val)
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefer_method$arity$3 = function(a, b, c) {
if(cljs.core.truth_(cljs.core.prefers_STAR_.call(null, b, c, this.prefer_table))) {
throw Error([cljs.core.str("Preference conflict in multimethod '"), cljs.core.str(this.name), cljs.core.str("': "), cljs.core.str(c), cljs.core.str(" is already preferred to "), cljs.core.str(b)].join(""));
}
cljs.core.swap_BANG_.call(null, this.prefer_table, function(a) {
return cljs.core.assoc.call(null, a, b, cljs.core.conj.call(null, cljs.core._lookup.call(null, a, b, cljs.core.PersistentHashSet.EMPTY), c))
});
return cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy)
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_methods$arity$1 = function() {
return cljs.core.deref.call(null, this.method_table)
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefers$arity$1 = function() {
return cljs.core.deref.call(null, this.prefer_table)
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_dispatch$arity$2 = function(a, b) {
return cljs.core.do_dispatch.call(null, a, this.dispatch_fn, b)
};
cljs.core.MultiFn.prototype.call = function() {
var a = function(a, b) {
return cljs.core._dispatch.call(null, this, b)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.core.MultiFn.prototype.apply = function(a, b) {
return cljs.core._dispatch.call(null, this, b)
};
cljs.core.remove_all_methods = function(a) {
return cljs.core._reset.call(null, a)
};
cljs.core.remove_method = function(a, b) {
return cljs.core._remove_method.call(null, a, b)
};
cljs.core.prefer_method = function(a, b, c) {
return cljs.core._prefer_method.call(null, a, b, c)
};
cljs.core.methods$ = function(a) {
return cljs.core._methods.call(null, a)
};
cljs.core.get_method = function(a, b) {
return cljs.core._get_method.call(null, a, b)
};
cljs.core.prefers = function(a) {
return cljs.core._prefers.call(null, a)
};
cljs.core.UUID = function(a) {
this.uuid = a;
this.cljs$lang$protocol_mask$partition1$ = 0;
this.cljs$lang$protocol_mask$partition0$ = 2690646016
};
cljs.core.UUID.cljs$lang$type = !0;
cljs.core.UUID.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.core/UUID")
};
cljs.core.UUID.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.core/UUID")
};
cljs.core.UUID.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return goog.string.hashCode(cljs.core.pr_str.call(null, a))
};
cljs.core.UUID.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b) {
return cljs.core._write.call(null, b, [cljs.core.str('#uuid "'), cljs.core.str(this.uuid), cljs.core.str('"')].join(""))
};
cljs.core.UUID.prototype.cljs$core$IPrintable$_pr_seq$arity$2 = function() {
return cljs.core.list.call(null, [cljs.core.str('#uuid "'), cljs.core.str(this.uuid), cljs.core.str('"')].join(""))
};
cljs.core.UUID.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
var c = cljs.core.instance_QMARK_.call(null, cljs.core.UUID, b);
return c ? this.uuid === b.uuid : c
};
cljs.core.UUID.prototype.toString = function() {
return cljs.core.pr_str.call(null, this)
};
var lt = {util:{}};
lt.util.style = {};
lt.util.style.__GT_px = function(a) {
return[cljs.core.str(cljs.core.truth_(a) ? a : 0), cljs.core.str("px")].join("")
};
goog.disposable = {};
goog.disposable.IDisposable = function() {
};
goog.Disposable = function() {
this.disposed_ = !1;
goog.Disposable.ENABLE_MONITORING && (this.creationStack = Error().stack, goog.Disposable.instances_[goog.getUid(this)] = this)
};
goog.Disposable.ENABLE_MONITORING = !1;
goog.Disposable.instances_ = {};
goog.Disposable.getUndisposedObjects = function() {
var a = [], b;
for(b in goog.Disposable.instances_) {
goog.Disposable.instances_.hasOwnProperty(b) && a.push(goog.Disposable.instances_[Number(b)])
}
return a
};
goog.Disposable.clearUndisposedObjects = function() {
goog.Disposable.instances_ = {}
};
goog.Disposable.prototype.isDisposed = function() {
return!!this.disposed_
};
goog.Disposable.prototype.getDisposed = goog.Disposable.prototype.isDisposed;
goog.Disposable.prototype.dispose = function() {
if(!this.disposed_) {
if(goog.Disposable.ENABLE_MONITORING) {
if(void 0 == this.disposed_) {
throw Error(this + " did not call the goog.Disposable base constructor");
}
var a = goog.getUid(this);
delete goog.Disposable.instances_[a]
}
this.disposed_ = !0;
this.disposeInternal()
}
};
goog.Disposable.prototype.registerDisposable = function(a) {
this.dependentDisposables_ || (this.dependentDisposables_ = []);
this.dependentDisposables_.push(a)
};
goog.Disposable.prototype.addOnDisposeCallback = function(a, b) {
this.onDisposeCallbacks_ || (this.onDisposeCallbacks_ = []);
this.onDisposeCallbacks_.push(goog.bind(a, b))
};
goog.Disposable.prototype.disposeInternal = function() {
this.dependentDisposables_ && goog.disposeAll.apply(null, this.dependentDisposables_);
if(this.onDisposeCallbacks_) {
for(;this.onDisposeCallbacks_.length;) {
this.onDisposeCallbacks_.shift()()
}
}
};
goog.dispose = function(a) {
a && "function" == typeof a.dispose && a.dispose()
};
goog.disposeAll = function(a) {
for(var b = 0, c = arguments.length;b < c;++b) {
var d = arguments[b];
goog.isArrayLike(d) ? goog.disposeAll.apply(null, d) : goog.dispose(d)
}
};
goog.debug.entryPointRegistry = {};
goog.debug.EntryPointMonitor = function() {
};
goog.debug.entryPointRegistry.refList_ = [];
goog.debug.entryPointRegistry.monitors_ = [];
goog.debug.entryPointRegistry.monitorsMayExist_ = !1;
goog.debug.entryPointRegistry.register = function(a) {
goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length] = a;
if(goog.debug.entryPointRegistry.monitorsMayExist_) {
for(var b = goog.debug.entryPointRegistry.monitors_, c = 0;c < b.length;c++) {
a(goog.bind(b[c].wrap, b[c]))
}
}
};
goog.debug.entryPointRegistry.monitorAll = function(a) {
goog.debug.entryPointRegistry.monitorsMayExist_ = !0;
for(var b = goog.bind(a.wrap, a), c = 0;c < goog.debug.entryPointRegistry.refList_.length;c++) {
goog.debug.entryPointRegistry.refList_[c](b)
}
goog.debug.entryPointRegistry.monitors_.push(a)
};
goog.debug.entryPointRegistry.unmonitorAllIfPossible = function(a) {
var b = goog.debug.entryPointRegistry.monitors_;
goog.asserts.assert(a == b[b.length - 1], "Only the most recent monitor can be unwrapped.");
for(var a = goog.bind(a.unwrap, a), c = 0;c < goog.debug.entryPointRegistry.refList_.length;c++) {
goog.debug.entryPointRegistry.refList_[c](a)
}
b.length--
};
goog.debug.errorHandlerWeakDep = {protectEntryPoint:function(a) {
return a
}};
goog.userAgent = {};
goog.userAgent.ASSUME_IE = !1;
goog.userAgent.ASSUME_GECKO = !1;
goog.userAgent.ASSUME_WEBKIT = !1;
goog.userAgent.ASSUME_MOBILE_WEBKIT = !1;
goog.userAgent.ASSUME_OPERA = !1;
goog.userAgent.ASSUME_ANY_VERSION = !1;
goog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_GECKO || goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_OPERA;
goog.userAgent.getUserAgentString = function() {
return goog.global.navigator ? goog.global.navigator.userAgent : null
};
goog.userAgent.getNavigator = function() {
return goog.global.navigator
};
goog.userAgent.init_ = function() {
goog.userAgent.detectedOpera_ = !1;
goog.userAgent.detectedIe_ = !1;
goog.userAgent.detectedWebkit_ = !1;
goog.userAgent.detectedMobile_ = !1;
goog.userAgent.detectedGecko_ = !1;
var a;
if(!goog.userAgent.BROWSER_KNOWN_ && (a = goog.userAgent.getUserAgentString())) {
var b = goog.userAgent.getNavigator();
goog.userAgent.detectedOpera_ = 0 == a.indexOf("Opera");
goog.userAgent.detectedIe_ = !goog.userAgent.detectedOpera_ && -1 != a.indexOf("MSIE");
goog.userAgent.detectedWebkit_ = !goog.userAgent.detectedOpera_ && -1 != a.indexOf("WebKit");
goog.userAgent.detectedMobile_ = goog.userAgent.detectedWebkit_ && -1 != a.indexOf("Mobile");
goog.userAgent.detectedGecko_ = !goog.userAgent.detectedOpera_ && !goog.userAgent.detectedWebkit_ && "Gecko" == b.product
}
};
goog.userAgent.BROWSER_KNOWN_ || goog.userAgent.init_();
goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_OPERA : goog.userAgent.detectedOpera_;
goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_IE : goog.userAgent.detectedIe_;
goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_GECKO : goog.userAgent.detectedGecko_;
goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT : goog.userAgent.detectedWebkit_;
goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.detectedMobile_;
goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
goog.userAgent.determinePlatform_ = function() {
var a = goog.userAgent.getNavigator();
return a && a.platform || ""
};
goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
goog.userAgent.ASSUME_MAC = !1;
goog.userAgent.ASSUME_WINDOWS = !1;
goog.userAgent.ASSUME_LINUX = !1;
goog.userAgent.ASSUME_X11 = !1;
goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11;
goog.userAgent.initPlatform_ = function() {
goog.userAgent.detectedMac_ = goog.string.contains(goog.userAgent.PLATFORM, "Mac");
goog.userAgent.detectedWindows_ = goog.string.contains(goog.userAgent.PLATFORM, "Win");
goog.userAgent.detectedLinux_ = goog.string.contains(goog.userAgent.PLATFORM, "Linux");
goog.userAgent.detectedX11_ = !!goog.userAgent.getNavigator() && goog.string.contains(goog.userAgent.getNavigator().appVersion || "", "X11")
};
goog.userAgent.PLATFORM_KNOWN_ || goog.userAgent.initPlatform_();
goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.userAgent.detectedMac_;
goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.userAgent.detectedWindows_;
goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.detectedLinux_;
goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.detectedX11_;
goog.userAgent.determineVersion_ = function() {
var a = "", b;
goog.userAgent.OPERA && goog.global.opera ? (a = goog.global.opera.version, a = "function" == typeof a ? a() : a) : (goog.userAgent.GECKO ? b = /rv\:([^\);]+)(\)|;)/ : goog.userAgent.IE ? b = /MSIE\s+([^\);]+)(\)|;)/ : goog.userAgent.WEBKIT && (b = /WebKit\/(\S+)/), b && (a = (a = b.exec(goog.userAgent.getUserAgentString())) ? a[1] : ""));
return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), b > parseFloat(a)) ? String(b) : a
};
goog.userAgent.getDocumentMode_ = function() {
var a = goog.global.document;
return a ? a.documentMode : void 0
};
goog.userAgent.VERSION = goog.userAgent.determineVersion_();
goog.userAgent.compare = function(a, b) {
return goog.string.compareVersions(a, b)
};
goog.userAgent.isVersionCache_ = {};
goog.userAgent.isVersion = function(a) {
return goog.userAgent.ASSUME_ANY_VERSION || goog.userAgent.isVersionCache_[a] || (goog.userAgent.isVersionCache_[a] = 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a))
};
goog.userAgent.isDocumentModeCache_ = {};
goog.userAgent.isDocumentMode = function(a) {
return goog.userAgent.isDocumentModeCache_[a] || (goog.userAgent.isDocumentModeCache_[a] = goog.userAgent.IE && !!document.documentMode && document.documentMode >= a)
};
goog.events = {};
goog.events.BrowserFeature = {HAS_W3C_BUTTON:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE && !goog.userAgent.isVersion("8"), HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT || goog.userAgent.isVersion("528"), HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO && goog.userAgent.isVersion("1.9b") || goog.userAgent.IE && goog.userAgent.isVersion("8") || goog.userAgent.OPERA &&
goog.userAgent.isVersion("9.5") || goog.userAgent.WEBKIT && goog.userAgent.isVersion("528"), HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO && !goog.userAgent.isVersion("8") || goog.userAgent.IE && !goog.userAgent.isVersion("9")};
goog.events.Event = function(a, b) {
this.type = a;
this.currentTarget = this.target = b
};
goog.events.Event.prototype.disposeInternal = function() {
};
goog.events.Event.prototype.dispose = function() {
};
goog.events.Event.prototype.propagationStopped_ = !1;
goog.events.Event.prototype.defaultPrevented = !1;
goog.events.Event.prototype.returnValue_ = !0;
goog.events.Event.prototype.stopPropagation = function() {
this.propagationStopped_ = !0
};
goog.events.Event.prototype.preventDefault = function() {
this.defaultPrevented = !0;
this.returnValue_ = !1
};
goog.events.Event.stopPropagation = function(a) {
a.stopPropagation()
};
goog.events.Event.preventDefault = function(a) {
a.preventDefault()
};
goog.events.EventType = {CLICK:"click", DBLCLICK:"dblclick", MOUSEDOWN:"mousedown", MOUSEUP:"mouseup", MOUSEOVER:"mouseover", MOUSEOUT:"mouseout", MOUSEMOVE:"mousemove", SELECTSTART:"selectstart", KEYPRESS:"keypress", KEYDOWN:"keydown", KEYUP:"keyup", BLUR:"blur", FOCUS:"focus", DEACTIVATE:"deactivate", FOCUSIN:goog.userAgent.IE ? "focusin" : "DOMFocusIn", FOCUSOUT:goog.userAgent.IE ? "focusout" : "DOMFocusOut", CHANGE:"change", SELECT:"select", SUBMIT:"submit", INPUT:"input", PROPERTYCHANGE:"propertychange",
DRAGSTART:"dragstart", DRAGENTER:"dragenter", DRAGOVER:"dragover", DRAGLEAVE:"dragleave", DROP:"drop", TOUCHSTART:"touchstart", TOUCHMOVE:"touchmove", TOUCHEND:"touchend", TOUCHCANCEL:"touchcancel", CONTEXTMENU:"contextmenu", ERROR:"error", HELP:"help", LOAD:"load", LOSECAPTURE:"losecapture", READYSTATECHANGE:"readystatechange", RESIZE:"resize", SCROLL:"scroll", UNLOAD:"unload", HASHCHANGE:"hashchange", PAGEHIDE:"pagehide", PAGESHOW:"pageshow", POPSTATE:"popstate", COPY:"copy", PASTE:"paste", CUT:"cut",
BEFORECOPY:"beforecopy", BEFORECUT:"beforecut", BEFOREPASTE:"beforepaste", ONLINE:"online", OFFLINE:"offline", MESSAGE:"message", CONNECT:"connect", TRANSITIONEND:goog.userAgent.WEBKIT ? "webkitTransitionEnd" : goog.userAgent.OPERA ? "oTransitionEnd" : "transitionend"};
goog.reflect = {};
goog.reflect.object = function(a, b) {
return b
};
goog.reflect.sinkValue = function(a) {
goog.reflect.sinkValue[" "](a);
return a
};
goog.reflect.sinkValue[" "] = goog.nullFunction;
goog.reflect.canAccessProperty = function(a, b) {
try {
return goog.reflect.sinkValue(a[b]), !0
}catch(c) {
}
return!1
};
goog.events.BrowserEvent = function(a, b) {
a && this.init(a, b)
};
goog.inherits(goog.events.BrowserEvent, goog.events.Event);
goog.events.BrowserEvent.MouseButton = {LEFT:0, MIDDLE:1, RIGHT:2};
goog.events.BrowserEvent.IEButtonMap = [1, 4, 2];
goog.events.BrowserEvent.prototype.target = null;
goog.events.BrowserEvent.prototype.relatedTarget = null;
goog.events.BrowserEvent.prototype.offsetX = 0;
goog.events.BrowserEvent.prototype.offsetY = 0;
goog.events.BrowserEvent.prototype.clientX = 0;
goog.events.BrowserEvent.prototype.clientY = 0;
goog.events.BrowserEvent.prototype.screenX = 0;
goog.events.BrowserEvent.prototype.screenY = 0;
goog.events.BrowserEvent.prototype.button = 0;
goog.events.BrowserEvent.prototype.keyCode = 0;
goog.events.BrowserEvent.prototype.charCode = 0;
goog.events.BrowserEvent.prototype.ctrlKey = !1;
goog.events.BrowserEvent.prototype.altKey = !1;
goog.events.BrowserEvent.prototype.shiftKey = !1;
goog.events.BrowserEvent.prototype.metaKey = !1;
goog.events.BrowserEvent.prototype.platformModifierKey = !1;
goog.events.BrowserEvent.prototype.event_ = null;
goog.events.BrowserEvent.prototype.init = function(a, b) {
var c = this.type = a.type;
goog.events.Event.call(this, c);
this.target = a.target || a.srcElement;
this.currentTarget = b;
var d = a.relatedTarget;
d ? goog.userAgent.GECKO && (goog.reflect.canAccessProperty(d, "nodeName") || (d = null)) : c == goog.events.EventType.MOUSEOVER ? d = a.fromElement : c == goog.events.EventType.MOUSEOUT && (d = a.toElement);
this.relatedTarget = d;
this.offsetX = goog.userAgent.WEBKIT || void 0 !== a.offsetX ? a.offsetX : a.layerX;
this.offsetY = goog.userAgent.WEBKIT || void 0 !== a.offsetY ? a.offsetY : a.layerY;
this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX;
this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY;
this.screenX = a.screenX || 0;
this.screenY = a.screenY || 0;
this.button = a.button;
this.keyCode = a.keyCode || 0;
this.charCode = a.charCode || ("keypress" == c ? a.keyCode : 0);
this.ctrlKey = a.ctrlKey;
this.altKey = a.altKey;
this.shiftKey = a.shiftKey;
this.metaKey = a.metaKey;
this.platformModifierKey = goog.userAgent.MAC ? a.metaKey : a.ctrlKey;
this.state = a.state;
this.event_ = a;
a.defaultPrevented && this.preventDefault();
delete this.propagationStopped_
};
goog.events.BrowserEvent.prototype.isButton = function(a) {
return goog.events.BrowserFeature.HAS_W3C_BUTTON ? this.event_.button == a : "click" == this.type ? a == goog.events.BrowserEvent.MouseButton.LEFT : !!(this.event_.button & goog.events.BrowserEvent.IEButtonMap[a])
};
goog.events.BrowserEvent.prototype.isMouseActionButton = function() {
return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT) && !(goog.userAgent.WEBKIT && goog.userAgent.MAC && this.ctrlKey)
};
goog.events.BrowserEvent.prototype.stopPropagation = function() {
goog.events.BrowserEvent.superClass_.stopPropagation.call(this);
this.event_.stopPropagation ? this.event_.stopPropagation() : this.event_.cancelBubble = !0
};
goog.events.BrowserEvent.prototype.preventDefault = function() {
goog.events.BrowserEvent.superClass_.preventDefault.call(this);
var a = this.event_;
if(a.preventDefault) {
a.preventDefault()
}else {
if(a.returnValue = !1, goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT) {
try {
if(a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode) {
a.keyCode = -1
}
}catch(b) {
}
}
}
};
goog.events.BrowserEvent.prototype.getBrowserEvent = function() {
return this.event_
};
goog.events.BrowserEvent.prototype.disposeInternal = function() {
};
goog.events.EventWrapper = function() {
};
goog.events.EventWrapper.prototype.listen = function() {
};
goog.events.EventWrapper.prototype.unlisten = function() {
};
goog.events.Listener = function() {
goog.events.Listener.ENABLE_MONITORING && (this.creationStack = Error().stack)
};
goog.events.Listener.counter_ = 0;
goog.events.Listener.ENABLE_MONITORING = !1;
goog.events.Listener.prototype.key = 0;
goog.events.Listener.prototype.removed = !1;
goog.events.Listener.prototype.callOnce = !1;
goog.events.Listener.prototype.init = function(a, b, c, d, e, f) {
if(goog.isFunction(a)) {
this.isFunctionListener_ = !0
}else {
if(a && a.handleEvent && goog.isFunction(a.handleEvent)) {
this.isFunctionListener_ = !1
}else {
throw Error("Invalid listener argument");
}
}
this.listener = a;
this.proxy = b;
this.src = c;
this.type = d;
this.capture = !!e;
this.handler = f;
this.callOnce = !1;
this.key = ++goog.events.Listener.counter_;
this.removed = !1
};
goog.events.Listener.prototype.handleEvent = function(a) {
return this.isFunctionListener_ ? this.listener.call(this.handler || this.src, a) : this.listener.handleEvent.call(this.listener, a)
};
goog.events.listeners_ = {};
goog.events.listenerTree_ = {};
goog.events.sources_ = {};
goog.events.onString_ = "on";
goog.events.onStringMap_ = {};
goog.events.keySeparator_ = "_";
goog.events.listen = function(a, b, c, d, e) {
if(b) {
if(goog.isArray(b)) {
for(var f = 0;f < b.length;f++) {
goog.events.listen(a, b[f], c, d, e)
}
return null
}
var d = !!d, g = goog.events.listenerTree_;
b in g || (g[b] = {count_:0, remaining_:0});
g = g[b];
d in g || (g[d] = {count_:0, remaining_:0}, g.count_++);
var g = g[d], h = goog.getUid(a), i;
g.remaining_++;
if(g[h]) {
i = g[h];
for(f = 0;f < i.length;f++) {
if(g = i[f], g.listener == c && g.handler == e) {
if(g.removed) {
break
}
return i[f].key
}
}
}else {
i = g[h] = [], g.count_++
}
f = goog.events.getProxy();
f.src = a;
g = new goog.events.Listener;
g.init(c, f, a, b, d, e);
c = g.key;
f.key = c;
i.push(g);
goog.events.listeners_[c] = g;
goog.events.sources_[h] || (goog.events.sources_[h] = []);
goog.events.sources_[h].push(g);
a.addEventListener ? (a == goog.global || !a.customEvent_) && a.addEventListener(b, f, d) : a.attachEvent(goog.events.getOnString_(b), f);
return c
}
throw Error("Invalid event type");
};
goog.events.getProxy = function() {
var a = goog.events.handleBrowserEvent_, b = goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT ? function(c) {
return a.call(b.src, b.key, c)
} : function(c) {
c = a.call(b.src, b.key, c);
if(!c) {
return c
}
};
return b
};
goog.events.listenOnce = function(a, b, c, d, e) {
if(goog.isArray(b)) {
for(var f = 0;f < b.length;f++) {
goog.events.listenOnce(a, b[f], c, d, e)
}
return null
}
a = goog.events.listen(a, b, c, d, e);
goog.events.listeners_[a].callOnce = !0;
return a
};
goog.events.listenWithWrapper = function(a, b, c, d, e) {
b.listen(a, c, d, e)
};
goog.events.unlisten = function(a, b, c, d, e) {
if(goog.isArray(b)) {
for(var f = 0;f < b.length;f++) {
goog.events.unlisten(a, b[f], c, d, e)
}
return null
}
d = !!d;
a = goog.events.getListeners_(a, b, d);
if(!a) {
return!1
}
for(f = 0;f < a.length;f++) {
if(a[f].listener == c && a[f].capture == d && a[f].handler == e) {
return goog.events.unlistenByKey(a[f].key)
}
}
return!1
};
goog.events.unlistenByKey = function(a) {
if(!goog.events.listeners_[a]) {
return!1
}
var b = goog.events.listeners_[a];
if(b.removed) {
return!1
}
var c = b.src, d = b.type, e = b.proxy, f = b.capture;
c.removeEventListener ? (c == goog.global || !c.customEvent_) && c.removeEventListener(d, e, f) : c.detachEvent && c.detachEvent(goog.events.getOnString_(d), e);
c = goog.getUid(c);
goog.events.sources_[c] && (e = goog.events.sources_[c], goog.array.remove(e, b), 0 == e.length && delete goog.events.sources_[c]);
b.removed = !0;
if(b = goog.events.listenerTree_[d][f][c]) {
b.needsCleanup_ = !0, goog.events.cleanUp_(d, f, c, b)
}
delete goog.events.listeners_[a];
return!0
};
goog.events.unlistenWithWrapper = function(a, b, c, d, e) {
b.unlisten(a, c, d, e)
};
goog.events.cleanUp_ = function(a, b, c, d) {
if(!d.locked_ && d.needsCleanup_) {
for(var e = 0, f = 0;e < d.length;e++) {
d[e].removed ? d[e].proxy.src = null : (e != f && (d[f] = d[e]), f++)
}
d.length = f;
d.needsCleanup_ = !1;
0 == f && (delete goog.events.listenerTree_[a][b][c], goog.events.listenerTree_[a][b].count_--, 0 == goog.events.listenerTree_[a][b].count_ && (delete goog.events.listenerTree_[a][b], goog.events.listenerTree_[a].count_--), 0 == goog.events.listenerTree_[a].count_ && delete goog.events.listenerTree_[a])
}
};
goog.events.removeAll = function(a, b, c) {
var d = 0, e = null == b, f = null == c, c = !!c;
if(null == a) {
goog.object.forEach(goog.events.sources_, function(a) {
for(var g = a.length - 1;0 <= g;g--) {
var h = a[g];
if((e || b == h.type) && (f || c == h.capture)) {
goog.events.unlistenByKey(h.key), d++
}
}
})
}else {
if(a = goog.getUid(a), goog.events.sources_[a]) {
for(var a = goog.events.sources_[a], g = a.length - 1;0 <= g;g--) {
var h = a[g];
if((e || b == h.type) && (f || c == h.capture)) {
goog.events.unlistenByKey(h.key), d++
}
}
}
}
return d
};
goog.events.getListeners = function(a, b, c) {
return goog.events.getListeners_(a, b, c) || []
};
goog.events.getListeners_ = function(a, b, c) {
var d = goog.events.listenerTree_;
return b in d && (d = d[b], c in d && (d = d[c], a = goog.getUid(a), d[a])) ? d[a] : null
};
goog.events.getListener = function(a, b, c, d, e) {
d = !!d;
if(a = goog.events.getListeners_(a, b, d)) {
for(b = 0;b < a.length;b++) {
if(!a[b].removed && a[b].listener == c && a[b].capture == d && a[b].handler == e) {
return a[b]
}
}
}
return null
};
goog.events.hasListener = function(a, b, c) {
var a = goog.getUid(a), d = goog.events.sources_[a];
if(d) {
var e = goog.isDef(b), f = goog.isDef(c);
return e && f ? (d = goog.events.listenerTree_[b], !!d && !!d[c] && a in d[c]) : !e && !f ? !0 : goog.array.some(d, function(a) {
return e && a.type == b || f && a.capture == c
})
}
return!1
};
goog.events.expose = function(a) {
var b = [], c;
for(c in a) {
a[c] && a[c].id ? b.push(c + " = " + a[c] + " (" + a[c].id + ")") : b.push(c + " = " + a[c])
}
return b.join("\n")
};
goog.events.getOnString_ = function(a) {
return a in goog.events.onStringMap_ ? goog.events.onStringMap_[a] : goog.events.onStringMap_[a] = goog.events.onString_ + a
};
goog.events.fireListeners = function(a, b, c, d) {
var e = goog.events.listenerTree_;
return b in e && (e = e[b], c in e) ? goog.events.fireListeners_(e[c], a, b, c, d) : !0
};
goog.events.fireListeners_ = function(a, b, c, d, e) {
var f = 1, b = goog.getUid(b);
if(a[b]) {
a.remaining_--;
a = a[b];
a.locked_ ? a.locked_++ : a.locked_ = 1;
try {
for(var g = a.length, h = 0;h < g;h++) {
var i = a[h];
i && !i.removed && (f &= !1 !== goog.events.fireListener(i, e))
}
}finally {
a.locked_--, goog.events.cleanUp_(c, d, b, a)
}
}
return Boolean(f)
};
goog.events.fireListener = function(a, b) {
a.callOnce && goog.events.unlistenByKey(a.key);
return a.handleEvent(b)
};
goog.events.getTotalListenerCount = function() {
return goog.object.getCount(goog.events.listeners_)
};
goog.events.dispatchEvent = function(a, b) {
var c = b.type || b, d = goog.events.listenerTree_;
if(!(c in d)) {
return!0
}
if(goog.isString(b)) {
b = new goog.events.Event(b, a)
}else {
if(b instanceof goog.events.Event) {
b.target = b.target || a
}else {
var e = b, b = new goog.events.Event(c, a);
goog.object.extend(b, e)
}
}
var e = 1, f, d = d[c], c = !0 in d, g;
if(c) {
f = [];
for(g = a;g;g = g.getParentEventTarget()) {
f.push(g)
}
g = d[!0];
g.remaining_ = g.count_;
for(var h = f.length - 1;!b.propagationStopped_ && 0 <= h && g.remaining_;h--) {
b.currentTarget = f[h], e &= goog.events.fireListeners_(g, f[h], b.type, !0, b) && !1 != b.returnValue_
}
}
if(!1 in d) {
if(g = d[!1], g.remaining_ = g.count_, c) {
for(h = 0;!b.propagationStopped_ && h < f.length && g.remaining_;h++) {
b.currentTarget = f[h], e &= goog.events.fireListeners_(g, f[h], b.type, !1, b) && !1 != b.returnValue_
}
}else {
for(d = a;!b.propagationStopped_ && d && g.remaining_;d = d.getParentEventTarget()) {
b.currentTarget = d, e &= goog.events.fireListeners_(g, d, b.type, !1, b) && !1 != b.returnValue_
}
}
}
return Boolean(e)
};
goog.events.protectBrowserEventEntryPoint = function(a) {
goog.events.handleBrowserEvent_ = a.protectEntryPoint(goog.events.handleBrowserEvent_)
};
goog.events.handleBrowserEvent_ = function(a, b) {
if(!goog.events.listeners_[a]) {
return!0
}
var c = goog.events.listeners_[a], d = c.type, e = goog.events.listenerTree_;
if(!(d in e)) {
return!0
}
var e = e[d], f, g;
if(!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT) {
f = b || goog.getObjectByName("window.event");
var h = !0 in e, i = !1 in e;
if(h) {
if(goog.events.isMarkedIeEvent_(f)) {
return!0
}
goog.events.markIeEvent_(f)
}
var j = new goog.events.BrowserEvent;
j.init(f, this);
f = !0;
try {
if(h) {
for(var k = [], m = j.currentTarget;m;m = m.parentNode) {
k.push(m)
}
g = e[!0];
g.remaining_ = g.count_;
for(var l = k.length - 1;!j.propagationStopped_ && 0 <= l && g.remaining_;l--) {
j.currentTarget = k[l], f &= goog.events.fireListeners_(g, k[l], d, !0, j)
}
if(i) {
g = e[!1];
g.remaining_ = g.count_;
for(l = 0;!j.propagationStopped_ && l < k.length && g.remaining_;l++) {
j.currentTarget = k[l], f &= goog.events.fireListeners_(g, k[l], d, !1, j)
}
}
}else {
f = goog.events.fireListener(c, j)
}
}finally {
k && (k.length = 0)
}
return f
}
d = new goog.events.BrowserEvent(b, this);
return f = goog.events.fireListener(c, d)
};
goog.events.markIeEvent_ = function(a) {
var b = !1;
if(0 == a.keyCode) {
try {
a.keyCode = -1;
return
}catch(c) {
b = !0
}
}
if(b || void 0 == a.returnValue) {
a.returnValue = !0
}
};
goog.events.isMarkedIeEvent_ = function(a) {
return 0 > a.keyCode || void 0 != a.returnValue
};
goog.events.uniqueIdCounter_ = 0;
goog.events.getUniqueId = function(a) {
return a + "_" + goog.events.uniqueIdCounter_++
};
goog.debug.entryPointRegistry.register(function(a) {
goog.events.handleBrowserEvent_ = a(goog.events.handleBrowserEvent_)
});
goog.events.EventTarget = function() {
goog.Disposable.call(this)
};
goog.inherits(goog.events.EventTarget, goog.Disposable);
goog.events.EventTarget.prototype.customEvent_ = !0;
goog.events.EventTarget.prototype.parentEventTarget_ = null;
goog.events.EventTarget.prototype.getParentEventTarget = function() {
return this.parentEventTarget_
};
goog.events.EventTarget.prototype.setParentEventTarget = function(a) {
this.parentEventTarget_ = a
};
goog.events.EventTarget.prototype.addEventListener = function(a, b, c, d) {
goog.events.listen(this, a, b, c, d)
};
goog.events.EventTarget.prototype.removeEventListener = function(a, b, c, d) {
goog.events.unlisten(this, a, b, c, d)
};
goog.events.EventTarget.prototype.dispatchEvent = function(a) {
return goog.events.dispatchEvent(this, a)
};
goog.events.EventTarget.prototype.disposeInternal = function() {
goog.events.EventTarget.superClass_.disposeInternal.call(this);
goog.events.removeAll(this);
this.parentEventTarget_ = null
};
goog.Timer = function(a, b) {
goog.events.EventTarget.call(this);
this.interval_ = a || 1;
this.timerObject_ = b || goog.Timer.defaultTimerObject;
this.boundTick_ = goog.bind(this.tick_, this);
this.last_ = goog.now()
};
goog.inherits(goog.Timer, goog.events.EventTarget);
goog.Timer.MAX_TIMEOUT_ = 2147483647;
goog.Timer.prototype.enabled = !1;
goog.Timer.defaultTimerObject = goog.global.window;
goog.Timer.intervalScale = 0.8;
goog.Timer.prototype.timer_ = null;
goog.Timer.prototype.getInterval = function() {
return this.interval_
};
goog.Timer.prototype.setInterval = function(a) {
this.interval_ = a;
this.timer_ && this.enabled ? (this.stop(), this.start()) : this.timer_ && this.stop()
};
goog.Timer.prototype.tick_ = function() {
if(this.enabled) {
var a = goog.now() - this.last_;
0 < a && a < this.interval_ * goog.Timer.intervalScale ? this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_ - a) : (this.dispatchTick(), this.enabled && (this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_), this.last_ = goog.now()))
}
};
goog.Timer.prototype.dispatchTick = function() {
this.dispatchEvent(goog.Timer.TICK)
};
goog.Timer.prototype.start = function() {
this.enabled = !0;
this.timer_ || (this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_), this.last_ = goog.now())
};
goog.Timer.prototype.stop = function() {
this.enabled = !1;
this.timer_ && (this.timerObject_.clearTimeout(this.timer_), this.timer_ = null)
};
goog.Timer.prototype.disposeInternal = function() {
goog.Timer.superClass_.disposeInternal.call(this);
this.stop();
delete this.timerObject_
};
goog.Timer.TICK = "tick";
goog.Timer.callOnce = function(a, b, c) {
if(goog.isFunction(a)) {
c && (a = goog.bind(a, c))
}else {
if(a && "function" == typeof a.handleEvent) {
a = goog.bind(a.handleEvent, a)
}else {
throw Error("Invalid listener argument");
}
}
return b > goog.Timer.MAX_TIMEOUT_ ? -1 : goog.Timer.defaultTimerObject.setTimeout(a, b || 0)
};
goog.Timer.clear = function(a) {
goog.Timer.defaultTimerObject.clearTimeout(a)
};
goog.structs = {};
goog.structs.getCount = function(a) {
return"function" == typeof a.getCount ? a.getCount() : goog.isArrayLike(a) || goog.isString(a) ? a.length : goog.object.getCount(a)
};
goog.structs.getValues = function(a) {
if("function" == typeof a.getValues) {
return a.getValues()
}
if(goog.isString(a)) {
return a.split("")
}
if(goog.isArrayLike(a)) {
for(var b = [], c = a.length, d = 0;d < c;d++) {
b.push(a[d])
}
return b
}
return goog.object.getValues(a)
};
goog.structs.getKeys = function(a) {
if("function" == typeof a.getKeys) {
return a.getKeys()
}
if("function" != typeof a.getValues) {
if(goog.isArrayLike(a) || goog.isString(a)) {
for(var b = [], a = a.length, c = 0;c < a;c++) {
b.push(c)
}
return b
}
return goog.object.getKeys(a)
}
};
goog.structs.contains = function(a, b) {
return"function" == typeof a.contains ? a.contains(b) : "function" == typeof a.containsValue ? a.containsValue(b) : goog.isArrayLike(a) || goog.isString(a) ? goog.array.contains(a, b) : goog.object.containsValue(a, b)
};
goog.structs.isEmpty = function(a) {
return"function" == typeof a.isEmpty ? a.isEmpty() : goog.isArrayLike(a) || goog.isString(a) ? goog.array.isEmpty(a) : goog.object.isEmpty(a)
};
goog.structs.clear = function(a) {
"function" == typeof a.clear ? a.clear() : goog.isArrayLike(a) ? goog.array.clear(a) : goog.object.clear(a)
};
goog.structs.forEach = function(a, b, c) {
if("function" == typeof a.forEach) {
a.forEach(b, c)
}else {
if(goog.isArrayLike(a) || goog.isString(a)) {
goog.array.forEach(a, b, c)
}else {
for(var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
b.call(c, e[g], d && d[g], a)
}
}
}
};
goog.structs.filter = function(a, b, c) {
if("function" == typeof a.filter) {
return a.filter(b, c)
}
if(goog.isArrayLike(a) || goog.isString(a)) {
return goog.array.filter(a, b, c)
}
var d, e = goog.structs.getKeys(a), f = goog.structs.getValues(a), g = f.length;
if(e) {
d = {};
for(var h = 0;h < g;h++) {
b.call(c, f[h], e[h], a) && (d[e[h]] = f[h])
}
}else {
d = [];
for(h = 0;h < g;h++) {
b.call(c, f[h], void 0, a) && d.push(f[h])
}
}
return d
};
goog.structs.map = function(a, b, c) {
if("function" == typeof a.map) {
return a.map(b, c)
}
if(goog.isArrayLike(a) || goog.isString(a)) {
return goog.array.map(a, b, c)
}
var d, e = goog.structs.getKeys(a), f = goog.structs.getValues(a), g = f.length;
if(e) {
d = {};
for(var h = 0;h < g;h++) {
d[e[h]] = b.call(c, f[h], e[h], a)
}
}else {
d = [];
for(h = 0;h < g;h++) {
d[h] = b.call(c, f[h], void 0, a)
}
}
return d
};
goog.structs.some = function(a, b, c) {
if("function" == typeof a.some) {
return a.some(b, c)
}
if(goog.isArrayLike(a) || goog.isString(a)) {
return goog.array.some(a, b, c)
}
for(var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
if(b.call(c, e[g], d && d[g], a)) {
return!0
}
}
return!1
};
goog.structs.every = function(a, b, c) {
if("function" == typeof a.every) {
return a.every(b, c)
}
if(goog.isArrayLike(a) || goog.isString(a)) {
return goog.array.every(a, b, c)
}
for(var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
if(!b.call(c, e[g], d && d[g], a)) {
return!1
}
}
return!0
};
goog.structs.Collection = function() {
};
goog.iter = {};
goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopIteration : Error("StopIteration");
goog.iter.Iterator = function() {
};
goog.iter.Iterator.prototype.next = function() {
throw goog.iter.StopIteration;
};
goog.iter.Iterator.prototype.__iterator__ = function() {
return this
};
goog.iter.toIterator = function(a) {
if(a instanceof goog.iter.Iterator) {
return a
}
if("function" == typeof a.__iterator__) {
return a.__iterator__(!1)
}
if(goog.isArrayLike(a)) {
var b = 0, c = new goog.iter.Iterator;
c.next = function() {
for(;;) {
if(b >= a.length) {
throw goog.iter.StopIteration;
}
if(b in a) {
return a[b++]
}
b++
}
};
return c
}
throw Error("Not implemented");
};
goog.iter.forEach = function(a, b, c) {
if(goog.isArrayLike(a)) {
try {
goog.array.forEach(a, b, c)
}catch(d) {
if(d !== goog.iter.StopIteration) {
throw d;
}
}
}else {
a = goog.iter.toIterator(a);
try {
for(;;) {
b.call(c, a.next(), void 0, a)
}
}catch(e) {
if(e !== goog.iter.StopIteration) {
throw e;
}
}
}
};
goog.iter.filter = function(a, b, c) {
var d = goog.iter.toIterator(a), a = new goog.iter.Iterator;
a.next = function() {
for(;;) {
var a = d.next();
if(b.call(c, a, void 0, d)) {
return a
}
}
};
return a
};
goog.iter.range = function(a, b, c) {
var d = 0, e = a, f = c || 1;
1 < arguments.length && (d = a, e = b);
if(0 == f) {
throw Error("Range step argument must not be zero");
}
var g = new goog.iter.Iterator;
g.next = function() {
if(0 < f && d >= e || 0 > f && d <= e) {
throw goog.iter.StopIteration;
}
var a = d;
d += f;
return a
};
return g
};
goog.iter.join = function(a, b) {
return goog.iter.toArray(a).join(b)
};
goog.iter.map = function(a, b, c) {
var d = goog.iter.toIterator(a), a = new goog.iter.Iterator;
a.next = function() {
for(;;) {
var a = d.next();
return b.call(c, a, void 0, d)
}
};
return a
};
goog.iter.reduce = function(a, b, c, d) {
var e = c;
goog.iter.forEach(a, function(a) {
e = b.call(d, e, a)
});
return e
};
goog.iter.some = function(a, b, c) {
a = goog.iter.toIterator(a);
try {
for(;;) {
if(b.call(c, a.next(), void 0, a)) {
return!0
}
}
}catch(d) {
if(d !== goog.iter.StopIteration) {
throw d;
}
}
return!1
};
goog.iter.every = function(a, b, c) {
a = goog.iter.toIterator(a);
try {
for(;;) {
if(!b.call(c, a.next(), void 0, a)) {
return!1
}
}
}catch(d) {
if(d !== goog.iter.StopIteration) {
throw d;
}
}
return!0
};
goog.iter.chain = function(a) {
var b = arguments, c = b.length, d = 0, e = new goog.iter.Iterator;
e.next = function() {
try {
if(d >= c) {
throw goog.iter.StopIteration;
}
return goog.iter.toIterator(b[d]).next()
}catch(a) {
if(a !== goog.iter.StopIteration || d >= c) {
throw a;
}
d++;
return this.next()
}
};
return e
};
goog.iter.dropWhile = function(a, b, c) {
var d = goog.iter.toIterator(a), a = new goog.iter.Iterator, e = !0;
a.next = function() {
for(;;) {
var a = d.next();
if(!e || !b.call(c, a, void 0, d)) {
return e = !1, a
}
}
};
return a
};
goog.iter.takeWhile = function(a, b, c) {
var d = goog.iter.toIterator(a), a = new goog.iter.Iterator, e = !0;
a.next = function() {
for(;;) {
if(e) {
var a = d.next();
if(b.call(c, a, void 0, d)) {
return a
}
e = !1
}else {
throw goog.iter.StopIteration;
}
}
};
return a
};
goog.iter.toArray = function(a) {
if(goog.isArrayLike(a)) {
return goog.array.toArray(a)
}
var a = goog.iter.toIterator(a), b = [];
goog.iter.forEach(a, function(a) {
b.push(a)
});
return b
};
goog.iter.equals = function(a, b) {
var a = goog.iter.toIterator(a), b = goog.iter.toIterator(b), c, d;
try {
for(;;) {
c = d = !1;
var e = a.next();
c = !0;
var f = b.next();
d = !0;
if(e != f) {
break
}
}
}catch(g) {
if(g !== goog.iter.StopIteration) {
throw g;
}
if(c && !d) {
return!1
}
if(!d) {
try {
b.next()
}catch(h) {
if(h !== goog.iter.StopIteration) {
throw h;
}
return!0
}
}
}
return!1
};
goog.iter.nextOrValue = function(a, b) {
try {
return goog.iter.toIterator(a).next()
}catch(c) {
if(c != goog.iter.StopIteration) {
throw c;
}
return b
}
};
goog.iter.product = function(a) {
if(goog.array.some(arguments, function(a) {
return!a.length
}) || !arguments.length) {
return new goog.iter.Iterator
}
var b = new goog.iter.Iterator, c = arguments, d = goog.array.repeat(0, c.length);
b.next = function() {
if(d) {
for(var a = goog.array.map(d, function(a, b) {
return c[b][a]
}), b = d.length - 1;0 <= b;b--) {
goog.asserts.assert(d);
if(d[b] < c[b].length - 1) {
d[b]++;
break
}
if(0 == b) {
d = null;
break
}
d[b] = 0
}
return a
}
throw goog.iter.StopIteration;
};
return b
};
goog.iter.cycle = function(a) {
var b = goog.iter.toIterator(a), c = [], d = 0, a = new goog.iter.Iterator, e = !1;
a.next = function() {
var a = null;
if(!e) {
try {
return a = b.next(), c.push(a), a
}catch(g) {
if(g != goog.iter.StopIteration || goog.array.isEmpty(c)) {
throw g;
}
e = !0
}
}
a = c[d];
d = (d + 1) % c.length;
return a
};
return a
};
goog.structs.Map = function(a, b) {
this.map_ = {};
this.keys_ = [];
var c = arguments.length;
if(1 < c) {
if(c % 2) {
throw Error("Uneven number of arguments");
}
for(var d = 0;d < c;d += 2) {
this.set(arguments[d], arguments[d + 1])
}
}else {
a && this.addAll(a)
}
};
goog.structs.Map.prototype.count_ = 0;
goog.structs.Map.prototype.version_ = 0;
goog.structs.Map.prototype.getCount = function() {
return this.count_
};
goog.structs.Map.prototype.getValues = function() {
this.cleanupKeysArray_();
for(var a = [], b = 0;b < this.keys_.length;b++) {
a.push(this.map_[this.keys_[b]])
}
return a
};
goog.structs.Map.prototype.getKeys = function() {
this.cleanupKeysArray_();
return this.keys_.concat()
};
goog.structs.Map.prototype.containsKey = function(a) {
return goog.structs.Map.hasKey_(this.map_, a)
};
goog.structs.Map.prototype.containsValue = function(a) {
for(var b = 0;b < this.keys_.length;b++) {
var c = this.keys_[b];
if(goog.structs.Map.hasKey_(this.map_, c) && this.map_[c] == a) {
return!0
}
}
return!1
};
goog.structs.Map.prototype.equals = function(a, b) {
if(this === a) {
return!0
}
if(this.count_ != a.getCount()) {
return!1
}
var c = b || goog.structs.Map.defaultEquals;
this.cleanupKeysArray_();
for(var d, e = 0;d = this.keys_[e];e++) {
if(!c(this.get(d), a.get(d))) {
return!1
}
}
return!0
};
goog.structs.Map.defaultEquals = function(a, b) {
return a === b
};
goog.structs.Map.prototype.isEmpty = function() {
return 0 == this.count_
};
goog.structs.Map.prototype.clear = function() {
this.map_ = {};
this.version_ = this.count_ = this.keys_.length = 0
};
goog.structs.Map.prototype.remove = function(a) {
return goog.structs.Map.hasKey_(this.map_, a) ? (delete this.map_[a], this.count_--, this.version_++, this.keys_.length > 2 * this.count_ && this.cleanupKeysArray_(), !0) : !1
};
goog.structs.Map.prototype.cleanupKeysArray_ = function() {
if(this.count_ != this.keys_.length) {
for(var a = 0, b = 0;a < this.keys_.length;) {
var c = this.keys_[a];
goog.structs.Map.hasKey_(this.map_, c) && (this.keys_[b++] = c);
a++
}
this.keys_.length = b
}
if(this.count_ != this.keys_.length) {
for(var d = {}, b = a = 0;a < this.keys_.length;) {
c = this.keys_[a], goog.structs.Map.hasKey_(d, c) || (this.keys_[b++] = c, d[c] = 1), a++
}
this.keys_.length = b
}
};
goog.structs.Map.prototype.get = function(a, b) {
return goog.structs.Map.hasKey_(this.map_, a) ? this.map_[a] : b
};
goog.structs.Map.prototype.set = function(a, b) {
goog.structs.Map.hasKey_(this.map_, a) || (this.count_++, this.keys_.push(a), this.version_++);
this.map_[a] = b
};
goog.structs.Map.prototype.addAll = function(a) {
var b;
a instanceof goog.structs.Map ? (b = a.getKeys(), a = a.getValues()) : (b = goog.object.getKeys(a), a = goog.object.getValues(a));
for(var c = 0;c < b.length;c++) {
this.set(b[c], a[c])
}
};
goog.structs.Map.prototype.clone = function() {
return new goog.structs.Map(this)
};
goog.structs.Map.prototype.transpose = function() {
for(var a = new goog.structs.Map, b = 0;b < this.keys_.length;b++) {
var c = this.keys_[b];
a.set(this.map_[c], c)
}
return a
};
goog.structs.Map.prototype.toObject = function() {
this.cleanupKeysArray_();
for(var a = {}, b = 0;b < this.keys_.length;b++) {
var c = this.keys_[b];
a[c] = this.map_[c]
}
return a
};
goog.structs.Map.prototype.getKeyIterator = function() {
return this.__iterator__(!0)
};
goog.structs.Map.prototype.getValueIterator = function() {
return this.__iterator__(!1)
};
goog.structs.Map.prototype.__iterator__ = function(a) {
this.cleanupKeysArray_();
var b = 0, c = this.keys_, d = this.map_, e = this.version_, f = this, g = new goog.iter.Iterator;
g.next = function() {
for(;;) {
if(e != f.version_) {
throw Error("The map has changed since the iterator was created");
}
if(b >= c.length) {
throw goog.iter.StopIteration;
}
var g = c[b++];
return a ? g : d[g]
}
};
return g
};
goog.structs.Map.hasKey_ = function(a, b) {
return Object.prototype.hasOwnProperty.call(a, b)
};
goog.structs.Set = function(a) {
this.map_ = new goog.structs.Map;
a && this.addAll(a)
};
goog.structs.Set.getKey_ = function(a) {
var b = typeof a;
return"object" == b && a || "function" == b ? "o" + goog.getUid(a) : b.substr(0, 1) + a
};
goog.structs.Set.prototype.getCount = function() {
return this.map_.getCount()
};
goog.structs.Set.prototype.add = function(a) {
this.map_.set(goog.structs.Set.getKey_(a), a)
};
goog.structs.Set.prototype.addAll = function(a) {
for(var a = goog.structs.getValues(a), b = a.length, c = 0;c < b;c++) {
this.add(a[c])
}
};
goog.structs.Set.prototype.removeAll = function(a) {
for(var a = goog.structs.getValues(a), b = a.length, c = 0;c < b;c++) {
this.remove(a[c])
}
};
goog.structs.Set.prototype.remove = function(a) {
return this.map_.remove(goog.structs.Set.getKey_(a))
};
goog.structs.Set.prototype.clear = function() {
this.map_.clear()
};
goog.structs.Set.prototype.isEmpty = function() {
return this.map_.isEmpty()
};
goog.structs.Set.prototype.contains = function(a) {
return this.map_.containsKey(goog.structs.Set.getKey_(a))
};
goog.structs.Set.prototype.containsAll = function(a) {
return goog.structs.every(a, this.contains, this)
};
goog.structs.Set.prototype.intersection = function(a) {
for(var b = new goog.structs.Set, a = goog.structs.getValues(a), c = 0;c < a.length;c++) {
var d = a[c];
this.contains(d) && b.add(d)
}
return b
};
goog.structs.Set.prototype.difference = function(a) {
var b = this.clone();
b.removeAll(a);
return b
};
goog.structs.Set.prototype.getValues = function() {
return this.map_.getValues()
};
goog.structs.Set.prototype.clone = function() {
return new goog.structs.Set(this)
};
goog.structs.Set.prototype.equals = function(a) {
return this.getCount() == goog.structs.getCount(a) && this.isSubsetOf(a)
};
goog.structs.Set.prototype.isSubsetOf = function(a) {
var b = goog.structs.getCount(a);
if(this.getCount() > b) {
return!1
}
!(a instanceof goog.structs.Set) && 5 < b && (a = new goog.structs.Set(a));
return goog.structs.every(this, function(b) {
return goog.structs.contains(a, b)
})
};
goog.structs.Set.prototype.__iterator__ = function() {
return this.map_.__iterator__(!1)
};
goog.debug.catchErrors = function(a, b, c) {
var c = c || goog.global, d = c.onerror, e = !!b;
goog.userAgent.WEBKIT && !goog.userAgent.isVersion("535.3") && (e = !e);
c.onerror = function(b, c, h) {
d && d(b, c, h);
a({message:b, fileName:c, line:h});
return e
}
};
goog.debug.expose = function(a, b) {
if("undefined" == typeof a) {
return"undefined"
}
if(null == a) {
return"NULL"
}
var c = [], d;
for(d in a) {
if(b || !goog.isFunction(a[d])) {
var e = d + " = ";
try {
e += a[d]
}catch(f) {
e += "*** " + f + " ***"
}
c.push(e)
}
}
return c.join("\n")
};
goog.debug.deepExpose = function(a, b) {
var c = new goog.structs.Set, d = [], e = function(a, g) {
var h = g + " ";
try {
if(goog.isDef(a)) {
if(goog.isNull(a)) {
d.push("NULL")
}else {
if(goog.isString(a)) {
d.push('"' + a.replace(/\n/g, "\n" + g) + '"')
}else {
if(goog.isFunction(a)) {
d.push(String(a).replace(/\n/g, "\n" + g))
}else {
if(goog.isObject(a)) {
if(c.contains(a)) {
d.push("*** reference loop detected ***")
}else {
c.add(a);
d.push("{");
for(var i in a) {
if(b || !goog.isFunction(a[i])) {
d.push("\n"), d.push(h), d.push(i + " = "), e(a[i], h)
}
}
d.push("\n" + g + "}")
}
}else {
d.push(a)
}
}
}
}
}else {
d.push("undefined")
}
}catch(j) {
d.push("*** " + j + " ***")
}
};
e(a, "");
return d.join("")
};
goog.debug.exposeArray = function(a) {
for(var b = [], c = 0;c < a.length;c++) {
goog.isArray(a[c]) ? b.push(goog.debug.exposeArray(a[c])) : b.push(a[c])
}
return"[ " + b.join(", ") + " ]"
};
goog.debug.exposeException = function(a, b) {
try {
var c = goog.debug.normalizeErrorObject(a);
return"Message: " + goog.string.htmlEscape(c.message) + '\nUrl: <a href="view-source:' + c.fileName + '" target="_new">' + c.fileName + "</a>\nLine: " + c.lineNumber + "\n\nBrowser stack:\n" + goog.string.htmlEscape(c.stack + "-> ") + "[end]\n\nJS stack traversal:\n" + goog.string.htmlEscape(goog.debug.getStacktrace(b) + "-> ")
}catch(d) {
return"Exception trying to expose exception! You win, we lose. " + d
}
};
goog.debug.normalizeErrorObject = function(a) {
var b = goog.getObjectByName("window.location.href");
if(goog.isString(a)) {
return{message:a, name:"Unknown error", lineNumber:"Not available", fileName:b, stack:"Not available"}
}
var c, d, e = !1;
try {
c = a.lineNumber || a.line || "Not available"
}catch(f) {
c = "Not available", e = !0
}
try {
d = a.fileName || a.filename || a.sourceURL || b
}catch(g) {
d = "Not available", e = !0
}
return e || !a.lineNumber || !a.fileName || !a.stack ? {message:a.message, name:a.name, lineNumber:c, fileName:d, stack:a.stack || "Not available"} : a
};
goog.debug.enhanceError = function(a, b) {
var c = "string" == typeof a ? Error(a) : a;
c.stack || (c.stack = goog.debug.getStacktrace(arguments.callee.caller));
if(b) {
for(var d = 0;c["message" + d];) {
++d
}
c["message" + d] = String(b)
}
return c
};
goog.debug.getStacktraceSimple = function(a) {
for(var b = [], c = arguments.callee.caller, d = 0;c && (!a || d < a);) {
b.push(goog.debug.getFunctionName(c));
b.push("()\n");
try {
c = c.caller
}catch(e) {
b.push("[exception trying to get caller]\n");
break
}
d++;
if(d >= goog.debug.MAX_STACK_DEPTH) {
b.push("[...long stack...]");
break
}
}
a && d >= a ? b.push("[...reached max depth limit...]") : b.push("[end]");
return b.join("")
};
goog.debug.MAX_STACK_DEPTH = 50;
goog.debug.getStacktrace = function(a) {
return goog.debug.getStacktraceHelper_(a || arguments.callee.caller, [])
};
goog.debug.getStacktraceHelper_ = function(a, b) {
var c = [];
if(goog.array.contains(b, a)) {
c.push("[...circular reference...]")
}else {
if(a && b.length < goog.debug.MAX_STACK_DEPTH) {
c.push(goog.debug.getFunctionName(a) + "(");
for(var d = a.arguments, e = 0;e < d.length;e++) {
0 < e && c.push(", ");
var f;
f = d[e];
switch(typeof f) {
case "object":
f = f ? "object" : "null";
break;
case "string":
break;
case "number":
f = String(f);
break;
case "boolean":
f = f ? "true" : "false";
break;
case "function":
f = (f = goog.debug.getFunctionName(f)) ? f : "[fn]";
break;
default:
f = typeof f
}
40 < f.length && (f = f.substr(0, 40) + "...");
c.push(f)
}
b.push(a);
c.push(")\n");
try {
c.push(goog.debug.getStacktraceHelper_(a.caller, b))
}catch(g) {
c.push("[exception trying to get caller]\n")
}
}else {
a ? c.push("[...long stack...]") : c.push("[end]")
}
}
return c.join("")
};
goog.debug.setFunctionResolver = function(a) {
goog.debug.fnNameResolver_ = a
};
goog.debug.getFunctionName = function(a) {
if(goog.debug.fnNameCache_[a]) {
return goog.debug.fnNameCache_[a]
}
if(goog.debug.fnNameResolver_) {
var b = goog.debug.fnNameResolver_(a);
if(b) {
return goog.debug.fnNameCache_[a] = b
}
}
a = String(a);
goog.debug.fnNameCache_[a] || (b = /function ([^\(]+)/.exec(a), goog.debug.fnNameCache_[a] = b ? b[1] : "[Anonymous]");
return goog.debug.fnNameCache_[a]
};
goog.debug.makeWhitespaceVisible = function(a) {
return a.replace(/ /g, "[_]").replace(/\f/g, "[f]").replace(/\n/g, "[n]\n").replace(/\r/g, "[r]").replace(/\t/g, "[t]")
};
goog.debug.fnNameCache_ = {};
goog.debug.LogRecord = function(a, b, c, d, e) {
this.reset(a, b, c, d, e)
};
goog.debug.LogRecord.prototype.sequenceNumber_ = 0;
goog.debug.LogRecord.prototype.exception_ = null;
goog.debug.LogRecord.prototype.exceptionText_ = null;
goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS = !0;
goog.debug.LogRecord.nextSequenceNumber_ = 0;
goog.debug.LogRecord.prototype.reset = function(a, b, c, d, e) {
goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS && (this.sequenceNumber_ = "number" == typeof e ? e : goog.debug.LogRecord.nextSequenceNumber_++);
this.time_ = d || goog.now();
this.level_ = a;
this.msg_ = b;
this.loggerName_ = c;
delete this.exception_;
delete this.exceptionText_
};
goog.debug.LogRecord.prototype.getLoggerName = function() {
return this.loggerName_
};
goog.debug.LogRecord.prototype.getException = function() {
return this.exception_
};
goog.debug.LogRecord.prototype.setException = function(a) {
this.exception_ = a
};
goog.debug.LogRecord.prototype.getExceptionText = function() {
return this.exceptionText_
};
goog.debug.LogRecord.prototype.setExceptionText = function(a) {
this.exceptionText_ = a
};
goog.debug.LogRecord.prototype.setLoggerName = function(a) {
this.loggerName_ = a
};
goog.debug.LogRecord.prototype.getLevel = function() {
return this.level_
};
goog.debug.LogRecord.prototype.setLevel = function(a) {
this.level_ = a
};
goog.debug.LogRecord.prototype.getMessage = function() {
return this.msg_
};
goog.debug.LogRecord.prototype.setMessage = function(a) {
this.msg_ = a
};
goog.debug.LogRecord.prototype.getMillis = function() {
return this.time_
};
goog.debug.LogRecord.prototype.setMillis = function(a) {
this.time_ = a
};
goog.debug.LogRecord.prototype.getSequenceNumber = function() {
return this.sequenceNumber_
};
goog.debug.LogBuffer = function() {
goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(), "Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");
this.clear()
};
goog.debug.LogBuffer.getInstance = function() {
goog.debug.LogBuffer.instance_ || (goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer);
return goog.debug.LogBuffer.instance_
};
goog.debug.LogBuffer.CAPACITY = 0;
goog.debug.LogBuffer.prototype.addRecord = function(a, b, c) {
var d = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;
this.curIndex_ = d;
if(this.isFull_) {
return d = this.buffer_[d], d.reset(a, b, c), d
}
this.isFull_ = d == goog.debug.LogBuffer.CAPACITY - 1;
return this.buffer_[d] = new goog.debug.LogRecord(a, b, c)
};
goog.debug.LogBuffer.isBufferingEnabled = function() {
return 0 < goog.debug.LogBuffer.CAPACITY
};
goog.debug.LogBuffer.prototype.clear = function() {
this.buffer_ = Array(goog.debug.LogBuffer.CAPACITY);
this.curIndex_ = -1;
this.isFull_ = !1
};
goog.debug.LogBuffer.prototype.forEachRecord = function(a) {
var b = this.buffer_;
if(b[0]) {
var c = this.curIndex_, d = this.isFull_ ? c : -1;
do {
d = (d + 1) % goog.debug.LogBuffer.CAPACITY, a(b[d])
}while(d != c)
}
};
goog.debug.Logger = function(a) {
this.name_ = a
};
goog.debug.Logger.prototype.parent_ = null;
goog.debug.Logger.prototype.level_ = null;
goog.debug.Logger.prototype.children_ = null;
goog.debug.Logger.prototype.handlers_ = null;
goog.debug.Logger.ENABLE_HIERARCHY = !0;
goog.debug.Logger.ENABLE_HIERARCHY || (goog.debug.Logger.rootHandlers_ = []);
goog.debug.Logger.Level = function(a, b) {
this.name = a;
this.value = b
};
goog.debug.Logger.Level.prototype.toString = function() {
return this.name
};
goog.debug.Logger.Level.OFF = new goog.debug.Logger.Level("OFF", Infinity);
goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level("SHOUT", 1200);
goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level("SEVERE", 1E3);
goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level("WARNING", 900);
goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level("INFO", 800);
goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level("CONFIG", 700);
goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level("FINE", 500);
goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level("FINER", 400);
goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level("FINEST", 300);
goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level("ALL", 0);
goog.debug.Logger.Level.PREDEFINED_LEVELS = [goog.debug.Logger.Level.OFF, goog.debug.Logger.Level.SHOUT, goog.debug.Logger.Level.SEVERE, goog.debug.Logger.Level.WARNING, goog.debug.Logger.Level.INFO, goog.debug.Logger.Level.CONFIG, goog.debug.Logger.Level.FINE, goog.debug.Logger.Level.FINER, goog.debug.Logger.Level.FINEST, goog.debug.Logger.Level.ALL];
goog.debug.Logger.Level.predefinedLevelsCache_ = null;
goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {
goog.debug.Logger.Level.predefinedLevelsCache_ = {};
for(var a = 0, b;b = goog.debug.Logger.Level.PREDEFINED_LEVELS[a];a++) {
goog.debug.Logger.Level.predefinedLevelsCache_[b.value] = b, goog.debug.Logger.Level.predefinedLevelsCache_[b.name] = b
}
};
goog.debug.Logger.Level.getPredefinedLevel = function(a) {
goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
return goog.debug.Logger.Level.predefinedLevelsCache_[a] || null
};
goog.debug.Logger.Level.getPredefinedLevelByValue = function(a) {
goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
if(a in goog.debug.Logger.Level.predefinedLevelsCache_) {
return goog.debug.Logger.Level.predefinedLevelsCache_[a]
}
for(var b = 0;b < goog.debug.Logger.Level.PREDEFINED_LEVELS.length;++b) {
var c = goog.debug.Logger.Level.PREDEFINED_LEVELS[b];
if(c.value <= a) {
return c
}
}
return null
};
goog.debug.Logger.getLogger = function(a) {
return goog.debug.LogManager.getLogger(a)
};
goog.debug.Logger.logToProfilers = function(a) {
goog.global.console && (goog.global.console.timeStamp ? goog.global.console.timeStamp(a) : goog.global.console.markTimeline && goog.global.console.markTimeline(a));
goog.global.msWriteProfilerMark && goog.global.msWriteProfilerMark(a)
};
goog.debug.Logger.prototype.getName = function() {
return this.name_
};
goog.debug.Logger.prototype.addHandler = function(a) {
goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a))
};
goog.debug.Logger.prototype.removeHandler = function(a) {
var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
return!!b && goog.array.remove(b, a)
};
goog.debug.Logger.prototype.getParent = function() {
return this.parent_
};
goog.debug.Logger.prototype.getChildren = function() {
this.children_ || (this.children_ = {});
return this.children_
};
goog.debug.Logger.prototype.setLevel = function(a) {
goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a)
};
goog.debug.Logger.prototype.getLevel = function() {
return this.level_
};
goog.debug.Logger.prototype.getEffectiveLevel = function() {
if(!goog.debug.Logger.ENABLE_HIERARCHY) {
return goog.debug.Logger.rootLevel_
}
if(this.level_) {
return this.level_
}
if(this.parent_) {
return this.parent_.getEffectiveLevel()
}
goog.asserts.fail("Root logger has no level set.");
return null
};
goog.debug.Logger.prototype.isLoggable = function(a) {
return a.value >= this.getEffectiveLevel().value
};
goog.debug.Logger.prototype.log = function(a, b, c) {
this.isLoggable(a) && this.doLogRecord_(this.getLogRecord(a, b, c))
};
goog.debug.Logger.prototype.getLogRecord = function(a, b, c) {
var d = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
c && (d.setException(c), d.setExceptionText(goog.debug.exposeException(c, arguments.callee.caller)));
return d
};
goog.debug.Logger.prototype.shout = function(a, b) {
this.log(goog.debug.Logger.Level.SHOUT, a, b)
};
goog.debug.Logger.prototype.severe = function(a, b) {
this.log(goog.debug.Logger.Level.SEVERE, a, b)
};
goog.debug.Logger.prototype.warning = function(a, b) {
this.log(goog.debug.Logger.Level.WARNING, a, b)
};
goog.debug.Logger.prototype.info = function(a, b) {
this.log(goog.debug.Logger.Level.INFO, a, b)
};
goog.debug.Logger.prototype.config = function(a, b) {
this.log(goog.debug.Logger.Level.CONFIG, a, b)
};
goog.debug.Logger.prototype.fine = function(a, b) {
this.log(goog.debug.Logger.Level.FINE, a, b)
};
goog.debug.Logger.prototype.finer = function(a, b) {
this.log(goog.debug.Logger.Level.FINER, a, b)
};
goog.debug.Logger.prototype.finest = function(a, b) {
this.log(goog.debug.Logger.Level.FINEST, a, b)
};
goog.debug.Logger.prototype.logRecord = function(a) {
this.isLoggable(a.getLevel()) && this.doLogRecord_(a)
};
goog.debug.Logger.prototype.doLogRecord_ = function(a) {
goog.debug.Logger.logToProfilers("log:" + a.getMessage());
if(goog.debug.Logger.ENABLE_HIERARCHY) {
for(var b = this;b;) {
b.callPublish_(a), b = b.getParent()
}
}else {
for(var b = 0, c;c = goog.debug.Logger.rootHandlers_[b++];) {
c(a)
}
}
};
goog.debug.Logger.prototype.callPublish_ = function(a) {
if(this.handlers_) {
for(var b = 0, c;c = this.handlers_[b];b++) {
c(a)
}
}
};
goog.debug.Logger.prototype.setParent_ = function(a) {
this.parent_ = a
};
goog.debug.Logger.prototype.addChild_ = function(a, b) {
this.getChildren()[a] = b
};
goog.debug.LogManager = {};
goog.debug.LogManager.loggers_ = {};
goog.debug.LogManager.rootLogger_ = null;
goog.debug.LogManager.initialize = function() {
goog.debug.LogManager.rootLogger_ || (goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(""), goog.debug.LogManager.loggers_[""] = goog.debug.LogManager.rootLogger_, goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG))
};
goog.debug.LogManager.getLoggers = function() {
return goog.debug.LogManager.loggers_
};
goog.debug.LogManager.getRoot = function() {
goog.debug.LogManager.initialize();
return goog.debug.LogManager.rootLogger_
};
goog.debug.LogManager.getLogger = function(a) {
goog.debug.LogManager.initialize();
return goog.debug.LogManager.loggers_[a] || goog.debug.LogManager.createLogger_(a)
};
goog.debug.LogManager.createFunctionForCatchErrors = function(a) {
return function(b) {
(a || goog.debug.LogManager.getRoot()).severe("Error: " + b.message + " (" + b.fileName + " @ Line: " + b.line + ")")
}
};
goog.debug.LogManager.createLogger_ = function(a) {
var b = new goog.debug.Logger(a);
if(goog.debug.Logger.ENABLE_HIERARCHY) {
var c = a.lastIndexOf("."), d = a.substr(0, c), c = a.substr(c + 1), d = goog.debug.LogManager.getLogger(d);
d.addChild_(c, b);
b.setParent_(d)
}
return goog.debug.LogManager.loggers_[a] = b
};
goog.json = {};
goog.json.isValid_ = function(a) {
return/^\s*$/.test(a) ? !1 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x10-\x1f\x80-\x9f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""))
};
goog.json.parse = function(a) {
a = String(a);
if(goog.json.isValid_(a)) {
try {
return eval("(" + a + ")")
}catch(b) {
}
}
throw Error("Invalid JSON string: " + a);
};
goog.json.unsafeParse = function(a) {
return eval("(" + a + ")")
};
goog.json.serialize = function(a, b) {
return(new goog.json.Serializer(b)).serialize(a)
};
goog.json.Serializer = function(a) {
this.replacer_ = a
};
goog.json.Serializer.prototype.serialize = function(a) {
var b = [];
this.serialize_(a, b);
return b.join("")
};
goog.json.Serializer.prototype.serialize_ = function(a, b) {
switch(typeof a) {
case "string":
this.serializeString_(a, b);
break;
case "number":
this.serializeNumber_(a, b);
break;
case "boolean":
b.push(a);
break;
case "undefined":
b.push("null");
break;
case "object":
if(null == a) {
b.push("null");
break
}
if(goog.isArray(a)) {
this.serializeArray(a, b);
break
}
this.serializeObject_(a, b);
break;
case "function":
break;
default:
throw Error("Unknown type: " + typeof a);
}
};
goog.json.Serializer.charToJsonCharCache_ = {'"':'\\"', "\\":"\\\\", "/":"\\/", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\u000b"};
goog.json.Serializer.charsToReplace_ = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g : /[\\\"\x00-\x1f\x7f-\xff]/g;
goog.json.Serializer.prototype.serializeString_ = function(a, b) {
b.push('"', a.replace(goog.json.Serializer.charsToReplace_, function(a) {
if(a in goog.json.Serializer.charToJsonCharCache_) {
return goog.json.Serializer.charToJsonCharCache_[a]
}
var b = a.charCodeAt(0), e = "\\u";
16 > b ? e += "000" : 256 > b ? e += "00" : 4096 > b && (e += "0");
return goog.json.Serializer.charToJsonCharCache_[a] = e + b.toString(16)
}), '"')
};
goog.json.Serializer.prototype.serializeNumber_ = function(a, b) {
b.push(isFinite(a) && !isNaN(a) ? a : "null")
};
goog.json.Serializer.prototype.serializeArray = function(a, b) {
var c = a.length;
b.push("[");
for(var d = "", e = 0;e < c;e++) {
b.push(d), d = a[e], this.serialize_(this.replacer_ ? this.replacer_.call(a, String(e), d) : d, b), d = ","
}
b.push("]")
};
goog.json.Serializer.prototype.serializeObject_ = function(a, b) {
b.push("{");
var c = "", d;
for(d in a) {
if(Object.prototype.hasOwnProperty.call(a, d)) {
var e = a[d];
"function" != typeof e && (b.push(c), this.serializeString_(d, b), b.push(":"), this.serialize_(this.replacer_ ? this.replacer_.call(a, d, e) : e, b), c = ",")
}
}
b.push("}")
};
goog.net = {};
goog.net.ErrorCode = {NO_ERROR:0, ACCESS_DENIED:1, FILE_NOT_FOUND:2, FF_SILENT_ERROR:3, CUSTOM_ERROR:4, EXCEPTION:5, HTTP_ERROR:6, ABORT:7, TIMEOUT:8, OFFLINE:9};
goog.net.ErrorCode.getDebugMessage = function(a) {
switch(a) {
case goog.net.ErrorCode.NO_ERROR:
return"No Error";
case goog.net.ErrorCode.ACCESS_DENIED:
return"Access denied to content document";
case goog.net.ErrorCode.FILE_NOT_FOUND:
return"File not found";
case goog.net.ErrorCode.FF_SILENT_ERROR:
return"Firefox silently errored";
case goog.net.ErrorCode.CUSTOM_ERROR:
return"Application custom error";
case goog.net.ErrorCode.EXCEPTION:
return"An exception occurred";
case goog.net.ErrorCode.HTTP_ERROR:
return"Http response at 400 or 500 level";
case goog.net.ErrorCode.ABORT:
return"Request was aborted";
case goog.net.ErrorCode.TIMEOUT:
return"Request timed out";
case goog.net.ErrorCode.OFFLINE:
return"The resource is not available offline";
default:
return"Unrecognized error code"
}
};
goog.net.EventType = {COMPLETE:"complete", SUCCESS:"success", ERROR:"error", ABORT:"abort", READY:"ready", READY_STATE_CHANGE:"readystatechange", TIMEOUT:"timeout", INCREMENTAL_DATA:"incrementaldata", PROGRESS:"progress"};
goog.net.HttpStatus = {CONTINUE:100, SWITCHING_PROTOCOLS:101, OK:200, CREATED:201, ACCEPTED:202, NON_AUTHORITATIVE_INFORMATION:203, NO_CONTENT:204, RESET_CONTENT:205, PARTIAL_CONTENT:206, MULTIPLE_CHOICES:300, MOVED_PERMANENTLY:301, FOUND:302, SEE_OTHER:303, NOT_MODIFIED:304, USE_PROXY:305, TEMPORARY_REDIRECT:307, BAD_REQUEST:400, UNAUTHORIZED:401, PAYMENT_REQUIRED:402, FORBIDDEN:403, NOT_FOUND:404, METHOD_NOT_ALLOWED:405, NOT_ACCEPTABLE:406, PROXY_AUTHENTICATION_REQUIRED:407, REQUEST_TIMEOUT:408,
CONFLICT:409, GONE:410, LENGTH_REQUIRED:411, PRECONDITION_FAILED:412, REQUEST_ENTITY_TOO_LARGE:413, REQUEST_URI_TOO_LONG:414, UNSUPPORTED_MEDIA_TYPE:415, REQUEST_RANGE_NOT_SATISFIABLE:416, EXPECTATION_FAILED:417, INTERNAL_SERVER_ERROR:500, NOT_IMPLEMENTED:501, BAD_GATEWAY:502, SERVICE_UNAVAILABLE:503, GATEWAY_TIMEOUT:504, HTTP_VERSION_NOT_SUPPORTED:505, QUIRK_IE_NO_CONTENT:1223};
goog.net.HttpStatus.isSuccess = function(a) {
switch(a) {
case goog.net.HttpStatus.OK:
;
case goog.net.HttpStatus.CREATED:
;
case goog.net.HttpStatus.ACCEPTED:
;
case goog.net.HttpStatus.NO_CONTENT:
;
case goog.net.HttpStatus.NOT_MODIFIED:
;
case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:
return!0;
default:
return!1
}
};
goog.net.XmlHttpFactory = function() {
};
goog.net.XmlHttpFactory.prototype.cachedOptions_ = null;
goog.net.XmlHttpFactory.prototype.getOptions = function() {
return this.cachedOptions_ || (this.cachedOptions_ = this.internalGetOptions())
};
goog.net.WrapperXmlHttpFactory = function(a, b) {
goog.net.XmlHttpFactory.call(this);
this.xhrFactory_ = a;
this.optionsFactory_ = b
};
goog.inherits(goog.net.WrapperXmlHttpFactory, goog.net.XmlHttpFactory);
goog.net.WrapperXmlHttpFactory.prototype.createInstance = function() {
return this.xhrFactory_()
};
goog.net.WrapperXmlHttpFactory.prototype.getOptions = function() {
return this.optionsFactory_()
};
goog.net.XmlHttp = function() {
return goog.net.XmlHttp.factory_.createInstance()
};
goog.net.XmlHttp.ASSUME_NATIVE_XHR = !1;
goog.net.XmlHttp.getOptions = function() {
return goog.net.XmlHttp.factory_.getOptions()
};
goog.net.XmlHttp.OptionType = {USE_NULL_FUNCTION:0, LOCAL_REQUEST_ERROR:1};
goog.net.XmlHttp.ReadyState = {UNINITIALIZED:0, LOADING:1, LOADED:2, INTERACTIVE:3, COMPLETE:4};
goog.net.XmlHttp.setFactory = function(a, b) {
goog.net.XmlHttp.setGlobalFactory(new goog.net.WrapperXmlHttpFactory(a, b))
};
goog.net.XmlHttp.setGlobalFactory = function(a) {
goog.net.XmlHttp.factory_ = a
};
goog.net.DefaultXmlHttpFactory = function() {
goog.net.XmlHttpFactory.call(this)
};
goog.inherits(goog.net.DefaultXmlHttpFactory, goog.net.XmlHttpFactory);
goog.net.DefaultXmlHttpFactory.prototype.createInstance = function() {
var a = this.getProgId_();
return a ? new ActiveXObject(a) : new XMLHttpRequest
};
goog.net.DefaultXmlHttpFactory.prototype.internalGetOptions = function() {
var a = {};
this.getProgId_() && (a[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] = !0, a[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR] = !0);
return a
};
goog.net.DefaultXmlHttpFactory.prototype.getProgId_ = function() {
if(goog.net.XmlHttp.ASSUME_NATIVE_XHR) {
return""
}
if(!this.ieProgId_ && "undefined" == typeof XMLHttpRequest && "undefined" != typeof ActiveXObject) {
for(var a = ["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], b = 0;b < a.length;b++) {
var c = a[b];
try {
return new ActiveXObject(c), this.ieProgId_ = c
}catch(d) {
}
}
throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");
}
return this.ieProgId_
};
goog.net.XmlHttp.setGlobalFactory(new goog.net.DefaultXmlHttpFactory);
goog.uri = {};
goog.uri.utils = {};
goog.uri.utils.CharCode_ = {AMPERSAND:38, EQUAL:61, HASH:35, QUESTION:63};
goog.uri.utils.buildFromEncodedParts = function(a, b, c, d, e, f, g) {
var h = [];
a && h.push(a, ":");
c && (h.push("//"), b && h.push(b, "@"), h.push(c), d && h.push(":", d));
e && h.push(e);
f && h.push("?", f);
g && h.push("#", g);
return h.join("")
};
goog.uri.utils.splitRe_ = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
goog.uri.utils.ComponentIndex = {SCHEME:1, USER_INFO:2, DOMAIN:3, PORT:4, PATH:5, QUERY_DATA:6, FRAGMENT:7};
goog.uri.utils.split = function(a) {
return a.match(goog.uri.utils.splitRe_)
};
goog.uri.utils.decodeIfPossible_ = function(a) {
return a && decodeURIComponent(a)
};
goog.uri.utils.getComponentByIndex_ = function(a, b) {
return goog.uri.utils.split(b)[a] || null
};
goog.uri.utils.getScheme = function(a) {
return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.SCHEME, a)
};
goog.uri.utils.getEffectiveScheme = function(a) {
a = goog.uri.utils.getScheme(a);
!a && self.location && (a = self.location.protocol, a = a.substr(0, a.length - 1));
return a ? a.toLowerCase() : ""
};
goog.uri.utils.getUserInfoEncoded = function(a) {
return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.USER_INFO, a)
};
goog.uri.utils.getUserInfo = function(a) {
return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getUserInfoEncoded(a))
};
goog.uri.utils.getDomainEncoded = function(a) {
return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.DOMAIN, a)
};
goog.uri.utils.getDomain = function(a) {
return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getDomainEncoded(a))
};
goog.uri.utils.getPort = function(a) {
return Number(goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PORT, a)) || null
};
goog.uri.utils.getPathEncoded = function(a) {
return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PATH, a)
};
goog.uri.utils.getPath = function(a) {
return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getPathEncoded(a))
};
goog.uri.utils.getQueryData = function(a) {
return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.QUERY_DATA, a)
};
goog.uri.utils.getFragmentEncoded = function(a) {
var b = a.indexOf("#");
return 0 > b ? null : a.substr(b + 1)
};
goog.uri.utils.setFragmentEncoded = function(a, b) {
return goog.uri.utils.removeFragment(a) + (b ? "#" + b : "")
};
goog.uri.utils.getFragment = function(a) {
return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getFragmentEncoded(a))
};
goog.uri.utils.getHost = function(a) {
a = goog.uri.utils.split(a);
return goog.uri.utils.buildFromEncodedParts(a[goog.uri.utils.ComponentIndex.SCHEME], a[goog.uri.utils.ComponentIndex.USER_INFO], a[goog.uri.utils.ComponentIndex.DOMAIN], a[goog.uri.utils.ComponentIndex.PORT])
};
goog.uri.utils.getPathAndAfter = function(a) {
a = goog.uri.utils.split(a);
return goog.uri.utils.buildFromEncodedParts(null, null, null, null, a[goog.uri.utils.ComponentIndex.PATH], a[goog.uri.utils.ComponentIndex.QUERY_DATA], a[goog.uri.utils.ComponentIndex.FRAGMENT])
};
goog.uri.utils.removeFragment = function(a) {
var b = a.indexOf("#");
return 0 > b ? a : a.substr(0, b)
};
goog.uri.utils.haveSameDomain = function(a, b) {
var c = goog.uri.utils.split(a), d = goog.uri.utils.split(b);
return c[goog.uri.utils.ComponentIndex.DOMAIN] == d[goog.uri.utils.ComponentIndex.DOMAIN] && c[goog.uri.utils.ComponentIndex.SCHEME] == d[goog.uri.utils.ComponentIndex.SCHEME] && c[goog.uri.utils.ComponentIndex.PORT] == d[goog.uri.utils.ComponentIndex.PORT]
};
goog.uri.utils.assertNoFragmentsOrQueries_ = function(a) {
if(goog.DEBUG && (0 <= a.indexOf("#") || 0 <= a.indexOf("?"))) {
throw Error("goog.uri.utils: Fragment or query identifiers are not supported: [" + a + "]");
}
};
goog.uri.utils.appendQueryData_ = function(a) {
if(a[1]) {
var b = a[0], c = b.indexOf("#");
0 <= c && (a.push(b.substr(c)), a[0] = b = b.substr(0, c));
c = b.indexOf("?");
0 > c ? a[1] = "?" : c == b.length - 1 && (a[1] = void 0)
}
return a.join("")
};
goog.uri.utils.appendKeyValuePairs_ = function(a, b, c) {
if(goog.isArray(b)) {
goog.asserts.assertArray(b);
for(var d = 0;d < b.length;d++) {
goog.uri.utils.appendKeyValuePairs_(a, String(b[d]), c)
}
}else {
null != b && c.push("&", a, "" === b ? "" : "=", goog.string.urlEncode(b))
}
};
goog.uri.utils.buildQueryDataBuffer_ = function(a, b, c) {
goog.asserts.assert(0 == Math.max(b.length - (c || 0), 0) % 2, "goog.uri.utils: Key/value lists must be even in length.");
for(c = c || 0;c < b.length;c += 2) {
goog.uri.utils.appendKeyValuePairs_(b[c], b[c + 1], a)
}
return a
};
goog.uri.utils.buildQueryData = function(a, b) {
var c = goog.uri.utils.buildQueryDataBuffer_([], a, b);
c[0] = "";
return c.join("")
};
goog.uri.utils.buildQueryDataBufferFromMap_ = function(a, b) {
for(var c in b) {
goog.uri.utils.appendKeyValuePairs_(c, b[c], a)
}
return a
};
goog.uri.utils.buildQueryDataFromMap = function(a) {
a = goog.uri.utils.buildQueryDataBufferFromMap_([], a);
a[0] = "";
return a.join("")
};
goog.uri.utils.appendParams = function(a, b) {
return goog.uri.utils.appendQueryData_(2 == arguments.length ? goog.uri.utils.buildQueryDataBuffer_([a], arguments[1], 0) : goog.uri.utils.buildQueryDataBuffer_([a], arguments, 1))
};
goog.uri.utils.appendParamsFromMap = function(a, b) {
return goog.uri.utils.appendQueryData_(goog.uri.utils.buildQueryDataBufferFromMap_([a], b))
};
goog.uri.utils.appendParam = function(a, b, c) {
return goog.uri.utils.appendQueryData_([a, "&", b, "=", goog.string.urlEncode(c)])
};
goog.uri.utils.findParam_ = function(a, b, c, d) {
for(var e = c.length;0 <= (b = a.indexOf(c, b)) && b < d;) {
var f = a.charCodeAt(b - 1);
if(f == goog.uri.utils.CharCode_.AMPERSAND || f == goog.uri.utils.CharCode_.QUESTION) {
if(f = a.charCodeAt(b + e), !f || f == goog.uri.utils.CharCode_.EQUAL || f == goog.uri.utils.CharCode_.AMPERSAND || f == goog.uri.utils.CharCode_.HASH) {
return b
}
}
b += e + 1
}
return-1
};
goog.uri.utils.hashOrEndRe_ = /#|$/;
goog.uri.utils.hasParam = function(a, b) {
return 0 <= goog.uri.utils.findParam_(a, 0, b, a.search(goog.uri.utils.hashOrEndRe_))
};
goog.uri.utils.getParamValue = function(a, b) {
var c = a.search(goog.uri.utils.hashOrEndRe_), d = goog.uri.utils.findParam_(a, 0, b, c);
if(0 > d) {
return null
}
var e = a.indexOf("&", d);
if(0 > e || e > c) {
e = c
}
d += b.length + 1;
return goog.string.urlDecode(a.substr(d, e - d))
};
goog.uri.utils.getParamValues = function(a, b) {
for(var c = a.search(goog.uri.utils.hashOrEndRe_), d = 0, e, f = [];0 <= (e = goog.uri.utils.findParam_(a, d, b, c));) {
d = a.indexOf("&", e);
if(0 > d || d > c) {
d = c
}
e += b.length + 1;
f.push(goog.string.urlDecode(a.substr(e, d - e)))
}
return f
};
goog.uri.utils.trailingQueryPunctuationRe_ = /[?&]($|#)/;
goog.uri.utils.removeParam = function(a, b) {
for(var c = a.search(goog.uri.utils.hashOrEndRe_), d = 0, e, f = [];0 <= (e = goog.uri.utils.findParam_(a, d, b, c));) {
f.push(a.substring(d, e)), d = Math.min(a.indexOf("&", e) + 1 || c, c)
}
f.push(a.substr(d));
return f.join("").replace(goog.uri.utils.trailingQueryPunctuationRe_, "$1")
};
goog.uri.utils.setParam = function(a, b, c) {
return goog.uri.utils.appendParam(goog.uri.utils.removeParam(a, b), b, c)
};
goog.uri.utils.appendPath = function(a, b) {
goog.uri.utils.assertNoFragmentsOrQueries_(a);
goog.string.endsWith(a, "/") && (a = a.substr(0, a.length - 1));
goog.string.startsWith(b, "/") && (b = b.substr(1));
return goog.string.buildString(a, "/", b)
};
goog.uri.utils.StandardQueryParam = {RANDOM:"zx"};
goog.uri.utils.makeUnique = function(a) {
return goog.uri.utils.setParam(a, goog.uri.utils.StandardQueryParam.RANDOM, goog.string.getRandomString())
};
goog.net.XhrIo = function(a) {
goog.events.EventTarget.call(this);
this.headers = new goog.structs.Map;
this.xmlHttpFactory_ = a || null
};
goog.inherits(goog.net.XhrIo, goog.events.EventTarget);
goog.net.XhrIo.ResponseType = {DEFAULT:"", TEXT:"text", DOCUMENT:"document", BLOB:"blob", ARRAY_BUFFER:"arraybuffer"};
goog.net.XhrIo.prototype.logger_ = goog.debug.Logger.getLogger("goog.net.XhrIo");
goog.net.XhrIo.CONTENT_TYPE_HEADER = "Content-Type";
goog.net.XhrIo.HTTP_SCHEME_PATTERN = /^https?$/i;
goog.net.XhrIo.FORM_CONTENT_TYPE = "application/x-www-form-urlencoded;charset=utf-8";
goog.net.XhrIo.sendInstances_ = [];
goog.net.XhrIo.send = function(a, b, c, d, e, f) {
var g = new goog.net.XhrIo;
goog.net.XhrIo.sendInstances_.push(g);
b && goog.events.listen(g, goog.net.EventType.COMPLETE, b);
goog.events.listen(g, goog.net.EventType.READY, goog.partial(goog.net.XhrIo.cleanupSend_, g));
f && g.setTimeoutInterval(f);
g.send(a, c, d, e)
};
goog.net.XhrIo.cleanup = function() {
for(var a = goog.net.XhrIo.sendInstances_;a.length;) {
a.pop().dispose()
}
};
goog.net.XhrIo.protectEntryPoints = function(a) {
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = a.protectEntryPoint(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)
};
goog.net.XhrIo.cleanupSend_ = function(a) {
a.dispose();
goog.array.remove(goog.net.XhrIo.sendInstances_, a)
};
goog.net.XhrIo.prototype.active_ = !1;
goog.net.XhrIo.prototype.xhr_ = null;
goog.net.XhrIo.prototype.xhrOptions_ = null;
goog.net.XhrIo.prototype.lastUri_ = "";
goog.net.XhrIo.prototype.lastMethod_ = "";
goog.net.XhrIo.prototype.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;
goog.net.XhrIo.prototype.lastError_ = "";
goog.net.XhrIo.prototype.errorDispatched_ = !1;
goog.net.XhrIo.prototype.inSend_ = !1;
goog.net.XhrIo.prototype.inOpen_ = !1;
goog.net.XhrIo.prototype.inAbort_ = !1;
goog.net.XhrIo.prototype.timeoutInterval_ = 0;
goog.net.XhrIo.prototype.timeoutId_ = null;
goog.net.XhrIo.prototype.responseType_ = goog.net.XhrIo.ResponseType.DEFAULT;
goog.net.XhrIo.prototype.withCredentials_ = !1;
goog.net.XhrIo.prototype.getTimeoutInterval = function() {
return this.timeoutInterval_
};
goog.net.XhrIo.prototype.setTimeoutInterval = function(a) {
this.timeoutInterval_ = Math.max(0, a)
};
goog.net.XhrIo.prototype.setResponseType = function(a) {
this.responseType_ = a
};
goog.net.XhrIo.prototype.getResponseType = function() {
return this.responseType_
};
goog.net.XhrIo.prototype.setWithCredentials = function(a) {
this.withCredentials_ = a
};
goog.net.XhrIo.prototype.getWithCredentials = function() {
return this.withCredentials_
};
goog.net.XhrIo.prototype.send = function(a, b, c, d) {
if(this.xhr_) {
throw Error("[goog.net.XhrIo] Object is active with another request");
}
b = b ? b.toUpperCase() : "GET";
this.lastUri_ = a;
this.lastError_ = "";
this.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;
this.lastMethod_ = b;
this.errorDispatched_ = !1;
this.active_ = !0;
this.xhr_ = this.createXhr();
this.xhrOptions_ = this.xmlHttpFactory_ ? this.xmlHttpFactory_.getOptions() : goog.net.XmlHttp.getOptions();
this.xhr_.onreadystatechange = goog.bind(this.onReadyStateChange_, this);
try {
this.logger_.fine(this.formatMsg_("Opening Xhr")), this.inOpen_ = !0, this.xhr_.open(b, a, !0), this.inOpen_ = !1
}catch(e) {
this.logger_.fine(this.formatMsg_("Error opening Xhr: " + e.message));
this.error_(goog.net.ErrorCode.EXCEPTION, e);
return
}
var a = c || "", f = this.headers.clone();
d && goog.structs.forEach(d, function(a, b) {
f.set(b, a)
});
"POST" == b && !f.containsKey(goog.net.XhrIo.CONTENT_TYPE_HEADER) && f.set(goog.net.XhrIo.CONTENT_TYPE_HEADER, goog.net.XhrIo.FORM_CONTENT_TYPE);
goog.structs.forEach(f, function(a, b) {
this.xhr_.setRequestHeader(b, a)
}, this);
this.responseType_ && (this.xhr_.responseType = this.responseType_);
goog.object.containsKey(this.xhr_, "withCredentials") && (this.xhr_.withCredentials = this.withCredentials_);
try {
this.timeoutId_ && (goog.Timer.defaultTimerObject.clearTimeout(this.timeoutId_), this.timeoutId_ = null), 0 < this.timeoutInterval_ && (this.logger_.fine(this.formatMsg_("Will abort after " + this.timeoutInterval_ + "ms if incomplete")), this.timeoutId_ = goog.Timer.defaultTimerObject.setTimeout(goog.bind(this.timeout_, this), this.timeoutInterval_)), this.logger_.fine(this.formatMsg_("Sending request")), this.inSend_ = !0, this.xhr_.send(a), this.inSend_ = !1
}catch(g) {
this.logger_.fine(this.formatMsg_("Send error: " + g.message)), this.error_(goog.net.ErrorCode.EXCEPTION, g)
}
};
goog.net.XhrIo.prototype.createXhr = function() {
return this.xmlHttpFactory_ ? this.xmlHttpFactory_.createInstance() : goog.net.XmlHttp()
};
goog.net.XhrIo.prototype.timeout_ = function() {
"undefined" != typeof goog && this.xhr_ && (this.lastError_ = "Timed out after " + this.timeoutInterval_ + "ms, aborting", this.lastErrorCode_ = goog.net.ErrorCode.TIMEOUT, this.logger_.fine(this.formatMsg_(this.lastError_)), this.dispatchEvent(goog.net.EventType.TIMEOUT), this.abort(goog.net.ErrorCode.TIMEOUT))
};
goog.net.XhrIo.prototype.error_ = function(a, b) {
this.active_ = !1;
this.xhr_ && (this.inAbort_ = !0, this.xhr_.abort(), this.inAbort_ = !1);
this.lastError_ = b;
this.lastErrorCode_ = a;
this.dispatchErrors_();
this.cleanUpXhr_()
};
goog.net.XhrIo.prototype.dispatchErrors_ = function() {
this.errorDispatched_ || (this.errorDispatched_ = !0, this.dispatchEvent(goog.net.EventType.COMPLETE), this.dispatchEvent(goog.net.EventType.ERROR))
};
goog.net.XhrIo.prototype.abort = function(a) {
this.xhr_ && this.active_ && (this.logger_.fine(this.formatMsg_("Aborting")), this.active_ = !1, this.inAbort_ = !0, this.xhr_.abort(), this.inAbort_ = !1, this.lastErrorCode_ = a || goog.net.ErrorCode.ABORT, this.dispatchEvent(goog.net.EventType.COMPLETE), this.dispatchEvent(goog.net.EventType.ABORT), this.cleanUpXhr_())
};
goog.net.XhrIo.prototype.disposeInternal = function() {
this.xhr_ && (this.active_ && (this.active_ = !1, this.inAbort_ = !0, this.xhr_.abort(), this.inAbort_ = !1), this.cleanUpXhr_(!0));
goog.net.XhrIo.superClass_.disposeInternal.call(this)
};
goog.net.XhrIo.prototype.onReadyStateChange_ = function() {
if(!this.inOpen_ && !this.inSend_ && !this.inAbort_) {
this.onReadyStateChangeEntryPoint_()
}else {
this.onReadyStateChangeHelper_()
}
};
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = function() {
this.onReadyStateChangeHelper_()
};
goog.net.XhrIo.prototype.onReadyStateChangeHelper_ = function() {
if(this.active_ && "undefined" != typeof goog) {
if(this.xhrOptions_[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR] && this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE && 2 == this.getStatus()) {
this.logger_.fine(this.formatMsg_("Local request error detected and ignored"))
}else {
if(this.inSend_ && this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE) {
goog.Timer.defaultTimerObject.setTimeout(goog.bind(this.onReadyStateChange_, this), 0)
}else {
if(this.dispatchEvent(goog.net.EventType.READY_STATE_CHANGE), this.isComplete()) {
this.logger_.fine(this.formatMsg_("Request complete"));
this.active_ = !1;
try {
this.isSuccess() ? (this.dispatchEvent(goog.net.EventType.COMPLETE), this.dispatchEvent(goog.net.EventType.SUCCESS)) : (this.lastErrorCode_ = goog.net.ErrorCode.HTTP_ERROR, this.lastError_ = this.getStatusText() + " [" + this.getStatus() + "]", this.dispatchErrors_())
}finally {
this.cleanUpXhr_()
}
}
}
}
}
};
goog.net.XhrIo.prototype.cleanUpXhr_ = function(a) {
if(this.xhr_) {
var b = this.xhr_, c = this.xhrOptions_[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] ? goog.nullFunction : null;
this.xhrOptions_ = this.xhr_ = null;
this.timeoutId_ && (goog.Timer.defaultTimerObject.clearTimeout(this.timeoutId_), this.timeoutId_ = null);
a || this.dispatchEvent(goog.net.EventType.READY);
try {
b.onreadystatechange = c
}catch(d) {
this.logger_.severe("Problem encountered resetting onreadystatechange: " + d.message)
}
}
};
goog.net.XhrIo.prototype.isActive = function() {
return!!this.xhr_
};
goog.net.XhrIo.prototype.isComplete = function() {
return this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE
};
goog.net.XhrIo.prototype.isSuccess = function() {
var a = this.getStatus();
return goog.net.HttpStatus.isSuccess(a) || 0 === a && !this.isLastUriEffectiveSchemeHttp_()
};
goog.net.XhrIo.prototype.isLastUriEffectiveSchemeHttp_ = function() {
var a = goog.uri.utils.getEffectiveScheme(String(this.lastUri_));
return goog.net.XhrIo.HTTP_SCHEME_PATTERN.test(a)
};
goog.net.XhrIo.prototype.getReadyState = function() {
return this.xhr_ ? this.xhr_.readyState : goog.net.XmlHttp.ReadyState.UNINITIALIZED
};
goog.net.XhrIo.prototype.getStatus = function() {
try {
return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ? this.xhr_.status : -1
}catch(a) {
return this.logger_.warning("Can not get status: " + a.message), -1
}
};
goog.net.XhrIo.prototype.getStatusText = function() {
try {
return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ? this.xhr_.statusText : ""
}catch(a) {
return this.logger_.fine("Can not get status: " + a.message), ""
}
};
goog.net.XhrIo.prototype.getLastUri = function() {
return String(this.lastUri_)
};
goog.net.XhrIo.prototype.getResponseText = function() {
try {
return this.xhr_ ? this.xhr_.responseText : ""
}catch(a) {
return this.logger_.fine("Can not get responseText: " + a.message), ""
}
};
goog.net.XhrIo.prototype.getResponseXml = function() {
try {
return this.xhr_ ? this.xhr_.responseXML : null
}catch(a) {
return this.logger_.fine("Can not get responseXML: " + a.message), null
}
};
goog.net.XhrIo.prototype.getResponseJson = function(a) {
if(this.xhr_) {
var b = this.xhr_.responseText;
a && 0 == b.indexOf(a) && (b = b.substring(a.length));
return goog.json.parse(b)
}
};
goog.net.XhrIo.prototype.getResponse = function() {
try {
if(!this.xhr_) {
return null
}
if("response" in this.xhr_) {
return this.xhr_.response
}
switch(this.responseType_) {
case goog.net.XhrIo.ResponseType.DEFAULT:
;
case goog.net.XhrIo.ResponseType.TEXT:
return this.xhr_.responseText;
case goog.net.XhrIo.ResponseType.ARRAY_BUFFER:
if("mozResponseArrayBuffer" in this.xhr_) {
return this.xhr_.mozResponseArrayBuffer
}
}
this.logger_.severe("Response type " + this.responseType_ + " is not supported on this browser");
return null
}catch(a) {
return this.logger_.fine("Can not get response: " + a.message), null
}
};
goog.net.XhrIo.prototype.getResponseHeader = function(a) {
return this.xhr_ && this.isComplete() ? this.xhr_.getResponseHeader(a) : void 0
};
goog.net.XhrIo.prototype.getAllResponseHeaders = function() {
return this.xhr_ && this.isComplete() ? this.xhr_.getAllResponseHeaders() : ""
};
goog.net.XhrIo.prototype.getLastErrorCode = function() {
return this.lastErrorCode_
};
goog.net.XhrIo.prototype.getLastError = function() {
return goog.isString(this.lastError_) ? this.lastError_ : String(this.lastError_)
};
goog.net.XhrIo.prototype.formatMsg_ = function(a) {
return a + " [" + this.lastMethod_ + " " + this.lastUri_ + " " + this.getStatus() + "]"
};
goog.debug.entryPointRegistry.register(function(a) {
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = a(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_)
});
lt.util.js = {};
lt.util.js.every = function(a, b) {
return setInterval(b, a)
};
lt.util.js.wait = function(a, b) {
return setTimeout(b, a)
};
lt.util.js.now = function() {
return(new Date).getTime()
};
lt.util.js.toggler = function(a, b, c) {
return cljs.core._EQ_.call(null, a, b) ? c : b
};
lt.util.js.debounce = function(a, b) {
return Cowboy.debounce(a, b)
};
lt.util.js.throttle = function(a, b) {
return Cowboy.throttle(a, b)
};
lt.util.js.__GT_clj = function(a) {
return cljs.core.js__GT_clj.call(null, a, "\ufdd0'keywordize-keys", !0)
};
lt.util.dom = {};
lt.util.dom.lazy_nl_via_item = function() {
var a = null, b = function(b) {
return a.call(null, b, 0)
}, c = function(b, c) {
return c < b.length ? new cljs.core.LazySeq(null, !1, function() {
return cljs.core.cons.call(null, b.item(c), a.call(null, b, c + 1))
}, null) : null
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
HTMLCollection.prototype.cljs$core$IIndexed$ = !0;
HTMLCollection.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return a.item(b)
};
HTMLCollection.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
a = a.item(b);
return cljs.core.truth_(a) ? a : c
};
HTMLCollection.prototype.cljs$core$ICounted$ = !0;
HTMLCollection.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
return a.length
};
HTMLCollection.prototype.cljs$core$ISeqable$ = !0;
HTMLCollection.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return lt.util.dom.lazy_nl_via_item.call(null, a)
};
NodeList.prototype.cljs$core$IIndexed$ = !0;
NodeList.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
return a.item(b)
};
NodeList.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
a = a.item(b);
return cljs.core.truth_(a) ? a : c
};
NodeList.prototype.cljs$core$ICounted$ = !0;
NodeList.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
return a.length
};
NodeList.prototype.cljs$core$ISeqable$ = !0;
NodeList.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
return lt.util.dom.lazy_nl_via_item.call(null, a)
};
lt.util.dom.$$ = function(a, b) {
var c;
c = cljs.core.truth_(b) ? b : document;
return c.querySelectorAll(cljs.core.name.call(null, a))
};
lt.util.dom.$ = function(a, b) {
var c;
c = cljs.core.truth_(b) ? b : document;
return c.querySelector(cljs.core.name.call(null, a))
};
lt.util.dom.append = function(a, b) {
a.appendChild(b);
return a
};
lt.util.dom.add_class = function(a, b) {
return cljs.core.truth_(a) ? a.classList.add(cljs.core.name.call(null, b)) : null
};
lt.util.dom.remove_class = function(a, b) {
return cljs.core.truth_(a) ? a.classList.remove(cljs.core.name.call(null, b)) : null
};
lt.util.dom.has_class_QMARK_ = function(a, b) {
return cljs.core.truth_(a) ? a.classList.contains(cljs.core.name.call(null, b)) : null
};
lt.util.dom.toggle_class = function(a, b) {
return cljs.core.truth_(lt.util.dom.has_class_QMARK_.call(null, a, b)) ? lt.util.dom.remove_class.call(null, a, b) : lt.util.dom.add_class.call(null, a, b)
};
lt.util.dom.set_css = function(a, b) {
for(var c = cljs.core.seq.call(null, b);;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
a.style[cljs.core.name.call(null, e)] = cljs.core.keyword_QMARK_.call(null, d) ? cljs.core.name.call(null, d) : d;
c = cljs.core.next.call(null, c)
}else {
return null
}
}
};
lt.util.dom.css = function(a, b) {
var c = cljs.core._EQ_.call(null, Object, cljs.core.type.call(null, b)) ? cljs.core.js__GT_clj.call(null, b) : b;
return cljs.core.map_QMARK_.call(null, c) ? lt.util.dom.set_css.call(null, a, c) : a.style[cljs.core.name.call(null, c)]
};
lt.util.dom.set_attr = function(a, b) {
for(var c = cljs.core.seq.call(null, b);;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
a.setAttribute(cljs.core.name.call(null, e), cljs.core.keyword_QMARK_.call(null, d) ? cljs.core.name.call(null, d) : d);
c = cljs.core.next.call(null, c)
}else {
return null
}
}
};
lt.util.dom.attr = function(a, b) {
return cljs.core.map_QMARK_.call(null, b) ? lt.util.dom.set_attr.call(null, a, b) : a.getAttribute(cljs.core.name.call(null, b))
};
lt.util.dom.parent = function(a) {
return a.parentNode
};
lt.util.dom.children = function(a) {
return a.children
};
lt.util.dom.remove = function(a) {
var b = lt.util.dom.parent.call(null, a);
return cljs.core.truth_(b) ? b.removeChild(a) : null
};
lt.util.dom.empty = function(a) {
for(;;) {
if(cljs.core.seq.call(null, a.children)) {
a.removeChild(a.children[0])
}else {
return null
}
}
};
lt.util.dom.val = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null);
return cljs.core.not.call(null, e) ? a.value : a.value = e
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.util.dom.prevent = function(a) {
return a.preventDefault()
};
lt.util.dom.stop_propagation = function(a) {
return a.stopPropagation()
};
lt.util.dom.siblings = function(a) {
return lt.util.dom.parent.call(null, a).children
};
lt.util.dom.parents = function(a, b) {
for(var c = lt.util.dom.parent.call(null, lt.util.dom.$.call(null, "\ufdd0'body")), d = lt.util.dom.parent.call(null, a);;) {
if(cljs.core.truth_(function() {
var a = d;
return cljs.core.truth_(a) ? cljs.core.not_EQ_.call(null, d, c) : a
}())) {
if(cljs.core.truth_(d.webkitMatchesSelector(cljs.core.name.call(null, b)))) {
return d
}
d = lt.util.dom.parent.call(null, d)
}else {
return null
}
}
};
lt.util.dom.next = function(a) {
return a.nextElementSibling
};
lt.util.dom.before = function(a, b) {
return lt.util.dom.parent.call(null, a).insertBefore(b, a)
};
lt.util.dom.after = function(a, b) {
var c = lt.util.dom.next.call(null, a);
return cljs.core.truth_(c) ? lt.util.dom.before.call(null, c, b) : lt.util.dom.append.call(null, lt.util.dom.parent.call(null, a), b)
};
lt.util.dom.replace_with = function(a, b) {
var c = lt.util.dom.parent.call(null, a);
return cljs.core.truth_(c) ? c.replaceChild(b, a) : null
};
lt.util.dom.height = function(a) {
return a.clientHeight
};
lt.util.dom.width = function(a) {
return a.clientWidth
};
lt.util.dom.offset_top = function(a) {
return a.offsetTop
};
lt.util.dom.scroll_top = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null);
return cljs.core.not.call(null, e) ? a.scrollTop : a.scrollTop = e
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.util.dom.top = function(a) {
return lt.util.dom.css.call(null, a, "\ufdd0'top")
};
lt.util.dom.bottom = function(a) {
return lt.util.dom.css.call(null, a, "\ufdd0'bottom")
};
lt.util.dom.left = function(a) {
return lt.util.dom.css.call(null, a, "\ufdd0'left")
};
lt.util.dom.right = function(a) {
return lt.util.dom.css.call(null, a, "\ufdd0'right")
};
lt.util.dom.html = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null);
return cljs.core.not.call(null, e) ? a.innerHTML : a.innerHTML = e
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.util.dom.__GT_ev = function(a) {
return"" + cljs.core.str(cljs.core.name.call(null, a))
};
lt.util.dom.trigger = function() {
var a = function(a, b, e) {
var e = cljs.core.nth.call(null, e, 0, null), f = document.createEvent("HTMLEvents");
f.initEvent(cljs.core.name.call(null, b), !0, !0);
f.opts = e;
return a.dispatchEvent(f)
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.util.dom.on = function(a, b, c) {
return a.addEventListener(lt.util.dom.__GT_ev.call(null, b), c)
};
lt.util.dom.off = function(a, b, c) {
return a.removeEventListener(lt.util.dom.__GT_ev.call(null, b), c)
};
lt.util.dom.on_STAR_ = function(a, b) {
for(var c = cljs.core.seq.call(null, b);;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
a.addEventListener(lt.util.dom.__GT_ev.call(null, e), d);
c = cljs.core.next.call(null, c)
}else {
return null
}
}
};
lt.util.dom.active_element = function() {
return document.activeElement
};
lt.util.dom.focus = function(a) {
return a.focus()
};
lt.util.dom.blur = function(a) {
return a.blur()
};
lt.util.dom.selection = function(a, b, c, d) {
return a.setSelectionRange(b, c, d)
};
lt.util.dom.make = function(a) {
var b = document.createElement("div");
lt.util.dom.html.call(null, b, a);
return lt.util.dom.children.call(null, b)
};
lt.util.dom.index = function(a) {
var b = lt.util.dom.parent.call(null, a), c = cljs.core.truth_(b) ? lt.util.dom.children.call(null, b) : [], d = c.length;
if(cljs.core.not.call(null, b)) {
return-1
}
for(b = 0;;) {
if(b >= d) {
return null
}
if(cljs.core._EQ_.call(null, c[b], a)) {
return b
}
b += 1
}
};
lt.util.dom.ready = function(a) {
return lt.util.dom.on.call(null, document, "\ufdd0'DOMContentLoaded", a)
};
var clojure = {set:{}};
clojure.set.bubble_max_key = function(a, b) {
var c = cljs.core.apply.call(null, cljs.core.max_key, a, b);
return cljs.core.cons.call(null, c, cljs.core.remove.call(null, function(a) {
return c === a
}, b))
};
clojure.set.union = function() {
var a = null, b = function() {
return cljs.core.PersistentHashSet.EMPTY
}, c = function(a, b) {
return cljs.core.count.call(null, a) < cljs.core.count.call(null, b) ? cljs.core.reduce.call(null, cljs.core.conj, b, a) : cljs.core.reduce.call(null, cljs.core.conj, a, b)
}, d = function(a, b, c) {
a = clojure.set.bubble_max_key.call(null, cljs.core.count, cljs.core.conj.call(null, c, b, a));
return cljs.core.reduce.call(null, cljs.core.into, cljs.core.first.call(null, a), cljs.core.rest.call(null, a))
}, e = function(a, b, c) {
var e = null;
goog.isDef(c) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return d.call(this, a, b, e)
};
e.cljs$lang$maxFixedArity = 2;
e.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return d(b, c, a)
};
e.cljs$lang$arity$variadic = d;
a = function(a, d, h) {
switch(arguments.length) {
case 0:
return b.call(this);
case 1:
return a;
case 2:
return c.call(this, a, d);
default:
return e.cljs$lang$arity$variadic(a, d, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = e.cljs$lang$applyTo;
a.cljs$lang$arity$0 = b;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = c;
a.cljs$lang$arity$variadic = e.cljs$lang$arity$variadic;
return a
}();
clojure.set.intersection = function() {
var a = null, b = function(a, b) {
for(;;) {
if(cljs.core.count.call(null, b) < cljs.core.count.call(null, a)) {
var c = a, a = b, b = c
}else {
return cljs.core.reduce.call(null, function(a, b) {
return function(a, c) {
return cljs.core.contains_QMARK_.call(null, b, c) ? a : cljs.core.disj.call(null, a, c)
}
}(a, b), a, a)
}
}
}, c = function(b, c, d) {
b = clojure.set.bubble_max_key.call(null, function(a) {
return-cljs.core.count.call(null, a)
}, cljs.core.conj.call(null, d, c, b));
return cljs.core.reduce.call(null, a, cljs.core.first.call(null, b), cljs.core.rest.call(null, b))
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return a;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
clojure.set.difference = function() {
var a = null, b = function(a, b) {
return cljs.core.count.call(null, a) < cljs.core.count.call(null, b) ? cljs.core.reduce.call(null, function(a, c) {
return cljs.core.contains_QMARK_.call(null, b, c) ? cljs.core.disj.call(null, a, c) : a
}, a, a) : cljs.core.reduce.call(null, cljs.core.disj, a, b)
}, c = function(b, c, d) {
return cljs.core.reduce.call(null, a, b, cljs.core.conj.call(null, d, c))
}, d = function(a, b, d) {
var h = null;
goog.isDef(d) && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return c.call(this, a, b, h)
};
d.cljs$lang$maxFixedArity = 2;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), d = cljs.core.first(cljs.core.next(a)), a = cljs.core.rest(cljs.core.next(a));
return c(b, d, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c, g) {
switch(arguments.length) {
case 1:
return a;
case 2:
return b.call(this, a, c);
default:
return d.cljs$lang$arity$variadic(a, c, cljs.core.array_seq(arguments, 2))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 2;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$1 = function(a) {
return a
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
clojure.set.select = function(a, b) {
return cljs.core.reduce.call(null, function(b, d) {
return cljs.core.truth_(a.call(null, d)) ? b : cljs.core.disj.call(null, b, d)
}, b, b)
};
clojure.set.project = function(a, b) {
return cljs.core.set.call(null, cljs.core.map.call(null, function(a) {
return cljs.core.select_keys.call(null, a, b)
}, a))
};
clojure.set.rename_keys = function(a, b) {
return cljs.core.reduce.call(null, function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null), g;
g = (g = cljs.core.not_EQ_.call(null, e, f)) ? cljs.core.contains_QMARK_.call(null, a, e) : g;
return g ? cljs.core.dissoc.call(null, cljs.core.assoc.call(null, a, f, cljs.core._lookup.call(null, a, e, null)), e) : a
}, a, b)
};
clojure.set.rename = function(a, b) {
return cljs.core.set.call(null, cljs.core.map.call(null, function(a) {
return clojure.set.rename_keys.call(null, a, b)
}, a))
};
clojure.set.index = function(a, b) {
return cljs.core.reduce.call(null, function(a, d) {
var e = cljs.core.select_keys.call(null, d, b);
return cljs.core.assoc.call(null, a, e, cljs.core.conj.call(null, cljs.core._lookup.call(null, a, e, cljs.core.PersistentHashSet.EMPTY), d))
}, cljs.core.ObjMap.EMPTY, a)
};
clojure.set.map_invert = function(a) {
return cljs.core.reduce.call(null, function(a, c) {
var d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null);
return cljs.core.assoc.call(null, a, e, d)
}, cljs.core.ObjMap.EMPTY, a)
};
clojure.set.join = function() {
var a = null, b = function(a, b) {
var c;
c = (c = cljs.core.seq.call(null, a)) ? cljs.core.seq.call(null, b) : c;
if(c) {
var g = clojure.set.intersection.call(null, cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, a))), cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, b)))), h = cljs.core.count.call(null, a) <= cljs.core.count.call(null, b) ? cljs.core.PersistentVector.fromArray([a, b], !0) : cljs.core.PersistentVector.fromArray([b, a], !0);
c = cljs.core.nth.call(null, h, 0, null);
var h = cljs.core.nth.call(null, h, 1, null), i = clojure.set.index.call(null, c, g);
return cljs.core.reduce.call(null, function(a, b) {
var c = i.call(null, cljs.core.select_keys.call(null, b, g));
return cljs.core.truth_(c) ? cljs.core.reduce.call(null, function(a, c) {
return cljs.core.conj.call(null, a, cljs.core.merge.call(null, c, b))
}, a, c) : a
}, cljs.core.PersistentHashSet.EMPTY, h)
}
return cljs.core.PersistentHashSet.EMPTY
}, c = function(a, b, c) {
var a = cljs.core.count.call(null, a) <= cljs.core.count.call(null, b) ? cljs.core.PersistentVector.fromArray([a, b, clojure.set.map_invert.call(null, c)], !0) : cljs.core.PersistentVector.fromArray([b, a, c], !0), b = cljs.core.nth.call(null, a, 0, null), c = cljs.core.nth.call(null, a, 1, null), g = cljs.core.nth.call(null, a, 2, null), h = clojure.set.index.call(null, b, cljs.core.vals.call(null, g));
return cljs.core.reduce.call(null, function(a, b) {
var c = h.call(null, clojure.set.rename_keys.call(null, cljs.core.select_keys.call(null, b, cljs.core.keys.call(null, g)), g));
return cljs.core.truth_(c) ? cljs.core.reduce.call(null, function(a, c) {
return cljs.core.conj.call(null, a, cljs.core.merge.call(null, c, b))
}, a, c) : a
}, cljs.core.PersistentHashSet.EMPTY, c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
clojure.set.subset_QMARK_ = function(a, b) {
var c = cljs.core.count.call(null, a) <= cljs.core.count.call(null, b);
return c ? cljs.core.every_QMARK_.call(null, function(a) {
return cljs.core.contains_QMARK_.call(null, b, a)
}, a) : c
};
clojure.set.superset_QMARK_ = function(a, b) {
var c = cljs.core.count.call(null, a) >= cljs.core.count.call(null, b);
return c ? cljs.core.every_QMARK_.call(null, function(b) {
return cljs.core.contains_QMARK_.call(null, a, b)
}, b) : c
};
var crate = {binding:{}};
crate.binding.SubAtom = function(a, b, c, d, e) {
this.atm = a;
this.path = b;
this.prevhash = c;
this.watches = d;
this.key = e;
this.cljs$lang$protocol_mask$partition0$ = 2153807872;
this.cljs$lang$protocol_mask$partition1$ = 2
};
crate.binding.SubAtom.cljs$lang$type = !0;
crate.binding.SubAtom.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "crate.binding/SubAtom")
};
crate.binding.SubAtom.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "crate.binding/SubAtom")
};
crate.binding.SubAtom.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return goog.getUid(a)
};
crate.binding.SubAtom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
for(var d = cljs.core.seq.call(null, this.watches);;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null);
cljs.core.nth.call(null, e, 1, null).call(null, f, a, b, c);
d = cljs.core.next.call(null, d)
}else {
return null
}
}
};
crate.binding.SubAtom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
return cljs.core.truth_(c) ? a.watches = cljs.core.assoc.call(null, this.watches, b, c) : null
};
crate.binding.SubAtom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
return a.watches = cljs.core.dissoc.call(null, this.watches, b)
};
crate.binding.SubAtom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b) {
return cljs.core._write.call(null, b, [cljs.core.str("#<SubAtom: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.get_in.call(null, cljs.core.deref.call(null, this.atm), this.path))), cljs.core.str(">")].join(""))
};
crate.binding.SubAtom.prototype.cljs$core$IDeref$_deref$arity$1 = function() {
return cljs.core.truth_(this.atm) ? cljs.core.get_in.call(null, cljs.core.deref.call(null, this.atm), this.path) : null
};
crate.binding.SubAtom.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return a === b
};
crate.binding.subatom = function(a, b) {
var c = cljs.core.coll_QMARK_.call(null, b) ? b : cljs.core.PersistentVector.fromArray([b], !0), d = cljs.core.instance_QMARK_.call(null, crate.binding.SubAtom, a) ? cljs.core.PersistentVector.fromArray([a.atm, cljs.core.concat.call(null, a.path, c)], !0) : cljs.core.PersistentVector.fromArray([a, c], !0), c = cljs.core.nth.call(null, d, 0, null), e = cljs.core.nth.call(null, d, 1, null), d = cljs.core.gensym.call(null, "subatom"), f = new crate.binding.SubAtom(c, e, cljs.core.hash.call(null, cljs.core.get_in.call(null,
cljs.core.deref.call(null, c), e)), null, d);
cljs.core.add_watch.call(null, c, d, function(a, b, c, d) {
a = cljs.core.get_in.call(null, d, e);
d = cljs.core.get_in.call(null, c, e);
b = cljs.core.hash.call(null, a);
var k = cljs.core.not_EQ_.call(null, f.prevhash, b), d = k ? cljs.core.not_EQ_.call(null, d, a) : k;
return d ? (f.prevhash = b, cljs.core._notify_watches.call(null, f, cljs.core.get_in.call(null, c, e), a)) : null
});
return f
};
crate.binding.sub_reset_BANG_ = function(a, b) {
cljs.core.swap_BANG_.call(null, a.atm, cljs.core.assoc_in, a.path, b);
return b
};
crate.binding.sub_swap_BANG_ = function() {
var a = null, b = function(a, b) {
return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a)))
}, c = function(a, b, c) {
return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a), c))
}, d = function(a, b, c, d) {
return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a), c, d))
}, e = function(a, b, c, d, e) {
return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a), c, d, e))
}, f = function(a, b, c, d, e, f) {
return crate.binding.sub_reset_BANG_.call(null, a, cljs.core.apply.call(null, b, cljs.core.deref.call(null, a), c, d, e, f))
}, g = function(a, b, c, d, e, g) {
var n = null;
goog.isDef(g) && (n = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0));
return f.call(this, a, b, c, d, e, n)
};
g.cljs$lang$maxFixedArity = 5;
g.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), c = cljs.core.first(cljs.core.next(a)), d = cljs.core.first(cljs.core.next(cljs.core.next(a))), e = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(a)))), g = cljs.core.first(cljs.core.next(cljs.core.next(cljs.core.next(cljs.core.next(a))))), a = cljs.core.rest(cljs.core.next(cljs.core.next(cljs.core.next(cljs.core.next(a)))));
return f(b, c, d, e, g, a)
};
g.cljs$lang$arity$variadic = f;
a = function(a, f, j, k, m, l) {
switch(arguments.length) {
case 2:
return b.call(this, a, f);
case 3:
return c.call(this, a, f, j);
case 4:
return d.call(this, a, f, j, k);
case 5:
return e.call(this, a, f, j, k, m);
default:
return g.cljs$lang$arity$variadic(a, f, j, k, m, cljs.core.array_seq(arguments, 5))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 5;
a.cljs$lang$applyTo = g.cljs$lang$applyTo;
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
a.cljs$lang$arity$4 = d;
a.cljs$lang$arity$5 = e;
a.cljs$lang$arity$variadic = g.cljs$lang$arity$variadic;
return a
}();
crate.binding.sub_destroy_BANG_ = function(a) {
cljs.core.remove_watch.call(null, a.atm, a.key);
a.watches = null;
return a.atm = null
};
crate.binding.computable = {};
crate.binding._depend = function(a, b) {
var c;
c = a ? a.crate$binding$computable$_depend$arity$2 : a;
if(c) {
return a.crate$binding$computable$_depend$arity$2(a, b)
}
c = crate.binding._depend[goog.typeOf(null == a ? null : a)];
if(!c && (c = crate.binding._depend._, !c)) {
throw cljs.core.missing_protocol.call(null, "computable.-depend", a);
}
return c.call(null, a, b)
};
crate.binding._compute = function(a) {
var b;
b = a ? a.crate$binding$computable$_compute$arity$1 : a;
if(b) {
return a.crate$binding$computable$_compute$arity$1(a)
}
b = crate.binding._compute[goog.typeOf(null == a ? null : a)];
if(!b && (b = crate.binding._compute._, !b)) {
throw cljs.core.missing_protocol.call(null, "computable.-compute", a);
}
return b.call(null, a)
};
crate.binding.Computed = function(a, b, c, d, e, f) {
this.atms = a;
this.value = b;
this.func = c;
this.watches = d;
this.key = e;
this.meta = f;
this.cljs$lang$protocol_mask$partition0$ = 2153938944;
this.cljs$lang$protocol_mask$partition1$ = 2
};
crate.binding.Computed.cljs$lang$type = !0;
crate.binding.Computed.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "crate.binding/Computed")
};
crate.binding.Computed.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "crate.binding/Computed")
};
crate.binding.Computed.prototype.crate$binding$computable$ = !0;
crate.binding.Computed.prototype.crate$binding$computable$_depend$arity$2 = function(a, b) {
a.atms = cljs.core.conj.call(null, a.atms, b);
return cljs.core.add_watch.call(null, b, this.key, function() {
return crate.binding._compute.call(null, a)
})
};
crate.binding.Computed.prototype.crate$binding$computable$_compute$arity$1 = function(a) {
var b = a.value, c = cljs.core.apply.call(null, this.func, cljs.core.map.call(null, cljs.core.deref, this.atms));
a.value = c;
return a.cljs$core$IWatchable$_notify_watches$arity$3(a, b, c)
};
crate.binding.Computed.prototype.cljs$core$IMeta$_meta$arity$1 = function() {
return this.meta
};
crate.binding.Computed.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
return goog.getUid(a)
};
crate.binding.Computed.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
for(var d = cljs.core.seq.call(null, this.watches);;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null);
cljs.core.nth.call(null, e, 1, null).call(null, f, a, b, c);
d = cljs.core.next.call(null, d)
}else {
return null
}
}
};
crate.binding.Computed.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
return cljs.core.truth_(c) ? a.watches = cljs.core.assoc.call(null, this.watches, b, c) : null
};
crate.binding.Computed.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
return a.watches = cljs.core.dissoc.call(null, this.watches, b)
};
crate.binding.Computed.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b) {
return cljs.core._write.call(null, b, [cljs.core.str("#<Computed: "), cljs.core.str(cljs.core.pr_str.call(null, this.value)), cljs.core.str(">")].join(""))
};
crate.binding.Computed.prototype.cljs$core$IDeref$_deref$arity$1 = function() {
return this.value
};
crate.binding.Computed.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
return a === b
};
crate.binding.computed = function(a, b) {
var c = cljs.core.gensym.call(null, "computed"), c = new crate.binding.Computed(cljs.core.PersistentVector.EMPTY, null, b, null, c, null);
crate.binding._compute.call(null, c);
for(var d = cljs.core.seq.call(null, a);;) {
if(d) {
var e = cljs.core.first.call(null, d);
crate.binding._depend.call(null, c, e);
d = cljs.core.next.call(null, d)
}else {
break
}
}
return c
};
crate.binding.compute = function(a) {
return crate.binding._compute.call(null, a)
};
crate.binding.depend_on = function(a, b) {
return crate.binding._depend.call(null, a, b)
};
crate.binding.notify = function(a, b, c) {
return cljs.core._notify_watches.call(null, a, b, c)
};
crate.binding.bindable_coll = {};
crate.binding.bindable = {};
crate.binding._value = function(a) {
var b;
b = a ? a.crate$binding$bindable$_value$arity$1 : a;
if(b) {
return a.crate$binding$bindable$_value$arity$1(a)
}
b = crate.binding._value[goog.typeOf(null == a ? null : a)];
if(!b && (b = crate.binding._value._, !b)) {
throw cljs.core.missing_protocol.call(null, "bindable.-value", a);
}
return b.call(null, a)
};
crate.binding._on_change = function(a, b) {
var c;
c = a ? a.crate$binding$bindable$_on_change$arity$2 : a;
if(c) {
return a.crate$binding$bindable$_on_change$arity$2(a, b)
}
c = crate.binding._on_change[goog.typeOf(null == a ? null : a)];
if(!c && (c = crate.binding._on_change._, !c)) {
throw cljs.core.missing_protocol.call(null, "bindable.-on-change", a);
}
return c.call(null, a, b)
};
crate.binding.atom_binding = function(a, b) {
this.atm = a;
this.value_func = b
};
crate.binding.atom_binding.cljs$lang$type = !0;
crate.binding.atom_binding.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "crate.binding/atom-binding")
};
crate.binding.atom_binding.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "crate.binding/atom-binding")
};
crate.binding.atom_binding.prototype.crate$binding$bindable$ = !0;
crate.binding.atom_binding.prototype.crate$binding$bindable$_value$arity$1 = function() {
return this.value_func.call(null, cljs.core.deref.call(null, this.atm))
};
crate.binding.atom_binding.prototype.crate$binding$bindable$_on_change$arity$2 = function(a, b) {
return cljs.core.add_watch.call(null, this.atm, cljs.core.gensym.call(null, "atom-binding"), function() {
return b.call(null, crate.binding._value.call(null, a))
})
};
crate.binding.notifier = function(a) {
this.watches = a;
this.cljs$lang$protocol_mask$partition0$ = 0;
this.cljs$lang$protocol_mask$partition1$ = 2
};
crate.binding.notifier.cljs$lang$type = !0;
crate.binding.notifier.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "crate.binding/notifier")
};
crate.binding.notifier.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "crate.binding/notifier")
};
crate.binding.notifier.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
for(var d = cljs.core.seq.call(null, this.watches);;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null);
cljs.core.nth.call(null, e, 1, null).call(null, f, a, b, c);
d = cljs.core.next.call(null, d)
}else {
return null
}
}
};
crate.binding.notifier.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
return a.watches = cljs.core.assoc.call(null, this.watches, b, c)
};
crate.binding.notifier.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
return a.watches = cljs.core.dissoc.call(null, this.watches, b)
};
crate.binding.bound_collection = function(a, b, c, d) {
this.atm = a;
this.notif = b;
this.opts = c;
this.stuff = d
};
crate.binding.bound_collection.cljs$lang$type = !0;
crate.binding.bound_collection.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "crate.binding/bound-collection")
};
crate.binding.bound_collection.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "crate.binding/bound-collection")
};
crate.binding.bound_collection.prototype.crate$binding$bindable$ = !0;
crate.binding.bound_collection.prototype.crate$binding$bindable$_value$arity$1 = function(a) {
return cljs.core.map.call(null, "\ufdd0'elem", cljs.core.vals.call(null, a.stuff))
};
crate.binding.bound_collection.prototype.crate$binding$bindable$_on_change$arity$2 = function(a, b) {
return cljs.core.add_watch.call(null, this.notif, cljs.core.gensym.call(null, "bound-coll"), function(a, d, e, f) {
a = cljs.core.nth.call(null, f, 0, null);
d = cljs.core.nth.call(null, f, 1, null);
f = cljs.core.nth.call(null, f, 2, null);
return b.call(null, a, d, f)
})
};
crate.binding.bound_collection.prototype.crate$binding$bindable_coll$ = !0;
crate.binding.opt = function(a, b) {
return a.opts.call(null, b)
};
crate.binding.bc_add = function(a, b, c) {
var b = crate.binding.subatom.call(null, a.atm, b), d = crate.binding.opt.call(null, a, "\ufdd0'as").call(null, b);
a.stuff = cljs.core.assoc.call(null, a.stuff, c, cljs.core.ObjMap.fromObject(["\ufdd0'elem", "\ufdd0'subatom"], {"\ufdd0'elem":d, "\ufdd0'subatom":b}));
return crate.binding.notify.call(null, a.notif, null, cljs.core.PersistentVector.fromArray(["\ufdd0'add", d, cljs.core.deref.call(null, b)], !0))
};
crate.binding.bc_remove = function(a, b) {
var c = a.stuff.call(null, b);
a.stuff = cljs.core.dissoc.call(null, a.stuff, b);
crate.binding.notify.call(null, a.notif, null, cljs.core.PersistentVector.fromArray(["\ufdd0'remove", (new cljs.core.Keyword("\ufdd0'elem")).call(null, c), null], !0));
return crate.binding.sub_destroy_BANG_.call(null, (new cljs.core.Keyword("\ufdd0'subatom")).call(null, c))
};
crate.binding.__GT_indexed = function(a) {
return cljs.core.map_QMARK_.call(null, a) ? cljs.core.seq.call(null, a) : cljs.core.set_QMARK_.call(null, a) ? cljs.core.map.call(null, cljs.core.juxt.call(null, cljs.core.identity, cljs.core.identity), a) : cljs.core.map_indexed.call(null, cljs.core.vector, a)
};
crate.binding.__GT_keyed = function(a, b) {
return cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, cljs.core.map.call(null, b, crate.binding.__GT_indexed.call(null, a)))
};
crate.binding.__GT_path = function() {
var a = function(a, b) {
return cljs.core.concat.call(null, function() {
var b = crate.binding.opt.call(null, a, "\ufdd0'path");
return cljs.core.truth_(b) ? b : cljs.core.PersistentVector.EMPTY
}(), b)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
crate.binding.bc_compare = function(a, b) {
for(var c = cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, cljs.core.keys.call(null, a.stuff)), d = crate.binding.__GT_keyed.call(null, b, crate.binding.opt.call(null, a, "\ufdd0'keyfn")), e = cljs.core.into.call(null, cljs.core.sorted_set.call(null), clojure.set.difference.call(null, d, c)), c = cljs.core.into.call(null, cljs.core.sorted_set.call(null), clojure.set.difference.call(null, c, d)), e = cljs.core.seq.call(null, e);;) {
if(e) {
d = cljs.core.first.call(null, e), crate.binding.bc_add.call(null, a, d, d), e = cljs.core.next.call(null, e)
}else {
break
}
}
for(e = cljs.core.seq.call(null, c);;) {
if(e) {
c = cljs.core.first.call(null, e), crate.binding.bc_remove.call(null, a, c), e = cljs.core.next.call(null, e)
}else {
return null
}
}
};
crate.binding.bound_coll = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null), e = cljs.core.truth_(f) ? cljs.core.PersistentVector.fromArray([e, f], !0) : cljs.core.PersistentVector.fromArray([null, e], !0), f = cljs.core.nth.call(null, e, 0, null), g = cljs.core.nth.call(null, e, 1, null), e = cljs.core.not.call(null, f) ? a : crate.binding.subatom.call(null, a, f), f = cljs.core.assoc.call(null, g, "\ufdd0'path", f), f = cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'keyfn")).call(null,
f)) ? cljs.core.assoc.call(null, f, "\ufdd0'keyfn", cljs.core.first) : cljs.core.assoc.call(null, f, "\ufdd0'keyfn", cljs.core.comp.call(null, (new cljs.core.Keyword("\ufdd0'keyfn")).call(null, f), cljs.core.second)), h = new crate.binding.bound_collection(e, new crate.binding.notifier(null), f, cljs.core.sorted_map.call(null));
cljs.core.add_watch.call(null, e, cljs.core.gensym.call(null, "bound-coll"), function(a, b, c, d) {
return crate.binding.bc_compare.call(null, h, d)
});
crate.binding.bc_compare.call(null, h, cljs.core.deref.call(null, e));
return h
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
crate.binding.map_bound = function() {
var a = function(a, b, e) {
var e = cljs.core.nth.call(null, e, 0, null), a = cljs.core.assoc.call(null, e, "\ufdd0'as", a), b = cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'path")).call(null, a)) ? b : crate.binding.subatom.call(null, b, (new cljs.core.Keyword("\ufdd0'path")).call(null, a)), a = cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'keyfn")).call(null, a)) ? cljs.core.assoc.call(null, a, "\ufdd0'keyfn", cljs.core.first) : cljs.core.assoc.call(null, a, "\ufdd0'keyfn", cljs.core.comp.call(null,
(new cljs.core.Keyword("\ufdd0'keyfn")).call(null, a), cljs.core.second)), f = new crate.binding.bound_collection(b, new crate.binding.notifier(null), a, cljs.core.sorted_map.call(null));
cljs.core.add_watch.call(null, b, cljs.core.gensym.call(null, "bound-coll"), function(a, b, c, d) {
return crate.binding.bc_compare.call(null, f, d)
});
crate.binding.bc_compare.call(null, f, cljs.core.deref.call(null, b));
return f
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
crate.binding.binding_QMARK_ = function(a) {
return a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.crate$binding$bindable$) ? !0 : a.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.type_satisfies_.call(null, crate.binding.bindable, a) : cljs.core.type_satisfies_.call(null, crate.binding.bindable, a)
};
crate.binding.binding_coll_QMARK_ = function(a) {
return a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.crate$binding$bindable_coll$) ? !0 : a.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.type_satisfies_.call(null, crate.binding.bindable_coll, a) : cljs.core.type_satisfies_.call(null, crate.binding.bindable_coll, a)
};
crate.binding.deref_QMARK_ = function(a) {
if(a) {
var b;
b = (b = a.cljs$lang$protocol_mask$partition0$ & 32768) ? b : a.cljs$core$IDeref$;
return b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IDeref, a)
}
return cljs.core.type_satisfies_.call(null, cljs.core.IDeref, a)
};
crate.binding.value = function(a) {
return crate.binding._value.call(null, a)
};
crate.binding.index = function(a) {
return cljs.core.last.call(null, a.path)
};
crate.binding.on_change = function(a, b) {
return crate.binding._on_change.call(null, a, b)
};
crate.binding.bound = function() {
var a = function(a, b) {
var e;
e = cljs.core.nth.call(null, b, 0, null);
e = cljs.core.truth_(e) ? e : cljs.core.identity;
return new crate.binding.atom_binding(a, e)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
clojure.string = {};
clojure.string.seq_reverse = function(a) {
return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, a)
};
clojure.string.reverse = function(a) {
return a.split("").reverse().join("")
};
clojure.string.replace = function(a, b, c) {
if(cljs.core.string_QMARK_.call(null, b)) {
return a.replace(RegExp(goog.string.regExpEscape(b), "g"), c)
}
if(cljs.core.truth_(b.hasOwnProperty("source"))) {
return a.replace(RegExp(b.source, "g"), c)
}
throw[cljs.core.str("Invalid match arg: "), cljs.core.str(b)].join("");
};
clojure.string.replace_first = function(a, b, c) {
return a.replace(b, c)
};
clojure.string.join = function() {
var a = null, b = function(a) {
return cljs.core.apply.call(null, cljs.core.str, a)
}, c = function(a, b) {
return cljs.core.apply.call(null, cljs.core.str, cljs.core.interpose.call(null, a, b))
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
clojure.string.upper_case = function(a) {
return a.toUpperCase()
};
clojure.string.lower_case = function(a) {
return a.toLowerCase()
};
clojure.string.capitalize = function(a) {
return 2 > cljs.core.count.call(null, a) ? clojure.string.upper_case.call(null, a) : [cljs.core.str(clojure.string.upper_case.call(null, cljs.core.subs.call(null, a, 0, 1))), cljs.core.str(clojure.string.lower_case.call(null, cljs.core.subs.call(null, a, 1)))].join("")
};
clojure.string.split = function() {
var a = null, b = function(a, b) {
return cljs.core.vec.call(null, ("" + cljs.core.str(a)).split(b))
}, c = function(a, b, c) {
if(1 > c) {
return cljs.core.vec.call(null, ("" + cljs.core.str(a)).split(b))
}
for(var g = cljs.core.PersistentVector.EMPTY;;) {
if(cljs.core._EQ_.call(null, c, 1)) {
return cljs.core.conj.call(null, g, a)
}
var h = cljs.core.re_find.call(null, b, a);
if(cljs.core.truth_(h)) {
var i = h, h = a.indexOf(i), i = a.substring(h + cljs.core.count.call(null, i)), c = c - 1, g = cljs.core.conj.call(null, g, a.substring(0, h)), a = i
}else {
return cljs.core.conj.call(null, g, a)
}
}
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
clojure.string.split_lines = function(a) {
return clojure.string.split.call(null, a, /\n|\r\n/)
};
clojure.string.trim = function(a) {
return goog.string.trim(a)
};
clojure.string.triml = function(a) {
return goog.string.trimLeft(a)
};
clojure.string.trimr = function(a) {
return goog.string.trimRight(a)
};
clojure.string.trim_newline = function(a) {
for(var b = a.length;;) {
if(0 === b) {
return""
}
var c = cljs.core._lookup.call(null, a, b - 1, null);
var d = cljs.core._EQ_.call(null, c, "\n"), c = d ? d : cljs.core._EQ_.call(null, c, "\r");
if(c) {
b -= 1
}else {
return a.substring(0, b)
}
}
};
clojure.string.blank_QMARK_ = function(a) {
return goog.string.isEmptySafe(a)
};
clojure.string.escape = function(a, b) {
for(var c = new goog.string.StringBuffer, d = a.length, e = 0;;) {
if(cljs.core._EQ_.call(null, d, e)) {
return c.toString()
}
var f = a.charAt(e), g = cljs.core._lookup.call(null, b, f, null);
cljs.core.truth_(g) ? c.append("" + cljs.core.str(g)) : c.append(f);
e += 1
}
};
crate.util = {};
crate.util._STAR_base_url_STAR_ = null;
crate.util.as_str = function() {
var a = null, b = function(a) {
var b;
b = (b = cljs.core.symbol_QMARK_.call(null, a)) ? b : cljs.core.keyword_QMARK_.call(null, a);
return b ? cljs.core.name.call(null, a) : "" + cljs.core.str(a)
}, c = function(b, c) {
return function(b, c) {
for(;;) {
if(cljs.core.truth_(c)) {
var d = [cljs.core.str(b), cljs.core.str(a.call(null, cljs.core.first.call(null, c)))].join(""), e = cljs.core.next.call(null, c), b = d, c = e
}else {
return b
}
}
}.call(null, a.call(null, b), c)
}, d = function(a, b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return c.call(this, a, d)
};
d.cljs$lang$maxFixedArity = 1;
d.cljs$lang$applyTo = function(a) {
var b = cljs.core.first(a), a = cljs.core.rest(a);
return c(b, a)
};
d.cljs$lang$arity$variadic = c;
a = function(a, c) {
switch(arguments.length) {
case 0:
return"";
case 1:
return b.call(this, a);
default:
return d.cljs$lang$arity$variadic(a, cljs.core.array_seq(arguments, 1))
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$maxFixedArity = 1;
a.cljs$lang$applyTo = d.cljs$lang$applyTo;
a.cljs$lang$arity$0 = function() {
return""
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$variadic = d.cljs$lang$arity$variadic;
return a
}();
crate.util.escape_html = function(a) {
return clojure.string.replace.call(null, clojure.string.replace.call(null, clojure.string.replace.call(null, clojure.string.replace.call(null, crate.util.as_str.call(null, a), "&", "&amp;"), "<", "&lt;"), ">", "&gt;"), '"', "&quot;")
};
crate.util.to_uri = function(a) {
return cljs.core.truth_(cljs.core.re_matches.call(null, /^\w+:.*/, a)) ? a : [cljs.core.str(crate.util._STAR_base_url_STAR_), cljs.core.str(a)].join("")
};
crate.util.url_encode_component = function(a) {
return encodeURIComponent(crate.util.as_str.call(null, a))
};
crate.util.url_encode = function(a) {
return clojure.string.join.call(null, "&", function c(a) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, a)) {
var e = cljs.core.first.call(null, a), f = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null);
return cljs.core.cons.call(null, [cljs.core.str(crate.util.url_encode_component.call(null, f)), cljs.core.str("="), cljs.core.str(crate.util.url_encode_component.call(null, e))].join(""), c.call(null, cljs.core.rest.call(null, a)))
}
return null
}
}, null)
}.call(null, a))
};
crate.util.url = function() {
var a = function(a) {
var b = cljs.core.last.call(null, a), a = cljs.core.butlast.call(null, a);
return"" + cljs.core.str(crate.util.to_uri.call(null, [cljs.core.str(cljs.core.apply.call(null, cljs.core.str, a)), cljs.core.str(cljs.core.map_QMARK_.call(null, b) ? [cljs.core.str("?"), cljs.core.str(crate.util.url_encode.call(null, b))].join("") : b)].join("")))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
goog.dom = {};
goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentMode(9) || goog.userAgent.GECKO && goog.userAgent.isVersion("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersion("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT, INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE};
goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", DD:"DD", DEL:"DEL", DFN:"DFN", DIR:"DIR", DIV:"DIV", DL:"DL", DT:"DT", EM:"EM", FIELDSET:"FIELDSET", FONT:"FONT", FORM:"FORM", FRAME:"FRAME",
FRAMESET:"FRAMESET", H1:"H1", H2:"H2", H3:"H3", H4:"H4", H5:"H5", H6:"H6", HEAD:"HEAD", HR:"HR", HTML:"HTML", I:"I", IFRAME:"IFRAME", IMG:"IMG", INPUT:"INPUT", INS:"INS", ISINDEX:"ISINDEX", KBD:"KBD", LABEL:"LABEL", LEGEND:"LEGEND", LI:"LI", LINK:"LINK", MAP:"MAP", MENU:"MENU", META:"META", NOFRAMES:"NOFRAMES", NOSCRIPT:"NOSCRIPT", OBJECT:"OBJECT", OL:"OL", OPTGROUP:"OPTGROUP", OPTION:"OPTION", P:"P", PARAM:"PARAM", PRE:"PRE", Q:"Q", S:"S", SAMP:"SAMP", SCRIPT:"SCRIPT", SELECT:"SELECT", SMALL:"SMALL",
SPAN:"SPAN", STRIKE:"STRIKE", STRONG:"STRONG", STYLE:"STYLE", SUB:"SUB", SUP:"SUP", TABLE:"TABLE", TBODY:"TBODY", TD:"TD", TEXTAREA:"TEXTAREA", TFOOT:"TFOOT", TH:"TH", THEAD:"THEAD", TITLE:"TITLE", TR:"TR", TT:"TT", U:"U", UL:"UL", VAR:"VAR", VIDEO:"VIDEO"};
goog.dom.classes = {};
goog.dom.classes.set = function(a, b) {
a.className = b
};
goog.dom.classes.get = function(a) {
a = a.className;
return goog.isString(a) && a.match(/\S+/g) || []
};
goog.dom.classes.add = function(a, b) {
var c = goog.dom.classes.get(a), d = goog.array.slice(arguments, 1), e = c.length + d.length;
goog.dom.classes.add_(c, d);
a.className = c.join(" ");
return c.length == e
};
goog.dom.classes.remove = function(a, b) {
var c = goog.dom.classes.get(a), d = goog.array.slice(arguments, 1), e = goog.dom.classes.getDifference_(c, d);
a.className = e.join(" ");
return e.length == c.length - d.length
};
goog.dom.classes.add_ = function(a, b) {
for(var c = 0;c < b.length;c++) {
goog.array.contains(a, b[c]) || a.push(b[c])
}
};
goog.dom.classes.getDifference_ = function(a, b) {
return goog.array.filter(a, function(a) {
return!goog.array.contains(b, a)
})
};
goog.dom.classes.swap = function(a, b, c) {
for(var d = goog.dom.classes.get(a), e = !1, f = 0;f < d.length;f++) {
d[f] == b && (goog.array.splice(d, f--, 1), e = !0)
}
e && (d.push(c), a.className = d.join(" "));
return e
};
goog.dom.classes.addRemove = function(a, b, c) {
var d = goog.dom.classes.get(a);
goog.isString(b) ? goog.array.remove(d, b) : goog.isArray(b) && (d = goog.dom.classes.getDifference_(d, b));
goog.isString(c) && !goog.array.contains(d, c) ? d.push(c) : goog.isArray(c) && goog.dom.classes.add_(d, c);
a.className = d.join(" ")
};
goog.dom.classes.has = function(a, b) {
return goog.array.contains(goog.dom.classes.get(a), b)
};
goog.dom.classes.enable = function(a, b, c) {
c ? goog.dom.classes.add(a, b) : goog.dom.classes.remove(a, b)
};
goog.dom.classes.toggle = function(a, b) {
var c = !goog.dom.classes.has(a, b);
goog.dom.classes.enable(a, b, c);
return c
};
goog.math = {};
goog.math.randomInt = function(a) {
return Math.floor(Math.random() * a)
};
goog.math.uniformRandom = function(a, b) {
return a + Math.random() * (b - a)
};
goog.math.clamp = function(a, b, c) {
return Math.min(Math.max(a, b), c)
};
goog.math.modulo = function(a, b) {
var c = a % b;
return 0 > c * b ? c + b : c
};
goog.math.lerp = function(a, b, c) {
return a + c * (b - a)
};
goog.math.nearlyEquals = function(a, b, c) {
return Math.abs(a - b) <= (c || 1E-6)
};
goog.math.standardAngle = function(a) {
return goog.math.modulo(a, 360)
};
goog.math.toRadians = function(a) {
return a * Math.PI / 180
};
goog.math.toDegrees = function(a) {
return 180 * a / Math.PI
};
goog.math.angleDx = function(a, b) {
return b * Math.cos(goog.math.toRadians(a))
};
goog.math.angleDy = function(a, b) {
return b * Math.sin(goog.math.toRadians(a))
};
goog.math.angle = function(a, b, c, d) {
return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d - b, c - a)))
};
goog.math.angleDifference = function(a, b) {
var c = goog.math.standardAngle(b) - goog.math.standardAngle(a);
180 < c ? c -= 360 : -180 >= c && (c = 360 + c);
return c
};
goog.math.sign = function(a) {
return 0 == a ? 0 : 0 > a ? -1 : 1
};
goog.math.longestCommonSubsequence = function(a, b, c, d) {
for(var c = c || function(a, b) {
return a == b
}, d = d || function(b) {
return a[b]
}, e = a.length, f = b.length, g = [], h = 0;h < e + 1;h++) {
g[h] = [], g[h][0] = 0
}
for(var i = 0;i < f + 1;i++) {
g[0][i] = 0
}
for(h = 1;h <= e;h++) {
for(i = 1;i <= e;i++) {
g[h][i] = c(a[h - 1], b[i - 1]) ? g[h - 1][i - 1] + 1 : Math.max(g[h - 1][i], g[h][i - 1])
}
}
for(var j = [], h = e, i = f;0 < h && 0 < i;) {
c(a[h - 1], b[i - 1]) ? (j.unshift(d(h - 1, i - 1)), h--, i--) : g[h - 1][i] > g[h][i - 1] ? h-- : i--
}
return j
};
goog.math.sum = function(a) {
return goog.array.reduce(arguments, function(a, c) {
return a + c
}, 0)
};
goog.math.average = function(a) {
return goog.math.sum.apply(null, arguments) / arguments.length
};
goog.math.standardDeviation = function(a) {
var b = arguments.length;
if(2 > b) {
return 0
}
var c = goog.math.average.apply(null, arguments), b = goog.math.sum.apply(null, goog.array.map(arguments, function(a) {
return Math.pow(a - c, 2)
})) / (b - 1);
return Math.sqrt(b)
};
goog.math.isInt = function(a) {
return isFinite(a) && 0 == a % 1
};
goog.math.isFiniteNumber = function(a) {
return isFinite(a) && !isNaN(a)
};
goog.math.Coordinate = function(a, b) {
this.x = goog.isDef(a) ? a : 0;
this.y = goog.isDef(b) ? b : 0
};
goog.math.Coordinate.prototype.clone = function() {
return new goog.math.Coordinate(this.x, this.y)
};
goog.DEBUG && (goog.math.Coordinate.prototype.toString = function() {
return"(" + this.x + ", " + this.y + ")"
});
goog.math.Coordinate.equals = function(a, b) {
return a == b ? !0 : !a || !b ? !1 : a.x == b.x && a.y == b.y
};
goog.math.Coordinate.distance = function(a, b) {
var c = a.x - b.x, d = a.y - b.y;
return Math.sqrt(c * c + d * d)
};
goog.math.Coordinate.magnitude = function(a) {
return Math.sqrt(a.x * a.x + a.y * a.y)
};
goog.math.Coordinate.azimuth = function(a) {
return goog.math.angle(0, 0, a.x, a.y)
};
goog.math.Coordinate.squaredDistance = function(a, b) {
var c = a.x - b.x, d = a.y - b.y;
return c * c + d * d
};
goog.math.Coordinate.difference = function(a, b) {
return new goog.math.Coordinate(a.x - b.x, a.y - b.y)
};
goog.math.Coordinate.sum = function(a, b) {
return new goog.math.Coordinate(a.x + b.x, a.y + b.y)
};
goog.math.Size = function(a, b) {
this.width = a;
this.height = b
};
goog.math.Size.equals = function(a, b) {
return a == b ? !0 : !a || !b ? !1 : a.width == b.width && a.height == b.height
};
goog.math.Size.prototype.clone = function() {
return new goog.math.Size(this.width, this.height)
};
goog.DEBUG && (goog.math.Size.prototype.toString = function() {
return"(" + this.width + " x " + this.height + ")"
});
goog.math.Size.prototype.getLongest = function() {
return Math.max(this.width, this.height)
};
goog.math.Size.prototype.getShortest = function() {
return Math.min(this.width, this.height)
};
goog.math.Size.prototype.area = function() {
return this.width * this.height
};
goog.math.Size.prototype.perimeter = function() {
return 2 * (this.width + this.height)
};
goog.math.Size.prototype.aspectRatio = function() {
return this.width / this.height
};
goog.math.Size.prototype.isEmpty = function() {
return!this.area()
};
goog.math.Size.prototype.ceil = function() {
this.width = Math.ceil(this.width);
this.height = Math.ceil(this.height);
return this
};
goog.math.Size.prototype.fitsInside = function(a) {
return this.width <= a.width && this.height <= a.height
};
goog.math.Size.prototype.floor = function() {
this.width = Math.floor(this.width);
this.height = Math.floor(this.height);
return this
};
goog.math.Size.prototype.round = function() {
this.width = Math.round(this.width);
this.height = Math.round(this.height);
return this
};
goog.math.Size.prototype.scale = function(a) {
this.width *= a;
this.height *= a;
return this
};
goog.math.Size.prototype.scaleToFit = function(a) {
a = this.aspectRatio() > a.aspectRatio() ? a.width / this.width : a.height / this.height;
return this.scale(a)
};
goog.dom.ASSUME_QUIRKS_MODE = !1;
goog.dom.ASSUME_STANDARDS_MODE = !1;
goog.dom.COMPAT_MODE_KNOWN_ = goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE;
goog.dom.NodeType = {ELEMENT:1, ATTRIBUTE:2, TEXT:3, CDATA_SECTION:4, ENTITY_REFERENCE:5, ENTITY:6, PROCESSING_INSTRUCTION:7, COMMENT:8, DOCUMENT:9, DOCUMENT_TYPE:10, DOCUMENT_FRAGMENT:11, NOTATION:12};
goog.dom.getDomHelper = function(a) {
return a ? new goog.dom.DomHelper(goog.dom.getOwnerDocument(a)) : goog.dom.defaultDomHelper_ || (goog.dom.defaultDomHelper_ = new goog.dom.DomHelper)
};
goog.dom.getDocument = function() {
return document
};
goog.dom.getElement = function(a) {
return goog.isString(a) ? document.getElementById(a) : a
};
goog.dom.$ = goog.dom.getElement;
goog.dom.getElementsByTagNameAndClass = function(a, b, c) {
return goog.dom.getElementsByTagNameAndClass_(document, a, b, c)
};
goog.dom.getElementsByClass = function(a, b) {
var c = b || document;
return goog.dom.canUseQuerySelector_(c) ? c.querySelectorAll("." + a) : c.getElementsByClassName ? c.getElementsByClassName(a) : goog.dom.getElementsByTagNameAndClass_(document, "*", a, b)
};
goog.dom.getElementByClass = function(a, b) {
var c = b || document, d = null;
return(d = goog.dom.canUseQuerySelector_(c) ? c.querySelector("." + a) : goog.dom.getElementsByClass(a, b)[0]) || null
};
goog.dom.canUseQuerySelector_ = function(a) {
return!(!a.querySelectorAll || !a.querySelector)
};
goog.dom.getElementsByTagNameAndClass_ = function(a, b, c, d) {
a = d || a;
b = b && "*" != b ? b.toUpperCase() : "";
if(goog.dom.canUseQuerySelector_(a) && (b || c)) {
return a.querySelectorAll(b + (c ? "." + c : ""))
}
if(c && a.getElementsByClassName) {
a = a.getElementsByClassName(c);
if(b) {
for(var d = {}, e = 0, f = 0, g;g = a[f];f++) {
b == g.nodeName && (d[e++] = g)
}
d.length = e;
return d
}
return a
}
a = a.getElementsByTagName(b || "*");
if(c) {
d = {};
for(f = e = 0;g = a[f];f++) {
b = g.className, "function" == typeof b.split && goog.array.contains(b.split(/\s+/), c) && (d[e++] = g)
}
d.length = e;
return d
}
return a
};
goog.dom.$$ = goog.dom.getElementsByTagNameAndClass;
goog.dom.setProperties = function(a, b) {
goog.object.forEach(b, function(b, d) {
"style" == d ? a.style.cssText = b : "class" == d ? a.className = b : "for" == d ? a.htmlFor = b : d in goog.dom.DIRECT_ATTRIBUTE_MAP_ ? a.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[d], b) : goog.string.startsWith(d, "aria-") || goog.string.startsWith(d, "data-") ? a.setAttribute(d, b) : a[d] = b
})
};
goog.dom.DIRECT_ATTRIBUTE_MAP_ = {cellpadding:"cellPadding", cellspacing:"cellSpacing", colspan:"colSpan", frameborder:"frameBorder", height:"height", maxlength:"maxLength", role:"role", rowspan:"rowSpan", type:"type", usemap:"useMap", valign:"vAlign", width:"width"};
goog.dom.getViewportSize = function(a) {
return goog.dom.getViewportSize_(a || window)
};
goog.dom.getViewportSize_ = function(a) {
a = a.document;
a = goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body;
return new goog.math.Size(a.clientWidth, a.clientHeight)
};
goog.dom.getDocumentHeight = function() {
return goog.dom.getDocumentHeight_(window)
};
goog.dom.getDocumentHeight_ = function(a) {
var b = a.document, c = 0;
if(b) {
var a = goog.dom.getViewportSize_(a).height, c = b.body, d = b.documentElement;
if(goog.dom.isCss1CompatMode_(b) && d.scrollHeight) {
c = d.scrollHeight != a ? d.scrollHeight : d.offsetHeight
}else {
var b = d.scrollHeight, e = d.offsetHeight;
d.clientHeight != e && (b = c.scrollHeight, e = c.offsetHeight);
c = b > a ? b > e ? b : e : b < e ? b : e
}
}
return c
};
goog.dom.getPageScroll = function(a) {
return goog.dom.getDomHelper((a || goog.global || window).document).getDocumentScroll()
};
goog.dom.getDocumentScroll = function() {
return goog.dom.getDocumentScroll_(document)
};
goog.dom.getDocumentScroll_ = function(a) {
var b = goog.dom.getDocumentScrollElement_(a), a = goog.dom.getWindow_(a);
return new goog.math.Coordinate(a.pageXOffset || b.scrollLeft, a.pageYOffset || b.scrollTop)
};
goog.dom.getDocumentScrollElement = function() {
return goog.dom.getDocumentScrollElement_(document)
};
goog.dom.getDocumentScrollElement_ = function(a) {
return!goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body
};
goog.dom.getWindow = function(a) {
return a ? goog.dom.getWindow_(a) : window
};
goog.dom.getWindow_ = function(a) {
return a.parentWindow || a.defaultView
};
goog.dom.createDom = function(a, b, c) {
return goog.dom.createDom_(document, arguments)
};
goog.dom.createDom_ = function(a, b) {
var c = b[0], d = b[1];
if(!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && d && (d.name || d.type)) {
c = ["<", c];
d.name && c.push(' name="', goog.string.htmlEscape(d.name), '"');
if(d.type) {
c.push(' type="', goog.string.htmlEscape(d.type), '"');
var e = {};
goog.object.extend(e, d);
d = e;
delete d.type
}
c.push(">");
c = c.join("")
}
c = a.createElement(c);
d && (goog.isString(d) ? c.className = d : goog.isArray(d) ? goog.dom.classes.add.apply(null, [c].concat(d)) : goog.dom.setProperties(c, d));
2 < b.length && goog.dom.append_(a, c, b, 2);
return c
};
goog.dom.append_ = function(a, b, c, d) {
function e(c) {
c && b.appendChild(goog.isString(c) ? a.createTextNode(c) : c)
}
for(;d < c.length;d++) {
var f = c[d];
goog.isArrayLike(f) && !goog.dom.isNodeLike(f) ? goog.array.forEach(goog.dom.isNodeList(f) ? goog.array.toArray(f) : f, e) : e(f)
}
};
goog.dom.$dom = goog.dom.createDom;
goog.dom.createElement = function(a) {
return document.createElement(a)
};
goog.dom.createTextNode = function(a) {
return document.createTextNode(a)
};
goog.dom.createTable = function(a, b, c) {
return goog.dom.createTable_(document, a, b, !!c)
};
goog.dom.createTable_ = function(a, b, c, d) {
for(var e = ["<tr>"], f = 0;f < c;f++) {
e.push(d ? "<td>&nbsp;</td>" : "<td></td>")
}
e.push("</tr>");
e = e.join("");
c = ["<table>"];
for(f = 0;f < b;f++) {
c.push(e)
}
c.push("</table>");
a = a.createElement(goog.dom.TagName.DIV);
a.innerHTML = c.join("");
return a.removeChild(a.firstChild)
};
goog.dom.htmlToDocumentFragment = function(a) {
return goog.dom.htmlToDocumentFragment_(document, a)
};
goog.dom.htmlToDocumentFragment_ = function(a, b) {
var c = a.createElement("div");
goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (c.innerHTML = "<br>" + b, c.removeChild(c.firstChild)) : c.innerHTML = b;
if(1 == c.childNodes.length) {
return c.removeChild(c.firstChild)
}
for(var d = a.createDocumentFragment();c.firstChild;) {
d.appendChild(c.firstChild)
}
return d
};
goog.dom.getCompatMode = function() {
return goog.dom.isCss1CompatMode() ? "CSS1Compat" : "BackCompat"
};
goog.dom.isCss1CompatMode = function() {
return goog.dom.isCss1CompatMode_(document)
};
goog.dom.isCss1CompatMode_ = function(a) {
return goog.dom.COMPAT_MODE_KNOWN_ ? goog.dom.ASSUME_STANDARDS_MODE : "CSS1Compat" == a.compatMode
};
goog.dom.canHaveChildren = function(a) {
if(a.nodeType != goog.dom.NodeType.ELEMENT) {
return!1
}
switch(a.tagName) {
case goog.dom.TagName.APPLET:
;
case goog.dom.TagName.AREA:
;
case goog.dom.TagName.BASE:
;
case goog.dom.TagName.BR:
;
case goog.dom.TagName.COL:
;
case goog.dom.TagName.FRAME:
;
case goog.dom.TagName.HR:
;
case goog.dom.TagName.IMG:
;
case goog.dom.TagName.INPUT:
;
case goog.dom.TagName.IFRAME:
;
case goog.dom.TagName.ISINDEX:
;
case goog.dom.TagName.LINK:
;
case goog.dom.TagName.NOFRAMES:
;
case goog.dom.TagName.NOSCRIPT:
;
case goog.dom.TagName.META:
;
case goog.dom.TagName.OBJECT:
;
case goog.dom.TagName.PARAM:
;
case goog.dom.TagName.SCRIPT:
;
case goog.dom.TagName.STYLE:
return!1
}
return!0
};
goog.dom.appendChild = function(a, b) {
a.appendChild(b)
};
goog.dom.append = function(a, b) {
goog.dom.append_(goog.dom.getOwnerDocument(a), a, arguments, 1)
};
goog.dom.removeChildren = function(a) {
for(var b;b = a.firstChild;) {
a.removeChild(b)
}
};
goog.dom.insertSiblingBefore = function(a, b) {
b.parentNode && b.parentNode.insertBefore(a, b)
};
goog.dom.insertSiblingAfter = function(a, b) {
b.parentNode && b.parentNode.insertBefore(a, b.nextSibling)
};
goog.dom.insertChildAt = function(a, b, c) {
a.insertBefore(b, a.childNodes[c] || null)
};
goog.dom.removeNode = function(a) {
return a && a.parentNode ? a.parentNode.removeChild(a) : null
};
goog.dom.replaceNode = function(a, b) {
var c = b.parentNode;
c && c.replaceChild(a, b)
};
goog.dom.flattenElement = function(a) {
var b, c = a.parentNode;
if(c && c.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) {
if(a.removeNode) {
return a.removeNode(!1)
}
for(;b = a.firstChild;) {
c.insertBefore(b, a)
}
return goog.dom.removeNode(a)
}
};
goog.dom.getChildren = function(a) {
return goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE && void 0 != a.children ? a.children : goog.array.filter(a.childNodes, function(a) {
return a.nodeType == goog.dom.NodeType.ELEMENT
})
};
goog.dom.getFirstElementChild = function(a) {
return void 0 != a.firstElementChild ? a.firstElementChild : goog.dom.getNextElementNode_(a.firstChild, !0)
};
goog.dom.getLastElementChild = function(a) {
return void 0 != a.lastElementChild ? a.lastElementChild : goog.dom.getNextElementNode_(a.lastChild, !1)
};
goog.dom.getNextElementSibling = function(a) {
return void 0 != a.nextElementSibling ? a.nextElementSibling : goog.dom.getNextElementNode_(a.nextSibling, !0)
};
goog.dom.getPreviousElementSibling = function(a) {
return void 0 != a.previousElementSibling ? a.previousElementSibling : goog.dom.getNextElementNode_(a.previousSibling, !1)
};
goog.dom.getNextElementNode_ = function(a, b) {
for(;a && a.nodeType != goog.dom.NodeType.ELEMENT;) {
a = b ? a.nextSibling : a.previousSibling
}
return a
};
goog.dom.getNextNode = function(a) {
if(!a) {
return null
}
if(a.firstChild) {
return a.firstChild
}
for(;a && !a.nextSibling;) {
a = a.parentNode
}
return a ? a.nextSibling : null
};
goog.dom.getPreviousNode = function(a) {
if(!a) {
return null
}
if(!a.previousSibling) {
return a.parentNode
}
for(a = a.previousSibling;a && a.lastChild;) {
a = a.lastChild
}
return a
};
goog.dom.isNodeLike = function(a) {
return goog.isObject(a) && 0 < a.nodeType
};
goog.dom.isElement = function(a) {
return goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT
};
goog.dom.isWindow = function(a) {
return goog.isObject(a) && a.window == a
};
goog.dom.getParentElement = function(a) {
if(goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY) {
return a.parentElement
}
a = a.parentNode;
return goog.dom.isElement(a) ? a : null
};
goog.dom.contains = function(a, b) {
if(a.contains && b.nodeType == goog.dom.NodeType.ELEMENT) {
return a == b || a.contains(b)
}
if("undefined" != typeof a.compareDocumentPosition) {
return a == b || Boolean(a.compareDocumentPosition(b) & 16)
}
for(;b && a != b;) {
b = b.parentNode
}
return b == a
};
goog.dom.compareNodeOrder = function(a, b) {
if(a == b) {
return 0
}
if(a.compareDocumentPosition) {
return a.compareDocumentPosition(b) & 2 ? 1 : -1
}
if("sourceIndex" in a || a.parentNode && "sourceIndex" in a.parentNode) {
var c = a.nodeType == goog.dom.NodeType.ELEMENT, d = b.nodeType == goog.dom.NodeType.ELEMENT;
if(c && d) {
return a.sourceIndex - b.sourceIndex
}
var e = a.parentNode, f = b.parentNode;
return e == f ? goog.dom.compareSiblingOrder_(a, b) : !c && goog.dom.contains(e, b) ? -1 * goog.dom.compareParentsDescendantNodeIe_(a, b) : !d && goog.dom.contains(f, a) ? goog.dom.compareParentsDescendantNodeIe_(b, a) : (c ? a.sourceIndex : e.sourceIndex) - (d ? b.sourceIndex : f.sourceIndex)
}
d = goog.dom.getOwnerDocument(a);
c = d.createRange();
c.selectNode(a);
c.collapse(!0);
d = d.createRange();
d.selectNode(b);
d.collapse(!0);
return c.compareBoundaryPoints(goog.global.Range.START_TO_END, d)
};
goog.dom.compareParentsDescendantNodeIe_ = function(a, b) {
var c = a.parentNode;
if(c == b) {
return-1
}
for(var d = b;d.parentNode != c;) {
d = d.parentNode
}
return goog.dom.compareSiblingOrder_(d, a)
};
goog.dom.compareSiblingOrder_ = function(a, b) {
for(var c = b;c = c.previousSibling;) {
if(c == a) {
return-1
}
}
return 1
};
goog.dom.findCommonAncestor = function(a) {
var b, c = arguments.length;
if(c) {
if(1 == c) {
return arguments[0]
}
}else {
return null
}
var d = [], e = Infinity;
for(b = 0;b < c;b++) {
for(var f = [], g = arguments[b];g;) {
f.unshift(g), g = g.parentNode
}
d.push(f);
e = Math.min(e, f.length)
}
f = null;
for(b = 0;b < e;b++) {
for(var g = d[0][b], h = 1;h < c;h++) {
if(g != d[h][b]) {
return f
}
}
f = g
}
return f
};
goog.dom.getOwnerDocument = function(a) {
return a.nodeType == goog.dom.NodeType.DOCUMENT ? a : a.ownerDocument || a.document
};
goog.dom.getFrameContentDocument = function(a) {
return a.contentDocument || a.contentWindow.document
};
goog.dom.getFrameContentWindow = function(a) {
return a.contentWindow || goog.dom.getWindow_(goog.dom.getFrameContentDocument(a))
};
goog.dom.setTextContent = function(a, b) {
if("textContent" in a) {
a.textContent = b
}else {
if(a.firstChild && a.firstChild.nodeType == goog.dom.NodeType.TEXT) {
for(;a.lastChild != a.firstChild;) {
a.removeChild(a.lastChild)
}
a.firstChild.data = b
}else {
goog.dom.removeChildren(a);
var c = goog.dom.getOwnerDocument(a);
a.appendChild(c.createTextNode(b))
}
}
};
goog.dom.getOuterHtml = function(a) {
if("outerHTML" in a) {
return a.outerHTML
}
var b = goog.dom.getOwnerDocument(a).createElement("div");
b.appendChild(a.cloneNode(!0));
return b.innerHTML
};
goog.dom.findNode = function(a, b) {
var c = [];
return goog.dom.findNodes_(a, b, c, !0) ? c[0] : void 0
};
goog.dom.findNodes = function(a, b) {
var c = [];
goog.dom.findNodes_(a, b, c, !1);
return c
};
goog.dom.findNodes_ = function(a, b, c, d) {
if(null != a) {
for(a = a.firstChild;a;) {
if(b(a) && (c.push(a), d) || goog.dom.findNodes_(a, b, c, d)) {
return!0
}
a = a.nextSibling
}
}
return!1
};
goog.dom.TAGS_TO_IGNORE_ = {SCRIPT:1, STYLE:1, HEAD:1, IFRAME:1, OBJECT:1};
goog.dom.PREDEFINED_TAG_VALUES_ = {IMG:" ", BR:"\n"};
goog.dom.isFocusableTabIndex = function(a) {
var b = a.getAttributeNode("tabindex");
return b && b.specified ? (a = a.tabIndex, goog.isNumber(a) && 0 <= a && 32768 > a) : !1
};
goog.dom.setFocusableTabIndex = function(a, b) {
b ? a.tabIndex = 0 : (a.tabIndex = -1, a.removeAttribute("tabIndex"))
};
goog.dom.getTextContent = function(a) {
if(goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && "innerText" in a) {
a = goog.string.canonicalizeNewlines(a.innerText)
}else {
var b = [];
goog.dom.getTextContent_(a, b, !0);
a = b.join("")
}
a = a.replace(/ \xAD /g, " ").replace(/\xAD/g, "");
a = a.replace(/\u200B/g, "");
goog.dom.BrowserFeature.CAN_USE_INNER_TEXT || (a = a.replace(/ +/g, " "));
" " != a && (a = a.replace(/^\s*/, ""));
return a
};
goog.dom.getRawTextContent = function(a) {
var b = [];
goog.dom.getTextContent_(a, b, !1);
return b.join("")
};
goog.dom.getTextContent_ = function(a, b, c) {
if(!(a.nodeName in goog.dom.TAGS_TO_IGNORE_)) {
if(a.nodeType == goog.dom.NodeType.TEXT) {
c ? b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : b.push(a.nodeValue)
}else {
if(a.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
b.push(goog.dom.PREDEFINED_TAG_VALUES_[a.nodeName])
}else {
for(a = a.firstChild;a;) {
goog.dom.getTextContent_(a, b, c), a = a.nextSibling
}
}
}
}
};
goog.dom.getNodeTextLength = function(a) {
return goog.dom.getTextContent(a).length
};
goog.dom.getNodeTextOffset = function(a, b) {
for(var c = b || goog.dom.getOwnerDocument(a).body, d = [];a && a != c;) {
for(var e = a;e = e.previousSibling;) {
d.unshift(goog.dom.getTextContent(e))
}
a = a.parentNode
}
return goog.string.trimLeft(d.join("")).replace(/ +/g, " ").length
};
goog.dom.getNodeAtOffset = function(a, b, c) {
for(var a = [a], d = 0, e;0 < a.length && d < b;) {
if(e = a.pop(), !(e.nodeName in goog.dom.TAGS_TO_IGNORE_)) {
if(e.nodeType == goog.dom.NodeType.TEXT) {
var f = e.nodeValue.replace(/(\r\n|\r|\n)/g, "").replace(/ +/g, " "), d = d + f.length
}else {
if(e.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
d += goog.dom.PREDEFINED_TAG_VALUES_[e.nodeName].length
}else {
for(f = e.childNodes.length - 1;0 <= f;f--) {
a.push(e.childNodes[f])
}
}
}
}
}
goog.isObject(c) && (c.remainder = e ? e.nodeValue.length + b - d - 1 : 0, c.node = e);
return e
};
goog.dom.isNodeList = function(a) {
if(a && "number" == typeof a.length) {
if(goog.isObject(a)) {
return"function" == typeof a.item || "string" == typeof a.item
}
if(goog.isFunction(a)) {
return"function" == typeof a.item
}
}
return!1
};
goog.dom.getAncestorByTagNameAndClass = function(a, b, c) {
if(!b && !c) {
return null
}
var d = b ? b.toUpperCase() : null;
return goog.dom.getAncestor(a, function(a) {
return(!d || a.nodeName == d) && (!c || goog.dom.classes.has(a, c))
}, !0)
};
goog.dom.getAncestorByClass = function(a, b) {
return goog.dom.getAncestorByTagNameAndClass(a, null, b)
};
goog.dom.getAncestor = function(a, b, c, d) {
c || (a = a.parentNode);
for(var c = null == d, e = 0;a && (c || e <= d);) {
if(b(a)) {
return a
}
a = a.parentNode;
e++
}
return null
};
goog.dom.getActiveElement = function(a) {
try {
return a && a.activeElement
}catch(b) {
}
return null
};
goog.dom.DomHelper = function(a) {
this.document_ = a || goog.global.document || document
};
goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper;
goog.dom.DomHelper.prototype.setDocument = function(a) {
this.document_ = a
};
goog.dom.DomHelper.prototype.getDocument = function() {
return this.document_
};
goog.dom.DomHelper.prototype.getElement = function(a) {
return goog.isString(a) ? this.document_.getElementById(a) : a
};
goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement;
goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function(a, b, c) {
return goog.dom.getElementsByTagNameAndClass_(this.document_, a, b, c)
};
goog.dom.DomHelper.prototype.getElementsByClass = function(a, b) {
return goog.dom.getElementsByClass(a, b || this.document_)
};
goog.dom.DomHelper.prototype.getElementByClass = function(a, b) {
return goog.dom.getElementByClass(a, b || this.document_)
};
goog.dom.DomHelper.prototype.$$ = goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;
goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties;
goog.dom.DomHelper.prototype.getViewportSize = function(a) {
return goog.dom.getViewportSize(a || this.getWindow())
};
goog.dom.DomHelper.prototype.getDocumentHeight = function() {
return goog.dom.getDocumentHeight_(this.getWindow())
};
goog.dom.DomHelper.prototype.createDom = function(a, b, c) {
return goog.dom.createDom_(this.document_, arguments)
};
goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom;
goog.dom.DomHelper.prototype.createElement = function(a) {
return this.document_.createElement(a)
};
goog.dom.DomHelper.prototype.createTextNode = function(a) {
return this.document_.createTextNode(a)
};
goog.dom.DomHelper.prototype.createTable = function(a, b, c) {
return goog.dom.createTable_(this.document_, a, b, !!c)
};
goog.dom.DomHelper.prototype.htmlToDocumentFragment = function(a) {
return goog.dom.htmlToDocumentFragment_(this.document_, a)
};
goog.dom.DomHelper.prototype.getCompatMode = function() {
return this.isCss1CompatMode() ? "CSS1Compat" : "BackCompat"
};
goog.dom.DomHelper.prototype.isCss1CompatMode = function() {
return goog.dom.isCss1CompatMode_(this.document_)
};
goog.dom.DomHelper.prototype.getWindow = function() {
return goog.dom.getWindow_(this.document_)
};
goog.dom.DomHelper.prototype.getDocumentScrollElement = function() {
return goog.dom.getDocumentScrollElement_(this.document_)
};
goog.dom.DomHelper.prototype.getDocumentScroll = function() {
return goog.dom.getDocumentScroll_(this.document_)
};
goog.dom.DomHelper.prototype.getActiveElement = function(a) {
return goog.dom.getActiveElement(a || this.document_)
};
goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild;
goog.dom.DomHelper.prototype.append = goog.dom.append;
goog.dom.DomHelper.prototype.canHaveChildren = goog.dom.canHaveChildren;
goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren;
goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore;
goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter;
goog.dom.DomHelper.prototype.insertChildAt = goog.dom.insertChildAt;
goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode;
goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode;
goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement;
goog.dom.DomHelper.prototype.getChildren = goog.dom.getChildren;
goog.dom.DomHelper.prototype.getFirstElementChild = goog.dom.getFirstElementChild;
goog.dom.DomHelper.prototype.getLastElementChild = goog.dom.getLastElementChild;
goog.dom.DomHelper.prototype.getNextElementSibling = goog.dom.getNextElementSibling;
goog.dom.DomHelper.prototype.getPreviousElementSibling = goog.dom.getPreviousElementSibling;
goog.dom.DomHelper.prototype.getNextNode = goog.dom.getNextNode;
goog.dom.DomHelper.prototype.getPreviousNode = goog.dom.getPreviousNode;
goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike;
goog.dom.DomHelper.prototype.isElement = goog.dom.isElement;
goog.dom.DomHelper.prototype.isWindow = goog.dom.isWindow;
goog.dom.DomHelper.prototype.getParentElement = goog.dom.getParentElement;
goog.dom.DomHelper.prototype.contains = goog.dom.contains;
goog.dom.DomHelper.prototype.compareNodeOrder = goog.dom.compareNodeOrder;
goog.dom.DomHelper.prototype.findCommonAncestor = goog.dom.findCommonAncestor;
goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument;
goog.dom.DomHelper.prototype.getFrameContentDocument = goog.dom.getFrameContentDocument;
goog.dom.DomHelper.prototype.getFrameContentWindow = goog.dom.getFrameContentWindow;
goog.dom.DomHelper.prototype.setTextContent = goog.dom.setTextContent;
goog.dom.DomHelper.prototype.getOuterHtml = goog.dom.getOuterHtml;
goog.dom.DomHelper.prototype.findNode = goog.dom.findNode;
goog.dom.DomHelper.prototype.findNodes = goog.dom.findNodes;
goog.dom.DomHelper.prototype.isFocusableTabIndex = goog.dom.isFocusableTabIndex;
goog.dom.DomHelper.prototype.setFocusableTabIndex = goog.dom.setFocusableTabIndex;
goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent;
goog.dom.DomHelper.prototype.getNodeTextLength = goog.dom.getNodeTextLength;
goog.dom.DomHelper.prototype.getNodeTextOffset = goog.dom.getNodeTextOffset;
goog.dom.DomHelper.prototype.getNodeAtOffset = goog.dom.getNodeAtOffset;
goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass = goog.dom.getAncestorByTagNameAndClass;
goog.dom.DomHelper.prototype.getAncestorByClass = goog.dom.getAncestorByClass;
goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
goog.math.Box = function(a, b, c, d) {
this.top = a;
this.right = b;
this.bottom = c;
this.left = d
};
goog.math.Box.boundingBox = function(a) {
for(var b = new goog.math.Box(arguments[0].y, arguments[0].x, arguments[0].y, arguments[0].x), c = 1;c < arguments.length;c++) {
var d = arguments[c];
b.top = Math.min(b.top, d.y);
b.right = Math.max(b.right, d.x);
b.bottom = Math.max(b.bottom, d.y);
b.left = Math.min(b.left, d.x)
}
return b
};
goog.math.Box.prototype.clone = function() {
return new goog.math.Box(this.top, this.right, this.bottom, this.left)
};
goog.DEBUG && (goog.math.Box.prototype.toString = function() {
return"(" + this.top + "t, " + this.right + "r, " + this.bottom + "b, " + this.left + "l)"
});
goog.math.Box.prototype.contains = function(a) {
return goog.math.Box.contains(this, a)
};
goog.math.Box.prototype.expand = function(a, b, c, d) {
goog.isObject(a) ? (this.top -= a.top, this.right += a.right, this.bottom += a.bottom, this.left -= a.left) : (this.top -= a, this.right += b, this.bottom += c, this.left -= d);
return this
};
goog.math.Box.prototype.expandToInclude = function(a) {
this.left = Math.min(this.left, a.left);
this.top = Math.min(this.top, a.top);
this.right = Math.max(this.right, a.right);
this.bottom = Math.max(this.bottom, a.bottom)
};
goog.math.Box.equals = function(a, b) {
return a == b ? !0 : !a || !b ? !1 : a.top == b.top && a.right == b.right && a.bottom == b.bottom && a.left == b.left
};
goog.math.Box.contains = function(a, b) {
return!a || !b ? !1 : b instanceof goog.math.Box ? b.left >= a.left && b.right <= a.right && b.top >= a.top && b.bottom <= a.bottom : b.x >= a.left && b.x <= a.right && b.y >= a.top && b.y <= a.bottom
};
goog.math.Box.relativePositionX = function(a, b) {
return b.x < a.left ? b.x - a.left : b.x > a.right ? b.x - a.right : 0
};
goog.math.Box.relativePositionY = function(a, b) {
return b.y < a.top ? b.y - a.top : b.y > a.bottom ? b.y - a.bottom : 0
};
goog.math.Box.distance = function(a, b) {
var c = goog.math.Box.relativePositionX(a, b), d = goog.math.Box.relativePositionY(a, b);
return Math.sqrt(c * c + d * d)
};
goog.math.Box.intersects = function(a, b) {
return a.left <= b.right && b.left <= a.right && a.top <= b.bottom && b.top <= a.bottom
};
goog.math.Box.intersectsWithPadding = function(a, b, c) {
return a.left <= b.right + c && b.left <= a.right + c && a.top <= b.bottom + c && b.top <= a.bottom + c
};
goog.math.Rect = function(a, b, c, d) {
this.left = a;
this.top = b;
this.width = c;
this.height = d
};
goog.math.Rect.prototype.clone = function() {
return new goog.math.Rect(this.left, this.top, this.width, this.height)
};
goog.math.Rect.prototype.toBox = function() {
return new goog.math.Box(this.top, this.left + this.width, this.top + this.height, this.left)
};
goog.math.Rect.createFromBox = function(a) {
return new goog.math.Rect(a.left, a.top, a.right - a.left, a.bottom - a.top)
};
goog.DEBUG && (goog.math.Rect.prototype.toString = function() {
return"(" + this.left + ", " + this.top + " - " + this.width + "w x " + this.height + "h)"
});
goog.math.Rect.equals = function(a, b) {
return a == b ? !0 : !a || !b ? !1 : a.left == b.left && a.width == b.width && a.top == b.top && a.height == b.height
};
goog.math.Rect.prototype.intersection = function(a) {
var b = Math.max(this.left, a.left), c = Math.min(this.left + this.width, a.left + a.width);
if(b <= c) {
var d = Math.max(this.top, a.top), a = Math.min(this.top + this.height, a.top + a.height);
if(d <= a) {
return this.left = b, this.top = d, this.width = c - b, this.height = a - d, !0
}
}
return!1
};
goog.math.Rect.intersection = function(a, b) {
var c = Math.max(a.left, b.left), d = Math.min(a.left + a.width, b.left + b.width);
if(c <= d) {
var e = Math.max(a.top, b.top), f = Math.min(a.top + a.height, b.top + b.height);
if(e <= f) {
return new goog.math.Rect(c, e, d - c, f - e)
}
}
return null
};
goog.math.Rect.intersects = function(a, b) {
return a.left <= b.left + b.width && b.left <= a.left + a.width && a.top <= b.top + b.height && b.top <= a.top + a.height
};
goog.math.Rect.prototype.intersects = function(a) {
return goog.math.Rect.intersects(this, a)
};
goog.math.Rect.difference = function(a, b) {
var c = goog.math.Rect.intersection(a, b);
if(!c || !c.height || !c.width) {
return[a.clone()]
}
var c = [], d = a.top, e = a.height, f = a.left + a.width, g = a.top + a.height, h = b.left + b.width, i = b.top + b.height;
b.top > a.top && (c.push(new goog.math.Rect(a.left, a.top, a.width, b.top - a.top)), d = b.top, e -= b.top - a.top);
i < g && (c.push(new goog.math.Rect(a.left, i, a.width, g - i)), e = i - d);
b.left > a.left && c.push(new goog.math.Rect(a.left, d, b.left - a.left, e));
h < f && c.push(new goog.math.Rect(h, d, f - h, e));
return c
};
goog.math.Rect.prototype.difference = function(a) {
return goog.math.Rect.difference(this, a)
};
goog.math.Rect.prototype.boundingRect = function(a) {
var b = Math.max(this.left + this.width, a.left + a.width), c = Math.max(this.top + this.height, a.top + a.height);
this.left = Math.min(this.left, a.left);
this.top = Math.min(this.top, a.top);
this.width = b - this.left;
this.height = c - this.top
};
goog.math.Rect.boundingRect = function(a, b) {
if(!a || !b) {
return null
}
var c = a.clone();
c.boundingRect(b);
return c
};
goog.math.Rect.prototype.contains = function(a) {
return a instanceof goog.math.Rect ? this.left <= a.left && this.left + this.width >= a.left + a.width && this.top <= a.top && this.top + this.height >= a.top + a.height : a.x >= this.left && a.x <= this.left + this.width && a.y >= this.top && a.y <= this.top + this.height
};
goog.math.Rect.prototype.getSize = function() {
return new goog.math.Size(this.width, this.height)
};
goog.style = {};
goog.style.setStyle = function(a, b, c) {
goog.isString(b) ? goog.style.setStyle_(a, c, b) : goog.object.forEach(b, goog.partial(goog.style.setStyle_, a))
};
goog.style.setStyle_ = function(a, b, c) {
a.style[goog.string.toCamelCase(c)] = b
};
goog.style.getStyle = function(a, b) {
return a.style[goog.string.toCamelCase(b)] || ""
};
goog.style.getComputedStyle = function(a, b) {
var c = goog.dom.getOwnerDocument(a);
return c.defaultView && c.defaultView.getComputedStyle && (c = c.defaultView.getComputedStyle(a, null)) ? c[b] || c.getPropertyValue(b) || "" : ""
};
goog.style.getCascadedStyle = function(a, b) {
return a.currentStyle ? a.currentStyle[b] : null
};
goog.style.getStyle_ = function(a, b) {
return goog.style.getComputedStyle(a, b) || goog.style.getCascadedStyle(a, b) || a.style && a.style[b]
};
goog.style.getComputedPosition = function(a) {
return goog.style.getStyle_(a, "position")
};
goog.style.getBackgroundColor = function(a) {
return goog.style.getStyle_(a, "backgroundColor")
};
goog.style.getComputedOverflowX = function(a) {
return goog.style.getStyle_(a, "overflowX")
};
goog.style.getComputedOverflowY = function(a) {
return goog.style.getStyle_(a, "overflowY")
};
goog.style.getComputedZIndex = function(a) {
return goog.style.getStyle_(a, "zIndex")
};
goog.style.getComputedTextAlign = function(a) {
return goog.style.getStyle_(a, "textAlign")
};
goog.style.getComputedCursor = function(a) {
return goog.style.getStyle_(a, "cursor")
};
goog.style.setPosition = function(a, b, c) {
var d, e = goog.userAgent.GECKO && (goog.userAgent.MAC || goog.userAgent.X11) && goog.userAgent.isVersion("1.9");
b instanceof goog.math.Coordinate ? (d = b.x, b = b.y) : (d = b, b = c);
a.style.left = goog.style.getPixelStyleValue_(d, e);
a.style.top = goog.style.getPixelStyleValue_(b, e)
};
goog.style.getPosition = function(a) {
return new goog.math.Coordinate(a.offsetLeft, a.offsetTop)
};
goog.style.getClientViewportElement = function(a) {
a = a ? goog.dom.getOwnerDocument(a) : goog.dom.getDocument();
return goog.userAgent.IE && !goog.userAgent.isDocumentMode(9) && !goog.dom.getDomHelper(a).isCss1CompatMode() ? a.body : a.documentElement
};
goog.style.getViewportPageOffset = function(a) {
var b = a.body, a = a.documentElement;
return new goog.math.Coordinate(b.scrollLeft || a.scrollLeft, b.scrollTop || a.scrollTop)
};
goog.style.supportsGetBoundingClientRect_ = function(a) {
if(goog.userAgent.MOBILE && goog.userAgent.WEBKIT) {
var b = a.ownerDocument.defaultView;
if(b != b.top) {
return!1
}
}
return!!a.getBoundingClientRect
};
goog.style.getBoundingClientRect_ = function(a) {
var b = a.getBoundingClientRect();
goog.userAgent.IE && (a = a.ownerDocument, b.left -= a.documentElement.clientLeft + a.body.clientLeft, b.top -= a.documentElement.clientTop + a.body.clientTop);
return b
};
goog.style.getOffsetParent = function(a) {
if(goog.userAgent.IE && !goog.userAgent.isDocumentMode(8)) {
return a.offsetParent
}
for(var b = goog.dom.getOwnerDocument(a), c = goog.style.getStyle_(a, "position"), d = "fixed" == c || "absolute" == c, a = a.parentNode;a && a != b;a = a.parentNode) {
if(c = goog.style.getStyle_(a, "position"), d = d && "static" == c && a != b.documentElement && a != b.body, !d && (a.scrollWidth > a.clientWidth || a.scrollHeight > a.clientHeight || "fixed" == c || "absolute" == c || "relative" == c)) {
return a
}
}
return null
};
goog.style.getVisibleRectForElement = function(a) {
for(var b = new goog.math.Box(0, Infinity, Infinity, 0), c = goog.dom.getDomHelper(a), d = c.getDocument().body, e = c.getDocument().documentElement, f = c.getDocumentScrollElement();a = goog.style.getOffsetParent(a);) {
if((!goog.userAgent.IE || 0 != a.clientWidth) && (!goog.userAgent.WEBKIT || 0 != a.clientHeight || a != d) && a != d && a != e && "visible" != goog.style.getStyle_(a, "overflow")) {
var g = goog.style.getPageOffset(a), h = goog.style.getClientLeftTop(a);
g.x += h.x;
g.y += h.y;
b.top = Math.max(b.top, g.y);
b.right = Math.min(b.right, g.x + a.clientWidth);
b.bottom = Math.min(b.bottom, g.y + a.clientHeight);
b.left = Math.max(b.left, g.x)
}
}
d = f.scrollLeft;
f = f.scrollTop;
b.left = Math.max(b.left, d);
b.top = Math.max(b.top, f);
c = c.getViewportSize();
b.right = Math.min(b.right, d + c.width);
b.bottom = Math.min(b.bottom, f + c.height);
return 0 <= b.top && 0 <= b.left && b.bottom > b.top && b.right > b.left ? b : null
};
goog.style.getContainerOffsetToScrollInto = function(a, b, c) {
var d = goog.style.getPageOffset(a), e = goog.style.getPageOffset(b), f = goog.style.getBorderBox(b), g = d.x - e.x - f.left, d = d.y - e.y - f.top, e = b.clientWidth - a.offsetWidth, a = b.clientHeight - a.offsetHeight, f = b.scrollLeft, b = b.scrollTop;
c ? (f += g - e / 2, b += d - a / 2) : (f += Math.min(g, Math.max(g - e, 0)), b += Math.min(d, Math.max(d - a, 0)));
return new goog.math.Coordinate(f, b)
};
goog.style.scrollIntoContainerView = function(a, b, c) {
a = goog.style.getContainerOffsetToScrollInto(a, b, c);
b.scrollLeft = a.x;
b.scrollTop = a.y
};
goog.style.getClientLeftTop = function(a) {
if(goog.userAgent.GECKO && !goog.userAgent.isVersion("1.9")) {
var b = parseFloat(goog.style.getComputedStyle(a, "borderLeftWidth"));
if(goog.style.isRightToLeft(a)) {
var c = a.offsetWidth - a.clientWidth - b - parseFloat(goog.style.getComputedStyle(a, "borderRightWidth")), b = b + c
}
return new goog.math.Coordinate(b, parseFloat(goog.style.getComputedStyle(a, "borderTopWidth")))
}
return new goog.math.Coordinate(a.clientLeft, a.clientTop)
};
goog.style.getPageOffset = function(a) {
var b, c = goog.dom.getOwnerDocument(a), d = goog.style.getStyle_(a, "position");
goog.asserts.assertObject(a, "Parameter is required");
var e = goog.userAgent.GECKO && c.getBoxObjectFor && !a.getBoundingClientRect && "absolute" == d && (b = c.getBoxObjectFor(a)) && (0 > b.screenX || 0 > b.screenY), f = new goog.math.Coordinate(0, 0), g = goog.style.getClientViewportElement(c);
if(a == g) {
return f
}
if(goog.style.supportsGetBoundingClientRect_(a)) {
b = goog.style.getBoundingClientRect_(a), a = goog.dom.getDomHelper(c).getDocumentScroll(), f.x = b.left + a.x, f.y = b.top + a.y
}else {
if(c.getBoxObjectFor && !e) {
b = c.getBoxObjectFor(a), a = c.getBoxObjectFor(g), f.x = b.screenX - a.screenX, f.y = b.screenY - a.screenY
}else {
b = a;
do {
f.x += b.offsetLeft;
f.y += b.offsetTop;
b != a && (f.x += b.clientLeft || 0, f.y += b.clientTop || 0);
if(goog.userAgent.WEBKIT && "fixed" == goog.style.getComputedPosition(b)) {
f.x += c.body.scrollLeft;
f.y += c.body.scrollTop;
break
}
b = b.offsetParent
}while(b && b != a);
if(goog.userAgent.OPERA || goog.userAgent.WEBKIT && "absolute" == d) {
f.y -= c.body.offsetTop
}
for(b = a;(b = goog.style.getOffsetParent(b)) && b != c.body && b != g;) {
if(f.x -= b.scrollLeft, !goog.userAgent.OPERA || "TR" != b.tagName) {
f.y -= b.scrollTop
}
}
}
}
return f
};
goog.style.getPageOffsetLeft = function(a) {
return goog.style.getPageOffset(a).x
};
goog.style.getPageOffsetTop = function(a) {
return goog.style.getPageOffset(a).y
};
goog.style.getFramedPageOffset = function(a, b) {
var c = new goog.math.Coordinate(0, 0), d = goog.dom.getWindow(goog.dom.getOwnerDocument(a)), e = a;
do {
var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPosition(e);
c.x += f.x;
c.y += f.y
}while(d && d != b && (e = d.frameElement) && (d = d.parent));
return c
};
goog.style.translateRectForAnotherFrame = function(a, b, c) {
if(b.getDocument() != c.getDocument()) {
var d = b.getDocument().body, c = goog.style.getFramedPageOffset(d, c.getWindow()), c = goog.math.Coordinate.difference(c, goog.style.getPageOffset(d));
goog.userAgent.IE && !b.isCss1CompatMode() && (c = goog.math.Coordinate.difference(c, b.getDocumentScroll()));
a.left += c.x;
a.top += c.y
}
};
goog.style.getRelativePosition = function(a, b) {
var c = goog.style.getClientPosition(a), d = goog.style.getClientPosition(b);
return new goog.math.Coordinate(c.x - d.x, c.y - d.y)
};
goog.style.getClientPosition = function(a) {
var b = new goog.math.Coordinate;
if(a.nodeType == goog.dom.NodeType.ELEMENT) {
if(goog.style.supportsGetBoundingClientRect_(a)) {
var c = goog.style.getBoundingClientRect_(a);
b.x = c.left;
b.y = c.top
}else {
var c = goog.dom.getDomHelper(a).getDocumentScroll(), d = goog.style.getPageOffset(a);
b.x = d.x - c.x;
b.y = d.y - c.y
}
goog.userAgent.GECKO && !goog.userAgent.isVersion(12) && (b = goog.math.Coordinate.sum(b, goog.style.getCssTranslation(a)))
}else {
c = goog.isFunction(a.getBrowserEvent), d = a, a.targetTouches ? d = a.targetTouches[0] : c && a.getBrowserEvent().targetTouches && (d = a.getBrowserEvent().targetTouches[0]), b.x = d.clientX, b.y = d.clientY
}
return b
};
goog.style.setPageOffset = function(a, b, c) {
var d = goog.style.getPageOffset(a);
b instanceof goog.math.Coordinate && (c = b.y, b = b.x);
goog.style.setPosition(a, a.offsetLeft + (b - d.x), a.offsetTop + (c - d.y))
};
goog.style.setSize = function(a, b, c) {
if(b instanceof goog.math.Size) {
c = b.height, b = b.width
}else {
if(void 0 == c) {
throw Error("missing height argument");
}
}
goog.style.setWidth(a, b);
goog.style.setHeight(a, c)
};
goog.style.getPixelStyleValue_ = function(a, b) {
"number" == typeof a && (a = (b ? Math.round(a) : a) + "px");
return a
};
goog.style.setHeight = function(a, b) {
a.style.height = goog.style.getPixelStyleValue_(b, !0)
};
goog.style.setWidth = function(a, b) {
a.style.width = goog.style.getPixelStyleValue_(b, !0)
};
goog.style.getSize = function(a) {
if("none" != goog.style.getStyle_(a, "display")) {
return goog.style.getSizeWithDisplay_(a)
}
var b = a.style, c = b.display, d = b.visibility, e = b.position;
b.visibility = "hidden";
b.position = "absolute";
b.display = "inline";
a = goog.style.getSizeWithDisplay_(a);
b.display = c;
b.position = e;
b.visibility = d;
return a
};
goog.style.getSizeWithDisplay_ = function(a) {
var b = a.offsetWidth, c = a.offsetHeight, d = goog.userAgent.WEBKIT && !b && !c;
return(!goog.isDef(b) || d) && a.getBoundingClientRect ? (a = goog.style.getBoundingClientRect_(a), new goog.math.Size(a.right - a.left, a.bottom - a.top)) : new goog.math.Size(b, c)
};
goog.style.getBounds = function(a) {
var b = goog.style.getPageOffset(a), a = goog.style.getSize(a);
return new goog.math.Rect(b.x, b.y, a.width, a.height)
};
goog.style.toCamelCase = function(a) {
return goog.string.toCamelCase(String(a))
};
goog.style.toSelectorCase = function(a) {
return goog.string.toSelectorCase(a)
};
goog.style.getOpacity = function(a) {
var b = a.style, a = "";
"opacity" in b ? a = b.opacity : "MozOpacity" in b ? a = b.MozOpacity : "filter" in b && (b = b.filter.match(/alpha\(opacity=([\d.]+)\)/)) && (a = String(b[1] / 100));
return"" == a ? a : Number(a)
};
goog.style.setOpacity = function(a, b) {
var c = a.style;
"opacity" in c ? c.opacity = b : "MozOpacity" in c ? c.MozOpacity = b : "filter" in c && (c.filter = "" === b ? "" : "alpha(opacity=" + 100 * b + ")")
};
goog.style.setTransparentBackgroundImage = function(a, b) {
var c = a.style;
goog.userAgent.IE && !goog.userAgent.isVersion("8") ? c.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + b + '", sizingMethod="crop")' : (c.backgroundImage = "url(" + b + ")", c.backgroundPosition = "top left", c.backgroundRepeat = "no-repeat")
};
goog.style.clearTransparentBackgroundImage = function(a) {
a = a.style;
"filter" in a ? a.filter = "" : a.backgroundImage = "none"
};
goog.style.showElement = function(a, b) {
a.style.display = b ? "" : "none"
};
goog.style.isElementShown = function(a) {
return"none" != a.style.display
};
goog.style.installStyles = function(a, b) {
var c = goog.dom.getDomHelper(b), d = null;
if(goog.userAgent.IE) {
d = c.getDocument().createStyleSheet(), goog.style.setStyles(d, a)
}else {
var e = c.getElementsByTagNameAndClass("head")[0];
e || (d = c.getElementsByTagNameAndClass("body")[0], e = c.createDom("head"), d.parentNode.insertBefore(e, d));
d = c.createDom("style");
goog.style.setStyles(d, a);
c.appendChild(e, d)
}
return d
};
goog.style.uninstallStyles = function(a) {
goog.dom.removeNode(a.ownerNode || a.owningElement || a)
};
goog.style.setStyles = function(a, b) {
goog.userAgent.IE ? a.cssText = b : a.innerHTML = b
};
goog.style.setPreWrap = function(a) {
a = a.style;
goog.userAgent.IE && !goog.userAgent.isVersion("8") ? (a.whiteSpace = "pre", a.wordWrap = "break-word") : a.whiteSpace = goog.userAgent.GECKO ? "-moz-pre-wrap" : "pre-wrap"
};
goog.style.setInlineBlock = function(a) {
a = a.style;
a.position = "relative";
goog.userAgent.IE && !goog.userAgent.isVersion("8") ? (a.zoom = "1", a.display = "inline") : a.display = goog.userAgent.GECKO ? goog.userAgent.isVersion("1.9a") ? "inline-block" : "-moz-inline-box" : "inline-block"
};
goog.style.isRightToLeft = function(a) {
return"rtl" == goog.style.getStyle_(a, "direction")
};
goog.style.unselectableStyle_ = goog.userAgent.GECKO ? "MozUserSelect" : goog.userAgent.WEBKIT ? "WebkitUserSelect" : null;
goog.style.isUnselectable = function(a) {
return goog.style.unselectableStyle_ ? "none" == a.style[goog.style.unselectableStyle_].toLowerCase() : goog.userAgent.IE || goog.userAgent.OPERA ? "on" == a.getAttribute("unselectable") : !1
};
goog.style.setUnselectable = function(a, b, c) {
var c = !c ? a.getElementsByTagName("*") : null, d = goog.style.unselectableStyle_;
if(d) {
if(b = b ? "none" : "", a.style[d] = b, c) {
for(var a = 0, e;e = c[a];a++) {
e.style[d] = b
}
}
}else {
if(goog.userAgent.IE || goog.userAgent.OPERA) {
if(b = b ? "on" : "", a.setAttribute("unselectable", b), c) {
for(a = 0;e = c[a];a++) {
e.setAttribute("unselectable", b)
}
}
}
}
};
goog.style.getBorderBoxSize = function(a) {
return new goog.math.Size(a.offsetWidth, a.offsetHeight)
};
goog.style.setBorderBoxSize = function(a, b) {
var c = goog.dom.getOwnerDocument(a), d = goog.dom.getDomHelper(c).isCss1CompatMode();
if(goog.userAgent.IE && (!d || !goog.userAgent.isVersion("8"))) {
if(c = a.style, d) {
var d = goog.style.getPaddingBox(a), e = goog.style.getBorderBox(a);
c.pixelWidth = b.width - e.left - d.left - d.right - e.right;
c.pixelHeight = b.height - e.top - d.top - d.bottom - e.bottom
}else {
c.pixelWidth = b.width, c.pixelHeight = b.height
}
}else {
goog.style.setBoxSizingSize_(a, b, "border-box")
}
};
goog.style.getContentBoxSize = function(a) {
var b = goog.dom.getOwnerDocument(a), c = goog.userAgent.IE && a.currentStyle;
if(c && goog.dom.getDomHelper(b).isCss1CompatMode() && "auto" != c.width && "auto" != c.height && !c.boxSizing) {
return b = goog.style.getIePixelValue_(a, c.width, "width", "pixelWidth"), a = goog.style.getIePixelValue_(a, c.height, "height", "pixelHeight"), new goog.math.Size(b, a)
}
c = goog.style.getBorderBoxSize(a);
b = goog.style.getPaddingBox(a);
a = goog.style.getBorderBox(a);
return new goog.math.Size(c.width - a.left - b.left - b.right - a.right, c.height - a.top - b.top - b.bottom - a.bottom)
};
goog.style.setContentBoxSize = function(a, b) {
var c = goog.dom.getOwnerDocument(a), d = goog.dom.getDomHelper(c).isCss1CompatMode();
if(goog.userAgent.IE && (!d || !goog.userAgent.isVersion("8"))) {
if(c = a.style, d) {
c.pixelWidth = b.width, c.pixelHeight = b.height
}else {
var d = goog.style.getPaddingBox(a), e = goog.style.getBorderBox(a);
c.pixelWidth = b.width + e.left + d.left + d.right + e.right;
c.pixelHeight = b.height + e.top + d.top + d.bottom + e.bottom
}
}else {
goog.style.setBoxSizingSize_(a, b, "content-box")
}
};
goog.style.setBoxSizingSize_ = function(a, b, c) {
a = a.style;
goog.userAgent.GECKO ? a.MozBoxSizing = c : goog.userAgent.WEBKIT ? a.WebkitBoxSizing = c : a.boxSizing = c;
a.width = Math.max(b.width, 0) + "px";
a.height = Math.max(b.height, 0) + "px"
};
goog.style.getIePixelValue_ = function(a, b, c, d) {
if(/^\d+px?$/.test(b)) {
return parseInt(b, 10)
}
var e = a.style[c], f = a.runtimeStyle[c];
a.runtimeStyle[c] = a.currentStyle[c];
a.style[c] = b;
b = a.style[d];
a.style[c] = e;
a.runtimeStyle[c] = f;
return b
};
goog.style.getIePixelDistance_ = function(a, b) {
return goog.style.getIePixelValue_(a, goog.style.getCascadedStyle(a, b), "left", "pixelLeft")
};
goog.style.getBox_ = function(a, b) {
if(goog.userAgent.IE) {
var c = goog.style.getIePixelDistance_(a, b + "Left"), d = goog.style.getIePixelDistance_(a, b + "Right"), e = goog.style.getIePixelDistance_(a, b + "Top"), f = goog.style.getIePixelDistance_(a, b + "Bottom");
return new goog.math.Box(e, d, f, c)
}
c = goog.style.getComputedStyle(a, b + "Left");
d = goog.style.getComputedStyle(a, b + "Right");
e = goog.style.getComputedStyle(a, b + "Top");
f = goog.style.getComputedStyle(a, b + "Bottom");
return new goog.math.Box(parseFloat(e), parseFloat(d), parseFloat(f), parseFloat(c))
};
goog.style.getPaddingBox = function(a) {
return goog.style.getBox_(a, "padding")
};
goog.style.getMarginBox = function(a) {
return goog.style.getBox_(a, "margin")
};
goog.style.ieBorderWidthKeywords_ = {thin:2, medium:4, thick:6};
goog.style.getIePixelBorder_ = function(a, b) {
if("none" == goog.style.getCascadedStyle(a, b + "Style")) {
return 0
}
var c = goog.style.getCascadedStyle(a, b + "Width");
return c in goog.style.ieBorderWidthKeywords_ ? goog.style.ieBorderWidthKeywords_[c] : goog.style.getIePixelValue_(a, c, "left", "pixelLeft")
};
goog.style.getBorderBox = function(a) {
if(goog.userAgent.IE) {
var b = goog.style.getIePixelBorder_(a, "borderLeft"), c = goog.style.getIePixelBorder_(a, "borderRight"), d = goog.style.getIePixelBorder_(a, "borderTop"), a = goog.style.getIePixelBorder_(a, "borderBottom");
return new goog.math.Box(d, c, a, b)
}
b = goog.style.getComputedStyle(a, "borderLeftWidth");
c = goog.style.getComputedStyle(a, "borderRightWidth");
d = goog.style.getComputedStyle(a, "borderTopWidth");
a = goog.style.getComputedStyle(a, "borderBottomWidth");
return new goog.math.Box(parseFloat(d), parseFloat(c), parseFloat(a), parseFloat(b))
};
goog.style.getFontFamily = function(a) {
var b = goog.dom.getOwnerDocument(a), c = "";
if(b.body.createTextRange) {
b = b.body.createTextRange();
b.moveToElementText(a);
try {
c = b.queryCommandValue("FontName")
}catch(d) {
c = ""
}
}
c || (c = goog.style.getStyle_(a, "fontFamily"));
a = c.split(",");
1 < a.length && (c = a[0]);
return goog.string.stripQuotes(c, "\"'")
};
goog.style.lengthUnitRegex_ = /[^\d]+$/;
goog.style.getLengthUnits = function(a) {
return(a = a.match(goog.style.lengthUnitRegex_)) && a[0] || null
};
goog.style.ABSOLUTE_CSS_LENGTH_UNITS_ = {cm:1, "in":1, mm:1, pc:1, pt:1};
goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_ = {em:1, ex:1};
goog.style.getFontSize = function(a) {
var b = goog.style.getStyle_(a, "fontSize"), c = goog.style.getLengthUnits(b);
if(b && "px" == c) {
return parseInt(b, 10)
}
if(goog.userAgent.IE) {
if(c in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_) {
return goog.style.getIePixelValue_(a, b, "left", "pixelLeft")
}
if(a.parentNode && a.parentNode.nodeType == goog.dom.NodeType.ELEMENT && c in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_) {
return a = a.parentNode, c = goog.style.getStyle_(a, "fontSize"), goog.style.getIePixelValue_(a, b == c ? "1em" : b, "left", "pixelLeft")
}
}
c = goog.dom.createDom("span", {style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});
goog.dom.appendChild(a, c);
b = c.offsetHeight;
goog.dom.removeNode(c);
return b
};
goog.style.parseStyleAttribute = function(a) {
var b = {};
goog.array.forEach(a.split(/\s*;\s*/), function(a) {
a = a.split(/\s*:\s*/);
2 == a.length && (b[goog.string.toCamelCase(a[0].toLowerCase())] = a[1])
});
return b
};
goog.style.toStyleAttribute = function(a) {
var b = [];
goog.object.forEach(a, function(a, d) {
b.push(goog.string.toSelectorCase(d), ":", a, ";")
});
return b.join("")
};
goog.style.setFloat = function(a, b) {
a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] = b
};
goog.style.getFloat = function(a) {
return a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] || ""
};
goog.style.getScrollbarWidth = function(a) {
var b = goog.dom.createElement("div");
a && (b.className = a);
b.style.cssText = "overflow:auto;position:absolute;top:0;width:100px;height:100px";
a = goog.dom.createElement("div");
goog.style.setSize(a, "200px", "200px");
b.appendChild(a);
goog.dom.appendChild(goog.dom.getDocument().body, b);
a = b.offsetWidth - b.clientWidth;
goog.dom.removeNode(b);
return a
};
goog.style.MATRIX_TRANSLATION_REGEX_ = /matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;
goog.style.getCssTranslation = function(a) {
var b;
goog.userAgent.IE ? b = "-ms-transform" : goog.userAgent.WEBKIT ? b = "-webkit-transform" : goog.userAgent.OPERA ? b = "-o-transform" : goog.userAgent.GECKO && (b = "-moz-transform");
var c;
b && (c = goog.style.getStyle_(a, b));
c || (c = goog.style.getStyle_(a, "transform"));
if(!c) {
return new goog.math.Coordinate(0, 0)
}
a = c.match(goog.style.MATRIX_TRANSLATION_REGEX_);
return!a ? new goog.math.Coordinate(0, 0) : new goog.math.Coordinate(parseFloat(a[1]), parseFloat(a[2]))
};
crate.compiler = {};
crate.compiler.xmlns = cljs.core.ObjMap.fromObject(["\ufdd0'xhtml", "\ufdd0'svg"], {"\ufdd0'xhtml":"http://www.w3.org/1999/xhtml", "\ufdd0'svg":"http://www.w3.org/2000/svg"});
crate.compiler.group_id = cljs.core.atom.call(null, 0);
crate.compiler.bindings = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
crate.compiler.capture_binding = function(a, b) {
return cljs.core.swap_BANG_.call(null, crate.compiler.bindings, cljs.core.conj, cljs.core.PersistentVector.fromArray([a, b], !0))
};
crate.compiler.Element = {};
crate.compiler._elem = function(a) {
var b;
b = a ? a.crate$compiler$Element$_elem$arity$1 : a;
if(b) {
return a.crate$compiler$Element$_elem$arity$1(a)
}
b = crate.compiler._elem[goog.typeOf(null == a ? null : a)];
if(!b && (b = crate.compiler._elem._, !b)) {
throw cljs.core.missing_protocol.call(null, "Element.-elem", a);
}
return b.call(null, a)
};
crate.compiler.as_content = function as_content(b, c) {
for(var d = cljs.core.seq.call(null, c);;) {
if(d) {
var e = cljs.core.first.call(null, d), f = e;
if(f ? cljs.core.truth_(cljs.core.truth_(null) ? null : f.crate$compiler$Element$) || (f.cljs$lang$protocol_mask$partition$ ? 0 : cljs.core.type_satisfies_.call(null, crate.compiler.Element, f)) : cljs.core.type_satisfies_.call(null, crate.compiler.Element, f)) {
e = crate.compiler._elem.call(null, e)
}else {
if(null == e) {
e = null
}else {
if(cljs.core.map_QMARK_.call(null, e)) {
throw"Maps cannot be used as content";
}
cljs.core.string_QMARK_.call(null, e) ? e = goog.dom.createTextNode(e) : cljs.core.vector_QMARK_.call(null, e) ? e = crate.compiler.elem_factory.call(null, e) : cljs.core.seq_QMARK_.call(null, e) ? e = as_content.call(null, b, e) : cljs.core.truth_(crate.binding.binding_coll_QMARK_.call(null, e)) ? (crate.compiler.capture_binding.call(null, "\ufdd0'coll", e), e = as_content.call(null, b, cljs.core.PersistentVector.fromArray([crate.binding.value.call(null, e)], !0))) : cljs.core.truth_(crate.binding.binding_QMARK_.call(null,
e)) ? (crate.compiler.capture_binding.call(null, "\ufdd0'text", e), e = as_content.call(null, b, cljs.core.PersistentVector.fromArray([crate.binding.value.call(null, e)], !0))) : e = cljs.core.truth_(e.nodeName) ? e : cljs.core.truth_(e.get) ? e.get(0) : goog.dom.createTextNode("" + cljs.core.str(e))
}
}
cljs.core.truth_(e) && goog.dom.appendChild(b, e);
d = cljs.core.next.call(null, d)
}else {
return null
}
}
};
crate.compiler.dom_binding = function() {
var a = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY), b = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY), c = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY), d = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY), e = cljs.core._lookup.call(null, cljs.core.ObjMap.EMPTY, "\ufdd0'hierarchy", cljs.core.global_hierarchy);
return new cljs.core.MultiFn("dom-binding", function(a) {
return a
}, "\ufdd0'default", e, a, b, c, d)
}();
cljs.core._add_method.call(null, crate.compiler.dom_binding, "\ufdd0'text", function(a, b, c) {
return crate.binding.on_change.call(null, b, function(a) {
goog.dom.removeChildren(c);
return crate.compiler.as_content.call(null, c, cljs.core.PersistentVector.fromArray([a], !0))
})
});
cljs.core._add_method.call(null, crate.compiler.dom_binding, "\ufdd0'attr", function(a, b, c) {
var d = cljs.core.nth.call(null, b, 0, null), a = cljs.core.nth.call(null, b, 1, null);
return crate.binding.on_change.call(null, a, function(a) {
return crate.compiler.dom_attr.call(null, c, d, a)
})
});
cljs.core._add_method.call(null, crate.compiler.dom_binding, "\ufdd0'style", function(a, b, c) {
var d = cljs.core.nth.call(null, b, 0, null), a = cljs.core.nth.call(null, b, 1, null);
return crate.binding.on_change.call(null, a, function(a) {
return cljs.core.truth_(d) ? crate.compiler.dom_style.call(null, c, d, a) : crate.compiler.dom_style.call(null, c, a)
})
});
crate.compiler.dom_add = function(a, b, c, d) {
a = crate.binding.opt.call(null, a, "\ufdd0'add");
return cljs.core.truth_(a) ? a.call(null, b, c, d) : goog.dom.appendChild(b, c)
};
crate.compiler.dom_remove = function(a, b) {
var c = crate.binding.opt.call(null, a, "\ufdd0'remove");
return cljs.core.truth_(c) ? c.call(null, b) : goog.dom.removeNode(b)
};
cljs.core._add_method.call(null, crate.compiler.dom_binding, "\ufdd0'coll", function(a, b, c) {
return crate.binding.on_change.call(null, b, function(a, e, f) {
var g = cljs.core._EQ_;
if(g.call(null, "\ufdd0'add", a)) {
return crate.compiler.dom_add.call(null, b, c, e, f)
}
if(g.call(null, "\ufdd0'remove", a)) {
return crate.compiler.dom_remove.call(null, b, e)
}
throw Error([cljs.core.str("No matching clause: "), cljs.core.str(a)].join(""));
})
});
crate.compiler.handle_bindings = function(a, b) {
for(var c = cljs.core.seq.call(null, a);;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
crate.compiler.dom_binding.call(null, e, d, b);
c = cljs.core.next.call(null, c)
}else {
return null
}
}
};
crate.compiler.dom_style = function() {
var a = null, b = function(b, c) {
if(cljs.core.string_QMARK_.call(null, c)) {
b.setAttribute("style", c)
}else {
if(cljs.core.map_QMARK_.call(null, c)) {
for(var f = cljs.core.seq.call(null, c);;) {
if(f) {
var g = cljs.core.first.call(null, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
a.call(null, b, h, g);
f = cljs.core.next.call(null, f)
}else {
break
}
}
}else {
cljs.core.truth_(crate.binding.binding_QMARK_.call(null, c)) && (crate.compiler.capture_binding.call(null, "\ufdd0'style", cljs.core.PersistentVector.fromArray([null, c], !0)), a.call(null, b, crate.binding.value.call(null, c)))
}
}
return b
}, c = function(a, b, c) {
cljs.core.truth_(crate.binding.binding_QMARK_.call(null, c)) && (crate.compiler.capture_binding.call(null, "\ufdd0'style", cljs.core.PersistentVector.fromArray([b, c], !0)), c = crate.binding.value.call(null, c));
return goog.style.setStyle(a, cljs.core.name.call(null, b), c)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
crate.compiler.dom_attr = function() {
var a = null, b = function(b, c) {
if(cljs.core.truth_(b)) {
if(cljs.core.map_QMARK_.call(null, c)) {
for(var f = cljs.core.seq.call(null, c);;) {
if(f) {
var g = cljs.core.first.call(null, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
a.call(null, b, h, g);
f = cljs.core.next.call(null, f)
}else {
break
}
}
return b
}
return b.getAttribute(cljs.core.name.call(null, c))
}
return null
}, c = function(a, b, c) {
cljs.core._EQ_.call(null, b, "\ufdd0'style") ? crate.compiler.dom_style.call(null, a, c) : (cljs.core.truth_(crate.binding.binding_QMARK_.call(null, c)) && (crate.compiler.capture_binding.call(null, "\ufdd0'attr", cljs.core.PersistentVector.fromArray([b, c], !0)), c = crate.binding.value.call(null, c)), a.setAttribute(cljs.core.name.call(null, b), c));
return a
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
crate.compiler.re_tag = /([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/;
crate.compiler.normalize_map_attrs = function(a) {
return cljs.core.into.call(null, cljs.core.ObjMap.EMPTY, cljs.core.map.call(null, function(a) {
var c = cljs.core.nth.call(null, a, 0, null), a = cljs.core.nth.call(null, a, 1, null);
return!0 === a ? cljs.core.PersistentVector.fromArray([c, cljs.core.name.call(null, c)], !0) : cljs.core.PersistentVector.fromArray([c, a], !0)
}, cljs.core.filter.call(null, cljs.core.comp.call(null, cljs.core.boolean$, cljs.core.second), a)))
};
crate.compiler.normalize_element = function(a) {
var b = cljs.core.nth.call(null, a, 0, null), a = cljs.core.nthnext.call(null, a, 1), c;
c = cljs.core.keyword_QMARK_.call(null, b);
c || (c = (c = cljs.core.symbol_QMARK_.call(null, b)) ? c : cljs.core.string_QMARK_.call(null, b));
if(!c) {
throw[cljs.core.str(b), cljs.core.str(" is not a valid tag name.")].join("");
}
c = cljs.core.re_matches.call(null, crate.compiler.re_tag, cljs.core.name.call(null, b));
cljs.core.nth.call(null, c, 0, null);
var d = cljs.core.nth.call(null, c, 1, null), b = cljs.core.nth.call(null, c, 2, null);
c = cljs.core.nth.call(null, c, 3, null);
var e;
e = clojure.string.split.call(null, d, /:/);
d = cljs.core.nth.call(null, e, 0, null);
e = cljs.core.nth.call(null, e, 1, null);
var f = crate.compiler.xmlns.call(null, cljs.core.keyword.call(null, d));
e = cljs.core.truth_(e) ? cljs.core.PersistentVector.fromArray([cljs.core.truth_(f) ? f : d, e], !0) : cljs.core.PersistentVector.fromArray([(new cljs.core.Keyword("\ufdd0'xhtml")).call(null, crate.compiler.xmlns), d], !0);
d = cljs.core.nth.call(null, e, 0, null);
e = cljs.core.nth.call(null, e, 1, null);
b = cljs.core.into.call(null, cljs.core.ObjMap.EMPTY, cljs.core.filter.call(null, function(a) {
return null != cljs.core.second.call(null, a)
}, cljs.core.ObjMap.fromObject(["\ufdd0'id", "\ufdd0'class"], {"\ufdd0'id":cljs.core.truth_(b) ? b : null, "\ufdd0'class":cljs.core.truth_(c) ? clojure.string.replace.call(null, c, /\./, " ") : null})));
c = cljs.core.first.call(null, a);
return cljs.core.map_QMARK_.call(null, c) ? cljs.core.PersistentVector.fromArray([d, e, cljs.core.merge.call(null, b, crate.compiler.normalize_map_attrs.call(null, c)), cljs.core.next.call(null, a)], !0) : cljs.core.PersistentVector.fromArray([d, e, b, a], !0)
};
crate.compiler.parse_content = function(a, b) {
var c = cljs.core.first.call(null, b);
return cljs.core.map_QMARK_.call(null, c) ? (crate.compiler.dom_attr.call(null, a, c), cljs.core.rest.call(null, b)) : b
};
crate.compiler.create_elem = cljs.core.truth_(document.createElementNS) ? function(a, b) {
return document.createElementNS(a, b)
} : function(a, b) {
return document.createElement(b)
};
crate.compiler.elem_factory = function(a) {
var b = crate.compiler.bindings;
try {
crate.compiler.bindings = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
var c = crate.compiler.normalize_element.call(null, a), d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null), f = cljs.core.nth.call(null, c, 2, null), g = cljs.core.nth.call(null, c, 3, null), h = crate.compiler.create_elem.call(null, d, e);
crate.compiler.dom_attr.call(null, h, f);
crate.compiler.as_content.call(null, h, g);
crate.compiler.handle_bindings.call(null, cljs.core.deref.call(null, crate.compiler.bindings), h);
return h
}finally {
crate.compiler.bindings = b
}
};
crate.compiler.add_optional_attrs = function(a) {
var b = function(b) {
if(cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, b))) {
var c = cljs.core.apply.call(null, a, cljs.core.rest.call(null, b)), f = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nthnext.call(null, c, 1);
return cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, c)) ? cljs.core.apply.call(null, cljs.core.vector, f, cljs.core.merge.call(null, cljs.core.first.call(null, c), cljs.core.first.call(null, b)), cljs.core.rest.call(null, c)) : cljs.core.apply.call(null, cljs.core.vector, f, cljs.core.first.call(null, b), c)
}
return cljs.core.apply.call(null, a, b)
}, c = function(a) {
var c = null;
goog.isDef(a) && (c = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return b.call(this, c)
};
c.cljs$lang$maxFixedArity = 0;
c.cljs$lang$applyTo = function(a) {
a = cljs.core.seq(a);
return b(a)
};
c.cljs$lang$arity$variadic = b;
return c
};
crate.core = {};
crate.core.group_id = cljs.core.atom.call(null, 0);
crate.core.raw = function(a) {
return goog.dom.htmlToDocumentFragment(a)
};
crate.core.html = function() {
var a = function(a) {
a = cljs.core.map.call(null, crate.compiler.elem_factory, a);
return cljs.core.truth_(cljs.core.second.call(null, a)) ? a : cljs.core.first.call(null, a)
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
crate.core.h = crate.util.escape_html;
lt.object = {};
lt.object.obj_id = cljs.core.atom.call(null, 0);
lt.object.instances = cljs.core.atom.call(null, cljs.core.sorted_map.call(null));
lt.object.behaviors = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.object.object_defs = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.object.tags = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.object.add = function(a) {
return cljs.core.swap_BANG_.call(null, lt.object.object_defs, cljs.core.assoc, (new cljs.core.Keyword("\ufdd0'lt.object/type")).call(null, a), a)
};
lt.object.add_b = function(a) {
return cljs.core.swap_BANG_.call(null, lt.object.behaviors, cljs.core.assoc, (new cljs.core.Keyword("\ufdd0'name")).call(null, a), a)
};
lt.object.__GT_triggers = function(a, b) {
return cljs.core.reduce.call(null, function(a, b) {
return cljs.core.merge_with.call(null, cljs.core.concat, a, cljs.core.into.call(null, cljs.core.ObjMap.EMPTY, function f(a) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, a)) {
var c = cljs.core.first.call(null, a);
return cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([c, cljs.core.PersistentVector.fromArray([b], !0)], !0), f.call(null, cljs.core.rest.call(null, a)))
}
return null
}
}, null)
}.call(null, (new cljs.core.Keyword("\ufdd0'triggers")).call(null, cljs.core.deref.call(null, lt.object.behaviors).call(null, b)))))
}, cljs.core.ObjMap.EMPTY, b)
};
lt.object.tags__GT_behaviors = function(a) {
return cljs.core.apply.call(null, cljs.core.concat, cljs.core.map.call(null, cljs.core.deref.call(null, lt.object.tags), a))
};
lt.object.update_listeners = function(a) {
var b = cljs.core.set.call(null, cljs.core.concat.call(null, (new cljs.core.Keyword("\ufdd0'behaviors")).call(null, a), lt.object.tags__GT_behaviors.call(null, (new cljs.core.Keyword("\ufdd0'tags")).call(null, a))));
return cljs.core.assoc.call(null, a, "\ufdd0'listeners", lt.object.__GT_triggers.call(null, a, b))
};
lt.object.make_object_STAR_ = function() {
var a = function(a, b) {
return cljs.core.merge.call(null, cljs.core.ObjMap.fromObject("\ufdd0'behaviors \ufdd0'tags \ufdd0'triggers \ufdd0'listeners \ufdd0'lt.object/type \ufdd0'children".split(" "), {"\ufdd0'behaviors":cljs.core.PersistentHashSet.EMPTY, "\ufdd0'tags":cljs.core.PersistentHashSet.EMPTY, "\ufdd0'triggers":cljs.core.PersistentVector.EMPTY, "\ufdd0'listeners":cljs.core.ObjMap.EMPTY, "\ufdd0'lt.object/type":a, "\ufdd0'children":cljs.core.ObjMap.EMPTY}), cljs.core.apply.call(null, cljs.core.hash_map, b))
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.store_object_STAR_ = function(a) {
lt.object.add.call(null, a);
return a
};
lt.object.handle_redef = function(a) {
for(var b = (new cljs.core.Keyword("\ufdd0'lt.object/type")).call(null, a), c = cljs.core.seq.call(null, lt.object.instances_by_type.call(null, b));;) {
if(c) {
var d = cljs.core.first.call(null, c), d = cljs.core.deref.call(null, d), e = (new cljs.core.Keyword("\ufdd0'args")).call(null, d), f = (new cljs.core.Keyword("\ufdd0'content")).call(null, d), g = cljs.core.set.call(null, (new cljs.core.Keyword("\ufdd0'behaviors")).call(null, d)), h = cljs.core.deref.call(null, lt.object.instances).call(null, lt.object.__GT_id.call(null, d)), e = cljs.core.truth_((new cljs.core.Keyword("\ufdd0'init")).call(null, a)) ? cljs.core.apply.call(null, (new cljs.core.Keyword("\ufdd0'init")).call(null,
a), h, e) : null, e = cljs.core.vector_QMARK_.call(null, e) ? crate.core.html.call(null, e) : e;
lt.object.merge_BANG_.call(null, h, lt.object.update_listeners.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'tags", "\ufdd0'behaviors", "\ufdd0'content"], {"\ufdd0'tags":clojure.set.union.call(null, (new cljs.core.Keyword("\ufdd0'tags")).call(null, d), (new cljs.core.Keyword("\ufdd0'tags")).call(null, a)), "\ufdd0'behaviors":clojure.set.union.call(null, g, cljs.core.set.call(null, (new cljs.core.Keyword("\ufdd0'behaviors")).call(null, a))), "\ufdd0'content":e})));
cljs.core.truth_(e) && lt.util.dom.replace_with.call(null, f, e);
lt.object.raise.call(null, h, "\ufdd0'redef");
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.object.object_STAR_ = function() {
var a = function(a, b) {
return lt.object.handle_redef.call(null, lt.object.store_object_STAR_.call(null, cljs.core.apply.call(null, lt.object.make_object_STAR_, a, b)))
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.make_behavior_STAR_ = function() {
var a = function(a, b) {
return cljs.core.merge.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'name"], {"\ufdd0'name":a}), cljs.core.apply.call(null, cljs.core.hash_map, b))
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.store_behavior_STAR_ = function(a) {
lt.object.add_b.call(null, a);
return(new cljs.core.Keyword("\ufdd0'name")).call(null, a)
};
lt.object.wrap_throttle = function(a) {
var b = (new cljs.core.Keyword("\ufdd0'throttle")).call(null, a);
return cljs.core.truth_(b) ? cljs.core.assoc.call(null, a, "\ufdd0'reaction", lt.util.js.throttle.call(null, b, (new cljs.core.Keyword("\ufdd0'reaction")).call(null, a))) : a
};
lt.object.wrap_debounce = function(a) {
var b = (new cljs.core.Keyword("\ufdd0'debounce")).call(null, a);
return cljs.core.truth_(b) ? cljs.core.assoc.call(null, a, "\ufdd0'reaction", lt.util.js.debounce.call(null, b, (new cljs.core.Keyword("\ufdd0'reaction")).call(null, a))) : a
};
lt.object.behavior_STAR_ = function() {
var a = function(a, b) {
return lt.object.store_behavior_STAR_.call(null, lt.object.wrap_debounce.call(null, lt.object.wrap_throttle.call(null, cljs.core.apply.call(null, lt.object.make_behavior_STAR_, a, b))))
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.raise = function() {
var a = function(a, b, e) {
b = cljs.core.map.call(null, function(a) {
return(new cljs.core.Keyword("\ufdd0'reaction")).call(null, a.call(null, cljs.core.deref.call(null, lt.object.behaviors)))
}, b.call(null, (new cljs.core.Keyword("\ufdd0'listeners")).call(null, cljs.core.deref.call(null, a))));
for(b = cljs.core.seq.call(null, b);;) {
if(b) {
var f = cljs.core.first.call(null, b);
cljs.core.truth_(f) && cljs.core.apply.call(null, f, a, e);
b = cljs.core.next.call(null, b)
}else {
return null
}
}
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.raise_reduce = function() {
var a = function(a, b, e, f) {
b = cljs.core.map.call(null, function(a) {
return(new cljs.core.Keyword("\ufdd0'reaction")).call(null, a.call(null, cljs.core.deref.call(null, lt.object.behaviors)))
}, b.call(null, (new cljs.core.Keyword("\ufdd0'listeners")).call(null, cljs.core.deref.call(null, a))));
return cljs.core.reduce.call(null, function(b, d) {
return cljs.core.not.call(null, d) ? b : cljs.core.apply.call(null, d, a, b, f)
}, e, b)
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.__GT_sub_objects = function(a, b) {
return cljs.core.into.call(null, cljs.core.ObjMap.EMPTY, function d(b) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, b)) {
var f = cljs.core.first.call(null, b), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
return cljs.core.cons.call(null, !cljs.core._EQ_.call(null, a, f) ? cljs.core.PersistentVector.fromArray([g, lt.object.create.call(null, f)], !0) : function() {
throw Error("Recursive sub-objects are not allowed");
}(), d.call(null, cljs.core.rest.call(null, b)))
}
return null
}
}, null)
}.call(null, b))
};
lt.object.merge_BANG_ = function(a, b) {
if(cljs.core.truth_(cljs.core.truth_(b) ? !cljs.core.map_QMARK_.call(null, b) : b)) {
throw Error([cljs.core.str("Merge requires a map: "), cljs.core.str(b)].join(""));
}
return cljs.core.swap_BANG_.call(null, a, cljs.core.merge, b)
};
lt.object.update_BANG_ = function() {
var a = function(a, b) {
return cljs.core.swap_BANG_.call(null, a, function(a) {
return cljs.core.apply.call(null, cljs.core.update_in, a, b)
})
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.__GT_id = function(a) {
return cljs.core.truth_(crate.binding.deref_QMARK_.call(null, a)) ? (new cljs.core.Keyword("\ufdd0'lt.object/id")).call(null, cljs.core.deref.call(null, a)) : (new cljs.core.Keyword("\ufdd0'lt.object/id")).call(null, a)
};
lt.object.__GT_inst = function(a) {
return cljs.core.map_QMARK_.call(null, a) ? cljs.core.deref.call(null, lt.object.instances).call(null, lt.object.__GT_id.call(null, a)) : cljs.core.truth_(crate.binding.deref_QMARK_.call(null, a)) ? a : cljs.core.deref.call(null, lt.object.instances).call(null, a)
};
lt.object.destroy_BANG_ = function(a) {
var b = lt.object.__GT_inst.call(null, a);
return cljs.core.truth_(b) ? (lt.object.raise.call(null, b, "\ufdd0'destroy"), cljs.core.swap_BANG_.call(null, lt.object.instances, cljs.core.dissoc, lt.object.__GT_id.call(null, b)), cljs.core.truth_(lt.object.__GT_content.call(null, a)) && lt.util.dom.remove.call(null, lt.object.__GT_content.call(null, a)), cljs.core.reset_BANG_.call(null, a, null)) : null
};
lt.object.store_inst = function(a) {
cljs.core.swap_BANG_.call(null, lt.object.instances, cljs.core.assoc, (new cljs.core.Keyword("\ufdd0'lt.object/id")).call(null, cljs.core.deref.call(null, a)), a);
return a
};
lt.object.create = function() {
var a = function(a, b) {
var e = cljs.core.keyword_QMARK_.call(null, a) ? cljs.core.deref.call(null, lt.object.object_defs).call(null, a) : a, f;
f = (new cljs.core.Keyword("\ufdd0'lt.object/id")).call(null, e);
f = cljs.core.truth_(f) ? f : cljs.core.swap_BANG_.call(null, lt.object.obj_id, cljs.core.inc);
e = lt.object.update_listeners.call(null, e);
f = cljs.core.atom.call(null, cljs.core.assoc.call(null, cljs.core.dissoc.call(null, e, "\ufdd0'init"), "\ufdd0'lt.object/id", f, "\ufdd0'args", b, "\ufdd0'behaviors", cljs.core.set.call(null, (new cljs.core.Keyword("\ufdd0'behaviors")).call(null, e)), "\ufdd0'tags", cljs.core.set.call(null, cljs.core.conj.call(null, (new cljs.core.Keyword("\ufdd0'tags")).call(null, e), "\ufdd0'object"))));
var g = lt.object.store_inst.call(null, f), e = cljs.core.truth_((new cljs.core.Keyword("\ufdd0'init")).call(null, e)) ? cljs.core.apply.call(null, (new cljs.core.Keyword("\ufdd0'init")).call(null, e), g, b) : null, e = cljs.core.vector_QMARK_.call(null, e) ? crate.core.html.call(null, e) : e;
lt.object.merge_BANG_.call(null, g, cljs.core.ObjMap.fromObject(["\ufdd0'content"], {"\ufdd0'content":e}));
cljs.core.add_watch.call(null, g, "\ufdd0'lt.object/change", function() {
return lt.object.raise.call(null, g, "\ufdd0'object.change")
});
lt.object.raise.call(null, g, "\ufdd0'init");
return g
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.refresh_BANG_ = function(a) {
return cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, cljs.core.deref.call(null, a)))
};
lt.object.__GT_def = function(a) {
return cljs.core.deref.call(null, lt.object.object_defs).call(null, (new cljs.core.Keyword("\ufdd0'lt.object/type")).call(null, cljs.core.deref.call(null, a)))
};
lt.object.add_behavior_BANG_ = function(a, b) {
var c = cljs.core.update_in.call(null, cljs.core.deref.call(null, a), cljs.core.PersistentVector.fromArray(["\ufdd0'behaviors"], !0), cljs.core.conj, b);
return cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, c))
};
lt.object.rem_behavior_BANG_ = function(a, b) {
var c = cljs.core.update_in.call(null, cljs.core.deref.call(null, a), cljs.core.PersistentVector.fromArray(["\ufdd0'behaviors"], !0), function(a) {
return cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([b]), a)
});
return cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, c))
};
lt.object.__GT_def = function(a) {
return cljs.core.map_QMARK_.call(null, a) ? a : cljs.core.deref.call(null, lt.object.object_defs).call(null, a)
};
lt.object.with_behaviors = function(a, b) {
var c = lt.object.__GT_def.call(null, a), c = cljs.core.update_in.call(null, c, cljs.core.PersistentVector.fromArray(["\ufdd0'behaviors"], !0), function(a) {
return cljs.core.apply.call(null, cljs.core.conj, a, b)
});
return lt.object.update_listeners.call(null, c)
};
lt.object.parent_BANG_ = function() {
var a = function(a, b, e) {
e = cljs.core.nth.call(null, e, 0, null);
lt.object.update_BANG_.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'children"], !0), cljs.core.assoc, cljs.core.truth_(e) ? e : (new cljs.core.Keyword("\ufdd0'lt.object/id")).call(null, cljs.core.deref.call(null, b)), b);
return lt.object.merge_BANG_.call(null, b, cljs.core.ObjMap.fromObject(["\ufdd0'parent"], {"\ufdd0'parent":lt.object.__GT_id.call(null, a)}))
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.parent = function(a) {
return cljs.core.deref.call(null, lt.object.instances).call(null, (new cljs.core.Keyword("\ufdd0'parent")).call(null, cljs.core.deref.call(null, a)))
};
lt.object.child = function(a, b) {
return(new cljs.core.Keyword("\ufdd0'children")).call(null, cljs.core.deref.call(null, a)).call(null, b)
};
lt.object.__GT_content = function(a) {
return(new cljs.core.Keyword("\ufdd0'content")).call(null, cljs.core.deref.call(null, a))
};
lt.object.by_type = function(a) {
return lt.object.instances_by_type.call(null, a)
};
lt.object.by_id = function(a) {
return cljs.core.deref.call(null, lt.object.instances).call(null, a)
};
lt.object.instances_by_type = function(a) {
return cljs.core.filter.call(null, function(b) {
return cljs.core._EQ_.call(null, a, (new cljs.core.Keyword("\ufdd0'lt.object/type")).call(null, cljs.core.deref.call(null, b)))
}, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.instances)))
};
lt.object.by_tag = function(a) {
return cljs.core.filter.call(null, function(b) {
b = (new cljs.core.Keyword("\ufdd0'tags")).call(null, cljs.core.deref.call(null, b));
return cljs.core.truth_(b) ? b.call(null, a) : null
}, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.instances)))
};
lt.object.has_tag_QMARK_ = function(a, b) {
return(new cljs.core.Keyword("\ufdd0'tags")).call(null, cljs.core.deref.call(null, a)).call(null, b)
};
lt.object.add_tags = function(a, b) {
var c = cljs.core.deref.call(null, a), c = cljs.core.update_in.call(null, c, cljs.core.PersistentVector.fromArray(["\ufdd0'tags"], !0), function(a) {
return cljs.core.reduce.call(null, cljs.core.conj, a, b)
});
cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, c));
lt.object.raise.call(null, a, "\ufdd0'lt.object/tags-added", b);
return a
};
lt.object.remove_tags = function(a, b) {
var c = cljs.core.deref.call(null, a), d = cljs.core.apply.call(null, cljs.core.concat, cljs.core.map.call(null, cljs.core.deref.call(null, lt.object.tags), b)), c = cljs.core.update_in.call(null, cljs.core.update_in.call(null, cljs.core.update_in.call(null, c, cljs.core.PersistentVector.fromArray(["\ufdd0'tags"], !0), function(a) {
return cljs.core.reduce.call(null, cljs.core.disj, a, b)
}), cljs.core.PersistentVector.fromArray(["\ufdd0'behaviors"], !0), function(a) {
return cljs.core.reduce.call(null, cljs.core.disj, a, d)
}), cljs.core.PersistentVector.fromArray(["\ufdd0'listeners"], !0), function(a) {
return cljs.core.apply.call(null, cljs.core.dissoc, a, b)
});
cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, c));
lt.object.raise.call(null, a, "\ufdd0'lt.object/tags-removed", b);
return a
};
lt.object.tag_behaviors = function(a, b) {
cljs.core.swap_BANG_.call(null, lt.object.tags, cljs.core.update_in, cljs.core.PersistentVector.fromArray([a], !0), function(a) {
return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.truth_(a) ? a : cljs.core.PersistentHashSet.EMPTY, b)
});
for(var c = cljs.core.seq.call(null, lt.object.by_tag.call(null, a));;) {
if(c) {
var d = cljs.core.first.call(null, c);
lt.object.refresh_BANG_.call(null, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return cljs.core.deref.call(null, lt.object.tags).call(null, a)
};
lt.object.remove_tag_behaviors = function(a, b) {
cljs.core.swap_BANG_.call(null, lt.object.tags, cljs.core.update_in, cljs.core.PersistentVector.fromArray([a], !0), function(a) {
return cljs.core.reduce.call(null, cljs.core.disj, cljs.core.truth_(a) ? a : cljs.core.PersistentHashSet.EMPTY, b)
});
for(var c = cljs.core.seq.call(null, lt.object.by_tag.call(null, a));;) {
if(c) {
for(var d = cljs.core.first.call(null, c), e = cljs.core.seq.call(null, b);;) {
if(e) {
var f = cljs.core.first.call(null, e);
lt.object.rem_behavior_BANG_.call(null, d, f);
e = cljs.core.next.call(null, e)
}else {
break
}
}
c = cljs.core.next.call(null, c)
}else {
return null
}
}
};
lt.object.on_change = function(a, b) {
return cljs.core.add_watch.call(null, a, cljs.core.gensym.call(null, lt.object.change), function(a, d, e, f) {
return b.call(null, f)
})
};
lt.objs = {};
lt.objs.command = {};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.command/command.manager", "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'command.manager"]), "\ufdd0'commands", cljs.core.ObjMap.EMPTY);
lt.objs.command.manager = lt.object.create.call(null, "\ufdd0'lt.objs.command/command.manager");
lt.objs.command.command = function(a) {
lt.object.update_BANG_.call(null, lt.objs.command.manager, cljs.core.PersistentVector.fromArray(["\ufdd0'commands"], !0), cljs.core.assoc, (new cljs.core.Keyword("\ufdd0'command")).call(null, a), a);
cljs.core.truth_((new cljs.core.Keyword("\ufdd0'options")).call(null, a)) && lt.object.add_tags.call(null, (new cljs.core.Keyword("\ufdd0'options")).call(null, a), cljs.core.PersistentVector.fromArray(["\ufdd0'command.options"], !0));
return lt.object.raise.call(null, lt.objs.command.manager, "\ufdd0'added", a)
};
lt.objs.command.by_id = function(a) {
return cljs.core._lookup.call(null, (new cljs.core.Keyword("\ufdd0'commands")).call(null, cljs.core.deref.call(null, lt.objs.command.manager)), cljs.core.map_QMARK_.call(null, a) ? (new cljs.core.Keyword("\ufdd0'command")).call(null, a) : a, null)
};
lt.objs.command.exec_BANG_ = function() {
var a = function(a, b) {
var e = lt.objs.command.by_id.call(null, a);
return cljs.core.truth_(cljs.core.truth_(e) ? (new cljs.core.Keyword("\ufdd0'exec")).call(null, e) : e) ? cljs.core.apply.call(null, (new cljs.core.Keyword("\ufdd0'exec")).call(null, e), b) : null
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.files = {};
lt.objs.files.fs = require("fs");
lt.objs.files.fpath = require("path");
lt.objs.files.wrench = require("wrench");
lt.objs.files.os = require("os");
lt.objs.files.ext__GT_mode = cljs.core.PersistentHashMap.fromArrays("\ufdd0'sch \ufdd0'ts \ufdd0'cljs \ufdd0'scheme \ufdd0'r \ufdd0'vb \ufdd0'rs \ufdd0'html \ufdd0'md \ufdd0'scala \ufdd0'erl \ufdd0'lua \ufdd0'latex \ufdd0'php \ufdd0'hs \ufdd0'htm \ufdd0'st \ufdd0'ss \ufdd0'c \ufdd0'py \ufdd0'pyw \ufdd0'groovy \ufdd0'scss \ufdd0'rb \ufdd0'ini \ufdd0'yml \ufdd0'ocaml \ufdd0'cl \ufdd0'sparql \ufdd0'css \ufdd0'h \ufdd0'markdown \ufdd0'sh \ufdd0'go \ufdd0'json \ufdd0'scm \ufdd0'diff \ufdd0'clj \ufdd0'coffee \ufdd0'cpp \ufdd0'smary \ufdd0'sql \ufdd0'js \ufdd0'mysql \ufdd0'pas \ufdd0'java \ufdd0'patch \ufdd0'pl \ufdd0'haxe \ufdd0'tex \ufdd0'yaml \ufdd0'cs \ufdd0'less".split(" "),
"text/x-scheme application/typescript cljs text/x-scheme text/x-rsrc text/x-vb text/x-rustsrc htmlmixed markdown text/x-scala text/x-erlang text/x-lua text/x-stex text/x-php text/x-haskell htmlmixed text/x-stsrc text/x-scheme text/x-c python python text/x-groovy text/x-scss ruby text/x-ini yaml text/x-ocaml text/x-common-lisp text/x-sparql-query css text/x-c++hdr markdown text/x-sh text/x-go javascript text/x-scheme text/x-diff clj text/x-coffeescript text/x-c++src text/x-smarty text/x-plsql javascript text/x-mysql text/x-pascal text/x-java text/x-diff text/x-perl text/x-haxe text/x-stex yaml text/x-csharp text/x-less".split(" "));
lt.objs.files.line_ending = lt.objs.files.os.EOL;
lt.objs.files.separator = lt.objs.files.fpath.sep;
lt.objs.files.available_drives = cljs.core.PersistentHashSet.EMPTY;
lt.objs.files.ignore_pattern = /(^\..*)|\.class$|target\/|svn|cvs|\.pyc|~|\.swp|\.jar/;
cljs.core._EQ_.call(null, lt.objs.files.separator, "\\") && require("child_process").exec("wmic logicaldisk get name", function(a, b) {
var c = cljs.core.rest.call(null, b.split(/\r\n|\r|\n/)), c = cljs.core.map.call(null, function(a) {
return[cljs.core.str(a.trim()), cljs.core.str(lt.objs.files.separator)].join("")
}, cljs.core.remove.call(null, cljs.core.empty_QMARK_, c));
return lt.objs.files.available_drives = cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, c)
});
lt.objs.files.files_obj = lt.object.create.call(null, lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.files/files", "\ufdd0'triggers", cljs.core.PersistentVector.fromArray(["\ufdd0'files.open", "\ufdd0'files.save"], !0), "\ufdd0'behaviors", cljs.core.PersistentVector.EMPTY, "\ufdd0'init", function() {
return null
}));
lt.objs.files.get_roots = function() {
return cljs.core._EQ_.call(null, lt.objs.files.separator, "\\") ? lt.objs.files.available_drives : cljs.core.PersistentHashSet.fromArray(["/"])
};
lt.objs.files.ext = function(a) {
var b = a.lastIndexOf(".");
return 0 < b ? cljs.core.subs.call(null, a, b + 1, cljs.core.count.call(null, a)) : null
};
lt.objs.files.without_ext = function(a) {
var b = a.lastIndexOf(".");
return 0 < b ? cljs.core.subs.call(null, a, 0, b) : a
};
lt.objs.files.path__GT_mode = function(a) {
return lt.objs.files.ext__GT_mode.call(null, cljs.core.keyword.call(null, lt.objs.files.ext.call(null, a)))
};
lt.objs.files.determine_line_ending = function(a) {
var a = cljs.core.subs.call(null, a, 0, 1E3), b = cljs.core.re_seq.call(null, /\r\n/, a), a = cljs.core.re_seq.call(null, /[^\r]\n/, a);
if(cljs.core.truth_(cljs.core.truth_(b) ? a : b)) {
return lt.objs.files.line_ending
}
b = (b = cljs.core.not.call(null, b)) ? cljs.core.not.call(null, a) : b;
return b ? lt.objs.files.line_ending : cljs.core.not.call(null, a) ? "\r\n" : "\n"
};
lt.objs.files.open = function(a, b) {
try {
var c = lt.objs.files.fs.readFileSync(a, "utf-8");
if(cljs.core.truth_(c)) {
var d = lt.objs.files.ext.call(null, a);
b.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'content", "\ufdd0'line-ending", "\ufdd0'type"], {"\ufdd0'content":c, "\ufdd0'line-ending":lt.objs.files.determine_line_ending.call(null, c), "\ufdd0'type":function() {
var a = lt.objs.files.ext__GT_mode.call(null, cljs.core.keyword.call(null, d));
return cljs.core.truth_(a) ? a : d
}()}));
return lt.object.raise.call(null, lt.objs.files.files_obj, "\ufdd0'files.open", c)
}
return null
}catch(e) {
if(cljs.core.instance_QMARK_.call(null, Error, e) || cljs.core.instance_QMARK_.call(null, global.Error, e)) {
return d = e, lt.object.raise.call(null, lt.objs.files.files_obj, "\ufdd0'files.open.error", a), cljs.core.truth_(b) ? b.call(null, null, d) : null
}
throw e;
}
};
lt.objs.files.open_sync = function(a) {
try {
var b = lt.objs.files.fs.readFileSync(a, "utf-8");
if(cljs.core.truth_(b)) {
var c = lt.objs.files.ext.call(null, a);
lt.object.raise.call(null, lt.objs.files.files_obj, "\ufdd0'files.open", b);
return cljs.core.ObjMap.fromObject(["\ufdd0'content", "\ufdd0'line-ending", "\ufdd0'type"], {"\ufdd0'content":b, "\ufdd0'line-ending":lt.objs.files.determine_line_ending.call(null, b), "\ufdd0'type":function() {
var a = lt.objs.files.ext__GT_mode.call(null, cljs.core.keyword.call(null, c));
return cljs.core.truth_(a) ? a : c
}()})
}
return null
}catch(d) {
if(cljs.core.instance_QMARK_.call(null, Error, d) || cljs.core.instance_QMARK_.call(null, global.Error, d)) {
return c = d, lt.object.raise.call(null, lt.objs.files.files_obj, "\ufdd0'files.open.error", a), null
}
throw d;
}
};
lt.objs.files.save = function() {
var a = function(a, b, e) {
e = cljs.core.nth.call(null, e, 0, null);
try {
return lt.objs.files.fs.writeFileSync(a, b), lt.object.raise.call(null, lt.objs.files.files_obj, "\ufdd0'files.save", a), cljs.core.truth_(e) ? e.call(null) : null
}catch(f) {
if(cljs.core.instance_QMARK_.call(null, global.Error, f) || cljs.core.instance_QMARK_.call(null, Error, f)) {
return b = f, lt.object.raise.call(null, lt.objs.files.files_obj, "\ufdd0'files.save.error", a), cljs.core.truth_(e) ? e.call(null, b) : null
}
throw f;
}
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.files.delete_BANG_ = function(a) {
return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, a)) ? lt.objs.files.wrench.rmdirSyncRecursive(a) : lt.objs.files.fs.unlinkSync(a)
};
lt.objs.files.move_BANG_ = function(a, b) {
if(cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, a))) {
return lt.objs.files.wrench.copyDirSyncRecursive(a, b), lt.objs.files.wrench.rmdirSyncRecursive(a)
}
lt.objs.files.save.call(null, b, (new cljs.core.Keyword("\ufdd0'content")).call(null, lt.objs.files.open_sync.call(null, a)));
return lt.objs.files.delete_BANG_.call(null, a)
};
lt.objs.files.copy = function(a, b) {
return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, a)) ? lt.objs.files.wrench.copyDirSyncRecursive(a, b) : lt.objs.files.save.call(null, b, (new cljs.core.Keyword("\ufdd0'content")).call(null, lt.objs.files.open_sync.call(null, a)))
};
lt.objs.files.mkdir = function(a) {
return lt.objs.files.fs.mkdirSync(a)
};
lt.objs.files.next_available_name = function(a) {
if(cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, a))) {
return a
}
for(var b = lt.objs.files.ext.call(null, a), c = lt.objs.files.without_ext.call(null, lt.objs.files.basename.call(null, a)), a = lt.objs.files.parent.call(null, a), d = 1, e = lt.objs.files.join.call(null, a, [cljs.core.str(c), cljs.core.str(d), cljs.core.str("."), cljs.core.str(b)].join(""));;) {
if(cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, e))) {
return e
}
var e = d + 1, f = lt.objs.files.join.call(null, a, [cljs.core.str(c), cljs.core.str(d + 1), cljs.core.str(cljs.core.truth_(b) ? [cljs.core.str("."), cljs.core.str(b)].join("") : null)].join("")), d = e, e = f
}
};
lt.objs.files.stats = function(a) {
return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.fs.statSync(a) : null
};
lt.objs.files.dir_QMARK_ = function(a) {
return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.fs.statSync(a).isDirectory() : null
};
lt.objs.files.file_QMARK_ = function(a) {
return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.fs.statSync(a).isFile() : null
};
lt.objs.files.exists_QMARK_ = function(a) {
return lt.objs.files.fs.existsSync(a)
};
lt.objs.files.basename = function(a) {
return lt.objs.files.fpath.basename(a)
};
lt.objs.files.__GT_file_BAR_dir = function(a, b) {
return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, [cljs.core.str(a), cljs.core.str(lt.objs.files.separator), cljs.core.str(b)].join(""))) ? [cljs.core.str(b), cljs.core.str(lt.objs.files.separator)].join("") : "" + cljs.core.str(b)
};
lt.objs.files.__GT_type = function(a) {
a = lt.objs.files.ext.call(null, a);
return lt.objs.files.ext__GT_mode.call(null, cljs.core.keyword.call(null, a), a)
};
lt.objs.files.ls = function(a, b) {
try {
var c = cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.__GT_file_BAR_dir, a), lt.objs.files.fs.readdirSync(a));
return cljs.core.truth_(b) ? b.call(null, c) : c
}catch(d) {
if(cljs.core.instance_QMARK_.call(null, global.Error, d)) {
return cljs.core.truth_(b) && b.call(null, null), null
}
throw d;
}
};
lt.objs.files.ls_sync = function(a, b) {
try {
var c = cljs.core.remove.call(null, function(a) {
return cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, a)
}, cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.__GT_file_BAR_dir, a), lt.objs.files.fs.readdirSync(a)));
return cljs.core.truth_((new cljs.core.Keyword("\ufdd0'files")).call(null, b)) ? cljs.core.filter.call(null, function(b) {
return lt.objs.files.file_QMARK_.call(null, lt.objs.files.join.call(null, a, b))
}, c) : cljs.core.truth_((new cljs.core.Keyword("\ufdd0'dirs")).call(null, b)) ? cljs.core.filter.call(null, function(b) {
return lt.objs.files.dir_QMARK_.call(null, lt.objs.files.join.call(null, a, b))
}, c) : c
}catch(d) {
if(cljs.core.instance_QMARK_.call(null, global.Error, d)) {
return null
}
throw d;
}
};
lt.objs.files.full_path_ls = function(a) {
try {
return cljs.core.doall.call(null, cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.join, a), lt.objs.files.fs.readdirSync(a)))
}catch(b) {
if(cljs.core.instance_QMARK_.call(null, Error, b) || cljs.core.instance_QMARK_.call(null, global.Error, b)) {
return lt.objs.console.error(b)
}
throw b;
}
};
lt.objs.files.dirs = function(a) {
try {
return cljs.core.filter.call(null, lt.objs.files.dir_QMARK_, cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.join, a), lt.objs.files.fs.readdirSync(a)))
}catch(b) {
if(cljs.core.instance_QMARK_.call(null, Error, b) || cljs.core.instance_QMARK_.call(null, global.Error, b)) {
return null
}
throw b;
}
};
lt.objs.files.join = function() {
var a = function(a) {
return cljs.core.apply.call(null, lt.objs.files.fpath.join, cljs.core.filter.call(null, cljs.core.identity, a))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.files.home = function(a) {
var b = cljs.core._EQ_.call(null, process.platform, "win32") ? process.env.USERPROFILE : process.env.HOME;
return lt.objs.files.join.call(null, b, cljs.core.truth_(a) ? a : lt.objs.files.separator)
};
lt.objs.files.lt_home = function(a) {
return cljs.core.truth_(process.env.LTHOME) ? lt.objs.files.join.call(null, process.env.LTHOME, cljs.core.truth_(a) ? a : "") : lt.objs.files.home.call(null, lt.objs.files.join.call(null, ".lighttable", a))
};
lt.objs.files.walk_up_find = function(a, b) {
for(var c = lt.objs.files.get_roots.call(null), d = a, e = "";;) {
if(cljs.core.truth_(function() {
var a = cljs.core.empty_QMARK_.call(null, d);
if(a) {
return a
}
a = c.call(null, d);
return cljs.core.truth_(a) ? a : cljs.core._EQ_.call(null, d, e)
}())) {
return null
}
if(cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.files.join.call(null, d, b)))) {
return lt.objs.files.join.call(null, d, b)
}
var f = lt.objs.files.parent.call(null, d), g = d, d = f, e = g
}
};
lt.objs.files.walk = cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.files.lt_home.call(null, "js/lib/walkdir.js"))) ? require(lt.objs.files.lt_home.call(null, "js/lib/walkdir.js")) : require("walkdir");
lt.objs.files.all_files_async = function(a, b) {
var c = lt.objs.files.walk.call(null, a), d = [], e = lt.util.js.now.call(null);
c.on("file", function(a) {
return d.push(a)
});
return c.on("end", function() {
cljs.core.println.call(null, lt.util.js.now.call(null) - e);
return b.call(null, d)
})
};
lt.objs.files.all_files = function(a, b) {
return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.walk.sync(a, cljs.core.clj__GT_js.call(null, b)) : null
};
lt.objs.files.__GT_name_BAR_path = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null), e = cljs.core.truth_(e) ? lt.objs.files.fpath.relative(e, a) : a;
return cljs.core.PersistentVector.fromArray([lt.objs.files.fpath.basename(a), e], !0)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.files.parent = function(a) {
return lt.objs.files.fpath.dirname(a)
};
lt.objs.files.path_segs = function(a) {
var b = a.split(lt.objs.files.separator), a = cljs.core.truth_(function() {
var a = lt.objs.files.fpath.extname(cljs.core.last.call(null, b));
return cljs.core.truth_(a) ? a : cljs.core.empty_QMARK_.call(null, cljs.core.last.call(null, b))
}()) ? cljs.core.butlast.call(null, b) : b;
return cljs.core.vec.call(null, cljs.core.map.call(null, function(a) {
return[cljs.core.str(a), cljs.core.str(lt.objs.files.separator)].join("")
}, a))
};
lt.objs.context = {};
lt.objs.context.contexts = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY);
lt.objs.context.groups = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.objs.context.ctx__GT_obj = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.objs.context.ctx__GT_group = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.objs.context.group__GT_ctxs = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.objs.context.ctx_obj = null;
lt.objs.context.append_group = function(a, b) {
return cljs.core.swap_BANG_.call(null, lt.objs.context.groups, function(c) {
return cljs.core.truth_(c.call(null, a)) ? cljs.core.update_in.call(null, c, cljs.core.PersistentVector.fromArray([a], !0), cljs.core.conj, b) : cljs.core.assoc.call(null, c, a, cljs.core.PersistentHashSet.fromArray([b]))
})
};
lt.objs.context.in_QMARK_ = function(a) {
return cljs.core.deref.call(null, lt.objs.context.contexts).call(null, a)
};
lt.objs.context.out_BANG_ = function(a) {
var b = cljs.core.coll_QMARK_.call(null, a) ? a : cljs.core.PersistentVector.fromArray([a], !0);
cljs.core.swap_BANG_.call(null, lt.objs.context.contexts, function(a) {
return cljs.core.apply.call(null, cljs.core.disj, a, b)
});
cljs.core.swap_BANG_.call(null, lt.objs.context.ctx__GT_obj, function(a) {
return cljs.core.apply.call(null, cljs.core.dissoc, a, b)
});
lt.object.raise.call(null, lt.objs.context.ctx_obj, "\ufdd0'out!", b);
for(a = cljs.core.seq.call(null, b);;) {
if(a) {
var c = cljs.core.first.call(null, a);
cljs.core.truth_(lt.objs.context.in_QMARK_.call(null, c)) && lt.object.raise.call(null, lt.objs.context.ctx_obj, cljs.core.keyword.call(null, [cljs.core.str("out!"), cljs.core.str(cljs.core.name.call(null, c))].join("")));
a = cljs.core.next.call(null, a)
}else {
return null
}
}
};
lt.objs.context.in_BANG_ = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.coll_QMARK_.call(null, a) ? a : cljs.core.PersistentVector.fromArray([a], !0);
cljs.core.swap_BANG_.call(null, lt.objs.context.contexts, function(a) {
return cljs.core.apply.call(null, cljs.core.conj, a, f)
});
cljs.core.swap_BANG_.call(null, lt.objs.context.ctx__GT_obj, function(a) {
return cljs.core.merge.call(null, a, cljs.core.zipmap.call(null, f, cljs.core.repeat.call(null, e)))
});
lt.object.raise.call(null, lt.objs.context.ctx_obj, "\ufdd0'in!", f);
for(var g = cljs.core.seq.call(null, f);;) {
if(g) {
var h = cljs.core.first.call(null, g), i = cljs.core.deref.call(null, lt.objs.context.group__GT_ctxs).call(null, cljs.core.deref.call(null, lt.objs.context.ctx__GT_group).call(null, h));
cljs.core.truth_(i) && lt.objs.context.out_BANG_.call(null, i);
lt.object.raise.call(null, lt.objs.context.ctx_obj, cljs.core.keyword.call(null, [cljs.core.str("in!"), cljs.core.str(cljs.core.name.call(null, h))].join("")));
g = cljs.core.next.call(null, g)
}else {
return null
}
}
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.context.toggle_BANG_ = function() {
var a = function(a, b) {
for(var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.seq.call(null, a);;) {
if(f) {
var g = cljs.core.first.call(null, f);
cljs.core.truth_(lt.objs.context.in_QMARK_.call(null, g)) ? lt.objs.context.out_BANG_.call(null, g) : lt.objs.context.in_BANG_.call(null, g, e);
f = cljs.core.next.call(null, f)
}else {
return null
}
}
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.context.current = function() {
return cljs.core.deref.call(null, lt.objs.context.contexts)
};
lt.objs.context.group_BANG_ = function(a, b) {
cljs.core.swap_BANG_.call(null, lt.objs.context.ctx__GT_group, cljs.core.assoc, a, b);
return cljs.core.swap_BANG_.call(null, lt.objs.context.group__GT_ctx, cljs.core.update_in, cljs.core.PersistentVector.fromArray([b], !0), cljs.core.conj, a)
};
lt.objs.context.__GT_obj = function(a) {
return cljs.core.deref.call(null, lt.objs.context.ctx__GT_obj).call(null, a)
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.context/log-on-in", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'in!"]), "\ufdd0'reaction", function(a, b) {
return lt.objs.context.log.call(null, "\ufdd0'context-in", b)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.context/log-on-out", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'out!"]), "\ufdd0'reaction", function(a, b) {
return lt.objs.context.log.call(null, "\ufdd0'context-out", b)
});
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.context/context", "\ufdd0'triggers", cljs.core.PersistentVector.fromArray(["\ufdd0'in!", "\ufdd0'out!", "\ufdd0'in!context-name", "\ufdd0'out!context-name"], !0), "\ufdd0'behaviors", cljs.core.PersistentVector.EMPTY, "\ufdd0'init", function() {
return null
});
lt.objs.context.ctx_obj = lt.object.create.call(null, "\ufdd0'lt.objs.context/context");
lt.objs.app = {};
lt.objs.app.gui = require("nw.gui");
lt.objs.app.win = lt.objs.app.gui.Window.get();
lt.objs.app.closing = !0;
lt.objs.app.prevent_close = function() {
return lt.objs.app.closing = !1
};
lt.objs.app.close = function(a) {
cljs.core.truth_(a) && (lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'closing"), lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'closed"));
return lt.objs.app.win.close(a)
};
lt.objs.app.refresh = function() {
return window.location.reload(!0)
};
lt.objs.app.open_window = function() {
var a = cljs.core.swap_BANG_.call(null, global.windowsId, cljs.core.inc), b = lt.objs.app.gui.Window.open([cljs.core.str("index.html?id="), cljs.core.str(a)].join(""), cljs.core.clj__GT_js.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'toolbar", "\ufdd0'new-instance", "\ufdd0'min_height", "\ufdd0'min_width", "\ufdd0'show"], {"\ufdd0'toolbar":!1, "\ufdd0'new-instance":!0, "\ufdd0'min_height":400, "\ufdd0'min_width":400, "\ufdd0'show":!1})));
b.ltid = a;
return cljs.core.swap_BANG_.call(null, lt.objs.app.windows, cljs.core.assoc, a, b)
};
lt.objs.app.ready_QMARK_ = function(a) {
return cljs.core._EQ_.call(null, 0, (new cljs.core.Keyword("\ufdd0'delays")).call(null, cljs.core.deref.call(null, a)))
};
lt.objs.app.args = function() {
return cljs.core.seq.call(null, lt.objs.app.gui.App.argv)
};
lt.objs.app.init = function() {
lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'deploy");
lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'pre-init");
lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'init");
lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'post-init");
return lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'show!")
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/refresh", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'refresh"]), "\ufdd0'reaction", function() {
lt.objs.app.closing = !0;
lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'reload");
return cljs.core.truth_(lt.objs.app.closing) ? lt.objs.app.refresh.call(null) : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/close!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'close!"]), "\ufdd0'reaction", function(a) {
lt.objs.app.closing = !0;
lt.object.raise.call(null, a, "\ufdd0'close");
return cljs.core.truth_(lt.objs.app.closing) ? lt.objs.app.close.call(null, !0) : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/show!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show!"]), "\ufdd0'reaction", function() {
return lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'show")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/delay!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'delay!"]), "\ufdd0'reaction", function(a) {
return lt.object.update_BANG_.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'delays"], !0), cljs.core.inc)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/store-position-on-close", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'refresh", "\ufdd0'closed"]), "\ufdd0'reaction", function() {
localStorage.x = lt.objs.app.win.x;
localStorage.y = lt.objs.app.win.y;
localStorage.width = lt.objs.app.win.width;
localStorage.height = lt.objs.app.win.height;
return localStorage.fullscreen = lt.objs.app.win.isFullscreen
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/restore-fullscreen", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show"]), "\ufdd0'reaction", function() {
return cljs.core._EQ_.call(null, localStorage.fullscreen, "true") ? lt.objs.app.win.enterFullscreen() : null
});
lt.objs.app.ensure_greater = function(a, b) {
var c = cljs.core.string_QMARK_.call(null, a) ? parseInt(a) : a;
return c > b ? c : b
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/restore-position-on-init", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show"]), "\ufdd0'reaction", function() {
if(cljs.core.empty_QMARK_.call(null, localStorage.width)) {
return null
}
lt.objs.app.win.resizeTo(lt.objs.app.ensure_greater.call(null, localStorage.width, 400), lt.objs.app.ensure_greater.call(null, localStorage.height, 400));
return lt.objs.app.win.moveTo(lt.objs.app.ensure_greater.call(null, localStorage.x, 0), lt.objs.app.ensure_greater.call(null, localStorage.y, 0))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/ready!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'delay!"]), "\ufdd0'reaction", function(a) {
lt.object.update_BANG_.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'delays"], !0), cljs.core.dec);
return lt.objs.app.ready_QMARK_.call(null, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/on-show-bind-navigate", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show"]), "\ufdd0'reaction", function() {
return lt.util.dom.on.call(null, lt.util.dom.$.call(null, "\ufdd0'#canvas"), "\ufdd0'click", function(a) {
return cljs.core._EQ_.call(null, a.target.nodeName, "A") && (lt.util.dom.prevent.call(null, a), a = a.target.href, cljs.core.truth_(a)) ? (lt.objs.app.gui.Shell.openExternal(a), lt.objs.app.win.focus()) : null
})
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.app/startup-time", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show"]), "\ufdd0'reaction", function() {
return lt.util.js.now.call(null) - setup.startTime
});
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.app/app", "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'app"]), "\ufdd0'trigers", cljs.core.PersistentVector.fromArray(["\ufdd0'init", "\ufdd0'close", "\ufdd0'reload", "\ufdd0'refresh", "\ufdd0'close!"], !0), "\ufdd0'behaviors", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.app/refresh \ufdd0'lt.objs.app/close! \ufdd0'lt.objs.app/show! \ufdd0'lt.objs.app/delay! \ufdd0'lt.objs.app/ready! \ufdd0'lt.objs.app/startup-time \ufdd0'lt.objs.app/on-show-bind-navigate".split(" "),
!0), "\ufdd0'delays", 0, "\ufdd0'init", function(a) {
return lt.objs.context.in_BANG_.call(null, "\ufdd0'app", a)
});
lt.object.tag_behaviors.call(null, "\ufdd0'app", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.app/store-position-on-close", "\ufdd0'lt.objs.app/restore-position-on-init", "\ufdd0'lt.objs.app/restore-fullscreen"], !0));
cljs.core.truth_(global.windows) || (global.windows = cljs.core.atom.call(null, cljs.core.sorted_map.call(null, 0, lt.objs.app.win)), global.windowsId = cljs.core.atom.call(null, 0), lt.objs.app.win.ltid = 0);
lt.objs.app.windows = global.windows;
lt.objs.app.app = lt.object.create.call(null, "\ufdd0'lt.objs.app/app");
lt.objs.app.win.on("close", function() {
cljs.core.swap_BANG_.call(null, lt.objs.app.windows, cljs.core.dissoc, lt.objs.app.win.ltid);
return lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'close!")
});
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'app.refresh", "\ufdd0'desc":"Window: Refresh Light Table", "\ufdd0'exec":function() {
return lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'refresh")
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'open-new-window", "\ufdd0'desc":"Window: Open new window", "\ufdd0'exec":function() {
return lt.objs.app.open_window.call(null)
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'close-window", "\ufdd0'desc":"Window: Close window", "\ufdd0'exec":function() {
return lt.object.raise.call(null, lt.objs.app.app, "\ufdd0'close!")
}}));
cljs.reader = {};
cljs.reader.PushbackReader = {};
cljs.reader.read_char = function(a) {
var b;
b = a ? a.cljs$reader$PushbackReader$read_char$arity$1 : a;
if(b) {
return a.cljs$reader$PushbackReader$read_char$arity$1(a)
}
b = cljs.reader.read_char[goog.typeOf(null == a ? null : a)];
if(!b && (b = cljs.reader.read_char._, !b)) {
throw cljs.core.missing_protocol.call(null, "PushbackReader.read-char", a);
}
return b.call(null, a)
};
cljs.reader.unread = function(a, b) {
var c;
c = a ? a.cljs$reader$PushbackReader$unread$arity$2 : a;
if(c) {
return a.cljs$reader$PushbackReader$unread$arity$2(a, b)
}
c = cljs.reader.unread[goog.typeOf(null == a ? null : a)];
if(!c && (c = cljs.reader.unread._, !c)) {
throw cljs.core.missing_protocol.call(null, "PushbackReader.unread", a);
}
return c.call(null, a, b)
};
cljs.reader.StringPushbackReader = function(a, b, c) {
this.s = a;
this.index_atom = b;
this.buffer_atom = c
};
cljs.reader.StringPushbackReader.cljs$lang$type = !0;
cljs.reader.StringPushbackReader.cljs$lang$ctorPrSeq = function() {
return cljs.core.list.call(null, "cljs.reader/StringPushbackReader")
};
cljs.reader.StringPushbackReader.cljs$lang$ctorPrWriter = function(a, b) {
return cljs.core._write.call(null, b, "cljs.reader/StringPushbackReader")
};
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$ = !0;
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$read_char$arity$1 = function() {
if(cljs.core.empty_QMARK_.call(null, cljs.core.deref.call(null, this.buffer_atom))) {
var a = cljs.core.deref.call(null, this.index_atom);
cljs.core.swap_BANG_.call(null, this.index_atom, cljs.core.inc);
return this.s[a]
}
a = cljs.core.deref.call(null, this.buffer_atom);
cljs.core.swap_BANG_.call(null, this.buffer_atom, cljs.core.rest);
return cljs.core.first.call(null, a)
};
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$unread$arity$2 = function(a, b) {
return cljs.core.swap_BANG_.call(null, this.buffer_atom, function(a) {
return cljs.core.cons.call(null, b, a)
})
};
cljs.reader.push_back_reader = function(a) {
return new cljs.reader.StringPushbackReader(a, cljs.core.atom.call(null, 0), cljs.core.atom.call(null, null))
};
cljs.reader.whitespace_QMARK_ = function(a) {
var b = goog.string.isBreakingWhitespace(a);
return cljs.core.truth_(b) ? b : "," === a
};
cljs.reader.numeric_QMARK_ = function(a) {
return goog.string.isNumeric(a)
};
cljs.reader.comment_prefix_QMARK_ = function(a) {
return";" === a
};
cljs.reader.number_literal_QMARK_ = function(a, b) {
var c = cljs.reader.numeric_QMARK_.call(null, b);
if(c) {
return c
}
c = (c = "+" === b) ? c : "-" === b;
return cljs.core.truth_(c) ? cljs.reader.numeric_QMARK_.call(null, function() {
var b = cljs.reader.read_char.call(null, a);
cljs.reader.unread.call(null, a, b);
return b
}()) : c
};
cljs.reader.reader_error = function() {
var a = function(a, b) {
throw Error(cljs.core.apply.call(null, cljs.core.str, b));
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
cljs.reader.macro_terminating_QMARK_ = function(a) {
var b = "#" !== a;
return b && (b = "'" !== a) ? (b = ":" !== a) ? cljs.reader.macros.call(null, a) : b : b
};
cljs.reader.read_token = function(a, b) {
for(var c = new goog.string.StringBuffer(b), d = cljs.reader.read_char.call(null, a);;) {
var e;
e = null == d;
e || (e = (e = cljs.reader.whitespace_QMARK_.call(null, d)) ? e : cljs.reader.macro_terminating_QMARK_.call(null, d));
if(e) {
return cljs.reader.unread.call(null, a, d), c.toString()
}
c.append(d);
d = cljs.reader.read_char.call(null, a)
}
};
cljs.reader.skip_line = function(a) {
for(;;) {
var b = cljs.reader.read_char.call(null, a);
var c = "n" === b;
b = c ? c : (c = "r" === b) ? c : null == b;
if(b) {
return a
}
}
};
cljs.reader.int_pattern = cljs.core.re_pattern.call(null, "([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?");
cljs.reader.ratio_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+)/([0-9]+)");
cljs.reader.float_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?");
cljs.reader.symbol_pattern = cljs.core.re_pattern.call(null, "[:]?([^0-9/].*/)?([^0-9/][^/]*)");
cljs.reader.re_find_STAR_ = function(a, b) {
var c = a.exec(b);
return null == c ? null : 1 === c.length ? c[0] : c
};
cljs.reader.match_int = function(a) {
var a = cljs.reader.re_find_STAR_.call(null, cljs.reader.int_pattern, a), b = a[2];
var c = null == b, b = c ? c : 1 > b.length;
return b ? (b = "-" === a[1] ? -1 : 1, c = cljs.core.truth_(a[3]) ? [a[3], 10] : cljs.core.truth_(a[4]) ? [a[4], 16] : cljs.core.truth_(a[5]) ? [a[5], 8] : cljs.core.truth_(a[7]) ? [a[7], parseInt(a[7])] : [null, null], a = c[0], c = c[1], null == a ? null : b * parseInt(a, c)) : 0
};
cljs.reader.match_ratio = function(a) {
var a = cljs.reader.re_find_STAR_.call(null, cljs.reader.ratio_pattern, a), b = a[2];
return parseInt(a[1]) / parseInt(b)
};
cljs.reader.match_float = function(a) {
return parseFloat(a)
};
cljs.reader.re_matches_STAR_ = function(a, b) {
var c = a.exec(b), d;
d = (d = null != c) ? c[0] === b : d;
return d ? 1 === c.length ? c[0] : c : null
};
cljs.reader.match_number = function(a) {
return cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, a)) ? cljs.reader.match_int.call(null, a) : cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, a)) ? cljs.reader.match_ratio.call(null, a) : cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.float_pattern, a)) ? cljs.reader.match_float.call(null, a) : null
};
cljs.reader.escape_char_map = function(a) {
return"t" === a ? "\t" : "r" === a ? "\r" : "n" === a ? "\n" : "\\" === a ? "\\" : '"' === a ? '"' : "b" === a ? "\b" : "f" === a ? "\f" : null
};
cljs.reader.read_2_chars = function(a) {
return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a))).toString()
};
cljs.reader.read_4_chars = function(a) {
return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a))).toString()
};
cljs.reader.unicode_2_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{2}");
cljs.reader.unicode_4_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{4}");
cljs.reader.validate_unicode_escape = function(a, b, c, d) {
return cljs.core.truth_(cljs.core.re_matches.call(null, a, d)) ? d : cljs.reader.reader_error.call(null, b, "Unexpected unicode escape \\", c, d)
};
cljs.reader.make_unicode_char = function(a) {
a = parseInt(a, 16);
return String.fromCharCode(a)
};
cljs.reader.escape_char = function(a, b) {
var c = cljs.reader.read_char.call(null, b), d = cljs.reader.escape_char_map.call(null, c);
return cljs.core.truth_(d) ? d : "x" === c ? cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_2_pattern, b, c, cljs.reader.read_2_chars.call(null, b))) : "u" === c ? cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_4_pattern, b, c, cljs.reader.read_4_chars.call(null, b))) : cljs.reader.numeric_QMARK_.call(null, c) ? String.fromCharCode(c) : cljs.reader.reader_error.call(null, b,
"Unexpected unicode escape \\", c)
};
cljs.reader.read_past = function(a, b) {
for(var c = cljs.reader.read_char.call(null, b);;) {
if(cljs.core.truth_(a.call(null, c))) {
c = cljs.reader.read_char.call(null, b)
}else {
return c
}
}
};
cljs.reader.read_delimited_list = function(a, b, c) {
for(var d = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);;) {
var e = cljs.reader.read_past.call(null, cljs.reader.whitespace_QMARK_, b);
cljs.core.truth_(e) || cljs.reader.reader_error.call(null, b, "EOF while reading");
if(a === e) {
return cljs.core.persistent_BANG_.call(null, d)
}
var f = cljs.reader.macros.call(null, e);
cljs.core.truth_(f) ? e = f.call(null, b, e) : (cljs.reader.unread.call(null, b, e), e = cljs.reader.read.call(null, b, !0, null, c));
d = e === b ? d : cljs.core.conj_BANG_.call(null, d, e)
}
};
cljs.reader.not_implemented = function(a, b) {
return cljs.reader.reader_error.call(null, a, "Reader for ", b, " not implemented yet")
};
cljs.reader.read_dispatch = function(a, b) {
var c = cljs.reader.read_char.call(null, a), d = cljs.reader.dispatch_macros.call(null, c);
if(cljs.core.truth_(d)) {
return d.call(null, a, b)
}
d = cljs.reader.maybe_read_tagged_type.call(null, a, c);
return cljs.core.truth_(d) ? d : cljs.reader.reader_error.call(null, a, "No dispatch macro for ", c)
};
cljs.reader.read_unmatched_delimiter = function(a, b) {
return cljs.reader.reader_error.call(null, a, "Unmached delimiter ", b)
};
cljs.reader.read_list = function(a) {
return cljs.core.apply.call(null, cljs.core.list, cljs.reader.read_delimited_list.call(null, ")", a, !0))
};
cljs.reader.read_comment = cljs.reader.skip_line;
cljs.reader.read_vector = function(a) {
return cljs.reader.read_delimited_list.call(null, "]", a, !0)
};
cljs.reader.read_map = function(a) {
var b = cljs.reader.read_delimited_list.call(null, "}", a, !0);
cljs.core.odd_QMARK_.call(null, cljs.core.count.call(null, b)) && cljs.reader.reader_error.call(null, a, "Map literal must contain an even number of forms");
return cljs.core.apply.call(null, cljs.core.hash_map, b)
};
cljs.reader.read_number = function(a, b) {
for(var c = new goog.string.StringBuffer(b), d = cljs.reader.read_char.call(null, a);;) {
if(cljs.core.truth_(function() {
var a = null == d;
return a ? a : (a = cljs.reader.whitespace_QMARK_.call(null, d)) ? a : cljs.reader.macros.call(null, d)
}())) {
cljs.reader.unread.call(null, a, d);
var e = c.toString(), c = cljs.reader.match_number.call(null, e);
return cljs.core.truth_(c) ? c : cljs.reader.reader_error.call(null, a, "Invalid number format [", e, "]")
}
c.append(d);
d = e = cljs.reader.read_char.call(null, a)
}
};
cljs.reader.read_string_STAR_ = function(a) {
for(var b = new goog.string.StringBuffer, c = cljs.reader.read_char.call(null, a);;) {
if(null == c) {
return cljs.reader.reader_error.call(null, a, "EOF while reading")
}
if("\\" === c) {
b.append(cljs.reader.escape_char.call(null, b, a))
}else {
if('"' === c) {
return b.toString()
}
b.append(c)
}
c = cljs.reader.read_char.call(null, a)
}
};
cljs.reader.special_symbols = function(a, b) {
return"nil" === a ? null : "true" === a ? !0 : "false" === a ? !1 : b
};
cljs.reader.read_symbol = function(a, b) {
var c = cljs.reader.read_token.call(null, a, b);
return cljs.core.truth_(goog.string.contains(c, "/")) ? cljs.core.symbol.call(null, cljs.core.subs.call(null, c, 0, c.indexOf("/")), cljs.core.subs.call(null, c, c.indexOf("/") + 1, c.length)) : cljs.reader.special_symbols.call(null, c, cljs.core.symbol.call(null, c))
};
cljs.reader.read_keyword = function(a) {
var b = cljs.reader.read_token.call(null, a, cljs.reader.read_char.call(null, a)), b = cljs.reader.re_matches_STAR_.call(null, cljs.reader.symbol_pattern, b), c = b[0], d = b[1], e = b[2];
if(cljs.core.truth_(function() {
var a;
a = (a = void 0 !== d) ? ":/" === d.substring(d.length - 2, d.length) : a;
return cljs.core.truth_(a) ? a : (a = ":" === e[e.length - 1]) ? a : -1 !== c.indexOf("::", 1)
}())) {
return cljs.reader.reader_error.call(null, a, "Invalid token: ", c)
}
a = (a = null != d) ? 0 < d.length : a;
return a ? cljs.core.keyword.call(null, d.substring(0, d.indexOf("/")), e) : cljs.core.keyword.call(null, c)
};
cljs.reader.desugar_meta = function(a) {
return cljs.core.symbol_QMARK_.call(null, a) ? cljs.core.ObjMap.fromObject(["\ufdd0'tag"], {"\ufdd0'tag":a}) : cljs.core.string_QMARK_.call(null, a) ? cljs.core.ObjMap.fromObject(["\ufdd0'tag"], {"\ufdd0'tag":a}) : cljs.core.keyword_QMARK_.call(null, a) ? cljs.core.PersistentArrayMap.fromArrays([a], [!0]) : a
};
cljs.reader.wrapping_reader = function(a) {
return function(b) {
return cljs.core.list.call(null, a, cljs.reader.read.call(null, b, !0, null, !0))
}
};
cljs.reader.throwing_reader = function(a) {
return function(b) {
return cljs.reader.reader_error.call(null, b, a)
}
};
cljs.reader.read_meta = function(a) {
var b = cljs.reader.desugar_meta.call(null, cljs.reader.read.call(null, a, !0, null, !0));
cljs.core.map_QMARK_.call(null, b) || cljs.reader.reader_error.call(null, a, "Metadata must be Symbol,Keyword,String or Map");
var c = cljs.reader.read.call(null, a, !0, null, !0), d;
c ? (d = (d = c.cljs$lang$protocol_mask$partition0$ & 262144) ? d : c.cljs$core$IWithMeta$, d = d ? !0 : c.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, c)) : d = cljs.core.type_satisfies_.call(null, cljs.core.IWithMeta, c);
return d ? cljs.core.with_meta.call(null, c, cljs.core.merge.call(null, cljs.core.meta.call(null, c), b)) : cljs.reader.reader_error.call(null, a, "Metadata can only be applied to IWithMetas")
};
cljs.reader.read_set = function(a) {
return cljs.core.set.call(null, cljs.reader.read_delimited_list.call(null, "}", a, !0))
};
cljs.reader.read_regex = function(a, b) {
return cljs.core.re_pattern.call(null, cljs.reader.read_string_STAR_.call(null, a, b))
};
cljs.reader.read_discard = function(a) {
cljs.reader.read.call(null, a, !0, null, !0);
return a
};
cljs.reader.macros = function(a) {
return'"' === a ? cljs.reader.read_string_STAR_ : ":" === a ? cljs.reader.read_keyword : ";" === a ? cljs.reader.not_implemented : "'" === a ? cljs.reader.wrapping_reader.call(null, "\ufdd1'quote") : "@" === a ? cljs.reader.wrapping_reader.call(null, "\ufdd1'deref") : "^" === a ? cljs.reader.read_meta : "`" === a ? cljs.reader.not_implemented : "~" === a ? cljs.reader.not_implemented : "(" === a ? cljs.reader.read_list : ")" === a ? cljs.reader.read_unmatched_delimiter : "[" === a ? cljs.reader.read_vector :
"]" === a ? cljs.reader.read_unmatched_delimiter : "{" === a ? cljs.reader.read_map : "}" === a ? cljs.reader.read_unmatched_delimiter : "\\" === a ? cljs.reader.read_char : "%" === a ? cljs.reader.not_implemented : "#" === a ? cljs.reader.read_dispatch : null
};
cljs.reader.dispatch_macros = function(a) {
return"{" === a ? cljs.reader.read_set : "<" === a ? cljs.reader.throwing_reader.call(null, "Unreadable form") : '"' === a ? cljs.reader.read_regex : "!" === a ? cljs.reader.read_comment : "_" === a ? cljs.reader.read_discard : null
};
cljs.reader.read = function(a, b, c) {
for(;;) {
var d = cljs.reader.read_char.call(null, a);
if(null == d) {
return cljs.core.truth_(b) ? cljs.reader.reader_error.call(null, a, "EOF while reading") : c
}
if(!cljs.reader.whitespace_QMARK_.call(null, d)) {
if(cljs.reader.comment_prefix_QMARK_.call(null, d)) {
a = cljs.reader.read_comment.call(null, a, d)
}else {
var e = cljs.reader.macros.call(null, d), d = cljs.core.truth_(e) ? e.call(null, a, d) : cljs.reader.number_literal_QMARK_.call(null, a, d) ? cljs.reader.read_number.call(null, a, d) : cljs.reader.read_symbol.call(null, a, d);
if(d !== a) {
return d
}
}
}
}
};
cljs.reader.read_string = function(a) {
a = cljs.reader.push_back_reader.call(null, a);
return cljs.reader.read.call(null, a, !0, null, !1)
};
cljs.reader.zero_fill_right = function(a, b) {
if(cljs.core._EQ_.call(null, b, cljs.core.count.call(null, a))) {
return a
}
if(b < cljs.core.count.call(null, a)) {
return a.substring(0, b)
}
for(var c = new goog.string.StringBuffer(a);;) {
if(c.getLength() < b) {
c = c.append("0")
}else {
return c.toString()
}
}
};
cljs.reader.divisible_QMARK_ = function(a, b) {
return 0 === cljs.core.mod.call(null, a, b)
};
cljs.reader.indivisible_QMARK_ = function(a, b) {
return cljs.core.not.call(null, cljs.reader.divisible_QMARK_.call(null, a, b))
};
cljs.reader.leap_year_QMARK_ = function(a) {
var b = cljs.reader.divisible_QMARK_.call(null, a, 4);
return cljs.core.truth_(b) ? (b = cljs.reader.indivisible_QMARK_.call(null, a, 100), cljs.core.truth_(b) ? b : cljs.reader.divisible_QMARK_.call(null, a, 400)) : b
};
cljs.reader.days_in_month = function() {
var a = cljs.core.PersistentVector.fromArray([null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], !0), b = cljs.core.PersistentVector.fromArray([null, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], !0);
return function(c, d) {
return cljs.core._lookup.call(null, cljs.core.truth_(d) ? b : a, c, null)
}
}();
cljs.reader.parse_and_validate_timestamp = function() {
var a = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/, b = function(a, b, e, f) {
var g = a <= b;
if(!(g ? b <= e : g)) {
throw Error([cljs.core.str("Assert failed: "), cljs.core.str([cljs.core.str(f), cljs.core.str(" Failed: "), cljs.core.str(a), cljs.core.str("<="), cljs.core.str(b), cljs.core.str("<="), cljs.core.str(e)].join("")), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.with_meta(cljs.core.list("\ufdd1'<=", "\ufdd1'low", "\ufdd1'n", "\ufdd1'high"), cljs.core.hash_map("\ufdd0'line", 474))))].join(""));
}
return b
};
return function(c) {
var d = cljs.core.map.call(null, cljs.core.vec, cljs.core.split_at.call(null, 8, cljs.core.re_matches.call(null, a, c)));
if(cljs.core.truth_(d)) {
var e = cljs.core.nth.call(null, d, 0, null);
cljs.core.nth.call(null, e, 0, null);
var c = cljs.core.nth.call(null, e, 1, null), f = cljs.core.nth.call(null, e, 2, null), g = cljs.core.nth.call(null, e, 3, null), h = cljs.core.nth.call(null, e, 4, null), i = cljs.core.nth.call(null, e, 5, null), j = cljs.core.nth.call(null, e, 6, null), e = cljs.core.nth.call(null, e, 7, null), k = cljs.core.nth.call(null, d, 1, null);
cljs.core.nth.call(null, k, 0, null);
cljs.core.nth.call(null, k, 1, null);
cljs.core.nth.call(null, k, 2, null);
var m = cljs.core.map.call(null, function(a) {
return cljs.core.map.call(null, function(a) {
return parseInt(a, 10)
}, a)
}, cljs.core.map.call(null, function(a, b) {
return cljs.core.update_in.call(null, b, cljs.core.PersistentVector.fromArray([0], !0), a)
}, cljs.core.PersistentVector.fromArray([cljs.core.constantly.call(null, null), function(a) {
return cljs.core._EQ_.call(null, a, "-") ? "-1" : "1"
}], !0), d)), l = cljs.core.nth.call(null, m, 0, null);
cljs.core.nth.call(null, l, 0, null);
var d = cljs.core.nth.call(null, l, 1, null), k = cljs.core.nth.call(null, l, 2, null), n = cljs.core.nth.call(null, l, 3, null), p = cljs.core.nth.call(null, l, 4, null), q = cljs.core.nth.call(null, l, 5, null), r = cljs.core.nth.call(null, l, 6, null), l = cljs.core.nth.call(null, l, 7, null), s = cljs.core.nth.call(null, m, 1, null), m = cljs.core.nth.call(null, s, 0, null), t = cljs.core.nth.call(null, s, 1, null), s = cljs.core.nth.call(null, s, 2, null);
return cljs.core.PersistentVector.fromArray([cljs.core.not.call(null, c) ? 1970 : d, cljs.core.not.call(null, f) ? 1 : b.call(null, 1, k, 12, "timestamp month field must be in range 1..12"), cljs.core.not.call(null, g) ? 1 : b.call(null, 1, n, cljs.reader.days_in_month.call(null, k, cljs.reader.leap_year_QMARK_.call(null, d)), "timestamp day field must be in range 1..last day in month"), cljs.core.not.call(null, h) ? 0 : b.call(null, 0, p, 23, "timestamp hour field must be in range 0..23"),
cljs.core.not.call(null, i) ? 0 : b.call(null, 0, q, 59, "timestamp minute field must be in range 0..59"), cljs.core.not.call(null, j) ? 0 : b.call(null, 0, r, cljs.core._EQ_.call(null, q, 59) ? 60 : 59, "timestamp second field must be in range 0..60"), cljs.core.not.call(null, e) ? 0 : b.call(null, 0, l, 999, "timestamp millisecond field must be in range 0..999"), m * (60 * t + s)], !0)
}
return null
}
}();
cljs.reader.parse_timestamp = function(a) {
var b = cljs.reader.parse_and_validate_timestamp.call(null, a);
if(cljs.core.truth_(b)) {
var a = cljs.core.nth.call(null, b, 0, null), c = cljs.core.nth.call(null, b, 1, null), d = cljs.core.nth.call(null, b, 2, null), e = cljs.core.nth.call(null, b, 3, null), f = cljs.core.nth.call(null, b, 4, null), g = cljs.core.nth.call(null, b, 5, null), h = cljs.core.nth.call(null, b, 6, null), b = cljs.core.nth.call(null, b, 7, null);
return new Date(Date.UTC(a, c - 1, d, e, f, g, h) - 6E4 * b)
}
return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(a)].join(""))
};
cljs.reader.read_date = function(a) {
return cljs.core.string_QMARK_.call(null, a) ? cljs.reader.parse_timestamp.call(null, a) : cljs.reader.reader_error.call(null, null, "Instance literal expects a string for its timestamp.")
};
cljs.reader.read_queue = function(a) {
return cljs.core.vector_QMARK_.call(null, a) ? cljs.core.into.call(null, cljs.core.PersistentQueue.EMPTY, a) : cljs.reader.reader_error.call(null, null, "Queue literal expects a vector for its elements.")
};
cljs.reader.read_uuid = function(a) {
return cljs.core.string_QMARK_.call(null, a) ? new cljs.core.UUID(a) : cljs.reader.reader_error.call(null, null, "UUID literal expects a string as its representation.")
};
cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null, cljs.core.ObjMap.fromObject(["inst", "uuid", "queue"], {inst:cljs.reader.read_date, uuid:cljs.reader.read_uuid, queue:cljs.reader.read_queue}));
cljs.reader.maybe_read_tagged_type = function(a, b) {
var c = cljs.reader.read_symbol.call(null, a, b), d = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), cljs.core.name.call(null, c), null);
return cljs.core.truth_(d) ? d.call(null, cljs.reader.read.call(null, a, !0, null, !1)) : cljs.reader.reader_error.call(null, a, "Could not find tag parser for ", cljs.core.name.call(null, c), " in ", cljs.core.pr_str.call(null, cljs.core.keys.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_))))
};
cljs.reader.register_tag_parser_BANG_ = function(a, b) {
var c = cljs.core.name.call(null, a), d = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), c, null);
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.assoc, c, b);
return d
};
cljs.reader.deregister_tag_parser_BANG_ = function(a) {
var a = cljs.core.name.call(null, a), b = cljs.core._lookup.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), a, null);
cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.dissoc, a);
return b
};
lt.objs.settings = {};
lt.objs.settings.settings_path = "" + cljs.core.str(lt.objs.files.lt_home.call(null, "settings/default.clj"));
lt.objs.settings.settings = cljs.core.atom.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'font-size"], {"\ufdd0'font-size":11}));
lt.objs.settings.on_disk = function(a) {
return lt.objs.files.open.call(null, lt.objs.settings.settings_path, function(b) {
return cljs.core.empty_QMARK_.call(null, b) ? a.call(null, cljs.core.ObjMap.EMPTY) : a.call(null, cljs.reader.read_string.call(null, (new cljs.core.Keyword("\ufdd0'content")).call(null, b)))
})
};
lt.objs.settings.save = function() {
return lt.objs.settings.on_disk.call(null, function(a) {
a = cljs.core.merge.call(null, a, cljs.core.deref.call(null, lt.objs.settings.settings));
lt.objs.files.save.call(null, lt.objs.settings.settings_path, cljs.core.pr_str.call(null, a));
return cljs.core.reset_BANG_.call(null, lt.objs.settings.settings, a)
})
};
lt.objs.settings.fetch = function(a) {
return cljs.core.deref.call(null, lt.objs.settings.settings).call(null, a)
};
lt.objs.settings.store_BANG_ = function(a, b) {
cljs.core.swap_BANG_.call(null, lt.objs.settings.settings, cljs.core.assoc, a, b);
return lt.objs.settings.save.call(null)
};
lt.objs.settings.store_in_BANG_ = function(a, b) {
cljs.core.swap_BANG_.call(null, lt.objs.settings.settings, cljs.core.assoc_in, a, b);
return lt.objs.settings.save.call(null)
};
lt.objs.settings.init = function() {
return lt.objs.settings.on_disk.call(null, function(a) {
return cljs.core.swap_BANG_.call(null, lt.objs.settings.settings, cljs.core.merge, a)
})
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.settings/init-settings", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'pre-init"]), "\ufdd0'reaction", function() {
lt.objs.settings.init.call(null);
return cljs.core.truth_(lt.objs.settings.fetch.call(null, "\ufdd0'skin")) ? null : lt.objs.settings.store_BANG_.call(null, "\ufdd0'skin", "dark")
});
lt.object.add_behavior_BANG_.call(null, lt.objs.app.app, "\ufdd0'lt.objs.settings/init-settings");
lt.objs.menu = {};
lt.objs.menu.gui = require("nw.gui");
lt.objs.menu.menu_item = function(a) {
return new lt.objs.menu.gui.MenuItem(cljs.core.clj__GT_js.call(null, a))
};
lt.objs.menu.menu = function(a) {
for(var b = new lt.objs.menu.gui.Menu, a = cljs.core.seq.call(null, a);;) {
if(a) {
var c = cljs.core.first.call(null, a);
b.append(lt.objs.menu.menu_item.call(null, c));
a = cljs.core.next.call(null, a)
}else {
break
}
}
return b
};
lt.objs.menu.show_menu = function(a, b, c) {
return a.popup(b, c)
};
lt.objs.canvas = {};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/refresh", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'refresh"]), "\ufdd0'reaction", function() {
return window.location.reload(!0)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/remove-on-destroy", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'destroy"]), "\ufdd0'reaction", function(a) {
return lt.objs.canvas.rem_BANG_.call(null, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/rep-on-redef", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'redef"]), "\ufdd0'reaction", function(a) {
return lt.objs.canvas.__GT_rep.call(null, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/alt-down-drag", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'object.mousedown"]), "\ufdd0'reaction", function(a, b, c) {
return cljs.core.truth_(c.altKey) ? (lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'dragging"], {"\ufdd0'dragging":b})), lt.util.dom.prevent.call(null, c), lt.util.dom.stop_propagation.call(null, c)) : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/dragging", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'mousemove"]), "\ufdd0'reaction", function(a, b) {
var c = (new cljs.core.Keyword("\ufdd0'dragging")).call(null, cljs.core.deref.call(null, a));
if(cljs.core.truth_(c)) {
var d = lt.objs.canvas.get_rep.call(null, c);
lt.util.dom.css.call(null, d, cljs.core.ObjMap.fromObject(["\ufdd0'position", "\ufdd0'margin", "\ufdd0'z-index"], {"\ufdd0'position":"absolute", "\ufdd0'margin":0, "\ufdd0'z-index":1}));
return lt.objs.canvas.position_BANG_.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'top", "\ufdd0'left"], {"\ufdd0'top":b.pageY - lt.util.dom.height.call(null, d) / 2, "\ufdd0'left":b.pageX - lt.util.dom.width.call(null, d) / 2}))
}
return null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/drag-end", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'mouseup"]), "\ufdd0'reaction", function(a) {
var b = (new cljs.core.Keyword("\ufdd0'dragging")).call(null, cljs.core.deref.call(null, a));
return cljs.core.truth_(b) ? (b = lt.objs.canvas.get_rep.call(null, b), lt.util.dom.css.call(null, b, cljs.core.ObjMap.fromObject(["\ufdd0'z-index"], {"\ufdd0'z-index":0})), lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'dragging"], {"\ufdd0'dragging":null}))) : null
});
lt.objs.canvas.canvas_elem = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'div#canvas"], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'mousemove", lt.util.js.throttle.call(null, 20, function(b) {
return lt.object.raise.call(null, a, "\ufdd0'mousemove", b)
}), "\ufdd0'click", function(b) {
return lt.object.raise.call(null, a, "\ufdd0'click", b)
}, "\ufdd0'mousedown", function(b) {
return lt.object.raise.call(null, a, "\ufdd0'mousedown", b)
}, "\ufdd0'mouseup", function(b) {
return lt.object.raise.call(null, a, "\ufdd0'mouseup", b)
}, "\ufdd0'contextmenu", function(b) {
return lt.object.raise.call(null, a, "\ufdd0'contextmenu", b)
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.objs.canvas.__GT_rep = function(a) {
var b = (new cljs.core.Keyword("\ufdd0'content")).call(null, cljs.core.deref.call(null, a));
lt.util.dom.attr.call(null, b, cljs.core.ObjMap.fromObject(["\ufdd0'objId"], {"\ufdd0'objId":lt.object.__GT_id.call(null, a)}));
return b
};
lt.objs.canvas.get_rep = function(a) {
return lt.util.dom.$.call(null, [cljs.core.str("[objid='"), cljs.core.str(lt.object.__GT_id.call(null, a)), cljs.core.str("']")].join(""), (new cljs.core.Keyword("\ufdd0'content")).call(null, cljs.core.deref.call(null, lt.objs.canvas.canvas)))
};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.canvas/canvas", "\ufdd0'triggers", cljs.core.PersistentVector.fromArray("\ufdd0'mousemove \ufdd0'mousedown \ufdd0'mouseup \ufdd0'contextmenu \ufdd0'click \ufdd0'object.mousemove \ufdd0'object.mousedown \ufdd0'object.mouseup \ufdd0'object.click \ufdd0'object.contextmenu".split(" "), !0), "\ufdd0'behaviors", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.canvas/alt-down-drag", "\ufdd0'lt.objs.canvas/dragging", "\ufdd0'lt.objs.canvas/drag-end"],
!0), "\ufdd0'init", function(a) {
return lt.objs.canvas.canvas_elem.call(null, a)
});
lt.objs.canvas.canvas = lt.object.create.call(null, "\ufdd0'lt.objs.canvas/canvas");
lt.objs.canvas.add_BANG_ = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null);
lt.object.add_behavior_BANG_.call(null, a, "\ufdd0'lt.objs.canvas/remove-on-destroy");
lt.object.add_behavior_BANG_.call(null, a, "\ufdd0'lt.objs.canvas/rep-on-redef");
var f = lt.objs.canvas.__GT_rep.call(null, a, lt.objs.canvas.canvas);
lt.util.dom.append.call(null, (new cljs.core.Keyword("\ufdd0'content")).call(null, cljs.core.deref.call(null, lt.objs.canvas.canvas)), f);
lt.object.raise.call(null, a, "\ufdd0'show", f);
return cljs.core.truth_(e) ? (lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'lt.objs.canvas/position"], {"\ufdd0'lt.objs.canvas/position":cljs.core.ObjMap.fromObject(["\ufdd0'top", "\ufdd0'right"], {"\ufdd0'top":50, "\ufdd0'right":10})})), lt.objs.canvas.position_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'top", "\ufdd0'right"], {"\ufdd0'top":50, "\ufdd0'right":10}))) : null
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.canvas.rem_BANG_ = function(a) {
var b = lt.objs.canvas.get_rep.call(null, a);
cljs.core.truth_(b) && lt.util.dom.remove.call(null, b);
return lt.object.raise.call(null, a, "\ufdd0'object.remove")
};
lt.objs.canvas.position_BANG_ = function(a, b) {
return lt.util.dom.css.call(null, lt.objs.canvas.get_rep.call(null, a), cljs.core.merge.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'position", "\ufdd0'left", "\ufdd0'right", "\ufdd0'bottom", "\ufdd0'top"], {"\ufdd0'position":"absolute", "\ufdd0'left":"auto", "\ufdd0'right":"auto", "\ufdd0'bottom":"auto", "\ufdd0'top":"auto"}), b))
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.canvas/append-canvas", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show"]), "\ufdd0'reaction", function() {
lt.util.dom.css.call(null, lt.util.dom.$.call(null, "\ufdd0'#loader"), cljs.core.ObjMap.fromObject(["\ufdd0'opacity"], {"\ufdd0'opacity":0}));
return lt.util.dom.css.call(null, lt.util.dom.$.call(null, "\ufdd0'#wrapper"), cljs.core.ObjMap.fromObject(["\ufdd0'opacity"], {"\ufdd0'opacity":1}))
});
lt.util.dom.append.call(null, lt.util.dom.$.call(null, "#wrapper"), (new cljs.core.Keyword("\ufdd0'content")).call(null, cljs.core.deref.call(null, lt.objs.canvas.canvas)));
lt.object.tag_behaviors.call(null, "\ufdd0'app", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.canvas/append-canvas"], !0));
lt.objs.context.in_BANG_.call(null, "\ufdd0'global", lt.objs.canvas.canvas);
lt.objs.animations = {};
lt.objs.animations.$body = lt.util.dom.$.call(null, "\ufdd0'body");
lt.objs.animations.on = function() {
return lt.util.dom.add_class.call(null, lt.objs.animations.$body, "\ufdd0'animated")
};
lt.objs.animations.off = function() {
return lt.util.dom.remove_class.call(null, lt.objs.animations.$body, "\ufdd0'animated")
};
lt.objs.animations.on_QMARK_ = function() {
return lt.util.dom.has_class_QMARK_.call(null, lt.objs.animations.$body, "\ufdd0'animated")
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.animations/animate-on-init", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function() {
return lt.objs.animations.on.call(null)
});
lt.object.tag_behaviors.call(null, "\ufdd0'app", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.animations/animate-on-init"], !0));
lt.util.cljs = {};
cljs.core._STAR_print_fn_STAR_ = function(a) {
return cljs.core.truth_(function() {
if(cljs.core.truth_(a)) {
var b = cljs.core.not_EQ_.call(null, a, "");
return b ? cljs.core.not_EQ_.call(null, a, "\n") : b
}
return a
}()) ? console.log(clojure.string.trim.call(null, a)) : null
};
lt.util.cljs.__GT_dottedkw = function() {
var a = function(a) {
return cljs.core.keyword.call(null, clojure.string.join.call(null, ".", cljs.core.map.call(null, cljs.core.name, cljs.core.filter.call(null, cljs.core.identity, a))))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.util.cljs.js__GT_clj = function() {
var a = function(a, b) {
var e = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, f = cljs.core._lookup.call(null, e, "\ufdd0'force-obj", null), e = cljs.core._lookup.call(null, e, "\ufdd0'keywordize-keys", null), g = cljs.core.truth_(e) ? cljs.core.keyword : cljs.core.str;
return function i(a) {
return cljs.core.seq_QMARK_.call(null, a) ? cljs.core.doall.call(null, cljs.core.map.call(null, i, a)) : cljs.core.coll_QMARK_.call(null, a) ? cljs.core.into.call(null, cljs.core.empty.call(null, a), cljs.core.map.call(null, i, a)) : cljs.core.truth_(goog.isArray(a)) ? cljs.core.vec.call(null, cljs.core.map.call(null, i, a)) : cljs.core.truth_(function() {
if(cljs.core.truth_(f)) {
return f
}
var b = cljs.core.type.call(null, a) === Object;
return b ? b : cljs.core.type.call(null, a) === global.Object
}()) ? cljs.core.into.call(null, cljs.core.ObjMap.EMPTY, function m(b) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, b)) {
var c = cljs.core.first.call(null, b);
return cljs.core.cons.call(null, cljs.core.PersistentVector.fromArray([g.call(null, c), i.call(null, a[c])], !0), m.call(null, cljs.core.rest.call(null, b)))
}
return null
}
}, null)
}.call(null, cljs.core.js_keys.call(null, a))) : a
}.call(null, a)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.util.cljs.clj__GT_js = function clj__GT_js(b) {
return cljs.core.string_QMARK_.call(null, b) ? b : cljs.core.keyword_QMARK_.call(null, b) ? cljs.core.name.call(null, b) : cljs.core.map_QMARK_.call(null, b) ? cljs.core.reduce.call(null, function(b, d) {
var e = cljs.core.nth.call(null, d, 0, null), f = cljs.core.nth.call(null, d, 1, null);
return cljs.core.assoc.call(null, b, clj__GT_js.call(null, e), clj__GT_js.call(null, f))
}, cljs.core.ObjMap.EMPTY, b).strobj : cljs.core.coll_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.array, cljs.core.map.call(null, clj__GT_js, b)) : b
};
lt.util.events = {};
lt.util.events.capture = function() {
var a = null, b = function(b, c) {
return a.call(null, document, b, c)
}, c = function(a, b, c) {
return a.addEventListener(cljs.core.name.call(null, b), c, !0)
}, a = function(a, e, f) {
switch(arguments.length) {
case 2:
return b.call(this, a, e);
case 3:
return c.call(this, a, e, f)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$2 = b;
a.cljs$lang$arity$3 = c;
return a
}();
lt.objs.editor = {};
lt.objs.editor.expand_tab = function(a) {
if(cljs.core.truth_(a.somethingSelected())) {
return a.indentSelection("add")
}
if(cljs.core.truth_(a.getOption("indentWithTabs"))) {
return a.replaceSelection("\t", "end", "+input")
}
var b = Array(a.getOption("indentUnit") + 1).join(" ");
return a.replaceSelection(b, "end", "+input")
};
CodeMirror.keyMap.basic.Tab = lt.objs.editor.expand_tab;
lt.objs.editor.ed_id = cljs.core.atom.call(null, 0);
lt.objs.editor.ed_with_elem = function(a, b) {
return CodeMirror(cljs.core.truth_(a.get) ? a.get(0) : a, lt.util.cljs.clj__GT_js.call(null, b))
};
lt.objs.editor.ed_headless = function(a) {
return lt.objs.editor.set_options.call(null, new CodeMirror(function() {
return null
}), a)
};
lt.objs.editor.__GT_editor = function(a, b) {
var c = cljs.core.truth_(a) ? lt.objs.editor.ed_with_elem.call(null, a, b) : lt.objs.editor.ed_headless.call(null, b);
c.ltid = cljs.core.swap_BANG_.call(null, lt.objs.editor.ed_id, cljs.core.inc);
c.ltproperties = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
return c
};
lt.objs.editor.init = function(a, b) {
return lt.objs.editor.set_options.call(null, lt.objs.editor.set_val.call(null, lt.objs.editor.set_props.call(null, lt.objs.editor.clear_props.call(null, a), cljs.core.dissoc.call(null, b, "\ufdd0'content")), (new cljs.core.Keyword("\ufdd0'content")).call(null, b)), cljs.core.ObjMap.fromObject(["\ufdd0'mode", "\ufdd0'readOnly", "\ufdd0'dragDrop", "\ufdd0'lineNumbers", "\ufdd0'lineWrapping"], {"\ufdd0'mode":cljs.core.name.call(null, (new cljs.core.Keyword("\ufdd0'type")).call(null, b)), "\ufdd0'readOnly":!1,
"\ufdd0'dragDrop":!1, "\ufdd0'lineNumbers":!1, "\ufdd0'lineWrapping":!1}))
};
lt.objs.editor.make = function(a, b) {
var c = lt.objs.editor.__GT_editor.call(null, a, cljs.core.ObjMap.fromObject("\ufdd0'dragDrop \ufdd0'tabSize \ufdd0'lineNumbers \ufdd0'autoClearEmptyLines \ufdd0'indentWithTabs \ufdd0'matchBrackets \ufdd0'undoDepth \ufdd0'indentUnit \ufdd0'mode \ufdd0'onDragEvent".split(" "), {"\ufdd0'dragDrop":!1, "\ufdd0'tabSize":2, "\ufdd0'lineNumbers":!1, "\ufdd0'autoClearEmptyLines":!0, "\ufdd0'indentWithTabs":!1, "\ufdd0'matchBrackets":!0, "\ufdd0'undoDepth":1E4, "\ufdd0'indentUnit":2, "\ufdd0'mode":cljs.core.truth_((new cljs.core.Keyword("\ufdd0'type")).call(null,
b)) ? cljs.core.name.call(null, (new cljs.core.Keyword("\ufdd0'type")).call(null, b)) : "text", "\ufdd0'onDragEvent":function() {
return!0
}}));
lt.objs.editor.set_props.call(null, c, cljs.core.dissoc.call(null, b, "\ufdd0'content"));
var d = (new cljs.core.Keyword("\ufdd0'content")).call(null, b);
cljs.core.truth_(d) && (lt.objs.editor.set_val.call(null, c, d), lt.objs.editor.clear_history.call(null, c));
return c
};
lt.objs.editor.__GT_cm_ed = function(a) {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 32768) ? b : a.cljs$core$IDeref$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IDeref, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.IDeref, a);
return b ? (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)) : a
};
lt.objs.editor.on = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).on(cljs.core.name.call(null, b), c)
};
lt.objs.editor.off = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).off(cljs.core.name.call(null, b), c)
};
lt.objs.editor.wrap_object_events = function(a, b) {
lt.util.dom.on.call(null, lt.objs.editor.__GT_elem.call(null, a), "\ufdd0'contextmenu", function(a) {
return lt.object.raise.call(null, b, "\ufdd0'menu!", a)
});
lt.objs.editor.on.call(null, a, "\ufdd0'scroll", function(a) {
return lt.object.raise.call(null, b, "\ufdd0'scroll", a)
});
lt.objs.editor.on.call(null, a, "\ufdd0'update", function(a, d) {
return lt.object.raise.call(null, b, "\ufdd0'update", a, d)
});
lt.objs.editor.on.call(null, a, "\ufdd0'change", function(a, d) {
return lt.object.raise.call(null, b, "\ufdd0'change", a, d)
});
lt.objs.editor.on.call(null, a, "\ufdd0'cursorActivity", function(a, d) {
return lt.object.raise.call(null, b, "\ufdd0'move", a, d)
});
lt.objs.editor.on.call(null, a, "\ufdd0'focus", function(a) {
return lt.object.raise.call(null, b, "\ufdd0'focus", a)
});
return lt.objs.editor.on.call(null, a, "\ufdd0'blur", function(a) {
return lt.object.raise.call(null, b, "\ufdd0'blur", a)
})
};
lt.objs.editor.clear_props = function(a) {
cljs.core.reset_BANG_.call(null, a.ltproperties, cljs.core.ObjMap.EMPTY);
return a
};
lt.objs.editor.set_props = function(a, b) {
cljs.core.swap_BANG_.call(null, a.ltproperties, cljs.core.merge, b);
return a
};
lt.objs.editor.__GT_ltid = function(a) {
return a.ltid
};
lt.objs.editor.__GT_prop = function() {
var a = null, b = function(a) {
return cljs.core.deref.call(null, a.ltproperties)
}, c = function(b, c) {
return cljs.core._lookup.call(null, a.call(null, b), c, null)
}, a = function(a, e) {
switch(arguments.length) {
case 1:
return b.call(this, a);
case 2:
return c.call(this, a, e)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$1 = b;
a.cljs$lang$arity$2 = c;
return a
}();
lt.objs.editor.clear_history = function(a) {
a.clearHistory();
return a
};
lt.objs.editor.__GT_val = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getValue()
};
lt.objs.editor.__GT_token = function(a, b) {
return lt.util.cljs.js__GT_clj.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).getTokenAt(lt.util.cljs.clj__GT_js.call(null, b)), "\ufdd0'keywordize-keys", !0)
};
lt.objs.editor.__GT_coords = function(a) {
return lt.util.cljs.js__GT_clj.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).cursorCoords(), "\ufdd0'keywordize-keys", !0, "\ufdd0'force-obj", !0)
};
lt.objs.editor.__GT_elem = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getScrollerElement().parentElement
};
lt.objs.editor._PLUS_class = function(a, b) {
lt.util.dom.add_class.call(null, lt.objs.editor.__GT_elem.call(null, a), cljs.core.name.call(null, b));
return a
};
lt.objs.editor._class = function(a, b) {
lt.util.dom.remove_class.call(null, lt.objs.editor.__GT_elem.call(null, a), cljs.core.name.call(null, b));
return a
};
lt.objs.editor.cursor = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getCursor(b)
};
lt.objs.editor.__GT_cursor = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null), e = lt.objs.editor.cursor.call(null, a, e);
return cljs.core.ObjMap.fromObject(["\ufdd0'line", "\ufdd0'ch"], {"\ufdd0'line":e.line, "\ufdd0'ch":e.ch})
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.editor.set_val = function(a, b) {
lt.objs.editor.__GT_cm_ed.call(null, a).setValue(cljs.core.truth_(b) ? b : "");
return a
};
lt.objs.editor.mark = function(a, b, c, d) {
return lt.objs.editor.__GT_cm_ed.call(null, a).markText(lt.util.cljs.clj__GT_js.call(null, b), lt.util.cljs.clj__GT_js.call(null, c), lt.util.cljs.clj__GT_js.call(null, d))
};
lt.objs.editor.bookmark = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).setBookmark(lt.util.cljs.clj__GT_js.call(null, b), lt.util.cljs.clj__GT_js.call(null, c))
};
lt.objs.editor.option = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getOption(cljs.core.name.call(null, b))
};
lt.objs.editor.set_options = function(a, b) {
for(var c = cljs.core.seq.call(null, b);;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), e = cljs.core.name.call(null, e);
lt.objs.editor.__GT_cm_ed.call(null, a).setOption(e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return a
};
lt.objs.editor.set_mode = function(a, b) {
lt.objs.editor.__GT_cm_ed.call(null, a).setOption("mode", b);
return a
};
lt.objs.editor.__GT_mode = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getMode()
};
lt.objs.editor.focus = function(a) {
lt.objs.editor.__GT_cm_ed.call(null, a).focus();
return a
};
lt.objs.editor.input_field = function(a) {
return a.getInputField()
};
lt.objs.editor.blur = function(a) {
lt.objs.editor.input_field.call(null, a).blur();
return a
};
lt.objs.editor.refresh = function(a) {
a.refresh();
return a
};
lt.objs.editor.on_move = function(a, b) {
a.on("onCursorActivity", function(a, d) {
return b.call(null, a, d)
});
return a
};
lt.objs.editor.on_change = function(a, b) {
a.on("onChange", function(a, d) {
return b.call(null, a, d)
});
return a
};
lt.objs.editor.on_update = function(a, b) {
a.on("onUpdate", function(a, d) {
return b.call(null, a, d)
});
return a
};
lt.objs.editor.on_scroll = function(a, b) {
a.on("onScroll", function(a) {
return b.call(null, a)
});
return a
};
lt.objs.editor.replace = function() {
var a = null, b = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).replaceRange(c, lt.util.cljs.clj__GT_js.call(null, b))
}, c = function(a, b, c, g) {
return lt.objs.editor.__GT_cm_ed.call(null, a).replaceRange(g, lt.util.cljs.clj__GT_js.call(null, b), lt.util.cljs.clj__GT_js.call(null, c))
}, a = function(a, e, f, g) {
switch(arguments.length) {
case 3:
return b.call(this, a, e, f);
case 4:
return c.call(this, a, e, f, g)
}
throw Error("Invalid arity: " + arguments.length);
};
a.cljs$lang$arity$3 = b;
a.cljs$lang$arity$4 = c;
return a
}();
lt.objs.editor.range = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getRange(lt.util.cljs.clj__GT_js.call(null, b), lt.util.cljs.clj__GT_js.call(null, c))
};
lt.objs.editor.line_count = function(a) {
return a.lineCount()
};
lt.objs.editor.insert_at_cursor = function(a, b) {
lt.objs.editor.replace.call(null, lt.objs.editor.__GT_cm_ed.call(null, a), lt.objs.editor.__GT_cursor.call(null, a), b);
return a
};
lt.objs.editor.move_cursor = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).setCursor(lt.util.cljs.clj__GT_js.call(null, b))
};
lt.objs.editor.scroll_to = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).scrollTo(b, c)
};
lt.objs.editor.center_cursor = function(a) {
var b = (new cljs.core.Keyword("\ufdd0'line")).call(null, lt.objs.editor.__GT_cursor.call(null, a)), b = lt.objs.editor.__GT_cm_ed.call(null, a).charCoords(lt.util.cljs.clj__GT_js.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'line", "\ufdd0'ch"], {"\ufdd0'line":b, "\ufdd0'ch":0})), "local").top, c = lt.objs.editor.__GT_cm_ed.call(null, a).getScrollerElement().offsetHeight / 2;
return lt.objs.editor.scroll_to.call(null, a, null, b - c - -55)
};
lt.objs.editor.selection = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getSelection()
};
lt.objs.editor.selection_QMARK_ = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).somethingSelected()
};
lt.objs.editor.set_selection = function(a, b, c) {
return lt.objs.editor.__GT_cm_ed.call(null, a).setSelection(lt.util.cljs.clj__GT_js.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'line", "\ufdd0'ch"], {"\ufdd0'line":b, "\ufdd0'ch":0})), lt.util.cljs.clj__GT_js.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'line"], {"\ufdd0'line":c})))
};
lt.objs.editor.replace_selection = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).replaceSelection(b, "end", "+input")
};
lt.objs.editor.undo = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).undo()
};
lt.objs.editor.clear_history = function(a) {
a.clearHistory();
return a
};
lt.objs.editor.get_history = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getHistory()
};
lt.objs.editor.set_history = function(a, b) {
lt.objs.editor.__GT_cm_ed.call(null, a).setHistory(b);
return a
};
lt.objs.editor.char_coords = function(a, b) {
return lt.util.cljs.js__GT_clj.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).charCoords(lt.util.cljs.clj__GT_js.call(null, b)), "\ufdd0'keywordize-keys", !0, "\ufdd0'force-obj", !0)
};
lt.objs.editor.operation = function(a, b) {
lt.objs.editor.__GT_cm_ed.call(null, a).operation(b);
return a
};
lt.objs.editor.compound = function(a, b) {
lt.objs.editor.__GT_cm_ed.call(null, a).compoundChange(b);
return a
};
lt.objs.editor.on_click = function(a, b) {
var c = lt.objs.editor.__GT_elem.call(null, a);
lt.util.events.capture.call(null, c, "\ufdd0'mousedown", b);
return a
};
lt.objs.editor.extension = function(a, b) {
return CodeMirror.defineExtension(a, b)
};
lt.objs.editor.line_widget = function() {
var a = function(a, b, e, f) {
f = cljs.core.nth.call(null, f, 0, null);
return lt.objs.editor.__GT_cm_ed.call(null, a).addLineWidget(b, e, lt.util.cljs.clj__GT_js.call(null, f))
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.editor.remove_line_widget = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).removeLineWidget(b)
};
lt.objs.editor.line = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getLine(b)
};
lt.objs.editor.first_line = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).firstLine()
};
lt.objs.editor.last_line = function(a) {
return lt.objs.editor.__GT_cm_ed.call(null, a).lastLine()
};
lt.objs.editor.line_handle = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getLineHandle(b)
};
lt.objs.editor.lh__GT_line = function(a, b) {
return lt.objs.editor.__GT_cm_ed.call(null, a).getLineNumber(b)
};
lt.objs.editor.line_length = function(a, b) {
return cljs.core.count.call(null, lt.objs.editor.line.call(null, a, b))
};
lt.objs.editor._PLUS_line_class = function(a, b, c, d) {
return a.addLineClass(b, cljs.core.name.call(null, c), cljs.core.name.call(null, d))
};
lt.objs.editor._line_class = function(a, b, c, d) {
return a.removeLineClass(b, cljs.core.name.call(null, c), cljs.core.name.call(null, d))
};
lt.objs.editor.show_hints = function(a, b, c) {
CodeMirror.showHint(lt.objs.editor.__GT_cm_ed.call(null, a), b, lt.util.cljs.clj__GT_js.call(null, c));
return a
};
lt.objs.editor.inner_mode = function(a, b) {
return CodeMirror.innerMode(lt.objs.editor.__GT_cm_ed.call(null, a).getMode(), b)
};
lt.objs.editor.adjust_loc = function(a, b) {
return cljs.core.update_in.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'ch"], !0), cljs.core._PLUS_, b)
};
lt.objs.editor.get_char = function(a, b) {
var c = lt.objs.editor.__GT_cursor.call(null, a);
return 0 < b ? lt.objs.editor.range.call(null, a, c, lt.objs.editor.adjust_loc.call(null, c, b)) : lt.objs.editor.range.call(null, a, lt.objs.editor.adjust_loc.call(null, c, b), c)
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/read-only", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function(a) {
return lt.objs.editor.set_options.call(null, (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)), cljs.core.ObjMap.fromObject(["\ufdd0'readOnly"], {"\ufdd0'readOnly":"nocursor"}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/wrap", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function(a) {
return lt.objs.editor.set_options.call(null, (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)), cljs.core.ObjMap.fromObject(["\ufdd0'lineWrapping"], {"\ufdd0'lineWrapping":!0}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/no-wrap", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function(a) {
return lt.objs.editor.set_options.call(null, (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)), cljs.core.ObjMap.fromObject(["\ufdd0'lineWrapping"], {"\ufdd0'lineWrapping":!1}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/active-on-focus", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'focus"]), "\ufdd0'reaction", function(a) {
lt.object.add_tags.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'editor.active"], !0));
var b = lt.object.parent.call(null, a);
cljs.core.truth_(b) && lt.object.raise.call(null, b, "\ufdd0'active");
return lt.object.raise.call(null, a, "\ufdd0'active")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/inactive-on-blur", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'blur"]), "\ufdd0'reaction", function(a) {
lt.object.remove_tags.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'editor.active"], !0));
var b = lt.object.parent.call(null, a);
cljs.core.truth_(b) && lt.object.raise.call(null, b, "\ufdd0'inactive");
return lt.object.raise.call(null, a, "\ufdd0'inactive")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/on-tags-added", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'lt.object/tags-added"]), "\ufdd0'reaction", function(a, b) {
return lt.objs.context.in_BANG_.call(null, b, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/on-tags-removed", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'lt.object/tags-removed"]), "\ufdd0'reaction", function(a, b) {
return lt.objs.context.out_BANG_.call(null, b, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/context-on-active", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'active"]), "\ufdd0'reaction", function(a) {
return lt.objs.context.in_BANG_.call(null, (new cljs.core.Keyword("\ufdd0'tags")).call(null, cljs.core.deref.call(null, a)), a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/context-on-inactive", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'inactive"]), "\ufdd0'reaction", function(a) {
var b = (new cljs.core.Keyword("\ufdd0'tags")).call(null, cljs.core.deref.call(null, a)), c = lt.objs.context.__GT_obj.call(null, "\ufdd0'editor");
lt.objs.context.out_BANG_.call(null, b);
return cljs.core.truth_(cljs.core.truth_(c) ? cljs.core.not_EQ_.call(null, c, a) : c) ? lt.objs.context.in_BANG_.call(null, (new cljs.core.Keyword("\ufdd0'tags")).call(null, cljs.core.deref.call(null, c)), c) : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/refresh-on-show", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'show"]), "\ufdd0'reaction", function(a) {
return lt.objs.editor.refresh.call(null, (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/focus", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'focus!", "\ufdd0'show"]), "\ufdd0'reaction", function(a) {
return lt.objs.editor.focus.call(null, (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/destroy-on-close", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'close.force"]), "\ufdd0'reaction", function(a) {
return lt.object.destroy_BANG_.call(null, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/highlight-current-line", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'move"]), "\ufdd0'reaction", function(a) {
var b = (new cljs.core.Keyword("\ufdd0'ed")).call(null, cljs.core.deref.call(null, a)), c = (new cljs.core.Keyword("\ufdd0'line")).call(null, lt.objs.editor.__GT_cursor.call(null, b)), c = lt.objs.editor.line_handle.call(null, b, c);
return cljs.core.not_EQ_.call(null, c, (new cljs.core.Keyword("\ufdd0'cur-line")).call(null, cljs.core.deref.call(null, a))) ? (lt.objs.editor._line_class.call(null, b, (new cljs.core.Keyword("\ufdd0'cur-line")).call(null, cljs.core.deref.call(null, a)), "\ufdd0'background", "\ufdd0'activeline"), lt.objs.editor._PLUS_line_class.call(null, b, c, "\ufdd0'background", "\ufdd0'activeline"), lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'cur-line"], {"\ufdd0'cur-line":c}))) :
null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/menu!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'menu!"]), "\ufdd0'reaction", function(a, b) {
var c = cljs.core.sort_by.call(null, "\ufdd0'order", lt.object.raise_reduce.call(null, a, "\ufdd0'menu+", cljs.core.PersistentVector.EMPTY));
lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, c), b.clientX, b.clientY);
lt.util.dom.prevent.call(null, b);
return lt.util.dom.stop_propagation.call(null, b)
});
lt.objs.editor.gui = require("nw.gui");
lt.objs.editor.clipboard = lt.objs.editor.gui.Clipboard.get();
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.editor/copy-paste-menu+", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'menu+"]), "\ufdd0'reaction", function(a, b) {
return cljs.core.conj.call(null, b, cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'order", "\ufdd0'enabled", "\ufdd0'click"], {"\ufdd0'label":"Copy", "\ufdd0'order":1, "\ufdd0'enabled":cljs.core.boolean$.call(null, lt.objs.editor.selection_QMARK_.call(null, a)), "\ufdd0'click":function() {
return lt.objs.editor.clipboard.set(lt.objs.editor.selection.call(null, a), "text")
}}), cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'order", "\ufdd0'enabled", "\ufdd0'click"], {"\ufdd0'label":"Cut", "\ufdd0'order":2, "\ufdd0'enabled":cljs.core.boolean$.call(null, lt.objs.editor.selection_QMARK_.call(null, a)), "\ufdd0'click":function() {
lt.objs.editor.clipboard.set(lt.objs.editor.selection.call(null, a), "text");
return lt.objs.editor.replace_selection.call(null, a, "")
}}), cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'order", "\ufdd0'enabled", "\ufdd0'click"], {"\ufdd0'label":"Paste", "\ufdd0'order":3, "\ufdd0'enabled":cljs.core.boolean$.call(null, !cljs.core.empty_QMARK_.call(null, lt.objs.editor.clipboard.get("text"))), "\ufdd0'click":function() {
return lt.objs.editor.replace_selection.call(null, a, lt.objs.editor.clipboard.get("text"))
}}), cljs.core.ObjMap.fromObject(["\ufdd0'type", "\ufdd0'order"], {"\ufdd0'type":"separator", "\ufdd0'order":4}), cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'order", "\ufdd0'click"], {"\ufdd0'label":"Select all", "\ufdd0'order":5, "\ufdd0'click":function() {
return lt.objs.editor.set_selection.call(null, a, lt.objs.editor.first_line.call(null, a), lt.objs.editor.last_line.call(null, a))
}}))
});
lt.objs.editor.ed_obj = lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.editor/editor", "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'editor.inline-result", "\ufdd0'editor", "\ufdd0'editor.keys.normal"]), "\ufdd0'triggers", cljs.core.PersistentVector.fromArray("\ufdd0'change \ufdd0'scroll \ufdd0'update \ufdd0'focus \ufdd0'blur \ufdd0'active \ufdd0'inactive \ufdd0'close \ufdd0'close.force".split(" "), !0), "\ufdd0'behaviors", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.editor/no-wrap \ufdd0'lt.objs.editor/active-on-focus \ufdd0'lt.objs.editor/on-tags-added \ufdd0'lt.objs.editor/on-tags-removed \ufdd0'lt.objs.editor/inactive-on-blur \ufdd0'lt.objs.editor/context-on-active \ufdd0'lt.objs.editor/focus \ufdd0'lt.objs.editor/context-on-inactive \ufdd0'lt.objs.editor/refresh-on-show \ufdd0'lt.objs.editor/highlight-current-line \ufdd0'lt.objs.editor/destroy-on-close".split(" "),
!0), "\ufdd0'cur-line", 0, "\ufdd0'init", function(a, b) {
var c = lt.objs.editor.make.call(null, null, b);
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'ed", "\ufdd0'info"], {"\ufdd0'ed":c, "\ufdd0'info":cljs.core.dissoc.call(null, b, "\ufdd0'content")}));
lt.objs.editor.wrap_object_events.call(null, c, a);
var d = lt.objs.settings.fetch.call(null, "\ufdd0'theme");
cljs.core.truth_(d) && lt.objs.editor.set_options.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'theme"], {"\ufdd0'theme":d}));
d = lt.objs.settings.fetch.call(null, "\ufdd0'line-numbers");
cljs.core.truth_(d) && lt.objs.editor.set_options.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'lineNumbers"], {"\ufdd0'lineNumbers":d}));
return lt.objs.editor.__GT_elem.call(null, c)
});
lt.object.tag_behaviors.call(null, "\ufdd0'editor", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.editor/menu!", "\ufdd0'lt.objs.editor/copy-paste-menu+"], !0));
lt.objs.tabs = {};
lt.objs.tabs.ensure_visible = function(a, b) {
var c = lt.util.dom.$$.call(null, ".list li", lt.object.__GT_content.call(null, b))[a];
if(cljs.core.truth_(c)) {
var d = c.offsetLeft, e = d + c.clientWidth, c = lt.util.dom.parent.call(null, lt.util.dom.parent.call(null, c)), f = c.clientWidth, g = c.scrollLeft, h;
h = (h = d >= g) ? e <= g + f : h;
return cljs.core.truth_(h) ? null : g > d ? c.scrollLeft = d - 50 : c.scrollLeft = e - f + 50
}
return null
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/on-destroy-remove", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'destroy"]), "\ufdd0'reaction", function(a) {
return lt.objs.tabs.rem_BANG_.call(null, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/active-tab-num", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'tab"]), "\ufdd0'reaction", function(a, b) {
var c = cljs.core.deref.call(null, a).call(null, "\ufdd0'objs");
return b < cljs.core.count.call(null, c) ? lt.objs.tabs.active_BANG_.call(null, cljs.core._lookup.call(null, c, b, null)) : lt.objs.tabs.active_BANG_.call(null, cljs.core._lookup.call(null, c, cljs.core.count.call(null, c) - 1, null))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/prev-tab", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'tab.prev"]), "\ufdd0'throttle", 100, "\ufdd0'reaction", function(a) {
var b = cljs.core.deref.call(null, a).call(null, "\ufdd0'objs"), a = lt.objs.tabs.__GT_index.call(null, (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a)));
return 0 < a ? lt.objs.tabs.active_BANG_.call(null, cljs.core._lookup.call(null, b, a - 1, null)) : lt.objs.tabs.active_BANG_.call(null, cljs.core._lookup.call(null, b, cljs.core.count.call(null, b) - 1, null))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/next-tab", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'tab.next"]), "\ufdd0'throttle", 100, "\ufdd0'reaction", function(a) {
var b = cljs.core.deref.call(null, a).call(null, "\ufdd0'objs"), a = lt.objs.tabs.__GT_index.call(null, (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a))) + 1;
return a < cljs.core.count.call(null, b) ? lt.objs.tabs.active_BANG_.call(null, cljs.core._lookup.call(null, b, a, null)) : lt.objs.tabs.active_BANG_.call(null, cljs.core._lookup.call(null, b, 0, null))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/tab-close", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'tab.close"]), "\ufdd0'reaction", function(a) {
try {
var b = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a));
return lt.object.raise.call(null, b, "\ufdd0'close")
}catch(c) {
if(cljs.core.instance_QMARK_.call(null, Error, c) || cljs.core.instance_QMARK_.call(null, global.Error, c)) {
return lt.objs.console.error(c)
}
throw c;
}
});
lt.objs.tabs.__GT_index = function(a) {
return cljs.core.truth_(function() {
if(cljs.core.truth_(a)) {
var b = cljs.core.deref.call(null, a);
return cljs.core.truth_(b) ? (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)) : b
}
return a
}()) ? cljs.core.first.call(null, cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
return cljs.core._EQ_.call(null, a, cljs.core.second.call(null, b))
}, cljs.core.map_indexed.call(null, cljs.core.vector, (new cljs.core.Keyword("\ufdd0'objs")).call(null, cljs.core.deref.call(null, (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)))))))) : null
};
lt.objs.tabs.wrap_multi_behaviors = function(a) {
return lt.object.add_behavior_BANG_.call(null, a, "\ufdd0'lt.objs.tabs/on-destroy-remove")
};
lt.objs.tabs.__GT_name = function(a) {
var b = (new cljs.core.Keyword("\ufdd0'name")).call(null, (new cljs.core.Keyword("\ufdd0'info")).call(null, cljs.core.deref.call(null, a)));
if(cljs.core.truth_(b)) {
return b
}
a = cljs.core.deref.call(null, a).call(null, "\ufdd0'name");
return cljs.core.truth_(a) ? a : "unknown"
};
lt.objs.tabs.active_QMARK_ = function(a, b, c) {
return[cljs.core.str(a), cljs.core.str(cljs.core._EQ_.call(null, cljs.core.deref.call(null, c).call(null, "\ufdd0'active-obj"), b) ? " active" : null)].join("")
};
lt.objs.tabs.dirty_QMARK_ = function(a, b) {
return[cljs.core.str(a), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword("\ufdd0'dirty")).call(null, cljs.core.deref.call(null, b))) ? " dirty" : null)].join("")
};
lt.objs.tabs.item = function(a, b, c) {
a = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'li", cljs.core.ObjMap.fromObject(["\ufdd0'class", "\ufdd0'draggable", "\ufdd0'obj-id", "\ufdd0'pos"], {"\ufdd0'class":lt.objs.tabs.dirty_QMARK_.call(null, lt.objs.tabs.active_QMARK_.call(null, "", b, a), b), "\ufdd0'draggable":"true", "\ufdd0'obj-id":lt.object.__GT_id.call(null, b), "\ufdd0'pos":c}), lt.objs.tabs.__GT_name.call(null, b)], !0));
for(c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'click", function() {
return lt.objs.tabs.active_BANG_.call(null, b)
}, "\ufdd0'contextmenu", function(a) {
lt.objs.tabs.menu_BANG_.call(null, b, a);
lt.util.dom.prevent.call(null, a);
return lt.util.dom.stop_propagation.call(null, a)
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, a, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return a
};
lt.objs.tabs.update_tab_order = function(a, b) {
var c = cljs.core.vector_QMARK_.call(null, b) ? b : cljs.core.map.call(null, function(a) {
return lt.util.dom.attr.call(null, a, "\ufdd0'pos")
}, b), d = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a));
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'objs", "\ufdd0'active-obj"], {"\ufdd0'objs":cljs.core.mapv.call(null, (new cljs.core.Keyword("\ufdd0'objs")).call(null, cljs.core.deref.call(null, a)), c), "\ufdd0'active-obj":null}));
return lt.objs.tabs.active_BANG_.call(null, d)
};
lt.objs.tabs.move_tab = function(a, b) {
var c = lt.util.dom.attr.call(null, b, "\ufdd0'obj-id"), d = lt.util.dom.index.call(null, b), c = lt.object.by_id.call(null, parseInt(c)), e = cljs.core.count.call(null, (new cljs.core.Keyword("\ufdd0'objs")).call(null, cljs.core.deref.call(null, a)));
lt.objs.tabs.rem_BANG_.call(null, c);
lt.objs.tabs.add_BANG_.call(null, c, a);
0 < e && lt.objs.tabs.update_tab_order.call(null, a, cljs.core.vec.call(null, cljs.core.concat.call(null, cljs.core.range.call(null, d), cljs.core.PersistentVector.fromArray([e], !0), cljs.core.range.call(null, d, e))));
return lt.objs.tabs.active_BANG_.call(null, c)
};
lt.objs.tabs.objs_list = function(a, b) {
var c = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'ul", function e(b) {
return new cljs.core.LazySeq(null, !1, function() {
for(var c = b;;) {
if(cljs.core.seq.call(null, c)) {
var h = cljs.core.first.call(null, c), i = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
if(cljs.core.truth_(cljs.core.deref.call(null, h))) {
return cljs.core.cons.call(null, lt.objs.tabs.item.call(null, a, h, i), e.call(null, cljs.core.rest.call(null, c)))
}
c = cljs.core.rest.call(null, c)
}else {
return null
}
}
}, null)
}.call(null, cljs.core.map.call(null, cljs.core.vector, cljs.core.range.call(null), b))], !0));
sortable(c, {axis:"x", distance:10, scroll:!1, opacity:0.9, connectWith:".list"});
lt.util.dom.on.call(null, c, "contextmenu", function(b) {
lt.object.raise.call(null, a, "\ufdd0'menu!", b);
lt.util.dom.prevent.call(null, b);
return lt.util.dom.stop_propagation.call(null, b)
});
lt.util.dom.on.call(null, c, "moved", function(b) {
return lt.objs.tabs.move_tab.call(null, a, b.opts)
});
lt.util.dom.on.call(null, c, "sortupdate", function(b) {
return lt.objs.tabs.update_tab_order.call(null, a, b.opts)
});
return c
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/on-destroy-objs", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'destroy"]), "\ufdd0'reaction", function(a) {
for(a = cljs.core.seq.call(null, (new cljs.core.Keyword("\ufdd0'objs")).call(null, cljs.core.deref.call(null, a)));;) {
if(a) {
var b = cljs.core.first.call(null, a);
lt.object.destroy_BANG_.call(null, b);
a = cljs.core.next.call(null, a)
}else {
return null
}
}
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/repaint-tab-updated", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'tab.updated"]), "\ufdd0'reaction", function(a) {
return lt.object.update_BANG_.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'count"], !0), cljs.core.inc)
});
lt.objs.tabs.tabbed_item = function(a, b) {
for(var c = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'div.content", cljs.core.ObjMap.fromObject(["\ufdd0'style"], {"\ufdd0'style":cljs.core.ObjMap.fromObject(["\ufdd0'display"], {"\ufdd0'display":crate.binding.bound.call(null, a, function(a) {
return cljs.core._EQ_.call(null, a, cljs.core.deref.call(null, b)) ? "" : "none"
})})}), crate.binding.bound.call(null, b, function(a) {
return cljs.core.truth_(a) ? lt.object.__GT_content.call(null, a) : null
})], !0)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY));;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null);
lt.util.dom.on.call(null, c, f, e);
d = cljs.core.next.call(null, d)
}else {
break
}
}
return c
};
lt.objs.tabs.vertical_grip = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'div.vertical-grip", cljs.core.ObjMap.fromObject(["\ufdd0'draggable"], {"\ufdd0'draggable":"true"})], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'dragstart", function(b) {
b.dataTransfer.dropEffect = "move";
b.dataTransfer.setData("text/plain", null);
return lt.object.raise.call(null, a, "\ufdd0'start-drag", b)
}, "\ufdd0'dragend", function(b) {
return lt.object.raise.call(null, a, "\ufdd0'end-drag", b)
}, "\ufdd0'drag", function(b) {
b.dataTransfer.dropEffect = "move";
return lt.object.raise.call(null, a, "\ufdd0'width!", b)
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.objs.tabs.__GT_perc = function(a) {
return cljs.core.truth_(a) ? [cljs.core.str(a), cljs.core.str("%")].join("") : "0"
};
lt.objs.tabs.floored = function(a) {
return 0 > a ? 0 : 100 < a ? 100 : a
};
lt.objs.tabs.to_perc = function(a, b) {
return 100 * (b / a)
};
lt.objs.tabs.next_tabset = function(a) {
var b = cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, "\ufdd0'tabsets");
return cljs.core.second.call(null, cljs.core.drop_while.call(null, function(b) {
return cljs.core.not_EQ_.call(null, a, b)
}, b))
};
lt.objs.tabs.prev_tabset = function(a) {
var b = cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, "\ufdd0'tabsets");
return cljs.core.last.call(null, cljs.core.take_while.call(null, function(b) {
return cljs.core.not_EQ_.call(null, a, b)
}, b))
};
lt.objs.tabs.previous_tabset_width = function(a) {
var b = cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, "\ufdd0'tabsets");
return cljs.core.reduce.call(null, cljs.core._PLUS_, 0, cljs.core.map.call(null, cljs.core.comp.call(null, "\ufdd0'width", cljs.core.deref), cljs.core.take_while.call(null, function(b) {
return cljs.core.not_EQ_.call(null, a, b)
}, b)))
};
lt.objs.tabs.spawn_tabset = function() {
var a = lt.object.create.call(null, "\ufdd0'lt.objs.tabs/tabset"), b = 100 - cljs.core.reduce.call(null, cljs.core._PLUS_, cljs.core.map.call(null, cljs.core.comp.call(null, "\ufdd0'width", cljs.core.deref), cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, "\ufdd0'tabsets")));
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":b}));
return lt.objs.tabs.add_tabset.call(null, a)
};
lt.objs.tabs.equalize_tabset_widths = function() {
for(var a = (new cljs.core.Keyword("\ufdd0'tabsets")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)), b = 100 / cljs.core.count.call(null, a), a = cljs.core.seq.call(null, a);;) {
if(a) {
var c = cljs.core.first.call(null, a);
lt.object.merge_BANG_.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":b}));
a = cljs.core.next.call(null, a)
}else {
return null
}
}
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/no-anim-on-drag", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'start-drag"]), "\ufdd0'reaction", function() {
return lt.objs.animations.off.call(null)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/reanim-on-drop", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'end-drag"]), "\ufdd0'reaction", function() {
return lt.objs.animations.on.call(null)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/set-dragging", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'start-drag"]), "\ufdd0'reaction", function() {
return lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, "\ufdd0'body"), "\ufdd0'dragging")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/unset-dragging", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'end-drag"]), "\ufdd0'reaction", function() {
return lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, "\ufdd0'body"), "\ufdd0'dragging")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/set-width-final!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'end-drag"]), "\ufdd0'reaction", function(a, b) {
var c = lt.util.dom.width.call(null, lt.object.__GT_content.call(null, lt.objs.tabs.multi)), d = (new cljs.core.Keyword("\ufdd0'left")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)), e = b.clientX, d = c + d - e, d = lt.objs.tabs.floored.call(null, cljs.core.int$.call(null, 100 - lt.objs.tabs.previous_tabset_width.call(null, a) - lt.objs.tabs.to_perc.call(null, c, d))), f = (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, a)), c = lt.objs.tabs.next_tabset.call(null,
a), d = d >= (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + f ? (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + f : d, f = lt.objs.tabs.floored.call(null, cljs.core.not.call(null, c) ? 1 : (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + (f - d));
if(cljs.core._EQ_.call(null, d, 0)) {
return lt.objs.tabs.rem_tabset.call(null, a)
}
if(cljs.core._EQ_.call(null, f, 0)) {
return lt.objs.tabs.rem_tabset.call(null, c, "\ufdd0'prev")
}
if(cljs.core._EQ_.call(null, e, 0)) {
return null
}
if(0 > d) {
return lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":100}))
}
if(e = cljs.core.not_EQ_.call(null, e, 0)) {
e = (e = 0 <= d) ? 0 <= f : e
}
return e ? (lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":d})), cljs.core.truth_(c) ? lt.object.merge_BANG_.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":f})) : lt.objs.tabs.spawn_tabset.call(null)) : null
});
lt.objs.tabs.temp_width = function(a, b) {
return lt.util.dom.css.call(null, lt.object.__GT_content.call(null, a), cljs.core.ObjMap.fromObject(["\ufdd0'width", "\ufdd0'border-width"], {"\ufdd0'width":lt.objs.tabs.__GT_perc.call(null, b), "\ufdd0'border-width":cljs.core._EQ_.call(null, 0, b) ? 0 : ""}))
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/width!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'width!"]), "\ufdd0'reaction", function(a, b) {
var c = lt.util.dom.width.call(null, lt.object.__GT_content.call(null, lt.objs.tabs.multi)), d = (new cljs.core.Keyword("\ufdd0'left")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)), e = b.clientX, d = c + d - e, d = lt.objs.tabs.floored.call(null, cljs.core.int$.call(null, 100 - lt.objs.tabs.previous_tabset_width.call(null, a) - lt.objs.tabs.to_perc.call(null, c, d))), f = (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, a)), c = lt.objs.tabs.next_tabset.call(null,
a), d = cljs.core.truth_(cljs.core.truth_(c) ? d >= (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + f : c) ? (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + f : d, f = lt.objs.tabs.floored.call(null, cljs.core.not.call(null, c) ? 1 : (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + (f - d));
if(!cljs.core._EQ_.call(null, e, 0)) {
if(0 > d) {
lt.objs.tabs.temp_width.call(null, a, 100)
}else {
if(e = cljs.core.not_EQ_.call(null, e, 0)) {
e = (e = 0 <= d) ? 0 <= f : e
}
e && (lt.objs.tabs.temp_width.call(null, a, d), cljs.core.truth_(c) ? lt.objs.tabs.temp_width.call(null, c, f) : lt.objs.tabs.spawn_tabset.call(null))
}
}
return lt.objs.tabs.start = lt.util.js.now.call(null)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/on-active-active-tabset", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'active"]), "\ufdd0'reaction", function(a) {
return lt.objs.context.in_BANG_.call(null, "\ufdd0'tabset", (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/tabset-active", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'active"]), "\ufdd0'reaction", function(a) {
lt.objs.context.in_BANG_.call(null, "\ufdd0'tabset", a);
a = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a));
return cljs.core.truth_(a) ? lt.object.raise.call(null, a, "\ufdd0'focus!") : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/tabset-menu", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'menu!"]), "\ufdd0'reaction", function(a, b) {
return lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, cljs.core.PersistentVector.fromArray([cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'click"], {"\ufdd0'label":"New tabset", "\ufdd0'click":function() {
return lt.objs.command.exec_BANG_.call(null, "\ufdd0'tabset.new")
}}), cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'click"], {"\ufdd0'label":"Close tabset", "\ufdd0'click":function() {
return lt.objs.tabs.rem_tabset.call(null, a)
}})], !0)), b.clientX, b.clientY)
});
lt.objs.tabs.tabset_ui = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'div.tabset", cljs.core.ObjMap.fromObject(["\ufdd0'style"], {"\ufdd0'style":cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":crate.binding.bound.call(null, crate.binding.subatom.call(null, a, "\ufdd0'width"), lt.objs.tabs.__GT_perc)})}), cljs.core.PersistentVector.fromArray(["\ufdd0'div.list", crate.binding.bound.call(null, a, function(b) {
return lt.objs.tabs.objs_list.call(null, a, (new cljs.core.Keyword("\ufdd0'objs")).call(null, b))
})], !0), cljs.core.PersistentVector.fromArray(["\ufdd0'div.items", crate.binding.map_bound.call(null, cljs.core.partial.call(null, lt.objs.tabs.tabbed_item, crate.binding.subatom.call(null, a, "\ufdd0'active-obj")), a, cljs.core.ObjMap.fromObject(["\ufdd0'path"], {"\ufdd0'path":cljs.core.PersistentVector.fromArray(["\ufdd0'objs"], !0)}))], !0), lt.objs.tabs.vertical_grip.call(null, a)], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'click",
function() {
return lt.object.raise.call(null, a, "\ufdd0'active")
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.tabs/tabset", "\ufdd0'objs", cljs.core.PersistentVector.EMPTY, "\ufdd0'active-obj", cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY), "\ufdd0'count", 0, "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'tabset"]), "\ufdd0'width", 100, "\ufdd0'init", function(a) {
return lt.objs.tabs.tabset_ui.call(null, a)
});
lt.object.tag_behaviors.call(null, "\ufdd0'tabset", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.tabs/set-dragging \ufdd0'lt.objs.tabs/tabset-menu \ufdd0'lt.objs.tabs/unset-dragging \ufdd0'lt.objs.tabs/no-anim-on-drag \ufdd0'lt.objs.tabs/set-width-final! \ufdd0'lt.objs.tabs/reanim-on-drop \ufdd0'lt.objs.tabs/width! \ufdd0'lt.objs.tabs/tabset-active \ufdd0'lt.objs.tabs/active-tab-num \ufdd0'lt.objs.tabs/prev-tab \ufdd0'lt.objs.tabs/next-tab \ufdd0'lt.objs.tabs/tab-close \ufdd0'lt.objs.tabs/repaint-tab-updated".split(" "),
!0));
lt.object.tag_behaviors.call(null, "\ufdd0'tabset.tab", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.tabs/on-destroy-remove", "\ufdd0'lt.objs.tabs/on-active-active-tabset"], !0));
lt.objs.tabs.__GT_tabsets = function(a) {
return function c(a) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, a)) {
var e = cljs.core.first.call(null, a);
return cljs.core.cons.call(null, lt.object.__GT_content.call(null, e), c.call(null, cljs.core.rest.call(null, a)))
}
return null
}
}, null)
}.call(null, a)
};
lt.objs.tabs.multi_def = lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.tabs/multi-editor2", "\ufdd0'triggers", cljs.core.PersistentVector.EMPTY, "\ufdd0'behaviors", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.tabs/on-destroy-eds \ufdd0'lt.objs.tabs/active-tab-num \ufdd0'lt.objs.tabs/prev-tab \ufdd0'lt.objs.tabs/next-tab \ufdd0'lt.objs.tabs/tab-close \ufdd0'lt.objs.tabs/repaint-tab-updated".split(" "), !0), "\ufdd0'tabsets", cljs.core.PersistentVector.EMPTY, "\ufdd0'left", 40, "\ufdd0'bottom",
0, "\ufdd0'init", function(a) {
var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'div.tabsets"], !0));
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'tabsets-elem"], {"\ufdd0'tabsets-elem":b}));
lt.objs.context.in_BANG_.call(null, "\ufdd0'tabs", a);
return cljs.core.PersistentVector.fromArray(["\ufdd0'div#multi", cljs.core.ObjMap.fromObject(["\ufdd0'style"], {"\ufdd0'style":cljs.core.ObjMap.fromObject(["\ufdd0'left", "\ufdd0'bottom"], {"\ufdd0'left":crate.binding.bound.call(null, crate.binding.subatom.call(null, a, "\ufdd0'left"), lt.util.style.__GT_px), "\ufdd0'bottom":crate.binding.bound.call(null, crate.binding.subatom.call(null, a, "\ufdd0'bottom"), lt.util.style.__GT_px)})}), b], !0)
});
lt.objs.tabs.multi = lt.object.create.call(null, lt.objs.tabs.multi_def);
lt.objs.tabs.tabset = lt.object.create.call(null, "\ufdd0'lt.objs.tabs/tabset");
lt.objs.tabs.add_tabset = function(a) {
lt.object.update_BANG_.call(null, lt.objs.tabs.multi, cljs.core.PersistentVector.fromArray(["\ufdd0'tabsets"], !0), cljs.core.conj, a);
lt.util.dom.append.call(null, (new cljs.core.Keyword("\ufdd0'tabsets-elem")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)), lt.object.__GT_content.call(null, a));
return lt.object.raise.call(null, a, "\ufdd0'active")
};
lt.objs.tabs.rem_tabset = function(a, b) {
var c;
cljs.core.truth_(b) ? (c = lt.objs.tabs.prev_tabset.call(null, a), c = cljs.core.truth_(c) ? c : lt.objs.tabs.next_tabset.call(null, a)) : (c = lt.objs.tabs.next_tabset.call(null, a), c = cljs.core.truth_(c) ? c : lt.objs.tabs.prev_tabset.call(null, a));
if(cljs.core.truth_(c)) {
lt.object.merge_BANG_.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":lt.objs.tabs.floored.call(null, (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, c)) + (new cljs.core.Keyword("\ufdd0'width")).call(null, cljs.core.deref.call(null, a)))}));
lt.util.dom.remove.call(null, lt.object.__GT_content.call(null, a));
for(var d = cljs.core.seq.call(null, (new cljs.core.Keyword("\ufdd0'objs")).call(null, cljs.core.deref.call(null, a)));;) {
if(d) {
var e = cljs.core.first.call(null, d);
lt.objs.tabs.add_BANG_.call(null, e, c);
d = cljs.core.next.call(null, d)
}else {
break
}
}
lt.object.update_BANG_.call(null, lt.objs.tabs.multi, cljs.core.PersistentVector.fromArray(["\ufdd0'tabsets"], !0), function(b) {
return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([a]), b))
});
lt.object.destroy_BANG_.call(null, a);
return lt.object.raise.call(null, c, "\ufdd0'active")
}
return null
};
lt.objs.tabs.menu_BANG_ = function(a, b) {
return lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, cljs.core.PersistentVector.fromArray([cljs.core.ObjMap.fromObject(["\ufdd0'label", "\ufdd0'click"], {"\ufdd0'label":"Close tab", "\ufdd0'click":function() {
return lt.object.raise.call(null, a, "\ufdd0'close")
}})], !0)), b.clientX, b.clientY)
};
lt.objs.tabs.rem_BANG_ = function(a) {
if(cljs.core.truth_(function() {
if(cljs.core.truth_(a)) {
var b = cljs.core.deref.call(null, a);
return cljs.core.truth_(b) ? (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)) : b
}
return a
}())) {
var b = (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)), c = lt.objs.tabs.__GT_index.call(null, a), d = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, b)), e = lt.objs.tabs.__GT_index.call(null, d);
cljs.core.remove_watch.call(null, a, "\ufdd0'tabs");
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'lt.objs.tabs/tabset"], {"\ufdd0'lt.objs.tabs/tabset":null}));
lt.object.merge_BANG_.call(null, b, cljs.core.ObjMap.fromObject(["\ufdd0'objs"], {"\ufdd0'objs":cljs.core.vec.call(null, cljs.core.remove.call(null, function(b) {
return cljs.core._EQ_.call(null, a, b)
}, cljs.core.deref.call(null, b).call(null, "\ufdd0'objs")))}));
if(cljs.core._EQ_.call(null, a, d)) {
return lt.object.raise.call(null, b, "\ufdd0'tab", c)
}
if(cljs.core.not_EQ_.call(null, e, lt.objs.tabs.__GT_index.call(null, d))) {
return lt.object.merge_BANG_.call(null, b, cljs.core.ObjMap.fromObject(["\ufdd0'active-obj"], {"\ufdd0'active-obj":null})), lt.objs.tabs.active_BANG_.call(null, d)
}
}
return null
};
lt.objs.tabs.add_BANG_ = function() {
var a = function(a, b) {
var e;
var f = cljs.core.nth.call(null, b, 0, null);
e = cljs.core.truth_(f) ? f : lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset");
return cljs.core.truth_(e) ? (lt.object.add_tags.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'tabset.tab"], !0)), lt.objs.tabs.wrap_multi_behaviors.call(null, a), lt.object.update_BANG_.call(null, e, cljs.core.PersistentVector.fromArray(["\ufdd0'objs"], !0), cljs.core.conj, a), lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'lt.objs.tabs/tabset"], {"\ufdd0'lt.objs.tabs/tabset":e})), cljs.core.add_watch.call(null, crate.binding.subatom.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'dirty"],
!0)), "\ufdd0'tabs", function() {
return lt.object.raise.call(null, e, "\ufdd0'tab.updated")
}), a) : null
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.tabs.in_tab_QMARK_ = function(a) {
return cljs.core.deref.call(null, a).call(null, "\ufdd0'lt.objs.tabs/tabset")
};
lt.objs.tabs.add_or_focus_BANG_ = function(a) {
cljs.core.truth_(lt.objs.tabs.in_tab_QMARK_.call(null, a)) || lt.objs.tabs.add_BANG_.call(null, a);
return lt.objs.tabs.active_BANG_.call(null, a)
};
lt.objs.tabs.active_BANG_ = function(a) {
if(cljs.core.truth_(cljs.core.truth_(a) ? (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)) : a)) {
if(lt.object.merge_BANG_.call(null, (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a)), cljs.core.ObjMap.fromObject(["\ufdd0'active-obj"], {"\ufdd0'active-obj":a})), lt.object.raise.call(null, a, "\ufdd0'show"), lt.objs.tabs.ensure_visible.call(null, lt.objs.tabs.__GT_index.call(null, a), (new cljs.core.Keyword("\ufdd0'lt.objs.tabs/tabset")).call(null, cljs.core.deref.call(null, a))), a = cljs.core.deref.call(null, a).call(null, "\ufdd0'ed"), cljs.core.truth_(a)) {
return lt.objs.editor.focus.call(null, a), lt.objs.editor.refresh.call(null, a)
}
}
return null
};
lt.objs.tabs.num_tabs = function() {
return cljs.core.reduce.call(null, function(a, b) {
return a + cljs.core.count.call(null, (new cljs.core.Keyword("\ufdd0'objs")).call(null, cljs.core.deref.call(null, b)))
}, 0, (new cljs.core.Keyword("\ufdd0'tabsets")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)))
};
lt.objs.tabs.num_tabs.call(null);
lt.util.dom.append.call(null, lt.object.__GT_content.call(null, lt.objs.canvas.canvas), (new cljs.core.Keyword("\ufdd0'content")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabs.move-next-tabset", "\ufdd0'desc":"Tab: Move tab to next tabset", "\ufdd0'exec":function() {
var a = lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset");
if(cljs.core.truth_(a)) {
var b = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a)), c;
var d = lt.objs.tabs.next_tabset.call(null, a);
c = cljs.core.truth_(d) ? d : lt.objs.tabs.prev_tabset.call(null, a);
if(cljs.core.truth_(function() {
if(cljs.core.truth_(b)) {
var d = cljs.core.deref.call(null, b);
return cljs.core.truth_(d) ? cljs.core.truth_(c) ? cljs.core.not_EQ_.call(null, c, a) : c : d
}
return b
}())) {
return lt.objs.tabs.rem_BANG_.call(null, b), lt.objs.tabs.add_BANG_.call(null, b, c), lt.objs.tabs.active_BANG_.call(null, b)
}
}
return null
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabs.move-prev-tabset", "\ufdd0'desc":"Tab: Move tab to previous tabset", "\ufdd0'exec":function() {
var a = lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset");
if(cljs.core.truth_(a)) {
var b = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a)), c;
var d = lt.objs.tabs.prev_tabset.call(null, a);
c = cljs.core.truth_(d) ? d : lt.objs.tabs.next_tabset.call(null, a);
if(cljs.core.truth_(function() {
if(cljs.core.truth_(b)) {
var d = cljs.core.deref.call(null, b);
return cljs.core.truth_(d) ? cljs.core.truth_(c) ? cljs.core.not_EQ_.call(null, c, a) : c : d
}
return b
}())) {
return lt.objs.tabs.rem_BANG_.call(null, b), lt.objs.tabs.add_BANG_.call(null, b, c), lt.objs.tabs.active_BANG_.call(null, b)
}
}
return null
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabs.next", "\ufdd0'desc":"Tab: Next tab", "\ufdd0'exec":function() {
return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset"), "\ufdd0'tab.next")
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabs.prev", "\ufdd0'desc":"Tab: Previous tab", "\ufdd0'exec":function() {
return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset"), "\ufdd0'tab.prev")
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabs.close", "\ufdd0'desc":"Tab: Close current tab", "\ufdd0'exec":function() {
cljs.core._EQ_.call(null, 0, lt.objs.tabs.num_tabs.call(null)) && lt.objs.command.exec_BANG_.call(null, "\ufdd0'close-window");
var a = lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset");
return cljs.core.truth_(a) ? cljs.core.truth_(function() {
var b = (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a));
return cljs.core.truth_(b) ? cljs.core.deref.call(null, (new cljs.core.Keyword("\ufdd0'active-obj")).call(null, cljs.core.deref.call(null, a))) : b
}()) ? lt.object.raise.call(null, a, "\ufdd0'tab.close") : null : null
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'hidden", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabs.goto", "\ufdd0'hidden":!0, "\ufdd0'desc":"Tab: Goto tab #", "\ufdd0'exec":function(a) {
return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset"), "\ufdd0'tab", a)
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabset.next", "\ufdd0'desc":"Tabset: Next tabset", "\ufdd0'exec":function() {
var a = lt.objs.tabs.next_tabset.call(null, lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset"));
if(cljs.core.truth_(a)) {
return lt.object.raise.call(null, a, "\ufdd0'active")
}
a = cljs.core._lookup.call(null, (new cljs.core.Keyword("\ufdd0'tabsets")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)), 0, null);
return cljs.core.truth_(a) ? lt.object.raise.call(null, a, "\ufdd0'active") : null
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabset.prev", "\ufdd0'desc":"Tabset: Previous tabset", "\ufdd0'exec":function() {
var a = lt.objs.tabs.prev_tabset.call(null, lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset"));
if(cljs.core.truth_(a)) {
return lt.object.raise.call(null, a, "\ufdd0'active")
}
a = cljs.core.last.call(null, (new cljs.core.Keyword("\ufdd0'tabsets")).call(null, cljs.core.deref.call(null, lt.objs.tabs.multi)));
return cljs.core.truth_(a) ? lt.object.raise.call(null, a, "\ufdd0'active") : null
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabset.close", "\ufdd0'desc":"Tabset: Remove active tabset", "\ufdd0'exec":function() {
return lt.objs.tabs.rem_tabset.call(null, lt.objs.context.__GT_obj.call(null, "\ufdd0'tabset"))
}}));
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'tabset.new", "\ufdd0'desc":"Tabset: Add a tabset", "\ufdd0'exec":function() {
lt.objs.tabs.spawn_tabset.call(null);
return lt.objs.tabs.equalize_tabset_widths.call(null)
}}));
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.tabs/init-sortable", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'pre-init"]), "\ufdd0'reaction", function() {
return initSortable(window)
});
lt.object.tag_behaviors.call(null, "\ufdd0'app", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.tabs/init-sortable"], !0));
lt.objs.tabs.add_tabset.call(null, lt.objs.tabs.tabset);
lt.object.raise.call(null, lt.objs.tabs.tabset, "\ufdd0'active");
lt.objs.sidebar = {};
lt.objs.sidebar.default_width = 280;
lt.objs.sidebar.sidebar_item = function(a, b) {
for(var c = crate.core.html.call(null, function() {
var c = cljs.core.deref.call(null, b), c = cljs.core.seq_QMARK_.call(null, c) ? cljs.core.apply.call(null, cljs.core.hash_map, c) : c, c = cljs.core._lookup.call(null, c, "\ufdd0'label", null);
return cljs.core.PersistentVector.fromArray(["\ufdd0'li", cljs.core.ObjMap.fromObject(["\ufdd0'class"], {"\ufdd0'class":crate.binding.bound.call(null, a, function(a) {
return cljs.core._EQ_.call(null, b, (new cljs.core.Keyword("\ufdd0'active")).call(null, a)) ? "current" : null
})}), c], !0)
}()), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'click", function(c) {
lt.object.raise.call(null, a, "\ufdd0'toggle", b);
return lt.object.raise.call(null, b, "\ufdd0'toggle", c)
}], !0)));;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null);
lt.util.dom.on.call(null, c, f, e);
d = cljs.core.next.call(null, d)
}else {
break
}
}
return c
};
lt.objs.sidebar.sidebar_tabs = function(a, b) {
for(var c = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'ul#sidebar", function h(b) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, b)) {
var c = cljs.core.first.call(null, b);
cljs.core.nth.call(null, c, 0, null);
c = cljs.core.nth.call(null, c, 1, null);
return cljs.core.cons.call(null, lt.objs.sidebar.sidebar_item.call(null, a, c), h.call(null, cljs.core.rest.call(null, b)))
}
return null
}
}, null)
}.call(null, b)], !0)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY));;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null);
lt.util.dom.on.call(null, c, f, e);
d = cljs.core.next.call(null, d)
}else {
break
}
}
return c
};
lt.objs.sidebar.vertical_grip = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'div.vertical-grip", cljs.core.ObjMap.fromObject(["\ufdd0'draggable"], {"\ufdd0'draggable":"true"})], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'dragstart", function() {
return lt.object.raise.call(null, a, "\ufdd0'start-drag")
}, "\ufdd0'dragend", function() {
return lt.object.raise.call(null, a, "\ufdd0'end-drag")
}, "\ufdd0'drag", function(b) {
return lt.object.raise.call(null, a, "\ufdd0'width!", b)
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/no-anim-on-drag", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'start-drag"]), "\ufdd0'reaction", function() {
return lt.objs.animations.off.call(null)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/reanim-on-drop", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'end-drag"]), "\ufdd0'reaction", function() {
return lt.objs.animations.on.call(null)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/width!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'width!"]), "\ufdd0'throttle", 5, "\ufdd0'reaction", function(a, b) {
if(cljs.core._EQ_.call(null, 0, b.clientX)) {
return null
}
lt.object.merge_BANG_.call(null, lt.objs.tabs.multi, cljs.core.ObjMap.fromObject(["\ufdd0'left"], {"\ufdd0'left":0 + b.clientX}));
return lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'width", "\ufdd0'max-width"], {"\ufdd0'width":b.clientX - 40, "\ufdd0'max-width":b.clientX - 40}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/pop-transient", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'pop!"]), "\ufdd0'reaction", function(a) {
var b = (new cljs.core.Keyword("\ufdd0'prev")).call(null, cljs.core.deref.call(null, a));
return cljs.core.truth_(b) ? cljs.core.not_EQ_.call(null, b, "\ufdd0'none") ? lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'prev", "\ufdd0'active"], {"\ufdd0'prev":null, "\ufdd0'active":b})) : lt.object.raise.call(null, a, "\ufdd0'close!") : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/open!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'open!"]), "\ufdd0'reaction", function(a) {
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'width"], {"\ufdd0'width":(new cljs.core.Keyword("\ufdd0'max-width")).call(null, cljs.core.deref.call(null, a))}));
return lt.object.merge_BANG_.call(null, lt.objs.tabs.multi, cljs.core.ObjMap.fromObject(["\ufdd0'left"], {"\ufdd0'left":(new cljs.core.Keyword("\ufdd0'max-width")).call(null, cljs.core.deref.call(null, a)) + 40}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/close!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'close!"]), "\ufdd0'reaction", function(a) {
lt.object.merge_BANG_.call(null, lt.objs.tabs.multi, cljs.core.ObjMap.fromObject(["\ufdd0'left"], {"\ufdd0'left":40}));
return lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'active", "\ufdd0'transients", "\ufdd0'width"], {"\ufdd0'active":null, "\ufdd0'transients":cljs.core.list.call(null), "\ufdd0'width":0}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar/item-toggled", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'toggle"]), "\ufdd0'reaction", function(a, b, c) {
var c = cljs.core.seq_QMARK_.call(null, c) ? cljs.core.apply.call(null, cljs.core.hash_map, c) : c, d = cljs.core._lookup.call(null, c, "\ufdd0'soft?", null), e = cljs.core._lookup.call(null, c, "\ufdd0'transient?", null), f = cljs.core._lookup.call(null, c, "\ufdd0'force?", null);
return cljs.core.truth_(function() {
var c = cljs.core.not_EQ_.call(null, b, (new cljs.core.Keyword("\ufdd0'active")).call(null, cljs.core.deref.call(null, a)));
return c ? c : f
}()) ? (lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'active", "\ufdd0'prev"], {"\ufdd0'active":b, "\ufdd0'prev":cljs.core.truth_(e) ? function() {
var b = (new cljs.core.Keyword("\ufdd0'prev")).call(null, cljs.core.deref.call(null, a));
if(cljs.core.truth_(b)) {
return b
}
b = (new cljs.core.Keyword("\ufdd0'active")).call(null, cljs.core.deref.call(null, a));
return cljs.core.truth_(b) ? b : "\ufdd0'none"
}() : null})), lt.object.raise.call(null, a, "\ufdd0'open!"), cljs.core.truth_(d) ? null : lt.object.raise.call(null, b, "\ufdd0'focus!")) : lt.object.raise.call(null, a, "\ufdd0'close!")
});
lt.objs.sidebar.pop_BANG_ = function() {
lt.object.raise.call(null, lt.objs.sidebar.sidebar, "\ufdd0'pop!");
return cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'active")).call(null, cljs.core.deref.call(null, lt.objs.sidebar.sidebar)))
};
lt.objs.sidebar.active_content = function(a) {
return cljs.core.truth_(a) ? lt.object.__GT_content.call(null, a) : null
};
lt.objs.sidebar.__GT_width = function(a) {
return[cljs.core.str(cljs.core.truth_(a) ? a : 0), cljs.core.str("px")].join("")
};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.sidebar/sidebar", "\ufdd0'triggers", cljs.core.PersistentHashSet.EMPTY, "\ufdd0'behaviors", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.sidebar/item-toggled \ufdd0'lt.objs.sidebar/width! \ufdd0'lt.objs.sidebar/open! \ufdd0'lt.objs.sidebar/close! \ufdd0'lt.objs.sidebar/no-anim-on-drag \ufdd0'lt.objs.sidebar/reanim-on-drop \ufdd0'lt.objs.sidebar/pop-transient".split(" "), !0), "\ufdd0'items", cljs.core.sorted_map_by.call(null, cljs.core._GT_),
"\ufdd0'width", 0, "\ufdd0'transients", cljs.core.List.EMPTY, "\ufdd0'max-width", lt.objs.sidebar.default_width, "\ufdd0'init", function(a) {
return cljs.core.PersistentVector.fromArray(["\ufdd0'div#side", cljs.core.PersistentVector.fromArray(["\ufdd0'div#sidebar-wrapper", crate.binding.bound.call(null, crate.binding.subatom.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'items"], !0)), cljs.core.partial.call(null, lt.objs.sidebar.sidebar_tabs, a))], !0), cljs.core.PersistentVector.fromArray(["\ufdd0'div.content-wrapper", cljs.core.ObjMap.fromObject(["\ufdd0'style"], {"\ufdd0'style":cljs.core.ObjMap.fromObject(["\ufdd0'width"],
{"\ufdd0'width":crate.binding.bound.call(null, crate.binding.subatom.call(null, a, "\ufdd0'width"), lt.objs.sidebar.__GT_width)})}), cljs.core.PersistentVector.fromArray(["\ufdd0'div.content", crate.binding.bound.call(null, crate.binding.subatom.call(null, a, "\ufdd0'active"), lt.objs.sidebar.active_content)], !0), lt.objs.sidebar.vertical_grip.call(null, a)], !0)], !0)
});
lt.objs.sidebar.sidebar = lt.object.create.call(null, "\ufdd0'lt.objs.sidebar/sidebar");
lt.objs.canvas.add_BANG_.call(null, lt.objs.sidebar.sidebar);
lt.objs.sidebar.add_item = function(a) {
return lt.object.update_BANG_.call(null, lt.objs.sidebar.sidebar, cljs.core.PersistentVector.fromArray(["\ufdd0'items"], !0), cljs.core.assoc, (new cljs.core.Keyword("\ufdd0'order")).call(null, cljs.core.deref.call(null, a)), a)
};
lt.objs.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'hidden", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'close-sidebar", "\ufdd0'desc":"Sidebar: close", "\ufdd0'hidden":!0, "\ufdd0'exec":function() {
return lt.object.raise.call(null, lt.objs.sidebar.sidebar, "\ufdd0'close!")
}}));
lt.objs.platform = {};
lt.objs.platform.normalize = function(a) {
var b = cljs.core._EQ_;
if(b.call(null, "win32", a)) {
return"\ufdd0'windows"
}
if(b.call(null, "linux", a)) {
return"\ufdd0'linux"
}
if(b.call(null, "darwin", a)) {
return"\ufdd0'mac"
}
throw Error([cljs.core.str("No matching clause: "), cljs.core.str(a)].join(""));
};
lt.objs.platform.open = function(a) {
return require("nw.gui").Shell.openExternal(a)
};
lt.objs.platform.platform = lt.objs.platform.normalize.call(null, process.platform);
lt.objs.platform.mac_QMARK_ = function() {
return cljs.core._EQ_.call(null, lt.objs.platform.platform, "\ufdd0'mac")
};
lt.objs.platform.win_QMARK_ = function() {
return cljs.core._EQ_.call(null, lt.objs.platform.platform, "\ufdd0'windows")
};
lt.objs.platform.linux_QMARK_ = function() {
return cljs.core._EQ_.call(null, lt.objs.platform.platform, "\ufdd0'linux")
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.platform/add-platform-class", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function() {
return lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, "\ufdd0'body"), cljs.core.name.call(null, lt.objs.platform.platform))
});
lt.object.add_behavior_BANG_.call(null, lt.objs.app.app, "\ufdd0'lt.objs.platform/add-platform-class");
goog.Uri = function(a, b) {
var c;
a instanceof goog.Uri ? (this.ignoreCase_ = goog.isDef(b) ? b : a.getIgnoreCase(), this.setScheme(a.getScheme()), this.setUserInfo(a.getUserInfo()), this.setDomain(a.getDomain()), this.setPort(a.getPort()), this.setPath(a.getPath()), this.setQueryData(a.getQueryData().clone()), this.setFragment(a.getFragment())) : a && (c = goog.uri.utils.split(String(a))) ? (this.ignoreCase_ = !!b, this.setScheme(c[goog.uri.utils.ComponentIndex.SCHEME] || "", !0), this.setUserInfo(c[goog.uri.utils.ComponentIndex.USER_INFO] ||
"", !0), this.setDomain(c[goog.uri.utils.ComponentIndex.DOMAIN] || "", !0), this.setPort(c[goog.uri.utils.ComponentIndex.PORT]), this.setPath(c[goog.uri.utils.ComponentIndex.PATH] || "", !0), this.setQueryData(c[goog.uri.utils.ComponentIndex.QUERY_DATA] || "", !0), this.setFragment(c[goog.uri.utils.ComponentIndex.FRAGMENT] || "", !0)) : (this.ignoreCase_ = !!b, this.queryData_ = new goog.Uri.QueryData(null, null, this.ignoreCase_))
};
goog.Uri.preserveParameterTypesCompatibilityFlag = !1;
goog.Uri.RANDOM_PARAM = goog.uri.utils.StandardQueryParam.RANDOM;
goog.Uri.prototype.scheme_ = "";
goog.Uri.prototype.userInfo_ = "";
goog.Uri.prototype.domain_ = "";
goog.Uri.prototype.port_ = null;
goog.Uri.prototype.path_ = "";
goog.Uri.prototype.fragment_ = "";
goog.Uri.prototype.isReadOnly_ = !1;
goog.Uri.prototype.ignoreCase_ = !1;
goog.Uri.prototype.toString = function() {
var a = [], b = this.getScheme();
b && a.push(goog.Uri.encodeSpecialChars_(b, goog.Uri.reDisallowedInSchemeOrUserInfo_), ":");
if(b = this.getDomain()) {
a.push("//");
var c = this.getUserInfo();
c && a.push(goog.Uri.encodeSpecialChars_(c, goog.Uri.reDisallowedInSchemeOrUserInfo_), "@");
a.push(goog.string.urlEncode(b));
b = this.getPort();
null != b && a.push(":", String(b))
}
if(b = this.getPath()) {
this.hasDomain() && "/" != b.charAt(0) && a.push("/"), a.push(goog.Uri.encodeSpecialChars_(b, "/" == b.charAt(0) ? goog.Uri.reDisallowedInAbsolutePath_ : goog.Uri.reDisallowedInRelativePath_))
}
(b = this.getEncodedQuery()) && a.push("?", b);
(b = this.getFragment()) && a.push("#", goog.Uri.encodeSpecialChars_(b, goog.Uri.reDisallowedInFragment_));
return a.join("")
};
goog.Uri.prototype.resolve = function(a) {
var b = this.clone(), c = a.hasScheme();
c ? b.setScheme(a.getScheme()) : c = a.hasUserInfo();
c ? b.setUserInfo(a.getUserInfo()) : c = a.hasDomain();
c ? b.setDomain(a.getDomain()) : c = a.hasPort();
var d = a.getPath();
if(c) {
b.setPort(a.getPort())
}else {
if(c = a.hasPath()) {
if("/" != d.charAt(0)) {
if(this.hasDomain() && !this.hasPath()) {
d = "/" + d
}else {
var e = b.getPath().lastIndexOf("/");
-1 != e && (d = b.getPath().substr(0, e + 1) + d)
}
}
d = goog.Uri.removeDotSegments(d)
}
}
c ? b.setPath(d) : c = a.hasQuery();
c ? b.setQueryData(a.getDecodedQuery()) : c = a.hasFragment();
c && b.setFragment(a.getFragment());
return b
};
goog.Uri.prototype.clone = function() {
return new goog.Uri(this)
};
goog.Uri.prototype.getScheme = function() {
return this.scheme_
};
goog.Uri.prototype.setScheme = function(a, b) {
this.enforceReadOnly();
if(this.scheme_ = b ? goog.Uri.decodeOrEmpty_(a) : a) {
this.scheme_ = this.scheme_.replace(/:$/, "")
}
return this
};
goog.Uri.prototype.hasScheme = function() {
return!!this.scheme_
};
goog.Uri.prototype.getUserInfo = function() {
return this.userInfo_
};
goog.Uri.prototype.setUserInfo = function(a, b) {
this.enforceReadOnly();
this.userInfo_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
return this
};
goog.Uri.prototype.hasUserInfo = function() {
return!!this.userInfo_
};
goog.Uri.prototype.getDomain = function() {
return this.domain_
};
goog.Uri.prototype.setDomain = function(a, b) {
this.enforceReadOnly();
this.domain_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
return this
};
goog.Uri.prototype.hasDomain = function() {
return!!this.domain_
};
goog.Uri.prototype.getPort = function() {
return this.port_
};
goog.Uri.prototype.setPort = function(a) {
this.enforceReadOnly();
if(a) {
a = Number(a);
if(isNaN(a) || 0 > a) {
throw Error("Bad port number " + a);
}
this.port_ = a
}else {
this.port_ = null
}
return this
};
goog.Uri.prototype.hasPort = function() {
return null != this.port_
};
goog.Uri.prototype.getPath = function() {
return this.path_
};
goog.Uri.prototype.setPath = function(a, b) {
this.enforceReadOnly();
this.path_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
return this
};
goog.Uri.prototype.hasPath = function() {
return!!this.path_
};
goog.Uri.prototype.hasQuery = function() {
return"" !== this.queryData_.toString()
};
goog.Uri.prototype.setQueryData = function(a, b) {
this.enforceReadOnly();
a instanceof goog.Uri.QueryData ? (this.queryData_ = a, this.queryData_.setIgnoreCase(this.ignoreCase_)) : (b || (a = goog.Uri.encodeSpecialChars_(a, goog.Uri.reDisallowedInQuery_)), this.queryData_ = new goog.Uri.QueryData(a, null, this.ignoreCase_));
return this
};
goog.Uri.prototype.setQuery = function(a, b) {
return this.setQueryData(a, b)
};
goog.Uri.prototype.getEncodedQuery = function() {
return this.queryData_.toString()
};
goog.Uri.prototype.getDecodedQuery = function() {
return this.queryData_.toDecodedString()
};
goog.Uri.prototype.getQueryData = function() {
return this.queryData_
};
goog.Uri.prototype.getQuery = function() {
return this.getEncodedQuery()
};
goog.Uri.prototype.setParameterValue = function(a, b) {
this.enforceReadOnly();
this.queryData_.set(a, b);
return this
};
goog.Uri.prototype.setParameterValues = function(a, b) {
this.enforceReadOnly();
goog.isArray(b) || (b = [String(b)]);
this.queryData_.setValues(a, b);
return this
};
goog.Uri.prototype.getParameterValues = function(a) {
return this.queryData_.getValues(a)
};
goog.Uri.prototype.getParameterValue = function(a) {
return this.queryData_.get(a)
};
goog.Uri.prototype.getFragment = function() {
return this.fragment_
};
goog.Uri.prototype.setFragment = function(a, b) {
this.enforceReadOnly();
this.fragment_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
return this
};
goog.Uri.prototype.hasFragment = function() {
return!!this.fragment_
};
goog.Uri.prototype.hasSameDomainAs = function(a) {
return(!this.hasDomain() && !a.hasDomain() || this.getDomain() == a.getDomain()) && (!this.hasPort() && !a.hasPort() || this.getPort() == a.getPort())
};
goog.Uri.prototype.makeUnique = function() {
this.enforceReadOnly();
this.setParameterValue(goog.Uri.RANDOM_PARAM, goog.string.getRandomString());
return this
};
goog.Uri.prototype.removeParameter = function(a) {
this.enforceReadOnly();
this.queryData_.remove(a);
return this
};
goog.Uri.prototype.setReadOnly = function(a) {
this.isReadOnly_ = a;
return this
};
goog.Uri.prototype.isReadOnly = function() {
return this.isReadOnly_
};
goog.Uri.prototype.enforceReadOnly = function() {
if(this.isReadOnly_) {
throw Error("Tried to modify a read-only Uri");
}
};
goog.Uri.prototype.setIgnoreCase = function(a) {
this.ignoreCase_ = a;
this.queryData_ && this.queryData_.setIgnoreCase(a);
return this
};
goog.Uri.prototype.getIgnoreCase = function() {
return this.ignoreCase_
};
goog.Uri.parse = function(a, b) {
return a instanceof goog.Uri ? a.clone() : new goog.Uri(a, b)
};
goog.Uri.create = function(a, b, c, d, e, f, g, h) {
h = new goog.Uri(null, h);
a && h.setScheme(a);
b && h.setUserInfo(b);
c && h.setDomain(c);
d && h.setPort(d);
e && h.setPath(e);
f && h.setQueryData(f);
g && h.setFragment(g);
return h
};
goog.Uri.resolve = function(a, b) {
a instanceof goog.Uri || (a = goog.Uri.parse(a));
b instanceof goog.Uri || (b = goog.Uri.parse(b));
return a.resolve(b)
};
goog.Uri.removeDotSegments = function(a) {
if(".." == a || "." == a) {
return""
}
if(!goog.string.contains(a, "./") && !goog.string.contains(a, "/.")) {
return a
}
for(var b = goog.string.startsWith(a, "/"), a = a.split("/"), c = [], d = 0;d < a.length;) {
var e = a[d++];
"." == e ? b && d == a.length && c.push("") : ".." == e ? ((1 < c.length || 1 == c.length && "" != c[0]) && c.pop(), b && d == a.length && c.push("")) : (c.push(e), b = !0)
}
return c.join("/")
};
goog.Uri.decodeOrEmpty_ = function(a) {
return a ? decodeURIComponent(a) : ""
};
goog.Uri.encodeSpecialChars_ = function(a, b) {
return goog.isString(a) ? encodeURI(a).replace(b, goog.Uri.encodeChar_) : null
};
goog.Uri.encodeChar_ = function(a) {
a = a.charCodeAt(0);
return"%" + (a >> 4 & 15).toString(16) + (a & 15).toString(16)
};
goog.Uri.reDisallowedInSchemeOrUserInfo_ = /[#\/\?@]/g;
goog.Uri.reDisallowedInRelativePath_ = /[\#\?:]/g;
goog.Uri.reDisallowedInAbsolutePath_ = /[\#\?]/g;
goog.Uri.reDisallowedInQuery_ = /[\#\?@]/g;
goog.Uri.reDisallowedInFragment_ = /#/g;
goog.Uri.haveSameDomain = function(a, b) {
var c = goog.uri.utils.split(a), d = goog.uri.utils.split(b);
return c[goog.uri.utils.ComponentIndex.DOMAIN] == d[goog.uri.utils.ComponentIndex.DOMAIN] && c[goog.uri.utils.ComponentIndex.PORT] == d[goog.uri.utils.ComponentIndex.PORT]
};
goog.Uri.QueryData = function(a, b, c) {
this.encodedQuery_ = a || null;
this.ignoreCase_ = !!c
};
goog.Uri.QueryData.prototype.ensureKeyMapInitialized_ = function() {
if(!this.keyMap_ && (this.keyMap_ = new goog.structs.Map, this.count_ = 0, this.encodedQuery_)) {
for(var a = this.encodedQuery_.split("&"), b = 0;b < a.length;b++) {
var c = a[b].indexOf("="), d = null, e = null;
0 <= c ? (d = a[b].substring(0, c), e = a[b].substring(c + 1)) : d = a[b];
d = goog.string.urlDecode(d);
d = this.getKeyName_(d);
this.add(d, e ? goog.string.urlDecode(e) : "")
}
}
};
goog.Uri.QueryData.createFromMap = function(a, b, c) {
b = goog.structs.getKeys(a);
if("undefined" == typeof b) {
throw Error("Keys are undefined");
}
for(var c = new goog.Uri.QueryData(null, null, c), a = goog.structs.getValues(a), d = 0;d < b.length;d++) {
var e = b[d], f = a[d];
goog.isArray(f) ? c.setValues(e, f) : c.add(e, f)
}
return c
};
goog.Uri.QueryData.createFromKeysValues = function(a, b, c, d) {
if(a.length != b.length) {
throw Error("Mismatched lengths for keys/values");
}
c = new goog.Uri.QueryData(null, null, d);
for(d = 0;d < a.length;d++) {
c.add(a[d], b[d])
}
return c
};
goog.Uri.QueryData.prototype.keyMap_ = null;
goog.Uri.QueryData.prototype.count_ = null;
goog.Uri.QueryData.prototype.getCount = function() {
this.ensureKeyMapInitialized_();
return this.count_
};
goog.Uri.QueryData.prototype.add = function(a, b) {
this.ensureKeyMapInitialized_();
this.invalidateCache_();
var a = this.getKeyName_(a), c = this.keyMap_.get(a);
c || this.keyMap_.set(a, c = []);
c.push(b);
this.count_++;
return this
};
goog.Uri.QueryData.prototype.remove = function(a) {
this.ensureKeyMapInitialized_();
a = this.getKeyName_(a);
return this.keyMap_.containsKey(a) ? (this.invalidateCache_(), this.count_ -= this.keyMap_.get(a).length, this.keyMap_.remove(a)) : !1
};
goog.Uri.QueryData.prototype.clear = function() {
this.invalidateCache_();
this.keyMap_ = null;
this.count_ = 0
};
goog.Uri.QueryData.prototype.isEmpty = function() {
this.ensureKeyMapInitialized_();
return 0 == this.count_
};
goog.Uri.QueryData.prototype.containsKey = function(a) {
this.ensureKeyMapInitialized_();
a = this.getKeyName_(a);
return this.keyMap_.containsKey(a)
};
goog.Uri.QueryData.prototype.containsValue = function(a) {
var b = this.getValues();
return goog.array.contains(b, a)
};
goog.Uri.QueryData.prototype.getKeys = function() {
this.ensureKeyMapInitialized_();
for(var a = this.keyMap_.getValues(), b = this.keyMap_.getKeys(), c = [], d = 0;d < b.length;d++) {
for(var e = a[d], f = 0;f < e.length;f++) {
c.push(b[d])
}
}
return c
};
goog.Uri.QueryData.prototype.getValues = function(a) {
this.ensureKeyMapInitialized_();
var b = [];
if(a) {
this.containsKey(a) && (b = goog.array.concat(b, this.keyMap_.get(this.getKeyName_(a))))
}else {
for(var a = this.keyMap_.getValues(), c = 0;c < a.length;c++) {
b = goog.array.concat(b, a[c])
}
}
return b
};
goog.Uri.QueryData.prototype.set = function(a, b) {
this.ensureKeyMapInitialized_();
this.invalidateCache_();
a = this.getKeyName_(a);
this.containsKey(a) && (this.count_ -= this.keyMap_.get(a).length);
this.keyMap_.set(a, [b]);
this.count_++;
return this
};
goog.Uri.QueryData.prototype.get = function(a, b) {
var c = a ? this.getValues(a) : [];
return goog.Uri.preserveParameterTypesCompatibilityFlag ? 0 < c.length ? c[0] : b : 0 < c.length ? String(c[0]) : b
};
goog.Uri.QueryData.prototype.setValues = function(a, b) {
this.remove(a);
0 < b.length && (this.invalidateCache_(), this.keyMap_.set(this.getKeyName_(a), goog.array.clone(b)), this.count_ += b.length)
};
goog.Uri.QueryData.prototype.toString = function() {
if(this.encodedQuery_) {
return this.encodedQuery_
}
if(!this.keyMap_) {
return""
}
for(var a = [], b = this.keyMap_.getKeys(), c = 0;c < b.length;c++) {
for(var d = b[c], e = goog.string.urlEncode(d), d = this.getValues(d), f = 0;f < d.length;f++) {
var g = e;
"" !== d[f] && (g += "=" + goog.string.urlEncode(d[f]));
a.push(g)
}
}
return this.encodedQuery_ = a.join("&")
};
goog.Uri.QueryData.prototype.toDecodedString = function() {
return goog.Uri.decodeOrEmpty_(this.toString())
};
goog.Uri.QueryData.prototype.invalidateCache_ = function() {
this.encodedQuery_ = null
};
goog.Uri.QueryData.prototype.filterKeys = function(a) {
this.ensureKeyMapInitialized_();
goog.structs.forEach(this.keyMap_, function(b, c) {
goog.array.contains(a, c) || this.remove(c)
}, this);
return this
};
goog.Uri.QueryData.prototype.clone = function() {
var a = new goog.Uri.QueryData;
a.encodedQuery_ = this.encodedQuery_;
this.keyMap_ && (a.keyMap_ = this.keyMap_.clone());
return a
};
goog.Uri.QueryData.prototype.getKeyName_ = function(a) {
a = String(a);
this.ignoreCase_ && (a = a.toLowerCase());
return a
};
goog.Uri.QueryData.prototype.setIgnoreCase = function(a) {
a && !this.ignoreCase_ && (this.ensureKeyMapInitialized_(), this.invalidateCache_(), goog.structs.forEach(this.keyMap_, function(a, c) {
var d = c.toLowerCase();
c != d && (this.remove(c), this.setValues(d, a))
}, this));
this.ignoreCase_ = a
};
goog.Uri.QueryData.prototype.extend = function(a) {
for(var b = 0;b < arguments.length;b++) {
goog.structs.forEach(arguments[b], function(a, b) {
this.add(b, a)
}, this)
}
};
var fetch = {util:{}};
fetch.util.clj__GT_js = function clj__GT_js(b) {
return cljs.core.string_QMARK_.call(null, b) ? b : cljs.core.keyword_QMARK_.call(null, b) ? cljs.core.name.call(null, b) : cljs.core.map_QMARK_.call(null, b) ? cljs.core.reduce.call(null, function(b, d) {
var e = cljs.core.nth.call(null, d, 0, null), f = cljs.core.nth.call(null, d, 1, null);
return cljs.core.assoc.call(null, b, clj__GT_js.call(null, e), clj__GT_js.call(null, f))
}, cljs.core.ObjMap.EMPTY, b).strobj : cljs.core.coll_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.array, cljs.core.map.call(null, clj__GT_js, b)) : b
};
fetch.core = {};
fetch.core.__GT_method = function(a) {
return clojure.string.upper_case.call(null, cljs.core.name.call(null, a))
};
fetch.core.parse_route = function(a) {
if(cljs.core.string_QMARK_.call(null, a)) {
return cljs.core.PersistentVector.fromArray(["GET", a], !0)
}
if(cljs.core.vector_QMARK_.call(null, a)) {
var b = cljs.core.nth.call(null, a, 0, null), a = cljs.core.nth.call(null, a, 1, null);
return cljs.core.PersistentVector.fromArray([fetch.core.__GT_method.call(null, b), a], !0)
}
return cljs.core.PersistentVector.fromArray(["GET", a], !0)
};
fetch.core.__GT_data = function(a) {
a = fetch.util.clj__GT_js.call(null, a);
a = goog.Uri.QueryData.createFromMap(new goog.structs.Map(a));
return"" + cljs.core.str(a)
};
fetch.core.__GT_callback = function(a) {
return cljs.core.truth_(a) ? function(b) {
b = b.getResponseText();
return a.call(null, b)
} : null
};
fetch.core.xhr = function() {
var a = function(a, b, e, f) {
var f = cljs.core.nth.call(null, f, 0, null), g = new goog.net.XhrIo, h = fetch.core.parse_route.call(null, a), a = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null), b = fetch.core.__GT_data.call(null, b), i = fetch.core.__GT_callback.call(null, e);
cljs.core.truth_(i) && goog.events.listen(g, goog.net.EventType.COMPLETE, function() {
return i.call(null, g)
});
return g.send(h, a, b, cljs.core.truth_(f) ? fetch.util.clj__GT_js.call(null, f) : null)
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
fetch.remotes = {};
fetch.remotes.remote_uri = "/_fetch";
fetch.remotes.remote_callback = function(a, b, c) {
return fetch.core.xhr.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'post", fetch.remotes.remote_uri], !0), cljs.core.ObjMap.fromObject(["\ufdd0'remote", "\ufdd0'params"], {"\ufdd0'remote":a, "\ufdd0'params":cljs.core.pr_str.call(null, b)}), cljs.core.truth_(c) ? function(a) {
a = cljs.core._EQ_.call(null, a, "") ? "nil" : a;
return c.call(null, cljs.reader.read_string.call(null, a))
} : null)
};
lt.objs.metrics = {};
lt.objs.metrics.server_url = "http://app.kodowa.com";
fetch.remotes.remote_uri = [cljs.core.str(lt.objs.metrics.server_url), cljs.core.str("/_fetch")].join("");
lt.objs.metrics.active_QMARK_ = !0;
lt.objs.metrics.used_QMARK_ = !1;
lt.objs.metrics._metrics = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
lt.objs.metrics.metric_rate = 3E4;
lt.objs.metrics.used_BANG_ = function() {
return lt.objs.metrics.used_QMARK_ = !0
};
lt.objs.metrics.capture_BANG_ = function() {
var a = function(a, b) {
var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.ObjMap.fromObject(["\ufdd0'ev", "\ufdd0'ts"], {"\ufdd0'ev":a, "\ufdd0'ts":lt.util.js.now.call(null)}), e = cljs.core.truth_(e) ? cljs.core.assoc.call(null, f, "\ufdd0'ex", e) : f;
return cljs.core.swap_BANG_.call(null, lt.objs.metrics._metrics, cljs.core.conj, e)
}, b = function(b, d) {
var e = null;
goog.isDef(d) && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
return a.call(this, b, e)
};
b.cljs$lang$maxFixedArity = 1;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), b = cljs.core.rest(b);
return a(d, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.metrics.send = function(a) {
return fetch.remotes.remote_callback.call(null, "metrics!", cljs.core.PersistentVector.fromArray([a, lt.objs.settings.fetch.call(null, "\ufdd0'uid")], !0), null)
};
lt.objs.metrics.flush = function() {
if(cljs.core.truth_(lt.objs.metrics.active_QMARK_)) {
var a = cljs.core.seq.call(null, cljs.core.deref.call(null, lt.objs.metrics._metrics));
if(a) {
return cljs.core.reset_BANG_.call(null, lt.objs.metrics._metrics, cljs.core.PersistentVector.EMPTY), lt.objs.metrics.send.call(null, a)
}
}
return null
};
lt.objs.metrics.init = function() {
cljs.core.truth_(lt.objs.settings.fetch.call(null, "\ufdd0'no-metrics")) && (lt.objs.metrics.active_QMARK_ = !1);
fetch.remotes.remote_callback.call(null, "session", cljs.core.PersistentVector.EMPTY, function(a) {
cljs.core.truth_(lt.objs.settings.fetch.call(null, "\ufdd0'uid")) || lt.objs.settings.store_BANG_.call(null, "\ufdd0'uid", a);
lt.objs.metrics.capture_BANG_.call(null, "\ufdd0'session-created");
return lt.util.js.every.call(null, lt.objs.metrics.metric_rate, lt.objs.metrics.flush)
});
return lt.util.js.every.call(null, 6E4, function() {
return cljs.core.truth_(lt.objs.metrics.used_QMARK_) ? (lt.objs.metrics.used_QMARK_ = !1, lt.objs.metrics.capture_BANG_.call(null, "\ufdd0'metrics.minute")) : null
})
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.metrics/init-metrics", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function() {
return lt.objs.metrics.init.call(null)
});
lt.object.add_behavior_BANG_.call(null, lt.objs.app.app, "\ufdd0'lt.objs.metrics/init-metrics");
lt.objs.keyboard = {};
lt.objs.keyboard.capturing_QMARK_ = !0;
lt.objs.keyboard.keys = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.objs.keyboard.map_key = function() {
var a = function(a, b, e, f) {
cljs.core.vector_QMARK_.call(null, e) ? cljs.core.swap_BANG_.call(null, lt.objs.keyboard.keys, cljs.core.update_in, cljs.core.PersistentVector.fromArray([a], !0), cljs.core.assoc, b, cljs.core.conj.call(null, e, f)) : cljs.core.swap_BANG_.call(null, lt.objs.keyboard.keys, cljs.core.update_in, cljs.core.PersistentVector.fromArray([a], !0), cljs.core.assoc, b, cljs.core.PersistentVector.fromArray([a, e, f], !0));
return lt.objs.keyboard.refresh.call(null)
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.keyboard.key__GT_cmd = function() {
var a = function(a, b, e, f) {
return cljs.core.apply.call(null, lt.objs.keyboard.map_key, a, b, cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), e, f)
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.keyboard.stored_map_key = function() {
var a = function(a, b, e, f) {
var g = lt.objs.settings.fetch.call(null, "\ufdd0'keys");
lt.objs.settings.store_BANG_.call(null, "\ufdd0'keys", cljs.core.assoc_in.call(null, g, cljs.core.PersistentVector.fromArray([a, b], !0), cljs.core.conj.call(null, f, e)));
return cljs.core.apply.call(null, lt.objs.keyboard.map_key, a, b, cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), e, f)
}, b = function(b, d, e, f) {
var g = null;
goog.isDef(f) && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
return a.call(this, b, d, e, g)
};
b.cljs$lang$maxFixedArity = 3;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), f = cljs.core.first(cljs.core.next(cljs.core.next(b))), b = cljs.core.rest(cljs.core.next(cljs.core.next(b)));
return a(d, e, f, b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.keyboard.stored_unmap_key = function(a, b) {
return lt.objs.keyboard.stored_map_key.call(null, a, b, "\ufdd0'passthrough")
};
lt.objs.keyboard.unmap_key = function(a, b) {
cljs.core.swap_BANG_.call(null, lt.objs.keyboard.keys, cljs.core.update_in, cljs.core.PersistentVector.fromArray([a], !0), cljs.core.dissoc, b);
return lt.objs.keyboard.refresh.call(null)
};
lt.objs.keyboard.key_map = cljs.core.atom.call(null, cljs.core.ObjMap.EMPTY);
lt.objs.keyboard.activity = function() {
return lt.objs.metrics.used_BANG_.call(null)
};
lt.objs.keyboard.merge_keys = function(a, b, c, d) {
a = cljs.core.into.call(null, cljs.core.sorted_set.call(null), d);
b = cljs.core.deref.call(null, lt.objs.keyboard.keys);
a = cljs.core.apply.call(null, cljs.core.merge, cljs.core.ObjMap.EMPTY, cljs.core.map.call(null, b, a));
return cljs.core.reset_BANG_.call(null, lt.objs.keyboard.key_map, a)
};
lt.objs.keyboard.refresh = function() {
return lt.objs.keyboard.merge_keys.call(null, null, null, null, lt.objs.context.current.call(null))
};
cljs.core.add_watch.call(null, lt.objs.context.contexts, "\ufdd0'commands2", lt.objs.keyboard.merge_keys);
lt.objs.keyboard.refresh.call(null);
lt.objs.keyboard.keycodes = function(a) {
return CodeMirror.keyNames[a]
};
lt.objs.keyboard.__GT_c = function() {
var a = function(a) {
return cljs.core.keyword.call(null, clojure.string.join.call(null, ".", cljs.core.map.call(null, cljs.core.name, a)))
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.keyboard.altgr = !1;
lt.objs.keyboard.__GT_keystr = function(a) {
return[cljs.core.str(cljs.core.truth_(a.altKey) ? "Alt-" : null), cljs.core.str(cljs.core.truth_(function() {
var b = a.altGraphKey;
return cljs.core.truth_(b) ? b : lt.objs.keyboard.altgr
}()) ? "AltGr-" : null), cljs.core.str(cljs.core.truth_(a.ctrlKey) ? "Ctrl-" : null), cljs.core.str(cljs.core.truth_(a.metaKey) ? "Cmd-" : null), cljs.core.str(cljs.core.truth_(a.shiftKey) ? "Shift-" : null), cljs.core.str(lt.objs.keyboard.keycodes.call(null, a.keyCode))].join("")
};
lt.objs.keyboard._STAR_capture_STAR_ = !0;
lt.objs.keyboard.passthrough = function() {
return lt.objs.keyboard._STAR_capture_STAR_ = !1
};
lt.objs.keyboard.disable = function() {
return lt.objs.keyboard.capturing_QMARK_ = !1
};
lt.objs.keyboard.enable = function() {
return lt.objs.keyboard.capturing_QMARK_ = !0
};
lt.objs.keyboard.all_mappings = function(a) {
return cljs.core.reduce.call(null, function(b, c) {
var d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null);
return cljs.core.not.call(null, e.call(null, a)) ? b : cljs.core.conj.call(null, b, cljs.core.PersistentVector.fromArray([d, e.call(null, a)], !0))
}, cljs.core.PersistentVector.EMPTY, cljs.core.deref.call(null, lt.objs.keyboard.keys))
};
lt.objs.keyboard.capture = function(a) {
lt.objs.keyboard.activity.call(null);
var b = lt.objs.keyboard._STAR_capture_STAR_;
try {
lt.objs.keyboard._STAR_capture_STAR_ = !0;
if(cljs.core.truth_(lt.objs.keyboard.altgr)) {
return null
}
var c = lt.objs.keyboard.__GT_keystr.call(null, a), d = cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, c);
if(cljs.core.truth_(d)) {
var e = cljs.core.nth.call(null, d, 0, null), f = cljs.core.nth.call(null, d, 1, null), g = cljs.core.nth.call(null, d, 2, null);
return lt.objs.keyboard.trigger.call(null, e, f, g)
}
return null
}finally {
lt.objs.keyboard._STAR_capture_STAR_ = b
}
};
lt.objs.keyboard.capture_char = function(a) {
var b = lt.objs.keyboard._STAR_capture_STAR_;
try {
lt.objs.keyboard._STAR_capture_STAR_ = !0;
var c = cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, String.fromCharCode(a.charCode));
if(cljs.core.truth_(c)) {
var d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null), f = cljs.core.nth.call(null, c, 2, null);
return lt.objs.keyboard.trigger.call(null, d, e, f)
}
return null
}finally {
lt.objs.keyboard._STAR_capture_STAR_ = b
}
};
lt.objs.keyboard.capture_up = function(a) {
a = lt.objs.keyboard.__GT_keystr.call(null, a);
return cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, a)
};
lt.objs.keyboard.trigger = function(a, b, c) {
lt.objs.keyboard.activity.call(null);
a = cljs.core.deref.call(null, lt.objs.context.ctx__GT_obj).call(null, a);
return cljs.core.truth_(a) ? (cljs.core.apply.call(null, lt.object.raise, a, b, c), lt.objs.keyboard._STAR_capture_STAR_) : null
};
lt.util.events.capture.call(null, "\ufdd0'keydown", function(a) {
cljs.core.truth_(function() {
var b = a.altGraphKey;
return cljs.core.truth_(b) ? b : cljs.core._EQ_.call(null, a.keyCode, 0)
}()) && (lt.objs.keyboard.altgr = !0);
return cljs.core.truth_(function() {
var b = lt.objs.keyboard.capturing_QMARK_;
return cljs.core.truth_(b) ? lt.objs.keyboard.capture.call(null, a) : b
}()) ? (a.preventDefault(), a.stopPropagation()) : null
});
lt.util.events.capture.call(null, "\ufdd0'keypress", function(a) {
return cljs.core.truth_(function() {
var b = lt.objs.keyboard.capturing_QMARK_;
return cljs.core.truth_(b) ? lt.objs.keyboard.capture_char.call(null, a) : b
}()) ? (a.preventDefault(), a.stopPropagation()) : null
});
lt.util.events.capture.call(null, "\ufdd0'keyup", function(a) {
cljs.core.truth_(function() {
var b = a.altGraphKey;
return cljs.core.truth_(b) ? b : cljs.core._EQ_.call(null, a.keyCode, 0)
}()) && (lt.objs.keyboard.altgr = !1);
return cljs.core.truth_(function() {
var b = lt.objs.keyboard.capturing_QMARK_;
return cljs.core.truth_(b) ? lt.objs.keyboard.capture_up.call(null, a) : b
}()) ? (a.preventDefault(), a.stopPropagation()) : null
});
lt.objs.keyboard.load_keys = function() {
for(var a = lt.objs.settings.fetch.call(null, "\ufdd0'keys"), a = cljs.core.seq.call(null, a);;) {
if(a) {
for(var b = cljs.core.first.call(null, a), c = cljs.core.nth.call(null, b, 0, null), b = cljs.core.nth.call(null, b, 1, null), b = cljs.core.seq.call(null, b);;) {
if(b) {
var d = cljs.core.first.call(null, b), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
cljs.core.coll_QMARK_.call(null, d) ? cljs.core.apply.call(null, lt.objs.keyboard.map_key, c, e, cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), d) : lt.objs.keyboard.map_key.call(null, c, e, cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), d);
b = cljs.core.next.call(null, b)
}else {
break
}
}
a = cljs.core.next.call(null, a)
}else {
return null
}
}
};
lt.objs.keyboard.platform_meta = function(a) {
return[cljs.core.str(cljs.core.truth_(lt.objs.platform.mac_QMARK_.call(null)) ? "Cmd-" : "Ctrl-"), cljs.core.str(a)].join("")
};
lt.objs.keyboard.meta = cljs.core.truth_(lt.objs.platform.mac_QMARK_.call(null)) ? "Cmd" : "Ctrl";
lt.objs.keyboard.shift = "Shift";
lt.objs.keyboard.__GT_key = function() {
var a = function(a) {
return clojure.string.join.call(null, "-", a)
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.keyboard/load-keys-on-init", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'init"]), "\ufdd0'reaction", function() {
return lt.objs.keyboard.load_keys.call(null)
});
lt.object.tag_behaviors.call(null, "\ufdd0'app", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.keyboard/load-keys-on-init"], !0));
lt.objs.keyboard.map_key.call(null, "\ufdd0'editor", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "Enter"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'eval-editor-form");
lt.objs.keyboard.map_key.call(null, "\ufdd0'editor", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, lt.objs.keyboard.shift, "Enter"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'eval-editor");
lt.objs.keyboard.map_key.call(null, "\ufdd0'editor", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "S"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'save");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'editor", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, lt.objs.keyboard.shift, "S"), "\ufdd0'save-as");
lt.objs.keyboard.map_key.call(null, "\ufdd0'editor", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "L"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'goto-line");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'global", "Cmd-R", "\ufdd0'refresh-connected-browser");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'global", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, lt.objs.keyboard.shift, "N"), "\ufdd0'open-new-window");
lt.objs.keyboard.map_key.call(null, "\ufdd0'global", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "O"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'navigate-workspace-transient");
lt.objs.keyboard.map_key.call(null, "\ufdd0'global", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "N"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'new-file");
lt.objs.keyboard.map_key.call(null, "\ufdd0'global", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, lt.objs.keyboard.shift, "O"), cljs.core.PersistentVector.fromArray(["\ufdd0'commandbar", "\ufdd0'exec!"], !0), "\ufdd0'open-file");
lt.objs.keyboard.map_key.call(null, "\ufdd0'popup", "Esc", "\ufdd0'click");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "W"), "\ufdd0'tabs.close");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, lt.objs.keyboard.shift, "["), "\ufdd0'tabs.prev");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, lt.objs.keyboard.shift, "]"), "\ufdd0'tabs.next");
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "1"), "\ufdd0'tabs.goto", 0);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "2"), "\ufdd0'tabs.goto", 1);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "3"), "\ufdd0'tabs.goto", 2);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "4"), "\ufdd0'tabs.goto", 3);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "5"), "\ufdd0'tabs.goto", 4);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "6"), "\ufdd0'tabs.goto", 5);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "7"), "\ufdd0'tabs.goto", 6);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "8"), "\ufdd0'tabs.goto", 7);
lt.objs.keyboard.key__GT_cmd.call(null, "\ufdd0'tabs", lt.objs.keyboard.__GT_key.call(null, lt.objs.keyboard.meta, "9"), "\ufdd0'tabs.goto", 8);
lt.objs.keyboard.map_key.call(null, "\ufdd0'tree.rename", "Esc", "\ufdd0'rename.cancel!");
lt.objs.keyboard.map_key.call(null, "\ufdd0'tree.rename", "Enter", "\ufdd0'rename.submit!");
lt.objs.sidebar.command = {};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/op-select!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'select!"]), "\ufdd0'reaction", function(a) {
var b = lt.object.__GT_content.call(null, a);
lt.object.raise.call(null, a, "\ufdd0'select", lt.util.dom.val.call(null, b));
return lt.object.raise.call(null, a, "\ufdd0'selected")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/op-clear!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'clear!"]), "\ufdd0'reaction", function(a) {
var b = lt.object.__GT_content.call(null, a);
lt.util.dom.val.call(null, b, "");
return lt.object.raise.call(null, a, "\ufdd0'change!", "")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/op-focus!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'focus!"]), "\ufdd0'reaction", function(a) {
a = lt.object.__GT_content.call(null, a);
lt.util.dom.focus.call(null, a);
return a.select()
});
lt.objs.sidebar.command.__GT_value = function(a) {
a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
a = cljs.core._lookup.call(null, a, "\ufdd0'value", null);
return cljs.core.not.call(null, a) ? "" : a
};
lt.objs.sidebar.command.input__GT_value = function(a) {
return lt.util.dom.val.call(null, lt.object.__GT_content.call(null, a))
};
lt.objs.sidebar.command.op_input = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'input.option", cljs.core.ObjMap.fromObject(["\ufdd0'type", "\ufdd0'placeholder", "\ufdd0'value"], {"\ufdd0'type":"text", "\ufdd0'placeholder":crate.binding.bound.call(null, a, "\ufdd0'placeholder"), "\ufdd0'value":crate.binding.bound.call(null, a, lt.objs.sidebar.command.__GT_value)})], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'focus", function() {
lt.objs.context.in_BANG_.call(null, "\ufdd0'options-input", a);
return lt.object.raise.call(null, a, "\ufdd0'active")
}, "\ufdd0'blur", function() {
lt.objs.context.out_BANG_.call(null, "\ufdd0'options-input", a);
return lt.object.raise.call(null, a, "\ufdd0'inactive")
}, "\ufdd0'keyup", function() {
return lt.object.raise.call(null, a, "\ufdd0'change!", lt.util.dom.val.call(null, this))
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/options-input", "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'options-input"]), "\ufdd0'placeholder", "search", "\ufdd0'init", function(a, b) {
lt.object.merge_BANG_.call(null, a, b);
return lt.objs.sidebar.command.op_input.call(null, a)
});
lt.object.tag_behaviors.call(null, "\ufdd0'options-input", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.sidebar.command/op-focus!", "\ufdd0'lt.objs.sidebar.command/op-clear!", "\ufdd0'lt.objs.sidebar.command/options-escape!", "\ufdd0'lt.objs.sidebar.command/op-select!"], !0));
lt.objs.sidebar.command.options_input = function(a) {
a = lt.object.create.call(null, "\ufdd0'lt.objs.sidebar.command/options-input", a);
lt.object.raise.call(null, a, "\ufdd0'refresh!");
return a
};
lt.objs.sidebar.command.input_val = function(a) {
return lt.util.dom.val.call(null, lt.util.dom.$.call(null, "\ufdd0'input", lt.object.__GT_content.call(null, a)))
};
lt.objs.sidebar.command.set_val = function(a, b) {
return lt.util.dom.val.call(null, lt.util.dom.$.call(null, "\ufdd0'input", lt.object.__GT_content.call(null, a)), b)
};
lt.objs.sidebar.command.set_and_select = function(a, b) {
lt.objs.sidebar.command.set_val.call(null, a, b);
return lt.object.raise.call(null, a, "\ufdd0'change!", b)
};
lt.objs.sidebar.command.current_selected = function(a) {
var b = lt.objs.sidebar.command.indexed_results.call(null, cljs.core.deref.call(null, a)), c = cljs.core.count.call(null, b), d = (new cljs.core.Keyword("\ufdd0'selected")).call(null, cljs.core.deref.call(null, a)), a = cljs.core.mod.call(null, d, c > (new cljs.core.Keyword("\ufdd0'size")).call(null, cljs.core.deref.call(null, a)) ? (new cljs.core.Keyword("\ufdd0'size")).call(null, cljs.core.deref.call(null, a)) : c);
return 0 < c ? b[a][0] : null
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/move-selection", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'move-selection"]), "\ufdd0'reaction", function(a, b) {
lt.object.update_BANG_.call(null, a, cljs.core.PersistentVector.fromArray(["\ufdd0'selected"], !0), cljs.core._PLUS_, b);
return lt.object.raise.call(null, a, "\ufdd0'refresh!")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/set-selection!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'set-selection!"]), "\ufdd0'reaction", function(a, b) {
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'selected"], {"\ufdd0'selected":b}));
return lt.object.raise.call(null, a, "\ufdd0'refresh!")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/change!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'change!"]), "\ufdd0'reaction", function(a, b) {
if(cljs.core._EQ_.call(null, (new cljs.core.Keyword("\ufdd0'search")).call(null, cljs.core.deref.call(null, a)), b)) {
return null
}
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'selected", "\ufdd0'search"], {"\ufdd0'selected":0, "\ufdd0'search":b}));
return lt.object.raise.call(null, a, "\ufdd0'refresh!")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/escape!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'escape!"]), "\ufdd0'reaction", function(a) {
lt.object.raise.call(null, a, "\ufdd0'inactive");
lt.objs.sidebar.command.exec_BANG_.call(null, "\ufdd0'close-sidebar");
return lt.objs.sidebar.command.exec_BANG_.call(null, "\ufdd0'focus-last-editor")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/options-escape!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'escape!"]), "\ufdd0'reaction", function() {
return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'cancel!")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/set-on-select", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'select"]), "\ufdd0'reaction", function(a, b) {
return cljs.core.truth_((new cljs.core.Keyword("\ufdd0'set-on-select")).call(null, cljs.core.deref.call(null, a))) ? lt.objs.sidebar.command.set_val.call(null, a, (new cljs.core.Keyword("\ufdd0'key")).call(null, cljs.core.deref.call(null, a)).call(null, b)) : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/select!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'select!"]), "\ufdd0'reaction", function(a, b) {
var c = lt.objs.sidebar.command.indexed_results.call(null, cljs.core.deref.call(null, a)), d = cljs.core.count.call(null, c), e;
e = cljs.core.truth_(b) ? b : (new cljs.core.Keyword("\ufdd0'selected")).call(null, cljs.core.deref.call(null, a));
e = cljs.core.mod.call(null, e, d > (new cljs.core.Keyword("\ufdd0'size")).call(null, cljs.core.deref.call(null, a)) ? (new cljs.core.Keyword("\ufdd0'size")).call(null, cljs.core.deref.call(null, a)) : d);
return 0 < d ? (lt.object.raise.call(null, a, "\ufdd0'select", c[e][0]), lt.object.raise.call(null, a, "\ufdd0'selected")) : lt.object.raise.call(null, a, "\ufdd0'select-unknown", lt.objs.sidebar.command.input_val.call(null, a))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/filter-active", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'active"]), "\ufdd0'reaction", function(a) {
return lt.objs.context.in_BANG_.call(null, "\ufdd0'filter-list.input", a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/filter-inactive", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'inactive"]), "\ufdd0'reaction", function() {
return lt.objs.context.out_BANG_.call(null, "\ufdd0'filter-list.input")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/clear!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'clear!"]), "\ufdd0'reaction", function(a) {
var b = lt.util.dom.$.call(null, "\ufdd0'input", lt.object.__GT_content.call(null, a));
lt.util.dom.val.call(null, b, "");
return lt.object.raise.call(null, a, "\ufdd0'change!", "")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/focus!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'focus!"]), "\ufdd0'reaction", function(a) {
a = lt.util.dom.$.call(null, "\ufdd0'input", lt.object.__GT_content.call(null, a));
lt.util.dom.focus.call(null, a);
return a.select()
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/update-lis", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'refresh!"]), "\ufdd0'reaction", function(a) {
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'cur"], {"\ufdd0'cur":lt.objs.sidebar.command.indexed_results.call(null, cljs.core.deref.call(null, a))}));
return lt.objs.sidebar.command.fill_lis.call(null, cljs.core.deref.call(null, a), (new cljs.core.Keyword("\ufdd0'cur")).call(null, cljs.core.deref.call(null, a)))
});
lt.objs.sidebar.command.input = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'input.search", cljs.core.ObjMap.fromObject(["\ufdd0'type", "\ufdd0'placeholder"], {"\ufdd0'type":"text", "\ufdd0'placeholder":crate.binding.bound.call(null, a, "\ufdd0'placeholder")})], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'focus", function() {
return lt.object.raise.call(null, a, "\ufdd0'active")
}, "\ufdd0'blur", function() {
return lt.object.raise.call(null, a, "\ufdd0'inactive")
}, "\ufdd0'keyup", function() {
return lt.object.raise.call(null, a, "\ufdd0'change!", lt.util.dom.val.call(null, this))
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.objs.sidebar.command.__GT_items = function(a) {
var b;
a ? (b = (b = a.cljs$lang$protocol_mask$partition0$ & 32768) ? b : a.cljs$core$IDeref$, b = b ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.type_satisfies_.call(null, cljs.core.IDeref, a)) : b = cljs.core.type_satisfies_.call(null, cljs.core.IDeref, a);
return b ? cljs.core.deref.call(null, a) : cljs.core.fn_QMARK_.call(null, a) ? a.call(null) : a
};
lt.objs.sidebar.command.score_sort = function(a, b) {
return b[3] - a[3]
};
lt.objs.sidebar.command.score_sort2 = function(a, b) {
return b[4].score - a[4].score
};
lt.objs.sidebar.command.indexed_results = function(a) {
var a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, b = cljs.core._lookup.call(null, a, "\ufdd0'key", null), c = cljs.core._lookup.call(null, a, "\ufdd0'items", null);
cljs.core._lookup.call(null, a, "\ufdd0'size", null);
var d = cljs.core._lookup.call(null, a, "\ufdd0'search", null), a = cljs.core.apply.call(null, cljs.core.array, lt.objs.sidebar.command.__GT_items.call(null, c)), c = function(a) {
return[a, b.call(null, a), fastScore(b.call(null, a), d), null, null]
}, e = function(a) {
a[3] = a[1].score(d);
return a
}, f = function(a) {
a[4] = score(a[1], d);
return a
}, g = function(a) {
return 0 < a[4].score
};
return cljs.core.empty_QMARK_.call(null, d) ? a.map(function(a) {
return[a, b.call(null, a), null, null]
}).sort(function(a, b) {
return cljs.core.second.call(null, a).localeCompare(cljs.core.second.call(null, b))
}) : a.map(c).filter(function(a) {
return a[2]
}).map(e).sort(lt.objs.sidebar.command.score_sort).slice(0, 50).map(f).filter(g).sort(lt.objs.sidebar.command.score_sort2)
};
lt.objs.sidebar.command.item = function(a, b) {
for(var c = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'li", cljs.core.ObjMap.fromObject(["\ufdd0'index"], {"\ufdd0'index":b})], !0)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'click", function() {
lt.object.raise.call(null, a, "\ufdd0'set-selection!", b);
return lt.object.raise.call(null, a, "\ufdd0'select!", b)
}], !0)));;) {
if(d) {
var e = cljs.core.first.call(null, d), f = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null);
lt.util.dom.on.call(null, c, f, e);
d = cljs.core.next.call(null, d)
}else {
break
}
}
return c
};
lt.objs.sidebar.command.fill_lis = function(a, b) {
var c = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
cljs.core._lookup.call(null, c, "\ufdd0'key", null);
for(var d = cljs.core._lookup.call(null, c, "\ufdd0'selected", null), e = cljs.core._lookup.call(null, c, "\ufdd0'search", null), f = cljs.core._lookup.call(null, c, "\ufdd0'size", null), c = cljs.core._lookup.call(null, c, "\ufdd0'lis", null), g = cljs.core.count.call(null, b), d = cljs.core.mod.call(null, d, g > f ? f : g), f = cljs.core.seq.call(null, cljs.core.map.call(null, cljs.core.vector, cljs.core.range.call(null), c, b));;) {
if(f) {
var h = cljs.core.first.call(null, f), i = cljs.core.nth.call(null, h, 0, null), j = cljs.core.nth.call(null, h, 1, null), h = cljs.core.nth.call(null, h, 2, null);
lt.util.dom.html.call(null, j, !cljs.core.empty_QMARK_.call(null, e) ? wrapMatch(h[1], h[4]) : h[1]);
lt.util.dom.css.call(null, j, cljs.core.ObjMap.fromObject(["\ufdd0'display"], {"\ufdd0'display":"block"}));
cljs.core._EQ_.call(null, i, d) ? lt.util.dom.add_class.call(null, j, "\ufdd0'selected") : lt.util.dom.remove_class.call(null, j, "\ufdd0'selected");
f = cljs.core.next.call(null, f)
}else {
break
}
}
for(e = cljs.core.seq.call(null, cljs.core.drop.call(null, g, c));;) {
if(e) {
c = cljs.core.first.call(null, e), lt.util.dom.css.call(null, c, cljs.core.ObjMap.fromObject(["\ufdd0'display"], {"\ufdd0'display":"none"})), e = cljs.core.next.call(null, e)
}else {
return null
}
}
};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/filter-list", "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'filter-list"]), "\ufdd0'selected", 0, "\ufdd0'placeholder", "search", "\ufdd0'items", cljs.core.PersistentVector.EMPTY, "\ufdd0'search", "", "\ufdd0'init", function(a, b) {
var c = cljs.core.merge.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'size"], {"\ufdd0'size":100}), b), d;
d = function f(b) {
return new cljs.core.LazySeq(null, !1, function() {
for(;;) {
if(cljs.core.seq.call(null, b)) {
var c = cljs.core.first.call(null, b);
return cljs.core.cons.call(null, lt.objs.sidebar.command.item.call(null, a, c), f.call(null, cljs.core.rest.call(null, b)))
}
return null
}
}, null)
}.call(null, cljs.core.range.call(null, (new cljs.core.Keyword("\ufdd0'size")).call(null, c)));
lt.object.merge_BANG_.call(null, a, cljs.core.merge.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'lis"], {"\ufdd0'lis":d}), c));
return cljs.core.PersistentVector.fromArray(["\ufdd0'div.filter-list", lt.objs.sidebar.command.input.call(null, a), cljs.core.PersistentVector.fromArray(["\ufdd0'ul", d], !0)], !0)
});
lt.object.tag_behaviors.call(null, "\ufdd0'filter-list", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.sidebar.command/move-selection \ufdd0'lt.objs.sidebar.command/clear! \ufdd0'lt.objs.sidebar.command/change! \ufdd0'lt.objs.sidebar.command/focus! \ufdd0'lt.objs.sidebar.command/update-lis \ufdd0'lt.objs.sidebar.command/select! \ufdd0'lt.objs.sidebar.command/set-on-select \ufdd0'lt.objs.sidebar.command/set-selection! \ufdd0'lt.objs.sidebar.command/filter-active \ufdd0'lt.objs.sidebar.command/filter-inactive".split(" "),
!0));
lt.objs.sidebar.command.filter_list = function(a) {
a = lt.object.create.call(null, "\ufdd0'lt.objs.sidebar.command/filter-list", a);
lt.object.raise.call(null, a, "\ufdd0'refresh!");
return a
};
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/select-command", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'select"]), "\ufdd0'reaction", function(a, b) {
var c = lt.objs.sidebar.command.by_id.call(null, b);
if(cljs.core.truth_(c)) {
if(cljs.core.truth_((new cljs.core.Keyword("\ufdd0'options")).call(null, c))) {
return lt.object.merge_BANG_.call(null, lt.objs.sidebar.command.sidebar_command, cljs.core.ObjMap.fromObject(["\ufdd0'active"], {"\ufdd0'active":c})), lt.object.raise.call(null, (new cljs.core.Keyword("\ufdd0'options")).call(null, c), "\ufdd0'focus!")
}
lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'exec!", c);
lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'selected-exec", c);
return lt.object.merge_BANG_.call(null, lt.objs.sidebar.command.sidebar_command, cljs.core.ObjMap.fromObject(["\ufdd0'active"], {"\ufdd0'active":null}))
}
return null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/select-hidden", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'select-unknown"]), "\ufdd0'reaction", function(a, b) {
var c = lt.objs.sidebar.command.by_id.call(null, cljs.core.keyword.call(null, b));
return cljs.core.truth_(c) ? lt.object.raise.call(null, a, "\ufdd0'select", c) : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/post-select-pop", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'selected-exec"]), "\ufdd0'reaction", function() {
return cljs.core.truth_(lt.objs.sidebar.pop_BANG_.call(null)) ? lt.objs.sidebar.command.exec_BANG_.call(null, "\ufdd0'focus-last-editor") : null
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/exec-command", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'exec!"]), "\ufdd0'reaction", function() {
var a = function(a, b, e) {
var f = lt.objs.sidebar.command.by_id.call(null, b);
if(cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'options")).call(null, f)) || cljs.core.truth_(function() {
var a = (new cljs.core.Keyword("\ufdd0'options")).call(null, f);
return cljs.core.truth_(a) ? cljs.core.seq.call(null, e) : a
}())) {
return cljs.core.apply.call(null, lt.objs.sidebar.command.exec_BANG_, f, e)
}
lt.objs.sidebar.command.exec_BANG_.call(null, "\ufdd0'show-commandbar-transient");
return lt.object.raise.call(null, (new cljs.core.Keyword("\ufdd0'selector")).call(null, cljs.core.deref.call(null, a)), "\ufdd0'select", f)
}, b = function(b, d, e) {
var f = null;
goog.isDef(e) && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
return a.call(this, b, d, f)
};
b.cljs$lang$maxFixedArity = 2;
b.cljs$lang$applyTo = function(b) {
var d = cljs.core.first(b), e = cljs.core.first(cljs.core.next(b)), b = cljs.core.rest(cljs.core.next(b));
return a(d, e, b)
};
b.cljs$lang$arity$variadic = a;
return b
}());
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/exec-active!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'exec-active!"]), "\ufdd0'reaction", function(a, b) {
var c = (new cljs.core.Keyword("\ufdd0'active")).call(null, cljs.core.deref.call(null, a));
cljs.core.apply.call(null, (new cljs.core.Keyword("\ufdd0'exec")).call(null, c), b);
lt.object.raise.call(null, a, "\ufdd0'selected-exec", c);
return lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'active"], {"\ufdd0'active":null}))
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/focus!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'focus!"]), "\ufdd0'reaction", function(a) {
return cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'active")).call(null, cljs.core.deref.call(null, a))) ? (a = lt.util.dom.$.call(null, "\ufdd0'.search", lt.object.__GT_content.call(null, a)), lt.util.dom.focus.call(null, a), a.select()) : lt.object.raise.call(null, (new cljs.core.Keyword("\ufdd0'options")).call(null, (new cljs.core.Keyword("\ufdd0'active")).call(null, cljs.core.deref.call(null, a))), "\ufdd0'focus!")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/soft-focus!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'soft-focus!"]), "\ufdd0'reaction", function(a) {
a = lt.util.dom.$.call(null, "\ufdd0'.search", lt.object.__GT_content.call(null, a));
return lt.util.dom.focus.call(null, a)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/refresh!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'refresh!"]), "\ufdd0'reaction", function(a) {
return lt.object.raise.call(null, (new cljs.core.Keyword("\ufdd0'selector")).call(null, cljs.core.deref.call(null, a)), "\ufdd0'refresh!")
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/cancel!", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'cancel!"]), "\ufdd0'reaction", function(a) {
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'active"], {"\ufdd0'active":null}));
return lt.object.raise.call(null, a, "\ufdd0'focus!")
});
lt.objs.sidebar.command.header_button = function(a) {
for(var b = crate.core.html.call(null, cljs.core.PersistentVector.fromArray(["\ufdd0'h2", crate.binding.bound.call(null, a, function(a) {
return(new cljs.core.Keyword("\ufdd0'desc")).call(null, (new cljs.core.Keyword("\ufdd0'active")).call(null, a))
})], !0)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.fromArray(["\ufdd0'click", function() {
return lt.object.raise.call(null, a, "\ufdd0'cancel!")
}], !0)));;) {
if(c) {
var d = cljs.core.first.call(null, c), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
lt.util.dom.on.call(null, b, e, d);
c = cljs.core.next.call(null, c)
}else {
break
}
}
return b
};
lt.objs.sidebar.command.__GT_options = function(a, b) {
return cljs.core.truth_((new cljs.core.Keyword("\ufdd0'options")).call(null, b)) ? lt.object.__GT_content.call(null, (new cljs.core.Keyword("\ufdd0'options")).call(null, b)) : null
};
lt.objs.sidebar.command.__GT_command_class = function(a) {
return[cljs.core.str("command "), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword("\ufdd0'active")).call(null, a)) ? "options" : "selector")].join("")
};
lt.object.object_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/sidebar.command", "\ufdd0'tags", cljs.core.PersistentHashSet.fromArray(["\ufdd0'sidebar.command"]), "\ufdd0'label", "command", "\ufdd0'active", null, "\ufdd0'order", 3, "\ufdd0'init", function(a) {
var b = crate.binding.subatom.call(null, lt.objs.command.manager, "\ufdd0'commands"), b = crate.binding.computed.call(null, cljs.core.PersistentVector.fromArray([b], !0), function(a) {
return cljs.core.filter.call(null, function(a) {
return cljs.core.not.call(null, (new cljs.core.Keyword("\ufdd0'hidden")).call(null, a))
}, cljs.core.vals.call(null, a))
}), b = lt.objs.sidebar.command.filter_list.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'items", "\ufdd0'key"], {"\ufdd0'items":b, "\ufdd0'key":"\ufdd0'desc"}));
lt.object.merge_BANG_.call(null, a, cljs.core.ObjMap.fromObject(["\ufdd0'selector"], {"\ufdd0'selector":b}));
lt.object.add_tags.call(null, b, cljs.core.PersistentVector.fromArray(["\ufdd0'command.selector"], !0));
return cljs.core.PersistentVector.fromArray(["\ufdd0'div", cljs.core.ObjMap.fromObject(["\ufdd0'class"], {"\ufdd0'class":crate.binding.bound.call(null, a, lt.objs.sidebar.command.__GT_command_class)}), cljs.core.PersistentVector.fromArray(["\ufdd0'div.selector", lt.object.__GT_content.call(null, b)], !0), cljs.core.PersistentVector.fromArray(["\ufdd0'div.options", lt.objs.sidebar.command.header_button.call(null, a), cljs.core.PersistentVector.fromArray(["\ufdd0'div", crate.binding.bound.call(null,
crate.binding.subatom.call(null, a, "\ufdd0'active"), function(b) {
return lt.objs.sidebar.command.__GT_options.call(null, a, b)
})], !0)], !0)], !0)
});
lt.object.behavior_STAR_.call(null, "\ufdd0'lt.objs.sidebar.command/init-commands", "\ufdd0'triggers", cljs.core.PersistentHashSet.fromArray(["\ufdd0'post-init"]), "\ufdd0'reaction", function() {
return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'refresh!")
});
lt.object.tag_behaviors.call(null, "\ufdd0'app", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.sidebar.command/init-commands"], !0));
lt.object.tag_behaviors.call(null, "\ufdd0'sidebar.command", cljs.core.PersistentVector.fromArray("\ufdd0'lt.objs.sidebar.command/exec-command \ufdd0'lt.objs.sidebar.command/exec-active! \ufdd0'lt.objs.sidebar.command/focus! \ufdd0'lt.objs.sidebar.command/soft-focus! \ufdd0'lt.objs.sidebar.command/refresh! \ufdd0'lt.objs.sidebar.command/post-select-pop \ufdd0'lt.objs.sidebar.command/cancel!".split(" "), !0));
lt.object.tag_behaviors.call(null, "\ufdd0'command.selector", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.sidebar.command/select-command", "\ufdd0'lt.objs.sidebar.command/select-hidden", "\ufdd0'lt.objs.sidebar.command/escape!"], !0));
lt.object.tag_behaviors.call(null, "\ufdd0'command.options", cljs.core.PersistentVector.fromArray(["\ufdd0'lt.objs.sidebar.command/options-escape!"], !0));
lt.objs.sidebar.command.sidebar_command = lt.object.create.call(null, "\ufdd0'lt.objs.sidebar.command/sidebar.command");
lt.objs.context.in_BANG_.call(null, "\ufdd0'commandbar", lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.add_item.call(null, lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.command.command = lt.objs.command.command;
lt.objs.sidebar.command.show_and_focus = function(a) {
lt.object.raise.call(null, lt.objs.sidebar.sidebar, "\ufdd0'toggle", lt.objs.sidebar.command.sidebar_command, a);
return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'focus!")
};
lt.objs.sidebar.command.pre_fill = function(a) {
return lt.util.dom.val.call(null, lt.util.dom.$.call(null, "\ufdd0'.search", lt.object.__GT_content.call(null, lt.objs.sidebar.command.sidebar_command)), a)
};
lt.objs.sidebar.command.show_filled = function(a, b) {
lt.objs.sidebar.command.pre_fill.call(null, a);
lt.object.raise.call(null, lt.objs.sidebar.sidebar, "\ufdd0'toggle", lt.objs.sidebar.command.sidebar_command, cljs.core.assoc.call(null, b, "\ufdd0'soft?", !0));
return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'soft-focus!")
};
lt.objs.sidebar.command.by_id = lt.objs.command.by_id;
lt.objs.sidebar.command.exec_BANG_ = lt.objs.command.exec_BANG_;
lt.objs.sidebar.command.exec_active_BANG_ = function() {
var a = function(a) {
return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, "\ufdd0'exec-active!", a)
}, b = function(b) {
var d = null;
goog.isDef(b) && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
return a.call(this, d)
};
b.cljs$lang$maxFixedArity = 0;
b.cljs$lang$applyTo = function(b) {
b = cljs.core.seq(b);
return a(b)
};
b.cljs$lang$arity$variadic = a;
return b
}();
lt.objs.sidebar.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'desc", "\ufdd0'hidden", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'show-commandbar", "\ufdd0'desc":"Command: Show command bar", "\ufdd0'hidden":!0, "\ufdd0'exec":function() {
return lt.objs.sidebar.command.show_and_focus.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'force?"], {"\ufdd0'force?":!0}))
}}));
lt.objs.sidebar.command.command.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'command", "\ufdd0'hidden", "\ufdd0'desc", "\ufdd0'exec"], {"\ufdd0'command":"\ufdd0'show-commandbar-transient", "\ufdd0'hidden":!0, "\ufdd0'desc":"Command: Show command bar transiently", "\ufdd0'exec":function() {
return lt.objs.sidebar.command.show_and_focus.call(null, cljs.core.ObjMap.fromObject(["\ufdd0'force?", "\ufdd0'transient?"], {"\ufdd0'force?":!0, "\ufdd0'transient?":!0}))
}}));
lt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment