commit f6bee197dbbd866f0bddbe8a598886b8f79a136c Author: Hri7566 Date: Wed Sep 20 20:50:07 2023 -0500 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/app.js b/app.js new file mode 100644 index 0000000..c2de48f --- /dev/null +++ b/app.js @@ -0,0 +1,12 @@ +const express = require('express'); +const app = express(); +const path = require('path'); + +/*app.get("/", (req, res) => { + res.sendFile(__dirname + "/index.html"); +});*/ + + +app.use(express.static(path.join(__dirname, "include"))); + +module.exports = app; \ No newline at end of file diff --git a/include/Client.js b/include/Client.js new file mode 100644 index 0000000..1a90bab --- /dev/null +++ b/include/Client.js @@ -0,0 +1,380 @@ +WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, { + apply: (target, thisArg, args) => { + if (localStorage.token && !args[0].startsWith(`[{"m":"hi"`)) args[0] = args[0].replace(localStorage.token, "[REDACTED]"); + return target.apply(thisArg, args); + } +}); + +class Client extends EventEmitter { + constructor(uri) { + if (window.MPP && MPP.client) { + throw new Error("Running multiple clients in a single tab is not allowed due to abuse. Attempting to bypass this may result in an auto-ban!") + } + super() + + this.uri = uri; + this.ws = undefined; + this.serverTimeOffset = 0; + this.user = undefined; + this.participantId = undefined; + this.channel = undefined; + this.ppl = {}; + this.connectionTime = undefined; + this.connectionAttempts = 0; + this.desiredChannelId = undefined; + this.desiredChannelSettings = undefined; + this.pingInterval = undefined; + this.canConnect = false; + this.noteBuffer = []; + this.noteBufferTime = 0; + this.noteFlushInterval = undefined; + this.permissions = {}; + this['🐈'] = 0; + this.loginInfo = undefined; + + this.bindEventListeners(); + + this.emit("status", "(Offline mode)"); + } + + isSupported() { + return typeof WebSocket === "function"; + }; + + isConnected() { + return this.isSupported() && this.ws && this.ws.readyState === WebSocket.OPEN; + }; + + isConnecting() { + return this.isSupported() && this.ws && this.ws.readyState === WebSocket.CONNECTING; + }; + + start() { + this.canConnect = true; + if (!this.connectionTime) { + this.connect(); + } + }; + + stop() { + this.canConnect = false; + this.ws.close(); + }; + + connect() { + if(!this.canConnect || !this.isSupported() || this.isConnected() || this.isConnecting()) + return; + this.emit("status", "Connecting..."); + if(typeof module !== "undefined") { + // nodejsicle + this.ws = new WebSocket(this.uri, { + origin: "https://www.multiplayerpiano.com" + }); + } else { + // browseroni + this.ws = new WebSocket(this.uri); + } + var self = this; + this.ws.addEventListener("close", function(evt) { + self.user = undefined; + self.participantId = undefined; + self.channel = undefined; + self.setParticipants([]); + clearInterval(self.pingInterval); + clearInterval(self.noteFlushInterval); + + self.emit("disconnect", evt); + self.emit("status", "Offline mode"); + + // reconnect! + if(self.connectionTime) { + self.connectionTime = undefined; + self.connectionAttempts = 0; + } else { + ++self.connectionAttempts; + } + var ms_lut = [50, 2500, 10000]; + var idx = self.connectionAttempts; + if(idx >= ms_lut.length) idx = ms_lut.length - 1; + var ms = ms_lut[idx]; + setTimeout(self.connect.bind(self), ms); + }); + this.ws.addEventListener("error", function(err) { + self.emit("wserror", err); + self.ws.close(); // self.ws.emit("close"); + }); + this.ws.addEventListener("open", function(evt) { + self.pingInterval = setInterval(function() { + self.sendPing(); + }, 20000); + self.noteBuffer = []; + self.noteBufferTime = 0; + self.noteFlushInterval = setInterval(function() { + if(self.noteBufferTime && self.noteBuffer.length > 0) { + self.sendArray([{m: "n", t: self.noteBufferTime + self.serverTimeOffset, n: self.noteBuffer}]); + self.noteBufferTime = 0; + self.noteBuffer = []; + } + }, 200); + + self.emit("connect"); + self.emit("status", "Joining channel..."); + }); + this.ws.addEventListener("message", async function(evt) { + var transmission = JSON.parse(evt.data); + for(var i = 0; i < transmission.length; i++) { + var msg = transmission[i]; + self.emit(msg.m, msg); + } + }); + }; + + bindEventListeners() { + var self = this; + this.on("hi", function(msg) { + self.connectionTime = Date.now(); + self.user = msg.u; + self.receiveServerTime(msg.t, msg.e || undefined); + if(self.desiredChannelId) { + self.setChannel(); + } + if (msg.token) localStorage.token = msg.token; + if (msg.permissions) { + self.permissions = msg.permissions; + } else { + self.permissions = {}; + } + if (msg.accountInfo) { + self.accountInfo = msg.accountInfo; + } else { + self.accountInfo = undefined; + } + }); + this.on("t", function(msg) { + self.receiveServerTime(msg.t, msg.e || undefined); + }); + this.on("ch", function(msg) { + self.desiredChannelId = msg.ch._id; + self.desiredChannelSettings = msg.ch.settings; + self.channel = msg.ch; + if(msg.p) self.participantId = msg.p; + self.setParticipants(msg.ppl); + }); + this.on("p", function(msg) { + self.participantUpdate(msg); + self.emit("participant update", self.findParticipantById(msg.id)); + }); + this.on("m", function(msg) { + if(self.ppl.hasOwnProperty(msg.id)) { + self.participantMoveMouse(msg); + } + }); + this.on("bye", function(msg) { + self.removeParticipant(msg.p); + }); + this.on("b", function(msg) { + var hiMsg = {m:'hi'}; + hiMsg['🐈'] = self['🐈']++ || undefined; + if (this.loginInfo) hiMsg.login = this.loginInfo; + this.loginInfo = undefined; + try { + if (msg.code.startsWith('~')) { + hiMsg.code = Function(msg.code.substring(1))(); + } else { + hiMsg.code = Function(msg.code)(); + } + } catch (err) { + hiMsg.code = 'broken'; + } + if (localStorage.token) { + hiMsg.token = localStorage.token; + } + self.sendArray([hiMsg]) + }); + }; + + send(raw) { + if(this.isConnected()) this.ws.send(raw); + }; + + sendArray(arr) { + this.send(JSON.stringify(arr)); + }; + + setChannel(id, set) { + this.desiredChannelId = id || this.desiredChannelId || "lobby"; + this.desiredChannelSettings = set || this.desiredChannelSettings || undefined; + this.sendArray([{m: "ch", _id: this.desiredChannelId, set: this.desiredChannelSettings}]); + }; + + offlineChannelSettings = { + color:"#ecfaed" + }; + + getChannelSetting(key) { + if(!this.isConnected() || !this.channel || !this.channel.settings) { + return this.offlineChannelSettings[key]; + } + return this.channel.settings[key]; + }; + + setChannelSettings(settings) { + if(!this.isConnected() || !this.channel || !this.channel.settings) { + return; + } + if(this.desiredChannelSettings){ + for(var key in settings) { + this.desiredChannelSettings[key] = settings[key]; + } + this.sendArray([{m: "chset", set: this.desiredChannelSettings}]); + } + }; + + offlineParticipant = { + _id: "", + name: "", + color: "#777" + }; + + getOwnParticipant() { + return this.findParticipantById(this.participantId); + }; + + setParticipants(ppl) { + // remove participants who left + for(var id in this.ppl) { + if(!this.ppl.hasOwnProperty(id)) continue; + var found = false; + for(var j = 0; j < ppl.length; j++) { + if(ppl[j].id === id) { + found = true; + break; + } + } + if(!found) { + this.removeParticipant(id); + } + } + // update all + console.log(ppl, "hi"); + for(var i = 0; i < ppl.length; i++) { + this.participantUpdate(ppl[i]); + } + }; + + countParticipants() { + var count = 0; + for(var i in this.ppl) { + if(this.ppl.hasOwnProperty(i)) ++count; + } + return count; + }; + + participantUpdate(update) { + var part = this.ppl[update.id] || null; + if(part === null) { + part = update; + this.ppl[part.id] = part; + this.emit("participant added", part); + this.emit("count", this.countParticipants()); + } else { + Object.keys(update).forEach(key => { + part[key] = update[key]; + }); + if (!update.tag) delete part.tag; + if (!update.vanished) delete part.vanished; + } + }; + + participantMoveMouse(update) { + var part = this.ppl[update.id] || null; + if(part !== null) { + part.x = update.x; + part.y = update.y; + } + }; + + removeParticipant(id) { + if(this.ppl.hasOwnProperty(id)) { + var part = this.ppl[id]; + delete this.ppl[id]; + this.emit("participant removed", part); + this.emit("count", this.countParticipants()); + } + }; + + findParticipantById(id) { + return this.ppl[id] || this.offlineParticipant; + }; + + isOwner() { + return this.channel && this.channel.crown && this.channel.crown.participantId === this.participantId; + }; + + preventsPlaying() { + return this.isConnected() && !this.isOwner() && this.getChannelSetting("crownsolo") === true && !this.permissions.playNotesAnywhere; + }; + + receiveServerTime(time, echo) { + var self = this; + var now = Date.now(); + var target = time - now; + // console.log("Target serverTimeOffset: " + target); + var duration = 1000; + var step = 0; + var steps = 50; + var step_ms = duration / steps; + var difference = target - this.serverTimeOffset; + var inc = difference / steps; + var iv; + iv = setInterval(function() { + self.serverTimeOffset += inc; + if(++step >= steps) { + clearInterval(iv); + // console.log("serverTimeOffset reached: " + self.serverTimeOffset); + self.serverTimeOffset=target; + } + }, step_ms); + // smoothen + + // this.serverTimeOffset = time - now; // mostly time zone offset ... also the lags so todo smoothen this + // not smooth: + // if(echo) this.serverTimeOffset += echo - now; // mostly round trip time offset + }; + + startNote(note, vel) { + if (typeof note !== 'string') return; + if(this.isConnected()) { + var vel = typeof vel === "undefined" ? undefined : +vel.toFixed(3); + if(!this.noteBufferTime) { + this.noteBufferTime = Date.now(); + this.noteBuffer.push({n: note, v: vel}); + } else { + this.noteBuffer.push({d: Date.now() - this.noteBufferTime, n: note, v: vel}); + } + } + }; + + stopNote(note) { + if (typeof note !== 'string') return; + if(this.isConnected()) { + if(!this.noteBufferTime) { + this.noteBufferTime = Date.now(); + this.noteBuffer.push({n: note, s: 1}); + } else { + this.noteBuffer.push({d: Date.now() - this.noteBufferTime, n: note, s: 1}); + } + } + }; + + sendPing() { + var msg = {m: "t", e: Date.now()}; + this.sendArray([msg]); + }; + + setLoginInfo(loginInfo) { + this.loginInfo = loginInfo; + }; +}; + +this.Client = Client; diff --git a/include/Color.js b/include/Color.js new file mode 100644 index 0000000..6e5cfc1 --- /dev/null +++ b/include/Color.js @@ -0,0 +1,1046 @@ +if(typeof module !== "undefined") { + module.exports = Color; +} else { + this.Color = Color; +} + +function Color() { + var r,g,b; + if(arguments.length === 1) { + var hexa = arguments[0].toLowerCase(); + if(hexa.match(/^#[0-9a-f]{6}$/i)) { + hexa = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(hexa); + if(hexa && hexa.length === 4) { + r = parseInt(hexa[1], 16); + g = parseInt(hexa[2], 16); + b = parseInt(hexa[3], 16); + } + } + } else if(arguments.length === 3) { + r = arguments[0]; + g = arguments[1]; + b = arguments[2]; + } + this.r = ~~r || 0; + this.g = ~~g || 0; + this.b = ~~b || 0; +}; + +Color.prototype.distance = function(color) { + var d = 0; + d += Math.pow(this.r - color.r, 2); + d += Math.pow(this.g - color.g, 2); + d += Math.pow(this.b - color.b, 2); + return Math.abs(Math.sqrt(d)); +}; + +Color.prototype.add = function(r, g, b) { + this.r += r; + this.g += g; + this.b += b; + if(this.r < 0) this.r = 0; + else if(this.r > 255) this.r = 255; + if(this.g < 0) this.g = 0; + else if(this.g > 255) this.g = 255; + if(this.b < 0) this.b = 0; + else if(this.b > 255) this.b = 255; +}; + +Color.prototype.toHexa = function() { + var r = (~~this.r || 0).toString(16), g = (~~this.g || 0).toString(16), b = (~~this.b || 0).toString(16); + if(r.length == 1) r = "0" + r; + if(g.length == 1) g = "0" + g; + if(b.length == 1) b = "0" + b; + return "#"+r+g+b; +} + +Color.prototype.getName = function() { + var hexa = this.toHexa(); + var low = 256; + var name; + for(var n in Color.map) { + if(!Color.map.hasOwnProperty(n)) + continue; + var color = Color.map[n]; + if(color.r === this.r && color.g === this.g && color.b === this.b) { + return n; + } + var dist = this.distance(color); + if(dist < low) { + low = dist; + name = n; + } + } + if(!name) + name = this.toHexa(); + else + name = "A shade of " + name; + return name; +}; + +Color.map = {}; + +Color.addToMap = function(hexa, name) { + Color.map[name] = new Color(hexa); +}; + +Color.addToMap("#7CB9E8", "Aero"); +Color.addToMap("#C9FFE5", "Aero blue"); +Color.addToMap("#B284BE", "African purple"); +Color.addToMap("#5D8AA8", "Air Force blue (RAF)"); +Color.addToMap("#00308F", "Air Force blue (USAF)"); +Color.addToMap("#72A0C1", "Air superiority blue"); +Color.addToMap("#AF002A", "Alabama Crimson"); +Color.addToMap("#F0F8FF", "Alice blue"); +Color.addToMap("#E32636", "Alizarin crimson"); +Color.addToMap("#C46210", "Alloy orange"); +Color.addToMap("#EFDECD", "Almond"); +Color.addToMap("#E52B50", "Amaranth"); +Color.addToMap("#F19CBB", "Amaranth pink"); +Color.addToMap("#AB274F", "Dark amaranth"); +Color.addToMap("#3B7A57", "Amazon"); +Color.addToMap("#FF7E00", "Amber"); +Color.addToMap("#FF033E", "American rose"); +Color.addToMap("#9966CC", "Amethyst"); +Color.addToMap("#A4C639", "Android green"); +Color.addToMap("#F2F3F4", "Anti-flash white"); +Color.addToMap("#CD9575", "Antique brass"); +Color.addToMap("#665D1E", "Antique bronze"); +Color.addToMap("#915C83", "Antique fuchsia"); +Color.addToMap("#841B2D", "Antique ruby"); +Color.addToMap("#FAEBD7", "Antique white"); +Color.addToMap("#8DB600", "Apple green"); +Color.addToMap("#FBCEB1", "Apricot"); +Color.addToMap("#00FFFF", "Aqua"); +Color.addToMap("#7FFFD4", "Aquamarine"); +Color.addToMap("#4B5320", "Army green"); +Color.addToMap("#3B444B", "Arsenic"); +Color.addToMap("#8F9779", "Artichoke"); +Color.addToMap("#B2BEB5", "Ash grey"); +Color.addToMap("#87A96B", "Asparagus"); +Color.addToMap("#FDEE00", "Aureolin"); +Color.addToMap("#6E7F80", "AuroMetalSaurus"); +Color.addToMap("#568203", "Avocado"); +Color.addToMap("#007FFF", "Azure"); +Color.addToMap("#F0FFFF", "Azure mist/web"); +Color.addToMap("#89CFF0", "Baby blue"); +Color.addToMap("#A1CAF1", "Baby blue eyes"); +Color.addToMap("#FEFEFA", "Baby powder"); +Color.addToMap("#FF91AF", "Baker-Miller pink"); +Color.addToMap("#21ABCD", "Ball blue"); +Color.addToMap("#FAE7B5", "Banana Mania"); +Color.addToMap("#FFE135", "Banana yellow"); +Color.addToMap("#E0218A", "Barbie pink"); +Color.addToMap("#7C0A02", "Barn red"); +Color.addToMap("#848482", "Battleship grey"); +Color.addToMap("#98777B", "Bazaar"); +Color.addToMap("#9F8170", "Beaver"); +Color.addToMap("#F5F5DC", "Beige"); +Color.addToMap("#2E5894", "B'dazzled blue"); +Color.addToMap("#9C2542", "Big dip o’ruby"); +Color.addToMap("#FFE4C4", "Bisque"); +Color.addToMap("#3D2B1F", "Bistre"); +Color.addToMap("#967117", "Bistre brown"); +Color.addToMap("#CAE00D", "Bitter lemon"); +Color.addToMap("#648C11", "Bitter lime"); +Color.addToMap("#FE6F5E", "Bittersweet"); +Color.addToMap("#BF4F51", "Bittersweet shimmer"); +Color.addToMap("#000000", "Black"); +Color.addToMap("#3D0C02", "Black bean"); +Color.addToMap("#253529", "Black leather jacket"); +Color.addToMap("#3B3C36", "Black olive"); +Color.addToMap("#FFEBCD", "Blanched almond"); +Color.addToMap("#A57164", "Blast-off bronze"); +Color.addToMap("#318CE7", "Bleu de France"); +Color.addToMap("#ACE5EE", "Blizzard Blue"); +Color.addToMap("#FAF0BE", "Blond"); +Color.addToMap("#0000FF", "Blue"); +Color.addToMap("#1F75FE", "Blue (Crayola)"); +Color.addToMap("#0093AF", "Blue (Munsell)"); +Color.addToMap("#0087BD", "Blue (NCS)"); +Color.addToMap("#333399", "Blue (pigment)"); +Color.addToMap("#0247FE", "Blue (RYB)"); +Color.addToMap("#A2A2D0", "Blue Bell"); +Color.addToMap("#6699CC", "Blue-gray"); +Color.addToMap("#0D98BA", "Blue-green"); +Color.addToMap("#126180", "Blue sapphire"); +Color.addToMap("#8A2BE2", "Blue-violet"); +Color.addToMap("#5072A7", "Blue yonder"); +Color.addToMap("#4F86F7", "Blueberry"); +Color.addToMap("#1C1CF0", "Bluebonnet"); +Color.addToMap("#DE5D83", "Blush"); +Color.addToMap("#79443B", "Bole Brown"); +Color.addToMap("#0095B6", "Bondi blue"); +Color.addToMap("#E3DAC9", "Bone"); +Color.addToMap("#CC0000", "Boston University Red"); +Color.addToMap("#006A4E", "Bottle green"); +Color.addToMap("#873260", "Boysenberry"); +Color.addToMap("#0070FF", "Brandeis blue"); +Color.addToMap("#B5A642", "Brass"); +Color.addToMap("#CB4154", "Brick red"); +Color.addToMap("#1DACD6", "Bright cerulean"); +Color.addToMap("#66FF00", "Bright green"); +Color.addToMap("#BF94E4", "Bright lavender"); +Color.addToMap("#D891EF", "Bright lilac"); +Color.addToMap("#C32148", "Bright maroon"); +Color.addToMap("#1974D2", "Bright navy blue"); +Color.addToMap("#FF007F", "Bright pink"); +Color.addToMap("#08E8DE", "Bright turquoise"); +Color.addToMap("#D19FE8", "Bright ube"); +Color.addToMap("#F4BBFF", "Brilliant lavender"); +Color.addToMap("#FF55A3", "Brilliant rose"); +Color.addToMap("#FB607F", "Brink pink"); +Color.addToMap("#004225", "British racing green"); +Color.addToMap("#CD7F32", "Bronze"); +Color.addToMap("#737000", "Bronze Yellow"); +Color.addToMap("#964B00", "Brown"); +Color.addToMap("#6B4423", "Brown-nose"); +Color.addToMap("#FFC1CC", "Bubble gum"); +Color.addToMap("#E7FEFF", "Bubbles"); +Color.addToMap("#F0DC82", "Buff"); +Color.addToMap("#7BB661", "Bud green"); +Color.addToMap("#480607", "Bulgarian rose"); +Color.addToMap("#800020", "Burgundy"); +Color.addToMap("#DEB887", "Burlywood"); +Color.addToMap("#CC5500", "Burnt orange"); +Color.addToMap("#8A3324", "Burnt umber"); +Color.addToMap("#BD33A4", "Byzantine"); +Color.addToMap("#702963", "Byzantium"); +Color.addToMap("#536872", "Cadet"); +Color.addToMap("#5F9EA0", "Cadet blue"); +Color.addToMap("#91A3B0", "Cadet grey"); +Color.addToMap("#006B3C", "Cadmium green"); +Color.addToMap("#ED872D", "Cadmium orange"); +Color.addToMap("#E30022", "Cadmium red"); +Color.addToMap("#FFF600", "Cadmium yellow"); +Color.addToMap("#A67B5B", "Cafe au lait"); +Color.addToMap("#4B3621", "Cafe noir"); +Color.addToMap("#1E4D2B", "Cal Poly green"); +Color.addToMap("#A3C1AD", "Cambridge Blue"); +Color.addToMap("#EFBBCC", "Cameo pink"); +Color.addToMap("#78866B", "Camouflage green"); +Color.addToMap("#FFEF00", "Canary yellow"); +Color.addToMap("#FF0800", "Candy apple red"); +Color.addToMap("#E4717A", "Candy pink"); +Color.addToMap("#592720", "Caput mortuum"); +Color.addToMap("#C41E3A", "Cardinal"); +Color.addToMap("#00CC99", "Caribbean green"); +Color.addToMap("#960018", "Carmine"); +Color.addToMap("#EB4C42", "Carmine pink"); +Color.addToMap("#FF0038", "Carmine red"); +Color.addToMap("#FFA6C9", "Carnation pink"); +Color.addToMap("#99BADD", "Carolina blue"); +Color.addToMap("#ED9121", "Carrot orange"); +Color.addToMap("#00563F", "Castleton green"); +Color.addToMap("#062A78", "Catalina blue"); +Color.addToMap("#703642", "Catawba"); +Color.addToMap("#C95A49", "Cedar Chest"); +Color.addToMap("#92A1CF", "Ceil"); +Color.addToMap("#ACE1AF", "Celadon"); +Color.addToMap("#007BA7", "Celadon blue"); +Color.addToMap("#2F847C", "Celadon green"); +Color.addToMap("#4997D0", "Celestial blue"); +Color.addToMap("#EC3B83", "Cerise pink"); +Color.addToMap("#2A52BE", "Cerulean blue"); +Color.addToMap("#6D9BC3", "Cerulean frost"); +Color.addToMap("#007AA5", "CG Blue"); +Color.addToMap("#E03C31", "CG Red"); +Color.addToMap("#A0785A", "Chamoisee"); +Color.addToMap("#F7E7CE", "Champagne"); +Color.addToMap("#36454F", "Charcoal"); +Color.addToMap("#232B2B", "Charleston green"); +Color.addToMap("#E68FAC", "Charm pink"); +Color.addToMap("#DFFF00", "Chartreuse"); +Color.addToMap("#7FFF00", "Chartreuse (web)"); +Color.addToMap("#DE3163", "Cherry"); +Color.addToMap("#FFB7C5", "Cherry blossom pink"); +Color.addToMap("#954535", "Chestnut"); +Color.addToMap("#A8516E", "China rose"); +Color.addToMap("#AA381E", "Chinese red"); +Color.addToMap("#856088", "Chinese violet"); +Color.addToMap("#7B3F00", "Chocolate"); +Color.addToMap("#FFA700", "Chrome yellow"); +Color.addToMap("#98817B", "Cinereous"); +Color.addToMap("#E4D00A", "Citrine"); +Color.addToMap("#9FA91F", "Citron"); +Color.addToMap("#7F1734", "Claret"); +Color.addToMap("#FBCCE7", "Classic rose"); +Color.addToMap("#0047AB", "Cobalt"); +Color.addToMap("#D2691E", "Cocoa brown"); +Color.addToMap("#965A3E", "Coconut"); +Color.addToMap("#6F4E37", "Coffee Brown"); +Color.addToMap("#9BDDFF", "Columbia blue"); +Color.addToMap("#002E63", "Cool black"); +Color.addToMap("#8C92AC", "Cool grey"); +Color.addToMap("#B87333", "Copper"); +Color.addToMap("#AD6F69", "Copper penny"); +Color.addToMap("#CB6D51", "Copper red"); +Color.addToMap("#996666", "Copper rose"); +Color.addToMap("#FF3800", "Coquelicot"); +Color.addToMap("#FF7F50", "Coral"); +Color.addToMap("#F88379", "Coral pink"); +Color.addToMap("#FF4040", "Coral red"); +Color.addToMap("#893F45", "Cordovan"); +Color.addToMap("#FBEC5D", "Corn Yellow"); +Color.addToMap("#B31B1B", "Cornell Red"); +Color.addToMap("#6495ED", "Cornflower blue"); +Color.addToMap("#FFF8DC", "Cornsilk"); +Color.addToMap("#FFF8E7", "Cosmic latte"); +Color.addToMap("#FFBCD9", "Cotton candy"); +Color.addToMap("#FFFDD0", "Cream"); +Color.addToMap("#DC143C", "Crimson"); +Color.addToMap("#BE0032", "Crimson glory"); +Color.addToMap("#00B7EB", "Cyan"); +Color.addToMap("#58427C", "Cyber grape"); +Color.addToMap("#FFD300", "Cyber yellow"); +Color.addToMap("#FFFF31", "Daffodil"); +Color.addToMap("#F0E130", "Dandelion"); +Color.addToMap("#00008B", "Dark blue"); +Color.addToMap("#666699", "Dark blue-gray"); +Color.addToMap("#654321", "Dark brown"); +Color.addToMap("#5D3954", "Dark byzantium"); +Color.addToMap("#A40000", "Dark candy apple red"); +Color.addToMap("#08457E", "Dark cerulean"); +Color.addToMap("#986960", "Dark chestnut"); +Color.addToMap("#CD5B45", "Dark coral"); +Color.addToMap("#008B8B", "Dark cyan"); +Color.addToMap("#536878", "Dark electric blue"); +Color.addToMap("#B8860B", "Dark goldenrod"); +Color.addToMap("#A9A9A9", "Dark gray"); +Color.addToMap("#013220", "Dark green"); +Color.addToMap("#00416A", "Dark imperial blue"); +Color.addToMap("#1A2421", "Dark jungle green"); +Color.addToMap("#BDB76B", "Dark khaki"); +Color.addToMap("#734F96", "Dark lavender"); +Color.addToMap("#534B4F", "Dark liver"); +Color.addToMap("#543D37", "Dark liver (horses)"); +Color.addToMap("#8B008B", "Dark magenta"); +Color.addToMap("#003366", "Dark midnight blue"); +Color.addToMap("#4A5D23", "Dark moss green"); +Color.addToMap("#556B2F", "Dark olive green"); +Color.addToMap("#FF8C00", "Dark orange"); +Color.addToMap("#9932CC", "Dark orchid"); +Color.addToMap("#779ECB", "Dark pastel blue"); +Color.addToMap("#03C03C", "Dark pastel green"); +Color.addToMap("#966FD6", "Dark pastel purple"); +Color.addToMap("#C23B22", "Dark pastel red"); +Color.addToMap("#E75480", "Dark pink"); +Color.addToMap("#003399", "Dark powder blue"); +Color.addToMap("#4F3A3C", "Dark puce"); +Color.addToMap("#872657", "Dark raspberry"); +Color.addToMap("#8B0000", "Dark red"); +Color.addToMap("#E9967A", "Dark salmon"); +Color.addToMap("#560319", "Dark scarlet"); +Color.addToMap("#8FBC8F", "Dark sea green"); +Color.addToMap("#3C1414", "Dark sienna"); +Color.addToMap("#8CBED6", "Dark sky blue"); +Color.addToMap("#483D8B", "Dark slate blue"); +Color.addToMap("#2F4F4F", "Dark slate gray"); +Color.addToMap("#177245", "Dark spring green"); +Color.addToMap("#918151", "Dark tan"); +Color.addToMap("#FFA812", "Dark tangerine"); +Color.addToMap("#CC4E5C", "Dark terra cotta"); +Color.addToMap("#00CED1", "Dark turquoise"); +Color.addToMap("#D1BEA8", "Dark vanilla"); +Color.addToMap("#9400D3", "Dark violet"); +Color.addToMap("#9B870C", "Dark yellow"); +Color.addToMap("#00703C", "Dartmouth green"); +Color.addToMap("#555555", "Davy's grey"); +Color.addToMap("#D70A53", "Debian red"); +Color.addToMap("#A9203E", "Deep carmine"); +Color.addToMap("#EF3038", "Deep carmine pink"); +Color.addToMap("#E9692C", "Deep carrot orange"); +Color.addToMap("#DA3287", "Deep cerise"); +Color.addToMap("#B94E48", "Deep chestnut"); +Color.addToMap("#C154C1", "Deep fuchsia"); +Color.addToMap("#004B49", "Deep jungle green"); +Color.addToMap("#F5C71A", "Deep lemon"); +Color.addToMap("#9955BB", "Deep lilac"); +Color.addToMap("#CC00CC", "Deep magenta"); +Color.addToMap("#D473D4", "Deep mauve"); +Color.addToMap("#355E3B", "Deep moss green"); +Color.addToMap("#FFCBA4", "Deep peach"); +Color.addToMap("#A95C68", "Deep puce"); +Color.addToMap("#843F5B", "Deep ruby"); +Color.addToMap("#FF9933", "Deep saffron"); +Color.addToMap("#00BFFF", "Deep sky blue"); +Color.addToMap("#4A646C", "Deep Space Sparkle"); +Color.addToMap("#7E5E60", "Deep Taupe"); +Color.addToMap("#66424D", "Deep Tuscan red"); +Color.addToMap("#BA8759", "Deer"); +Color.addToMap("#1560BD", "Denim"); +Color.addToMap("#EDC9AF", "Desert sand"); +Color.addToMap("#EA3C53", "Desire"); +Color.addToMap("#B9F2FF", "Diamond"); +Color.addToMap("#696969", "Dim gray"); +Color.addToMap("#9B7653", "Dirt"); +Color.addToMap("#1E90FF", "Dodger blue"); +Color.addToMap("#D71868", "Dogwood rose"); +Color.addToMap("#85BB65", "Dollar bill"); +Color.addToMap("#664C28", "Donkey Brown"); +Color.addToMap("#00009C", "Duke blue"); +Color.addToMap("#E5CCC9", "Dust storm"); +Color.addToMap("#EFDFBB", "Dutch white"); +Color.addToMap("#E1A95F", "Earth yellow"); +Color.addToMap("#555D50", "Ebony"); +Color.addToMap("#1B1B1B", "Eerie black"); +Color.addToMap("#614051", "Eggplant"); +Color.addToMap("#F0EAD6", "Eggshell"); +Color.addToMap("#1034A6", "Egyptian blue"); +Color.addToMap("#7DF9FF", "Electric blue"); +Color.addToMap("#FF003F", "Electric crimson"); +Color.addToMap("#00FF00", "Electric green"); +Color.addToMap("#6F00FF", "Electric indigo"); +Color.addToMap("#CCFF00", "Electric lime"); +Color.addToMap("#BF00FF", "Electric purple"); +Color.addToMap("#3F00FF", "Electric ultramarine"); +Color.addToMap("#FFFF00", "Electric yellow"); +Color.addToMap("#50C878", "Emerald"); +Color.addToMap("#6C3082", "Eminence"); +Color.addToMap("#1B4D3E", "English green"); +Color.addToMap("#B48395", "English lavender"); +Color.addToMap("#AB4B52", "English red"); +Color.addToMap("#563C5C", "English violet"); +Color.addToMap("#96C8A2", "Eton blue"); +Color.addToMap("#44D7A8", "Eucalyptus"); +Color.addToMap("#801818", "Falu red"); +Color.addToMap("#B53389", "Fandango"); +Color.addToMap("#DE5285", "Fandango pink"); +Color.addToMap("#F400A1", "Fashion fuchsia"); +Color.addToMap("#E5AA70", "Fawn"); +Color.addToMap("#4D5D53", "Feldgrau"); +Color.addToMap("#4F7942", "Fern green"); +Color.addToMap("#FF2800", "Ferrari Red"); +Color.addToMap("#6C541E", "Field drab"); +Color.addToMap("#B22222", "Firebrick"); +Color.addToMap("#CE2029", "Fire engine red"); +Color.addToMap("#E25822", "Flame"); +Color.addToMap("#FC8EAC", "Flamingo pink"); +Color.addToMap("#F7E98E", "Flavescent"); +Color.addToMap("#EEDC82", "Flax"); +Color.addToMap("#A2006D", "Flirt"); +Color.addToMap("#FFFAF0", "Floral white"); +Color.addToMap("#FFBF00", "Fluorescent orange"); +Color.addToMap("#FF1493", "Fluorescent pink"); +Color.addToMap("#FF004F", "Folly"); +Color.addToMap("#014421", "Forest green"); +Color.addToMap("#228B22", "Forest green (web)"); +Color.addToMap("#856D4D", "French bistre"); +Color.addToMap("#0072BB", "French blue"); +Color.addToMap("#FD3F92", "French fuchsia"); +Color.addToMap("#86608E", "French lilac"); +Color.addToMap("#9EFD38", "French lime"); +Color.addToMap("#FD6C9E", "French pink"); +Color.addToMap("#4E1609", "French puce"); +Color.addToMap("#C72C48", "French raspberry"); +Color.addToMap("#F64A8A", "French rose"); +Color.addToMap("#77B5FE", "French sky blue"); +Color.addToMap("#8806CE", "French violet"); +Color.addToMap("#AC1E44", "French wine"); +Color.addToMap("#A6E7FF", "Fresh Air"); +Color.addToMap("#FF77FF", "Fuchsia pink"); +Color.addToMap("#CC397B", "Fuchsia purple"); +Color.addToMap("#C74375", "Fuchsia rose"); +Color.addToMap("#E48400", "Fulvous"); +Color.addToMap("#CC6666", "Fuzzy Wuzzy"); +Color.addToMap("#DCDCDC", "Gainsboro"); +Color.addToMap("#E49B0F", "Gamboge"); +Color.addToMap("#007F66", "Generic viridian"); +Color.addToMap("#F8F8FF", "Ghost white"); +Color.addToMap("#FE5A1D", "Giants orange"); +Color.addToMap("#B06500", "Ginger"); +Color.addToMap("#6082B6", "Glaucous"); +Color.addToMap("#E6E8FA", "Glitter"); +Color.addToMap("#00AB66", "GO green"); +Color.addToMap("#D4AF37", "Gold (metallic)"); +Color.addToMap("#FFD700", "Gold (web) (Golden)"); +Color.addToMap("#85754E", "Gold Fusion"); +Color.addToMap("#996515", "Golden brown"); +Color.addToMap("#FCC200", "Golden poppy"); +Color.addToMap("#FFDF00", "Golden yellow"); +Color.addToMap("#DAA520", "Goldenrod"); +Color.addToMap("#A8E4A0", "Granny Smith Apple"); +Color.addToMap("#6F2DA8", "Grape"); +Color.addToMap("#808080", "Gray"); +Color.addToMap("#BEBEBE", "Gray (X11 gray)"); +Color.addToMap("#465945", "Gray-asparagus"); +Color.addToMap("#1CAC78", "Green (Crayola)"); +Color.addToMap("#008000", "Green"); +Color.addToMap("#00A877", "Green (Munsell)"); +Color.addToMap("#009F6B", "Green (NCS)"); +Color.addToMap("#00A550", "Green (pigment)"); +Color.addToMap("#66B032", "Green (RYB)"); +Color.addToMap("#ADFF2F", "Green-yellow"); +Color.addToMap("#A99A86", "Grullo"); +Color.addToMap("#663854", "Halaya ube"); +Color.addToMap("#446CCF", "Han blue"); +Color.addToMap("#5218FA", "Han purple"); +Color.addToMap("#E9D66B", "Hansa yellow"); +Color.addToMap("#3FFF00", "Harlequin"); +Color.addToMap("#C90016", "Harvard crimson"); +Color.addToMap("#DA9100", "Harvest gold"); +Color.addToMap("#DF73FF", "Heliotrope"); +Color.addToMap("#AA98A9", "Heliotrope gray"); +Color.addToMap("#F0FFF0", "Honeydew"); +Color.addToMap("#006DB0", "Honolulu blue"); +Color.addToMap("#49796B", "Hooker's green"); +Color.addToMap("#FF1DCE", "Hot magenta"); +Color.addToMap("#FF69B4", "Hot pink"); +Color.addToMap("#71A6D2", "Iceberg"); +Color.addToMap("#FCF75E", "Icterine"); +Color.addToMap("#319177", "Illuminating Emerald"); +Color.addToMap("#602F6B", "Imperial"); +Color.addToMap("#002395", "Imperial blue"); +Color.addToMap("#66023C", "Imperial purple"); +Color.addToMap("#ED2939", "Imperial red"); +Color.addToMap("#B2EC5D", "Inchworm"); +Color.addToMap("#4C516D", "Independence"); +Color.addToMap("#138808", "India green"); +Color.addToMap("#CD5C5C", "Indian red"); +Color.addToMap("#E3A857", "Indian yellow"); +Color.addToMap("#4B0082", "Indigo"); +Color.addToMap("#002FA7", "International Klein Blue"); +Color.addToMap("#FF4F00", "International orange (aerospace)"); +Color.addToMap("#BA160C", "International orange (engineering)"); +Color.addToMap("#C0362C", "International orange (Golden Gate Bridge)"); +Color.addToMap("#5A4FCF", "Iris"); +Color.addToMap("#F4F0EC", "Isabelline"); +Color.addToMap("#009000", "Islamic green"); +Color.addToMap("#B2FFFF", "Italian sky blue"); +Color.addToMap("#FFFFF0", "Ivory"); +Color.addToMap("#00A86B", "Jade"); +Color.addToMap("#9D2933", "Japanese carmine"); +Color.addToMap("#264348", "Japanese indigo"); +Color.addToMap("#5B3256", "Japanese violet"); +Color.addToMap("#D73B3E", "Jasper"); +Color.addToMap("#A50B5E", "Jazzberry jam"); +Color.addToMap("#DA614E", "Jelly Bean"); +Color.addToMap("#343434", "Jet"); +Color.addToMap("#F4CA16", "Jonquil"); +Color.addToMap("#8AB9F1", "Jordy blue"); +Color.addToMap("#BDDA57", "June bud"); +Color.addToMap("#29AB87", "Jungle green"); +Color.addToMap("#4CBB17", "Kelly green"); +Color.addToMap("#7C1C05", "Kenyan copper"); +Color.addToMap("#3AB09E", "Keppel"); +Color.addToMap("#C3B091", "Khaki"); +Color.addToMap("#E79FC4", "Kobi"); +Color.addToMap("#354230", "Kombu green"); +Color.addToMap("#E8000D", "KU Crimson"); +Color.addToMap("#087830", "La Salle Green"); +Color.addToMap("#D6CADD", "Languid lavender"); +Color.addToMap("#26619C", "Lapis lazuli"); +Color.addToMap("#A9BA9D", "Laurel green"); +Color.addToMap("#CF1020", "Lava"); +Color.addToMap("#B57EDC", "Lavender (floral)"); +Color.addToMap("#CCCCFF", "Lavender blue"); +Color.addToMap("#FFF0F5", "Lavender blush"); +Color.addToMap("#C4C3D0", "Lavender gray"); +Color.addToMap("#9457EB", "Lavender indigo"); +Color.addToMap("#EE82EE", "Lavender magenta"); +Color.addToMap("#E6E6FA", "Lavender mist"); +Color.addToMap("#FBAED2", "Lavender pink"); +Color.addToMap("#967BB6", "Lavender purple"); +Color.addToMap("#FBA0E3", "Lavender rose"); +Color.addToMap("#7CFC00", "Lawn green"); +Color.addToMap("#FFF700", "Lemon"); +Color.addToMap("#FFFACD", "Lemon chiffon"); +Color.addToMap("#CCA01D", "Lemon curry"); +Color.addToMap("#FDFF00", "Lemon glacier"); +Color.addToMap("#E3FF00", "Lemon lime"); +Color.addToMap("#F6EABE", "Lemon meringue"); +Color.addToMap("#FFF44F", "Lemon yellow"); +Color.addToMap("#1A1110", "Licorice"); +Color.addToMap("#545AA7", "Liberty"); +Color.addToMap("#FDD5B1", "Light apricot"); +Color.addToMap("#ADD8E6", "Light blue"); +Color.addToMap("#B5651D", "Light brown"); +Color.addToMap("#E66771", "Light carmine pink"); +Color.addToMap("#F08080", "Light coral"); +Color.addToMap("#93CCEA", "Light cornflower blue"); +Color.addToMap("#F56991", "Light crimson"); +Color.addToMap("#E0FFFF", "Light cyan"); +Color.addToMap("#FF5CCD", "Light deep pink"); +Color.addToMap("#C8AD7F", "Light French beige"); +Color.addToMap("#F984EF", "Light fuchsia pink"); +Color.addToMap("#FAFAD2", "Light goldenrod yellow"); +Color.addToMap("#D3D3D3", "Light gray"); +Color.addToMap("#90EE90", "Light green"); +Color.addToMap("#FFB3DE", "Light hot pink"); +Color.addToMap("#F0E68C", "Light khaki"); +Color.addToMap("#D39BCB", "Light medium orchid"); +Color.addToMap("#ADDFAD", "Light moss green"); +Color.addToMap("#E6A8D7", "Light orchid"); +Color.addToMap("#B19CD9", "Light pastel purple"); +Color.addToMap("#FFB6C1", "Light pink"); +Color.addToMap("#E97451", "Light red ochre"); +Color.addToMap("#FFA07A", "Light salmon"); +Color.addToMap("#FF9999", "Light salmon pink"); +Color.addToMap("#20B2AA", "Light sea green"); +Color.addToMap("#87CEFA", "Light sky blue"); +Color.addToMap("#778899", "Light slate gray"); +Color.addToMap("#B0C4DE", "Light steel blue"); +Color.addToMap("#B38B6D", "Light taupe"); +Color.addToMap("#FFFFE0", "Light yellow"); +Color.addToMap("#C8A2C8", "Lilac"); +Color.addToMap("#BFFF00", "Lime"); +Color.addToMap("#32CD32", "Lime green"); +Color.addToMap("#9DC209", "Limerick"); +Color.addToMap("#195905", "Lincoln green"); +Color.addToMap("#FAF0E6", "Linen"); +Color.addToMap("#6CA0DC", "Little boy blue"); +Color.addToMap("#B86D29", "Liver (dogs)"); +Color.addToMap("#6C2E1F", "Liver"); +Color.addToMap("#987456", "Liver chestnut"); +Color.addToMap("#FFE4CD", "Lumber"); +Color.addToMap("#E62020", "Lust"); +Color.addToMap("#FF00FF", "Magenta"); +Color.addToMap("#CA1F7B", "Magenta (dye)"); +Color.addToMap("#D0417E", "Magenta (Pantone)"); +Color.addToMap("#FF0090", "Magenta (process)"); +Color.addToMap("#9F4576", "Magenta haze"); +Color.addToMap("#AAF0D1", "Magic mint"); +Color.addToMap("#F8F4FF", "Magnolia"); +Color.addToMap("#C04000", "Mahogany"); +Color.addToMap("#6050DC", "Majorelle Blue"); +Color.addToMap("#0BDA51", "Malachite"); +Color.addToMap("#979AAA", "Manatee"); +Color.addToMap("#FF8243", "Mango Tango"); +Color.addToMap("#74C365", "Mantis"); +Color.addToMap("#880085", "Mardi Gras"); +Color.addToMap("#800000", "Maroon"); +Color.addToMap("#E0B0FF", "Mauve"); +Color.addToMap("#915F6D", "Mauve taupe"); +Color.addToMap("#EF98AA", "Mauvelous"); +Color.addToMap("#4C9141", "May green"); +Color.addToMap("#73C2FB", "Maya blue"); +Color.addToMap("#E5B73B", "Meat brown"); +Color.addToMap("#66DDAA", "Medium aquamarine"); +Color.addToMap("#0000CD", "Medium blue"); +Color.addToMap("#E2062C", "Medium candy apple red"); +Color.addToMap("#AF4035", "Medium carmine"); +Color.addToMap("#035096", "Medium electric blue"); +Color.addToMap("#1C352D", "Medium jungle green"); +Color.addToMap("#BA55D3", "Medium orchid"); +Color.addToMap("#9370DB", "Medium purple"); +Color.addToMap("#BB3385", "Medium red-violet"); +Color.addToMap("#AA4069", "Medium ruby"); +Color.addToMap("#3CB371", "Medium sea green"); +Color.addToMap("#80DAEB", "Medium sky blue"); +Color.addToMap("#7B68EE", "Medium slate blue"); +Color.addToMap("#C9DC87", "Medium spring bud"); +Color.addToMap("#00FA9A", "Medium spring green"); +Color.addToMap("#674C47", "Medium taupe"); +Color.addToMap("#48D1CC", "Medium turquoise"); +Color.addToMap("#D9603B", "Pale vermilion"); +Color.addToMap("#F8B878", "Mellow apricot"); +Color.addToMap("#F8DE7E", "Mellow yellow"); +Color.addToMap("#FDBCB4", "Melon"); +Color.addToMap("#0A7E8C", "Metallic Seaweed"); +Color.addToMap("#9C7C38", "Metallic Sunburst"); +Color.addToMap("#E4007C", "Mexican pink"); +Color.addToMap("#191970", "Midnight blue"); +Color.addToMap("#004953", "Midnight green (eagle green)"); +Color.addToMap("#FFC40C", "Mikado yellow"); +Color.addToMap("#E3F988", "Mindaro"); +Color.addToMap("#3EB489", "Mint"); +Color.addToMap("#F5FFFA", "Mint cream"); +Color.addToMap("#98FF98", "Mint green"); +Color.addToMap("#FFE4E1", "Misty rose"); +Color.addToMap("#73A9C2", "Moonstone blue"); +Color.addToMap("#AE0C00", "Mordant red 19"); +Color.addToMap("#8A9A5B", "Moss green"); +Color.addToMap("#30BA8F", "Mountain Meadow"); +Color.addToMap("#997A8D", "Mountbatten pink"); +Color.addToMap("#18453B", "MSU Green"); +Color.addToMap("#306030", "Mughal green"); +Color.addToMap("#C54B8C", "Mulberry"); +Color.addToMap("#FFDB58", "Mustard"); +Color.addToMap("#317873", "Myrtle green"); +Color.addToMap("#F6ADC6", "Nadeshiko pink"); +Color.addToMap("#2A8000", "Napier green"); +Color.addToMap("#FFDEAD", "Navajo white"); +Color.addToMap("#000080", "Navy"); +Color.addToMap("#FFA343", "Neon Carrot"); +Color.addToMap("#FE4164", "Neon fuchsia"); +Color.addToMap("#39FF14", "Neon green"); +Color.addToMap("#214FC6", "New Car"); +Color.addToMap("#D7837F", "New York pink"); +Color.addToMap("#A4DDED", "Non-photo blue"); +Color.addToMap("#059033", "North Texas Green"); +Color.addToMap("#E9FFDB", "Nyanza"); +Color.addToMap("#0077BE", "Ocean Boat Blue"); +Color.addToMap("#CC7722", "Ochre"); +Color.addToMap("#43302E", "Old burgundy"); +Color.addToMap("#CFB53B", "Old gold"); +Color.addToMap("#FDF5E6", "Old lace"); +Color.addToMap("#796878", "Old lavender"); +Color.addToMap("#673147", "Old mauve"); +Color.addToMap("#867E36", "Old moss green"); +Color.addToMap("#C08081", "Old rose"); +Color.addToMap("#808000", "Olive"); +Color.addToMap("#6B8E23", "Olive Drab #3"); +Color.addToMap("#3C341F", "Olive Drab #7"); +Color.addToMap("#9AB973", "Olivine"); +Color.addToMap("#353839", "Onyx"); +Color.addToMap("#B784A7", "Opera mauve"); +Color.addToMap("#FF7F00", "Orange"); +Color.addToMap("#FF7538", "Orange (Crayola)"); +Color.addToMap("#FF5800", "Orange (Pantone)"); +Color.addToMap("#FB9902", "Orange (RYB)"); +Color.addToMap("#FFA500", "Orange (web)"); +Color.addToMap("#FF9F00", "Orange peel"); +Color.addToMap("#FF4500", "Orange-red"); +Color.addToMap("#DA70D6", "Orchid"); +Color.addToMap("#F2BDCD", "Orchid pink"); +Color.addToMap("#FB4F14", "Orioles orange"); +Color.addToMap("#414A4C", "Outer Space"); +Color.addToMap("#FF6E4A", "Outrageous Orange"); +Color.addToMap("#002147", "Oxford Blue"); +Color.addToMap("#990000", "Crimson Red"); +Color.addToMap("#006600", "Pakistan green"); +Color.addToMap("#273BE2", "Palatinate blue"); +Color.addToMap("#682860", "Palatinate purple"); +Color.addToMap("#BCD4E6", "Pale aqua"); +Color.addToMap("#AFEEEE", "Pale blue"); +Color.addToMap("#987654", "Pale brown"); +Color.addToMap("#9BC4E2", "Pale cerulean"); +Color.addToMap("#DDADAF", "Pale chestnut"); +Color.addToMap("#DA8A67", "Pale copper"); +Color.addToMap("#ABCDEF", "Pale cornflower blue"); +Color.addToMap("#E6BE8A", "Pale gold"); +Color.addToMap("#EEE8AA", "Pale goldenrod"); +Color.addToMap("#98FB98", "Pale green"); +Color.addToMap("#DCD0FF", "Pale lavender"); +Color.addToMap("#F984E5", "Pale magenta"); +Color.addToMap("#FADADD", "Pale pink"); +Color.addToMap("#DDA0DD", "Pale plum"); +Color.addToMap("#DB7093", "Pale red-violet"); +Color.addToMap("#96DED1", "Pale robin egg blue"); +Color.addToMap("#C9C0BB", "Pale silver"); +Color.addToMap("#ECEBBD", "Pale spring bud"); +Color.addToMap("#BC987E", "Pale taupe"); +Color.addToMap("#78184A", "Pansy purple"); +Color.addToMap("#009B7D", "Paolo Veronese green"); +Color.addToMap("#FFEFD5", "Papaya whip"); +Color.addToMap("#E63E62", "Paradise pink"); +Color.addToMap("#AEC6CF", "Pastel blue"); +Color.addToMap("#836953", "Pastel brown"); +Color.addToMap("#CFCFC4", "Pastel gray"); +Color.addToMap("#77DD77", "Pastel green"); +Color.addToMap("#F49AC2", "Pastel magenta"); +Color.addToMap("#FFB347", "Pastel orange"); +Color.addToMap("#DEA5A4", "Pastel pink"); +Color.addToMap("#B39EB5", "Pastel purple"); +Color.addToMap("#FF6961", "Pastel red"); +Color.addToMap("#CB99C9", "Pastel violet"); +Color.addToMap("#FDFD96", "Pastel yellow"); +Color.addToMap("#FFE5B4", "Peach"); +Color.addToMap("#FFCC99", "Peach-orange"); +Color.addToMap("#FFDAB9", "Peach puff"); +Color.addToMap("#FADFAD", "Peach-yellow"); +Color.addToMap("#D1E231", "Pear"); +Color.addToMap("#EAE0C8", "Pearl"); +Color.addToMap("#88D8C0", "Pearl Aqua"); +Color.addToMap("#B768A2", "Pearly purple"); +Color.addToMap("#E6E200", "Peridot"); +Color.addToMap("#1C39BB", "Persian blue"); +Color.addToMap("#00A693", "Persian green"); +Color.addToMap("#32127A", "Persian indigo"); +Color.addToMap("#D99058", "Persian orange"); +Color.addToMap("#F77FBE", "Persian pink"); +Color.addToMap("#701C1C", "Persian plum"); +Color.addToMap("#CC3333", "Persian red"); +Color.addToMap("#FE28A2", "Persian rose"); +Color.addToMap("#EC5800", "Persimmon"); +Color.addToMap("#CD853F", "Peru"); +Color.addToMap("#000F89", "Phthalo blue"); +Color.addToMap("#123524", "Phthalo green"); +Color.addToMap("#45B1E8", "Picton blue"); +Color.addToMap("#C30B4E", "Pictorial carmine"); +Color.addToMap("#FDDDE6", "Piggy pink"); +Color.addToMap("#01796F", "Pine green"); +Color.addToMap("#FFC0CB", "Pink"); +Color.addToMap("#D74894", "Pink (Pantone)"); +Color.addToMap("#FFDDF4", "Pink lace"); +Color.addToMap("#D8B2D1", "Pink lavender"); +Color.addToMap("#FF9966", "Pink-orange"); +Color.addToMap("#E7ACCF", "Pink pearl"); +Color.addToMap("#F78FA7", "Pink Sherbet"); +Color.addToMap("#93C572", "Pistachio"); +Color.addToMap("#E5E4E2", "Platinum"); +Color.addToMap("#8E4585", "Plum"); +Color.addToMap("#BE4F62", "Popstar"); +Color.addToMap("#FF5A36", "Portland Orange"); +Color.addToMap("#B0E0E6", "Powder blue"); +Color.addToMap("#FF8F00", "Princeton orange"); +Color.addToMap("#003153", "Prussian blue"); +Color.addToMap("#DF00FF", "Psychedelic purple"); +Color.addToMap("#CC8899", "Puce"); +Color.addToMap("#644117", "Pullman Brown (UPS Brown)"); +Color.addToMap("#FF7518", "Pumpkin"); +Color.addToMap("#800080", "Deep purple"); +Color.addToMap("#9F00C5", "Purple (Munsell)"); +Color.addToMap("#A020F0", "Purple"); +Color.addToMap("#69359C", "Purple Heart"); +Color.addToMap("#9678B6", "Purple mountain majesty"); +Color.addToMap("#4E5180", "Purple navy"); +Color.addToMap("#FE4EDA", "Purple pizzazz"); +Color.addToMap("#50404D", "Purple taupe"); +Color.addToMap("#9A4EAE", "Purpureus"); +Color.addToMap("#51484F", "Quartz"); +Color.addToMap("#436B95", "Queen blue"); +Color.addToMap("#E8CCD7", "Queen pink"); +Color.addToMap("#8E3A59", "Quinacridone magenta"); +Color.addToMap("#FF355E", "Radical Red"); +Color.addToMap("#FBAB60", "Rajah"); +Color.addToMap("#E30B5D", "Raspberry"); +Color.addToMap("#E25098", "Raspberry pink"); +Color.addToMap("#B3446C", "Raspberry rose"); +Color.addToMap("#826644", "Raw umber"); +Color.addToMap("#FF33CC", "Razzle dazzle rose"); +Color.addToMap("#E3256B", "Razzmatazz"); +Color.addToMap("#8D4E85", "Razzmic Berry"); +Color.addToMap("#FF0000", "Red"); +Color.addToMap("#EE204D", "Red (Crayola)"); +Color.addToMap("#F2003C", "Red (Munsell)"); +Color.addToMap("#C40233", "Red (NCS)"); +Color.addToMap("#ED1C24", "Red (pigment)"); +Color.addToMap("#FE2712", "Red (RYB)"); +Color.addToMap("#A52A2A", "Red-brown"); +Color.addToMap("#860111", "Red devil"); +Color.addToMap("#FF5349", "Red-orange"); +Color.addToMap("#E40078", "Red-purple"); +Color.addToMap("#C71585", "Red-violet"); +Color.addToMap("#A45A52", "Redwood"); +Color.addToMap("#522D80", "Regalia"); +Color.addToMap("#002387", "Resolution blue"); +Color.addToMap("#777696", "Rhythm"); +Color.addToMap("#004040", "Rich black"); +Color.addToMap("#F1A7FE", "Rich brilliant lavender"); +Color.addToMap("#D70040", "Rich carmine"); +Color.addToMap("#0892D0", "Rich electric blue"); +Color.addToMap("#A76BCF", "Rich lavender"); +Color.addToMap("#B666D2", "Rich lilac"); +Color.addToMap("#B03060", "Rich maroon"); +Color.addToMap("#444C38", "Rifle green"); +Color.addToMap("#704241", "Deep Roast coffee"); +Color.addToMap("#00CCCC", "Robin egg blue"); +Color.addToMap("#8A7F80", "Rocket metallic"); +Color.addToMap("#838996", "Roman silver"); +Color.addToMap("#F9429E", "Rose bonbon"); +Color.addToMap("#674846", "Rose ebony"); +Color.addToMap("#B76E79", "Rose gold"); +Color.addToMap("#FF66CC", "Rose pink"); +Color.addToMap("#C21E56", "Rose red"); +Color.addToMap("#905D5D", "Rose taupe"); +Color.addToMap("#AB4E52", "Rose vale"); +Color.addToMap("#65000B", "Rosewood"); +Color.addToMap("#D40000", "Rosso corsa"); +Color.addToMap("#BC8F8F", "Rosy brown"); +Color.addToMap("#0038A8", "Royal azure"); +Color.addToMap("#002366", "Royal blue"); +Color.addToMap("#4169E1", "Royal light blue"); +Color.addToMap("#CA2C92", "Royal fuchsia"); +Color.addToMap("#7851A9", "Royal purple"); +Color.addToMap("#FADA5E", "Royal yellow"); +Color.addToMap("#CE4676", "Ruber"); +Color.addToMap("#D10056", "Rubine red"); +Color.addToMap("#E0115F", "Ruby"); +Color.addToMap("#9B111E", "Ruby red"); +Color.addToMap("#FF0028", "Ruddy"); +Color.addToMap("#BB6528", "Ruddy brown"); +Color.addToMap("#E18E96", "Ruddy pink"); +Color.addToMap("#A81C07", "Rufous"); +Color.addToMap("#80461B", "Russet"); +Color.addToMap("#679267", "Russian green"); +Color.addToMap("#32174D", "Russian violet"); +Color.addToMap("#B7410E", "Rust"); +Color.addToMap("#DA2C43", "Rusty red"); +Color.addToMap("#8B4513", "Saddle brown"); +Color.addToMap("#FF6700", "Safety orange (blaze orange)"); +Color.addToMap("#EED202", "Safety yellow"); +Color.addToMap("#F4C430", "Saffron"); +Color.addToMap("#BCB88A", "Sage"); +Color.addToMap("#23297A", "St. Patrick's blue"); +Color.addToMap("#FA8072", "Salmon"); +Color.addToMap("#FF91A4", "Salmon pink"); +Color.addToMap("#C2B280", "Sand"); +Color.addToMap("#ECD540", "Sandstorm"); +Color.addToMap("#F4A460", "Sandy brown"); +Color.addToMap("#92000A", "Sangria"); +Color.addToMap("#507D2A", "Sap green"); +Color.addToMap("#0F52BA", "Sapphire"); +Color.addToMap("#0067A5", "Sapphire blue"); +Color.addToMap("#CBA135", "Satin sheen gold"); +Color.addToMap("#FF2400", "Scarlet"); +Color.addToMap("#FFD800", "School bus yellow"); +Color.addToMap("#76FF7A", "Screamin' Green"); +Color.addToMap("#006994", "Sea blue"); +Color.addToMap("#2E8B57", "Sea green"); +Color.addToMap("#321414", "Seal brown"); +Color.addToMap("#FFF5EE", "Seashell"); +Color.addToMap("#FFBA00", "Selective yellow"); +Color.addToMap("#704214", "Sepia"); +Color.addToMap("#8A795D", "Shadow"); +Color.addToMap("#778BA5", "Shadow blue"); +Color.addToMap("#FFCFF1", "Shampoo"); +Color.addToMap("#009E60", "Shamrock green"); +Color.addToMap("#8FD400", "Sheen Green"); +Color.addToMap("#D98695", "Shimmering Blush"); +Color.addToMap("#FC0FC0", "Shocking pink"); +Color.addToMap("#882D17", "Sienna"); +Color.addToMap("#C0C0C0", "Silver"); +Color.addToMap("#ACACAC", "Silver chalice"); +Color.addToMap("#5D89BA", "Silver Lake blue"); +Color.addToMap("#C4AEAD", "Silver pink"); +Color.addToMap("#BFC1C2", "Silver sand"); +Color.addToMap("#CB410B", "Sinopia"); +Color.addToMap("#007474", "Skobeloff"); +Color.addToMap("#87CEEB", "Sky blue"); +Color.addToMap("#CF71AF", "Sky magenta"); +Color.addToMap("#6A5ACD", "Slate blue"); +Color.addToMap("#708090", "Slate gray"); +Color.addToMap("#C84186", "Smitten"); +Color.addToMap("#738276", "Smoke"); +Color.addToMap("#933D41", "Smokey topaz"); +Color.addToMap("#100C08", "Smoky black"); +Color.addToMap("#FFFAFA", "Snow"); +Color.addToMap("#CEC8EF", "Soap"); +Color.addToMap("#893843", "Solid pink"); +Color.addToMap("#757575", "Sonic silver"); +Color.addToMap("#9E1316", "Spartan Crimson"); +Color.addToMap("#1D2951", "Space cadet"); +Color.addToMap("#807532", "Spanish bistre"); +Color.addToMap("#0070B8", "Spanish blue"); +Color.addToMap("#D10047", "Spanish carmine"); +Color.addToMap("#E51A4C", "Spanish crimson"); +Color.addToMap("#989898", "Spanish gray"); +Color.addToMap("#009150", "Spanish green"); +Color.addToMap("#E86100", "Spanish orange"); +Color.addToMap("#F7BFBE", "Spanish pink"); +Color.addToMap("#E60026", "Spanish red"); +Color.addToMap("#4C2882", "Spanish violet"); +Color.addToMap("#007F5C", "Spanish viridian"); +Color.addToMap("#0FC0FC", "Spiro Disco Ball"); +Color.addToMap("#A7FC00", "Spring bud"); +Color.addToMap("#00FF7F", "Spring green"); +Color.addToMap("#007BB8", "Star command blue"); +Color.addToMap("#4682B4", "Steel blue"); +Color.addToMap("#CC33CC", "Steel pink"); +Color.addToMap("#4F666A", "Stormcloud"); +Color.addToMap("#E4D96F", "Straw"); +Color.addToMap("#FC5A8D", "Strawberry"); +Color.addToMap("#FFCC33", "Sunglow"); +Color.addToMap("#E3AB57", "Sunray"); +Color.addToMap("#FAD6A5", "Sunset"); +Color.addToMap("#FD5E53", "Sunset orange"); +Color.addToMap("#CF6BA9", "Super pink"); +Color.addToMap("#D2B48C", "Tan"); +Color.addToMap("#F94D00", "Tangelo"); +Color.addToMap("#F28500", "Tangerine"); +Color.addToMap("#FFCC00", "Tangerine yellow"); +Color.addToMap("#483C32", "Dark Grayish Brown"); +Color.addToMap("#8B8589", "Taupe gray"); +Color.addToMap("#D0F0C0", "Tea green"); +Color.addToMap("#F4C2C2", "Tea rose"); +Color.addToMap("#008080", "Teal"); +Color.addToMap("#367588", "Teal blue"); +Color.addToMap("#99E6B3", "Teal deer"); +Color.addToMap("#00827F", "Teal green"); +Color.addToMap("#CF3476", "Telemagenta"); +Color.addToMap("#CD5700", "Tenne"); +Color.addToMap("#E2725B", "Terra cotta"); +Color.addToMap("#D8BFD8", "Thistle"); +Color.addToMap("#DE6FA1", "Thulian pink"); +Color.addToMap("#FC89AC", "Tickle Me Pink"); +Color.addToMap("#0ABAB5", "Tiffany Blue"); +Color.addToMap("#E08D3C", "Tiger's eye"); +Color.addToMap("#DBD7D2", "Timberwolf"); +Color.addToMap("#EEE600", "Titanium yellow"); +Color.addToMap("#FF6347", "Tomato"); +Color.addToMap("#746CC0", "Toolbox"); +Color.addToMap("#42B72A", "Toothpaste advert green"); +Color.addToMap("#FFC87C", "Topaz"); +Color.addToMap("#FD0E35", "Tractor red"); +Color.addToMap("#00755E", "Tropical rain forest"); +Color.addToMap("#0073CF", "True Blue"); +Color.addToMap("#417DC1", "Tufts Blue"); +Color.addToMap("#FF878D", "Tulip"); +Color.addToMap("#DEAA88", "Tumbleweed"); +Color.addToMap("#B57281", "Turkish rose"); +Color.addToMap("#40E0D0", "Turquoise"); +Color.addToMap("#00FFEF", "Turquoise blue"); +Color.addToMap("#A0D6B4", "Turquoise green"); +Color.addToMap("#7C4848", "Tuscan red"); +Color.addToMap("#C09999", "Tuscany"); +Color.addToMap("#8A496B", "Twilight lavender"); +Color.addToMap("#0033AA", "UA blue"); +Color.addToMap("#D9004C", "UA red"); +Color.addToMap("#8878C3", "Ube"); +Color.addToMap("#536895", "UCLA Blue"); +Color.addToMap("#FFB300", "UCLA Gold"); +Color.addToMap("#3CD070", "UFO Green"); +Color.addToMap("#120A8F", "Ultramarine"); +Color.addToMap("#4166F5", "Ultramarine blue"); +Color.addToMap("#FF6FFF", "Ultra pink"); +Color.addToMap("#635147", "Umber"); +Color.addToMap("#FFDDCA", "Unbleached silk"); +Color.addToMap("#5B92E5", "United Nations blue"); +Color.addToMap("#B78727", "University of California Gold"); +Color.addToMap("#FFFF66", "Unmellow yellow"); +Color.addToMap("#7B1113", "UP Maroon"); +Color.addToMap("#AE2029", "Upsdell red"); +Color.addToMap("#E1AD21", "Urobilin"); +Color.addToMap("#004F98", "USAFA blue"); +Color.addToMap("#F77F00", "University of Tennessee Orange"); +Color.addToMap("#D3003F", "Utah Crimson"); +Color.addToMap("#F3E5AB", "Vanilla"); +Color.addToMap("#F38FA9", "Vanilla ice"); +Color.addToMap("#C5B358", "Vegas gold"); +Color.addToMap("#C80815", "Venetian red"); +Color.addToMap("#43B3AE", "Verdigris"); +Color.addToMap("#E34234", "Medium vermilion"); +Color.addToMap("#D9381E", "Vermilion"); +Color.addToMap("#8F00FF", "Violet"); +Color.addToMap("#7F00FF", "Violet (color wheel)"); +Color.addToMap("#8601AF", "Violet (RYB)"); +Color.addToMap("#324AB2", "Violet-blue"); +Color.addToMap("#F75394", "Violet-red"); +Color.addToMap("#40826D", "Viridian"); +Color.addToMap("#009698", "Viridian green"); +Color.addToMap("#922724", "Vivid auburn"); +Color.addToMap("#9F1D35", "Vivid burgundy"); +Color.addToMap("#DA1D81", "Vivid cerise"); +Color.addToMap("#CC00FF", "Vivid orchid"); +Color.addToMap("#00CCFF", "Vivid sky blue"); +Color.addToMap("#FFA089", "Vivid tangerine"); +Color.addToMap("#9F00FF", "Vivid violet"); +Color.addToMap("#004242", "Warm black"); +Color.addToMap("#A4F4F9", "Waterspout"); +Color.addToMap("#645452", "Wenge"); +Color.addToMap("#F5DEB3", "Wheat"); +Color.addToMap("#FFFFFF", "White"); +Color.addToMap("#F5F5F5", "White smoke"); +Color.addToMap("#A2ADD0", "Wild blue yonder"); +Color.addToMap("#D470A2", "Wild orchid"); +Color.addToMap("#FF43A4", "Wild Strawberry"); +Color.addToMap("#FC6C85", "Wild watermelon"); +Color.addToMap("#FD5800", "Willpower orange"); +Color.addToMap("#A75502", "Windsor tan"); +Color.addToMap("#722F37", "Wine"); +Color.addToMap("#C9A0DC", "Wisteria"); +Color.addToMap("#C19A6B", "Wood brown"); +Color.addToMap("#738678", "Xanadu"); +Color.addToMap("#0F4D92", "Yale Blue"); +Color.addToMap("#1C2841", "Yankees blue"); +Color.addToMap("#FCE883", "Yellow (Crayola)"); +Color.addToMap("#EFCC00", "Yellow (Munsell)"); +Color.addToMap("#FEDF00", "Yellow (Pantone)"); +Color.addToMap("#FEFE33", "Yellow"); +Color.addToMap("#9ACD32", "Yellow Green"); +Color.addToMap("#FFAE42", "Yellow Orange"); +Color.addToMap("#FFF000", "Yellow rose"); +Color.addToMap("#0014A8", "Zaffre"); +Color.addToMap("#2C1608", "Zinnwaldite brown"); +Color.addToMap("#39A78E", "Zomp"); diff --git a/include/LICENSE b/include/LICENSE new file mode 100644 index 0000000..810fce6 --- /dev/null +++ b/include/LICENSE @@ -0,0 +1,621 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS diff --git a/include/NoteQuota.js b/include/NoteQuota.js new file mode 100644 index 0000000..4cd0c1f --- /dev/null +++ b/include/NoteQuota.js @@ -0,0 +1,86 @@ + +var exports = (function() { + + var NoteQuota = function(cb) { + this.cb = cb; + this.setParams(); + this.resetPoints(); + }; + + NoteQuota.PARAMS_LOBBY = {allowance: 200, max: 600}; + NoteQuota.PARAMS_NORMAL = {allowance: 400, max: 1200}; + NoteQuota.PARAMS_RIDICULOUS = {allowance: 600, max: 1800}; + NoteQuota.PARAMS_OFFLINE = {allowance: 8000, max: 24000, maxHistLen: 3}; + NoteQuota.PARAMS_UNLIMITED = {allowance: 1000000, max: 3000000, maxHistLen: 3}; + + NoteQuota.prototype.getParams = function() { + return { + m: "nq", + allowance: this.allowance, + max: this.max, + maxHistLen: this.maxHistLen + }; + }; + + NoteQuota.prototype.setParams = function(params) { + params = params || NoteQuota.PARAMS_OFFLINE; + var allowance = params.allowance || this.allowance || NoteQuota.PARAMS_OFFLINE.allowance; + var max = params.max || this.max || NoteQuota.PARAMS_OFFLINE.max; + var maxHistLen = params.maxHistLen || this.maxHistLen || NoteQuota.PARAMS_OFFLINE.maxHistLen; + if(allowance !== this.allowance || max !== this.max || maxHistLen !== this.maxHistLen) { + this.allowance = allowance; + this.max = max; + this.maxHistLen = maxHistLen; + this.resetPoints(); + return true; + } + return false; + }; + + NoteQuota.prototype.resetPoints = function() { + this.points = this.max; + this.history = []; + for(var i = 0; i < this.maxHistLen; i++) + this.history.unshift(this.points); + if(this.cb) this.cb(this.points); + }; + + NoteQuota.prototype.tick = function() { + // keep a brief history + this.history.unshift(this.points); + this.history.length = this.maxHistLen; + // hook a brother up with some more quota + if(this.points < this.max) { + this.points += this.allowance; + if(this.points > this.max) this.points = this.max; + // fire callback + if(this.cb) this.cb(this.points); + } + }; + + NoteQuota.prototype.spend = function(needed) { + // check whether aggressive limitation is needed + var sum = 0; + for(var i in this.history) { + sum += this.history[i]; + } + if(sum <= 0) needed *= this.allowance; + // can they afford it? spend + if(this.points < needed) { + return false; + } else { + this.points -= needed; + if(this.cb) this.cb(this.points); // fire callback + return true; + } + }; + + return NoteQuota; + +})(); + +if(typeof module !== "undefined") { + module.exports = exports; +} else { + this.NoteQuota = exports; +} diff --git a/include/arrow.png b/include/arrow.png new file mode 100644 index 0000000..4eae4b5 Binary files /dev/null and b/include/arrow.png differ diff --git a/include/crown.png b/include/crown.png new file mode 100644 index 0000000..70c9e8a Binary files /dev/null and b/include/crown.png differ diff --git a/include/crownsolo.png b/include/crownsolo.png new file mode 100644 index 0000000..31148f0 Binary files /dev/null and b/include/crownsolo.png differ diff --git a/include/cursor.png b/include/cursor.png new file mode 100644 index 0000000..397ce80 Binary files /dev/null and b/include/cursor.png differ diff --git a/include/discord.ico b/include/discord.ico new file mode 100644 index 0000000..0896a71 Binary files /dev/null and b/include/discord.ico differ diff --git a/include/ebsprite.js b/include/ebsprite.js new file mode 100644 index 0000000..4ba53c5 --- /dev/null +++ b/include/ebsprite.js @@ -0,0 +1,268 @@ +if(typeof module !== "undefined") { + module.exports = ebsprite; +} else { + this.ebsprite = ebsprite; +} + +var spriteData = [{"name":"Ness","sprites":["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"]},{"name":"Paula","sprites":["17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32"]},{"name":"Jeff","sprites":["33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48"]},{"name":"Poo","sprites":["49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64"]},{"name":"Robot Ness","sprites":["65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80"]},{"name":"Ness in pajamas","sprites":["81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96"]},{"name":"Ness on bicycle","sprites":["97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112"]},{"name":"Ness angel","sprites":["113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128"]},{"name":"Paula angel","sprites":["129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144"]},{"name":"Jeff angel","sprites":["145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160"]},{"name":"Poo angel","sprites":["161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176"]},{"name":"Diamondized person","sprites":["177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192"]},{"name":"Charred person","sprites":["193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208"]},{"name":"Ness doing peace sign","sprites":["209","210","211","212","213","214","215","216"]},{"name":"Jeff in bed","sprites":["217","218","219","220","221","222","223","224"]},{"name":"Ness lying down","sprites":["225","226","227","228","229","230","231","232"]},{"name":"Ness climbing","sprites":["233","234","235","236","237","238","239","240"]},{"name":"Paula climbing","sprites":["241","242","243","244","245","246","247","248"]},{"name":"Jeff climbing","sprites":["249","250","251","252","253","254","255","256"]},{"name":"Poo climbing","sprites":["257","258","259","260","261","262","263","264"]},{"name":"Ness climbing down","sprites":["265","266","267","268","269","270","271","272"]},{"name":"Paula climbing down","sprites":["273","274","275","276","277","278","279","280"]},{"name":"Jeff climbing down","sprites":["281","282","283","284","285","286","287","288"]},{"name":"Poo climbing down","sprites":["289","290","291","292","293","294","295","296"]},{"name":"Robot","sprites":["297","298","299","300","301","302","303","304","305","306","307","308","309","310","311","312"]},{"name":"Robot on the ground","sprites":["313","314","315","316","317","318","319","320"]},{"name":"Li'l Ness","sprites":["321","322","323","324","325","326","327","328","329","330","331","332","333","334","335","336"]},{"name":"Li'l Paula","sprites":["337","338","339","340","341","342","343","344","345","346","347","348","349","350","351","352"]},{"name":"Li'l Jeff","sprites":["353","354","355","356","357","358","359","360","361","362","363","364","365","366","367","368"]},{"name":"Li'l Poo","sprites":["369","370","371","372","373","374","375","376","377","378","379","380","381","382","383","384"]},{"name":"Li'l Escargo Express Guy","sprites":["385","386","387","388","389","390","391","392"]},{"name":"Li'l Mach Pizza Guy","sprites":["393","394","395","396","397","398","399","400"]},{"name":"Li'l gift box","sprites":["401","402","403","404","405","406","407","408"]},{"name":"Li'l angel","sprites":["409","410","411","412","413","414","415","416","417","418","419","420","421","422","423","424"]},{"name":"Li'l teddy bear","sprites":["425","426","427","428","429","430","431","432","433","434","435","436","437","438","439","440"]},{"name":"Li'l diamondized guy","sprites":["441","442","443","444","445","446","447","448","449","450","451","452","453","454","455","456"]},{"name":"Li'l charred guy","sprites":["457","458","459","460","461","462","463","464","465","466","467","468","469","470","471","472"]},{"name":"Li'l Ness doing peace sign","sprites":["473","474","475","476","477","478","479","480"]},{"name":"Flying Man","sprites":["481","482","483","484","485","486","487","488","489","490","491","492","493","494","495","496"]},{"name":"King","sprites":["497","498","499","500","501","502","503","504","505","506","507","508","509","510","511","512"]},{"name":"Brick Road","sprites":["513","514","515","516","517","518","519","520","521","522","523","524","525","526","527","528"]},{"name":"King climbing up","sprites":["529","530","531","532","533","534","535","536"]},{"name":"King climbing down","sprites":["537","538","539","540","541","542","543","544"]},{"name":"Pokey","sprites":["545","546","547","548","549","550","551","552","553","554","555","556","557","558","559","560"]},{"name":"Picky","sprites":["561","562","563","564","565","566","567","568","569","570","571","572","573","574","575","576"]},{"name":"Bubble Monkey","sprites":["577","578","579","580","581","582","583","584","585","586","587","588","589","590","591","592"]},{"name":"Bubble Monkey climbing up","sprites":["593","594","595","596","597","598","599","600","601","602","603","604","605","606","607","608"]},{"name":"Pokey in his suit","sprites":["609","610","611","612","613","614","615","616","617","618","619","620","621","622","623","624"]},{"name":"B. Monkey and li'l bubble","sprites":["625","626","627","628","629","630","631","632"]},{"name":"B. Monkey, floating","sprites":["633","634","635","636","637","638","639","640"]},{"name":"Teddy bear","sprites":["641","642","643","644","645","646","647","648","649","650","651","652","653","654","655","656"]},{"name":"Old guy with cane","sprites":["657","658","659","660","661","662","663","664"]},{"name":"Old lady with cane","sprites":["665","666","667","668","669","670","671","672"]},{"name":"Old fat guy with hat","sprites":["673","674","675","676","677","678","679","680"]},{"name":"Guy in blue clothes","sprites":["681","682","683","684","685","686","687","688"]},{"name":"Sorta bald guy in suit","sprites":["689","690","691","692","693","694","695","696"]},{"name":"Brunette shopping lady","sprites":["697","698","699","700","701","702","703","704"]},{"name":"Blonde shopping lady","sprites":["705","706","707","708","709","710","711","712"]},{"name":"Fat guy in red suit","sprites":["713","714","715","716","717","718","719","720"]},{"name":"Drinking guy","sprites":["721","722","723","724","725","726","727","728"]},{"name":"Blonde guy in a suit","sprites":["729","730","731","732","733","734","735","736"]},{"name":"Dark-haired guy in a suit","sprites":["737","738","739","740","741","742","743","744"]},{"name":"Sneaky guy with a hat","sprites":["745","746","747","748","749","750","751","752"]},{"name":"Nerdy red-haired guy","sprites":["753","754","755","756","757","758","759","760"]},{"name":"Blonde lady w/ blue dress","sprites":["761","762","763","764","765","766","767","768"]},{"name":"Blonde lady w/ red dress","sprites":["769","770","771","772","773","774","775","776"]},{"name":"Elevator lady","sprites":["777","778","779","780","781","782","783","784"]},{"name":"Blonde happy lady","sprites":["785","786","787","788","789","790","791","792"]},{"name":"Unassuming local guy","sprites":["793","794","795","796","797","798","799","800"]},{"name":"Young blonde guy in blue","sprites":["801","802","803","804","805","806","807","808"]},{"name":"Surfer","sprites":["809","810","811","812","813","814","815","816"]},{"name":"Beach lady","sprites":["817","818","819","820","821","822","823","824"]},{"name":"Hotel attendant","sprites":["825","826","827","828","829","830","831","832"]},{"name":"Cop in sunglasses","sprites":["833","834","835","836","837","838","839","840"]},{"name":"Captain Strong","sprites":["841","842","843","844","845","846","847","848"]},{"name":"Travelling entertainer","sprites":["849","850","851","852","853","854","855","856"]},{"name":"Trumpet person","sprites":["857","858","859","860","861","862","863","864"]},{"name":"Jamaican guy","sprites":["865","866","867","868","869","870","871","872"]},{"name":"Mr. T","sprites":["873","874","875","876","877","878","879","880"]},{"name":"Guy in swimming suit","sprites":["881","882","883","884","885","886","887","888"]},{"name":"Girl in bikini","sprites":["889","890","891","892","893","894","895","896"]},{"name":"Bus driver head","sprites":["897","898","899","900","901","902","903","904"]},{"name":"Tessie watcher","sprites":["905","906","907","908","909","910","911","912"]},{"name":"Jackie","sprites":["913","914","915","916","917","918","919","920"]},{"name":"Punk guy","sprites":["921","922","923","924","925","926","927","928"]},{"name":"Weirdo guy in swim trunks","sprites":["929","930","931","932","933","934","935","936"]},{"name":"Zombie lady","sprites":["937","938","939","940","941","942","943","944"]},{"name":"Dalaamese servant","sprites":["945","946","947","948","949","950","951","952"]},{"name":"Chinese girl","sprites":["953","954","955","956","957","958","959","960"]},{"name":"Ship captain","sprites":["961","962","963","964","965","966","967","968"]},{"name":"Ship crewman","sprites":["969","970","971","972","973","974","975","976"]},{"name":"Lady in veil","sprites":["977","978","979","980","981","982","983","984"]},{"name":"Happy turban guy","sprites":["985","986","987","988","989","990","991","992"]},{"name":"Big nose Arab guy","sprites":["993","994","995","996","997","998","999","1000"]},{"name":"Mustache Arab turban guy","sprites":["1001","1002","1003","1004","1005","1006","1007","1008"]},{"name":"Arab Mr. T","sprites":["1009","1010","1011","1012","1013","1014","1015","1016"]},{"name":"Tenda","sprites":["1017","1018","1019","1020","1021","1022","1023","1024","1025"]},{"name":"Star Master guy","sprites":["1026","1027","1028","1029","1030","1031","1032","1033"]},{"name":"Weird horned guy","sprites":["1034","1035","1036","1037","1038","1039","1040","1041"]},{"name":"Flower","sprites":["1042","1043","1044","1045","1046","1047","1048","1049"]},{"name":"Insane Cultist","sprites":["1050","1051","1052","1053","1054","1055","1056","1057"]},{"name":"Tribal warrior","sprites":["1058","1059","1060","1061","1062","1063","1064","1065"]},{"name":"Palm tan guy","sprites":["1066","1067","1068","1069","1070","1071","1072","1073"]},{"name":"Sun bathing girl","sprites":["1074","1075","1076","1077","1078","1079","1080","1081"]},{"name":"Chinese monk guy","sprites":["1082","1083","1084","1085","1086","1087","1088","1089"]},{"name":"Invisible","sprites":["1090","1091","1092","1093","1094","1095","1096","1097"]},{"name":"Rabbit","sprites":["1098","1099","1100","1101","1102","1103","1104","1105"]},{"name":"Big smile lady","sprites":["1106","1107","1108","1109","1110","1111","1112","1113"]},{"name":"Bodyguard","sprites":["1114","1115","1116","1117","1118","1119","1120","1121"]},{"name":"Mexican guy","sprites":["1122","1123","1124","1125","1126","1127","1128","1129"]},{"name":"Bus driver","sprites":["1130","1131","1132","1133","1134","1135","1136","1137"]},{"name":"Blonde guy in blue suit","sprites":["1138","1139","1140","1141","1142","1143","1144","1145"]},{"name":"Some brunette kid","sprites":["1146","1147","1148","1149","1150","1151","1152","1153"]},{"name":"\"I love qowga\" shirt guy","sprites":["1154","1155","1156","1157","1158","1159","1160","1161"]},{"name":"Scuzzy guy","sprites":["1162","1163","1164","1165","1166","1167","1168","1169"]},{"name":"Red clothes person","sprites":["1170","1171","1172","1173","1174","1175","1176","1177"]},{"name":"Orange haired nerd kid","sprites":["1178","1179","1180","1181","1182","1183","1184","1185"]},{"name":"Tough guy w/ sunglasses","sprites":["1186","1187","1188","1189","1190","1191","1192","1193"]},{"name":"Shy guy","sprites":["1194","1195","1196","1197","1198","1199","1200","1201"]},{"name":"Pigtail blonde girl","sprites":["1202","1203","1204","1205","1206","1207","1208","1209"]},{"name":"Pigtail dark haired girl","sprites":["1210","1211","1212","1213","1214","1215","1216","1217"]},{"name":"Yellow clothes blonde","sprites":["1218","1219","1220","1221","1222","1223","1224","1225"]},{"name":"Little kid in blue","sprites":["1226","1227","1228","1229","1230","1231","1232","1233"]},{"name":"Kid in baseball helmet","sprites":["1234","1235","1236","1237","1238","1239","1240","1241"]},{"name":"Kid in derby hat","sprites":["1242","1243","1244","1245","1246","1247","1248","1249"]},{"name":"Kid in detective hat","sprites":["1250","1251","1252","1253","1254","1255","1256","1257"]},{"name":"Blonde ponytail girl","sprites":["1258","1259","1260","1261","1262","1263","1264","1265"]},{"name":"Happy girl in red","sprites":["1266","1267","1268","1269","1270","1271","1272","1273"]},{"name":"Chick","sprites":["1274","1275","1276","1277","1278","1279","1280","1281"]},{"name":"Dog","sprites":["1282","1283","1284","1285","1286","1287","1288","1289"]},{"name":"Cat","sprites":["1290","1291","1292","1293","1294","1295","1296","1297"]},{"name":"Bird on perch","sprites":["1298","1299","1300","1301","1302","1303","1304","1305"]},{"name":"Monkey","sprites":["1306","1307","1308","1309","1310","1311","1312","1313"]},{"name":"Blue cow","sprites":["1314","1315","1316","1317","1318","1319","1320","1321"]},{"name":"Escargo Express guy","sprites":["1322","1323","1324","1325","1326","1327","1328","1329"]},{"name":"Hint guy","sprites":["1330","1331","1332","1333","1334","1335","1336","1337"]},{"name":"Baker","sprites":["1338","1339","1340","1341","1342","1343","1344","1345"]},{"name":"Girl in striped apron","sprites":["1346","1347","1348","1349","1350","1351","1352","1353"]},{"name":"Doctor","sprites":["1354","1355","1356","1357","1358","1359","1360","1361"]},{"name":"Nurse","sprites":["1362","1363","1364","1365","1366","1367","1368","1369"]},{"name":"Thick glasses lady","sprites":["1370","1371","1372","1373","1374","1375","1376","1377"]},{"name":"Waitress","sprites":["1378","1379","1380","1381","1382","1383","1384","1385"]},{"name":"Camera guy","sprites":["1386","1387","1388","1389","1390","1391","1392","1393"]},{"name":"Hidden arms dealer","sprites":["1394","1395","1396","1397","1398","1399","1400","1401"]},{"name":"Mom","sprites":["1402","1403","1404","1405","1406","1407","1408","1409"]},{"name":"Tracy","sprites":["1410","1411","1412","1413","1414","1415","1416","1417"]},{"name":"Aloysius Minch","sprites":["1418","1419","1420","1421","1422","1423","1424","1425"]},{"name":"Lardna Minch","sprites":["1426","1427","1428","1429","1430","1431","1432","1433"]},{"name":"Gorgeous","sprites":["1434","1435","1436","1437","1438","1439","1440","1441","1442","1443","1444","1445","1446","1447","1448","1449"]},{"name":"Lucky","sprites":["1450","1451","1452","1453","1454","1455","1456","1457","1458","1459","1460","1461","1462","1463","1464","1465"]},{"name":"Mach Pizza guy","sprites":["1466","1467","1468","1469","1470","1471","1472","1473"]},{"name":"Lier X. Agerate","sprites":["1474","1475","1476","1477","1478","1479","1480","1481"]},{"name":"Frank","sprites":["1482","1483","1484","1485","1486","1487","1488","1489"]},{"name":"Mayor Pirkle","sprites":["1490","1491","1492","1493","1494","1495","1496","1497"]},{"name":"Paula's father","sprites":["1498","1499","1500","1501","1502","1503","1504","1505"]},{"name":"Paula's mother","sprites":["1506","1507","1508","1509","1510","1511","1512","1513"]},{"name":"Everdred","sprites":["1514","1515","1516","1517","1518","1519","1520","1521"]},{"name":"Poochyfud","sprites":["1522","1523","1524","1525","1526","1527","1528","1529"]},{"name":"Mr. Carpainter","sprites":["1530","1531","1532","1533","1534","1535","1536","1537"]},{"name":"Female monkey","sprites":["1538","1539","1540","1541","1542","1543","1544","1545"]},{"name":"Brick Road","sprites":["1546","1547","1548","1549","1550","1551","1552","1553"]},{"name":"Dr. Andonuts","sprites":["1554","1555","1556","1557","1558","1559","1560","1561"]},{"name":"Dalaam girl","sprites":["1562","1563","1564","1565","1566","1567","1568","1569"]},{"name":"Monotoli","sprites":["1570","1571","1572","1573","1574","1575","1576","1577"]},{"name":"Venus","sprites":["1578","1579","1580","1581","1582","1583","1584","1585"]},{"name":"Poo's master","sprites":["1586","1587","1588","1589","1590","1591","1592","1593"]},{"name":"Telephone head guy","sprites":["1594","1595","1596","1597","1598","1599","1600","1601"]},{"name":"Preet proot guy","sprites":["1602","1603","1604","1605","1606","1607","1608","1609"]},{"name":"Star Master flying away","sprites":["1610","1611","1612","1613","1614","1615","1616","1617"]},{"name":"Tenda chief","sprites":["1618","1619","1620","1621","1622","1623","1624","1625"]},{"name":"Mr. Saturn","sprites":["1626","1627","1628","1629","1630","1631","1632","1633"]},{"name":"Miner","sprites":["1634","1635","1636","1637","1638","1639","1640","1641"]},{"name":"Miner's brother","sprites":["1642","1643","1644","1645","1646","1647","1648","1649"]},{"name":"Fourside museum guy","sprites":["1650","1651","1652","1653","1654","1655","1656","1657"]},{"name":"Orange Kid","sprites":["1658","1659","1660","1661","1662","1663","1664","1665"]},{"name":"Apple Kid","sprites":["1666","1667","1668","1669","1670","1671","1672","1673"]},{"name":"Talah Rama","sprites":["1674","1675","1676","1677","1678","1679","1680","1681"]},{"name":"Venus' mother","sprites":["1682","1683","1684","1685","1686","1687","1688","1689"]},{"name":"Brick Road head","sprites":["1690","1691","1692","1693","1694","1695","1696","1697"]},{"name":"Everdred lying down","sprites":["1698","1699","1700","1701","1702","1703","1704","1705"]},{"name":"Magic cake lady","sprites":["1706","1707","1708","1709","1710","1711","1712","1713"]},{"name":"Tony","sprites":["1714","1715","1716","1717","1718","1719","1720","1721","1722","1723","1724","1725","1726","1727","1728","1729"]},{"name":"Tony in bed","sprites":["1730","1731","1732","1733","1734","1735","1736","1737"]},{"name":"Gorgeous dancing","sprites":["1738","1739","1740","1741","1742","1743","1744","1745"]},{"name":"Runaway Five drummer","sprites":["1746","1747","1748","1749","1750","1751","1752","1753"]},{"name":"Runaway Five bass player","sprites":["1754","1755","1756","1757","1758","1759","1760","1761"]},{"name":"Runaway Five sax player","sprites":["1762","1763","1764","1765","1766","1767","1768","1769"]},{"name":"Helpful mole","sprites":["1770","1771","1772","1773","1774","1775","1776","1777"]},{"name":"Healer","sprites":["1778","1779","1780","1781","1782","1783","1784","1785"]},{"name":"Music notes","sprites":["1786","1787","1788","1789","1790","1791","1792","1793"]},{"name":"Pu pu","sprites":["1794","1795","1796","1797","1798","1799","1800","1801"]},{"name":"Zzz","sprites":["1802","1803","1804","1805","1806","1807","1808","1809"]},{"name":"weird white bubble thing","sprites":["1810","1811","1812","1813","1814","1815","1816","1817"]},{"name":"Light bulb","sprites":["1818","1819","1820","1821","1822","1823","1824","1825"]},{"name":"Mystical Record","sprites":["1826","1827","1828","1829","1830","1831","1832","1833"]},{"name":"Weird question mark","sprites":["1834","1835","1836","1837","1838","1839","1840","1841"]},{"name":"Meteor","sprites":["1842","1843","1844","1845","1846","1847","1848","1849"]},{"name":"Bench","sprites":["1850","1851","1852","1853","1854","1855","1856","1857"]},{"name":"Police barrier","sprites":["1858","1859","1860","1861","1862","1863","1864","1865"]},{"name":"Weird tail thing","sprites":["1866","1867","1868","1869","1870","1871","1872","1873"]},{"name":"Streetlight","sprites":["1874","1875","1876","1877","1878","1879","1880","1881"]},{"name":"Bus stop sign","sprites":["1882","1883","1884","1885","1886","1887","1888","1889"]},{"name":"Oval cloud","sprites":["1890","1891","1892","1893","1894","1895","1896","1897"]},{"name":"Street sign","sprites":["1898","1899","1900","1901","1902","1903","1904","1905"]},{"name":"City bus","sprites":["1906","1907","1908","1909","1910","1911","1912","1913","1914","1915","1916","1917","1918","1919","1920","1921"]},{"name":"Real taxi","sprites":["1922","1923","1924","1925","1926","1927","1928","1929","1930","1931","1932","1933","1934","1935","1936","1937"]},{"name":"Delivery truck","sprites":["1938","1939","1940","1941","1942","1943","1944","1945"]},{"name":"White delivery truck","sprites":["1946","1947","1948","1949","1950","1951","1952","1953"]},{"name":"Sky runner","sprites":["1954","1955","1956","1957","1958","1959","1960","1961"]},{"name":"Phase Distorter","sprites":["1962","1963","1964","1965","1966","1967","1968","1969"]},{"name":"Bicycle","sprites":["1970","1971","1972","1973","1974","1975","1976","1977"]},{"name":"Ship","sprites":["1978","1979","1980","1981","1982","1983","1984","1985"]},{"name":"Sign","sprites":["1986","1987","1988","1989","1990","1991","1992","1993"]},{"name":"Trash can","sprites":["1994","1995","1996","1997","1998","1999","2000","2001"]},{"name":"Telephone","sprites":["2002","2003","2004","2005","2006","2007","2008","2009"]},{"name":"Pay phone","sprites":["2010","2011","2012","2013","2014","2015","2016","2017"]},{"name":"Weird think marks","sprites":["2018","2019","2020","2021","2022","2023","2024","2025"]},{"name":"Surprise mark","sprites":["2026","2027","2028","2029","2030","2031","2032","2033"]},{"name":"Sweat","sprites":["2034","2035","2036","2037","2038","2039","2040","2041"]},{"name":"Twinkling stars","sprites":["2042","2043","2044","2045","2046","2047","2048","2049"]},{"name":"Pharaoh casket","sprites":["2050","2051","2052","2053","2054","2055","2056","2057"]},{"name":"sweat","sprites":["2058","2059","2060","2061","2062","2063","2064","2065"]},{"name":"Apple","sprites":["2066","2067","2068","2069","2070","2071","2072","2073"]},{"name":"Bananas","sprites":["2074","2075","2076","2077","2078","2079","2080","2081"]},{"name":"Can","sprites":["2082","2083","2084","2085","2086","2087","2088","2089"]},{"name":"Little mushroom","sprites":["2090","2091","2092","2093","2094","2095","2096","2097"]},{"name":"Mailbox","sprites":["2098","2099","2100","2101","2102","2103","2104","2105"]},{"name":"DON'T ENTER sign","sprites":["2106","2107","2108","2109","2110","2111","2112","2113"]},{"name":"Magic Tart stand","sprites":["2114","2115","2116","2117","2118","2119","2120","2121"]},{"name":"Shadow","sprites":["2122","2123","2124","2125","2126","2127","2128","2129"]},{"name":"Crossroad signs","sprites":["2130","2131","2132","2133","2134","2135","2136","2137"]},{"name":"Exclamation mark","sprites":["2138","2139","2140","2141","2142","2143","2144","2145"]},{"name":"Dalaam present","sprites":["2146","2147","2148","2149","2150","2151","2152","2153"]},{"name":"Jukebox","sprites":["2154","2155","2156","2157","2158","2159","2160","2161"]},{"name":"Slot machine","sprites":["2162","2163","2164","2165","2166","2167","2168","2169"]},{"name":"Pile of bones","sprites":["2170","2171","2172","2173","2174","2175","2176","2177"]},{"name":"Sesame seed","sprites":["2178","2179","2180","2181","2182","2183","2184","2185"]},{"name":"Cross gravestone","sprites":["2194","2195","2196","2197","2198","2199","2200","2201"]},{"name":"Broken phase distorter","sprites":["2202","2203","2204","2205","2206","2207","2208","2209"]},{"name":"Garbage","sprites":["2210","2211","2212","2213","2214","2215","2216","2217"]},{"name":"Star Master's Poof Cloud","sprites":["2218","2219","2220","2221","2222","2223","2224","2225"]},{"name":"Runaway 5 bus","sprites":["2226","2227","2228","2229","2230","2231","2232","2233","2234","2235","2236","2237","2238","2239","2240","2241"]},{"name":"Submarine","sprites":["2242","2243","2244","2245","2246","2247","2248","2249"]},{"name":"Submarine periscope","sprites":["2250","2251","2252","2253","2254","2255","2256","2257"]},{"name":"Broken Mani-Mani statue","sprites":["2258","2259","2260","2261","2262","2263","2264","2265"]},{"name":"Jar of fly honey","sprites":["2274","2275","2276","2277","2278","2279","2280","2281"]},{"name":"Cell door","sprites":["2282","2283","2284","2285","2286","2287","2288","2289"]},{"name":"Coffee Wiggles","sprites":["2290","2291","2292","2293","2294","2295","2296","2297"]},{"name":"Water ripple","sprites":["2298","2299","2300","2301","2302","2303","2304","2305"]},{"name":"Tessie","sprites":["2306","2307","2308","2309","2310","2311","2312","2313"]},{"name":"Drum rim","sprites":["2314","2315","2316","2317","2318","2319","2320","2321"]},{"name":"Big dirt scooper","sprites":["2322","2323","2324","2325","2326","2327","2328","2329"]},{"name":"Guy in cool red car","sprites":["2330","2331","2332","2333","2334","2335","2336","2337"]},{"name":"Flame?","sprites":["2338","2339","2340","2341","2342","2343","2344","2345"]},{"name":"Fountain of Healing","sprites":["2346","2347","2348","2349","2350","2351","2352","2353"]},{"name":"Shiny Enemy Outside","sprites":["2354","2355","2356","2357","2358","2359","2360","2361"]},{"name":"ATM machine","sprites":["2362","2363","2364","2365","2366","2367","2368","2369"]},{"name":"Talking stone","sprites":["2370","2371","2372","2373","2374","2375","2376","2377"]},{"name":"Ship","sprites":["2378","2379","2380","2381","2382","2383","2384","2385"]},{"name":"Casket","sprites":["2386","2387","2388","2389","2390","2391","2392","2393"]},{"name":"Mr. Saturn ball and chain","sprites":["2394","2395","2396","2397","2398","2399","2400","2401"]},{"name":"Mini-ghost","sprites":["2402","2403","2404","2405","2406","2407","2408","2409"]},{"name":"Pencil statue","sprites":["2410","2411","2412","2413","2414","2415","2416","2417"]},{"name":"Tree in pot","sprites":["2418","2419","2420","2421","2422","2423","2424","2425"]},{"name":"Pyramid door","sprites":["2426","2427","2428","2429","2430","2431","2432","2433"]},{"name":"Li'l talking stone","sprites":["2434","2435","2436","2437","2438","2439","2440","2441"]},{"name":"Star","sprites":["2442","2443","2444","2445","2446","2447","2448","2449"]},{"name":"Weird Junk","sprites":["2450","2451","2452","2453","2454","2455","2456","2457"]},{"name":"Boogy Tent eye","sprites":["2458","2459","2460","2461","2462","2463","2464","2465"]},{"name":"Boogy Tent mouth","sprites":["2466","2467","2468","2469","2470","2471","2472","2473"]},{"name":"Microphone","sprites":["2474","2475","2476","2477","2478","2479","2480","2481"]},{"name":"Mr. Batty","sprites":["2482","2483","2484","2485","2486","2487","2488","2489","2490"]},{"name":"Clumsy Robot","sprites":["2491","2492","2493","2494","2495","2496","2497","2498"]},{"name":"Electro Swoosh","sprites":["2499","2500","2501","2502","2503","2504","2505","2506"]},{"name":"French Kiss of Death","sprites":["2507","2508","2509","2510","2511","2512","2513","2514"]},{"name":"Fobby","sprites":["2515","2516","2517","2518","2519","2520","2521","2522"]},{"name":"Robo-pump","sprites":["2523","2524","2525","2526","2527","2528","2529","2530"]},{"name":"Armored Frog","sprites":["2531","2532","2533","2534","2535","2536","2537","2538"]},{"name":"Apple Kid's Mouse","sprites":["2539","2540","2541","2542","2543","2544","2545","2546"]},{"name":"Spiteful Crow","sprites":["2547","2548","2549","2550","2551","2552","2553","2554","2555"]},{"name":"Thirsty Coil Snake","sprites":["2556","2557","2558","2559","2560","2561","2562","2563"]},{"name":"Skate Punk","sprites":["2564","2565","2566","2567","2568","2569","2570","2571"]},{"name":"Stinky Ghost","sprites":["2572","2573","2574","2575","2576","2577","2578","2579","2580"]},{"name":"Handsome Tom","sprites":["2581","2582","2583","2584","2585","2586","2587","2588","2589"]},{"name":"Mad Duck","sprites":["2590","2591","2592","2593","2594","2595","2596","2597"]},{"name":"Manly Fish","sprites":["2598","2599","2600","2601","2602","2603","2604","2605"]},{"name":"Mad Taxi","sprites":["2606","2607","2608","2609","2610","2611","2612","2613"]},{"name":"Demonic Petunia","sprites":["2614","2615","2616","2617","2618","2619","2620","2621"]},{"name":"Ramblin' Evil Mushroom","sprites":["2622","2623","2624","2625","2626","2627","2628","2629","2630"]},{"name":"Ranboob","sprites":["2631","2632","2633","2634","2635","2636","2637","2638"]},{"name":"Evil Mani-Mani","sprites":["2639","2640","2641","2642","2643","2644","2645","2646"]},{"name":"Gruff Goat","sprites":["2647","2648","2649","2650","2651","2652","2653","2654"]},{"name":"Kraken","sprites":["2655","2656","2657","2658","2659","2660","2661","2662"]},{"name":"Crested Booka","sprites":["2663","2664","2665","2666","2667","2668","2669","2670"]},{"name":"Territorial Oak","sprites":["2671","2672","2673","2674","2675","2676","2677","2678"]},{"name":"Wetnosaur","sprites":["2679","2680","2681","2682","2683","2684","2685","2686"]},{"name":"Master Barf","sprites":["2687","2688","2689","2690","2691","2692","2693","2694"]},{"name":"Abstract Art","sprites":["2695","2696","2697","2698","2699","2700","2701","2702"]},{"name":"Zap Eel","sprites":["2703","2704","2705","2706","2707","2708","2709","2710"]},{"name":"Smilin' Sphere","sprites":["2711","2712","2713","2714","2715","2716","2717","2718"]},{"name":"Starman","sprites":["2719","2720","2721","2722","2723","2724","2725","2726"]},{"name":"Li'l UFO","sprites":["2727","2728","2729","2730","2731","2732","2733","2734"]},{"name":"Zombie Possessor","sprites":["2735","2736","2737","2738","2739","2740","2741","2742"]},{"name":"Whirling Robo","sprites":["2743","2744","2745","2746","2747","2748","2749","2750"]},{"name":"Shattered Man","sprites":["2751","2752","2753","2754","2755","2756","2757","2758","2759"]},{"name":"Urban Zombie","sprites":["2760","2761","2762","2763","2764","2765","2766","2767"]},{"name":"Crazed Sign","sprites":["2768","2769","2770","2771","2772","2773","2774","2775","2776"]},{"name":"Sentry Robot","sprites":["2777","2778","2779","2780","2781","2782","2783","2784"]},{"name":"Bad Buffalo","sprites":["2785","2786","2787","2788","2789","2790","2791","2792"]},{"name":"Chomposaur","sprites":["2793","2794","2795","2796","2797","2798","2799","2800"]},{"name":"Gigantic Ant","sprites":["2801","2802","2803","2804","2805","2806","2807","2808"]},{"name":"Arachnid!","sprites":["2809","2810","2811","2812","2813","2814","2815","2816"]},{"name":"Slimey Little Pile","sprites":["2817","2818","2819","2820","2821","2822","2823","2824"]},{"name":"Black Antoid","sprites":["2825","2826","2827","2828","2829","2830","2831","2832"]},{"name":"Mobile Sprout","sprites":["2833","2834","2835","2836","2837","2838","2839","2840","2841"]},{"name":"No Good Fly","sprites":["2842","2843","2844","2845","2846","2847","2848","2849"]},{"name":"Skelpion","sprites":["2850","2851","2852","2853","2854","2855","2856","2857"]},{"name":"Lethal Asp Hieroglyph","sprites":["2858","2859","2860","2861","2862","2863","2864","2865","2866"]},{"name":"Rough Playing Mole","sprites":["2867","2868","2869","2870","2871","2872","2873","2874"]},{"name":"Petrified Royal Guard","sprites":["2875","2876","2877","2878","2879","2880","2881","2882","2883"]},{"name":"Noose Man","sprites":["2884","2885","2886","2887","2888","2889","2890","2891"]},{"name":"Thunder Mite","sprites":["2892","2893","2894","2895","2896","2897","2898","2899"]},{"name":"Guardian Hieroglyph","sprites":["2900","2901","2902","2903","2904","2905","2906","2907","2908"]},{"name":"Dali's Clock","sprites":["2909","2910","2911","2912","2913","2914","2915","2916"]},{"name":"Ego Orb","sprites":["2917","2918","2919","2920","2921","2922","2923","2924"]},{"name":"Master Belch","sprites":["2925","2926","2927","2928","2929","2930","2931","2932"]},{"name":"Cave Boy","sprites":["2933","2934","2935","2936","2937","2938","2939","2940"]},{"name":"Runaway Dog","sprites":["2941","2942","2943","2944","2945","2946","2947","2948"]},{"name":"Mighty Bear","sprites":["2949","2950","2951","2952","2953","2954","2955","2956"]},{"name":"Plain Crocodile","sprites":["2957","2958","2959","2960","2961","2962","2963","2964"]},{"name":"\"Your Sanctuary\" point boss","sprites":["2965","2966","2967","2968","2969","2970","2971","2972","2973"]},{"name":"Zombie","sprites":["2974","2975","2976","2977","2978","2979","2980","2981"]},{"name":"Surprised Ness","sprites":["2982","2983","2984","2985","2986","2987","2988","2989"]},{"name":"Surprised Paula","sprites":["2990","2991","2992","2993","2994","2995","2996","2997"]},{"name":"Surprised Jeff","sprites":["2998","2999","3000","3001","3002","3003","3004","3005"]},{"name":"Surprised Poo","sprites":["3006","3007","3008","3009","3010","3011","3012","3013"]},{"name":"Surprised Ness angel?","sprites":["3014","3015","3016","3017","3018","3019","3020","3021"]},{"name":"Surprised Paula angel?","sprites":["3022","3023","3024","3025","3026","3027","3028","3029"]},{"name":"Surprised Jeff angel?","sprites":["3030","3031","3032","3033","3034","3035","3036","3037"]},{"name":"Surprised Poo angel?","sprites":["3038","3039","3040","3041","3042","3043","3044","3045"]},{"name":"Diamondized surprised?","sprites":["3046","3047","3048","3049","3050","3051","3052","3053"]},{"name":"Small shadow","sprites":["3054","3055","3056","3057","3058","3059","3060","3061"]},{"name":"Teddy Bear","sprites":["3062","3063","3064","3065","3066","3067","3068","3069"]},{"name":"Runaway 5 pianist","sprites":["3070","3071","3072","3073","3074","3075","3076","3077"]},{"name":"Fly","sprites":["3078","3079","3080","3081","3082","3083","3084","3085"]},{"name":"Water Ring","sprites":["3086","3087","3088","3089","3090","3091","3092","3093"]},{"name":"Big Water Ring","sprites":["3094","3095","3096","3097","3098","3099","3100","3101"]},{"name":"Knocking on door","sprites":["3102","3103","3104","3105","3106","3107","3108","3109"]},{"name":"Heart","sprites":["3110","3111","3112","3113","3114","3115","3116","3117"]},{"name":"Cell phone","sprites":["3118","3119","3120","3121","3122","3123","3124","3125"]},{"name":"Hawk's eye","sprites":["3126","3127","3128","3129","3130","3131","3132","3133"]},{"name":"Ness' mom sitting","sprites":["3134","3135","3136","3137","3138","3139","3140","3141"]},{"name":"Venus","sprites":["3142","3143","3144","3145","3146","3147","3148","3149"]},{"name":"Rope","sprites":["3150","3151","3152","3153","3154","3155","3156","3157"]},{"name":"Tony kneeling","sprites":["3158","3159","3160","3161","3162","3163","3164","3165"]},{"name":"Ness' dog sleeping","sprites":["3174","3175","3176","3177","3178","3179","3180","3181"]},{"name":"Rock","sprites":["3182","3183","3184","3185","3186","3187","3188","3189"]},{"name":"New Age Retro Hippie","sprites":["3190","3191","3192","3193","3194","3195","3196","3197"]},{"name":"Poo meditating","sprites":["3198","3199","3200","3201","3202","3203","3204","3205"]},{"name":"Cat","sprites":["3206","3207","3208","3209","3210","3211","3212","3213"]},{"name":"Zombie Dog","sprites":["3214","3215","3216","3217","3218","3219","3220","3221"]},{"name":"Mu ghost","sprites":["3222","3223","3224","3225","3226","3227","3228","3229"]},{"name":"Flag of the Extinct Happy People?","sprites":["3230","3231","3232","3233","3234","3235","3236","3237"]},{"name":"Leaves","sprites":["3238","3239","3240","3241","3242","3243","3244","3245"]},{"name":"Tessie water ripples","sprites":["3246","3247","3248","3249","3250","3251","3252","3253","3254","3255","3256","3257","3258","3259","3260","3261"]},{"name":"Giygas to Ness Transform","sprites":["3262","3263","3264","3265","3266","3267","3268","3269"]},{"name":"A Plate","sprites":["3278","3279","3280","3281","3282","3283","3284","3285"]},{"name":"Drapes closed","sprites":["3286","3287","3288","3289","3290","3291","3292","3293"]},{"name":"Yellow drapes open","sprites":["3294","3295","3296","3297","3298","3299","3300","3301"]},{"name":"Yellow drapes closed","sprites":["3302","3303","3304","3305","3306","3307","3308","3309"]},{"name":"Police car","sprites":["3318","3319","3320","3321","3322","3323","3324","3325"]},{"name":"Ness Sleeping","sprites":["3326","3327","3328","3329","3330","3331","3332","3333"]},{"name":"Teddy Bear","sprites":["3334","3335","3336","3337","3338","3339","3340","3341","3342","3343","3344","3345","3346","3347","3348","3349"]},{"name":"Picky sitting","sprites":["3358","3359","3360","3361","3362","3363","3364","3365"]},{"name":"Ness Sleeping With Hat","sprites":["3366","3367","3368","3369","3370","3371","3372","3373"]},{"name":"Zzzs","sprites":["3374","3375","3376","3377","3378","3379","3380","3381"]},{"name":"Pay phone","sprites":["3382","3383","3384","3385","3386","3387","3388","3389"]},{"name":"Cop","sprites":["3390","3391","3392","3393","3394","3395","3396","3397"]},{"name":"Crooked Cop","sprites":["3398","3399","3400","3401","3402","3403","3404","3405"]},{"name":"Unassuming Local Guy","sprites":["3406","3407","3408","3409","3410","3411","3412","3413"]},{"name":"New Age Retro Hippie","sprites":["3414","3415","3416","3417","3418","3419","3420","3421"]},{"name":"Tough Guy","sprites":["3422","3423","3424","3425","3426","3427","3428","3429"]},{"name":"Annoying Old Party Man","sprites":["3430","3431","3432","3433","3434","3435","3436","3437"]},{"name":"Cranky Lady","sprites":["3438","3439","3440","3441","3442","3443","3444","3445"]},{"name":"Paula lying down","sprites":["3446","3447","3448","3449","3450","3451","3452","3453"]},{"name":"Jeff lying down","sprites":["3454","3455","3456","3457","3458","3459","3460","3461"]},{"name":"Poo lying down","sprites":["3462","3463","3464","3465","3466","3467","3468","3469"]},{"name":"Electra","sprites":["3470","3471","3472","3473","3474","3475","3476","3477"]},{"name":"Everdred","sprites":["3478","3479","3480","3481","3482","3483","3484","3485"]},{"name":"Li'l tenda","sprites":["3486","3487","3488","3489","3490","3491","3492","3493"]},{"name":"King in the Flashback","sprites":["3494","3495","3496","3497","3498","3499","3500","3501"]},{"name":"Bird","sprites":["3502","3503","3504","3505","3506","3507","3508","3509"]},{"name":"Frankystein Mk II","sprites":["3510","3511","3512","3513","3514","3515","3516","3517"]},{"name":"Red Fountain","sprites":["3518","3519","3520","3521","3522","3523","3524","3525"]},{"name":"Apple Kid sign","sprites":["3526","3527","3528","3529","3530","3531","3532","3533"]},{"name":"Orange Kid sign","sprites":["3534","3535","3536","3537","3538","3539","3540","3541"]},{"name":"Spa Sign","sprites":["3542","3543","3544","3545","3546","3547","3548","3549"]},{"name":"Past baby cradle","sprites":["3550","3551","3552","3553","3554","3555","3556","3557"]},{"name":"Eraser statue","sprites":["3558","3559","3560","3561","3562","3563","3564","3565"]},{"name":"$ box","sprites":["3566","3567","3568","3569","3570","3571","3572","3573"]},{"name":"Magnet Hill","sprites":["3574","3575","3576","3577","3578","3579","3580","3581"]},{"name":"Helicopter","sprites":["3582","3583","3584","3585","3586","3587","3588","3589"]},{"name":"Broken helicopter","sprites":["3590","3591","3592","3593","3594","3595","3596","3597"]},{"name":"Deep darkness \"phone\"","sprites":["3598","3599","3600","3601","3602","3603","3604","3605"]},{"name":"Magic Butterfly","sprites":["3606","3607","3608","3609","3610","3611","3612","3613"]},{"name":"Tools","sprites":["3614","3615","3616","3617","3618","3619","3620","3621"]},{"name":"Mole Playing Rough","sprites":["3622","3623","3624","3625","3626","3627","3628","3629"]},{"name":"Rowdy Mouse","sprites":["3630","3631","3632","3633","3634","3635","3636","3637"]},{"name":"Criminal Caterpillar","sprites":["3638","3639","3640","3641","3642","3643","3644","3645"]},{"name":"Clumsy Robot","sprites":["3646","3647","3648","3649","3650","3651","3652","3653"]},{"name":"Guardian digger","sprites":["3654","3655","3656","3657","3658","3659","3660","3661"]},{"name":"Helicopter blade","sprites":["3662","3663","3664","3665","3666","3667","3668","3669"]},{"name":"Sky Runner electric thingies","sprites":["3670","3671","3672","3673","3674","3675","3676","3677"]},{"name":"Wood box","sprites":["3678","3679","3680","3681","3682","3683","3684","3685"]},{"name":"Ornaments on Poo's Temple","sprites":["3686","3687","3688","3689","3690","3691","3692","3693"]},{"name":"Helicopter back","sprites":["3694","3695","3696","3697","3698","3699","3700","3701"]},{"name":"Rich Pokey's head","sprites":["3702","3703","3704","3705","3706","3707","3708","3709"]},{"name":"Bad Palette Fountain","sprites":["3710","3711","3712","3713","3714","3715","3716","3717"]},{"name":"Li'l Toucan Phone","sprites":["3718","3719","3720","3721","3722","3723","3724","3725"]},{"name":"ATM Guy Underwater","sprites":["3726","3727","3728","3729","3730","3731","3732","3733"]},{"name":"Instant Revitalizing Device","sprites":["3734","3735","3736","3737","3738","3739","3740","3741"]},{"name":"Secret door in Monotoli building","sprites":["3742","3743","3744","3745","3746","3747","3748","3749","3750","3751","3752","3753","3754","3755","3756","3757"]},{"name":"Magic Butterfly","sprites":["3758","3759","3760","3761","3762","3763","3764","3765"]},{"name":"Burglin Park sign","sprites":["3766","3767","3768","3769","3770","3771","3772","3773"]},{"name":"Lucky","sprites":["3774","3775","3776","3777","3778","3779","3780","3781"]},{"name":"Ness with messed palette","sprites":["3782","3783","3784","3785","3786","3787","3788","3789","3790","3791","3792","3793","3794","3795","3796","3797"]},{"name":"Exit mouse","sprites":["3798","3799","3800","3801","3802","3803","3804","3805"]},{"name":"Ness in PJs","sprites":["3806","3807","3808","3809","3810","3811","3812","3813","3814","3815","3816","3817","3818","3819","3820","3821"]},{"name":"Zombie lying down","sprites":["3822","3823","3824","3825","3826","3827","3828","3829"]},{"name":"Hotel sign","sprites":["3854","3855","3856","3857","3858","3859","3860","3861"]},{"name":"Camel","sprites":["3862","3863","3864","3865","3866","3867","3868","3869"]},{"name":"Trick or Trick Kid","sprites":["3870","3871","3872","3873","3874","3875","3876","3877"]},{"name":"Angel of Everdred","sprites":["3878","3879","3880","3881","3882","3883","3884","3885"]},{"name":"Hint man","sprites":["3886","3887","3888","3889","3890","3891","3892","3893"]},{"name":"Saturn Valley ATM","sprites":["3894","3895","3896","3897","3898","3899","3900","3901"]},{"name":"Runaway 5 member's head","sprites":["3902","3903","3904","3905","3906","3907","3908","3909"]},{"name":"Photographer's camera","sprites":["3910","3911","3912","3913","3914","3915","3916","3917"]},{"name":"Bad Palette Guy","sprites":["3918","3919","3920","3921","3922","3923","3924","3925"]},{"name":"Exit Mouse","sprites":["3926","3927","3928","3929","3930","3931","3932","3933"]},{"name":"Slots","sprites":["3934","3935","3936","3937","3938","3939","3940","3941"]},{"name":"Ness resting","sprites":["3942","3943","3944","3945","3946","3947","3948","3949"]},{"name":"Paula resting","sprites":["3950","3951","3952","3953","3954","3955","3956","3957"]},{"name":"Dept. Store Mook","sprites":["3958","3959","3960","3961","3962","3963","3964","3965"]},{"name":"Lying down robot Ness","sprites":["3974","3975","3976","3977","3978","3979","3980","3981"]},{"name":"Heavily Armed Pokey","sprites":["3982","3983","3984","3985","3986","3987","3988","3989"]},{"name":"Red truck","sprites":["3990","3991","3992","3993","3994","3995","3996","3997"]},{"name":"White truck","sprites":["3998","3999","4000","4001","4002","4003","4004","4005"]},{"name":"Master Criminal Worm","sprites":["4006","4007","4008","4009","4010","4011","4012","4013"]},{"name":"Tessie Water Ring","sprites":["4014","4015","4016","4017","4018","4019","4020","4021"]}]; + +function ebsprite() { +} + +ebsprite.start = function(client) { + if(this.run) return; + + var self = this; + + this.run = true; + this.client = client; + this.canvas = document.createElement("canvas"); + var canvas = this.canvas; + document.body.insertBefore(this.canvas, document.body.firstChild); + + this.canvas.width = window.innerWidth; + this.canvas.height = window.innerHeight; + this.canvas.style.position = "absolute"; + var camera = new Camera(this.canvas.width, this.canvas.height); + var context = this.canvas.getContext("2d"); + context.fillStyle = "rgb(255,255,255)"; + + requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || + window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; + + var ySort = function(a, b) { + return a.position.y - b.position.y; + }; + + var directionMap = { + "up": {x: 0, y: -1}, + "up-right": {x: 0.707106782, y: -0.707106782}, + "right": {x: 1, y: 0}, + "right-down": {x: 0.707106782, y: 0.707106782}, + "down": {x: 0, y: 1}, + "down-left": {x: -0.707106782, y: 0.707106782}, + "left": {x: -1, y: 0}, + "left-up": {x: -0.707106782, y: -0.707106782} + }; + + var render_loop = function() { + var players = []; + for(var i in playerMap) { + players.push(playerMap[i]); + } + context.clearRect(0, 0, self.canvas.width, self.canvas.height); + for(var i in players) { + var player = players[i]; + if(player.walking) { + var vec = directionMap[player.direction]; + var time = Date.now() - player.updateTime; + player.position.x = player.updatePosition.x + (vec.x * player.walkSpeed * time); + player.position.y = player.updatePosition.y + (vec.y * player.walkSpeed * time); + if(player.position.x < 0) player.position.x = 0; + else if(player.position.x > canvas.width) player.position.x = canvas.width; + if(player.position.y < 0) player.position.y = 0; + else if(player.position.y > canvas.width) player.position.y = canvas.width; + } + } + players.sort(ySort); + for(var i in players) { + var player = players[i]; + var img = player.spriteProvider.getCurrentSprite(player); + if(img) context.drawImage(img, + Math.floor(player.position.x - camera.position.x - (img.width / 2)), + Math.floor(player.position.y - camera.position.y - img.height)); + /*if(player.chat) { + var text = player.chat; + var t = Math.floor((Date.now() - player.chatTime) / 50); + text = text.substring(0, t); + context.fillText(text, + Math.floor(player.position.x - camera.position.x), + Math.floor(player.position.y - camera.position.y - img.height) - 10); + }*/ + } + if(self.run) requestAnimationFrame(render_loop); + }; + render_loop(); + + this.onresize = function() { + canvas.width = $(window).width(); + canvas.height = $(window).height(); + context.clearRect(0, 0, canvas.width, canvas.height); + } + window.addEventListener("resize", this.onresize); + + function downloadImage(url, cb) { + var img = new Image(); + img.onerror = function() { + cb("onerror", img); + }; + img.onabort = function() { + cb("onabort", img); + }; + img.onload = function() { + cb(false, img); + }; + img.src = url; + }; + + function downloadImages(urls, cb) { + var imgs = new Array(urls.length); + var c = 0; + for(var i in urls) { + (function() { + var j = i; + downloadImage(urls[j], function(err, img) { + if(err) { + cb(err, imgs); + cb = function() {}; + } else { + imgs[j] = img; + if(++c == urls.length) { + cb(false, imgs); + } + } + }); + })(); + } + }; + + function Camera(width, height) { + this.width = width; + this.height = height; + this.position = {x: 0, y: 0}; + }; + + function SpriteProvider(sprites, cb) { + var urls = new Array(sprites.length); + for(var i in sprites) { + urls[i] = "/ebsprite/" + sprites[i] + ".png"; + } + downloadImages(urls, (function(err, imgs) { + if(!err) { + var s = imgs; + this.sprites = {}; + this.sprites["up"] = [s[0], s[1]]; + this.sprites["right"] = [s[2], s[3]]; + this.sprites["down"] = [s[4], s[5]]; + this.sprites["left"] = [s[6], s[7]]; + this.sprites["up-right"] = [s[8] || s[2], s[9] || s[3]]; + this.sprites["right-down"] = [s[10] || s[2], s[11] || s[3]]; + this.sprites["down-left"] = [s[12] || s[6], s[13] || s[7]]; + this.sprites["left-up"] = [s[14] || s[6], s[15] || s[7]]; + } + if(cb) cb(); + }).bind(this)); + }; + + //SpriteProvider.prototype.sprites = {}; + SpriteProvider.prototype = new SpriteProvider(["2354","2355","2356","2357","2358","2359","2360","2361"]); + + SpriteProvider.prototype.getCurrentSprite = function(player) { + if(this.sprites && this.sprites[player.direction]) { + if(player.walking) { + var time = Date.now() - player.updateTime; + return this.sprites[player.direction][time & 0x80 ? 0 : 1]; + } else { + return this.sprites[player.direction][0]; + } + } + }; + + var Player = function(id) { + this.id = id; + + //this.sprites = spriteData[0].sprites; + this.sprites = spriteData[parseInt(id, 16) % spriteData.length].sprites; + this.spriteProvider = new SpriteProvider(this.sprites); + this.canMoveDiagonally = (this.sprites[8] && this.sprites[9] && this.sprites[10] && this.sprites[11] && this.sprites[12] && this.sprites[13] && this.sprites[14] && this.sprites[15]) ? true : false; + this.walkSpeed = 0.15; + + this.direction = "down"; + this.walking = false; + this.updatePosition = { + x: canvas.width / 2, + y: canvas.height / 2 + }; + this.position = {x: this.updatePosition.x, y: this.updatePosition.y}; + this.updateTime = Date.now(); + }; + + var player = new Player(client.participantId); + var playerMap = {} + playerMap[client.participantId] = player; + + + function move(id) { + var player = playerMap[id]; + var part = client.ppl[id]; + if(!player || !part) return; + var target = {x: (part.x / 100) * self.canvas.width, y: (client.ppl[id].y / 100) * self.canvas.height}; + var difference = {x: target.x - player.position.x, y: target.y - player.position.y}; + var distance = Math.sqrt(Math.pow(difference.x, 2) + Math.pow(difference.y, 2)); + if(distance > 4) { + var angle = Math.atan2(difference.y, difference.x); + angle += Math.PI; // account negative Math.PI + angle += Math.PI / 8; // askew + angle /= (Math.PI * 2); + angle = Math.floor(angle * 8) % 8; + var direction = ["left", "left-up", "up", "up-right", "right", "right-down", "down", "down-left"][angle]; + if(player.direction !== direction) { + if((Date.now() - player.updateTime > 500) || !player.walking) { + player.direction = direction; + player.updatePosition = {x: player.position.x, y: player.position.y}; + player.updateTime = Date.now(); + } + } + if(distance > 75) { + if(!player.walking) { + player.walking = true; + player.updatePosition = {x: player.position.x, y: player.position.y}; + player.updateTime = Date.now(); + } + } + } + if(distance < 25) { + if(player.walking) { + player.walking = false; + player.updatePosition = {x: player.position.x, y: player.position.y}; + player.updateTime = Date.now(); + } + } + } + + this.animationInterval = setInterval(function() { + move(client.participantId); + for(var id in client.ppl) { + if(!client.ppl.hasOwnProperty(id)) continue; + move(id); + } + }, 50); + + this.participantAdded = function(part) { + playerMap[part.id] = new Player(part.id); + } + for(var id in client.ppl) { + if(!client.ppl.hasOwnProperty(id)) continue; + playerMap[id] = new Player(id); + } + client.on("participant added", this.participantAdded); + + this.participantRemoved = function(part) { + delete playerMap[part.id]; + } + client.on("participant removed", this.participantRemoved); +} + +ebsprite.stop = function() { + this.run = false; + if(this.canvas) { + document.body.removeChild(this.canvas); + this.canvas = undefined; + } + window.removeEventListener("resize", this.onresize); + clearInterval(this.animationInterval); + if(this.client) { + this.client.off("participant added", this.participantAdded); + this.client.off("participant removed", this.participantRemoved); + } +} diff --git a/include/ebsprite/1.png b/include/ebsprite/1.png new file mode 100644 index 0000000..5d01ce7 Binary files /dev/null and b/include/ebsprite/1.png differ diff --git a/include/ebsprite/10.png b/include/ebsprite/10.png new file mode 100644 index 0000000..b69dcc6 Binary files /dev/null and b/include/ebsprite/10.png differ diff --git a/include/ebsprite/100.png b/include/ebsprite/100.png new file mode 100644 index 0000000..d80f42c Binary files /dev/null and b/include/ebsprite/100.png differ diff --git a/include/ebsprite/1000.png b/include/ebsprite/1000.png new file mode 100644 index 0000000..ee72133 Binary files /dev/null and b/include/ebsprite/1000.png differ diff --git a/include/ebsprite/1001.png b/include/ebsprite/1001.png new file mode 100644 index 0000000..1e92cca Binary files /dev/null and b/include/ebsprite/1001.png differ diff --git a/include/ebsprite/1002.png b/include/ebsprite/1002.png new file mode 100644 index 0000000..9d849c4 Binary files /dev/null and b/include/ebsprite/1002.png differ diff --git a/include/ebsprite/1003.png b/include/ebsprite/1003.png new file mode 100644 index 0000000..1bb3cbe Binary files /dev/null and b/include/ebsprite/1003.png differ diff --git a/include/ebsprite/1004.png b/include/ebsprite/1004.png new file mode 100644 index 0000000..ba6d335 Binary files /dev/null and b/include/ebsprite/1004.png differ diff --git a/include/ebsprite/1005.png b/include/ebsprite/1005.png new file mode 100644 index 0000000..f9cb14c Binary files /dev/null and b/include/ebsprite/1005.png differ diff --git a/include/ebsprite/1006.png b/include/ebsprite/1006.png new file mode 100644 index 0000000..daf6f97 Binary files /dev/null and b/include/ebsprite/1006.png differ diff --git a/include/ebsprite/1007.png b/include/ebsprite/1007.png new file mode 100644 index 0000000..92fe299 Binary files /dev/null and b/include/ebsprite/1007.png differ diff --git a/include/ebsprite/1008.png b/include/ebsprite/1008.png new file mode 100644 index 0000000..d05c501 Binary files /dev/null and b/include/ebsprite/1008.png differ diff --git a/include/ebsprite/1009.png b/include/ebsprite/1009.png new file mode 100644 index 0000000..0364dd9 Binary files /dev/null and b/include/ebsprite/1009.png differ diff --git a/include/ebsprite/101.png b/include/ebsprite/101.png new file mode 100644 index 0000000..13f54ee Binary files /dev/null and b/include/ebsprite/101.png differ diff --git a/include/ebsprite/1010.png b/include/ebsprite/1010.png new file mode 100644 index 0000000..0364dd9 Binary files /dev/null and b/include/ebsprite/1010.png differ diff --git a/include/ebsprite/1011.png b/include/ebsprite/1011.png new file mode 100644 index 0000000..c7ffebb Binary files /dev/null and b/include/ebsprite/1011.png differ diff --git a/include/ebsprite/1012.png b/include/ebsprite/1012.png new file mode 100644 index 0000000..c7ffebb Binary files /dev/null and b/include/ebsprite/1012.png differ diff --git a/include/ebsprite/1013.png b/include/ebsprite/1013.png new file mode 100644 index 0000000..0364dd9 Binary files /dev/null and b/include/ebsprite/1013.png differ diff --git a/include/ebsprite/1014.png b/include/ebsprite/1014.png new file mode 100644 index 0000000..0364dd9 Binary files /dev/null and b/include/ebsprite/1014.png differ diff --git a/include/ebsprite/1015.png b/include/ebsprite/1015.png new file mode 100644 index 0000000..58b01d6 Binary files /dev/null and b/include/ebsprite/1015.png differ diff --git a/include/ebsprite/1016.png b/include/ebsprite/1016.png new file mode 100644 index 0000000..58b01d6 Binary files /dev/null and b/include/ebsprite/1016.png differ diff --git a/include/ebsprite/1017.png b/include/ebsprite/1017.png new file mode 100644 index 0000000..9a85c34 Binary files /dev/null and b/include/ebsprite/1017.png differ diff --git a/include/ebsprite/1018.png b/include/ebsprite/1018.png new file mode 100644 index 0000000..2a5deab Binary files /dev/null and b/include/ebsprite/1018.png differ diff --git a/include/ebsprite/1019.png b/include/ebsprite/1019.png new file mode 100644 index 0000000..6f18db7 Binary files /dev/null and b/include/ebsprite/1019.png differ diff --git a/include/ebsprite/102.png b/include/ebsprite/102.png new file mode 100644 index 0000000..5338c12 Binary files /dev/null and b/include/ebsprite/102.png differ diff --git a/include/ebsprite/1020.png b/include/ebsprite/1020.png new file mode 100644 index 0000000..6053829 Binary files /dev/null and b/include/ebsprite/1020.png differ diff --git a/include/ebsprite/1021.png b/include/ebsprite/1021.png new file mode 100644 index 0000000..349b486 Binary files /dev/null and b/include/ebsprite/1021.png differ diff --git a/include/ebsprite/1022.png b/include/ebsprite/1022.png new file mode 100644 index 0000000..9a58303 Binary files /dev/null and b/include/ebsprite/1022.png differ diff --git a/include/ebsprite/1023.png b/include/ebsprite/1023.png new file mode 100644 index 0000000..6d5b632 Binary files /dev/null and b/include/ebsprite/1023.png differ diff --git a/include/ebsprite/1024.png b/include/ebsprite/1024.png new file mode 100644 index 0000000..2393cc2 Binary files /dev/null and b/include/ebsprite/1024.png differ diff --git a/include/ebsprite/1025.png b/include/ebsprite/1025.png new file mode 100644 index 0000000..fd1def8 Binary files /dev/null and b/include/ebsprite/1025.png differ diff --git a/include/ebsprite/1026.png b/include/ebsprite/1026.png new file mode 100644 index 0000000..8a8c443 Binary files /dev/null and b/include/ebsprite/1026.png differ diff --git a/include/ebsprite/1027.png b/include/ebsprite/1027.png new file mode 100644 index 0000000..8a8c443 Binary files /dev/null and b/include/ebsprite/1027.png differ diff --git a/include/ebsprite/1028.png b/include/ebsprite/1028.png new file mode 100644 index 0000000..424a32b Binary files /dev/null and b/include/ebsprite/1028.png differ diff --git a/include/ebsprite/1029.png b/include/ebsprite/1029.png new file mode 100644 index 0000000..424a32b Binary files /dev/null and b/include/ebsprite/1029.png differ diff --git a/include/ebsprite/103.png b/include/ebsprite/103.png new file mode 100644 index 0000000..8f395f5 Binary files /dev/null and b/include/ebsprite/103.png differ diff --git a/include/ebsprite/1030.png b/include/ebsprite/1030.png new file mode 100644 index 0000000..a953233 Binary files /dev/null and b/include/ebsprite/1030.png differ diff --git a/include/ebsprite/1031.png b/include/ebsprite/1031.png new file mode 100644 index 0000000..522f982 Binary files /dev/null and b/include/ebsprite/1031.png differ diff --git a/include/ebsprite/1032.png b/include/ebsprite/1032.png new file mode 100644 index 0000000..0672075 Binary files /dev/null and b/include/ebsprite/1032.png differ diff --git a/include/ebsprite/1033.png b/include/ebsprite/1033.png new file mode 100644 index 0000000..0672075 Binary files /dev/null and b/include/ebsprite/1033.png differ diff --git a/include/ebsprite/1034.png b/include/ebsprite/1034.png new file mode 100644 index 0000000..aed0111 Binary files /dev/null and b/include/ebsprite/1034.png differ diff --git a/include/ebsprite/1035.png b/include/ebsprite/1035.png new file mode 100644 index 0000000..9375fa9 Binary files /dev/null and b/include/ebsprite/1035.png differ diff --git a/include/ebsprite/1036.png b/include/ebsprite/1036.png new file mode 100644 index 0000000..ddebd0a Binary files /dev/null and b/include/ebsprite/1036.png differ diff --git a/include/ebsprite/1037.png b/include/ebsprite/1037.png new file mode 100644 index 0000000..a3139b7 Binary files /dev/null and b/include/ebsprite/1037.png differ diff --git a/include/ebsprite/1038.png b/include/ebsprite/1038.png new file mode 100644 index 0000000..4ab448b Binary files /dev/null and b/include/ebsprite/1038.png differ diff --git a/include/ebsprite/1039.png b/include/ebsprite/1039.png new file mode 100644 index 0000000..3ccca09 Binary files /dev/null and b/include/ebsprite/1039.png differ diff --git a/include/ebsprite/104.png b/include/ebsprite/104.png new file mode 100644 index 0000000..27a9783 Binary files /dev/null and b/include/ebsprite/104.png differ diff --git a/include/ebsprite/1040.png b/include/ebsprite/1040.png new file mode 100644 index 0000000..219395f Binary files /dev/null and b/include/ebsprite/1040.png differ diff --git a/include/ebsprite/1041.png b/include/ebsprite/1041.png new file mode 100644 index 0000000..ab5a6bb Binary files /dev/null and b/include/ebsprite/1041.png differ diff --git a/include/ebsprite/1042.png b/include/ebsprite/1042.png new file mode 100644 index 0000000..74a8de2 Binary files /dev/null and b/include/ebsprite/1042.png differ diff --git a/include/ebsprite/1043.png b/include/ebsprite/1043.png new file mode 100644 index 0000000..041c1a9 Binary files /dev/null and b/include/ebsprite/1043.png differ diff --git a/include/ebsprite/1044.png b/include/ebsprite/1044.png new file mode 100644 index 0000000..74a8de2 Binary files /dev/null and b/include/ebsprite/1044.png differ diff --git a/include/ebsprite/1045.png b/include/ebsprite/1045.png new file mode 100644 index 0000000..041c1a9 Binary files /dev/null and b/include/ebsprite/1045.png differ diff --git a/include/ebsprite/1046.png b/include/ebsprite/1046.png new file mode 100644 index 0000000..74a8de2 Binary files /dev/null and b/include/ebsprite/1046.png differ diff --git a/include/ebsprite/1047.png b/include/ebsprite/1047.png new file mode 100644 index 0000000..041c1a9 Binary files /dev/null and b/include/ebsprite/1047.png differ diff --git a/include/ebsprite/1048.png b/include/ebsprite/1048.png new file mode 100644 index 0000000..74a8de2 Binary files /dev/null and b/include/ebsprite/1048.png differ diff --git a/include/ebsprite/1049.png b/include/ebsprite/1049.png new file mode 100644 index 0000000..041c1a9 Binary files /dev/null and b/include/ebsprite/1049.png differ diff --git a/include/ebsprite/105.png b/include/ebsprite/105.png new file mode 100644 index 0000000..9cd9834 Binary files /dev/null and b/include/ebsprite/105.png differ diff --git a/include/ebsprite/1050.png b/include/ebsprite/1050.png new file mode 100644 index 0000000..766c517 Binary files /dev/null and b/include/ebsprite/1050.png differ diff --git a/include/ebsprite/1051.png b/include/ebsprite/1051.png new file mode 100644 index 0000000..08beb58 Binary files /dev/null and b/include/ebsprite/1051.png differ diff --git a/include/ebsprite/1052.png b/include/ebsprite/1052.png new file mode 100644 index 0000000..df1dbbb Binary files /dev/null and b/include/ebsprite/1052.png differ diff --git a/include/ebsprite/1053.png b/include/ebsprite/1053.png new file mode 100644 index 0000000..51f7107 Binary files /dev/null and b/include/ebsprite/1053.png differ diff --git a/include/ebsprite/1054.png b/include/ebsprite/1054.png new file mode 100644 index 0000000..18a4854 Binary files /dev/null and b/include/ebsprite/1054.png differ diff --git a/include/ebsprite/1055.png b/include/ebsprite/1055.png new file mode 100644 index 0000000..dfc5bce Binary files /dev/null and b/include/ebsprite/1055.png differ diff --git a/include/ebsprite/1056.png b/include/ebsprite/1056.png new file mode 100644 index 0000000..38f33f3 Binary files /dev/null and b/include/ebsprite/1056.png differ diff --git a/include/ebsprite/1057.png b/include/ebsprite/1057.png new file mode 100644 index 0000000..7561eeb Binary files /dev/null and b/include/ebsprite/1057.png differ diff --git a/include/ebsprite/1058.png b/include/ebsprite/1058.png new file mode 100644 index 0000000..9cf3983 Binary files /dev/null and b/include/ebsprite/1058.png differ diff --git a/include/ebsprite/1059.png b/include/ebsprite/1059.png new file mode 100644 index 0000000..3229efe Binary files /dev/null and b/include/ebsprite/1059.png differ diff --git a/include/ebsprite/106.png b/include/ebsprite/106.png new file mode 100644 index 0000000..a414b81 Binary files /dev/null and b/include/ebsprite/106.png differ diff --git a/include/ebsprite/1060.png b/include/ebsprite/1060.png new file mode 100644 index 0000000..9cf3983 Binary files /dev/null and b/include/ebsprite/1060.png differ diff --git a/include/ebsprite/1061.png b/include/ebsprite/1061.png new file mode 100644 index 0000000..3229efe Binary files /dev/null and b/include/ebsprite/1061.png differ diff --git a/include/ebsprite/1062.png b/include/ebsprite/1062.png new file mode 100644 index 0000000..9cf3983 Binary files /dev/null and b/include/ebsprite/1062.png differ diff --git a/include/ebsprite/1063.png b/include/ebsprite/1063.png new file mode 100644 index 0000000..3229efe Binary files /dev/null and b/include/ebsprite/1063.png differ diff --git a/include/ebsprite/1064.png b/include/ebsprite/1064.png new file mode 100644 index 0000000..9cf3983 Binary files /dev/null and b/include/ebsprite/1064.png differ diff --git a/include/ebsprite/1065.png b/include/ebsprite/1065.png new file mode 100644 index 0000000..3229efe Binary files /dev/null and b/include/ebsprite/1065.png differ diff --git a/include/ebsprite/1066.png b/include/ebsprite/1066.png new file mode 100644 index 0000000..9ceed3a Binary files /dev/null and b/include/ebsprite/1066.png differ diff --git a/include/ebsprite/1067.png b/include/ebsprite/1067.png new file mode 100644 index 0000000..9ceed3a Binary files /dev/null and b/include/ebsprite/1067.png differ diff --git a/include/ebsprite/1068.png b/include/ebsprite/1068.png new file mode 100644 index 0000000..9ceed3a Binary files /dev/null and b/include/ebsprite/1068.png differ diff --git a/include/ebsprite/1069.png b/include/ebsprite/1069.png new file mode 100644 index 0000000..9ceed3a Binary files /dev/null and b/include/ebsprite/1069.png differ diff --git a/include/favicon.ico b/include/favicon.ico new file mode 100644 index 0000000..54563e7 Binary files /dev/null and b/include/favicon.ico differ diff --git a/include/index.html b/include/index.html new file mode 100644 index 0000000..a517eff --- /dev/null +++ b/include/index.html @@ -0,0 +1,206 @@ + + + + + + Multiplayer Piano + + + + + + +
+
    + +
    + +
    + +
    + +
    + +
    + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    New Room...
    +
    +
    +
    New Room...
    +
    Play Alone
    +
    Room Settings
    +
    MIDI In/Out
    +
    Synth
    +
    Sound Select
    +
    Client Settings
    + + + + +
    +
    + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + diff --git a/include/jquery.min.js b/include/jquery.min.js new file mode 100644 index 0000000..4024b66 --- /dev/null +++ b/include/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c; +}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("