repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
jennselby/WebDevTestApp
app.js
12870
var http = require('http'); var fs = require('fs'); var handlebars = require('handlebars'); var qs = require('querystring'); // setup the database functions based on which database is being used var database = 'mongoDB'; // change to postgreSQL or MySQL to use these databases instead var MongoClient = null; var sanitize = null; var pg = null; var mysql = null; var sendToSQLDB = null; var extractSQLResults = null; var replaceSQLParameters = null; var updateCoins = null; var displayCharacters = null; var displayOneCharacter = null; var insertCharacter = null; if (database === 'mongoDB') { MongoClient = require('mongodb').MongoClient; sanitize = require('mongo-sanitize'); updateCoins = updateCoinsMongo; displayCharacters = displayCharactersMongo; displayOneCharacter = displayOneCharacterMongo; insertCharacter = insertCharacterMongo; } else if (database === 'postgreSQL') { pg = require('pg'); extractSQLResults = extractPostgresResults; replaceSQLParameters = replacePostgresParameters; sendToSQLDB = sendToPostgresDB; updateCoins = updateCoinsSQL; displayCharacters = displayCharactersSQL; displayOneCharacter = displayOneCharacterSQL; insertCharacter = insertCharacterSQL; } else if (database === 'MySQL') { mysql = require('mysql'); extractSQLResults = extractMySQLResults; replaceSQLParameters = replaceMySQLParameters; sendToSQLDB = sendToMySQLDB; updateCoins = updateCoinsSQL; displayCharacters = displayCharactersSQL; displayOneCharacter = displayOneCharacterSQL; insertCharacter = insertCharacterSQL; } else { console.error('Unrecognized database ' + database); process.exit(1); } var rawTemplate = fs.readFileSync('templates/characters.html', 'utf8'); var charactersTemplate = handlebars.compile(rawTemplate); var rawTemplate = fs.readFileSync('templates/oneChar.html', 'utf8'); var oneCharTemplate = handlebars.compile(rawTemplate); // Define functions for interacting with the databases function sendToMongoDB(res, callback) { MongoClient.connect('mongodb://localhost/test', function(err, db) { if(err) { db.close(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('coin update failed: database connection error'); return console.error('could not connect to mongo', err); } callback(db); }); } function updateCoinsMongo(res, name, coins) { sendToMongoDB(res, function(db) { var collection = db.collection('characters'); collection.update( {name: name}, {$set: {coins: coins}}, function(err, statusObj) { if (err) { db.close(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('coin update failed: database error'); return console.error('error running query', err); } if (statusObj.result.nModified != 1) { db.close(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('coin update failed: ' + statusObj.result.nModified + ' documents updated'); return console.error('Expected 1 document updated, but ' + statusObj.result.nModified + ' were: ' + statusObj); } db.close(); res.writeHead(200, {'Content-Type': 'text/html'}); res.end('coin update received'); } ); }); } function displayCharactersMongo(res) { sendToMongoDB(res, function (db) { var collection = db.collection('characters'); collection.find({}).toArray(function(err, docs) { if (err) { db.close(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('cannot display characters: database error'); return console.error('error running query', err); } var context = {'characters': docs}; var html = charactersTemplate(context); db.close(); res.writeHead(200, {'Content-Type': 'text/html'}); res.end(html); }); }); } function displayOneCharacterMongo(res, name) { sendToMongoDB(res, function(db) { var collection = db.collection('characters'); collection.find({name: name}).toArray(function (err, docs) { if (err) { db.close(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('cannot display characters: database error'); return console.error('error running query', err); } if (docs.length != 1) { db.close(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('Expected 1 result but got ' + docs.length); return console.error('Expected 1 result but got ' + docs.length); } var context = docs[0]; var html = oneCharTemplate(context); db.close(); res.writeHead(200, {'Content-Type': 'text/html'}); res.end(html); }); }); } function insertCharacterMongo(res, name, street_address, kingdom) { sendToMongoDB(res, function (db) { var collection = db.collection('characters'); collection.insert({ _id: sanitize(name), name: sanitize(name), location: { street_address: sanitize(street_address), kingdom: sanitize(kingdom) }, coins: 0, lives: 0, friends: [], enemies: [], }); db.close(); // dislay the characters page res.writeHead(301, {Location: '/'}); res.end(); }); } function extractPostgresResults(result) { return result.rows; } function replacePostgresParameters(query) { return query; } function sendToPostgresDB(res, callback) { pg.connect('postgres://localhost/mario_example', function(err, client) { if (err) { client.end(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('coin update failed: database connection error'); return console.error('could not connect to postgres', err); } callback(client); }); } function extractMySQLResults(result) { return result; } function replaceMySQLParameters(query) { // MySQL node library uses ? instead of $N for parameters return query.replace(new RegExp('\\$[0-9]', 'g'), '?'); } function sendToMySQLDB(res, callback) { var connection = mysql.createConnection({ host : 'localhost', user : 'root', database : 'mario_example' }); connection.connect(); callback(connection); } function updateCoinsSQL(res, name, coins) { sendToSQLDB(res, function(client) { // https://github.com/brianc/node-postgres/wiki/Example client.query( replaceSQLParameters('UPDATE characters SET coins=$1 WHERE name=$2'), [coins, name], function(err, result) { if (err) { client.end(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('coin update failed: database error'); return console.error('error running query', err); } client.end(); res.writeHead(200, {'Content-Type': 'text/html'}); res.end('coin update received'); } ); }); } function displayCharactersSQL(res) { sendToSQLDB(res, function(client) { client.query('SELECT * FROM characters', function(err, result) { if (err) { client.end(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('database error'); return console.error('error running query', err); } client.end(); var context = {'characters': extractSQLResults(result)}; var html = charactersTemplate(context); res.writeHead(200, {'Content-Type': 'text/html'}); res.end(html); }); }); } function displayOneCharacterSQL(res, name) { sendToSQLDB(res, function (client) { client.query( replaceSQLParameters('SELECT * FROM characters WHERE name=$1'), [name], function(err, result) { if (err) { client.end(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('database error'); return console.error('error running query', err); } var rows = extractSQLResults(result); if (rows.length != 1) { client.end(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('Expected 1 result but got ' + rows.length); return console.error('Expected 1 result but got ' + rows.length); } client.end(); var context = rows[0]; var html = oneCharTemplate(context); res.writeHead(200, {'Content-Type': 'text/html'}); res.end(html); } ); }); } function insertCharacterSQL(res, name, street_address, kingdom) { sendToSQLDB(res, function (client) { client.query( replaceSQLParameters( 'INSERT INTO characters (name, street_address, kingdom, coins, lives) VALUES ($1, $2, $3, 0, 0)'), [name, street_address, kingdom], function (err, result) { if (err) { client.end(); res.writeHead(500, {'Content-Type': 'text/html'}); res.end('database error'); return console.error('error running query', err); } client.end(); // dislay the characters page res.writeHead(301, {Location: '/'}); res.end(); } ); }); } function handlePostData(req, res, callback) { var body = ''; // http://stackoverflow.com/questions/4295782/how-do-you-extract-post-data-in-node-js // collect all of the POST data req.on('data', function (data) { body += data; // Too much POST data, kill the connection! if (body.length > 1e6) { request.connection.destroy(); res.writeHead(413, {'Content-Type': 'text/html'}); res.end('coin update failed: POST data too large'); return console.error('POST data too large'); } }); // when the data collection is done, update the database with the new information req.on('end', function () { callback(res, body); }); } handlebars.registerHelper('replaceSpaces', function(name) { var newName = name.replace(/ /g, '_'); return new handlebars.SafeString(newName); }); var server = http.createServer(function (req, res) { // first handle the CSS and JavaScript files if (req.url === '/static/appStyle.css') { res.writeHead(200, {'Content-Type': 'text/css'}); res.end(fs.readFileSync('static/appStyle.css', 'utf8')); } else if (req.url === '/static/appUtils.js') { res.writeHead(200, {'Content-Type': 'text/javascript'}); res.end(fs.readFileSync('static/appUtils.js', 'utf8')); } // this should contain the new coin data, so ignore a request to this URL that isn't a POST else if (req.url === '/setcoin' && req.method === 'POST') { handlePostData(req, res, function (res, body) { var post = JSON.parse(body); var name = post['name']; var coins = post['coins']; updateCoins(res, name, coins); }); } else if (req.url.startsWith('/show')) { var name = req.url.substring(5, req.url.length).replace(/_/g, ' '); displayOneCharacter(res, name); } // this should contain the new coin data, so ignore a request to this URL that isn't a POST else if (req.url.startsWith('/addNewCharacter') && req.method === 'POST') { handlePostData(req, res, function (res, body) { var post = qs.parse(body); var name = post['charName']; var street_address = post['street_address']; var kingdom = post['kingdom']; insertCharacter(res, name, street_address, kingdom); }); } else { // for any other URLs, just display all characters currently in the database displayCharacters(res); } }); server.listen(3000);
mit
SonataD/badpascal
main.cpp
6838
#include <iostream> #include <fstream> #include <string> #include <cstring> #include <algorithm> #include <atomic> #include <mutex> #include <thread> #include <utility> #include "lexer.h" #include "symtable.h" #include "parser.h" //clase que procesa los tokens generados por el FSM. //no es la versión final. class TokenTester : public TokenPusher{ using Lock = std::lock_guard<std::mutex>; std::mutex buffer_mux; std::mutex termination_mux; //Lista de tokens que se han reconocido Vector<Token> list; //linea actual unsigned line = 1; //Vector2<int> test; public: void String(const std::string& string, Context &tables){ auto it = tables.strs.find(string); if(it == tables.strs.end()){ tables.strs[string] = tables.strs_i; Lock lock(buffer_mux); list.push_back(Token(Token::STRING,(long) tables.strs_i++,line)); }else{ Lock lock(buffer_mux); list.push_back(Token(Token::STRING,(long) *(it.second),line)); } } void ID(const std::string& string, Context &tables){ auto it = tables.ids.find(string); if(it == tables.ids.end()){ tables.ids[string] = tables.ids_i; Lock lock(buffer_mux); list.push_back(Token(Token::ID,(long) tables.ids_i++,line)); }else{ Lock lock(buffer_mux); list.push_back(Token(Token::ID,(long) *(it.second),line)); } } void Language(unsigned type,long id){ Lock lock(buffer_mux); list.push_back(Token(type,id,line)); } void Integer(const std::string &str, int base = 10){ Lock lock(buffer_mux); list.push_back(Token(Token::INT_LITERAL,std::stol(str,0,base),line) ); } void Float(const std::string &str){ Lock lock(buffer_mux); list.push_back(Token(Token::FLT_LITERAL,std::stod(str),line) ); } void Special(unsigned type, unsigned subtype){ Lock lock(buffer_mux); list.push_back(Token(type,(long) subtype,line)); } void Endl(){ line++; } void Eof(){ buffer_mux.lock(); list.push_back(Token(Token::FEOF,0L,line)); buffer_mux.unlock(); //TODO: verificar dependencia std::lock_guard<std::mutex> lockd (termination_mux); } TokenHandle handle(){ return TokenHandle{&list,&buffer_mux,&termination_mux}; } TokenBuffer& result(){ return list; } TokenTester(){ //4 HORAS 4 HORAS!!!!!! buffer_mux.lock(); termination_mux.lock(); buffer_mux.unlock(); termination_mux.unlock(); } }; //Interface entre el buffer de tokens y el parser, que lee de uno por uno class TokenAtomAdapter : public AtomSource{ using Lock = std::lock_guard<std::mutex>; std::ostream* out = nullptr; TokenHandle handle; TokenBuffer local_buffer; bool finished_work = false; Token last; size_t rbuffer_index = 0; size_t nline = 1; public: //Cambia el bufer con que se sincroniza void setHandle(TokenHandle hl){ handle = hl; hl.rev_mux->lock(); } //Linea actual unsigned line() { return nline; } void setOutput(std::ostream& stream){ out = &stream; } //Trae un token Atom fetch(){ if(finished_work){ return last.atom(); } while(local_buffer.size() == 0){ {//TODO: eliminar busy-wait mientras se llena el buffer (si eso eso realmente llega a pasar) Lock lock(*handle.mux); swap(*(handle.data),local_buffer); } rbuffer_index = 0; //TODO: REMOVE IN FINAL VERSION //La tabla de tokens es efímera printTokens(); } auto token = local_buffer[rbuffer_index++]; nline = token.pos; last = token; if(token.type == Token::FEOF){ handle.rev_mux->unlock(); finished_work = true; } if(rbuffer_index == local_buffer.size()) local_buffer.resize(0,false); return token.atom(); } //IMprime tabla void printTokens(){ std::ostream& cout = *out; cout << "#\tValor\tID\tClase\tIDAtomo\tAtomo\n"; for(unsigned i = 0;i < local_buffer.size();i++){ cout << i << '\t' << local_buffer[i] << '\t' << local_buffer[i].getID() <<'\t'<< local_buffer[i].type << ':' << S_class_names[ local_buffer[i].type]<< '\t'<< local_buffer[i].atom()<< '\t' << S_atoms[local_buffer[i].atom()] << '\t' <<local_buffer[i].pos <<'\n' ; } cout << std::endl; } }; //Imprime cadenas guardadas void printStrings(std::ostream& cout, Context& context) { cout << "#\tValor\n"; for(auto elem : context.strs){ cout << *elem.second << '\t' << *elem.first << '\n'; } cout << std::endl; } //Imprime identificadores guardados void printIDs(std::ostream& cout, Context& context) { cout << "#\tValor\n"; for(auto elem : context.ids){ cout << *elem.second << '\t' << *elem.first << '\n'; } cout << std::endl; } #ifdef TEST_MODE int main0 (int argc, char **argv, Context& context, TokenTester& default_out) #else int main (int argc, char **argv) #endif { //Seccion de manejo de archivo std::ostream* output; std::istream* input; std::ifstream file_in; std::ofstream file_out; switch(argc){ case 1: input = &std::cin; output = &std::cout; break; case 2: file_in.open(argv[1],std::ios::in); if(!file_in){ std::cerr << "No se puede abrir " << argv[1] << " para lectura" << std::endl; return -1; } input = &file_in; output = &std::cout; break; case 3: file_in.open(argv[1]); if(file_in.fail()){ std::cerr << "No se puede abrir " << argv[1] << " para lectura" << std::endl; return -1; } file_out.open(argv[2]); if(file_out.fail()){ std::cerr << "No se puede abrir " << argv[2] << " para escritura" << std::endl; return -1; } input = &file_in; output = &file_out; break; default: std::cerr << "Uso: badpas [archivo_entrada] [archivo_salida]" << std::endl; return -1; } //Tablas auxiliares #ifndef TEST_MODE Context context; //Consumidor de tokens TokenTester default_out; #endif //Lexer TokenFilter Tmachine; //Adaptador TokenAtomAdapter pipe; pipe.setOutput(*output); //Parser PascalParser Pmachine; //Conectar adaptador con fuente de tokens pipe.setHandle(default_out.handle()); //Conectar parser conn adaptador Pmachine.setSource(pipe); //Configurar fuente de tokens Tmachine.setBuilder(default_out); Tmachine.setContext(context); //Conectar fuente de tokens con fuente de cadenas Tmachine.setSource([input](CharBuffer &buffer){return streamTestFun(*input,buffer);}); //Iniciar threads std::thread lexer(std::move(Tmachine)); std::thread parser(std::move(Pmachine)); parser.join(); lexer.join(); //Imprimir lista de tokens //default_out.printTokens(*output); //Imprimir las otras tablas *output << "CADENAS\n"; printStrings(*output,context); *output << "IDENTIFICADORES\n"; printIDs(*output,context); }
mit
jamethy/battle_room
src/world/object_factory.cpp
5010
#include "world/object_factory.h" #include "world/player.h" #include "world/bullet.h" #include "world/ball.h" #include "common/logger.h" #include <map> namespace BattleRoom { std::map<ObjectType, ResourceDescriptor> OBJECT_TEMPLATES = { {ObjectType::Player, ResourceDescriptor("Player", "")}, {ObjectType::Bullet, ResourceDescriptor("Bullet", "")}, {ObjectType::Ball, ResourceDescriptor("Ball", "")}, {ObjectType::Ball, ResourceDescriptor("Wall", "")}, {ObjectType::None, ResourceDescriptor("Object", "")} }; ObjectType keyToType(const std::string &key) { if (keyMatch(key, "Player")) { return ObjectType::Player; } else if (keyMatch(key, "Bullet")) { return ObjectType::Bullet; } else if (keyMatch(key, "Ball")) { return ObjectType::Ball; } else if (keyMatch(key, "Wall")) { return ObjectType::Wall; } else { return ObjectType::None; } } std::string typeToKey(const ObjectType &type) { switch (type) { case ObjectType::None: return "None"; case ObjectType::Ball: return "Ball"; case ObjectType::Wall: return "Wall"; case ObjectType::Bullet: return "Bullet"; case ObjectType::Player: return "Player"; default: Log::error("Unknown object type to key: ", (int) type); return "None"; } } void ObjectFactory::applySettings(ResourceDescriptor settings) { for (const ResourceDescriptor &sub : settings.getSubResources()) { ObjectType type = keyToType(sub.getKey()); OBJECT_TEMPLATES.at(type) = sub; Log::info("Read in object template for " + sub.getKey() + " to " + typeToKey(type)); } } UniqueGameObject createTemplateObject(const ResourceDescriptor &settings) { GameObject *obj = nullptr; if (keyMatch("Player", settings.getKey())) { obj = new Player(UniqueId::generateNewNetworkId()); } else if (keyMatch("Bullet", settings.getKey())) { obj = new Bullet(UniqueId::generateNewNetworkId()); } else if (keyMatch("Ball", settings.getKey())) { obj = new Ball(UniqueId::generateNewNetworkId()); } else { obj = new GameObject(UniqueId::generateNewNetworkId(), ObjectType::None); } obj->applySettings(settings); return UniqueGameObject(obj); } std::vector<UniqueGameObject> ObjectFactory::getGameObjects(ResourceDescriptor settings) { std::vector<UniqueGameObject> objects; for (const auto &objTemplate : OBJECT_TEMPLATES) { for (const ResourceDescriptor &objDesc : settings.getSubResources(objTemplate.second.getKey())) { auto obj = createTemplateObject(objTemplate.second); obj->applySettings(objDesc); objects.push_back(std::move(obj)); } } return objects; } UniqueGameObject ObjectFactory::createObjectOfDescription(ResourceDescriptor settings) { const ObjectType type = keyToType(settings.getKey()); UniqueGameObject obj = createObjectOfType(type); obj->applySettings(settings); return obj; } UniqueGameObject ObjectFactory::createObjectOfType(ObjectType type) { auto objectTeplate = OBJECT_TEMPLATES.find(type); if (objectTeplate != OBJECT_TEMPLATES.end()) { return createTemplateObject(objectTeplate->second); } else { return createObjectOfType(ObjectType::None); } } UniqueGameObject ObjectFactory::deserializeObject(BinaryStream &bs) { const auto type = (ObjectType) bs.peekInt(); switch (type) { case ObjectType::Ball: return UniqueGameObject(new Ball(Ball::deserialize(bs))); case ObjectType::Bullet: return UniqueGameObject(new Bullet(Bullet::deserialize(bs))); case ObjectType::Player: return UniqueGameObject(new Player(Player::deserialize(bs))); case ObjectType::Wall: case ObjectType::None: default: return UniqueGameObject(new GameObject(GameObject::deserialize(bs))); } } ResourceDescriptor ObjectFactory::getSettings() { ResourceDescriptor rd("ObjectTemplates", ""); std::vector<ResourceDescriptor> subs = {}; subs.push_back(OBJECT_TEMPLATES[ObjectType::None]); subs.push_back(OBJECT_TEMPLATES[ObjectType::Ball]); subs.push_back(OBJECT_TEMPLATES[ObjectType::Wall]); subs.push_back(OBJECT_TEMPLATES[ObjectType::Bullet]); subs.push_back(OBJECT_TEMPLATES[ObjectType::Player]); rd.setSubResources(subs); return rd; } } // BattleRoom namespace
mit
mkpetrov/CSharpAdvanced
Regex/Sentence Extractor/SentenceExtractor.cs
673
using System; using System.Text.RegularExpressions; namespace Sentence_Extractor { class SentenceExtractor { static void Main(string[] args) { var keyWord = Console.ReadLine(); var inputLine = Console.ReadLine(); var regex=new Regex(@"([^.!?]+(?=[.!?])[.!?])"); var matches = regex.Matches(inputLine); foreach (Match match in matches) { string sentence = match.ToString(); if (sentence.Contains($" {keyWord} ")) { Console.WriteLine(sentence.Trim()); } } } } }
mit
win-k/CMSTV
evo/manager/processors/undelete_content.processor.php
2360
<?php if(!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE != 'true') exit(); if(!$modx->hasPermission('delete_document')) { $e->setError(3); $e->dumpError(); } $id = intval($_REQUEST['id']); // check permissions on the document if(!$modx->checkPermissions($id)) disp_access_permission_denied(); // get the timestamp on which the document was deleted. $where = "id='{$id}' AND deleted=1"; $rs = $modx->db->select('deletedon','[+prefix+]site_content',$where); if($modx->db->getRecordCount($rs)!=1) exit("Couldn't find document to determine it's date of deletion!"); else $deltime = $modx->db->getValue($rs); $children = array(); getChildren($id); $field = array(); $field['deleted'] = '0'; $field['deletedby'] = '0'; $field['deletedon'] = '0'; if(0 < count($children)) { $docs_to_undelete = implode(' ,', $children); $rs = $modx->db->update($field,'[+prefix+]site_content',"id IN({$docs_to_undelete})"); if(!$rs) { echo "Something went wrong while trying to set the document's children to undeleted status..."; exit; } } //'undelete' the document. $rs = $modx->db->update($field,'[+prefix+]site_content',"id='{$id}'"); if(!$rs) { echo "Something went wrong while trying to set the document to undeleted status..."; exit; } else { // empty cache $modx->clearCache(); // finished emptying cache - redirect $pid = $modx->db->getValue($modx->db->select('parent','[+prefix+]site_content',"id='{$id}'")); $page = (isset($_GET['page'])) ? "&page={$_GET['page']}" : ''; if($pid!=='0') $header="Location: index.php?r=1&a=120&id={$pid}{$page}"; else $header="Location: index.php?a=2&r=1"; header($header); } function getChildren($parent) { global $children; global $deltime,$modx; $rs = $modx->db->select('id','[+prefix+]site_content',"parent={$parent} AND deleted=1 AND deletedon='{$deltime}'"); if($modx->db->getRecordCount($rs)>0) { // the document has children documents, we'll need to delete those too while($row=$modx->db->getRow($rs)) { $children[] = $row['id']; getChildren($row['id']); } } } function disp_access_permission_denied() { global $_lang; include_once('header.inc.php'); ?><div class="sectionHeader"><?php echo $_lang['access_permissions']; ?></div> <div class="sectionBody"> <p><?php echo $_lang['access_permission_denied']; ?></p> <?php include_once('footer.inc.php'); exit; }
mit
distributions-io/weibull
lib/quantile.js
763
'use strict'; /** * FUNCTION: getQuantileFunction( a, b ) * Returns a quantile function for a Weibull distribution with with scale parameter `lambda` and shape parameter `k`. * * @private * @param {Number} lambda - shape parameter * @param {Number} k - scale prameter * @returns {Function} quantile function */ function getQuantileFunction( lambda, k ) { /** * FUNCTION: quantile( p ) * Evaluates the quantile function at input value `p`. * * @private * @param {Number} p - input value * @returns {Number} evaluated quantile function */ return function quantile( p ) { return ( 0 <= p && p <= 1 ) ? lambda * Math.pow( -Math.log( 1 - p ) , 1/k ) : NaN; }; } // end FUNCTION getQuantileFunction() // EXPORTS // module.exports = getQuantileFunction;
mit
zapnap/riq-ruby
lib/riq.rb
2103
# The namespace from which all magic springs module RIQ # Could fetch defaults or something here end # Monkeypatches # cry about it, nerd module RIQExtensions refine Symbol do def to_cam temp = self.to_s.split('_').map(&:capitalize).join (temp[0].downcase + temp[1..-1]).to_sym end def to_snake # could also change this to self.split(/(?=[A-Z])/).join('_').downcase a = self.to_s.split('') n = [] a.each do |l| n << '_' if l.is_upper_char? n << l.downcase end n = n[1..-1] if n.first == '_' n.join.to_sym end end refine String do def is_upper_char? !self[/[A-Z]/].nil? && self.length == 1 end def is_lower_char? !self[/[a-z]/].nil? && self.length == 1 end end refine Fixnum do def cut_milis self.to_s[0...-3].to_i end def to_sym self.to_s.to_sym end end refine Hash do # Converts to RIQ API's [{raw: "VALUE"}] format def to_raw return {} if self.empty? o = {} self.each do |k, v| o[k.to_cam] = [{raw: v}] end o end # Converts from RIQ API's [{raw: "VALUE"}] format def from_raw return {} if self.empty? o = {} self.each do |k,v| if v.is_a?(Array) && v.length > 0 && v.first.include?(:raw) o[k.to_sym.to_snake] = v.first[:raw] else o[k.to_sym.to_snake] = v end end o end def to_cam o = {} self.each do |k,v| o[k.to_cam] = v end o end end refine Object do def symbolize return self unless self.respond_to? :keys o = {} self.each do |k, v| if v.respond_to? :keys o[k.to_sym.to_snake] = v.symbolize else if v.respond_to? :each v.map! do |i| i.symbolize end end o[k.to_sym.to_snake] = v end end o end end end # Base file from which everything else is included Dir[__dir__ + '/riq/*.rb'].each {|file| require file }
mit
binondord/laravel-scaffold
src/Exceptions/GeneratorException.php
309
<?php namespace Binondord\LaravelScaffold\Exceptions; class GeneratorException extends \Exception { /** * The exception description. *fgfg * @var string */ protected $message = 'Could not determine what you are trying to do. Sorry! Check your migration name.'; }
mit
mikeireland/pynrm
pynrm/aoinstrument.py
13805
# -*- coding: utf-8 -*- """Useful utilities that are not telescope-dependent. """ import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import astropy.io.fits as pyfits import csv class AOInstrument: """The AOInstrument Class """ #A blank dictionary on startup. csv_dict = dict() #Blank reduction, cube. and data directories on startup. rdir = '' ddir = '' cdir = '' def read_summary_csv(self, filename='datainfo.csv',ddir=''): """Read the data from local file into a csv_dict structure. Notes ----- At the moment, all data types are strings. It would work better if the second line of the CSV file was the data type. """ #Allow over-riding default data directory. if (ddir == ''): ddir = self.ddir try: f = open(ddir + filename) except: print ("Error: file doesn't exist " + ddir + filename) raise UserWarning r = csv.DictReader(f, delimiter=',') #Read first line to initiate the dictionary line = next(r) d = dict() for k in line.keys(): d[k] = [line[k]] #Read the rest of the file for line in r: for k in line.keys(): d[k].append(line[k]) #Convert to numpy arrays for k in line.keys(): d[k] = np.array(d[k]) f.close() self.csv_dict = d def make_all_darks(self, ddir='', rdir=''): """Make all darks in a current directory. This skeleton routine assumes that keywords "SHRNAME", "NAXIS1" and "NAXIS2" exist. """ #Allow over-riding default reduction and data directories. if (rdir == ''): rdir = self.rdir if (ddir == ''): ddir = self.ddir darks = np.where(np.array(n2.csv_dict['SHRNAME']) == 'closed')[0] #Now we need to find unique values of the following: #NAXIS1, NAXIS2 (plus for nirc2... ITIME, COADDS, MULTISAM) codes = [] for d in darks: codes.append(self.csv_dict['NAXIS1'][d] + self.csv_dict['NAXIS2'][d]) codes = np.array(codes) #For each unique code, find all dark files and call make_dark. for c in np.unique(codes): w = np.where(codes == c)[0] #Only bother if there are at least 3 files. if (len(w) >= 3): files = [ddir + self.csv_dict['FILENAME'][darks[ww]] for ww in w] self.make_dark(files, rdir=rdir) def make_dark(self,in_files, out_file='dark.fits', rdir=''): """This is a basic method to make a dark from several files. It is generally expected to be over-ridden in derived classes. Parameters ---------- in_files : array_like (dtype=string). A list if input filenames. out_file: string The file to write to. """ #Allow over-riding default reduction directory. if (rdir == ''): rdir = self.rdir nf = len(in_files) in_fits = pyfits.open(in_files[0], ignore_missing_end=True) adark = in_fits[0].data in_fits.close() s = adark.shape darks = np.zeros((nf,s[0],s[1])) for i in range(nf): #Read in the data, linearizing as a matter of principle, and also because #this routine is used for in_fits = pyfits.open(in_files[i], ignore_missing_end=True) adark = in_fits[0].data in_fits.close() darks[i,:,:] = adark med_dark = np.median(darks, axis=0) pyfits.writeto(rdir + out_file, med_dark, output_verify='ignore') def info_from_header(self, h): """Find important information from the fits header and store in a common format Prototype function only - to be over-ridden in derived classes. Parameters ---------- h: The fits header Returns ------- (dark_file, flat_file, filter, wave, rad_pixel) """ try: filter = h['FILTER'] except: print ("No FILTER in header") try: wave = h['WAVE'] except: print ("No WAVE in header") try: rad_pix = h['RAD_PIX'] except: print ("No RAD_PIX in header") try: targname = h['TARGET'] except: print ("No TARGET in header") return {'dark_file':'dark.fits', 'flat_file':'flat.fits', 'filter':filter, 'wave':wave, 'rad_pixel':rad_pixel,'targname':targname,'pupil_type':'circ','pupil_params':dict()} def mod2pi(self,angle): """ Convert an angle to the range (-pi,pi) Parameters ---------- angle: float input angle Returns ------- angle: float output angle after the mod2pi operation """ return np.remainder(angle + np.pi,2*np.pi) - np.pi def make_flat(self,in_files, rdir='', out_file='', dark_file='', wave=0.0): """Create a flat frame and save to a fits file, with an attached bad pixel map as the first fits extension. Parameters ---------- in_files : array_like (dtype=string). A list if input filenames. dark_file: string The dark file, previously created with make_dark out_file: string The file to write to rdir: Over-writing the default reduction directory. Returns ------- Nothing. """ #Allow over-riding default reduction directory. if (rdir == ''): rdir = self.rdir #Create a default flat filename from the input files try: in_fits = pyfits.open(in_files[0], ignore_missing_end=True) except: in_fits = pyfits.open(in_files[0]+'.gz', ignore_missing_end=True) h = in_fits[0].header hinfo = self.info_from_header(h) if (out_file == ''): out_file = hinfo['flat_file'] #We use the make_dark function to average our flats. NB we don't destripe. self.make_dark(in_files, rdir=rdir, out_file=out_file, subtract_median=False, destripe=False, med_threshold=15.0) #Now extract the key parts. h = pyfits.getheader(rdir + out_file) #Add a wavelength to the header h['WAVE'] = hinfo['wave'] if (dark_file ==''): dark_file=self.get_dark_filename(h) #FIXME: A hack if get_dark_filename returns a non existant file. #FIXME: This should be incorporated into get_dark_filename if it is necessary, or # otherwise give an error. if not os.path.isfile(rdir + dark_file): allDarks = [f for f in os.listdir(rdir) if 'dark' in f] if 'EXPTIME' in h.keys(): exptime = h['EXPTIME']*100 elif 'ITIME' in h.keys(): exptime = h['ITIME']*100 allTimes = [] for ii in range(len(allDarks)): count = 0 for jj in range(len(allDarks[ii])): if allDarks[ii][jj]=='_': count+=1 if count==2: index = jj+1 allTimes.append(int(allDarks[ii][index:allDarks[ii].find('.fits')])) allTimes = np.array(allTimes) diffTimes = abs(allTimes-exptime) dark_file = allDarks[np.argmin(diffTimes)] #Subtract the dark and normalise the flat. flat = pyfits.getdata(rdir + out_file,0) - pyfits.getdata(rdir + dark_file,0) bad = np.logical_or(pyfits.getdata(rdir + out_file,1),pyfits.getdata(rdir + dark_file,1)) flat[np.where(bad)] = np.median(flat) flat /= np.median(flat) #Write this to a file hl = pyfits.HDUList() hl.append(pyfits.ImageHDU(flat,h)) hl.append(pyfits.ImageHDU(np.uint8(bad))) hl.writeto(rdir + out_file,clobber=True) plt.figure(1) plt.imshow(flat, cmap=cm.gray, interpolation='nearest') plt.title('Flat') def fix_bad_pixels(self,im,bad,fmask): """Fix the bad pixels, using a Fourier technique that adapts to the sampling of each particular pupil/filter combination. Parameters ---------- im : (N,N) array (dtype=float) An image, already chopped to the subarr x subarr size. bad: (N,N) array (dtype=int) A bad pixel map fmask: (N,N) array (dtype=int) A mask containing the region in the Fourier plane where there is no expected signal. Returns ------- The image with bad pixel values optimally corrected. """ # fmask defines the null space of the image Fourier transform. wft = np.where(fmask) # Where the bad pixel array is non-zero. w = np.where(bad) # The bad matrix should map the bad pixels to the real and imaginary # parts of the null space of the image Fourier transform badmat = np.zeros((len(w[0]),len(wft[0])*2)) #print("Bad matrix shape: " + str(badmat.shape)) # Create a uv grid. Math should be correct here, but the second vector could be # 2*np.pi*np.arange(im.shape[0])/float(im.shape[0]) and it would still work. xy = np.meshgrid(2*np.pi*np.arange(im.shape[1]//2 + 1)/float(im.shape[1]), 2*np.pi*(((np.arange(im.shape[0]) + im.shape[0]//2) % im.shape[0]) - im.shape[0]//2)/float(im.shape[0])) for i in range(len(w[0])): # Avoiding the fft is marginally faster here... bft = np.exp(-1j*(w[0][i]*xy[1] + w[1][i]*xy[0])) badmat[i,:] = np.append(bft[wft].real, bft[wft].imag) #A dodgy pseudo-inverse that needs an "invert" is faster than the la.pinv function #Unless things are really screwed, the matrix shouldn't be singular. hb = np.transpose(np.conj(badmat)) ibadmat = np.dot(hb,np.linalg.inv(np.dot(badmat,hb))) #Now find the image Fourier transform on the "zero" region in the Fourier plane #To minimise numerical errors, set the bad pixels to zero at the start. im[w]=0 ftimz = (np.fft.rfft2(im))[wft] # Now compute the bad pixel corrections. (NB a sanity check here is # that the imaginary part really is 0) addit = -np.real(np.dot(np.append(ftimz.real, ftimz.imag),ibadmat)) #FIXIT #We would rather use linalg.solve than an inversion! #addit2 = #import pdb; pdb.set_trace() # ibadmat = np.solve( # plt.clf() # plt.plot(np.real(np.dot(ftimz,ibadmat)), np.imag(np.dot(ftimz,ibadmat))) # raise UserWarning im[w] += addit return im def regrid_fft(self,im,new_shape, fmask=[]): """Regrid onto a larger number of pixels using an fft. This is optimal for Nyquist sampled data. Parameters ---------- im: array The input image. new_shape: (new_y,new_x) The new shape Notes ------ TODO: This should work with an arbitrary number of dimensions """ ftim = np.fft.rfft2(im) if len(fmask) > 0: ftim[np.where(fmask)] = 0 new_ftim = np.zeros((new_shape[0], new_shape[1]/2 + 1),dtype='complex') new_ftim[0:ftim.shape[0]/2,0:ftim.shape[1]] = \ ftim[0:ftim.shape[0]/2,0:ftim.shape[1]] new_ftim[new_shape[0]-ftim.shape[0]/2:,0:ftim.shape[1]] = \ ftim[ftim.shape[0]/2:,0:ftim.shape[1]] return np.fft.irfft2(new_ftim) def hexagon(self, dim, width): """This function creates a hexagon. Parameters ---------- dim: int Size of the 2D array width: int flat-to-flat width of the hexagon Returns ------- pupil: float array (sz,sz) 2D array hexagonal pupil mask """ x = np.arange(dim)-dim/2.0 xy = np.meshgrid(x,x) xx = xy[1] yy = xy[0] w = np.where( (yy < width/2) * (yy > (-width/2)) * \ (yy < (width-np.sqrt(3)*xx)) * (yy > (-width+np.sqrt(3)*xx)) * \ (yy < (width+np.sqrt(3)*xx)) * (yy > (-width-np.sqrt(3)*xx))) hex = np.zeros((dim,dim)) hex[w]=1.0 return hex def rebin(self,a, shape): """Re-bins an image to a new (smaller) image with summing Originally from: http://stackoverflow.com/questions/8090229/resize-with-averaging-or-rebin-a-numpy-2d-array Parameters ---------- a: array Input image shape: (xshape,yshape) New shape """ sh = shape[0],a.shape[0]//shape[0],shape[1],a.shape[1]//shape[1] return a.reshape(sh).sum(-1).sum(1) def shift_and_ft(self,im, ftpix=(),regrid_factor=3): """Sub-pixel shift an image to the origin and Fourier-transform it Parameters ---------- im: (ny,nx) float array ftpix: optional ( (nphi) array, (nphi) array) of Fourier sampling points. If included, the mean square Fourier phase will be minimised. Returns ---------- ftim: (ny,nx/2+1) complex array """ ny = im.shape[0] nx = im.shape[1] if len(ftpix)==0: #Regrid onto a finer array im = self.regrid_fft(im,(regrid_factor*ny,regrid_factor*nx)) #Find the peak shifts = np.unravel_index(im.argmax(), im.shape) #Shift to the peak (noting that given we're about to rebin... we need to offset #by half of the regrid_factor) im = np.roll(np.roll(im,-shifts[0]+regrid_factor//2,axis=0),-shifts[1]+regrid_factor//2,axis=1) #Rebin and FFT! im = self.rebin(im,(ny,nx)) ftim = np.fft.rfft2(im) else: #Shift to the origin within a pixel and Fourier transform shifts = np.unravel_index(im.argmax(), im.shape) im = np.roll(np.roll(im,-shifts[0]+1,axis=0),-shifts[1]+1,axis=1) ftim = np.fft.rfft2(im) #Find the Fourier phase arg_ftpix = np.angle(ftim[ftpix]) #Compute phase in radians per Fourier pixel vcoord = ((ftpix[0] + ny/2) % ny)- ny/2 ucoord = ftpix[1] #Project onto the phase ramp in each direction, and remove this phase ramp #from the data. vphase = np.sum(arg_ftpix * vcoord)/np.sum(vcoord**2) uphase = np.sum(arg_ftpix * ucoord)/np.sum(ucoord**2) uv = np.meshgrid(np.arange(nx/2 + 1), ((np.arange(ny) + ny/2) % ny) - ny/2 ) ftim = ftim*np.exp(-1j * uv[0] * uphase - 1j*uv[1]*vphase) return ftim
mit
charlesreid1/dang-sunburst
pelican/angular/dynamic/slider_modcontrol.js
1207
/////////////////////////////////////// // // Slider Interactive Sunburst // // Module/Controller // var a = angular.module("sliderApp", [], function($interpolateProvider) { $interpolateProvider.startSymbol('[['); $interpolateProvider.endSymbol(']]'); } ); var datafactory = a.factory('datafactory', function($http, $q) { return { getSunburstData: function() { var deferred = $q.defer(); $http.get('slider_tree.json').success(function(data) { deferred.resolve(data); }).error(function(){ console.log('error loading slider_tree.json'); deferred.reject(); }); return deferred.promise; } } }); function SliderController($scope,datafactory) { $scope.initialize = function() { datafactory.getSunburstData().then( function(data) { $scope.sunburstData = data; } ); } } // the first few arguments of the list should correspond to the Angular-namespace stuff to feed to SliderController var c = a.controller("SliderController", ["$scope", "datafactory", SliderController]);
mit
ABASystems/react-interactive-tutorials
demo-site/demos.js
100
import { init } from 'uptick-demo-site' import SampleTutorial from './sample-tutorial.js' init();
mit
sam/harbor-ftp
lib/harbor/ftp/user_managers/hash_user_manager.rb
713
class Harbor module FTP module UserManagers class HashUserManager include UserManager DEFAULT_HOME = "/tmp" def initialize @users = {} end def add_user(username, password, home_directory = DEFAULT_HOME) @users[username] = User.new username, password, home_directory end def get_user_by_name(username) @users[username] end def get_all_user_names @users.keys end def exists?(username) @users.key?(username) end end # class HashUserManager end # module UserManagers end # module FTP end # class Harbor
mit
Mozu/mozu-dotnet
Mozu.Api/Urls/Commerce/Catalog/Storefront/ProductUrl.cs
19340
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a Codezu. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ using System; using System.Collections.Generic; namespace Mozu.Api.Urls.Commerce.Catalog.Storefront { public partial class ProductUrl { /// <summary> /// Get Resource Url for GetProducts /// </summary> /// <param name="cursorMark">In your first deep paged request, set this parameter to . Then, in all subsequent requests, set this parameter to the subsequent values of that's returned in each response to continue paging through the results. Continue this pattern until is null, which signifies the end of the paged results.</param> /// <param name="defaultSort">Sets the default sorting for content. Sort does not use AND in determining the order</param> /// <param name="filter">A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of supported filters.</param> /// <param name="pageSize">When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <param name="responseOptions">Options you can specify for the response. This parameter is null by default.You can primarily use this parameter to return volume price band information in product details, which you can then display on category pages and search results depanding on your theme configuration. To return volume price band information, set this parameter to .</param> /// <param name="sortBy">The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for more information.</param> /// <param name="startIndex">When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl GetProductsUrl(string filter = null, int? startIndex = null, int? pageSize = null, string sortBy = null, string responseOptions = null, string cursorMark = null, string defaultSort = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/?filter={filter}&startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&responseOptions={responseOptions}&cursorMark={cursorMark}&defaultSort={defaultSort}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "cursorMark", cursorMark); mozuUrl.FormatUrl( "defaultSort", defaultSort); mozuUrl.FormatUrl( "filter", filter); mozuUrl.FormatUrl( "pageSize", pageSize); mozuUrl.FormatUrl( "responseFields", responseFields); mozuUrl.FormatUrl( "responseOptions", responseOptions); mozuUrl.FormatUrl( "sortBy", sortBy); mozuUrl.FormatUrl( "startIndex", startIndex); return mozuUrl; } /// <summary> /// Get Resource Url for GetProductInventory /// </summary> /// <param name="locationCodes">Array of location codes for which to retrieve product inventory information.</param> /// <param name="productCode">The unique, user-defined product code of a product, used throughout to reference and associate to a product.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl GetProductInventoryUrl(string productCode, string locationCodes = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/{productCode}/locationinventory?locationCodes={locationCodes}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "locationCodes", locationCodes); mozuUrl.FormatUrl( "productCode", productCode); mozuUrl.FormatUrl( "responseFields", responseFields); return mozuUrl; } /// <summary> /// Get Resource Url for GetProduct /// </summary> /// <param name="acceptVariantProductCode">Specifies whether to accept a product variant's code as the .When you set this parameter to , you can pass in a product variant's code in the GetProduct call to retrieve the product variant details that are associated with the base product.</param> /// <param name="allowInactive">If true, allow inactive categories to be retrieved in the category list response. If false, the categories retrieved will not include ones marked inactive.</param> /// <param name="productCode">The unique, user-defined product code of a product, used throughout to reference and associate to a product.</param> /// <param name="purchaseLocation">The location where the order item(s) was purchased.</param> /// <param name="quantity">The number of cart items in the shopper's active cart.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <param name="skipInventoryCheck">If true, skip the process to validate inventory when creating this product reservation.</param> /// <param name="sliceValue"></param> /// <param name="supressOutOfStock404">Specifies whether to supress the 404 error when the product is out of stock.</param> /// <param name="variationProductCode">Merchant-created code associated with a specific product variation. Variation product codes maintain an association with the base product code.</param> /// <param name="variationProductCodeFilter">Provides support for [Variant Discounts](https://www.mozu.com/docs/guides/marketing/variant-discounts.htm) by indicating single and multiple variant codes. When this data is provided then only the option values for the specified product variants will display under the “Options” list for the product. If a product has multiple options, then each option and the specified value for that variant will be displayed.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl GetProductUrl(string productCode, string variationProductCode = null, bool? allowInactive = null, bool? skipInventoryCheck = null, bool? supressOutOfStock404 = null, int? quantity = null, bool? acceptVariantProductCode = null, string purchaseLocation = null, string variationProductCodeFilter = null, string sliceValue = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/{productCode}?variationProductCode={variationProductCode}&allowInactive={allowInactive}&skipInventoryCheck={skipInventoryCheck}&supressOutOfStock404={supressOutOfStock404}&quantity={quantity}&acceptVariantProductCode={acceptVariantProductCode}&purchaseLocation={purchaseLocation}&variationProductCodeFilter={variationProductCodeFilter}&sliceValue={sliceValue}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "acceptVariantProductCode", acceptVariantProductCode); mozuUrl.FormatUrl( "allowInactive", allowInactive); mozuUrl.FormatUrl( "productCode", productCode); mozuUrl.FormatUrl( "purchaseLocation", purchaseLocation); mozuUrl.FormatUrl( "quantity", quantity); mozuUrl.FormatUrl( "responseFields", responseFields); mozuUrl.FormatUrl( "skipInventoryCheck", skipInventoryCheck); mozuUrl.FormatUrl( "sliceValue", sliceValue); mozuUrl.FormatUrl( "supressOutOfStock404", supressOutOfStock404); mozuUrl.FormatUrl( "variationProductCode", variationProductCode); mozuUrl.FormatUrl( "variationProductCodeFilter", variationProductCodeFilter); return mozuUrl; } /// <summary> /// Get Resource Url for GetProductForIndexing /// </summary> /// <param name="lastModifiedDate">The date when the product was last updated.</param> /// <param name="productCode">The unique, user-defined product code of a product, used throughout to reference and associate to a product.</param> /// <param name="productVersion">The product version.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl GetProductForIndexingUrl(string productCode, long? productVersion = null, DateTime? lastModifiedDate = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/indexing/{productCode}?productVersion={productVersion}&lastModifiedDate={lastModifiedDate}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "lastModifiedDate", lastModifiedDate); mozuUrl.FormatUrl( "productCode", productCode); mozuUrl.FormatUrl( "productVersion", productVersion); mozuUrl.FormatUrl( "responseFields", responseFields); return mozuUrl; } /// <summary> /// Get Resource Url for ConfiguredProduct /// </summary> /// <param name="includeOptionDetails">If true, the response returns details about the product. If false, returns a product summary such as the product name, price, and sale price.</param> /// <param name="productCode">The unique, user-defined product code of a product, used throughout to reference and associate to a product.</param> /// <param name="purchaseLocation">The location where the order item(s) was purchased.</param> /// <param name="quantity">The number of cart items in the shopper's active cart.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <param name="skipInventoryCheck">If true, skip the process to validate inventory when creating this product reservation.</param> /// <param name="variationProductCodeFilter">Provides support for [Variant Discounts](https://www.mozu.com/docs/guides/marketing/variant-discounts.htm) by indicating single and multiple variant codes. When this data is provided then only the option values for the specified product variants will display under the “Options” list for the product. If a product has multiple options, then each option and the specified value for that variant will be displayed.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl ConfiguredProductUrl(string productCode, bool? includeOptionDetails = null, bool? skipInventoryCheck = null, int? quantity = null, string purchaseLocation = null, string variationProductCodeFilter = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/{productCode}/configure?includeOptionDetails={includeOptionDetails}&skipInventoryCheck={skipInventoryCheck}&quantity={quantity}&purchaseLocation={purchaseLocation}&variationProductCodeFilter={variationProductCodeFilter}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "includeOptionDetails", includeOptionDetails); mozuUrl.FormatUrl( "productCode", productCode); mozuUrl.FormatUrl( "purchaseLocation", purchaseLocation); mozuUrl.FormatUrl( "quantity", quantity); mozuUrl.FormatUrl( "responseFields", responseFields); mozuUrl.FormatUrl( "skipInventoryCheck", skipInventoryCheck); mozuUrl.FormatUrl( "variationProductCodeFilter", variationProductCodeFilter); return mozuUrl; } /// <summary> /// Get Resource Url for ValidateProduct /// </summary> /// <param name="productCode">The unique, user-defined product code of a product, used throughout to reference and associate to a product.</param> /// <param name="purchaseLocation">The location where the order item(s) was purchased.</param> /// <param name="quantity">The number of cart items in the shopper's active cart.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <param name="skipDefaults">Normally, product validation applies default extras to products that do not have options specified. If , product validation does not apply default extras to products.</param> /// <param name="skipInventoryCheck">If true, skip the process to validate inventory when creating this product reservation.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl ValidateProductUrl(string productCode, bool? skipInventoryCheck = null, int? quantity = null, bool? skipDefaults = null, string purchaseLocation = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/{productCode}/validate?skipInventoryCheck={skipInventoryCheck}&quantity={quantity}&skipDefaults={skipDefaults}&purchaseLocation={purchaseLocation}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "productCode", productCode); mozuUrl.FormatUrl( "purchaseLocation", purchaseLocation); mozuUrl.FormatUrl( "quantity", quantity); mozuUrl.FormatUrl( "responseFields", responseFields); mozuUrl.FormatUrl( "skipDefaults", skipDefaults); mozuUrl.FormatUrl( "skipInventoryCheck", skipInventoryCheck); return mozuUrl; } /// <summary> /// Get Resource Url for ValidateDiscounts /// </summary> /// <param name="allowInactive">If true, allow inactive categories to be retrieved in the category list response. If false, the categories retrieved will not include ones marked inactive.</param> /// <param name="customerAccountId">The unique identifier of the customer account for which to retrieve wish lists.</param> /// <param name="productCode">The unique, user-defined product code of a product, used throughout to reference and associate to a product.</param> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <param name="skipInventoryCheck">If true, skip the process to validate inventory when creating this product reservation.</param> /// <param name="variationProductCode">Merchant-created code associated with a specific product variation. Variation product codes maintain an association with the base product code.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl ValidateDiscountsUrl(string productCode, string variationProductCode = null, int? customerAccountId = null, bool? allowInactive = null, bool? skipInventoryCheck = null, string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/{productCode}/validateDiscounts?variationProductCode={variationProductCode}&customerAccountId={customerAccountId}&allowInactive={allowInactive}&skipInventoryCheck={skipInventoryCheck}&responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "allowInactive", allowInactive); mozuUrl.FormatUrl( "customerAccountId", customerAccountId); mozuUrl.FormatUrl( "productCode", productCode); mozuUrl.FormatUrl( "responseFields", responseFields); mozuUrl.FormatUrl( "skipInventoryCheck", skipInventoryCheck); mozuUrl.FormatUrl( "variationProductCode", variationProductCode); return mozuUrl; } /// <summary> /// Get Resource Url for GetProductCosts /// </summary> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl GetProductCostsUrl(string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/costs?responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "responseFields", responseFields); return mozuUrl; } /// <summary> /// Get Resource Url for GetProductInventories /// </summary> /// <param name="responseFields">Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.</param> /// <returns> /// String - Resource Url /// </returns> public static MozuUrl GetProductInventoriesUrl(string responseFields = null) { var url = "/api/commerce/catalog/storefront/products/locationinventory?responseFields={responseFields}"; var mozuUrl = new MozuUrl(url, MozuUrl.UrlLocation.TENANT_POD, false) ; mozuUrl.FormatUrl( "responseFields", responseFields); return mozuUrl; } } }
mit
PartnerCenterSamples/Reseller-Web-Application
src/Storefront/BusinessLogic/Commerce/Transactions/PurchaseExtraSeats.cs
4428
// ----------------------------------------------------------------------- // <copyright file="PurchaseExtraSeats.cs" company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> // ----------------------------------------------------------------------- namespace Microsoft.Store.PartnerCenter.Storefront.BusinessLogic.Commerce.Transactions { using System; using System.Diagnostics; using System.Threading.Tasks; using Exceptions; using Infrastructure; using PartnerCenter.Exceptions; using PartnerCenter.Models.Subscriptions; using Subscriptions; /// <summary> /// Purchases additional seats for a subscription. /// </summary> public class PurchaseExtraSeats : IBusinessTransactionWithOutput<Subscription> { /// <summary> /// The subscription's seat count before the update. /// </summary> private int originalSeatCount; /// <summary> /// Initializes a new instance of the <see cref="PurchaseExtraSeats"/> class. /// </summary> /// <param name="subscriptionOperations">A Partner Center subscription operations instance.</param> /// <param name="seatsToPurchase">The number of seats to purchase.</param> public PurchaseExtraSeats(ISubscription subscriptionOperations, int seatsToPurchase) { subscriptionOperations.AssertNotNull(nameof(subscriptionOperations)); seatsToPurchase.AssertPositive(nameof(seatsToPurchase)); SubscriptionOperations = subscriptionOperations; SeatsToPurchase = seatsToPurchase; } /// <summary> /// Gets the subscription operations used to manipulate the subscription. /// </summary> public ISubscription SubscriptionOperations { get; private set; } /// <summary> /// Gets the number of seats to purchase. /// </summary> public int SeatsToPurchase { get; private set; } /// <summary> /// Gets the updated subscription. /// </summary> public Subscription Result { get; private set; } /// <summary> /// Purchases additional seats for the subscription. /// </summary> /// <returns>A task.</returns> public async Task ExecuteAsync() { try { Subscription partnerCenterSubscription = await SubscriptionOperations.GetAsync().ConfigureAwait(false); originalSeatCount = partnerCenterSubscription.Quantity; partnerCenterSubscription.Quantity += SeatsToPurchase; Result = await SubscriptionOperations.PatchAsync(partnerCenterSubscription).ConfigureAwait(false); } catch (PartnerException subscriptionUpdateProblem) { if (subscriptionUpdateProblem.ErrorCategory == PartnerErrorCategory.NotFound) { throw new PartnerDomainException(ErrorCode.SubscriptionNotFound, "PurchaseExtraSeats.ExecuteAsync() Failed", subscriptionUpdateProblem); } else { throw new PartnerDomainException(ErrorCode.SubscriptionUpdateFailure, "PurchaseExtraSeats.ExecuteAsync() Failed", subscriptionUpdateProblem); } } } /// <summary> /// Reverts the seat change. /// </summary> /// <returns>A task.</returns> public async Task RollbackAsync() { if (Result != null) { try { // restore the original seat count for the subscription Result.Quantity = originalSeatCount; await SubscriptionOperations.PatchAsync(Result).ConfigureAwait(false); } catch (Exception subscriptionUpdateProblem) { if (subscriptionUpdateProblem.IsFatal()) { throw; } Trace.TraceError("PurchaseExtraSeats.RollbackAsync failed: {0}, ID: {1}, Quantity: {2}.", subscriptionUpdateProblem, this.Result.Id, this.Result.Quantity); // TODO: Notify the system integrity recovery component } } this.Result = null; } } }
mit
javieralfaya/tuitty
vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php
18712
<?php namespace Doctrine\Tests\DBAL; use Doctrine\DBAL\Connection; use Doctrine\DBAL\SQLParserUtils; require_once __DIR__ . '/../TestInit.php'; /** * @group DBAL-78 * @group DDC-1372 */ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase { static public function dataGetPlaceholderPositions() { return array( // none array('SELECT * FROM Foo', true, array()), array('SELECT * FROM Foo', false, array()), // Positionals array('SELECT ?', true, array(7)), array('SELECT * FROM Foo WHERE bar IN (?, ?, ?)', true, array(32, 35, 38)), array('SELECT ? FROM ?', true, array(7, 14)), array('SELECT "?" FROM foo', true, array()), array("SELECT '?' FROM foo", true, array()), array("SELECT `?` FROM foo", true, array()), // Ticket DBAL-552 array("SELECT [?] FROM foo", true, array()), array("SELECT 'Doctrine\DBAL?' FROM foo", true, array()), // Ticket DBAL-558 array('SELECT "Doctrine\DBAL?" FROM foo', true, array()), // Ticket DBAL-558 array('SELECT `Doctrine\DBAL?` FROM foo', true, array()), // Ticket DBAL-558 array('SELECT [Doctrine\DBAL?] FROM foo', true, array()), // Ticket DBAL-558 array('SELECT "?" FROM foo WHERE bar = ?', true, array(32)), array("SELECT '?' FROM foo WHERE bar = ?", true, array(32)), array("SELECT `?` FROM foo WHERE bar = ?", true, array(32)), // Ticket DBAL-552 array("SELECT [?] FROM foo WHERE bar = ?", true, array(32)), array("SELECT 'Doctrine\DBAL?' FROM foo WHERE bar = ?", true, array(45)), // Ticket DBAL-558 array('SELECT "Doctrine\DBAL?" FROM foo WHERE bar = ?', true, array(45)), // Ticket DBAL-558 array('SELECT `Doctrine\DBAL?` FROM foo WHERE bar = ?', true, array(45)), // Ticket DBAL-558 array('SELECT [Doctrine\DBAL?] FROM foo WHERE bar = ?', true, array(45)), // Ticket DBAL-558 array( <<<'SQLDATA' SELECT * FROM foo WHERE bar = 'it\'s a trap? \\' OR bar = ? AND baz = "\"quote\" me on it? \\" OR baz = ? SQLDATA , true, array(58, 104) ), // named array('SELECT :foo FROM :bar', false, array(7 => 'foo', 17 => 'bar')), array('SELECT * FROM Foo WHERE bar IN (:name1, :name2)', false, array(32 => 'name1', 40 => 'name2')), array('SELECT ":foo" FROM Foo WHERE bar IN (:name1, :name2)', false, array(37 => 'name1', 45 => 'name2')), array("SELECT ':foo' FROM Foo WHERE bar IN (:name1, :name2)", false, array(37 => 'name1', 45 => 'name2')), array('SELECT :foo_id', false, array(7 => 'foo_id')), // Ticket DBAL-231 array('SELECT @rank := 1', false, array()), // Ticket DBAL-398 array('SELECT @rank := 1 AS rank, :foo AS foo FROM :bar', false, array(27 => 'foo', 44 => 'bar')), // Ticket DBAL-398 array('SELECT * FROM Foo WHERE bar > :start_date AND baz > :start_date', false, array(30 => 'start_date', 52 => 'start_date')), // Ticket GH-113 array('SELECT foo::date as date FROM Foo WHERE bar > :start_date AND baz > :start_date', false, array(46 => 'start_date', 68 => 'start_date')), // Ticket GH-259 array('SELECT `d.ns:col_name` FROM my_table d WHERE `d.date` >= :param1', false, array(57 => 'param1')), // Ticket DBAL-552 array('SELECT [d.ns:col_name] FROM my_table d WHERE [d.date] >= :param1', false, array(57 => 'param1')), // Ticket DBAL-552 ); } /** * @dataProvider dataGetPlaceholderPositions * @param type $query * @param type $isPositional * @param type $expectedParamPos */ public function testGetPlaceholderPositions($query, $isPositional, $expectedParamPos) { $actualParamPos = SQLParserUtils::getPlaceholderPositions($query, $isPositional); $this->assertEquals($expectedParamPos, $actualParamPos); } static public function dataExpandListParameters() { return array( // Positional: Very simple with one needle array( "SELECT * FROM Foo WHERE foo IN (?)", array(array(1, 2, 3)), array(Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?, ?)', array(1, 2, 3), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Positional: One non-list before d one after list-needle array( "SELECT * FROM Foo WHERE foo = ? AND bar IN (?)", array("string", array(1, 2, 3)), array(\PDO::PARAM_STR, Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?)', array("string", 1, 2, 3), array(\PDO::PARAM_STR, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Positional: One non-list after list-needle array( "SELECT * FROM Foo WHERE bar IN (?) AND baz = ?", array(array(1, 2, 3), "foo"), array(Connection::PARAM_INT_ARRAY, \PDO::PARAM_STR), 'SELECT * FROM Foo WHERE bar IN (?, ?, ?) AND baz = ?', array(1, 2, 3, "foo"), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR) ), // Positional: One non-list before and one after list-needle array( "SELECT * FROM Foo WHERE foo = ? AND bar IN (?) AND baz = ?", array(1, array(1, 2, 3), 4), array(\PDO::PARAM_INT, Connection::PARAM_INT_ARRAY, \PDO::PARAM_INT), 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?) AND baz = ?', array(1, 1, 2, 3, 4), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Positional: Two lists array( "SELECT * FROM Foo WHERE foo IN (?, ?)", array(array(1, 2, 3), array(4, 5)), array(Connection::PARAM_INT_ARRAY, Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?, ?, ?, ?)', array(1, 2, 3, 4, 5), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Positional: Empty "integer" array DDC-1978 array( "SELECT * FROM Foo WHERE foo IN (?)", array(array()), array(Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (NULL)', array(), array() ), // Positional: Empty "str" array DDC-1978 array( "SELECT * FROM Foo WHERE foo IN (?)", array(array()), array(Connection::PARAM_STR_ARRAY), 'SELECT * FROM Foo WHERE foo IN (NULL)', array(), array() ), // Named parameters : Very simple with param int array( "SELECT * FROM Foo WHERE foo = :foo", array('foo'=>1), array('foo'=>\PDO::PARAM_INT), 'SELECT * FROM Foo WHERE foo = ?', array(1), array(\PDO::PARAM_INT) ), // Named parameters : Very simple with param int and string array( "SELECT * FROM Foo WHERE foo = :foo AND bar = :bar", array('bar'=>'Some String','foo'=>1), array('foo'=>\PDO::PARAM_INT,'bar'=>\PDO::PARAM_STR), 'SELECT * FROM Foo WHERE foo = ? AND bar = ?', array(1,'Some String'), array(\PDO::PARAM_INT, \PDO::PARAM_STR) ), // Named parameters : Very simple with one needle array( "SELECT * FROM Foo WHERE foo IN (:foo)", array('foo'=>array(1, 2, 3)), array('foo'=>Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?, ?)', array(1, 2, 3), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Named parameters: One non-list before d one after list-needle array( "SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar)", array('foo'=>"string", 'bar'=>array(1, 2, 3)), array('foo'=>\PDO::PARAM_STR, 'bar'=>Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?)', array("string", 1, 2, 3), array(\PDO::PARAM_STR, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Named parameters: One non-list after list-needle array( "SELECT * FROM Foo WHERE bar IN (:bar) AND baz = :baz", array('bar'=>array(1, 2, 3), 'baz'=>"foo"), array('bar'=>Connection::PARAM_INT_ARRAY, 'baz'=>\PDO::PARAM_STR), 'SELECT * FROM Foo WHERE bar IN (?, ?, ?) AND baz = ?', array(1, 2, 3, "foo"), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR) ), // Named parameters: One non-list before and one after list-needle array( "SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar) AND baz = :baz", array('bar'=>array(1, 2, 3),'foo'=>1, 'baz'=>4), array('bar'=>Connection::PARAM_INT_ARRAY, 'foo'=>\PDO::PARAM_INT, 'baz'=>\PDO::PARAM_INT), 'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?) AND baz = ?', array(1, 1, 2, 3, 4), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Named parameters: Two lists array( "SELECT * FROM Foo WHERE foo IN (:a, :b)", array('b'=>array(4, 5),'a'=>array(1, 2, 3)), array('a'=>Connection::PARAM_INT_ARRAY, 'b'=>Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?, ?, ?, ?)', array(1, 2, 3, 4, 5), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Named parameters : With the same name arg type string array( "SELECT * FROM Foo WHERE foo <> :arg AND bar = :arg", array('arg'=>"Some String"), array('arg'=>\PDO::PARAM_STR), 'SELECT * FROM Foo WHERE foo <> ? AND bar = ?', array("Some String","Some String"), array(\PDO::PARAM_STR,\PDO::PARAM_STR,) ), // Named parameters : With the same name arg array( "SELECT * FROM Foo WHERE foo IN (:arg) AND NOT bar IN (:arg)", array('arg'=>array(1, 2, 3)), array('arg'=>Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?, ?) AND NOT bar IN (?, ?, ?)', array(1, 2, 3, 1, 2, 3), array(\PDO::PARAM_INT,\PDO::PARAM_INT, \PDO::PARAM_INT,\PDO::PARAM_INT,\PDO::PARAM_INT, \PDO::PARAM_INT) ), // Named parameters : Same name, other name in between DBAL-299 array( "SELECT * FROM Foo WHERE (:foo = 2) AND (:bar = 3) AND (:foo = 2)", array('foo'=>2,'bar'=>3), array('foo'=>\PDO::PARAM_INT,'bar'=>\PDO::PARAM_INT), 'SELECT * FROM Foo WHERE (? = 2) AND (? = 3) AND (? = 2)', array(2, 3, 2), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT) ), // Named parameters : Empty "integer" array DDC-1978 array( "SELECT * FROM Foo WHERE foo IN (:foo)", array('foo'=>array()), array('foo'=>Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (NULL)', array(), array() ), // Named parameters : Two empty "str" array DDC-1978 array( "SELECT * FROM Foo WHERE foo IN (:foo) OR bar IN (:bar)", array('foo'=>array(), 'bar'=>array()), array('foo'=>Connection::PARAM_STR_ARRAY, 'bar'=>Connection::PARAM_STR_ARRAY), 'SELECT * FROM Foo WHERE foo IN (NULL) OR bar IN (NULL)', array(), array() ), array( "SELECT * FROM Foo WHERE foo IN (:foo) OR bar = :bar OR baz = :baz", array('foo' => array(1, 2), 'bar' => 'bar', 'baz' => 'baz'), array('foo' => Connection::PARAM_INT_ARRAY, 'baz' => 'string'), 'SELECT * FROM Foo WHERE foo IN (?, ?) OR bar = ? OR baz = ?', array(1, 2, 'bar', 'baz'), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR, 'string') ), array( "SELECT * FROM Foo WHERE foo IN (:foo) OR bar = :bar", array('foo' => array(1, 2), 'bar' => 'bar'), array('foo' => Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?) OR bar = ?', array(1, 2, 'bar'), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR) ), // Params/types with colons array( "SELECT * FROM Foo WHERE foo = :foo OR bar = :bar", array(':foo' => 'foo', ':bar' => 'bar'), array(':foo' => \PDO::PARAM_INT), 'SELECT * FROM Foo WHERE foo = ? OR bar = ?', array('foo', 'bar'), array(\PDO::PARAM_INT, \PDO::PARAM_STR) ), array( "SELECT * FROM Foo WHERE foo = :foo OR bar = :bar", array(':foo' => 'foo', ':bar' => 'bar'), array(':foo' => \PDO::PARAM_INT, 'bar' => \PDO::PARAM_INT), 'SELECT * FROM Foo WHERE foo = ? OR bar = ?', array('foo', 'bar'), array(\PDO::PARAM_INT, \PDO::PARAM_INT) ), array( "SELECT * FROM Foo WHERE foo IN (:foo) OR bar = :bar", array(':foo' => array(1, 2), ':bar' => 'bar'), array('foo' => Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?) OR bar = ?', array(1, 2, 'bar'), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR) ), array( "SELECT * FROM Foo WHERE foo IN (:foo) OR bar = :bar", array('foo' => array(1, 2), 'bar' => 'bar'), array(':foo' => Connection::PARAM_INT_ARRAY), 'SELECT * FROM Foo WHERE foo IN (?, ?) OR bar = ?', array(1, 2, 'bar'), array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR) ), // DBAL-522 - null valued parameters are not considered array( 'INSERT INTO Foo (foo, bar) values (:foo, :bar)', array('foo' => 1, 'bar' => null), array(':foo' => \PDO::PARAM_INT, ':bar' => \PDO::PARAM_NULL), 'INSERT INTO Foo (foo, bar) values (?, ?)', array(1, null), array(\PDO::PARAM_INT, \PDO::PARAM_NULL) ), array( 'INSERT INTO Foo (foo, bar) values (?, ?)', array(1, null), array(\PDO::PARAM_INT, \PDO::PARAM_NULL), 'INSERT INTO Foo (foo, bar) values (?, ?)', array(1, null), array(\PDO::PARAM_INT, \PDO::PARAM_NULL) ), ); } /** * @dataProvider dataExpandListParameters * @param type $q * @param type $p * @param type $t * @param type $expectedQuery * @param type $expectedParams * @param type $expectedTypes */ public function testExpandListParameters($q, $p, $t, $expectedQuery, $expectedParams, $expectedTypes) { list($query, $params, $types) = SQLParserUtils::expandListParameters($q, $p, $t); $this->assertEquals($expectedQuery, $query, "Query was not rewritten correctly."); $this->assertEquals($expectedParams, $params, "Params dont match"); $this->assertEquals($expectedTypes, $types, "Types dont match"); } public static function dataQueryWithMissingParameters() { return array( array( "SELECT * FROM foo WHERE bar = :param", array('other' => 'val'), array(), ), array( "SELECT * FROM foo WHERE bar = :param", array(), array(), ), array( "SELECT * FROM foo WHERE bar = :param", array(), array('param' => Connection::PARAM_INT_ARRAY), ), array( "SELECT * FROM foo WHERE bar = :param", array(), array(':param' => Connection::PARAM_INT_ARRAY), ), array( "SELECT * FROM foo WHERE bar = :param", array(), array('bar' => Connection::PARAM_INT_ARRAY), ), array( "SELECT * FROM foo WHERE bar = :param", array('bar' => 'value'), array('bar' => Connection::PARAM_INT_ARRAY), ), ); } /** * @dataProvider dataQueryWithMissingParameters */ public function testExceptionIsThrownForMissingParam($query, $params, $types = array()) { $this->setExpectedException( 'Doctrine\DBAL\SQLParserUtilsException', 'Value for :param not found in params array. Params array key should be "param"' ); SQLParserUtils::expandListParameters($query, $params, $types); } }
mit
isayme/socks5-server
example/usernamepassword.js
408
var Socks5Server = require('../').Socks5Server; var AUTH_METHODS = require('../').AUTH_METHODS; var server = new Socks5Server(); // server.registerAuth(AUTH_METHOS.NOAUTH, auth.noauth); server.registerAuth(AUTH_METHODS.USERNAME_PASSWORD, { username: 'username', password: 'password' }); server.listen(1080, function() { address = server.server.address(); console.log("server on %j", address); });
mit
eFounders/efounders-workable-client
src/application-form.js
381
class ApplicationForm { constructor({ client, subdomain, shortcode }) { this.client = client; this.subdomain = subdomain; this.shortcode = shortcode; } info() { const { client, subdomain, shortcode } = this; const endpoint = `/${subdomain}/jobs/${shortcode}/application_form`; return client.get({ endpoint }); } } module.exports = ApplicationForm;
mit
DreamHacks/dreamdota
DreamAuth2/ThreadPipe.cpp
7263
#include "stdafx.h" #include "Exception.h" #include "ThreadPipe.h" #include "Auth.h" #include "Locale.h" #include "Connection.h" #include "Message.h" #include "SharedMemory.h" #include "RemoteMemory.h" #include "Loggedin.h" #include "Utils.h" #include "SystemTools.h" #include "Injection.h" #include "../DreamWarcraft/Version.h" #include "../DreamWarcraft/Profile.h" static const uint32_t BUFFER_SIZE = 10240; enum GameConnectionEnum { GC_E_READ_FAILED = 1, GC_E_WRITE_FAILED }; static std::pair<DWORD, DWORD> g_11game_range; static std::pair<DWORD, DWORD> g_war3shell_range; static void CheckThread(HANDLE process, DWORD tid) { SystemTools::ThreadInfo ti; if (SystemTools::GetThreadInfo(tid, &ti)) { if ((DWORD)ti.start_address > g_11game_range.first && (DWORD)ti.start_address < g_11game_range.second) { OutputDebugString(L"Suspend 11game.dll Thread!\n"); HANDLE thread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, tid); if (!thread) OutputDebugString(L"Open failed!\n"); if (-1 == SuspendThread(thread)) OutputDebugString(L"Subspend failed!\n"); CloseHandle(thread); } else if ((DWORD)ti.start_address > g_war3shell_range.first && (DWORD)ti.start_address < g_war3shell_range.second) { OutputDebugString(L"Suspend war3shell.dll Thread!\n"); HANDLE thread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, tid); if (-1 == SuspendThread(thread)) OutputDebugString(L"Subspend failed!\n"); CloseHandle(thread); } } } /* static void Patch11() { DWORD pid = GetWar3PID(); if (!pid) return; HANDLE war3 = NTFindProcessHandle(pid, NULL, 0); SystemTools::ModuleInfo mi; if (SystemTools::GetModuleInfoEx(war3, L"11game.dll", &mi)) { g_11game_range.first = (DWORD)mi.handle; g_11game_range.second = (DWORD)mi.handle + mi.image_size; } else { g_11game_range.first = 0; g_11game_range.second = 0; } if (SystemTools::GetModuleInfoEx(war3, L"war3shell.dll", &mi)) { g_war3shell_range.first = (DWORD)mi.handle; g_war3shell_range.second = (DWORD)mi.handle + mi.image_size; } else { g_war3shell_range.first = 0; g_war3shell_range.second = 0; } HANDLE ss = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); if (INVALID_HANDLE_VALUE != ss) { THREADENTRY32 te32; te32.dwSize = sizeof(THREADENTRY32); // Retrieve information about the first thread, // and exit if unsuccessful if(!Thread32First(ss, &te32 )) { //OutputDebugString("no thread!"); CloseHandle(ss); } // Now walk the thread list of the system, // and display information about each thread // associated with the specified process do { if(te32.th32OwnerProcessID == pid) CheckThread(war3, te32.th32ThreadID); } while(Thread32Next(ss, &te32)); CloseHandle(ss); } CloseHandle(war3); } */ static void PatchPlatforms() { DWORD pid = GetWar3PID(); if (!pid) return; HANDLE war3 = NTFindProcessHandle(pid, NULL, 0); //Èç¹ûÊÇ11£¬ÆôÓð²È«Ä£Ê½ SystemTools::ModuleInfo mi; if (SystemTools::GetModuleInfoEx(war3, L"war3shell.dll", &mi)) { ProfileSetBool(L"Misc", L"SafeMode", true); } else { ProfileSetBool(L"Misc", L"SafeMode", false); } } #pragma optimize( "", off ) NOINLINE bool ThreadPipe::GameConnection_Loop() { bool rv = true; VMProtectBeginVirtualization("GameConnection_Loop"); BYTE* buffer = new BYTE[BUFFER_SIZE]; HANDLE pipe = this->ctx_.pipe; Connection* conn = NULL; Auth::SessionType session; Auth::GetSessionData()->GetData(&session); jmp_buf env; int val = setjmp(env); if (val == 0) { BYTE null = 0; DWORD bytes; const Locale::LocaleInfo* locale = Locale::CurrentLocaleInfo(); bool exit = false; const Connection::ResponseData* response; while (!exit) { bytes = 0; if (FALSE == ReadFile(pipe, buffer, BUFFER_SIZE, &bytes, NULL) || bytes == 0) longjmp(env, GC_E_READ_FAILED); //Òì³£ Loggedin::OutputEncryptedMessage(STR::TRANSMITTING_DATA); BYTE type = *(BYTE*)buffer; BYTE* data = buffer + 1; size_t data_size = bytes - 1; switch(type) { case PIPE_MESSAGE_NULL: //¿ÕÇëÇ󣬱íʾÍ˳ö exit = true; break; case PIPE_MESSAGE_REQUEST_DATA: //ÇëÇóͨѶ¼ÓÃÜKEYºÍProfileµØÖ· if (data_size < sizeof(VERSION.revision) || memcmp(&VERSION.revision, data, sizeof(VERSION.revision) != 0)) { //°æ±¾²»·û Loggedin::OutputEncryptedMessage(STR::MODULE_VERSION_MISMATCH); if (TRUE != WriteFile(pipe, &null, 1, &bytes, NULL) || bytes != 1) { longjmp(env, GC_E_WRITE_FAILED); //Òì³£ } } else { memcpy_s(buffer, BUFFER_SIZE, session.KeyData, RSA_SIZE); const char* path; size_t path_size; path = Utils::GetSelfPathA(); path_size = strlen(path) + 1; memcpy_s(buffer + RSA_SIZE, BUFFER_SIZE - RSA_SIZE, path, path_size); if (TRUE != WriteFile(pipe, buffer, RSA_SIZE + path_size, &bytes, NULL) || bytes != RSA_SIZE + path_size) { longjmp(env, GC_E_WRITE_FAILED); //Òì³£ } } //PatchPlatforms(); break; case PIPE_MESSAGE_REQUEST_LANG: //ÇëÇóÓïÑÔÊý¾Ý if (TRUE != WriteFile(pipe, locale->data, locale->data_size, &bytes, NULL) || bytes != locale->data_size) { longjmp(env, GC_E_WRITE_FAILED); //Òì³£ } break; case PIPE_MESSAGE_NET: //ÇëÇóÍøÂçÁ¬½Ó if (bytes > 1) { conn = new Connection(); //ΪÊý¾Ý°üдÈëSession Id MessageHeader* header = reinterpret_cast<MessageHeader*>(data); memcpy_s(header->session_id, sizeof(header->session_id), session.id, sizeof(header->session_id)); if (NULL == (response = conn->Request(data, data_size))) { if (TRUE != WriteFile(pipe, &null, 1, &bytes, NULL) || bytes != 1) { longjmp(env, GC_E_WRITE_FAILED); //Òì³£ } } else { if (TRUE != WriteFile(pipe, response->data, response->size, &bytes, NULL) && bytes > 0) { longjmp(env, GC_E_WRITE_FAILED); //Òì³£ } } delete conn; conn = NULL; } break; default: if (TRUE != WriteFile(pipe, &null, 1, &bytes, NULL) || bytes != 1) { longjmp(env, GC_E_WRITE_FAILED); //Òì³£ } break; } Loggedin::OutputEncryptedMessage(STR::COMPLETED); } } else { rv = false; if (conn) { delete conn; conn = NULL; } } memset(&session, 0, sizeof(Auth::SessionType)); delete buffer; VMProtectEnd(); return rv; } #pragma optimize( "", on ) ThreadPipe::ThreadPipe() { this->term_ = false; memset(&this->ctx_, 0, sizeof(this->ctx_)); } ThreadPipe::~ThreadPipe() { } void ThreadPipe::StopSignal() { VMProtectBeginVirtualization("ThreadMessage::StopSignal"); this->term_ = true; Pipe_Term(&this->ctx_); VMProtectEnd(); } bool ThreadPipe::Write(const void* data, size_t data_size) { DWORD bytes = 0; return Pipe_Write(&this->ctx_, data, data_size, &bytes) && bytes == data_size; } void ThreadPipe::Work() { VMProtectBeginVirtualization("ThreadMessage::Work"); this->term_ = false; while (!this->term_) { if (!Pipe_Create(&this->ctx_)) Abort(EXCEPTION_PIPE_CREATE_FAILED); void *smem = (void*)this->arg(); memcpy_s(smem, SharedMemory::SMEM_SIZE, &this->ctx_, sizeof(PipeContext)); if (!Pipe_Listen(&this->ctx_) && !this->term_) { #ifdef _DEBUG OutputDebug("Pipe listen failed.\n"); #endif continue; } this->GameConnection_Loop(); if (!this->term_) Pipe_Term(&this->ctx_); } VMProtectEnd(); }
mit
GrognardsFromHell/TemplePlus
Tests/PartSysTests/stdafx.cpp
291
// stdafx.cpp : source file that includes just the standard includes // PartSysTests.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
mit
jamox/cert
cert_open_data_visualizer/lib/cert_open_data_visualizer/visualize.rb
1837
module CertOpenDataVisualizer require 'httparty' require 'tmpdir' require 'csv' require 'json' class Visualize attr_accessor :all_data, :cacher CSV_DATA_URL = "http://pilvilinna.cert.fi/opendata/autoreporter/csv.zip" def initialize @cacher = DummyCacher.new end def parse maybe_download files = maybe_extract_and_list_files maybe_read_and_merge_files(files) self end def maybe_download if @cacher.file_exists?("cert.zip") puts "File found in cache, not downloading" else download end end def download puts "Downloading, may take a while depending on your connection" data = HTTParty.get(CSV_DATA_URL).body puts "Done" write_tmp_file("cert.zip", data) end def write_tmp_file(filename, contents) @cacher.write_file_to_cache filename, contents end def maybe_extract_and_list_files if @cacher.file_exists? "cert.zip" and not @cacher.file_exists? "certfi_autoreporter_opendata_2006.csv" @cacher.unzip_file("cert.zip") end @cacher.find_files_matching("*.csv") end def maybe_read_and_merge_files(files) if @cacher.file_exists? "all_data.json" @all_data = JSON.parse(File.read(@cacher.get_from_cache("all_data.json"))) else @all_data = get_csvs(files) write_tmp_file("all_data.json", @all_data.to_json) end @all_data end private def get_csvs(files) puts "Parsing data, it may take a while" csvs = [] Dir.chdir (@cacher.path) do files.each do |file| csvs += CSV.read file, col_sep: "|" end csvs.reject! {|row| row[0].include?('#') || row[5].nil? || row[5] == ""} csvs end puts "Done" csvs end end end
mit
dwivivagoal/KuizMilioner
application/libraries/php-google-sdk/google/apiclient-services/src/Google/Service/Proximitybeacon/Observation.php
1378
<?php /* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ class Google_Service_Proximitybeacon_Observation extends Google_Model { protected $advertisedIdType = 'Google_Service_Proximitybeacon_AdvertisedId'; protected $advertisedIdDataType = ''; public $telemetry; public $timestampMs; public function setAdvertisedId(Google_Service_Proximitybeacon_AdvertisedId $advertisedId) { $this->advertisedId = $advertisedId; } public function getAdvertisedId() { return $this->advertisedId; } public function setTelemetry($telemetry) { $this->telemetry = $telemetry; } public function getTelemetry() { return $this->telemetry; } public function setTimestampMs($timestampMs) { $this->timestampMs = $timestampMs; } public function getTimestampMs() { return $this->timestampMs; } }
mit
dnl-jst/ownsocial
languages/en.php
7000
<?php return array( 'error' => 'An error occurred.', 'language_en' => 'English', 'language_de' => 'German', 'login_subheadline' => 'Please sign in', 'login_email' => 'E-mail address', 'login_password' => 'Password', 'login_btn_login' => 'Sign in', 'login_btn_create_account' => 'Create an account', 'login_failed' => 'Login failed.', 'login_email_not_confirmed' => 'You haven\'t confirmed your e-mail yet.', 'login_account_not_confirmed' => 'This is a private network. An administrator has to confirm your account before you can use it.', 'top_navigation_logged_in_as' => 'Signed in as', 'top_navigation_my_profile' => 'My Profile', 'top_navigation_logout' => 'Logout', 'top_navigation_login_email' => 'E-mail address', 'top_navigation_login_password' => 'Password', 'top_navigation_login_btn_login' => 'Sign in', 'navigation_add_group' => 'Create group', 'navigation_news' => 'News', 'navigation_my_groups' => 'My groups', 'create_post_post_placeholder' => 'What\'s on your mind?', 'create_post_btn_post' => 'Post', 'contact_requests_title' => 'Contact requests', 'registration_requests_title' => 'Registration requests', 'group_requests_title' => 'Group invitations', 'search_placeholder_search' => 'Search phrase', 'search_btn_search' => 'Search', 'btn_accept' => 'Accept', 'btn_decline' => 'Decline', 'btn_close' => 'Close', 'btn_cancel' => 'Cancel', 'group_add_popup_title' => 'Create group', 'group_add_input_name_placeholder' => 'Group name', 'group_add_input_description_placeholder' => 'Description (optional)', 'group_add_btn_add' => 'Add Group', 'group_type_hidden' => 'Hidden group', 'group_type_protected' => 'Protected group', 'group_type_public' => 'Public group', 'group_tab_posts' => 'Posts', 'group_tab_members' => 'Members', 'group_tab_requests' => 'Requests', 'group_action_add_member' => 'Add member', 'group_user_modal_title' => 'Add member', 'group_user_add_search' => 'Search for users...', 'group_user_add_selected' => 'Selected users', 'group_user_add_selected_no_selected' => 'No users selected. Search above.', 'group_user_add_btn_add_members' => 'Add member(s)', 'group_user_add_suggestions' => 'Suggestions', 'group_user_add_no_user_matched_search_criteria' => 'No users matched your search criteria.', 'group_post_placeholder_text' => 'Post to this group...', 'group_post_btn_post' => 'Post', 'group_members_no_members' => 'This group has no members yet...', 'group_requests_no_requests' => 'There are no pending requests for this group...', 'search_users_title' => 'Users found', 'search_users_msg_no_result' => 'No user matched your search criteria...', 'search_groups_title' => 'Groups found', 'search_groups_msg_no_result' => 'No group matched your search critera...', 'user_department' => 'Department', 'relation_send_request' => 'Send contact request...', 'relation_request_pending' => 'Request pending...', 'registration_title' => 'Registration', 'registration_placeholder_email' => 'E-mail address', 'registration_placeholder_first_name' => 'First name', 'registration_placeholder_last_name' => 'Last name', 'registration_placeholder_password' => 'Choose a password', 'registration_placeholder_password2' => 'Repeat your password', 'registration_btn_register' => 'Register', 'register_msg_err_email_invalid' => 'Please enter a valid e-mail address', 'register_msg_err_email_already_used' => 'The given e-mail address is already in use.', 'register_msg_err_first_name' => 'Please enter your first name.', 'register_msg_err_last_name' => 'Please enter your last name.', 'register_msg_err_password' => 'Please choose a password.', 'register_msg_err_password_mismatch' => 'Given passwords do not match.', 'register_msg_err_language' => 'Please choose a language.', 'registration_action_required_text' => 'Thanks for your registration. An email has been sent to your containing a confirmation link to confirm your account.', 'registration_confirm_already_confirmed' => 'Your account is already confirmed.', 'registration_confirm_success' => 'Thanks! Your account is confirmed now.', 'registration_confirm_private_network' => 'This is a private network. An administrator has to confirm your account before you can use it.', 'post_like' => 'Like', 'post_dislike' => 'Dislike', 'post_comments' => 'Comments', 'post_comments_write_comment' => 'Write a comment', 'post_comments_write_comment_send' => 'Comment', 'profile_language' => 'Chosen language', 'conversation_create' => 'Create conversation', 'conversation_create_post' => 'Post', 'conversations_no_conversations_yet' => 'You had no conversations yet...', 'conversations_load_more_posts' => 'Load more posts...', 'conversations_no_posts_yet' => 'No messages yet...', 'conversations_members' => 'Members', 'conversation_add_member_modal_title' => 'Add members', 'conversations_add_members' => 'Add members', 'conversation_no_title' => 'Unnamed conversation', 'helper_datesince_few_seconds_ago' => 'few seconds ago', 'helper_datesince_few_minutes_ago' => 'few minutes ago', 'helper_datesince_minutes_ago' => '%%minutes%% minutes ago', 'helper_datesince_hours_ago' => '%%hours%% hours ago', 'helper_datesince_days_ago' => '%%days%% days ago', 'mail_user_confirmation_subject' => 'Your registration at "%%site_title%%"', 'mail_user_confirmation_body' => "You registered at \"%%site_title%%\"\n\nTo confirm and use your account, click the following link:\n\n%%confirmation_link%%", 'mail_user_admin_accept_subject' => 'Your account at %%site_title%% was confirmed by an administrator.', 'mail_user_admin_accept_body' => "Your account at \"%%site_title%%\" was confirmed by an administrator.\n\nYou may now login under %%login_link%%", 'mail_new_user_subject' => 'A new user account at "%%site_title%%" was created.', 'mail_new_user_body' => "A new user account at \"%%site_title%%\" was created.\n\nFirst name: %%first_name%%\nLast name: %%last_name%%\nE-Mail: %%email%%\n\nLog in to your network to accept or decline this user.", 'mail_user_new_contact_request_subject' => 'New contact request from %%first_name%% %%last_name%% at %%site_title%%.', 'mail_user_new_contact_request_body' => "You have a new contact request from %%first_name%% %%last_name%% at \"%%site_title%%\".\n\nLog in to your account to accept or decline this request.", 'mail_user_contact_request_accepted_subject' => '%%first_name%% %%last_name%% accepted your contact request at %%site_title%%.', 'mail_user_contact_request_accepted_body' => "Your contact request to %%first_name%% %%last_name%% at \"%%site_title%%\" was accepted.\n\nLog in to your account to view his profile.", 'mail_user_new_group_request_subject' => '%%first_name%% %%last_name%% invited you to the group %%group_name%%.', 'mail_user_new_group_request_body' => "You have a new group invitation to %%group_name%% by %%first_name%% %%last_name%% at \"%%site_title%%\".\n\nLog in to your account to accept or decline this request.", );
mit
ManifestWebDesign/dabl-orm
src/shim/JsonSerializable.php
168
<?php if (!interface_exists('JsonSerializable')) { /** * Polyfill for JsonSerializable */ interface JsonSerializable { public function jsonSerialize(); } }
mit
mmarcon/jhere
test/lib/mocks.js
8686
/* * Copyright (C) 2013 Massimiliano Marcon * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*global jasmine:true, $:true*/ var resetMocks, spy, nokia = {}, SPIES = {}, _JSLALoader; (function(){ var _spy = function(name) { return jasmine.createSpy(name); }; var _resetMocks = function(){ var map; _JSLALoader = {}; //Mock the promise-based loaded _JSLALoader.load = function(){ return { is: { done: function(fn) { fn(); } } }; }; //JSLA nokia.Settings = { set: spy('nokia.Settings.set') }; nokia.maps = { util: { ApplicationContext: { set: function(){ console.log('ApplicationContext.set is deprecated'); spy('ApplicationContext.set')(); } } } }; nokia.maps.positioning = { component: { Positioning: spy('Positioning') } }; SPIES.component_infobubbles_openbubble = spy('[component] open info bubble'); SPIES.component_infobubbles_closeall = spy('[component] closeall info bubbles'); map = nokia.maps.map = { component: { Behavior: spy('[component] Behavior'), zoom: {}, InfoBubbles: function(){ this.openBubble = function(){ SPIES.component_infobubbles_openbubble.apply(this, arguments); }; this.closeAll = function(){ SPIES.component_infobubbles_closeall.apply(this, arguments); }; } } }; SPIES.container_objects_add = spy('[container] add to objects'); SPIES.container_objects_clear = spy('[container] clear to objects'); SPIES.container_objects_get = spy('[container] get object'); SPIES.container_objects_getbbox = spy('[container] get bbox'); map.Container = function(){ this.objects = { add: function(){ SPIES.container_objects_add.apply(this, arguments); }, clear: function(){ SPIES.container_objects_clear.apply(this, arguments); }, get: function(){ SPIES.container_objects_get.apply(this, arguments); return { getBoundingBox: function(){ SPIES.container_objects_getbbox.apply(this, arguments); return 'bbox'; } }; } }; }; SPIES.display_objects_add = spy('[map] add to objects'); SPIES.display_overlays_add = spy('[map] add to overlays'); SPIES.display_set = spy('[map] set property'); SPIES.display_addListeners = spy('[map] add add listeners'); SPIES.display_destroy = spy('[map] destroy'); SPIES.display_setCenter = spy('[map] setCenter'); SPIES.display_getComponentById = spy('[map] getComponentById'); SPIES.display_addComponent = spy('[map] addComponent'); SPIES.display_zoomTo = spy('[map] zoomTo'); SPIES.args = { map_normal: {t:1}, map_satellite: {t:2}, map_smart: {t:3}, map_terrain: {t:4}, map_smartpt: {t:5}, map_normalcommunity: {t:6}, map_satellitecommunity: {t:7}, map_traffic: {t:8} }; map.Display = function(){ this.objects = { add: function(){ SPIES.display_objects_add.apply(this, arguments); } }; this.set = function(){ SPIES.display_set.apply(this, arguments); }; this.addListeners = function(){ SPIES.display_addListeners.apply(this, arguments); }; this.destroy = function(){ SPIES.display_destroy.apply(this, arguments); }; this.center = {}; this.setCenter = function(center){ this.center = center; SPIES.display_setCenter.apply(this, arguments); }; this.addComponent = function(component){ SPIES.display_addComponent.apply(this, arguments); return component; }; this.zoomTo = function(zoom){ this.zoomLevel = zoom; SPIES.display_zoomTo.apply(this, arguments); }; this.overlays = { add: function(){ SPIES.display_overlays_add.apply(this, arguments); } }; this.NORMAL = SPIES.args.map_normal; this.SATELLITE = SPIES.args.map_satellite; this.SMARTMAP = SPIES.args.map_smart; this.TERRAIN = SPIES.args.map_terrain; this.SMART_PT = SPIES.args.map_smartpt; this.NORMAL_COMMUNITY = SPIES.args.map_normalcommunity; this.SATELLITE_COMMUNITY = SPIES.args.map_satellitecommunity; this.TRAFFIC = SPIES.args.map_traffic; }; map.Display.prototype.getComponentById = function(){ SPIES.display_getComponentById.apply(this, arguments); }; map.Marker = function(){}; map.StandardMarker = function(){}; nokia.maps.kml = {}; nokia.maps.kml.component = {}; SPIES.kmlmgr_addObserver = spy('[kml manager] addObserver'); SPIES.kmlmgr_parseKML = spy('[kml manager] parseKML'); nokia.maps.kml.Manager = function(){ this.observers = {}; this.addObserver = function(event, callback){ //Need to trigger the event somehow this.observers[event] = callback; SPIES.kmlmgr_addObserver.apply(this, arguments); }; this.parseKML = function(){ //Trigger callback immediately if(typeof this.observers.state === 'function') { this.observers.state(this); } SPIES.kmlmgr_parseKML.apply(this, arguments); }; this.state = 'finished'; //No need to have other states for mocking purposes this.kmlDocument = 'mockeddocument'; }; SPIES.kmlresultset_addObserver = spy('[kml resultset] addObserver'); SPIES.kmlresultset_create = spy('[kml resultset] create'); nokia.maps.kml.component.KMLResultSet = function(){ this.observers = {}; this.addObserver = function(event, callback){ //Need to trigger the event somehow this.observers[event] = callback; SPIES.kmlresultset_addObserver.apply(this, arguments); }; this.create = function() { if(typeof this.observers.state === 'function') { this.observers.state(this); } SPIES.kmlresultset_create.apply(this, arguments); }; this.state = 'finished'; //No need to have other states for mocking purposes this.container = new map.Container(); }; nokia.maps.heatmap = {}; SPIES.heatmap_addData = spy('[heatmap] addData'); nokia.maps.heatmap.Overlay = function(){ this.addData = function(){ SPIES.heatmap_addData.apply(this, arguments); }; }; $.jHERE._injectNS(nokia); $.jHERE._injectJSLALoader(_JSLALoader); }; resetMocks = _resetMocks; spy = _spy; })();
mit
ChimiDEV/Pomelo-dBot
src/commands/8ball.js
1738
const Command = require('../lib/Command'); const responses = [ 'It is certain.', 'It is decidedly so.', 'Without a doubt.', 'Yes - definitely.', 'You may rely on it.', 'As I see it, yes.', 'Most likely.', 'Outlook good.', 'Yes.', 'Signs point to yes.', 'Reply hazy, try again', 'Ask again later.', 'Better not tell you now.', 'Cannot predict now.', 'Concentrate and ask again.', 'Don\'t count on it.', 'My reply is no.', 'My sources say no.', 'Outlook not so good.', 'Very doubtful.', 'No.', 'Nah.', 'That\'s a negative.', 'Not gonna happen.', 'I don\'t think so.', 'No, sorry', 'Lol fuck no.', 'Hell yes.', 'Maybe.' ] const ballCommand = new Command({ name: 'Magic 8-Ball', triggers: [ '🎱', '8ball' ], description: 'Use the magic 8-Ball for fortune-telling or if you are seeking advice.', usage: '<question>', missingArgs: { embed: { color: 0x191919, author: { name: 'Magic 🎱' }, description: `**\`You forgot the question.\`**` } }, process(client, msg, args) { let question = args.join(' '); if (question.slice(-1) === '.' || question.slice(-1) === '!') question = question.slice(0, -1) + '?'; if (question.slice(-1) !== '?') question += '?'; return msg .channel .send({ embed: { color: 0x191919, author: { name: 'Magic 🎱' }, description: `_\"Ooooh magical 8-Ball... ${question}\"\n\n_ **\`${responses[Math.floor(responses.length * Math.random())]}\`**`, thumbnail: { url: 'http://www.reactiongifs.com/r/mgc.gif' } } }); } }); module.exports = ballCommand;
mit
EncontrAR/backoffice
src/components/firebase/index.js
3945
import React, { Component } from 'react'; import Button from '../uielements/button'; import Input from '../uielements/input'; import Modal from '../feedback/modal'; import { notification } from '../index'; import Firebase from '../../helpers/firebase/index'; export default class extends Component { constructor(props) { super(props); this.showModal = this.showModal.bind(this); this.handleCancel = this.handleCancel.bind(this); this.handleLogin = this.handleLogin.bind(this); this.resetPassword = this.resetPassword.bind(this); this.state = { visible: false, email: '[email protected]', password: 'demodemo', confirmLoading: false }; } showModal() { this.setState({ visible: true }); } handleCancel(e) { this.setState({ visible: false }); } handleLogin() { const { email, password } = this.state; if (!(email && password)) { notification('error', 'Please fill in email. and password'); return; } this.setState({ confirmLoading: true }); let isError = false; Firebase.login(Firebase.EMAIL, { email, password }) .catch(result => { const message = result && result.message ? result.message : 'Sorry Some error occurs'; notification('error', message); this.setState({ confirmLoading: false }); isError = true; }) .then(result => { if (isError) { return; } if (!result || result.message) { const message = result && result.message ? result.message : 'Sorry Some error occurs'; notification('error', message); this.setState({ confirmLoading: false }); } else { this.setState({ visible: false, confirmLoading: false }); this.props.login(); } }); } resetPassword() { const { email } = this.state; if (!email) { notification('error', `Please fill in email.`); return; } Firebase.resetPassword(email) .then(() => notification('success', `Password reset email sent to ${email}.`) ) .catch(error => notification('error', 'Email address not found.')); } render() { return ( <div> <Button type="primary" onClick={this.showModal} className="btnFirebase"> {this.props.signup ? 'Sign up with Firebase' : 'Sign in with Firebase'} </Button> <Modal title="Sign in with Firebase" visible={this.state.visible} confirmLoading={this.state.confirmLoading} onCancel={this.handleCancel} onOk={this.handleLogin} className="isoFirebaseLoginModal" cancelText="Cancel" okText="Login" > <form> <div className="isoInputWrapper"> <label>Email</label> <Input ref={email => (this.email = email)} size="large" placeholder="Email" value={this.state.email} onChange={event => { this.setState({ email: event.target.value }); }} /> </div> <div className="isoInputWrapper" style={{ marginBottom: 10 }}> <label>Password</label> <Input type="password" size="large" placeholder="Password" value={this.state.password} onChange={event => { this.setState({ password: event.target.value }); }} /> </div> <span className="isoResetPass" onClick={this.resetPassword}> Reset Password </span> </form> </Modal> </div> ); } }
mit
mkuzak/csWeb
csComp/classes/datasource.ts
3484
module csComp.Services { export class SensorSet { id: string; title: string; type: string; propertyTypeKey: string; propertyType: IPropertyType; timestamps: number[]; values: any[]; activeValue: any; max: number = 100; min: number = 0; public activeValueText(): string { return Helpers.convertPropertyInfo(this.propertyType, this.activeValue); } public addValue(date: number, value: number) { this.timestamps.push(date); this.values.push(value); this.activeValue = value; } /** * Serialize the project to a JSON string. */ public serialize(): string { //return SensorSet.serializeableData(this); return JSON.stringify(SensorSet.serializeableData(this), (key: string, value: any) => { // Skip serializing certain keys return value; }, 2); } /** * Returns an object which contains all the data that must be serialized. */ public static serializeableData(d: SensorSet): Object { return { id: d.id, title: d.title, type: d.type, propertyTypeKey: d.propertyTypeKey } } } export class DataSource { id: string; url: string; /** static, dynamic */ type: string; title: string; sensors: { (key: string): SensorSet }; static merge_sensor(s1: SensorSet, s2: SensorSet): SensorSet { var obj3: SensorSet = new SensorSet(); for (var attrname in s1) { obj3[attrname] = s1[attrname]; } for (var attrname in s2) { obj3[attrname] = s2[attrname]; } return obj3; } /** * Returns an object which contains all the data that must be serialized. */ public static serializeableData(d: DataSource): Object { var res = { id: d.id, url: d.url, type: d.type, title: d.title, sensors: {} //sensors: csComp.Helpers.serialize<DataSource>(d.sensors, SensorSet.serializeableData) } for (var ss in d.sensors) res.sensors[ss] = d.sensors[ss].serialize(); return res; } /** * Load JSON data. * @type {DataSource} * * @param ds {DataSource} * @param callback {Function} */ public static LoadData(ds: DataSource, callback: Function) { if (ds.url != null) { $.getJSON(ds.url, (temp: DataSource) => { if (temp != null) { ds.id = temp.id; if (!ds.hasOwnProperty('sensors')) { ds.sensors = temp.sensors; } else { for (var s in temp.sensors) { if (temp.sensors.hasOwnProperty(s)) { ds.sensors[s] = this.merge_sensor(ds.sensors[s], temp.sensors[s]); } } } ds.title = temp.title; callback(); } }); } } } }
mit
CindyPotvin/androidpreferences
src/com/cindypotvin/androidpreferences/SettingsActivity.java
522
package com.cindypotvin.androidpreferences; import android.app.Activity; import android.os.Bundle; /** * Settings activity that contains a fragment displaying the preferences. */ public class SettingsActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Display the preferences fragment as the content of the activity getFragmentManager().beginTransaction() .replace(android.R.id.content, new SettingsFragment()).commit(); } }
mit
kazinduzi/kazinduzi
framework/library/phpmailer/language/phpmailer.lang-tr.php
1487
<?php /** * PHPMailer language file: refer to English translation for definitive list * Turkish version * Türkçe Versiyonu * ÝZYAZILIM - Elçin Özel - Can Yýlmaz - Mehmet Benlioðlu. */ $PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Doğrulanamıyor.'; $PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP hosta bağlanılamıyor.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.'; $PHPMAILER_LANG['empty_message'] = 'Mesaj içeriği boş'; $PHPMAILER_LANG['encoding'] = 'Bilinmeyen şifreleme: '; $PHPMAILER_LANG['execute'] = 'Çalıtırılamıyor: '; $PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemiyor: '; $PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamıyor: '; $PHPMAILER_LANG['from_failed'] = 'Başarısız olan gönderici adresi: '; $PHPMAILER_LANG['instantiate'] = 'Örnek mail fonksiyonu oluşturulamadı.'; $PHPMAILER_LANG['invalid_address'] = 'Gönderilmedi, email adresi geçersiz: '; $PHPMAILER_LANG['provide_address'] = 'En az bir tane mail adresi belirtmek zorundasınız alıcının email adresi.'; $PHPMAILER_LANG['mailer_not_supported'] = ' mailler desteklenmemektedir.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: alıcılara ulaımadı: '; $PHPMAILER_LANG['signing'] = 'İmzalama hatası: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP bağlantı() başarısız.'; $PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: '; $PHPMAILER_LANG['variable_set'] = 'Ayarlanamıyor yada sıfırlanamıyor: ';
mit
webmonarch/multi_movingsign
lib/multi_movingsign/sign.rb
646
require 'movingsign_api' require 'multi_movingsign/sign' module MultiMovingsign # Represents an individual Movingsign LED sign being driven class Sign attr_accessor :path def initialize(path) self.path = path end def self.load(hash) path = hash['path'] || (raise InvalidInputError, "path key not specified") self.new path end def show_text(text, options = {}) sign.show_text text, options end def set_sound(on) sign.set_sound on end def to_hash {'path' => self.path} end private def sign MovingsignApi::Sign.new self.path end end end
mit
horkman/vtrack
gulp/tasks/clean.js
218
const gulp = require('gulp'); const rimraf = require('gulp-rimraf'); module.exports = gulp.task('clean', function () { return gulp .src(['.dist', '.transpiled'], {read: false}) .pipe(rimraf()); });
mit
Kostarsus/MP3Manager
src/MP3Manager/userinterface/MainWindow.collection.xaml.cs
3319
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using MP3ManagerBase.manager; using MP3ManagerBase.model; using System.Windows.Forms; namespace MP3ManagerBase { public partial class MainWindow { private const long GigaByte = 1073741824; private const long MinSize = 4 * 1048576; private const int CollectionMaxTries = 10; private void collectionDestinationDirSelection_Click(object sender, RoutedEventArgs e) { FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.SelectedPath = "C:\\"; DialogResult result = folderDialog.ShowDialog(); collectionDestinationDir.Text = folderDialog.SelectedPath; } private void CreateCollection_Click(object sender, RoutedEventArgs e) { if (collectionSize.SelectedItem == null) { System.Windows.MessageBox.Show("Bitte geben Sie eine Größe der Collection an!"); return; } if (string.IsNullOrWhiteSpace(collectionDestinationDir.Text)) { System.Windows.MessageBox.Show("Bitte geben Sie ein Zielverzeichnis an!"); return; } this.Cursor = System.Windows.Input.Cursors.Wait; ComboBoxItem selectedItem = collectionSize.SelectedItem as ComboBoxItem; long sizeInGigabyte = Int64.Parse(selectedItem.Tag.ToString()) * GigaByte; long? sizeLeft = sizeInGigabyte; MP3DataMgr mp3Mgr=MP3DataMgr.Instance; int maxTitleId = mp3Mgr.MaxTitleId(); int minTitleId = mp3Mgr.MinTitleId(); long currentTry = 0; List<int> selectedTitles = new List<int>(); Random rnd = new Random(); while (sizeLeft > MinSize && currentTry < CollectionMaxTries) { int newTitleId=rnd.Next(minTitleId, maxTitleId); if (selectedTitles.Contains(newTitleId)) { //Titel schon vorhanden currentTry++; Console.WriteLine("currentTry++" + currentTry); continue; } Title newTitleRow = mp3Mgr.GetTitle(newTitleId); if (newTitleRow == null) { // Hier wird der Try nicht erhöht, weil eine Leerstelle (wahrscheinlich gelöschte Id) getroffen wurde continue; } if (sizeLeft - newTitleRow.Bytes <= 0) { currentTry++; Console.WriteLine("currentTry++" + currentTry); continue; } //Kopiere nun den Titel ins Zielverzeichnis currentTry = 1; selectedTitles.Add(newTitleId); sizeLeft -= newTitleRow.Bytes; FileMgr.Instance.CopyFile(newTitleRow.Path, newTitleRow.Filename, collectionDestinationDir.Text); Console.WriteLine("currentTry" + currentTry + "; sizeLeft= " + sizeLeft); } this.Cursor = System.Windows.Input.Cursors.Arrow; } } }
mit
vicentehidalgo/parse_test
baseApp/app/scripts/controllers/loginController.js
760
'use strict'; angular.module('baseApp') .controller('loginController', ['$http','$rootScope', function($http, $rootScope) { var vm = this; vm.user = { // inputUserName: '', // inputPassword: '' }; // vm.user.inputUserName = 'vicente'; // vm.user.inputPassword = '1234'; vm.login = login; function login(){ console.log('asdasdasd'); console.log(vm.user.inputUserName); Parse.User.logIn(vm.user.inputUserName, vm.user.inputPassword, { success: userLoggedIn, error: gotError }); } function userLoggedIn(user){ window.location = "#/home"; } function gotError(user, err) { console.log("KO ", err); // alert("Error"); } }]);
mit
EssaAlshammri/django-by-example
e-learning/educa/courses/urls.py
1505
from django.conf.urls import url from . import views urlpatterns = [ url(r'^mine/$', views.ManageCourseListView.as_view(), name='manage_course_list'), url(r'^create/$', views.CourseCreateView.as_view(), name='course_create'), url(r'^(?P<pk>\d+)/edit/$', views.CourseUpdateView.as_view(), name='course_edit'), url(r'^(?P<pk>\d+)/delete/$', views.CourseDeleteView.as_view(), name='course_delete'), url(r'^(?P<pk>\d+)/module/$', views.CourseModuleUpdateView.as_view(), name='course_module_update'), url(r'^module/(?P<module_id>\d+)/content/(?P<model_name>\w+)/create/$', views.ContentCreateUpdateView.as_view(), name='module_content_create'), url(r'^module/(?P<module_id>\d+)/content/(?P<model_name>\w+)/(?P<id>\d+)/$', views.ContentCreateUpdateView.as_view(), name='module_content_update'), url(r'^content/(?P<id>\d+)/delete/$', views.ContentDeleteView.as_view(), name='module_content_delete'), url(r'^module/(?P<module_id>\d+)/$', views.ModuleContentListView.as_view(), name='module_content_list'), url(r'^module/order/$', views.ModuleOrderView.as_view(), name='module_order'), url(r'^content/order/$', views.ContentOrderView.as_view(), name='content_order'), url(r'^subject/(?P<subject>[\w-]+)/$', views.CourseListView.as_view(), name='course_list_subject'), url(r'^(?P<slug>[\w-]+)/$', views.CourseDetailView.as_view(), name='course_detail'), ]
mit
pigmalien/pigmalien.github.io
games/grapplenight/c2runtime.js
277788
// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com 'use strict';var aa,ca,da,ea,ga,ha,ia,ja,ka,la,na,oa,pa,qa,ra,ta,ua,va,wa,xa,ya,za,Aa,B,Da,Ea,Fa,Ga,Ha,F,Ia,Ja,Ka,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Va,Wa,Xa,Ya,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Yb,Zb,$b,ac,bc,cc,dc,ec,fc,gc,hc,ic,jc,kc,lc={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(f){return f.__proto__}:function(f){return f.constructor.prototype}); (function(){function f(a,d,h,c){this.set(a,d,h,c)}function k(){this.hb=this.gb=this.jb=this.ib=this.pb=this.ob=this.Pa=this.Oa=0}function b(a,d,h,c){a<d?h<c?(L=a<h?a:h,C=d>c?d:c):(L=a<c?a:c,C=d>h?d:h):h<c?(L=d<h?d:h,C=a>c?a:c):(L=d<c?d:c,C=a>h?a:h)}function n(){this.items=this.Cc=null;this.ej=0;S&&(this.Cc=new Set);this.fi=[];this.jf=!0}function g(a){E[G++]=a}function r(){this.X=this.Zh=this.y=this.vi=0}function p(a){this.Jb=[];this.sk=this.uk=this.vk=this.tk=0;this.Pj(a)}function a(a,d){this.Jn= a;this.In=d;this.cells={}}function c(a,d){this.Jn=a;this.In=d;this.cells={}}function e(a,d,h){var c;return A.length?(c=A.pop(),c.qo=a,c.x=d,c.y=h,c):new ca(a,d,h)}function d(a,d,h){this.qo=a;this.x=d;this.y=h;this.Nb=new da}function l(a,d,h){var c;return y.length?(c=y.pop(),c.qo=a,c.x=d,c.y=h,c):new ea(a,d,h)}function t(a,d,h){this.qo=a;this.x=d;this.y=h;this.Nb=[];this.sh=!0;this.ie=new da;this.ri=!1}function q(a,d){return a.Rd-d.Rd}ga=function(a){window.console&&window.console.log&&window.console.log(a)}; ha=function(a){window.console&&window.console.error&&window.console.error(a)};aa=function(a){return a};ia=function(a){return"undefined"===typeof a};ja=function(a){return"number"===typeof a};ka=function(a){return"string"===typeof a};la=function(a){return 0<a&&0===(a-1&a)};na=function(a){--a;for(var d=1;32>d;d<<=1)a=a|a>>d;return a+1};oa=function(a){return 0>a?-a:a};pa=function(a,d){return a>d?a:d};qa=function(a,d){return a<d?a:d};ra=Math.PI;ta=function(a){return 0<=a?a|0:(a|0)-1};ua=function(a){var d= a|0;return d===a?d:d+1};va=function(a,d,h,c,l,e,m,b){var q,x,J,g;a<h?(x=a,q=h):(x=h,q=a);l<m?(g=l,J=m):(g=m,J=l);if(q<g||x>J)return!1;d<c?(x=d,q=c):(x=c,q=d);e<b?(g=e,J=b):(g=b,J=e);if(q<g||x>J)return!1;q=l-a+m-h;x=e-d+b-c;a=h-a;d=c-d;l=m-l;e=b-e;b=oa(d*l-e*a);return oa(l*x-e*q)>b?!1:oa(a*x-d*q)<=b};f.prototype.set=function(a,d,h,c){this.left=a;this.top=d;this.right=h;this.bottom=c};f.prototype.yi=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};f.prototype.width= function(){return this.right-this.left};f.prototype.height=function(){return this.bottom-this.top};f.prototype.offset=function(a,d){this.left+=a;this.top+=d;this.right+=a;this.bottom+=d;return this};f.prototype.normalize=function(){var a=0;this.left>this.right&&(a=this.left,this.left=this.right,this.right=a);this.top>this.bottom&&(a=this.top,this.top=this.bottom,this.bottom=a)};f.prototype.yz=function(a){return!(a.right<this.left||a.bottom<this.top||a.left>this.right||a.top>this.bottom)};f.prototype.zz= function(a,d,h){return!(a.right+d<this.left||a.bottom+h<this.top||a.left+d>this.right||a.top+h>this.bottom)};f.prototype.lc=function(a,d){return a>=this.left&&a<=this.right&&d>=this.top&&d<=this.bottom};f.prototype.Ei=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};wa=f;k.prototype.Oj=function(a){this.Oa=a.left;this.Pa=a.top;this.ob=a.right;this.pb=a.top;this.ib=a.right;this.jb=a.bottom;this.gb=a.left;this.hb=a.bottom};k.prototype.Xt=function(a, d){if(0===d)this.Oj(a);else{var h=Math.sin(d),c=Math.cos(d),l=a.left*h,e=a.top*h,m=a.right*h,h=a.bottom*h,b=a.left*c,q=a.top*c,x=a.right*c,c=a.bottom*c;this.Oa=b-e;this.Pa=q+l;this.ob=x-e;this.pb=q+m;this.ib=x-h;this.jb=c+m;this.gb=b-h;this.hb=c+l}};k.prototype.offset=function(a,d){this.Oa+=a;this.Pa+=d;this.ob+=a;this.pb+=d;this.ib+=a;this.jb+=d;this.gb+=a;this.hb+=d;return this};var L=0,C=0;k.prototype.Sq=function(a){b(this.Oa,this.ob,this.ib,this.gb);a.left=L;a.right=C;b(this.Pa,this.pb,this.jb, this.hb);a.top=L;a.bottom=C};k.prototype.lc=function(a,d){var h=this.Oa,c=this.Pa,l=this.ob-h,e=this.pb-c,m=this.ib-h,b=this.jb-c,q=a-h,x=d-c,J=l*l+e*e,g=l*m+e*b,e=l*q+e*x,t=m*m+b*b,p=m*q+b*x,f=1/(J*t-g*g),l=(t*e-g*p)*f,J=(J*p-g*e)*f;if(0<=l&&0<J&&1>l+J)return!0;l=this.gb-h;e=this.hb-c;J=l*l+e*e;g=l*m+e*b;e=l*q+e*x;f=1/(J*t-g*g);l=(t*e-g*p)*f;J=(J*p-g*e)*f;return 0<=l&&0<J&&1>l+J};k.prototype.gf=function(a,d){if(d)switch(a){case 0:return this.Oa;case 1:return this.ob;case 2:return this.ib;case 3:return this.gb; case 4:return this.Oa;default:return this.Oa}else switch(a){case 0:return this.Pa;case 1:return this.pb;case 2:return this.jb;case 3:return this.hb;case 4:return this.Pa;default:return this.Pa}};k.prototype.Ss=function(){return(this.Oa+this.ob+this.ib+this.gb)/4};k.prototype.Ts=function(){return(this.Pa+this.pb+this.jb+this.hb)/4};k.prototype.Vr=function(a){var d=a.Ss(),h=a.Ts();if(this.lc(d,h))return!0;d=this.Ss();h=this.Ts();if(a.lc(d,h))return!0;var c,l,e,m,b,q,x,g;for(x=0;4>x;x++)for(g=0;4>g;g++)if(d= this.gf(x,!0),h=this.gf(x,!1),c=this.gf(x+1,!0),l=this.gf(x+1,!1),e=a.gf(g,!0),m=a.gf(g,!1),b=a.gf(g+1,!0),q=a.gf(g+1,!1),va(d,h,c,l,e,m,b,q))return!0;return!1};xa=k;ya=function(a,d){for(var h in d)d.hasOwnProperty(h)&&(a[h]=d[h]);return a};za=function(a,d){var h,c;d=ta(d);if(!(0>d||d>=a.length)){h=d;for(c=a.length-1;h<c;h++)a[h]=a[h+1];Aa(a,c)}};Aa=function(a,d){a.length=d};B=function(a){Aa(a,0)};Da=function(a,d){B(a);var h,c;h=0;for(c=d.length;h<c;++h)a[h]=d[h]};Ea=function(a,d){a.push.apply(a, d)};Fa=function(a,d){var h,c;h=0;for(c=a.length;h<c;++h)if(a[h]===d)return h;return-1};Ga=function(a,d){var h=Fa(a,d);-1!==h&&za(a,h)};Ha=function(a,d,h){return a<d?d:a>h?h:a};F=function(a){return a/(180/ra)};Ia=function(a){return 180/ra*a};Ja=function(a){a%=360;0>a&&(a+=360);return a};Ka=function(a){a%=2*ra;0>a&&(a+=2*ra);return a};Ma=function(a){return Ja(Ia(a))};Na=function(a){return Ka(F(a))};Oa=function(a,d,h,c){return Math.atan2(c-d,h-a)};Pa=function(a,d){if(a===d)return 0;var h=Math.sin(a), c=Math.cos(a),l=Math.sin(d),e=Math.cos(d),h=h*l+c*e;return 1<=h?0:-1>=h?ra:Math.acos(h)};Qa=function(a,d,h){var c=Math.sin(a),l=Math.cos(a),e=Math.sin(d),m=Math.cos(d);return Math.acos(c*e+l*m)>h?0<l*e-c*m?Ka(a+h):Ka(a-h):Ka(d)};Ra=function(a,d){var h=Math.sin(a),c=Math.cos(a),l=Math.sin(d),e=Math.cos(d);return 0>=c*l-h*e};Sa=function(a,d,h,c,l,e){if(0===h)return e?a:d;var m=Math.sin(h);h=Math.cos(h);a-=c;d-=l;var b=a*m;a=a*h-d*m;d=d*h+b;return e?a+c:d+l};Ta=function(a,d,h,c){a=h-a;d=c-d;return Math.sqrt(a* a+d*d)};Va=function(a,d){return!a!==!d};Wa=function(a,d,h){return a+(d-a)*h};Xa=function(a){for(var d in a)if(a.hasOwnProperty(d))return!0;return!1};Ya=function(a){for(var d in a)a.hasOwnProperty(d)&&delete a[d]};var w=+new Date;ab=function(){if("undefined"!==typeof window.performance){var a=window.performance;if("undefined"!==typeof a.now)return a.now();if("undefined"!==typeof a.webkitNow)return a.webkitNow();if("undefined"!==typeof a.mozNow)return a.mozNow();if("undefined"!==typeof a.msNow)return a.msNow()}return Date.now()- w};var h=!1,m=h=!1,Q=!1;"undefined"!==typeof window&&(h=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),h=!h&&/safari/i.test(navigator.userAgent),m=/(iphone|ipod|ipad)/i.test(navigator.userAgent),Q=window.c2ejecta);var S=!h&&!Q&&!m&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;n.prototype.contains=function(a){return this.Ge()?!1:S?this.Cc.has(a):this.items&&this.items.hasOwnProperty(a)};n.prototype.add=function(a){if(S)this.Cc.has(a)||(this.Cc.add(a), this.jf=!1);else{var d=a.toString(),h=this.items;h?h.hasOwnProperty(d)||(h[d]=a,this.ej++,this.jf=!1):(this.items={},this.items[d]=a,this.ej=1,this.jf=!1)}};n.prototype.remove=function(a){if(!this.Ge())if(S)this.Cc.has(a)&&(this.Cc["delete"](a),this.jf=!1);else if(this.items){a=a.toString();var d=this.items;d.hasOwnProperty(a)&&(delete d[a],this.ej--,this.jf=!1)}};n.prototype.clear=function(){this.Ge()||(S?this.Cc.clear():(this.items=null,this.ej=0),B(this.fi),this.jf=!0)};n.prototype.Ge=function(){return 0=== this.count()};n.prototype.count=function(){return S?this.Cc.size:this.ej};var E=null,G=0;n.prototype.eB=function(){if(!this.jf){if(S)B(this.fi),E=this.fi,G=0,this.Cc.forEach(g),E=null,G=0;else{var a=this.fi;B(a);var d,h=0,c=this.items;if(c)for(d in c)c.hasOwnProperty(d)&&(a[h++]=c[d])}this.jf=!0}};n.prototype.Sf=function(){this.eB();return this.fi};da=n;new da;bb=function(a,d){S?cb(a,d.Cc):db(a,d.Sf())};cb=function(a,d){var h,c,l,e;c=h=0;for(l=a.length;h<l;++h)e=a[h],d.has(e)||(a[c++]=e);Aa(a,c)}; db=function(a,d){var h,c,l,e;c=h=0;for(l=a.length;h<l;++h)e=a[h],-1===Fa(d,e)&&(a[c++]=e);Aa(a,c)};r.prototype.add=function(a){this.y=a-this.vi;this.Zh=this.X+this.y;this.vi=this.Zh-this.X-this.y;this.X=this.Zh};r.prototype.reset=function(){this.X=this.Zh=this.y=this.vi=0};eb=r;fb=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};p.prototype.Pj=function(a){this.Dt=a;this.Kd=a.length/2;this.Jb.length=a.length;this.xk=this.yk=-1;this.Wq=0};p.prototype.ph=function(){return!this.Dt.length}; p.prototype.ja=function(){for(var a=this.Jb,d=a[0],h=d,c=a[1],l=c,e,m,b=1,q=this.Kd;b<q;++b)m=2*b,e=a[m],m=a[m+1],e<d&&(d=e),e>h&&(h=e),m<c&&(c=m),m>l&&(l=m);this.tk=d;this.uk=h;this.vk=c;this.sk=l};p.prototype.Oj=function(a,d,h){this.Jb.length=8;this.Kd=4;var c=this.Jb;c[0]=a.left-d;c[1]=a.top-h;c[2]=a.right-d;c[3]=a.top-h;c[4]=a.right-d;c[5]=a.bottom-h;c[6]=a.left-d;c[7]=a.bottom-h;this.yk=a.right-a.left;this.xk=a.bottom-a.top;this.ja()};p.prototype.Wh=function(a,d,h,c,l){this.Jb.length=8;this.Kd= 4;var e=this.Jb;e[0]=a.Oa-d;e[1]=a.Pa-h;e[2]=a.ob-d;e[3]=a.pb-h;e[4]=a.ib-d;e[5]=a.jb-h;e[6]=a.gb-d;e[7]=a.hb-h;this.yk=c;this.xk=l;this.ja()};p.prototype.Wt=function(a){this.Kd=a.Kd;Da(this.Jb,a.Jb);this.tk=a.tk;this.vk-a.vk;this.uk=a.uk;this.sk=a.sk};p.prototype.Vg=function(a,d,h){if(this.yk!==a||this.xk!==d||this.Wq!==h){this.yk=a;this.xk=d;this.Wq=h;var c,l,e,m,b,q=0,x=1,g=this.Dt,t=this.Jb;0!==h&&(q=Math.sin(h),x=Math.cos(h));h=0;for(e=this.Kd;h<e;h++)c=2*h,l=c+1,m=g[c]*a,b=g[l]*d,t[c]=m*x-b* q,t[l]=b*x+m*q;this.ja()}};p.prototype.lc=function(a,d){var h=this.Jb;if(a===h[0]&&d===h[1])return!0;var c,l,e,m=this.Kd,b=this.tk-110,q=this.vk-101,x=this.uk+131,g=this.sk+120,t,p,f=0,k=0;for(c=0;c<m;c++)l=2*c,e=(c+1)%m*2,t=h[l],l=h[l+1],p=h[e],e=h[e+1],va(b,q,a,d,t,l,p,e)&&f++,va(x,g,a,d,t,l,p,e)&&k++;return 1===f%2||1===k%2};p.prototype.Vi=function(a,d,h){var c=a.Jb,l=this.Jb;if(this.lc(c[0]+d,c[1]+h)||a.lc(l[0]-d,l[1]-h))return!0;var e,m,b,q,x,g,t,p,f,k,w,C;e=0;for(q=this.Kd;e<q;e++)for(m=2*e, b=(e+1)%q*2,p=l[m],m=l[m+1],f=l[b],k=l[b+1],b=0,t=a.Kd;b<t;b++)if(x=2*b,g=(b+1)%t*2,w=c[x]+d,x=c[x+1]+h,C=c[g]+d,g=c[g+1]+h,va(p,m,f,k,w,x,C,g))return!0;return!1};gb=p;a.prototype.tf=function(a,d,h){var c;c=this.cells[a];return c?(c=c[d])?c:h?(c=e(this,a,d),this.cells[a][d]=c):null:h?(c=e(this,a,d),this.cells[a]={},this.cells[a][d]=c):null};a.prototype.tc=function(a){return ta(a/this.Jn)};a.prototype.uc=function(a){return ta(a/this.In)};a.prototype.update=function(a,d,h){var c,l,e,m,b;if(d)for(c= d.left,l=d.right;c<=l;++c)for(e=d.top,m=d.bottom;e<=m;++e)if(!h||!h.lc(c,e))if(b=this.tf(c,e,!1))b.remove(a),b.Ge()&&(b.Nb.clear(),1E3>A.length&&A.push(b),this.cells[c][e]=null);if(h)for(c=h.left,l=h.right;c<=l;++c)for(e=h.top,m=h.bottom;e<=m;++e)d&&d.lc(c,e)||this.tf(c,e,!0).xo(a)};a.prototype.qm=function(a,d){var h,c,l,e,m,b;h=this.tc(a.left);l=this.uc(a.top);c=this.tc(a.right);for(m=this.uc(a.bottom);h<=c;++h)for(e=l;e<=m;++e)(b=this.tf(h,e,!1))&&b.dump(d)};hb=a;c.prototype.tf=function(a,d,h){var c; c=this.cells[a];return c?(c=c[d])?c:h?(c=l(this,a,d),this.cells[a][d]=c):null:h?(c=l(this,a,d),this.cells[a]={},this.cells[a][d]=c):null};c.prototype.tc=function(a){return ta(a/this.Jn)};c.prototype.uc=function(a){return ta(a/this.In)};c.prototype.update=function(a,d,h){var c,l,e,m,b;if(d)for(c=d.left,l=d.right;c<=l;++c)for(e=d.top,m=d.bottom;e<=m;++e)if(!h||!h.lc(c,e))if(b=this.tf(c,e,!1))b.remove(a),b.Ge()&&(b.reset(),1E3>y.length&&y.push(b),this.cells[c][e]=null);if(h)for(c=h.left,l=h.right;c<= l;++c)for(e=h.top,m=h.bottom;e<=m;++e)d&&d.lc(c,e)||this.tf(c,e,!0).xo(a)};c.prototype.qm=function(a,d,h,c,l){var e,m;a=this.tc(a);d=this.uc(d);h=this.tc(h);for(e=this.uc(c);a<=h;++a)for(c=d;c<=e;++c)(m=this.tf(a,c,!1))&&m.dump(l)};c.prototype.Rz=function(a){var d,h,c,l,e;d=a.left;c=a.top;h=a.right;for(l=a.bottom;d<=h;++d)for(a=c;a<=l;++a)if(e=this.tf(d,a,!1))e.sh=!1};ib=c;var A=[];d.prototype.Ge=function(){return this.Nb.Ge()};d.prototype.xo=function(a){this.Nb.add(a)};d.prototype.remove=function(a){this.Nb.remove(a)}; d.prototype.dump=function(a){Ea(a,this.Nb.Sf())};ca=d;var y=[];t.prototype.Ge=function(){if(!this.Nb.length)return!0;if(this.Nb.length>this.ie.count())return!1;this.$n();return!0};t.prototype.xo=function(a){this.ie.contains(a)?(this.ie.remove(a),this.ie.Ge()&&(this.ri=!1)):this.Nb.length?(this.Nb[this.Nb.length-1].$d()>a.$d()&&(this.sh=!1),this.Nb.push(a)):(this.Nb.push(a),this.sh=!0)};t.prototype.remove=function(a){this.ie.add(a);this.ri=!0;30<=this.ie.count()&&this.$n()};t.prototype.$n=function(){this.ri&& (this.ie.count()===this.Nb.length?this.reset():(bb(this.Nb,this.ie),this.ie.clear(),this.ri=!1))};t.prototype.Zx=function(){this.sh||(this.Nb.sort(q),this.sh=!0)};t.prototype.reset=function(){B(this.Nb);this.sh=!0;this.ie.clear();this.ri=!1};t.prototype.dump=function(a){this.$n();this.Zx();this.Nb.length&&a.push(this.Nb)};ea=t;var z="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");jb=function(a){return 0>=a||11<=a?"source-over": z[a-1]};kb=function(a,d,h){if(h)switch(a.jc=h.ONE,a.cc=h.ONE_MINUS_SRC_ALPHA,d){case 1:a.jc=h.ONE;a.cc=h.ONE;break;case 3:a.jc=h.ONE;a.cc=h.ZERO;break;case 4:a.jc=h.ONE_MINUS_DST_ALPHA;a.cc=h.ONE;break;case 5:a.jc=h.DST_ALPHA;a.cc=h.ZERO;break;case 6:a.jc=h.ZERO;a.cc=h.SRC_ALPHA;break;case 7:a.jc=h.ONE_MINUS_DST_ALPHA;a.cc=h.ZERO;break;case 8:a.jc=h.ZERO;a.cc=h.ONE_MINUS_SRC_ALPHA;break;case 9:a.jc=h.DST_ALPHA;a.cc=h.ONE_MINUS_SRC_ALPHA;break;case 10:a.jc=h.ONE_MINUS_DST_ALPHA,a.cc=h.SRC_ALPHA}}; nb=function(a){return Math.round(1E6*a)/1E6};ob=function(a,d){return"string"!==typeof a||"string"!==typeof d||a.length!==d.length?!1:a===d?!0:a.toLowerCase()===d.toLowerCase()};pb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body||ob(a.tagName,"canvas")?!0:!1}})();var mc="undefined"!==typeof Float32Array?Float32Array:Array;function nc(f){var k=new mc(3);f&&(k[0]=f[0],k[1]=f[1],k[2]=f[2]);return k} function oc(f){var k=new mc(16);f&&(k[0]=f[0],k[1]=f[1],k[2]=f[2],k[3]=f[3],k[4]=f[4],k[5]=f[5],k[6]=f[6],k[7]=f[7],k[8]=f[8],k[9]=f[9],k[10]=f[10],k[11]=f[11],k[12]=f[12],k[13]=f[13],k[14]=f[14],k[15]=f[15]);return k}function pc(f,k){k[0]=f[0];k[1]=f[1];k[2]=f[2];k[3]=f[3];k[4]=f[4];k[5]=f[5];k[6]=f[6];k[7]=f[7];k[8]=f[8];k[9]=f[9];k[10]=f[10];k[11]=f[11];k[12]=f[12];k[13]=f[13];k[14]=f[14];k[15]=f[15]} function qc(f,k){var b=k[0],n=k[1];k=k[2];f[0]*=b;f[1]*=b;f[2]*=b;f[3]*=b;f[4]*=n;f[5]*=n;f[6]*=n;f[7]*=n;f[8]*=k;f[9]*=k;f[10]*=k;f[11]*=k} function rc(f,k,b,n){n||(n=oc());var g,r,p,a,c,e,d,l,t=f[0],q=f[1];f=f[2];r=b[0];p=b[1];g=b[2];b=k[1];e=k[2];t===k[0]&&q===b&&f===e?(f=n,f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1):(b=t-k[0],e=q-k[1],d=f-k[2],l=1/Math.sqrt(b*b+e*e+d*d),b*=l,e*=l,d*=l,k=p*d-g*e,g=g*b-r*d,r=r*e-p*b,(l=Math.sqrt(k*k+g*g+r*r))?(l=1/l,k*=l,g*=l,r*=l):r=g=k=0,p=e*r-d*g,a=d*k-b*r,c=b*g-e*k,(l=Math.sqrt(p*p+a*a+c*c))?(l=1/l,p*=l,a*=l,c*=l):c=a=p=0, n[0]=k,n[1]=p,n[2]=b,n[3]=0,n[4]=g,n[5]=a,n[6]=e,n[7]=0,n[8]=r,n[9]=c,n[10]=d,n[11]=0,n[12]=-(k*t+g*q+r*f),n[13]=-(p*t+a*q+c*f),n[14]=-(b*t+e*q+d*f),n[15]=1)} (function(){function f(a,c,e){this.He=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Ma=!!e;this.sl=this.Xi=!1;this.On=0;this.dn=1;this.gq=1E3;this.qB=(this.gq-this.dn)/32768;this.Gn=nc([0,0,100]);this.As=nc([0,0,0]);this.pu=nc([0,1,0]);this.fk=nc([1,1,1]);this.pr=!0;this.Ol=oc();this.ad=oc();this.Ko=oc();this.Nn=oc();this.F=a;this.version=0===this.F.getParameter(this.F.VERSION).indexOf("WebGL 2")?2:1;this.Rr()}function k(a,c,e){this.F=a;this.Qj= c;this.name=e;this.nd=a.getAttribLocation(c,"aPos");this.Hf=a.getAttribLocation(c,"aTex");this.ys=a.getUniformLocation(c,"matP");this.Kl=a.getUniformLocation(c,"matMV");this.Fh=a.getUniformLocation(c,"opacity");this.Ro=a.getUniformLocation(c,"colorFill");this.zs=a.getUniformLocation(c,"samplerFront");this.oj=a.getUniformLocation(c,"samplerBack");this.yg=a.getUniformLocation(c,"destStart");this.xg=a.getUniformLocation(c,"destEnd");this.qj=a.getUniformLocation(c,"seconds");this.To=a.getUniformLocation(c, "pixelWidth");this.So=a.getUniformLocation(c,"pixelHeight");this.nj=a.getUniformLocation(c,"layerScale");this.mj=a.getUniformLocation(c,"layerAngle");this.rj=a.getUniformLocation(c,"viewOrigin");this.pj=a.getUniformLocation(c,"scrollPos");this.rz=!!(this.To||this.So||this.qj||this.oj||this.yg||this.xg||this.nj||this.mj||this.rj||this.pj);this.Is=this.Js=-999;this.Nl=1;this.Es=this.Ds=0;this.Gs=this.Cs=this.Bs=1;this.Ms=this.Ls=this.Ks=this.Os=this.Ns=this.Fs=0;this.Jo=[];this.Hs=oc();this.Fh&&a.uniform1f(this.Fh, 1);this.Ro&&a.uniform4f(this.Ro,1,1,1,1);this.zs&&a.uniform1i(this.zs,0);this.oj&&a.uniform1i(this.oj,1);this.yg&&a.uniform2f(this.yg,0,0);this.xg&&a.uniform2f(this.xg,1,1);this.nj&&a.uniform1f(this.nj,1);this.mj&&a.uniform1f(this.mj,0);this.rj&&a.uniform2f(this.rj,0,0);this.pj&&a.uniform2f(this.pj,0,0);this.qj&&a.uniform1f(this.qj,0);this.mg=!1}function b(a,c){return a[0]===c[0]&&a[1]===c[1]&&a[2]===c[2]&&a[3]===c[3]&&a[4]===c[4]&&a[5]===c[5]&&a[6]===c[6]&&a[7]===c[7]&&a[8]===c[8]&&a[9]===c[9]&& a[10]===c[10]&&a[11]===c[11]&&a[12]===c[12]&&a[13]===c[13]&&a[14]===c[14]&&a[15]===c[15]}function n(a,c){this.type=a;this.u=c;this.F=c.F;this.ae=this.rc=this.kt=0;this.aa=this.xd=null;this.Yt=[]}var g=oc();f.prototype.Rr=function(){var a=this.F,c;this.ns=1;this.sg=this.Ef=null;this.Lk=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.STENCIL_TEST);a.disable(a.DITHER);this.Ma?(a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL)): a.disable(a.DEPTH_TEST);this.qs=a.ONE;this.ks=a.ONE_MINUS_SRC_ALPHA;this.bn=new Float32Array(8E3*(this.Ma?3:2));this.Om=new Float32Array(16E3);this.yt=new Float32Array(32E3);this.mp=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.mp);a.bufferData(a.ARRAY_BUFFER,this.yt.byteLength,a.DYNAMIC_DRAW);this.dk=Array(4);this.Xj=Array(4);for(c=0;4>c;c++)this.dk[c]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.dk[c]),a.bufferData(a.ARRAY_BUFFER,this.bn.byteLength,a.DYNAMIC_DRAW),this.Xj[c]=a.createBuffer(), a.bindBuffer(a.ARRAY_BUFFER,this.Xj[c]),a.bufferData(a.ARRAY_BUFFER,this.Om.byteLength,a.DYNAMIC_DRAW);this.we=0;this.vz=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.vz);for(var e=new Uint16Array(12E3),d=c=0;12E3>c;)e[c++]=d,e[c++]=d+1,e[c++]=d+2,e[c++]=d,e[c++]=d+2,e[c++]=d+3,d+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,e,a.STATIC_DRAW);this.np=this.$h=this.Xe=0;this.cb=[];c=this.Ma?"attribute highp vec3 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, aPos.z, 1.0);\n\tvTex = aTex;\n}": "attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}";e=this.Ai({src:"varying mediump vec2 vTex;\nuniform lowp float opacity;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, vTex);\n\tgl_FragColor *= opacity;\n}"},c,"<default>");this.cb.push(e);e=this.Ai({src:"uniform mediump sampler2D samplerFront;\nvarying lowp float opacity;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, gl_PointCoord);\n\tgl_FragColor *= opacity;\n}"}, "attribute vec4 aPos;\nvarying float opacity;\nuniform mat4 matP;\nuniform mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tgl_PointSize = aPos.z;\n\topacity = aPos.w;\n}","<point>");this.cb.push(e);e=this.Ai({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},c,"<earlyz>");this.cb.push(e);e=this.Ai({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"}, c,"<fill>");this.cb.push(e);for(var l in sc)sc.hasOwnProperty(l)&&this.cb.push(this.Ai(sc[l],c,l));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.hf=[];this.ue=0;this.gc=!1;this.er=this.ij=-1;this.Yg=null;this.Zn=a.createFramebuffer();this.Sk=this.rm=null;this.Qq=!1;this.Ma&&(this.Sk=a.createRenderbuffer());this.Rf=nc([0,0,0]);this.Ps=a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];2048<this.Ps&&(this.Ps=2048);this.Ec(0)};k.prototype.Vp=function(a){b(this.Hs,a)||(pc(a,this.Hs),this.F.uniformMatrix4fv(this.Kl, !1,a))};f.prototype.Ai=function(a,c,e){var d=this.F,l=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(l,a.src);d.compileShader(l);if(!d.getShaderParameter(l,d.COMPILE_STATUS))throw a=d.getShaderInfoLog(l),d.deleteShader(l),Error("error compiling fragment shader: "+a);var b=d.createShader(d.VERTEX_SHADER);d.shaderSource(b,c);d.compileShader(b);if(!d.getShaderParameter(b,d.COMPILE_STATUS))throw a=d.getShaderInfoLog(b),d.deleteShader(l),d.deleteShader(b),Error("error compiling vertex shader: "+a);c= d.createProgram();d.attachShader(c,l);d.attachShader(c,b);d.linkProgram(c);if(!d.getProgramParameter(c,d.LINK_STATUS))throw a=d.getProgramInfoLog(c),d.deleteShader(l),d.deleteShader(b),d.deleteProgram(c),Error("error linking shader program: "+a);d.useProgram(c);d.deleteShader(l);d.deleteShader(b);l=new k(d,c,e);l.Xn=a.Xn||0;l.Yn=a.Yn||0;l.dr=!!a.dr;l.Jd=!!a.Jd;l.Oq=!!a.Oq;l.ba=a.ba||[];a=0;for(b=l.ba.length;a<b;a++)l.ba[a][1]=d.getUniformLocation(c,l.ba[a][0]),l.Jo.push(0),d.uniform1f(l.ba[a][1], 0);return l};f.prototype.oo=function(a){var c,e;c=0;for(e=this.cb.length;c<e;c++)if(this.cb[c].name===a)return c;return-1};f.prototype.Ct=function(a,c,e){var d=this.ad,l=this.Ol,b=[0,0,0,0,0,0,0,0];b[0]=d[0]*a+d[4]*c+d[12];b[1]=d[1]*a+d[5]*c+d[13];b[2]=d[2]*a+d[6]*c+d[14];b[3]=d[3]*a+d[7]*c+d[15];b[4]=l[0]*b[0]+l[4]*b[1]+l[8]*b[2]+l[12]*b[3];b[5]=l[1]*b[0]+l[5]*b[1]+l[9]*b[2]+l[13]*b[3];b[6]=l[2]*b[0]+l[6]*b[1]+l[10]*b[2]+l[14]*b[3];b[7]=-b[2];0!==b[7]&&(b[7]=1/b[7],b[4]*=b[7],b[5]*=b[7],b[6]*=b[7], e[0]=(.5*b[4]+.5)*this.width,e[1]=(.5*b[5]+.5)*this.height)};f.prototype.Ig=function(a,c,e){if(this.width!==a||this.height!==c||e){this.rf();e=this.F;this.width=a;this.height=c;e.viewport(0,0,a,c);rc(this.Gn,this.As,this.pu,this.ad);if(this.Ma){var d=-a/2;a=a/2;var l=c/2;c=-c/2;var b=this.dn,q=this.gq,g=this.Ol;g||(g=oc());var p=a-d,f=c-l,h=q-b;g[0]=2/p;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=2/f;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=-2/h;g[11]=0;g[12]=-(d+a)/p;g[13]=-(c+l)/f;g[14]=-(q+b)/h;g[15]=1;this.fk[0]= 1;this.fk[1]=1}else c=a/c,d=this.dn,a=this.gq,g=this.Ol,q=d*Math.tan(45*Math.PI/360),c*=q,l=-c,b=-q,g||(g=oc()),p=c-l,f=q-b,h=a-d,g[0]=2*d/p,g[1]=0,g[2]=0,g[3]=0,g[4]=0,g[5]=2*d/f,g[6]=0,g[7]=0,g[8]=(c+l)/p,g[9]=(q+b)/f,g[10]=-(a+d)/h,g[11]=-1,g[12]=0,g[13]=0,g[14]=-(a*d*2)/h,g[15]=0,d=[0,0],a=[0,0],this.Ct(0,0,d),this.Ct(1,1,a),this.fk[0]=1/(a[0]-d[0]),this.fk[1]=-1/(a[1]-d[1]);d=0;for(a=this.cb.length;d<a;d++)l=this.cb[d],l.mg=!1,l.ys&&(e.useProgram(l.Qj),e.uniformMatrix4fv(l.ys,!1,this.Ol));e.useProgram(this.cb[this.ij].Qj); e.bindTexture(e.TEXTURE_2D,null);e.activeTexture(e.TEXTURE1);e.bindTexture(e.TEXTURE_2D,null);e.activeTexture(e.TEXTURE0);this.sg=this.Ef=null;this.Sk&&(e.bindFramebuffer(e.FRAMEBUFFER,this.Zn),e.bindRenderbuffer(e.RENDERBUFFER,this.Sk),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,this.width,this.height),this.Qq||(e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.Sk),this.Qq=!0),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null), this.rm=null)}};f.prototype.td=function(){rc(this.Gn,this.As,this.pu,this.ad);qc(this.ad,this.fk)};f.prototype.translate=function(a,c){if(0!==a||0!==c){this.Rf[0]=a;this.Rf[1]=c;this.Rf[2]=0;var e=this.ad,d=this.Rf,l=d[0],b=d[1],d=d[2];e[12]=e[0]*l+e[4]*b+e[8]*d+e[12];e[13]=e[1]*l+e[5]*b+e[9]*d+e[13];e[14]=e[2]*l+e[6]*b+e[10]*d+e[14];e[15]=e[3]*l+e[7]*b+e[11]*d+e[15]}};f.prototype.scale=function(a,c){if(1!==a||1!==c)this.Rf[0]=a,this.Rf[1]=c,this.Rf[2]=1,qc(this.ad,this.Rf)};f.prototype.xm=function(a){if(0!== a){var c=this.ad,e,d=Math.sin(a);a=Math.cos(a);var l=c[0],b=c[1],g=c[2],p=c[3],f=c[4],k=c[5],h=c[6],m=c[7];e?c!==e&&(e[8]=c[8],e[9]=c[9],e[10]=c[10],e[11]=c[11],e[12]=c[12],e[13]=c[13],e[14]=c[14],e[15]=c[15]):e=c;e[0]=l*a+f*d;e[1]=b*a+k*d;e[2]=g*a+h*d;e[3]=p*a+m*d;e[4]=l*-d+f*a;e[5]=b*-d+k*a;e[6]=g*-d+h*a;e[7]=p*-d+m*a}};f.prototype.dd=function(){if(!b(this.Ko,this.ad)){var a=this.Qc();a.type=5;a.aa?pc(this.ad,a.aa):a.aa=oc(this.ad);pc(this.ad,this.Ko);this.gc=!1}};f.prototype.Cm=function(a){this.Ma&& (32760<a&&(a=32760),this.On=this.Gn[2]-this.dn-a*this.qB)};n.prototype.Ix=function(){var a=this.F,c=this.u;0!==this.rc?(a.depthMask(!0),a.colorMask(!1,!1,!1,!1),a.disable(a.BLEND),a.bindFramebuffer(a.FRAMEBUFFER,c.Zn),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.clear(a.DEPTH_BUFFER_BIT),a.bindFramebuffer(a.FRAMEBUFFER,null),c.sl=!0):(a.depthMask(!1),a.colorMask(!0,!0,!0,!0),a.enable(a.BLEND),c.sl=!1)};n.prototype.Mx=function(){this.F.bindTexture(this.F.TEXTURE_2D, this.xd)};n.prototype.Nx=function(){var a=this.F;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.xd);a.activeTexture(a.TEXTURE0)};n.prototype.Jx=function(){var a=this.kt,c=this.u;c.Lk=a;c=c.Yg;c.Fh&&c.Nl!==a&&(c.Nl=a,this.F.uniform1f(c.Fh,a))};n.prototype.Dx=function(){this.F.drawElements(this.F.TRIANGLES,this.ae,this.F.UNSIGNED_SHORT,this.rc)};n.prototype.Fx=function(){this.F.blendFunc(this.rc,this.ae)};n.prototype.Px=function(){var a,c,e,d=this.u.cb,l=this.u.er;a=0;for(c=d.length;a< c;a++)e=d[a],a===l&&e.Kl?(e.Vp(this.aa),e.mg=!0):e.mg=!1;pc(this.aa,this.u.Nn)};n.prototype.Ex=function(){var a=this.F,c=this.u;this.xd?(c.sg===this.xd&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),c.sg=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,c.Zn),c.sl||a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.xd,0)):(c.Ma||a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))}; n.prototype.Ax=function(){var a=this.F,c=this.rc;0===c?(a.clearColor(this.aa[0],this.aa[1],this.aa[2],this.aa[3]),a.clear(a.COLOR_BUFFER_BIT)):1===c?(a.enable(a.SCISSOR_TEST),a.scissor(this.aa[0],this.aa[1],this.aa[2],this.aa[3]),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST)):a.clear(a.DEPTH_BUFFER_BIT)};n.prototype.Hx=function(){var a=this.F;0!==this.rc?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST)};n.prototype.Cx=function(){var a=this.F,c=this.u;c.Ma&&a.disable(a.DEPTH_TEST); var e=c.cb[1];a.useProgram(e.Qj);!e.mg&&e.Kl&&(e.Vp(c.Nn),e.mg=!0);a.enableVertexAttribArray(e.nd);a.bindBuffer(a.ARRAY_BUFFER,c.mp);a.vertexAttribPointer(e.nd,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.rc/4,this.ae);e=c.Yg;a.useProgram(e.Qj);0<=e.nd&&(a.enableVertexAttribArray(e.nd),a.bindBuffer(a.ARRAY_BUFFER,c.dk[c.we]),a.vertexAttribPointer(e.nd,c.Ma?3:2,a.FLOAT,!1,0,0));0<=e.Hf&&(a.enableVertexAttribArray(e.Hf),a.bindBuffer(a.ARRAY_BUFFER,c.Xj[c.we]),a.vertexAttribPointer(e.Hf,2,a.FLOAT,!1, 0,0));c.Ma&&a.enable(a.DEPTH_TEST)};n.prototype.Kx=function(){var a=this.F,c=this.u,e=c.cb[this.rc];c.er=this.rc;c.Yg=e;a.useProgram(e.Qj);!e.mg&&e.Kl&&(e.Vp(c.Nn),e.mg=!0);e.Fh&&e.Nl!==c.Lk&&(e.Nl=c.Lk,a.uniform1f(e.Fh,c.Lk));0<=e.nd&&(a.enableVertexAttribArray(e.nd),a.bindBuffer(a.ARRAY_BUFFER,c.dk[c.we]),a.vertexAttribPointer(e.nd,c.Ma?3:2,a.FLOAT,!1,0,0));0<=e.Hf&&(a.enableVertexAttribArray(e.Hf),a.bindBuffer(a.ARRAY_BUFFER,c.Xj[c.we]),a.vertexAttribPointer(e.Hf,2,a.FLOAT,!1,0,0))};n.prototype.Gx= function(){var a=this.aa;this.F.uniform4f(this.u.Yg.Ro,a[0],a[1],a[2],a[3])};n.prototype.Lx=function(){var a,c,e=this.u.Yg,d=this.F;a=this.aa;e.oj&&this.u.sg!==this.xd&&(d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,this.xd),this.u.sg=this.xd,d.activeTexture(d.TEXTURE0));var l=a[0];e.To&&l!==e.Js&&(e.Js=l,d.uniform1f(e.To,l));l=a[1];e.So&&l!==e.Is&&(e.Is=l,d.uniform1f(e.So,l));l=a[2];c=a[3];!e.yg||l===e.Ds&&c===e.Es||(e.Ds=l,e.Es=c,d.uniform2f(e.yg,l,c));l=a[4];c=a[5];!e.xg||l===e.Bs&&c=== e.Cs||(e.Bs=l,e.Cs=c,d.uniform2f(e.xg,l,c));l=a[6];e.nj&&l!==e.Gs&&(e.Gs=l,d.uniform1f(e.nj,l));l=a[7];e.mj&&l!==e.Fs&&(e.Fs=l,d.uniform1f(e.mj,l));l=a[8];c=a[9];!e.rj||l===e.Ns&&c===e.Os||(e.Ns=l,e.Os=c,d.uniform2f(e.rj,l,c));l=a[10];c=a[11];!e.pj||l===e.Ks&&c===e.Ls||(e.Ks=l,e.Ls=c,d.uniform2f(e.pj,l,c));l=a[12];e.qj&&l!==e.Ms&&(e.Ms=l,d.uniform1f(e.qj,l));if(e.ba.length)for(a=0,c=e.ba.length;a<c;a++)l=this.Yt[a],l!==e.Jo[a]&&(e.Jo[a]=l,d.uniform1f(e.ba[a][1],l))};f.prototype.Qc=function(){this.ue=== this.hf.length&&this.hf.push(new n(0,this));return this.hf[this.ue++]};f.prototype.rf=function(){if(0!==this.ue&&!this.F.isContextLost()){var a=this.F;0<this.np&&(a.bindBuffer(a.ARRAY_BUFFER,this.mp),a.bufferSubData(a.ARRAY_BUFFER,0,this.yt.subarray(0,this.np)),c&&0<=c.nd&&"<point>"===c.name&&a.vertexAttribPointer(c.nd,4,a.FLOAT,!1,0,0));if(0<this.Xe){var c=this.Yg;a.bindBuffer(a.ARRAY_BUFFER,this.dk[this.we]);a.bufferSubData(a.ARRAY_BUFFER,0,this.bn.subarray(0,this.Xe));c&&0<=c.nd&&"<point>"!==c.name&& a.vertexAttribPointer(c.nd,this.Ma?3:2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Xj[this.we]);a.bufferSubData(a.ARRAY_BUFFER,0,this.Om.subarray(0,this.$h));c&&0<=c.Hf&&"<point>"!==c.name&&a.vertexAttribPointer(c.Hf,2,a.FLOAT,!1,0,0)}for(var e,a=0,c=this.ue;a<c;a++)switch(e=this.hf[a],e.type){case 1:e.Dx();break;case 2:e.Mx();break;case 3:e.Jx();break;case 4:e.Fx();break;case 5:e.Px();break;case 6:e.Ex();break;case 7:e.Ax();break;case 8:e.Cx();break;case 9:e.Kx();break;case 10:e.Lx();break; case 11:e.Nx();break;case 12:e.Gx();break;case 13:e.Hx();break;case 14:e.Ix()}this.np=this.$h=this.Xe=this.ue=0;this.sl=this.gc=!1;this.we++;4<=this.we&&(this.we=0)}};f.prototype.Pf=function(a){if(a!==this.ns&&!this.Xi){var c=this.Qc();c.type=3;this.ns=c.kt=a;this.gc=!1}};f.prototype.Dc=function(a){if(a!==this.Ef){var c=this.Qc();c.type=2;this.Ef=c.xd=a;this.gc=!1}};f.prototype.Of=function(a,c){if((a!==this.qs||c!==this.ks)&&!this.Xi){var e=this.Qc();e.type=4;e.rc=a;e.ae=c;this.qs=a;this.ks=c;this.gc= !1}};f.prototype.Mt=function(){this.Of(this.F.ONE,this.F.ONE_MINUS_SRC_ALPHA)};f.prototype.Jj=function(a,c,e,d,l,b,g,p){15992<=this.Xe&&this.rf();var f=this.Xe,k=this.$h,h=this.bn,m=this.Om,n=this.On;if(this.gc)this.hf[this.ue-1].ae+=6;else{var r=this.Qc();r.type=1;r.rc=this.Ma?f:f/2*3;r.ae=6;this.gc=!0}this.Ma?(h[f++]=a,h[f++]=c,h[f++]=n,h[f++]=e,h[f++]=d,h[f++]=n,h[f++]=l,h[f++]=b,h[f++]=n,h[f++]=g,h[f++]=p,h[f++]=n):(h[f++]=a,h[f++]=c,h[f++]=e,h[f++]=d,h[f++]=l,h[f++]=b,h[f++]=g,h[f++]=p);m[k++]= 0;m[k++]=0;m[k++]=1;m[k++]=0;m[k++]=1;m[k++]=1;m[k++]=0;m[k++]=1;this.Xe=f;this.$h=k};f.prototype.Ld=function(a,c,e,d,l,b,g,p,f){15992<=this.Xe&&this.rf();var k=this.Xe,h=this.$h,m=this.bn,n=this.Om,r=this.On;if(this.gc)this.hf[this.ue-1].ae+=6;else{var E=this.Qc();E.type=1;E.rc=this.Ma?k:k/2*3;E.ae=6;this.gc=!0}var E=f.left,G=f.top,A=f.right;f=f.bottom;this.Ma?(m[k++]=a,m[k++]=c,m[k++]=r,m[k++]=e,m[k++]=d,m[k++]=r,m[k++]=l,m[k++]=b,m[k++]=r,m[k++]=g,m[k++]=p,m[k++]=r):(m[k++]=a,m[k++]=c,m[k++]=e, m[k++]=d,m[k++]=l,m[k++]=b,m[k++]=g,m[k++]=p);n[h++]=E;n[h++]=G;n[h++]=A;n[h++]=G;n[h++]=A;n[h++]=f;n[h++]=E;n[h++]=f;this.Xe=k;this.$h=h};f.prototype.Ec=function(a){if(this.ij!==a){if(!this.cb[a]){if(0===this.ij)return;a=0}var c=this.Qc();c.type=9;this.ij=c.rc=a;this.gc=!1}};f.prototype.Gj=function(a){a=this.cb[a];return!(!a.yg&&!a.xg)};f.prototype.qp=function(a){a=this.cb[a];return!!(a.yg||a.xg||a.dr)};f.prototype.pp=function(a){return this.cb[a].Jd};f.prototype.pA=function(a){a=this.cb[a];return 0!== a.Xn||0!==a.Yn};f.prototype.Zy=function(a){return this.cb[a].Xn};f.prototype.$y=function(a){return this.cb[a].Yn};f.prototype.az=function(a,c){return this.cb[a].ba[c][2]};f.prototype.nm=function(a){return this.cb[a].Oq};f.prototype.Vh=function(a,c,e,d,l,b,g,p,f,k,h,m,n,r,E){var G=this.cb[this.ij],A,y;if(G.rz||E.length){A=this.Qc();A.type=10;A.aa?pc(this.ad,A.aa):A.aa=oc();y=A.aa;y[0]=c;y[1]=e;y[2]=d;y[3]=l;y[4]=b;y[5]=g;y[6]=p;y[7]=f;y[8]=k;y[9]=h;y[10]=m;y[11]=n;y[12]=r;G.oj?A.xd=a:A.xd=null;if(E.length)for(e= A.Yt,e.length=E.length,a=0,c=E.length;a<c;a++)e[a]=E[a];this.gc=!1}};f.prototype.clear=function(a,c,b,d){var l=this.Qc();l.type=7;l.rc=0;l.aa||(l.aa=oc());l.aa[0]=a;l.aa[1]=c;l.aa[2]=b;l.aa[3]=d;this.gc=!1};f.prototype.clearRect=function(a,c,b,d){if(!(0>b||0>d)){var l=this.Qc();l.type=7;l.rc=1;l.aa||(l.aa=oc());l.aa[0]=a;l.aa[1]=c;l.aa[2]=b;l.aa[3]=d;this.gc=!1}};f.prototype.Qt=function(a){if(this.Ma&&(a=!!a,this.Xi!==a)){var c=this.Qc();c.type=14;c.rc=a?1:0;this.gc=!1;this.Xi=a;this.rm=null;this.Xi? this.Ec(2):this.Ec(0)}};f.prototype.Ot=function(a){if(this.Ma){var c=this.Qc();c.type=13;c.rc=a?1:0;this.gc=!1}};f.prototype.Ar=function(){pc(this.Ko,g);this.td();this.dd();var a=this.width/2,c=this.height/2;this.Jj(-a,c,a,c,a,-c,-a,-c);pc(g,this.ad);this.dd()};f.prototype.Nt=function(a,c,b){this.Ec(3);var d=this.Qc();d.type=12;d.aa||(d.aa=oc());d.aa[0]=a;d.aa[1]=c;d.aa[2]=b;d.aa[3]=1;this.gc=!1};f.prototype.SA=function(){this.Ec(0)};f.prototype.xA=function(){this.Ec(2)};f.prototype.oA=function(){this.rf(); this.F.flush()};var r=[],p={};f.prototype.ox=function(){B(r);p={}};f.prototype.Eh=function(a,c,b,d){c=!!c;b=!!b;var l=a.src+","+c+","+b+(c?",undefined":""),g=null;if("undefined"!==typeof a.src&&p.hasOwnProperty(l))return g=p[l],g.wk++,g;this.rf();var q=this.F,f=la(a.width)&&la(a.height),g=q.createTexture();q.bindTexture(q.TEXTURE_2D,g);q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var k=q.RGBA,n=q.RGBA,h=q.UNSIGNED_BYTE;if(d&&!this.He)switch(d){case 1:n=k=q.RGB;break;case 2:h=q.UNSIGNED_SHORT_4_4_4_4; break;case 3:h=q.UNSIGNED_SHORT_5_5_5_1;break;case 4:n=k=q.RGB,h=q.UNSIGNED_SHORT_5_6_5}if(1===this.version&&!f&&c){d=document.createElement("canvas");d.width=na(a.width);d.height=na(a.height);var m=d.getContext("2d");"undefined"!==typeof m.imageSmoothingEnabled?m.imageSmoothingEnabled=b:(m.webkitImageSmoothingEnabled=b,m.mozImageSmoothingEnabled=b,m.msImageSmoothingEnabled=b);m.drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);q.texImage2D(q.TEXTURE_2D,0,k,n,h,d)}else q.texImage2D(q.TEXTURE_2D, 0,k,n,h,a);c?(q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.REPEAT),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.REPEAT)):(q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE));b?(q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.LINEAR),(f||2<=this.version)&&this.pr?(q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.LINEAR_MIPMAP_LINEAR),q.generateMipmap(q.TEXTURE_2D)):q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER, q.LINEAR)):(q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.NEAREST),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.NEAREST));q.bindTexture(q.TEXTURE_2D,null);this.Ef=null;g.Yf=a.width;g.Xf=a.height;g.wk=1;g.Vq=l;r.push(g);return p[l]=g};f.prototype.Tc=function(a,c,b,d){this.rf();var l=this.F;this.He&&(d=!1);var g=l.createTexture();l.bindTexture(l.TEXTURE_2D,g);l.texImage2D(l.TEXTURE_2D,0,l.RGBA,a,c,0,l.RGBA,d?l.UNSIGNED_SHORT_4_4_4_4:l.UNSIGNED_BYTE,null);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,b?l.LINEAR:l.NEAREST);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,b?l.LINEAR:l.NEAREST);l.bindTexture(l.TEXTURE_2D,null);this.Ef=null;g.Yf=a;g.Xf=c;r.push(g);return g};f.prototype.jB=function(a,c,b){this.rf();var d=this.F;this.He&&(b=!1);d.bindTexture(d.TEXTURE_2D,c);d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA, b?d.UNSIGNED_SHORT_4_4_4_4:d.UNSIGNED_BYTE,a)}catch(l){console&&console.error&&console.error("Error updating WebGL texture: ",l)}d.bindTexture(d.TEXTURE_2D,null);this.Ef=null};f.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.wk&&1<a.wk?a.wk--:(this.rf(),a===this.Ef&&(this.F.bindTexture(this.F.TEXTURE_2D,null),this.Ef=null),a===this.sg&&(this.F.activeTexture(this.F.TEXTURE1),this.F.bindTexture(this.F.TEXTURE_2D,null),this.F.activeTexture(this.F.TEXTURE0),this.sg=null),Ga(r,a),"undefined"!== typeof a.Vq&&delete p[a.Vq],this.F.deleteTexture(a)))};f.prototype.ud=function(a){if(a!==this.rm){var c=this.Qc();c.type=6;this.rm=c.xd=a;this.gc=!1}};qb=f})(); (function(){function f(a){if(a&&(a.getContext||a.dc)&&!a.c2runtime){a.c2runtime=this;var d=this;this.Kc=(this.tl=/crosswalk/i.test(navigator.userAgent)||/xwalk/i.test(navigator.userAgent)||!("undefined"===typeof window.c2isCrosswalk||!window.c2isCrosswalk))||"undefined"!==typeof window.device&&("undefined"!==typeof window.device.cordova||"undefined"!==typeof window.device.phonegap)||"undefined"!==typeof window.c2iscordova&&window.c2iscordova;this.Sb=!!a.dc;this.Xr="undefined"!==typeof window.AppMobi|| this.Sb;this.Zc=!!window.c2cocoonjs;this.md=!!window.c2ejecta;this.Zc&&(CocoonJS.App.onSuspended.addEventListener(function(){d.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){d.setSuspended(!1)}));this.md&&(document.addEventListener("pagehide",function(){d.setSuspended(!0)}),document.addEventListener("pageshow",function(){d.setSuspended(!1)}),document.addEventListener("resize",function(){d.setSize(window.innerWidth,window.innerHeight)}));this.Ja=this.Sb||this.Zc||this.md;this.Zi= /edge\//i.test(navigator.userAgent);this.He=(/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent))&&!this.Zi;this.as=/tizen/i.test(navigator.userAgent);this.Wi=/android/i.test(navigator.userAgent)&&!this.as&&!this.He&&!this.Zi;this.ds=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&!this.He&&!this.Zi;this.Kz=/ipad/i.test(navigator.userAgent);this.vh=this.ds||this.Kz||this.md;this.Ao=(/chrome/i.test(navigator.userAgent)|| /chromium/i.test(navigator.userAgent))&&!this.He&&!this.Zi;this.Wr=/amazonwebappplatform/i.test(navigator.userAgent);this.Cz=/firefox/i.test(navigator.userAgent);this.Fz=/safari/i.test(navigator.userAgent)&&!this.Ao&&!this.He&&!this.Zi;this.Gz=/windows/i.test(navigator.userAgent);this.ul="undefined"!==typeof window.c2nodewebkit||"undefined"!==typeof window.c2nwjs||/nodewebkit/i.test(navigator.userAgent)||/nwjs/i.test(navigator.userAgent);this.bs=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8); this.Iz=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.zf=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.Go=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.yl=!!window.cr_windows10;this.Fo=this.bs||this.Iz||this.Go||this.yl;this.Bz=!("undefined"===typeof window.c2isBlackberry10||!window.c2isBlackberry10);this.rl=this.Wi&&!this.Ao&&!this.tl&&!this.Cz&&!this.Wr&&!this.Ja;this.devicePixelRatio= 1;this.yf=this.Kc||this.tl||this.Xr||this.Zc||this.Wi||this.vh||this.zf||this.Go||this.Bz||this.as||this.md;this.yf||(this.yf=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));this.xl=!!(this.vh&&this.Kc&&window.webkit);"undefined"===typeof cr_is_preview||this.ul||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)&&!/nwjs/i.test(navigator.userAgent)||(this.ul=!0);this.canvas=a;this.zk=document.getElementById("c2canvasdiv"); this.u=this.F=null;this.po="(unavailable)";this.Ma=!1;this.eg=0;this.Ra=null;this.cl=!1;this.ct=this.dt=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.ontouchstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.Sb&&(window.c2runtime=this);this.ul&&(window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault(); return!1},window.nwgui&&window.nwgui.App.clearCache&&window.nwgui.App.clearCache());this.rl&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow","visible");this.width=a.width;this.height=a.height;this.N=this.width;this.M=this.height;this.Jk=this.width;this.Ci=this.height;this.Bh=window.innerWidth;this.Ah=window.innerHeight;this.S=!0;this.$i=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.B=[];this.$a=[];this.Dh={};this.Hd=[];this.Wn={}; this.Be=[];this.hi=[];this.Vm=[];this.Ww=[];this.Xw=[];this.gs=this.du=null;this.ag={};this.Co=this.wf=!1;this.$c=0;this.Bo=this.Eo=!1;this.Ed=[];this.Yi=!1;this.Gl=this.Cp="";this.Hb=null;this.Ie="";this.Vj=this.au=!1;this.bl=[];this.dg=this.Ae=0;this.Us=30;this.Mn=this.sj=0;this.ci=1;this.Lb=new eb;this.Ye=new eb;this.Tl=this.hl=this.jg=this.Od=this.ug=this.ao=this.Bl=0;this.Zf=null;this.Uk=[];this.Vn=[];this.Wk=-1;this.Uo=[[]];this.Pp=this.Ll=0;this.om(null);this.tj=[];this.uj=-1;this.Xs=this.yj= 0;this.Mo=!0;this.Hi=0;this.Wj=[];this.Mp=this.tp=-1;this.wh=!0;this.Jl=0;this.wl=!1;this.UA=0;this.Ug=null;this.yc=this.Mr=!1;this.bt=new da;this.bp=new da;this.cp=new da;this.Fg=[];this.Nd=new gb([]);this.Kp=new gb([]);this.Tg=[];this.Ri={};this.nf={};this.ff={};this.gi={};this.Rq={};this.xs=this.Fl=this.ub=this.Gb=this.ws=this.El=this.Ka=null;this.ei=this.Ho=!1;this.bo=[null,null];this.gh=0;this.al="";this.Le={};this.Sj=this.Ff=null;this.cu="";this.Sl=[];this.wA()}}function k(a,d){return 128>= d?a[3]:256>=d?a[2]:512>=d?a[1]:a[0]}function b(){try{return!!window.indexedDB}catch(a){return!1}}function n(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function g(a,d,h,c){try{var l=indexedDB.open("_C2SaveStates");l.onupgradeneeded=n;l.onerror=c;l.onsuccess=function(l){l=l.target.result;l.onerror=c;l.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:d}).onsuccess=h}}catch(b){c(b)}}function r(a,d,h){try{var c=indexedDB.open("_C2SaveStates");c.onupgradeneeded= n;c.onerror=h;c.onsuccess=function(c){c=c.target.result;c.onerror=h;var l=c.transaction(["saves"]).objectStore("saves").get(a);l.onsuccess=function(){l.result?d(l.result.data):d(null)}}}catch(l){h(l)}}function p(){ga("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1<window.location.search.indexOf("continuous")?window.location.reload(!0):window.location=window.location+"?continuous"}function a(a){var d,h={};for(d in a)!a.hasOwnProperty(d)||a[d]instanceof da||a[d]&&"undefined"!== typeof a[d].zC||"spriteCreatedDestroyCallback"!==d&&(h[d]=a[d]);return h}var c=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;f.prototype.wA=function(){var a=this;if(this.xl)this.Gy(function(d){a.lj(JSON.parse(d))},function(){alert("Error fetching data.js")});else{var d;this.zf?d=new ActiveXObject("Microsoft.XMLHTTP"):d=new XMLHttpRequest;var h="data.js";if(this.bs||this.zf||this.Go|| this.yl)h="data.json";d.open("GET",h,!0);var c=!1;if(!this.Ja&&"response"in d&&"responseType"in d)try{d.responseType="json",c="json"===d.responseType}catch(l){c=!1}if(!c&&"responseType"in d)try{d.responseType="text"}catch(b){}if("overrideMimeType"in d)try{d.overrideMimeType("application/json; charset=utf-8")}catch(e){}this.zf?d.onreadystatechange=function(){4===d.readyState&&a.lj(JSON.parse(d.responseText))}:(d.onload=function(){if(c)a.lj(d.response);else if(a.md){var h=d.responseText,h=h.substr(h.indexOf("{")); a.lj(JSON.parse(h))}else a.lj(JSON.parse(d.responseText))},d.onerror=function(a){ha("Error requesting "+h+":");ha(a)});d.send()}};f.prototype.wz=function(){var a=this,d,h,c,l,b,e,m,g,q;this.rg=(!this.Ja||this.md||this.Kc)&&this.gB&&!this.rl;0===this.wc&&this.vh&&(this.rg=!1);this.devicePixelRatio=this.rg?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;"object"===typeof window.StatusBar&&window.StatusBar.hide();this.Yb();0<this.wc&& this.setSize(window.innerWidth,window.innerHeight,!0);this.canvas.addEventListener("webglcontextlost",function(d){d.preventDefault();a.Wz();ga("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){a.u.Rr();a.u.Ig(a.u.width,a.u.height,!0);a.Gb=null;a.ub=null;a.bo[0]=null;a.bo[1]=null;a.Xz();a.S=!0;ga("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);try{this.Xx&&(this.Zc||this.md||!this.Ja)&&(d={alpha:!0, depth:!1,antialias:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!0},this.Wi||(this.F=this.canvas.getContext("webgl2",d)),this.F||(this.F=this.canvas.getContext("webgl",d)||this.canvas.getContext("experimental-webgl",d)))}catch(f){}if(this.F){if(d=this.F.getExtension("WEBGL_debug_renderer_info"))this.po=this.F.getParameter(d.UNMASKED_RENDERER_WEBGL)+" ["+this.F.getParameter(d.UNMASKED_VENDOR_WEBGL)+"]";this.Ma&&(this.po+=" [front-to-back enabled]");this.Ja||(this.Wb=document.createElement("canvas"), jQuery(this.Wb).appendTo(this.canvas.parentNode),this.Wb.oncontextmenu=function(){return!1},this.Wb.onselectstart=function(){return!1},this.Wb.width=Math.round(this.Jk*this.devicePixelRatio),this.Wb.height=Math.round(this.Ci*this.devicePixelRatio),jQuery(this.Wb).css({width:this.Jk+"px",height:this.Ci+"px"}),this.At(),this.kp=this.Wb.getContext("2d"));this.u=new qb(this.F,this.yf,this.Ma);this.u.Ig(this.canvas.width,this.canvas.height);this.u.pr=0!==this.Qx;this.Ra=null;d=0;for(h=this.B.length;d< h;d++)for(b=this.B[d],c=0,l=b.W.length;c<l;c++)m=b.W[c],m.zb=this.u.oo(m.id),m.Jd=this.u.pp(m.zb),this.ei=this.ei||this.u.Gj(m.zb);d=0;for(h=this.Hd.length;d<h;d++){g=this.Hd[d];c=0;for(l=g.W.length;c<l;c++)m=g.W[c],m.zb=this.u.oo(m.id),m.Jd=this.u.pp(m.zb);g.Qd();c=0;for(l=g.Z.length;c<l;c++){q=g.Z[c];b=0;for(e=q.W.length;b<e;b++)m=q.W[b],m.zb=this.u.oo(m.id),m.Jd=this.u.pp(m.zb),this.ei=this.ei||this.u.Gj(m.zb);q.Qd()}}}else{if(0<this.wc&&this.Sb){this.canvas=null;document.oncontextmenu=function(){return!1}; document.onselectstart=function(){return!1};this.Ra=AppMobi.canvas.getContext("2d");try{this.Ra.samplingMode=this.Na?"smooth":"sharp",this.Ra.globalScale=1,this.Ra.HTML5CompatibilityMode=!0,this.Ra.imageSmoothingEnabled=this.Na}catch(p){}0!==this.width&&0!==this.height&&(this.Ra.width=this.width,this.Ra.height=this.height)}this.Ra||(this.Zc?(d={antialias:!!this.Na,alpha:!0},this.Ra=this.canvas.getContext("2d",d)):(d={alpha:!0},this.Ra=this.canvas.getContext("2d",d)),this.Bm(this.Ra,this.Na));this.kp= this.Wb=null}this.ju=function(d){a.Ya(!1,d)};window==window.top||this.Ja||this.Fo||this.zf||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.Zc&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),-1<window.location.search.indexOf("continuous")&&(ga("Reloading for continuous preview"),this.Gl="__c2_continuouspreview",this.Vj=!0),this.gA&&!this.yf&&(jQuery(window).focus(function(){a.setSuspended(!1)}), jQuery(window).blur(function(){var d=window.parent;d&&d.document.hasFocus()||a.setSuspended(!0)})));window.addEventListener("blur",function(){a.Dg()});this.Ja||(d=function(a){if(pb(a)&&document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur)try{document.activeElement.blur()}catch(d){}},"undefined"!==typeof PointerEvent?document.addEventListener("pointerdown",d):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown", d):document.addEventListener("touchstart",d),document.addEventListener("mousedown",d));0===this.wc&&this.rg&&1<this.devicePixelRatio&&this.setSize(this.mb,this.lb,!0);this.nu();this.oz();this.go();this.H={}};f.prototype.setSize=function(a,d,h){var c=0,l=0,b=0,e=0,e=0;if(this.Bh!==a||this.Ah!==d||h){this.Bh=a;this.Ah=d;var m=this.wc;if((b=(document.mozFullScreen||document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.wl)&&!this.Kc)||0!==this.wc||h)b&&(m=this.gh),h=this.devicePixelRatio, 4<=m?(5===m&&1!==h&&(a+=1,d+=1),b=this.mb/this.lb,a/d>b?(b*=d,5===m?(e=b*h/this.mb,1<e?e=Math.floor(e):1>e&&(e=1/Math.ceil(1/e)),b=this.mb*e/h,e=this.lb*e/h,c=(a-b)/2,l=(d-e)/2,a=b,d=e):(c=(a-b)/2,a=b)):(e=a/b,5===m?(e=e*h/this.lb,1<e?e=Math.floor(e):1>e&&(e=1/Math.ceil(1/e)),b=this.mb*e/h,e=this.lb*e/h,c=(a-b)/2,l=(d-e)/2,a=b):l=(d-e)/2,d=e)):b&&0===m&&(c=Math.floor((a-this.mb)/2),l=Math.floor((d-this.lb)/2),a=this.mb,d=this.lb),2>m&&(this.ti=h),this.Jk=Math.round(a),this.Ci=Math.round(d),this.width= Math.round(a*h),this.height=Math.round(d*h),this.S=!0,this.yu?(this.N=this.width,this.M=this.height,this.Wc=!0):this.width<this.mb&&this.height<this.lb||1===m?(this.N=this.width,this.M=this.height,this.Wc=!0):(this.N=this.mb,this.M=this.lb,this.Wc=!1,2===m?(b=this.mb/this.lb,m=this.Bh/this.Ah,m<b?this.N=this.M*m:m>b&&(this.M=this.N/m)):3===m&&(b=this.mb/this.lb,m=this.Bh/this.Ah,m>b?this.N=this.M*m:m<b&&(this.M=this.N/m))),this.zk&&!this.Ja&&(jQuery(this.zk).css({width:Math.round(a)+"px",height:Math.round(d)+ "px","margin-left":Math.floor(c)+"px","margin-top":Math.floor(l)+"px"}),"undefined"!==typeof cr_is_preview&&jQuery("#borderwrap").css({width:Math.round(a)+"px",height:Math.round(d)+"px"})),this.canvas&&(this.canvas.width=Math.round(a*h),this.canvas.height=Math.round(d*h),this.md?(this.canvas.style.left=Math.floor(c)+"px",this.canvas.style.top=Math.floor(l)+"px",this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(d)+"px"):this.rg&&!this.Ja&&(this.canvas.style.width=Math.round(a)+ "px",this.canvas.style.height=Math.round(d)+"px")),this.Wb&&(this.Wb.width=Math.round(a*h),this.Wb.height=Math.round(d*h),this.Wb.style.width=this.Jk+"px",this.Wb.style.height=this.Ci+"px"),this.u&&this.u.Ig(Math.round(a*h),Math.round(d*h)),this.Sb&&this.Ra&&(this.Ra.width=Math.round(a),this.Ra.height=Math.round(d)),this.Ra&&this.Bm(this.Ra,this.Na),this.nu(),this.ds&&!this.Kc&&window.scrollTo(0,0)}};f.prototype.nu=function(){if(this.cx&&0!==this.jp){var a="portrait";2===this.jp&&(a="landscape"); try{screen.orientation&&screen.orientation.lock?screen.orientation.lock(a).catch(function(){}):screen.lockOrientation?screen.lockOrientation(a):screen.webkitLockOrientation?screen.webkitLockOrientation(a):screen.mozLockOrientation?screen.mozLockOrientation(a):screen.msLockOrientation&&screen.msLockOrientation(a)}catch(d){console&&console.warn&&console.warn("Failed to lock orientation: ",d)}}};f.prototype.Wz=function(){this.u.ox();this.Ho=!0;var a,d,h;a=0;for(d=this.B.length;a<d;a++)h=this.B[a],h.Cj&& h.Cj()};f.prototype.Xz=function(){this.Ho=!1;var a,d,h;a=0;for(d=this.B.length;a<d;a++)h=this.B[a],h.Xl&&h.Xl()};f.prototype.At=function(){if(!this.Ja){var a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||document.msFullscreenElement||this.wl)&&!this.Kc?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.Wb).css(a)}};var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame|| window.oCancelAnimationFrame;f.prototype.setSuspended=function(a){var d;if(a&&!this.$i)for(ga("[Construct 2] Suspending"),this.$i=!0,-1!==this.tp&&e&&e(this.tp),-1!==this.Mp&&clearTimeout(this.Mp),a=0,d=this.Wj.length;a<d;a++)this.Wj[a](!0);else if(!a&&this.$i){ga("[Construct 2] Resuming");this.$i=!1;this.Bl=ab();this.ug=ab();a=this.sj=this.hl=0;for(d=this.Wj.length;a<d;a++)this.Wj[a](!1);this.Ya(!1)}};f.prototype.Jq=function(a){this.Wj.push(a)};f.prototype.bf=function(a){return this.Sl[a]};f.prototype.lj= function(a){a&&a.project||ha("Project model unavailable");a=a.project;this.name=a[0];this.yr=a[1];this.wc=a[12];this.mb=a[10];this.lb=a[11];this.tt=this.mb/2;this.ut=this.lb/2;this.Ja&&!this.md&&(4<=a[12]||0===a[12])&&(ga("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.wc=3);this.Yp=a[18];this.Gf=a[19];if(0===this.Gf){var d=new Image;d.crossOrigin="anonymous";this.Rt(d,"loading-logo.png");this.Ff={Ml:d}}else if(4===this.Gf){d= new Image;d.src="";var h=new Image;h.src="";var c=new Image;c.src="";var l=new Image;l.src="";var b=new Image;b.src="";var e=new Image;e.src="";var m=new Image;m.src="";var g=new Image;g.src="";var q=new Image;q.src="";var f=new Image;f.src="";var p=new Image;p.src="";var k=new Image;k.src="";this.Ff={Ml:[d,h,c,l],lA:[b,e,m,g],nB:[q,f,p,k]}}this.yj=a[21];this.Sl=tc();this.me=new K(this);d=0;for(h=a[2].length;d<h;d++)m=a[2][d],c=this.bf(m[0]),rb(m,c.prototype),g=new c(this),g.Im=m[1],g.Af=m[2],g.FC= m[5],g.Vs=m[9],g.G&&g.G(),this.plugins.push(g);this.Sl=tc();d=0;for(h=a[3].length;d<h;d++){m=a[3][d];b=this.bf(m[1]);g=null;c=0;for(l=this.plugins.length;c<l;c++)if(this.plugins[c]instanceof b){g=this.plugins[c];break}q=new g.O(g);q.name=m[0];q.J=m[2];q.yo=m[3].slice(0);q.iB=m[3].length;q.gx=m[4];q.Ky=m[5];q.ka=m[11];q.J?(q.Ag=[],q.Ce=this.Hi++,q.Va=null):(q.Ag=null,q.Ce=-1,q.Va=[]);q.Zk=null;q.eh=null;q.qr=null;q.hc=!1;q.Ic=null;m[6]?(q.Pm=m[6][0],q.Lp=m[6][1],q.Yj=m[6][2]):(q.Pm=null,q.Lp=0,q.Yj= 0);m[7]?q.Hc=m[7]:q.Hc=null;q.index=d;q.e=[];q.Qk=[];q.Re=[new sb(q)];q.Vd=0;q.jd=null;q.vx=0;q.Yh=!0;q.Xm=tb;q.Hr=ub;q.Xy=vb;q.da=wb;q.Ij=xb;q.Eg=yb;q.je=zb;q.kl=Ab;q.eo=Bb;q.io=Eb;q.gd=Fb;q.jo=Gb;q.Fk=new hb(this.mb,this.lb);q.qk=!0;q.rk=!1;q.H={};q.toString=Hb;q.$a=[];c=0;for(l=m[8].length;c<l;c++){f=m[8][c];p=this.bf(f[1]);k=null;b=0;for(e=this.$a.length;b<e;b++)if(this.$a[b]instanceof p){k=this.$a[b];break}k||(k=new p(this),k.Ql=[],k.Zo=new da,k.G&&k.G(),this.$a.push(k),uc&&k instanceof uc&& (this.du=k),lc.Mz&&k instanceof lc.Mz&&(this.gs=k));-1===k.Ql.indexOf(q)&&k.Ql.push(q);b=new k.O(k,q);b.name=f[0];b.ka=f[2];b.G();q.$a.push(b)}q.global=m[9];q.Do=m[10];q.W=[];c=0;for(l=m[12].length;c<l;c++)q.W.push({id:m[12][c][0],name:m[12][c][1],zb:-1,Jd:!1,Zb:!0,index:c});q.WC=m[13];this.Yp&&!q.J&&!q.Do&&g.Af||q.G();q.name&&(this.types[q.name]=q);this.B.push(q);g.Im&&(c=new g.K(q),c.uid=this.yj++,c.Et=this.Xs++,c.pg=0,c.Pi=Ib,c.toString=Jb,c.n=m[14],c.G(),q.e.push(c),this.Le[c.uid.toString()]= c)}d=0;for(h=a[4].length;d<h;d++)for(b=a[4][d],e=this.B[b[0]],c=1,l=b.length;c<l;c++)m=this.B[b[c]],m.Va.push(e),e.Ag.push(m);d=0;for(h=a[28].length;d<h;d++){b=a[28][d];e=[];c=0;for(l=b.length;c<l;c++)e.push(this.B[b[c]]);c=0;for(l=e.length;c<l;c++)e[c].hc=!0,e[c].Ic=e}if(0<this.Hi)for(d=0,h=this.B.length;d<h;d++)if(m=this.B[d],!m.J&&m.Va.length){m.Zk=Array(this.Hi);m.eh=Array(this.Hi);m.qr=Array(this.Hi);q=[];c=k=p=f=0;for(l=m.Va.length;c<l;c++)for(g=m.Va[c],m.Zk[g.Ce]=f,f+=g.iB,m.eh[g.Ce]=p,p+= g.gx,m.qr[g.Ce]=k,k+=g.Ky,b=0,e=g.W.length;b<e;b++)q.push(ya({},g.W[b]));m.W=q.concat(m.W);c=0;for(l=m.W.length;c<l;c++)m.W[c].index=c}d=0;for(h=a[5].length;d<h;d++)m=a[5][d],c=new Kb(this,m),this.Dh[c.name]=c,this.Hd.push(c);d=0;for(h=a[6].length;d<h;d++)m=a[6][d],c=new Lb(this,m),this.Wn[c.name]=c,this.Be.push(c);d=0;for(h=this.Be.length;d<h;d++)this.Be[d].nb();d=0;for(h=this.Be.length;d<h;d++)this.Be[d].Tp();d=0;for(h=this.Vm.length;d<h;d++)this.Vm[d].nb();B(this.Vm);this.ax=a[7];this.al=a[8]; this.bd=a[9];this.ti=1;this.Xx=a[13];this.Na=a[14];this.Zq=a[15];this.gB=a[17];this.jp=a[20];this.cx=0<this.jp;this.gA=a[22];this.Wc=this.yu=a[23];this.Qx=a[24];this.mA=a[25];this.Ma=a[27]&&!this.He;this.Jm=Date.now();B(this.Sl);this.wz()};var d=!1,l=0,t=[];f.prototype.sA=function(a,d){function h(){l--;c.Qs()}var c=this;a.addEventListener("load",h);a.addEventListener("error",h);t.push([a,d]);this.Qs()};f.prototype.Qs=function(){for(var a;t.length&&100>l;)l++,a=t.shift(),this.Rt(a[0],a[1])};f.prototype.$p= function(a,h){a.cocoonLazyLoad=!0;a.onerror=function(h){d=a.Uq=!0;console&&console.error&&console.error("Error loading image '"+a.src+"': ",h)};this.md?a.src=h:a.src||("undefined"!==typeof XAPKReader?XAPKReader.get(h,function(d){a.src=d},function(c){d=a.Uq=!0;console&&console.error&&console.error("Error extracting image '"+h+"' from expansion file: ",c)}):(a.crossOrigin="anonymous",this.sA(a,h)));this.hi.push(a)};f.prototype.Iy=function(a){var d,h;d=0;for(h=this.hi.length;d<h;d++)if(this.hi[d].qx=== a)return this.hi[d];return null};var q=0,L=!1;f.prototype.oz=function(){this.Ug&&(q=this.Ug.PA(this.ax))};f.prototype.Pq=function(){var a=q,d=0,h=0,c=!0,l,b,h=0;for(l=this.hi.length;h<l;h++){b=this.hi[h];var m=b.cr;if(!m||0>=m)m=5E4;a+=m;b.src&&(b.complete||b.loaded)&&!b.Uq?d+=m:c=!1}c&&this.mA&&this.Ug&&(L||(this.Ug.VA(),L=!0),h=this.Ug.Yy(),d+=h,h<q&&(c=!1));this.P=0==a?1:d/a;return c};var C=!1;f.prototype.go=function(){if(this.Ra||this.u){var a=this.Ra||this.kp;this.Wb&&this.At();var h=window.innerWidth, l=window.innerHeight;this.Bh===h&&this.Ah===l||this.setSize(h,l);this.P=0;this.vs=-1;var b=this;if(this.Pq()&&(4!==this.Gf||C))this.pz();else{l=Date.now()-this.Jm;if(a){var m=this.width,e=this.height,h=this.devicePixelRatio;if(3>this.Gf&&(this.Zc||500<=l&&this.vs!=this.P)){a.clearRect(0,0,m,e);var l=m/2,e=e/2,m=0===this.Gf&&this.Ff.Ml.complete,q=40*h,g=0,f=80*h,p;if(m){var k=this.Ff.Ml,f=k.width*h;p=k.height*h;q=f/2;g=p/2;a.drawImage(k,ta(l-q),ta(e-g),f,p)}1>=this.Gf?(l=ta(l-q)+.5,e=ta(e+(g+(m?12* h:0)))+.5,a.fillStyle=d?"red":"DodgerBlue",a.fillRect(l,e,Math.floor(f*this.P),6*h),a.strokeStyle="black",a.strokeRect(l,e,f,6*h),a.strokeStyle="white",a.strokeRect(l-1*h,e-1*h,f+2*h,8*h)):2===this.Gf&&(a.font=this.md?"12pt ArialMT":"12pt Arial",a.fillStyle=d?"#f00":"#999",a.VC="middle",h=Math.round(100*this.P)+"%",m=a.measureText?a.measureText(h):null,a.fillText(h,l-(m?m.width:0)/2,e));this.vs=this.P}else if(4===this.Gf){this.Vx(a);c?c(function(){b.go()}):setTimeout(function(){b.go()},16);return}}setTimeout(function(){b.go()}, this.Zc?10:100)}}};var w=-1,h="undefined"===typeof cr_is_preview?200:0,m=!0,Q=!1,S=0,E=0,G="undefined"===typeof cr_is_preview?3E3:0,A=null,y=null,z=0;f.prototype.Vx=function(a){if(!C){for(var c=Math.ceil(this.width),l=Math.ceil(this.height),b=this.Ff.Ml,e=this.Ff.lA,q=this.Ff.nB,g=0;4>g;++g)if(!b[g].complete||!e[g].complete||!q[g].complete)return;0===z&&(w=Date.now());var g=Date.now(),f=!1,p=a,t,n;m||Q?(a.clearRect(0,0,c,l),A&&A.width===c&&A.height===l||(A=document.createElement("canvas"),A.width= c,A.height=l,y=A.getContext("2d")),p=y,f=!0,m&&1===z&&(w=Date.now())):a.globalAlpha=1;p.fillStyle="#333333";p.fillRect(0,0,c,l);256<this.Ci?(t=Ha(.22*l,105,.6*c),n=.25*t,p.drawImage(k(e,t),.5*c-t/2,.2*l-n/2,t,n),n=t=Math.min(.395*l,.95*c),p.drawImage(k(b,t),.5*c-t/2,.485*l-n/2,t,n),t=Ha(.22*l,105,.6*c),n=.25*t,p.drawImage(k(q,t),.5*c-t/2,.868*l-n/2,t,n),p.fillStyle="#3C3C3C",t=c,n=Math.max(.005*l,2),p.fillRect(0,.8*l-n/2,t,n),p.fillStyle=d?"red":"#E0FF65",t=c*this.P,p.fillRect(.5*c-t/2,.8*l-n/2,t, n)):(n=t=.55*l,p.drawImage(k(b,t),.5*c-t/2,.45*l-n/2,t,n),p.fillStyle="#3C3C3C",t=c,n=Math.max(.005*l,2),p.fillRect(0,.85*l-n/2,t,n),p.fillStyle=d?"red":"#E0FF65",t=c*this.P,p.fillRect(.5*c-t/2,.85*l-n/2,t,n));f&&(m?a.globalAlpha=0===z?0:Math.min((g-w)/300,1):Q&&(a.globalAlpha=Math.max(1-(g-E)/300,0)),a.drawImage(A,0,0,c,l));m&&300<=g-w&&2<=z&&(m=!1,S=g);!m&&g-S>=G&&!Q&&1<=this.P&&(Q=!0,E=g);if(Q&&g-E>=300+h||"undefined"!==typeof cr_is_preview&&1<=this.P&&500>Date.now()-w)C=!0,Q=m=!1,this.Ff=y=A= null;++z}};f.prototype.pz=function(){this.Wb&&(this.canvas.parentNode.removeChild(this.Wb),this.Wb=this.kp=null);this.Jm=Date.now();this.ug=ab();var a,d,h;if(this.Yp)for(a=0,d=this.B.length;a<d;a++)h=this.B[a],h.J||h.Do||!h.fa.Af||h.G();else this.wh=!1;a=0;for(d=this.Hd.length;a<d;a++)this.Hd[a].rx();2<=this.wc&&(a=this.mb/this.lb,d=this.width/this.height,this.ti=2!==this.wc&&d>a||2===this.wc&&d<a?this.height/this.lb:this.width/this.mb);this.yr?this.Dh[this.yr].Ip():this.Hd[0].Ip();this.Yp||(this.Jl= 1,this.trigger(K.prototype.i.rq,null),window.C2_RegisterSW&&window.C2_RegisterSW());navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();a=0;for(d=this.B.length;a<d;a++)h=this.B[a],h.et&&h.et();document.hidden||document.webkitHidden||document.mozHidden||document.msHidden?window.cr_setSuspended(!0):this.Ya(!1);this.Sb&&AppMobi.webview.execute("onGameReady();")};f.prototype.Ya=function(a,d,h){if(this.Ka){var l=ab();if(h||!this.$i||a){a||(c?this.tp=c(this.ju):this.Mp=setTimeout(this.ju, this.yf?1:16));d=d||l;var b=this.wc;((h=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&!this.Kc)||this.wl)&&0<this.gh&&(b=this.gh);if(0<b){var b=window.innerWidth,m=window.innerHeight;this.Bh===b&&this.Ah===m||this.setSize(b,m)}this.Ja||(h?this.cl||(this.cl=!0):this.cl?(this.cl=!1,0===this.wc&&this.setSize(Math.round(this.dt/this.devicePixelRatio),Math.round(this.ct/this.devicePixelRatio),!0)):(this.dt=this.width,this.ct=this.height));this.wh&& (h=this.Pq(),this.Jl=this.P,h&&(this.wh=!1,this.P=1,this.trigger(K.prototype.i.rq,null),window.C2_RegisterSW&&window.C2_RegisterSW()));this.Pz(d);!this.S&&!this.Zc||this.Ho||this.Vj||a||(this.S=!1,this.u?this.ec():this.Uc(),this.Sj&&(this.canvas&&this.canvas.toDataURL&&(this.cu=this.canvas.toDataURL(this.Sj[0],this.Sj[1]),window.cr_onSnapshot&&window.cr_onSnapshot(this.cu),this.trigger(K.prototype.i.sv,null)),this.Sj=null));this.DC||(this.Od++,this.jg++,this.hl++);this.sj+=ab()-l}}};f.prototype.Pz= function(a){var d,h,c,l,b,m,e,g;1E3<=a-this.ug&&(this.ug+=1E3,1E3<=a-this.ug&&(this.ug=a),this.ao=this.hl,this.hl=0,this.Mn=this.sj,this.sj=0);d=0;0!==this.Bl&&(d=a-this.Bl,0>d&&(d=0),this.dg=d/=1E3,.5<this.dg?this.dg=0:this.dg>1/this.Us&&(this.dg=1/this.Us));this.Bl=a;this.Ae=this.dg*this.ci;this.Lb.add(this.Ae);this.Ye.add(d);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.wl)&&!this.Kc;2<=this.wc||a&&0<this.gh?(d=this.mb/this.lb, h=this.width/this.height,c=this.wc,a&&0<this.gh&&(c=this.gh),this.ti=2!==c&&h>d||2===c&&h<d?this.height/this.lb:this.width/this.mb,this.Ka&&(this.Ka.Dp(this.Ka.scrollX),this.Ka.Lt(this.Ka.scrollY))):this.ti=this.rg?this.devicePixelRatio:1;this.Yb();this.$c++;this.me.BA();this.$c--;this.Yb();this.$c++;h=this.bt.Sf();a=0;for(d=h.length;a<d;a++)h[a].OC();a=0;for(d=this.B.length;a<d;a++)if(m=this.B[a],!m.J&&(m.$a.length||m.Va.length))for(h=0,c=m.e.length;h<c;h++)for(e=m.e[h],l=0,b=e.U.length;l<b;l++)e.U[l].Ya(); a=0;for(d=this.B.length;a<d;a++)if(m=this.B[a],!m.J&&(m.$a.length||m.Va.length))for(h=0,c=m.e.length;h<c;h++)for(e=m.e[h],l=0,b=e.U.length;l<b;l++)g=e.U[l],g.Bt&&g.Bt();h=this.bp.Sf();a=0;for(d=h.length;a<d;a++)h[a].Ya();this.$c--;this.qz();for(a=0;this.Zf&&10>a++;)this.kr(this.Zf);a=0;for(d=this.Be.length;a<d;a++)this.Be[a].so=!1;this.Ka.hg&&this.Ka.hg.xb();B(this.Fg);this.Mo=!1;this.$c++;a=0;for(d=this.B.length;a<d;a++)if(m=this.B[a],!m.J&&(m.$a.length||m.Va.length))for(h=0,c=m.e.length;h<c;h++)for(e= m.e[h],l=0,b=e.U.length;l<b;l++)g=e.U[l],g.Sm&&g.Sm();h=this.cp.Sf();a=0;for(d=h.length;a<d;a++)h[a].Sm();this.$c--};f.prototype.Dg=function(){var a,d,h,c,l,b,m,e,g;a=0;for(d=this.B.length;a<d;a++)if(m=this.B[a],!m.J)for(h=0,c=m.e.length;h<c;h++)if(e=m.e[h],e.Dg&&e.Dg(),e.U)for(l=0,b=e.U.length;l<b;l++)g=e.U[l],g.Dg&&g.Dg()};f.prototype.kr=function(a){var d=this.Ka;this.Ka.WA();var h,c,l;if(this.u)for(h=0,c=this.B.length;h<c;h++)l=this.B[h],l.J||!l.Wm||l.global&&0!==l.e.length||-1!==a.Ui.indexOf(l)|| l.Wm();d==a&&B(this.me.Gc);B(this.Fg);this.Jt(!0);a.Ip();this.Jt(!1);this.Mo=this.S=!0;this.Yb()};f.prototype.Jt=function(a){var d,h,c,l,b,m,e,g,q;d=0;for(h=this.$a.length;d<h;d++)c=this.$a[d],a?c.zj&&c.zj():c.Bj&&c.Bj();d=0;for(h=this.B.length;d<h;d++)if(c=this.B[d],c.global||c.fa.Im)for(l=0,b=c.e.length;l<b;l++)if(m=c.e[l],a?m.zj&&m.zj():m.Bj&&m.Bj(),m.U)for(e=0,g=m.U.length;e<g;e++)q=m.U[e],a?q.zj&&q.zj():q.Bj&&q.Bj()};f.prototype.ai=function(a){this.bp.add(a)};f.prototype.ZA=function(a){this.cp.add(a)}; f.prototype.ih=function(a){return a&&-1!==a.xj?this.dg*a.xj:this.Ae};f.prototype.Uc=function(){this.Ka.Uc(this.Ra);this.Sb&&this.Ra.present()};f.prototype.ec=function(){this.Ma&&(this.eg=1,this.Ka.bg(this.u));this.Ka.ec(this.u);this.u.oA()};f.prototype.ok=function(a){a&&this.Uk.push(a)};f.prototype.It=function(a){Ga(this.Uk,a)};f.prototype.lg=function(a){a=a.toString();return this.Le.hasOwnProperty(a)?this.Le[a]:null};var R=[];f.prototype.$e=function(a){var d,h;d=a.type.name;var c=null;if(this.ag.hasOwnProperty(d)){if(c= this.ag[d],c.contains(a))return}else c=R.length?R.pop():new da,this.ag[d]=c;c.add(a);this.wf=!0;if(a.hc)for(d=0,h=a.siblings.length;d<h;d++)this.$e(a.siblings[d]);this.Co&&c.fi.push(a);this.Bo||(this.$c++,this.trigger(Object.getPrototypeOf(a.type.fa).i.uv,a),this.$c--)};f.prototype.Yb=function(){if(this.wf){var a,d,h,c,l,b;this.Co=!0;h=0;for(l=this.Ed.length;h<l;++h)for(a=this.Ed[h],d=a.type,d.e.push(a),c=0,b=d.Va.length;c<b;++c)d.Va[c].e.push(a),d.Va[c].Yh=!0;B(this.Ed);this.jv();Ya(this.ag);this.wf= this.Co=!1}};f.prototype.jv=function(){for(var a in this.ag)this.ag.hasOwnProperty(a)&&this.Gu(this.ag[a])};f.prototype.Gu=function(a){var d=a.Sf(),h=d[0].type,c,l,b,m,e,g;bb(h.e,a);h.Yh=!0;0===h.e.length&&(h.rk=!1);c=0;for(l=h.Va.length;c<l;++c)g=h.Va[c],bb(g.e,a),g.Yh=!0;c=0;for(l=this.me.Gc.length;c<l;++c)if(e=this.me.Gc[c],e.qc.hasOwnProperty(h.index)&&bb(e.qc[h.index].Fe,a),!h.J)for(b=0,m=h.Va.length;b<m;++b)g=h.Va[b],e.qc.hasOwnProperty(g.index)&&bb(e.qc[g.index].Fe,a);if(e=d[0].j){if(e.ed)for(b= e.e,c=0,l=b.length;c<l;++c)m=b[c],a.contains(m)&&(m.ja(),e.Xb.update(m,m.Ac,null),m.Ac.set(0,0,-1,-1));bb(e.e,a);e.Nj(0)}for(c=0;c<d.length;++c)this.Fu(d[c],h);a.clear();R.push(a);this.S=!0};f.prototype.Fu=function(a,d){var h,c,l;h=0;for(c=this.Uk.length;h<c;++h)this.Uk[h](a);a.of&&d.Fk.update(a,a.of,null);(h=a.j)&&h.Sh(a,!0);if(a.U)for(h=0,c=a.U.length;h<c;++h)l=a.U[h],l.Id&&l.Id(),l.behavior.Zo.remove(a);this.bt.remove(a);this.bp.remove(a);this.cp.remove(a);a.Id&&a.Id();this.Le.hasOwnProperty(a.uid.toString())&& delete this.Le[a.uid.toString()];this.Tl--;100>d.Qk.length&&d.Qk.push(a)};f.prototype.Ik=function(a,d,h,c){if(a.J){var l=ta(Math.random()*a.Ag.length);return this.Ik(a.Ag[l],d,h,c)}return a.jd?this.pf(a.jd,d,!1,h,c,!1):null};var X=[];f.prototype.pf=function(a,d,h,c,l,b){var m,e,g,q;if(!a)return null;var p=this.B[a[1]],f=p.fa.Af;if(this.wh&&f&&!p.Do||f&&!this.u&&11===a[0][11])return null;var k=d;f||(d=null);var t;p.Qk.length?(t=p.Qk.pop(),t.pc=!0,p.fa.K.call(t,p)):(t=new p.fa.K(p),t.pc=!1);!h||b|| this.Le.hasOwnProperty(a[2].toString())?t.uid=this.yj++:t.uid=a[2];this.Le[t.uid.toString()]=t;t.Et=this.Xs++;t.pg=p.e.length;m=0;for(e=this.Ed.length;m<e;++m)this.Ed[m].type===p&&t.pg++;t.Pi=Ib;t.toString=Jb;g=a[3];if(t.pc)Ya(t.H);else{t.H={};if("undefined"!==typeof cr_is_preview)for(t.Ur=[],t.Ur.length=g.length,m=0,e=g.length;m<e;m++)t.Ur[m]=g[m][1];t.Fb=[];t.Fb.length=g.length}m=0;for(e=g.length;m<e;m++)t.Fb[m]=g[m][0];if(f){var n=a[0];t.x=ia(c)?n[0]:c;t.y=ia(l)?n[1]:l;t.z=n[2];t.width=n[3];t.height= n[4];t.depth=n[5];t.k=n[6];t.opacity=n[7];t.mc=n[8];t.nc=n[9];t.$b=n[10];m=n[11];!this.u&&p.W.length&&(t.$b=m);t.xi=jb(t.$b);this.F&&kb(t,t.$b,this.F);if(t.pc){m=0;for(e=n[12].length;m<e;m++)for(g=0,q=n[12][m].length;g<q;g++)t.ab[m][g]=n[12][m][g];t.Da.set(0,0,0,0);t.of.set(0,0,-1,-1);t.Ac.set(0,0,-1,-1);t.ac.Oj(t.Da);B(t.En)}else{t.ab=n[12].slice(0);m=0;for(e=t.ab.length;m<e;m++)t.ab[m]=n[12][m].slice(0);t.ya=[];t.ef=[];t.ef.length=p.W.length;t.Da=new wa(0,0,0,0);t.of=new wa(0,0,-1,-1);t.Ac=new wa(0, 0,-1,-1);t.ac=new xa;t.En=[];t.A=Mb;t.wC=Nb;t.lc=Ob;t.ja=Pb;t.fB=Qb;t.uu=Rb;t.$d=Sb}t.bi=!1;t.bB=0;t.aB=0;t.$A=null;14===n.length&&(t.bi=!0,t.bB=n[13][0],t.aB=n[13][1],t.$A=n[13][2]);m=0;for(e=p.W.length;m<e;m++)t.ef[m]=!0;t.Pe=!0;t.Qd=Tb;t.Qd();t.vu=!!t.ya.length;t.Dn=!0;t.Hn=!0;p.qk=!0;t.visible=!0;t.xj=-1;t.j=d;t.Rd=d.e.length;t.eg=0;"undefined"===typeof t.Ea&&(t.Ea=null);this.S=t.ve=!0}var w;B(X);m=0;for(e=p.Va.length;m<e;m++)X.push.apply(X,p.Va[m].$a);X.push.apply(X,p.$a);if(t.pc)for(m=0,e=X.length;m< e;m++){var Q=X[m];w=t.U[m];w.pc=!0;Q.behavior.K.call(w,Q,t);n=a[4][m];g=0;for(q=n.length;g<q;g++)w.n[g]=n[g];w.G();Q.behavior.Zo.add(t)}else for(t.U=[],m=0,e=X.length;m<e;m++)Q=X[m],w=new Q.behavior.K(Q,t),w.pc=!1,w.n=a[4][m].slice(0),w.G(),t.U.push(w),Q.behavior.Zo.add(t);n=a[5];if(t.pc)for(m=0,e=n.length;m<e;m++)t.n[m]=n[m];else t.n=n.slice(0);this.Ed.push(t);this.wf=!0;d&&(d.si(t,!0),1!==d.zc||1!==d.rd)&&(p.rk=!0);this.Tl++;if(p.hc){if(t.hc=!0,t.pc?B(t.siblings):t.siblings=[],!h&&!b){m=0;for(e= p.Ic.length;m<e;m++)if(p.Ic[m]!==p){if(!p.Ic[m].jd)return null;t.siblings.push(this.pf(p.Ic[m].jd,k,!1,f?t.x:c,f?t.y:l,!0))}m=0;for(e=t.siblings.length;m<e;m++)for(t.siblings[m].siblings.push(t),g=0;g<e;g++)m!==g&&t.siblings[m].siblings.push(t.siblings[g])}}else t.hc=!1,t.siblings=null;t.G();m=0;for(e=t.U.length;m<e;m++)t.U[m].kA&&t.U[m].kA();return t};f.prototype.Mi=function(a){var d,h;d=0;for(h=this.Ka.Z.length;d<h;d++){var c=this.Ka.Z[d];if(ob(c.name,a))return c}return null};f.prototype.vf=function(a){a= ta(a);0>a&&(a=0);a>=this.Ka.Z.length&&(a=this.Ka.Z.length-1);return this.Ka.Z[a]};f.prototype.ko=function(a){return ja(a)?this.vf(a):this.Mi(a.toString())};f.prototype.Kn=function(a){var d,h;d=0;for(h=a.length;d<h;d++)a[d].da().za=!0};f.prototype.Ij=function(a){var d,h;d=0;for(h=a.length;d<h;d++)a[d].Ij()};f.prototype.Eg=function(a){var d,h;d=0;for(h=a.length;d<h;d++)a[d].Eg()};f.prototype.je=function(a){var d,h;d=0;for(h=a.length;d<h;d++)a[d].je()};f.prototype.ru=function(a){if(a.qk){var d,h,c=a.e; d=0;for(h=c.length;d<h;++d)c[d].uu();c=this.Ed;d=0;for(h=c.length;d<h;++d)c[d].type===a&&c[d].uu();a.qk=!1}};f.prototype.Cr=function(a,d,h,c){var l,m,b=a?1!==a.zc||1!==a.rd:!1;if(d.J)for(a=0,l=d.Ag.length;a<l;++a)m=d.Ag[a],b||m.rk?Ea(c,m.e):(this.ru(m),m.Fk.qm(h,c));else b||d.rk?Ea(c,d.e):(this.ru(d),d.Fk.qm(h,c))};f.prototype.Kr=function(a,d,h,c){var l,m;l=0;for(m=d.length;l<m;++l)this.Cr(a,d[l],h,c)};f.prototype.bz=function(a,d,h){var c=this.du;c&&this.Kr(a,c.Ql,d,h)};f.prototype.Vy=function(a, d,h){var c=this.gs;c&&this.Kr(a,c.Ql,d,h)};f.prototype.Nm=function(a,d,h){var c=a.da(),l,m,b,e,g=this.sb().qb.od,q,t,p;if(c.za)for(c.za=!1,B(c.e),l=0,e=a.e.length;l<e;l++)b=a.e[l],b.ja(),q=b.j.Pb(d,h,!0),t=b.j.Pb(d,h,!1),b.lc(q,t)?c.e.push(b):g&&c.la.push(b);else{m=0;p=g?c.la:c.e;l=0;for(e=p.length;l<e;l++)b=p[l],b.ja(),q=b.j.Pb(d,h,!0),t=b.j.Pb(d,h,!1),b.lc(q,t)&&(g?c.e.push(b):(c.e[m]=c.e[l],m++));p.length=m}a.gd();return c.ro()};f.prototype.Fc=function(a,d){if(!(a&&d&&a!==d&&a.ve&&d.ve))return!1; a.ja();d.ja();var h=a.j,c=d.j,l,m,b,e,g,q,t,p;if(h===c||h.zc===c.zc&&c.rd===c.rd&&h.scale===c.scale&&h.k===c.k&&h.Rc===c.Rc){if(!a.Da.yz(d.Da)||!a.ac.Vr(d.ac)||a.bi&&d.bi)return!1;if(a.bi)return this.hu(a,d);if(d.bi)return this.hu(d,a);t=a.Ea&&!a.Ea.ph();l=d.Ea&&!d.Ea.ph();if(!t&&!l)return!0;t?(a.Ea.Vg(a.width,a.height,a.k),t=a.Ea):(this.Nd.Wh(a.ac,a.x,a.y,a.width,a.height),t=this.Nd);l?(d.Ea.Vg(d.width,d.height,d.k),p=d.Ea):(this.Nd.Wh(d.ac,d.x,d.y,d.width,d.height),p=this.Nd);return t.Vi(p,d.x- a.x,d.y-a.y)}t=a.Ea&&!a.Ea.ph();l=d.Ea&&!d.Ea.ph();t?(a.Ea.Vg(a.width,a.height,a.k),this.Nd.Wt(a.Ea)):this.Nd.Wh(a.ac,a.x,a.y,a.width,a.height);t=this.Nd;l?(d.Ea.Vg(d.width,d.height,d.k),this.Kp.Wt(d.Ea)):this.Kp.Wh(d.ac,d.x,d.y,d.width,d.height);p=this.Kp;l=0;for(m=t.Kd;l<m;l++)b=2*l,e=b+1,g=t.Jb[b],q=t.Jb[e],t.Jb[b]=h.La(g+a.x,q+a.y,!0),t.Jb[e]=h.La(g+a.x,q+a.y,!1);t.ja();l=0;for(m=p.Kd;l<m;l++)b=2*l,e=b+1,g=p.Jb[b],q=p.Jb[e],p.Jb[b]=c.La(g+d.x,q+d.y,!0),p.Jb[e]=c.La(g+d.x,q+d.y,!1);p.ja();return t.Vi(p, 0,0)};var I=new xa;new wa(0,0,0,0);var u=[];f.prototype.hu=function(a,d){var h,c,l,m,b=d.Da,e=a.x,g=a.y;a.BC(b,u);var q=d.Ea&&!d.Ea.ph();h=0;for(c=u.length;h<c;++h)if(l=u[h],m=l.RC,b.zz(m,e,g)&&(I.Oj(m),I.offset(e,g),I.Vr(d.ac)))if(q)if(d.Ea.Vg(d.width,d.height,d.k),l.op){if(l.op.Vi(d.Ea,d.x-(e+m.left),d.y-(g+m.top)))return B(u),!0}else{if(this.Nd.Wh(I,0,0,m.right-m.left,m.bottom-m.top),this.Nd.Vi(d.Ea,d.x,d.y))return B(u),!0}else if(l.op){if(this.Nd.Wh(d.ac,0,0,d.width,d.height),l.op.Vi(this.Nd, -(e+m.left),-(g+m.top)))return B(u),!0}else return B(u),!0;B(u);return!1};f.prototype.Qp=function(a,d){if(!d)return!1;var h,c,l,m,b;h=0;for(c=a.$a.length;h<c;h++)if(a.$a[h].behavior instanceof d)return!0;if(!a.J)for(h=0,c=a.Va.length;h<c;h++)for(b=a.Va[h],l=0,m=b.$a.length;l<m;l++)if(b.$a[l].behavior instanceof d)return!0;return!1};f.prototype.Rp=function(a){return this.Qp(a,lc.NB)};f.prototype.Sp=function(a){return this.Qp(a,lc.PB)};var M=[];f.prototype.kc=function(a){var d,h,c;a.ja();this.bz(a.j, a.Da,M);d=0;for(h=M.length;d<h;++d)if(c=M[d],c.H.solidEnabled&&this.Fc(a,c))return B(M),c;B(M);return null};var T=[];f.prototype.Se=function(a,d){var h=null;d&&(h=T,B(h));a.ja();this.Vy(a.j,a.Da,M);var c,l,m;c=0;for(l=M.length;c<l;++c)if(m=M[c],m.H.jumpthruEnabled&&this.Fc(a,m))if(d)h.push(m);else return B(M),m;B(M);return h};f.prototype.sd=function(a,d,h,c,l,m){c=c||50;var b=a.x,e=a.y,g,q=null,t=null;for(g=0;g<c;g++)if(a.x=b+d*g,a.y=e+h*g,a.A(),!this.Fc(a,q)&&((q=this.kc(a))&&(t=q),!q&&(l&&(m?q= this.Fc(a,m)?m:null:q=this.Se(a),q&&(t=q)),!q)))return t&&this.pm(a,d,h,t),!0;a.x=b;a.y=e;a.A();return!1};f.prototype.rp=function(a,d,h,c){c=c||50;var l=a.x,m=a.y,b=null,e=null,g,q,t;for(g=0;g<c;++g)for(q=0;2>q;++q)if(t=2*q-1,a.x=l+d*g*t,a.y=m+h*g*t,a.A(),!this.Fc(a,b))if(b=this.kc(a))e=b;else return e&&this.pm(a,d*t,h*t,e),!0;a.x=l;a.y=m;a.A();return!1};f.prototype.pm=function(a,d,h,c){var l=2,m,b=!1;m=!1;for(var e=a.x,g=a.y;16>=l;)m=1/l,l*=2,a.x+=d*m*(b?1:-1),a.y+=h*m*(b?1:-1),a.A(),this.Fc(a,c)? m=b=!0:(m=b=!1,e=a.x,g=a.y);m&&(a.x=e,a.y=g,a.A())};f.prototype.rA=function(a,d){var h=ia(d)?100:d,c=0,l=a.x,m=a.y,b=0,e=0,g=0,q=this.kc(a);if(!q)return!0;for(;c<=h;){switch(b){case 0:e=0;g=-1;c++;break;case 1:e=1;g=-1;break;case 2:e=1;g=0;break;case 3:g=e=1;break;case 4:e=0;g=1;break;case 5:e=-1;g=1;break;case 6:e=-1;g=0;break;case 7:g=e=-1}b=(b+1)%8;a.x=ta(l+e*c);a.y=ta(m+g*c);a.A();if(!this.Fc(a,q)&&(q=this.kc(a),!q))return!0}a.x=l;a.y=m;a.A();return!1};f.prototype.Lf=function(a,d){a.ve&&d.ve&& this.Fg.push([a,d])};f.prototype.Vw=function(a,d,h){var c,l,m;c=0;for(l=this.Fg.length;c<l;++c){m=this.Fg[c];if(m[0]===a)m=m[1];else if(m[1]===a)m=m[0];else continue;if(d.J){if(-1===d.Ag.indexOf(d))continue}else if(m.type!==d)continue;-1===h.indexOf(m)&&h.push(m)}};f.prototype.lx=function(a,d){var h,c,l;h=0;for(c=this.Fg.length;h<c;h++)if(l=this.Fg[h],l[0]===a&&l[1]===d||l[0]===d&&l[1]===a)return!0;return!1};var U=-1;f.prototype.trigger=function(a,d,h){if(!this.Ka)return!1;var c=this.Ka.hg;if(!c)return!1; var l=!1,m,b,e;U++;var g=c.Qn;b=0;for(e=g.length;b<e;++b)m=this.lu(a,d,g[b],h),l=l||m;m=this.lu(a,d,c,h);U--;return l||m};f.prototype.lu=function(a,d,h,c){var l=!1,m,b,e,g;if(d)for(e=this.Op(a,d,d.type.name,h,c),l=l||e,g=d.type.Va,m=0,b=g.length;m<b;++m)e=this.Op(a,d,g[m].name,h,c),l=l||e;else e=this.Op(a,d,"system",h,c),l=l||e;return l};f.prototype.Op=function(a,d,h,c,l){var m,b=!1,e=!1,e="undefined"!==typeof l,g=(e?c.sr:c.mu)[h];if(!g)return b;var q=null;c=0;for(m=g.length;c<m;++c)if(g[c].method== a){q=g[c].Fi;break}if(!q)return b;var t;e?t=q[l]:t=q;if(!t)return null;c=0;for(m=t.length;c<m;c++)a=t[c][0],l=t[c][1],e=this.Fy(d,h,a,l),b=b||e;return b};f.prototype.Fy=function(a,d,h,c){var l,m,b=!1;this.Pp++;var e=this.sb().qb;e&&this.Ij(e.Qf);var g=1<this.Pp;this.Ij(h.Qf);g&&this.qA();var q=this.om(h);q.qb=h;a&&(l=this.types[d].da(),l.za=!1,B(l.e),l.e[0]=a,this.types[d].gd());a=!0;if(h.parent){d=q.gu;for(l=h.parent;l;)d.push(l),l=l.parent;d.reverse();l=0;for(m=d.length;l<m;l++)if(!d[l].DA()){a= !1;break}}a&&(this.jg++,h.od?h.CA(c):h.xb(),b=b||q.tg);this.jm();g&&this.jA();this.je(h.Qf);e&&this.je(e.Qf);this.wf&&0===this.$c&&0===U&&!this.Eo&&this.Yb();this.Pp--;return b};f.prototype.ll=function(){var a=this.sb();return a.qb.Cb[a.Bb]};f.prototype.Ry=function(){var a=this.sb();return a.qb.fd[a.vc]};f.prototype.qA=function(){this.Ll++;this.Ll>=this.Uo.length&&this.Uo.push([])};f.prototype.jA=function(){this.Ll--};f.prototype.Dr=function(){return this.Uo[this.Ll]};f.prototype.om=function(a){this.Wk++; this.Wk>=this.Vn.length&&this.Vn.push(new Yb);var d=this.sb();d.reset(a);return d};f.prototype.jm=function(){this.Wk--};f.prototype.sb=function(){return this.Vn[this.Wk]};f.prototype.Ft=function(a){this.uj++;this.uj>=this.tj.length&&this.tj.push(aa({name:a,index:0,eb:!1}));var d=this.Er();d.name=a;d.index=0;d.eb=!1;return d};f.prototype.zt=function(){this.uj--};f.prototype.Er=function(){return this.tj[this.uj]};f.prototype.Gr=function(a,d){for(var h,c,l,m,b,e;d;){h=0;for(c=d.wd.length;h<c;h++)if(e= d.wd[h],e instanceof Zb&&ob(a,e.name))return e;d=d.parent}h=0;for(c=this.Be.length;h<c;h++)for(b=this.Be[h],l=0,m=b.sf.length;l<m;l++)if(e=b.sf[l],e instanceof Zb&&ob(a,e.name))return e;return null};f.prototype.Ir=function(a){var d,h;d=0;for(h=this.Hd.length;d<h;d++)if(this.Hd[d].ka===a)return this.Hd[d];return null};f.prototype.nl=function(a){var d,h;d=0;for(h=this.B.length;d<h;d++)if(this.B[d].ka===a)return this.B[d];return null};f.prototype.Sy=function(a){var d,h;d=0;for(h=this.Tg.length;d<h;d++)if(this.Tg[d].ka=== a)return this.Tg[d];return null};f.prototype.zx=function(a,d){this.Sj=[a,d];this.S=!0};f.prototype.qz=function(){var a=this,d=this.Cp,h=this.Ie,c=this.Gl,l=!1;this.au&&(l=!0,d="__c2_continuouspreview",this.au=!1);if(d.length){this.Yb();h=this.HA();if(b()&&!this.Zc)g(d,h,function(){ga("Saved state to IndexedDB storage ("+h.length+" bytes)");a.Ie=h;a.trigger(K.prototype.i.nn,null);a.Ie="";l&&p()},function(c){try{localStorage.setItem("__c2save_"+d,h),ga("Saved state to WebStorage ("+h.length+" bytes)"), a.Ie=h,a.trigger(K.prototype.i.nn,null),a.Ie="",l&&p()}catch(m){ga("Failed to save game state: "+c+"; "+m),a.trigger(K.prototype.i.uq,null)}});else try{localStorage.setItem("__c2save_"+d,h),ga("Saved state to WebStorage ("+h.length+" bytes)"),a.Ie=h,this.trigger(K.prototype.i.nn,null),a.Ie="",l&&p()}catch(m){ga("Error saving to WebStorage: "+m),a.trigger(K.prototype.i.uq,null)}this.Gl=this.Cp="";this.Hb=null}if(c.length){if(b()&&!this.Zc)r(c,function(d){d?(a.Hb=d,ga("Loaded state from IndexedDB storage ("+ a.Hb.length+" bytes)")):(a.Hb=localStorage.getItem("__c2save_"+c)||"",ga("Loaded state from WebStorage ("+a.Hb.length+" bytes)"));a.Vj=!1;a.Hb||(a.Hb=null,a.trigger(K.prototype.i.jk,null))},function(){a.Hb=localStorage.getItem("__c2save_"+c)||"";ga("Loaded state from WebStorage ("+a.Hb.length+" bytes)");a.Vj=!1;a.Hb||(a.Hb=null,a.trigger(K.prototype.i.jk,null))});else{try{this.Hb=localStorage.getItem("__c2save_"+c)||"",ga("Loaded state from WebStorage ("+this.Hb.length+" bytes)")}catch(e){this.Hb= null}this.Vj=!1;a.Hb||(a.Hb=null,a.trigger(K.prototype.i.jk,null))}this.Cp=this.Gl=""}null!==this.Hb&&(this.Yb(),this.Oz(this.Hb)?(this.Ie=this.Hb,this.trigger(K.prototype.i.Kv,null),this.Ie=""):a.trigger(K.prototype.i.jk,null),this.Hb=null)};f.prototype.HA=function(){var d,h,c,l,m,b,e,g={c2save:!0,version:1,rt:{time:this.Lb.X,walltime:this.Ye.X,timescale:this.ci,tickcount:this.Od,execcount:this.jg,next_uid:this.yj,running_layout:this.Ka.ka,start_time_offset:Date.now()-this.Jm},types:{},layouts:{}, events:{groups:{},cnds:{},acts:{},vars:{}}};d=0;for(h=this.B.length;d<h;d++)if(m=this.B[d],!m.J&&!this.Rp(m)){b={instances:[]};Xa(m.H)&&(b.ex=a(m.H));c=0;for(l=m.e.length;c<l;c++)b.instances.push(this.Bp(m.e[c]));g.types[m.ka.toString()]=b}d=0;for(h=this.Hd.length;d<h;d++)c=this.Hd[d],g.layouts[c.ka.toString()]=c.Xa();l=g.events.groups;d=0;for(h=this.Tg.length;d<h;d++)c=this.Tg[d],l[c.ka.toString()]=this.Ri[c.Qi].kh;h=g.events.cnds;for(e in this.nf)this.nf.hasOwnProperty(e)&&(d=this.nf[e],Xa(d.H)&& (h[e]={ex:a(d.H)}));h=g.events.acts;for(e in this.ff)this.ff.hasOwnProperty(e)&&(d=this.ff[e],Xa(d.H)&&(h[e]={ex:a(d.H)}));h=g.events.vars;for(e in this.gi)this.gi.hasOwnProperty(e)&&(d=this.gi[e],d.zl||d.parent&&!d.cj||(h[e]=d.data));g.system=this.me.Xa();return JSON.stringify(g)};f.prototype.Ht=function(){var a,d,h,c,l,m;this.Le={};a=0;for(d=this.B.length;a<d;a++)if(h=this.B[a],!h.J)for(c=0,l=h.e.length;c<l;c++)m=h.e[c],this.Le[m.uid.toString()]=m};f.prototype.Oz=function(a){var d;try{d=JSON.parse(a)}catch(h){return!1}if(!d.c2save|| 1<d.version)return!1;this.Yi=!0;a=d.rt;this.Lb.reset();this.Lb.X=a.time;this.Ye.reset();this.Ye.X=a.walltime||0;this.ci=a.timescale;this.Od=a.tickcount;this.jg=a.execcount;this.Jm=Date.now()-a.start_time_offset;var c=a.running_layout;if(c!==this.Ka.ka)if(c=this.Ir(c))this.kr(c);else return;var l,m,b,e,g,q,t;q=d.types;for(m in q)if(q.hasOwnProperty(m)&&(e=this.nl(parseInt(m,10)))&&!e.J&&!this.Rp(e)){q[m].ex?e.H=q[m].ex:Ya(e.H);g=e.e;b=q[m].instances;c=0;for(l=qa(g.length,b.length);c<l;c++)this.Hl(g[c], b[c]);c=b.length;for(l=g.length;c<l;c++)this.$e(g[c]);c=g.length;for(l=b.length;c<l;c++){g=null;if(e.fa.Af&&(g=this.Ka.ml(b[c].w.l),!g))continue;g=this.pf(e.jd,g,!1,0,0,!0);this.Hl(g,b[c])}e.Yh=!0}this.Yb();this.Ht();l=d.layouts;for(m in l)l.hasOwnProperty(m)&&(c=this.Ir(parseInt(m,10)))&&c.kb(l[m]);l=d.events.groups;for(m in l)l.hasOwnProperty(m)&&(c=this.Sy(parseInt(m,10)))&&this.Ri[c.Qi]&&this.Ri[c.Qi].NA(l[m]);c=d.events.cnds;for(m in this.nf)this.nf.hasOwnProperty(m)&&(c.hasOwnProperty(m)?this.nf[m].H= c[m].ex:this.nf[m].H={});c=d.events.acts;for(m in this.ff)this.ff.hasOwnProperty(m)&&(c.hasOwnProperty(m)?this.ff[m].H=c[m].ex:this.ff[m].H={});c=d.events.vars;for(m in c)c.hasOwnProperty(m)&&this.gi.hasOwnProperty(m)&&(this.gi[m].data=c[m]);this.yj=a.next_uid;this.Yi=!1;c=0;for(l=this.bl.length;c<l;++c)g=this.bl[c],this.trigger(Object.getPrototypeOf(g.type.fa).i.Pg,g);B(this.bl);this.me.kb(d.system);c=0;for(l=this.B.length;c<l;c++)if(e=this.B[c],!e.J&&!this.Rp(e))for(d=0,m=e.e.length;d<m;d++){g= e.e[d];if(e.hc)for(q=g.Pi(),B(g.siblings),a=0,b=e.Ic.length;a<b;a++)t=e.Ic[a],e!==t&&g.siblings.push(t.e[q]);g.zd&&g.zd();if(g.U)for(a=0,b=g.U.length;a<b;a++)q=g.U[a],q.zd&&q.zd()}return this.S=!0};f.prototype.Bp=function(d,h){var c,l,m,b,e;b=d.type;m=b.fa;var g={};h?g.c2=!0:g.uid=d.uid;Xa(d.H)&&(g.ex=a(d.H));if(d.Fb&&d.Fb.length)for(g.ivs={},c=0,l=d.Fb.length;c<l;c++)g.ivs[d.type.yo[c].toString()]=d.Fb[c];if(m.Af){m={x:d.x,y:d.y,w:d.width,h:d.height,l:d.j.ka,zi:d.$d()};0!==d.k&&(m.a=d.k);1!==d.opacity&& (m.o=d.opacity);.5!==d.mc&&(m.hX=d.mc);.5!==d.nc&&(m.hY=d.nc);0!==d.$b&&(m.bm=d.$b);d.visible||(m.v=d.visible);d.ve||(m.ce=d.ve);-1!==d.xj&&(m.mts=d.xj);if(b.W.length)for(m.fx=[],c=0,l=b.W.length;c<l;c++)e=b.W[c],m.fx.push({name:e.name,active:d.ef[e.index],params:d.ab[e.index]});g.w=m}if(d.U&&d.U.length)for(g.behs={},c=0,l=d.U.length;c<l;c++)b=d.U[c],b.Xa&&(g.behs[b.type.ka.toString()]=b.Xa());d.Xa&&(g.data=d.Xa());return g};f.prototype.Uy=function(a,d){var h,c;h=0;for(c=a.yo.length;h<c;h++)if(a.yo[h]=== d)return h;return-1};f.prototype.Qy=function(a,d){var h,c;h=0;for(c=a.U.length;h<c;h++)if(a.U[h].type.ka===d)return h;return-1};f.prototype.Hl=function(a,d,h){var c,l,m,b,e;e=a.type;var g=e.fa;if(h){if(!d.c2)return}else a.uid=d.uid;d.ex?a.H=d.ex:Ya(a.H);if(l=d.ivs)for(c in l)l.hasOwnProperty(c)&&(m=this.Uy(e,parseInt(c,10)),0>m||m>=a.Fb.length||(b=l[c],null===b&&(b=NaN),a.Fb[m]=b));if(g.Af){m=d.w;a.j.ka!==m.l&&(l=a.j,a.j=this.Ka.ml(m.l),a.j?(l.Sh(a,!0),a.j.si(a,!0),a.A(),a.j.Nj(0)):(a.j=l,h||this.$e(a))); a.x=m.x;a.y=m.y;a.width=m.w;a.height=m.h;a.Rd=m.zi;a.k=m.hasOwnProperty("a")?m.a:0;a.opacity=m.hasOwnProperty("o")?m.o:1;a.mc=m.hasOwnProperty("hX")?m.hX:.5;a.nc=m.hasOwnProperty("hY")?m.hY:.5;a.visible=m.hasOwnProperty("v")?m.v:!0;a.ve=m.hasOwnProperty("ce")?m.ce:!0;a.xj=m.hasOwnProperty("mts")?m.mts:-1;a.$b=m.hasOwnProperty("bm")?m.bm:0;a.xi=jb(a.$b);this.F&&kb(a,a.$b,this.F);a.A();if(m.hasOwnProperty("fx"))for(h=0,l=m.fx.length;h<l;h++)b=e.io(m.fx[h].name),0>b||(a.ef[b]=m.fx[h].active,a.ab[b]= m.fx[h].params);a.Qd()}if(e=d.behs)for(c in e)e.hasOwnProperty(c)&&(h=this.Qy(a,parseInt(c,10)),0>h||a.U[h].kb(e[c]));d.data&&a.kb(d.data)};f.prototype.tr=function(a,d,h){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+a,function(a){a.file(d,h)},h)};f.prototype.Gy=function(a,d){this.tr("data.js",function(h){var c=new FileReader;c.onload=function(d){a(d.target.result)};c.onerror=d;c.readAsText(h)},d)};var D=[],H=0;f.prototype.Wo=function(){if(D.length&&!(8<=H)){H++;var a= D.shift();this.Bx(a.filename,a.YA,a.$x)}};f.prototype.ur=function(a,d,h){var c=this;D.push({filename:a,YA:function(a){H--;c.Wo();d(a)},$x:function(a){H--;c.Wo();h(a)}});this.Wo()};f.prototype.Bx=function(a,d,h){this.tr(a,function(a){var h=new FileReader;h.onload=function(a){d(a.target.result)};h.readAsArrayBuffer(a)},h)};f.prototype.Hy=function(a,d,h){var c="",m=a.toLowerCase(),l=m.substr(m.length-4),m=m.substr(m.length-5);".mp4"===l?c="video/mp4":".webm"===m?c="video/webm":".m4a"===l?c="audio/mp4": ".mp3"===l&&(c="audio/mpeg");this.ur(a,function(a){a=URL.createObjectURL(new Blob([a],{type:c}));d(a)},h)};f.prototype.Az=function(a){return/^(?:[a-z]+:)?\/\//.test(a)||"data:"===a.substr(0,5)||"blob:"===a.substr(0,5)};f.prototype.Rt=function(a,d){this.xl&&!this.Az(d)?this.Hy(d,function(d){a.src=d},function(a){alert("Failed to load image: "+a)}):a.src=d};f.prototype.Bm=function(a,d){"undefined"!==typeof a.imageSmoothingEnabled?a.imageSmoothingEnabled=d:(a.webkitImageSmoothingEnabled=d,a.mozImageSmoothingEnabled= d,a.msImageSmoothingEnabled=d)};$b=function(a){return new f(document.getElementById(a))};ac=function(a,d){return new f({dc:!0,width:a,height:d})};window.cr_createRuntime=$b;window.cr_createDCRuntime=ac;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");a.te=!0;document.body.appendChild(a);a=new f(a);window.c2runtime=a;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth, window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a};window.createEjectaRuntime=function(){var a=new f(document.getElementById("canvas"));window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})();window.cr_getC2Runtime=function(){var f=document.getElementById("c2canvas");return f?f.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(f,k){var b=window.cr_getC2Runtime();b&&b.zx(f,k)}; window.cr_sizeCanvas=function(f,k){if(0!==f&&0!==k){var b=window.cr_getC2Runtime();b&&b.setSize(f,k)}};window.cr_setSuspended=function(f){var k=window.cr_getC2Runtime();k&&k.setSuspended(f)}; (function(){function f(a,c){this.b=a;this.hg=null;this.scrollX=this.b.mb/2;this.scrollY=this.b.lb/2;this.scale=1;this.k=0;this.fh=!0;this.name=c[0];this.eA=c[1];this.dA=c[2];this.width=c[1];this.height=c[2];this.ou=c[3];this.Zt=c[4];this.ka=c[5];var b=c[6],e,g;this.Z=[];this.Ui=[];e=0;for(g=b.length;e<g;e++){var p=new bc(this,b[e]);p.Zs=e;this.Z.push(p)}b=c[7];this.xf=[];e=0;for(g=b.length;e<g;e++){var p=b[e],f=this.b.B[p[1]];f.jd||(f.jd=p);this.xf.push(p);-1===this.Ui.indexOf(f)&&this.Ui.push(f)}this.W= [];this.ya=[];this.Pe=!0;this.ab=[];e=0;for(g=c[8].length;e<g;e++)this.W.push({id:c[8][e][0],name:c[8][e][1],zb:-1,Jd:!1,Zb:!0,index:e}),this.ab.push(c[8][e][2].slice(0));this.Qd();this.Kf=new wa(0,0,1,1);this.up=new wa(0,0,1,1);this.Jf={}}function k(a,c){return a.Rd-c.Rd}function b(a,c){this.Mb=a;this.b=a.b;this.e=[];this.scale=1;this.k=0;this.ze=!1;this.Ue=new wa(0,0,0,0);this.ku=new xa;this.Ia=this.xa=this.Ba=this.wa=0;this.Mg=!1;this.Ze=-1;this.Ln=0;this.name=c[0];this.index=c[1];this.ka=c[2]; this.visible=c[3];this.Cd=c[4];this.Pd=c[5];this.zc=c[6];this.rd=c[7];this.opacity=c[8];this.gl=c[9];this.ed=c[10];this.Rc=c[11];this.$b=c[12];this.Wx=c[13];this.xi="source-over";this.cc=this.jc=0;this.Xb=null;this.Je=n();this.Md=!0;this.Ch=new wa(0,0,-1,-1);this.Qb=new wa(0,0,-1,-1);this.ed&&(this.Xb=new ib(this.b.mb,this.b.lb));this.ke=!1;var b=c[14],e,g;this.eu=[];this.Yc=[];this.Bi=[];e=0;for(g=b.length;e<g;e++){var p=b[e],f=this.b.B[p[1]];f.jd||(f.jd=p,f.vx=this.index);this.Yc.push(p);-1===this.Mb.Ui.indexOf(f)&& this.Mb.Ui.push(f)}Da(this.eu,this.Yc);this.W=[];this.ya=[];this.Pe=!0;this.ab=[];e=0;for(g=c[15].length;e<g;e++)this.W.push({id:c[15][e][0],name:c[15][e][1],zb:-1,Jd:!1,Zb:!0,index:e}),this.ab.push(c[15][e][2].slice(0));this.Qd();this.Kf=new wa(0,0,1,1);this.up=new wa(0,0,1,1)}function n(){return a.length?a.pop():[]}function g(d){B(d);a.push(d)}f.prototype.GA=function(a){var c=a.type.ka.toString();this.Jf.hasOwnProperty(c)||(this.Jf[c]=[]);this.Jf[c].push(this.b.Bp(a))};f.prototype.Nr=function(){var a= this.Z[0];return!a.Pd&&1===a.opacity&&!a.gl&&a.visible};f.prototype.Qd=function(){B(this.ya);this.Pe=!0;var a,c,b;a=0;for(c=this.W.length;a<c;a++)b=this.W[a],b.Zb&&(this.ya.push(b),b.Jd||(this.Pe=!1))};f.prototype.ho=function(a){var c,b,e;c=0;for(b=this.W.length;c<b;c++)if(e=this.W[c],e.name===a)return e;return null};var r=[],p=!0;f.prototype.Ip=function(){this.Zt&&(this.hg=this.b.Wn[this.Zt],this.hg.Tp());this.b.Ka=this;this.width=this.eA;this.height=this.dA;this.scrollX=this.b.mb/2;this.scrollY= this.b.lb/2;var a,c,b,e,g,f,n;a=0;for(b=this.b.B.length;a<b;a++)if(c=this.b.B[a],!c.J)for(g=c.e,c=0,e=g.length;c<e;c++)if(f=g[c],f.j){var h=f.j.Zs;h>=this.Z.length&&(h=this.Z.length-1);f.j=this.Z[h];-1===f.j.e.indexOf(f)&&f.j.e.push(f);f.j.Mg=!0}if(!p)for(a=0,b=this.Z.length;a<b;++a)this.Z[a].e.sort(k);B(r);this.hx();a=0;for(b=this.Z.length;a<b;a++)f=this.Z[a],f.tx(),f.Zm();g=!1;if(!this.fh){for(n in this.Jf)if(this.Jf.hasOwnProperty(n)&&(c=this.b.nl(parseInt(n,10)))&&!c.J&&this.b.Sp(c)){e=this.Jf[n]; a=0;for(b=e.length;a<b;a++){f=null;if(c.fa.Af&&(f=this.ml(e[a].w.l),!f))continue;f=this.b.pf(c.jd,f,!1,0,0,!0);this.b.Hl(f,e[a]);g=!0;r.push(f)}B(e)}a=0;for(b=this.Z.length;a<b;a++)this.Z[a].e.sort(k),this.Z[a].Mg=!0}g&&(this.b.Yb(),this.b.Ht());for(a=0;a<r.length;a++)if(f=r[a],f.type.hc)for(b=f.Pi(),c=0,e=f.type.Ic.length;c<e;c++)n=f.type.Ic[c],f.type!==n&&(n.e.length>b?f.siblings.push(n.e[b]):n.jd&&(g=this.b.pf(n.jd,f.j,!0,f.x,f.y,!0),this.b.Yb(),n.Xm(),f.siblings.push(g),r.push(g)));a=0;for(b= this.xf.length;a<b;a++)f=this.xf[a],c=this.b.B[f[1]],c.hc||this.b.pf(this.xf[a],null,!0);this.b.Zf=null;this.b.Yb();if(this.b.Ra&&!this.b.Ja)for(a=0,b=this.b.B.length;a<b;a++)n=this.b.B[a],!n.J&&n.e.length&&n.mm&&n.mm(this.b.Ra);if(this.b.Yi)Da(this.b.bl,r);else for(a=0,b=r.length;a<b;a++)f=r[a],this.b.trigger(Object.getPrototypeOf(f.type.fa).i.Pg,f);B(r);this.b.Yi||this.b.trigger(K.prototype.i.qq,null);this.fh=!1};f.prototype.rx=function(){var a,c,b,e,g;c=a=0;for(b=this.xf.length;a<b;a++)e=this.xf[a], g=this.b.B[e[1]],g.global?g.hc||this.b.pf(e,null,!0):(this.xf[c]=e,c++);Aa(this.xf,c)};f.prototype.WA=function(){this.b.Yi||this.b.trigger(K.prototype.i.Jv,null);this.b.Bo=!0;B(this.b.me.Gc);var a,c,b,e,g,f;if(!this.fh)for(a=0,c=this.Z.length;a<c;a++)for(this.Z[a].Xp(),g=this.Z[a].e,b=0,e=g.length;b<e;b++)f=g[b],f.type.global||this.b.Sp(f.type)&&this.GA(f);a=0;for(c=this.Z.length;a<c;a++){g=this.Z[a].e;b=0;for(e=g.length;b<e;b++)f=g[b],f.type.global||this.b.$e(f);this.b.Yb();B(g);this.Z[a].Mg=!0}a= 0;for(c=this.b.B.length;a<c;a++)if(g=this.b.B[a],!(g.global||g.fa.Af||g.fa.Im||g.J)){b=0;for(e=g.e.length;b<e;b++)this.b.$e(g.e[b]);this.b.Yb()}p=!1;this.b.Bo=!1};new wa(0,0,0,0);f.prototype.Uc=function(a){var c,b=a,e=!1,g=!this.b.Wc;g&&(this.b.Fl||(this.b.Fl=document.createElement("canvas"),c=this.b.Fl,c.width=this.b.N,c.height=this.b.M,this.b.xs=c.getContext("2d"),e=!0),c=this.b.Fl,b=this.b.xs,c.width!==this.b.N&&(c.width=this.b.N,e=!0),c.height!==this.b.M&&(c.height=this.b.M,e=!0),e&&this.b.Bm(b, this.b.Na));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.b.Zq&&!this.Nr()&&b.clearRect(0,0,this.b.N,this.b.M);var f,p,e=0;for(f=this.Z.length;e<f;e++)p=this.Z[e],p.visible&&0<p.opacity&&11!==p.$b&&(p.e.length||!p.Pd)?p.Uc(b):p.Zm();g&&a.drawImage(c,0,0,this.b.width,this.b.height)};f.prototype.bg=function(a){a.Qt(!0);this.b.ub||(this.b.ub=a.Tc(this.b.N,this.b.M,this.b.Na));if(this.b.ub.Yf!==this.b.N||this.b.ub.Xf!==this.b.M)a.deleteTexture(this.b.ub),this.b.ub=a.Tc(this.b.N,this.b.M, this.b.Na);a.ud(this.b.ub);this.b.Wc||a.Ig(this.b.N,this.b.M);var c,b;for(c=this.Z.length-1;0<=c;--c)b=this.Z[c],b.visible&&1===b.opacity&&b.Pe&&0===b.$b&&(b.e.length||!b.Pd)?b.bg(a):b.Zm();a.Qt(!1)};f.prototype.ec=function(a){var c=0<this.ya.length||this.b.ei||!this.b.Wc||this.b.Ma;if(c){this.b.ub||(this.b.ub=a.Tc(this.b.N,this.b.M,this.b.Na));if(this.b.ub.Yf!==this.b.N||this.b.ub.Xf!==this.b.M)a.deleteTexture(this.b.ub),this.b.ub=a.Tc(this.b.N,this.b.M,this.b.Na);a.ud(this.b.ub);this.b.Wc||a.Ig(this.b.N, this.b.M)}else this.b.ub&&(a.ud(null),a.deleteTexture(this.b.ub),this.b.ub=null);this.b.Zq&&!this.Nr()&&a.clear(0,0,0,0);var b,e,g;b=0;for(e=this.Z.length;b<e;b++)g=this.Z[b],g.visible&&0<g.opacity&&(g.e.length||!g.Pd)?g.ec(a):g.Zm();c&&(0===this.ya.length||1===this.ya.length&&this.b.Wc?(1===this.ya.length?(c=this.ya[0].index,a.Ec(this.ya[0].zb),a.Vh(null,1/this.b.N,1/this.b.M,0,0,1,1,this.scale,this.k,0,0,this.b.N/2,this.b.M/2,this.b.Lb.X,this.ab[c]),a.nm(this.ya[0].zb)&&(this.b.S=!0)):a.Ec(0),this.b.Wc|| a.Ig(this.b.width,this.b.height),a.ud(null),a.Ot(!1),a.Pf(1),a.Dc(this.b.ub),a.Mt(),a.td(),a.dd(),c=this.b.width/2,b=this.b.height/2,a.Jj(-c,b,c,b,c,-b,-c,-b),a.Dc(null),a.Ot(!0)):this.wp(a,null,null,null))};f.prototype.Ni=function(){return 0<this.ya.length||this.b.ei||!this.b.Wc||this.b.Ma?this.b.ub:null};f.prototype.Jr=function(){var a=this.Z[0].xc(),c,b,e;c=1;for(b=this.Z.length;c<b;c++)e=this.Z[c],(0!==e.zc||0!==e.rd)&&e.xc()<a&&(a=e.xc());return a};f.prototype.Dp=function(a){if(!this.ou){var c= 1/this.Jr()*this.b.N/2;a>this.width-c&&(a=this.width-c);a<c&&(a=c)}this.scrollX!==a&&(this.scrollX=a,this.b.S=!0)};f.prototype.Lt=function(a){if(!this.ou){var c=1/this.Jr()*this.b.M/2;a>this.height-c&&(a=this.height-c);a<c&&(a=c)}this.scrollY!==a&&(this.scrollY=a,this.b.S=!0)};f.prototype.hx=function(){this.Dp(this.scrollX);this.Lt(this.scrollY)};f.prototype.wp=function(a,c,b,e){var g=b?b.ya:c?c.ya:this.ya,p=1,f=0,h=0,m=0,k=this.b.N,n=this.b.M;b?(p=b.j.xc(),f=b.j.Eb(),h=b.j.wa,m=b.j.xa,k=b.j.Ba,n= b.j.Ia):c&&(p=c.xc(),f=c.Eb(),h=c.wa,m=c.xa,k=c.Ba,n=c.Ia);var r=this.b.bo,G,A,y,z,R=0,X=1,I,u,M=this.b.N,T=this.b.M,U=M/2,D=T/2,H=c?c.Kf:this.Kf,x=c?c.up:this.up,J=0,N=0,v=0,P=0,O=M,ma=M,V=T,Ba=T,ba=y=0;z=b?b.j.Eb():0;if(b){G=0;for(A=g.length;G<A;G++)y+=a.Zy(g[G].zb),ba+=a.$y(g[G].zb);P=b.Da;J=c.La(P.left,P.top,!0,!0);v=c.La(P.left,P.top,!1,!0);O=c.La(P.right,P.bottom,!0,!0);V=c.La(P.right,P.bottom,!1,!0);0!==z&&(G=c.La(P.right,P.top,!0,!0),A=c.La(P.right,P.top,!1,!0),N=c.La(P.left,P.bottom,!0,!0), P=c.La(P.left,P.bottom,!1,!0),z=Math.min(J,O,G,N),O=Math.max(J,O,G,N),J=z,z=Math.min(v,V,A,P),V=Math.max(v,V,A,P),v=z);J-=y;v-=ba;O+=y;V+=ba;x.left=J/M;x.top=1-v/T;x.right=O/M;x.bottom=1-V/T;N=J=ta(J);P=v=ta(v);ma=O=ua(O);Ba=V=ua(V);N-=y;P-=ba;ma+=y;Ba+=ba;0>J&&(J=0);0>v&&(v=0);O>M&&(O=M);V>T&&(V=T);0>N&&(N=0);0>P&&(P=0);ma>M&&(ma=M);Ba>T&&(Ba=T);H.left=J/M;H.top=1-v/T;H.right=O/M;H.bottom=1-V/T}else H.left=x.left=0,H.top=x.top=0,H.right=x.right=1,H.bottom=x.bottom=1;ba=b&&(a.Gj(g[0].zb)||0!==y|| 0!==ba||1!==b.opacity||b.type.fa.Vs)||c&&!b&&1!==c.opacity;a.Mt();if(ba){r[R]||(r[R]=a.Tc(M,T,this.b.Na));if(r[R].Yf!==M||r[R].Xf!==T)a.deleteTexture(r[R]),r[R]=a.Tc(M,T,this.b.Na);a.Ec(0);a.ud(r[R]);u=Ba-P;a.clearRect(N,T-P-u,ma-N,u);b?b.ec(a):(a.Dc(this.b.Gb),a.Pf(c.opacity),a.td(),a.translate(-U,-D),a.dd(),a.Ld(J,V,O,V,O,v,J,v,H));x.left=x.top=0;x.right=x.bottom=1;b&&(z=H.top,H.top=H.bottom,H.bottom=z);R=1;X=0}a.Pf(1);y=g.length-1;var sa=a.qp(g[y].zb)||!c&&!b&&!this.b.Wc;G=z=0;for(A=g.length;G< A;G++){r[R]||(r[R]=a.Tc(M,T,this.b.Na));if(r[R].Yf!==M||r[R].Xf!==T)a.deleteTexture(r[R]),r[R]=a.Tc(M,T,this.b.Na);a.Ec(g[G].zb);z=g[G].index;a.nm(g[G].zb)&&(this.b.S=!0);0!=G||ba?(a.Vh(e,1/M,1/T,x.left,x.top,x.right,x.bottom,p,f,h,m,(h+k)/2,(m+n)/2,this.b.Lb.X,b?b.ab[z]:c?c.ab[z]:this.ab[z]),a.Dc(null),G!==y||sa?(a.ud(r[R]),u=Ba-P,I=T-P-u,a.clearRect(N,I,ma-N,u)):(b?a.Of(b.jc,b.cc):c&&a.Of(c.jc,c.cc),a.ud(e)),a.Dc(r[X]),a.td(),a.translate(-U,-D),a.dd(),a.Ld(J,V,O,V,O,v,J,v,H),G!==y||sa||a.Dc(null)): (a.ud(r[R]),u=Ba-P,I=T-P-u,a.clearRect(N,I,ma-N,u),b?(b.Sa&&b.Sa.L?(I=b.Sa.L,X=1/I.width,I=1/I.height):(X=1/b.width,I=1/b.height),a.Vh(e,X,I,x.left,x.top,x.right,x.bottom,p,f,h,m,(h+k)/2,(m+n)/2,this.b.Lb.X,b.ab[z]),b.ec(a)):(a.Vh(e,1/M,1/T,0,0,1,1,p,f,h,m,(h+k)/2,(m+n)/2,this.b.Lb.X,c?c.ab[z]:this.ab[z]),a.Dc(c?this.b.Gb:this.b.ub),a.td(),a.translate(-U,-D),a.dd(),a.Ld(J,V,O,V,O,v,J,v,H)),x.left=x.top=0,x.right=x.bottom=1,b&&!sa&&(z=V,V=v,v=z));R=0===R?1:0;X=0===R?1:0}sa&&(a.Ec(0),b?a.Of(b.jc,b.cc): c?a.Of(c.jc,c.cc):this.b.Wc||(a.Ig(this.b.width,this.b.height),U=this.b.width/2,D=this.b.height/2,v=J=0,O=this.b.width,V=this.b.height),a.ud(e),a.Dc(r[X]),a.td(),a.translate(-U,-D),a.dd(),b&&1===g.length&&!ba?a.Ld(J,v,O,v,O,V,J,V,H):a.Ld(J,V,O,V,O,v,J,v,H),a.Dc(null))};f.prototype.ml=function(a){var c,b;c=0;for(b=this.Z.length;c<b;c++)if(this.Z[c].ka===a)return this.Z[c];return null};f.prototype.Xa=function(){var a,c,b,e={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.k,w:this.width,h:this.height, fv:this.fh,persist:this.Jf,fx:[],layers:{}};a=0;for(c=this.W.length;a<c;a++)b=this.W[a],e.fx.push({name:b.name,active:b.Zb,params:this.ab[b.index]});a=0;for(c=this.Z.length;a<c;a++)b=this.Z[a],e.layers[b.ka.toString()]=b.Xa();return e};f.prototype.kb=function(a){var c,b,e,g;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.k=a.a;this.width=a.w;this.height=a.h;this.Jf=a.persist;"undefined"!==typeof a.fv&&(this.fh=a.fv);var p=a.fx;c=0;for(b=p.length;c<b;c++)if(e=this.ho(p[c].name))e.Zb=p[c].active, this.ab[e.index]=p[c].params;this.Qd();c=a.layers;for(g in c)c.hasOwnProperty(g)&&(a=this.ml(parseInt(g,10)))&&a.kb(c[g])};Kb=f;b.prototype.Qd=function(){B(this.ya);this.Pe=!0;var a,c,b;a=0;for(c=this.W.length;a<c;a++)b=this.W[a],b.Zb&&(this.ya.push(b),b.Jd||(this.Pe=!1))};b.prototype.ho=function(a){var c,b,e;c=0;for(b=this.W.length;c<b;c++)if(e=this.W[c],e.name===a)return e;return null};b.prototype.tx=function(){var a,c,b,e,g,p;c=a=0;for(b=this.Yc.length;a<b;a++){e=this.Yc[a];g=this.b.B[e[1]];p= this.b.Sp(g);g=!0;if(!p||this.Mb.fh){e=this.b.pf(e,this,!0);if(!e)continue;r.push(e);e.type.global&&(g=!1,this.Bi.push(e.uid))}g&&(this.Yc[c]=this.Yc[a],c++)}this.Yc.length=c;this.b.Yb();!this.b.u&&this.W.length&&(this.$b=this.Wx);this.xi=jb(this.$b);this.b.F&&kb(this,this.$b,this.b.F);this.Md=!0};b.prototype.Sh=function(a,c){var b=Fa(this.e,a);0>b||(c&&this.ed&&a.Ac&&a.Ac.right>=a.Ac.left&&(a.ja(),this.Xb.update(a,a.Ac,null),a.Ac.set(0,0,-1,-1)),b===this.e.length-1?this.e.pop():(za(this.e,b),this.Nj(b)), this.Md=!0)};b.prototype.si=function(a,c){a.Rd=this.e.length;this.e.push(a);c&&this.ed&&a.Ac&&a.A();this.Md=!0};b.prototype.nA=function(a){this.e.unshift(a);this.Nj(0)};b.prototype.Uz=function(a,c,b){var e=a.$d();c=c.$d();za(this.e,e);e<c&&c--;b&&c++;c===this.e.length?this.e.push(a):this.e.splice(c,0,a);this.Nj(e<c?e:c)};b.prototype.Nj=function(a){-1===this.Ze?this.Ze=a:a<this.Ze&&(this.Ze=a);this.Md=this.Mg=!0};b.prototype.Xp=function(){if(this.Mg){-1===this.Ze&&(this.Ze=0);var a,c,b;if(this.ed)for(a= this.Ze,c=this.e.length;a<c;++a)b=this.e[a],b.Rd=a,this.Xb.Rz(b.Ac);else for(a=this.Ze,c=this.e.length;a<c;++a)this.e[a].Rd=a;this.Mg=!1;this.Ze=-1}};b.prototype.xc=function(a){return this.Wy()*(this.b.Wc||a?this.b.ti:1)};b.prototype.Wy=function(){return(this.scale*this.Mb.scale-1)*this.Rc+1};b.prototype.Eb=function(){return this.ze?0:Ka(this.Mb.k+this.k)};var a=[],c=[],e=[];b.prototype.no=function(){this.Xp();this.Xb.qm(this.wa,this.xa,this.Ba,this.Ia,e);if(!e.length)return n();if(1===e.length){var a= n();Da(a,e[0]);B(e);return a}for(var b=!0;1<e.length;){for(var a=e,p=void 0,q=void 0,f=void 0,k=void 0,r=void 0,p=0,q=a.length;p<q-1;p+=2){var f=a[p],k=a[p+1],r=n(),h=f,m=k,Q=r,S=0,E=0,G=0,A=h.length,y=m.length,z=void 0,R=void 0;for(Q.length=A+y;S<A&&E<y;++G)z=h[S],R=m[E],z.Rd<R.Rd?(Q[G]=z,++S):(Q[G]=R,++E);for(;S<A;++S,++G)Q[G]=h[S];for(;E<y;++E,++G)Q[G]=m[E];b||(g(f),g(k));c.push(r)}1===q%2&&(b?(f=n(),Da(f,a[q-1]),c.push(f)):c.push(a[q-1]));Da(a,c);B(c);b=!1}a=e[0];B(e);return a};b.prototype.Uc= function(a){this.ke=this.gl||1!==this.opacity||0!==this.$b;var c=this.b.canvas,b=a,e=!1;this.ke&&(this.b.El||(this.b.El=document.createElement("canvas"),c=this.b.El,c.width=this.b.N,c.height=this.b.M,this.b.ws=c.getContext("2d"),e=!0),c=this.b.El,b=this.b.ws,c.width!==this.b.N&&(c.width=this.b.N,e=!0),c.height!==this.b.M&&(c.height=this.b.M,e=!0),e&&this.b.Bm(b,this.b.Na),this.Pd&&b.clearRect(0,0,this.b.N,this.b.M));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.Pd||(b.fillStyle="rgb("+ this.Cd[0]+","+this.Cd[1]+","+this.Cd[2]+")",b.fillRect(0,0,this.b.N,this.b.M));b.save();this.ze=!0;var e=this.Pb(0,0,!0,!0),p=this.Pb(0,0,!1,!0);this.ze=!1;this.b.bd&&(e=Math.round(e),p=Math.round(p));this.wm(e,p,b);var f=this.xc();b.scale(f,f);b.translate(-e,-p);this.ed?(this.Qb.left=this.Xb.tc(this.wa),this.Qb.top=this.Xb.uc(this.xa),this.Qb.right=this.Xb.tc(this.Ba),this.Qb.bottom=this.Xb.uc(this.Ia),this.Md||!this.Qb.Ei(this.Ch)?(g(this.Je),e=this.no(),this.Md=!1,this.Ch.yi(this.Qb)):e=this.Je): e=this.e;for(var k,h=null,p=0,f=e.length;p<f;++p)k=e[p],k!==h&&(this.Rx(k,b),h=k);this.ed&&(this.Je=e);b.restore();this.ke&&(a.globalCompositeOperation=this.xi,a.globalAlpha=this.opacity,a.drawImage(c,0,0))};b.prototype.Rx=function(a,c){if(a.visible&&0!==a.width&&0!==a.height){a.ja();var b=a.Da;b.right<this.wa||b.bottom<this.xa||b.left>this.Ba||b.top>this.Ia||(c.globalCompositeOperation=a.xi,a.Uc(c))}};b.prototype.Zm=function(){this.ze=!0;var a=this.Pb(0,0,!0,!0),c=this.Pb(0,0,!1,!0);this.ze=!1;this.b.bd&& (a=Math.round(a),c=Math.round(c));this.wm(a,c,null)};b.prototype.wm=function(a,c,b){var e=this.xc();this.wa=a;this.xa=c;this.Ba=a+1/e*this.b.N;this.Ia=c+1/e*this.b.M;this.wa>this.Ba&&(a=this.wa,this.wa=this.Ba,this.Ba=a);this.xa>this.Ia&&(a=this.xa,this.xa=this.Ia,this.Ia=a);a=this.Eb();0!==a&&(b&&(b.translate(this.b.N/2,this.b.M/2),b.rotate(-a),b.translate(this.b.N/-2,this.b.M/-2)),this.Ue.set(this.wa,this.xa,this.Ba,this.Ia),this.Ue.offset((this.wa+this.Ba)/-2,(this.xa+this.Ia)/-2),this.ku.Xt(this.Ue, a),this.ku.Sq(this.Ue),this.Ue.offset((this.wa+this.Ba)/2,(this.xa+this.Ia)/2),this.wa=this.Ue.left,this.xa=this.Ue.top,this.Ba=this.Ue.right,this.Ia=this.Ue.bottom)};b.prototype.bg=function(a){if(this.ke=this.gl){this.b.Gb||(this.b.Gb=a.Tc(this.b.N,this.b.M,this.b.Na));if(this.b.Gb.Yf!==this.b.N||this.b.Gb.Xf!==this.b.M)a.deleteTexture(this.b.Gb),this.b.Gb=a.Tc(this.b.N,this.b.M,this.b.Na);a.ud(this.b.Gb)}this.ze=!0;var c=this.Pb(0,0,!0,!0),b=this.Pb(0,0,!1,!0);this.ze=!1;this.b.bd&&(c=Math.round(c), b=Math.round(b));this.wm(c,b,null);c=this.xc();a.td();a.scale(c,c);a.xm(-this.Eb());a.translate((this.wa+this.Ba)/-2,(this.xa+this.Ia)/-2);a.dd();this.ed?(this.Qb.left=this.Xb.tc(this.wa),this.Qb.top=this.Xb.uc(this.xa),this.Qb.right=this.Xb.tc(this.Ba),this.Qb.bottom=this.Xb.uc(this.Ia),this.Md||!this.Qb.Ei(this.Ch)?(g(this.Je),c=this.no(),this.Md=!1,this.Ch.yi(this.Qb)):c=this.Je):c=this.e;for(var e,p=null,b=c.length-1;0<=b;--b)e=c[b],e!==p&&(this.Tx(c[b],a),p=e);this.ed&&(this.Je=c);this.Pd||(this.Ln= this.b.eg++,a.Cm(this.Ln),a.Nt(1,1,1),a.Ar(),a.xA())};b.prototype.ec=function(a){var c=0,b=0;if(this.ke=this.gl||1!==this.opacity||0<this.ya.length||0!==this.$b){this.b.Gb||(this.b.Gb=a.Tc(this.b.N,this.b.M,this.b.Na));if(this.b.Gb.Yf!==this.b.N||this.b.Gb.Xf!==this.b.M)a.deleteTexture(this.b.Gb),this.b.Gb=a.Tc(this.b.N,this.b.M,this.b.Na);a.ud(this.b.Gb);this.Pd&&a.clear(0,0,0,0)}this.Pd||(this.b.Ma?(a.Cm(this.Ln),a.Nt(this.Cd[0]/255,this.Cd[1]/255,this.Cd[2]/255),a.Ar(),a.SA()):a.clear(this.Cd[0]/ 255,this.Cd[1]/255,this.Cd[2]/255,1));this.ze=!0;var e=this.Pb(0,0,!0,!0),c=this.Pb(0,0,!1,!0);this.ze=!1;this.b.bd&&(e=Math.round(e),c=Math.round(c));this.wm(e,c,null);e=this.xc();a.td();a.scale(e,e);a.xm(-this.Eb());a.translate((this.wa+this.Ba)/-2,(this.xa+this.Ia)/-2);a.dd();this.ed?(this.Qb.left=this.Xb.tc(this.wa),this.Qb.top=this.Xb.uc(this.xa),this.Qb.right=this.Xb.tc(this.Ba),this.Qb.bottom=this.Xb.uc(this.Ia),this.Md||!this.Qb.Ei(this.Ch)?(g(this.Je),c=this.no(),this.Md=!1,this.Ch.yi(this.Qb)): c=this.Je):c=this.e;var p,f,k=null,b=0;for(p=c.length;b<p;++b)f=c[b],f!==k&&(this.Sx(c[b],a),k=f);this.ed&&(this.Je=c);this.ke&&(c=this.ya.length?this.ya[0].zb:0,b=this.ya.length?this.ya[0].index:0,0===this.ya.length||1===this.ya.length&&!a.qp(c)&&1===this.opacity?(1===this.ya.length?(a.Ec(c),a.Vh(this.Mb.Ni(),1/this.b.N,1/this.b.M,0,0,1,1,e,this.Eb(),this.wa,this.xa,(this.wa+this.Ba)/2,(this.xa+this.Ia)/2,this.b.Lb.X,this.ab[b]),a.nm(c)&&(this.b.S=!0)):a.Ec(0),a.ud(this.Mb.Ni()),a.Pf(this.opacity), a.Dc(this.b.Gb),a.Of(this.jc,this.cc),a.td(),a.dd(),e=this.b.N/2,c=this.b.M/2,a.Jj(-e,c,e,c,e,-c,-e,-c),a.Dc(null)):this.Mb.wp(a,this,null,this.Mb.Ni()))};b.prototype.Sx=function(a,c){if(a.visible&&0!==a.width&&0!==a.height){a.ja();var b=a.Da;b.right<this.wa||b.bottom<this.xa||b.left>this.Ba||b.top>this.Ia||(c.Cm(a.eg),a.vu?this.Ux(a,c):(c.Ec(0),c.Of(a.jc,a.cc),a.ec(c)))}};b.prototype.Tx=function(a,c){if(a.visible&&0!==a.width&&0!==a.height){a.ja();var b=a.Da;b.right<this.wa||b.bottom<this.xa||b.left> this.Ba||b.top>this.Ia||(a.eg=this.b.eg++,0===a.$b&&1===a.opacity&&a.Pe&&a.bg&&(c.Cm(a.eg),a.bg(c)))}};b.prototype.Ux=function(a,c){var b=a.ya[0].zb,e=a.ya[0].index,g=this.xc();if(1!==a.ya.length||c.qp(b)||c.pA(b)||(a.k||a.j.Eb())&&c.Gj(b)||1!==a.opacity||a.type.fa.Vs)this.Mb.wp(c,this,a,this.ke?this.b.Gb:this.Mb.Ni()),c.td(),c.scale(g,g),c.xm(-this.Eb()),c.translate((this.wa+this.Ba)/-2,(this.xa+this.Ia)/-2),c.dd();else{c.Ec(b);c.Of(a.jc,a.cc);c.nm(b)&&(this.b.S=!0);var p=0,f=0,h=0,m=0;c.Gj(b)&& (m=a.Da,p=this.La(m.left,m.top,!0,!0),f=this.La(m.left,m.top,!1,!0),h=this.La(m.right,m.bottom,!0,!0),m=this.La(m.right,m.bottom,!1,!0),p=p/windowWidth,f=1-f/windowHeight,h=h/windowWidth,m=1-m/windowHeight);var k;a.Sa&&a.Sa.L?(k=a.Sa.L,b=1/k.width,k=1/k.height):(b=1/a.width,k=1/a.height);c.Vh(this.ke?this.b.Gb:this.Mb.Ni(),b,k,p,f,h,m,g,this.Eb(),this.wa,this.xa,(this.wa+this.Ba)/2,(this.xa+this.Ia)/2,this.b.Lb.X,a.ab[e]);a.ec(c)}};b.prototype.Pb=function(a,c,b,e){var g=this.b.devicePixelRatio;this.b.rg&& (a*=g,c*=g);var g=this.b.tt,p=this.b.ut,g=(this.Mb.scrollX-g)*this.zc+g,p=(this.Mb.scrollY-p)*this.rd+p,f=g,h=p,m=1/this.xc(!e);e?(f-=this.b.N*m/2,h-=this.b.M*m/2):(f-=this.b.width*m/2,h-=this.b.height*m/2);f+=a*m;h+=c*m;c=this.Eb();0!==c&&(f-=g,h-=p,a=Math.cos(c),c=Math.sin(c),e=f*a-h*c,h=h*a+f*c,f=e+g,h+=p);return b?f:h};b.prototype.La=function(a,c,b,e){var g=this.b.tt,p=this.b.ut,f=(this.Mb.scrollX-g)*this.zc+g,h=(this.Mb.scrollY-p)*this.rd+p,p=f,g=h,m=this.Eb();if(0!==m){a-=f;c-=h;var k=Math.cos(-m), m=Math.sin(-m),n=a*k-c*m;c=c*k+a*m;a=n+f;c+=h}f=1/this.xc(!e);e?(p-=this.b.N*f/2,g-=this.b.M*f/2):(p-=this.b.width*f/2,g-=this.b.height*f/2);p=(a-p)/f;g=(c-g)/f;a=this.b.devicePixelRatio;this.b.rg&&!e&&(p/=a,g/=a);return b?p:g};b.prototype.Xa=function(){var a,c,b,e={s:this.scale,a:this.k,vl:this.wa,vt:this.xa,vr:this.Ba,vb:this.Ia,v:this.visible,bc:this.Cd,t:this.Pd,px:this.zc,py:this.rd,o:this.opacity,zr:this.Rc,fx:[],cg:this.Bi,instances:[]};a=0;for(c=this.W.length;a<c;a++)b=this.W[a],e.fx.push({name:b.name, active:b.Zb,params:this.ab[b.index]});return e};b.prototype.kb=function(a){var c,b,e;this.scale=a.s;this.k=a.a;this.wa=a.vl;this.xa=a.vt;this.Ba=a.vr;this.Ia=a.vb;this.visible=a.v;this.Cd=a.bc;this.Pd=a.t;this.zc=a.px;this.rd=a.py;this.opacity=a.o;this.Rc=a.zr;this.Bi=a.cg||[];Da(this.Yc,this.eu);var g=new da;c=0;for(e=this.Bi.length;c<e;++c)g.add(this.Bi[c]);b=c=0;for(e=this.Yc.length;c<e;++c)g.contains(this.Yc[c][2])||(this.Yc[b]=this.Yc[c],++b);Aa(this.Yc,b);b=a.fx;c=0;for(e=b.length;c<e;c++)if(a= this.ho(b[c].name))a.Zb=b[c].active,this.ab[a.index]=b[c].params;this.Qd();this.e.sort(k);this.Mg=!0};bc=b})(); (function(){function f(a,c){var d,b=a.length;switch(b){case 0:return!0;case 1:return a[0]===c[0];case 2:return a[0]===c[0]&&a[1]===c[1];default:for(d=0;d<b;d++)if(a[d]!==c[d])return!1;return!0}}function k(a,c){return a.index-c.index}function b(a){var c,d,b,e;2===a.length?a[0].index>a[1].index&&(c=a[0],a[0]=a[1],a[1]=c):2<a.length&&a.sort(k);a.length>=L.length&&(L.length=a.length+1);L[a.length]||(L[a.length]=[]);e=L[a.length];c=0;for(d=e.length;c<d;c++)if(b=e[c],f(a,b))return b;e.push(a);return a} function n(a,c){this.b=a;this.mu={};this.sr={};this.so=!1;this.Qr=new da;this.Qn=[];this.Bn=[];this.name=c[0];var d=c[1];this.sf=[];var b,e;b=0;for(e=d.length;b<e;b++)this.Sr(d[b],null,this.sf)}function g(a){this.type=a;this.e=[];this.la=[];this.za=!0}function r(a,c,d){this.sheet=a;this.parent=c;this.b=a.b;this.na=[];this.Qf=[];this.Or=this.Tm=this.Np=this.wo=this.group=this.Hp=!1;this.Cb=[];this.fd=[];this.wd=[];this.Qi="";this.kh=this.wo=this.group=!1;this.Gk=null;d[1]&&(this.Qi=d[1][1].toLowerCase(), this.group=!0,this.wo=!!d[1][0],this.Gk=[],this.kh=this.wo,this.b.Tg.push(this),this.b.Ri[this.Qi]=this);this.od=d[2];this.ka=d[4];this.group||(this.b.Rq[this.ka.toString()]=this);var b=d[5];a=0;for(c=b.length;a<c;a++){var e=new cc(this,b[a]);e.index=a;this.Cb.push(e);this.Iq(e.type)}b=d[6];a=0;for(c=b.length;a<c;a++)e=new dc(this,b[a]),e.index=a,this.fd.push(e);if(8===d.length)for(d=d[7],a=0,c=d.length;a<c;a++)this.sheet.Sr(d[a],this,this.wd);this.Al=!1;this.Cb.length&&(this.Al=null==this.Cb[0].type&& this.Cb[0].Rb==K.prototype.i.jq)}function p(a,c){var d,b,e;if(a&&(-1===c.indexOf(a)&&c.push(a),a.hc))for(d=0,b=a.Ic.length;d<b;d++)e=a.Ic[d],a!==e&&-1===c.indexOf(e)&&c.push(e)}function a(a,c){this.Sc=a;this.sheet=a.sheet;this.b=a.b;this.ba=[];this.bb=[];this.H={};this.index=-1;this.qi=!1;this.Rb=this.b.bf(c[1]);this.trigger=0<c[3];this.rr=2===c[3];this.ee=c[4];this.zo=c[5];this.Lz=c[6];this.ka=c[7];this.b.nf[this.ka.toString()]=this;-1===c[0]?(this.type=null,this.xb=this.Ap,this.Wf=null,this.Dd= -1):(this.type=this.b.B[c[0]],this.xb=this.Lz?this.EA:this.zp,c[2]?(this.Wf=this.type.kl(c[2]),this.Dd=this.type.eo(c[2])):(this.Wf=null,this.Dd=-1),this.Sc.parent&&this.Sc.parent.Em());this.rr&&(this.xb=this.FA);if(10===c.length){var d,b,e=c[9];d=0;for(b=e.length;d<b;d++){var g=new ec(this,e[d]);this.ba.push(g)}this.bb.length=e.length}}function c(a,c){this.Sc=a;this.sheet=a.sheet;this.b=a.b;this.ba=[];this.bb=[];this.H={};this.index=-1;this.qi=!1;this.Rb=this.b.bf(c[1]);-1===c[0]?(this.type=null, this.xb=this.Ap,this.Wf=null,this.Dd=-1):(this.type=this.b.B[c[0]],this.xb=this.zp,c[2]?(this.Wf=this.type.kl(c[2]),this.Dd=this.type.eo(c[2])):(this.Wf=null,this.Dd=-1));this.ka=c[3];this.b.ff[this.ka.toString()]=this;if(6===c.length){var d,b,e=c[5];d=0;for(b=e.length;d<b;d++){var g=new ec(this,e[d]);this.ba.push(g)}this.bb.length=e.length}}function e(){w++;C.length===w&&C.push(new fc);return C[w]}function d(a,c){this.qd=a;this.Sc=a.Sc;this.sheet=a.sheet;this.b=a.b;this.type=c[0];this.Xd=null;this.Qe= 0;this.get=null;this.$q=0;this.Mb=null;this.key=0;this.object=null;this.index=0;this.bk=this.Kg=this.bk=this.Kg=this.xr=this.ig=this.ck=null;this.yd=!1;var d,b,e;switch(c[0]){case 0:case 7:this.Xd=new gc(this,c[1]);this.Qe=0;this.get=this.fz;break;case 1:this.Xd=new gc(this,c[1]);this.Qe=0;this.get=this.gz;break;case 5:this.Xd=new gc(this,c[1]);this.Qe=0;this.get=this.kz;break;case 3:case 8:this.$q=c[1];this.get=this.dz;break;case 6:this.Mb=this.b.Dh[c[1]];this.get=this.lz;break;case 9:this.key=c[1]; this.get=this.jz;break;case 4:this.object=this.b.B[c[1]];this.get=this.mz;this.Sc.Iq(this.object);this.qd instanceof dc?this.Sc.Em():this.Sc.parent&&this.Sc.parent.Em();break;case 10:this.index=c[1];a.type&&a.type.J?(this.get=this.hz,this.yd=!0):this.get=this.iz;break;case 11:this.ck=c[1];this.ig=null;this.get=this.ez;break;case 2:case 12:this.xr=c[1];this.get=this.cz;break;case 13:for(this.get=this.nz,this.Kg=[],this.bk=[],d=1,b=c.length;d<b;d++)e=new ec(this.qd,c[d]),this.Kg.push(e),this.bk.push(0)}} function l(a,c,d){this.sheet=a;this.parent=c;this.b=a.b;this.na=[];this.name=d[1];this.an=d[2];this.vo=d[3];this.cj=!!d[4];this.zl=!!d[5];this.ka=d[6];this.b.gi[this.ka.toString()]=this;this.data=this.vo;this.parent?(this.zg=this.cj||this.zl?-1:this.b.UA++,this.b.Xw.push(this)):(this.zg=-1,this.b.Ww.push(this))}function t(a,c,d){this.sheet=a;this.parent=c;this.b=a.b;this.na=[];this.Ti=null;this.uz=d[1];this.Zb=!0}function q(){this.gu=[];this.reset(null)}var L=[];n.prototype.toString=function(){return this.name}; n.prototype.Sr=function(a,c,d){switch(a[0]){case 0:a=new hc(this,c,a);if(a.od)for(d.push(a),d=0,c=a.Cb.length;d<c;d++)a.Cb[d].trigger&&this.Tr(a,d);else a.cs()?this.Tr(a,0):d.push(a);break;case 1:a=new Zb(this,c,a);d.push(a);break;case 2:a=new ic(this,c,a),d.push(a)}};n.prototype.nb=function(){var a,c;a=0;for(c=this.sf.length;a<c;a++)this.sf[a].nb(a<c-1&&this.sf[a+1].Al)};n.prototype.Tp=function(){B(this.Qn);B(this.Bn);this.Hq(this);B(this.Bn)};n.prototype.Hq=function(a){var c,d,b,e,g=a.Qn,l=a.Bn, p=this.Qr.Sf();c=0;for(d=p.length;c<d;++c)b=p[c],e=b.Ti,!b.Zb||a===e||-1<l.indexOf(e)||(l.push(e),e.Hq(a),g.push(e))};n.prototype.xb=function(a){this.b.SC||(this.so=!0,a||(this.b.Eo=!0));var c,d;c=0;for(d=this.sf.length;c<d;c++){var b=this.sf[c];b.xb();this.b.Kn(b.na);this.b.wf&&this.b.Yb()}a||(this.b.Eo=!1)};n.prototype.Tr=function(a,c){a.od||this.b.Vm.push(a);var d,b,e=a.Cb[c],g;e.type?g=e.type.name:g="system";var l=(d=e.rr)?this.sr:this.mu;l[g]||(l[g]=[]);g=l[g];l=e.Rb;if(d){if(e.ba.length&&(e= e.ba[0],1===e.type&&2===e.Xd.type)){e=e.Xd.value.toLowerCase();d=0;for(b=g.length;d<b;d++)if(g[d].method==l){d=g[d].Fi;d[e]?d[e].push([a,c]):d[e]=[[a,c]];return}d={};d[e]=[[a,c]];g.push({method:l,Fi:d})}}else{d=0;for(b=g.length;d<b;d++)if(g[d].method==l){g[d].Fi.push([a,c]);return}W&&l===W.prototype.i.Qg?g.unshift({method:l,Fi:[[a,c]]}):g.push({method:l,Fi:[[a,c]]})}};Lb=n;g.prototype.ro=function(){return this.za?this.type.e.length:this.e.length};g.prototype.Jc=function(){return this.za?this.type.e: this.e};g.prototype.Qh=function(a){a&&(a.b.sb().qb.od?(this.za&&(B(this.e),Da(this.la,a.type.e),this.za=!1),a=this.la.indexOf(a),-1!==a&&(this.e.push(this.la[a]),this.la.splice(a,1))):(this.za=!1,B(this.e),this.e[0]=a))};sb=g;window._c2hh_="01C5C0EE1A9BF0A1A0FFE8B1B00CBCF7767AE4E3";r.prototype.nb=function(a){var c,d=this.parent;if(this.group)for(this.Tm=!0;d;){if(!d.group){this.Tm=!1;break}d=d.parent}this.Np=!this.cs()&&(!this.parent||this.parent.group&&this.parent.Tm);this.Or=!!a;this.Qf=this.na.slice(0); for(d=this.parent;d;){a=0;for(c=d.na.length;a<c;a++)this.Uw(d.na[a]);d=d.parent}this.na=b(this.na);this.Qf=b(this.Qf);a=0;for(c=this.Cb.length;a<c;a++)this.Cb[a].nb();a=0;for(c=this.fd.length;a<c;a++)this.fd[a].nb();a=0;for(c=this.wd.length;a<c;a++)this.wd[a].nb(a<c-1&&this.wd[a+1].Al)};r.prototype.NA=function(a){if(this.kh!==!!a){this.kh=!!a;var c;a=0;for(c=this.Gk.length;a<c;++a)this.Gk[a].qu();0<c&&this.b.Ka.hg&&this.b.Ka.hg.Tp()}};r.prototype.Iq=function(a){p(a,this.na)};r.prototype.Uw=function(a){p(a, this.Qf)};r.prototype.Em=function(){this.Hp=!0;this.parent&&this.parent.Em()};r.prototype.cs=function(){return this.Cb.length?this.Cb[0].trigger:!1};r.prototype.xb=function(){var a,c,d=!1,b=this.b,e=this.b.sb();e.qb=this;var g=this.Cb;this.Al||(e.Tn=!1);if(this.od){0===g.length&&(d=!0);e.Bb=0;for(a=g.length;e.Bb<a;e.Bb++)c=g[e.Bb],c.trigger||(c=c.xb())&&(d=!0);(e.tg=d)&&this.ym()}else{e.Bb=0;for(a=g.length;e.Bb<a;e.Bb++)if(c=g[e.Bb].xb(),!c){e.tg=!1;this.Np&&b.wf&&b.Yb();return}e.tg=!0;this.ym()}this.Yx(e)}; r.prototype.Yx=function(a){a.tg&&this.Or&&(a.Tn=!0);this.Np&&this.b.wf&&this.b.Yb()};r.prototype.CA=function(a){this.b.sb().qb=this;this.Cb[a].xb()&&(this.ym(),this.b.sb().tg=!0)};r.prototype.ym=function(){var a=this.b.sb(),c;a.vc=0;for(c=this.fd.length;a.vc<c;a.vc++)if(this.fd[a.vc].xb())return;this.Kt()};r.prototype.zA=function(){var a=this.b.sb(),c;for(c=this.fd.length;a.vc<c;a.vc++)if(this.fd[a.vc].xb())return;this.Kt()};r.prototype.Kt=function(){if(this.wd.length){var a,c,d,b,e=this.wd.length- 1;this.b.om(this);if(this.Hp)for(a=0,c=this.wd.length;a<c;a++)d=this.wd[a],(b=!this.Tm||!this.group&&a<e)&&this.b.Eg(d.na),d.xb(),b?this.b.je(d.na):this.b.Kn(d.na);else for(a=0,c=this.wd.length;a<c;a++)this.wd[a].xb();this.b.jm()}};r.prototype.DA=function(){var a=this.b.sb();a.qb=this;var c=!1,d;a.Bb=0;for(d=this.Cb.length;a.Bb<d;a.Bb++)if(this.Cb[a.Bb].xb())c=!0;else if(!this.od)return!1;return this.od?c:!0};r.prototype.Gg=function(){this.b.jg++;var a=this.b.sb().Bb,c=this.b.om(this);if(!this.od)for(c.Bb= a+1,a=this.Cb.length;c.Bb<a;c.Bb++)if(!this.Cb[c.Bb].xb()){this.b.jm();return}this.ym();this.b.jm()};r.prototype.Dz=function(a){var c=a.index;if(0===c)return!0;for(--c;0<=c;--c)if(this.Cb[c].type===a.type)return!1;return!0};hc=r;a.prototype.nb=function(){var a,c,d;a=0;for(c=this.ba.length;a<c;a++)d=this.ba[a],d.nb(),d.yd&&(this.qi=!0)};a.prototype.FA=function(){return!0};a.prototype.Ap=function(){var a,c;a=0;for(c=this.ba.length;a<c;a++)this.bb[a]=this.ba[a].get();return Va(this.Rb.apply(this.b.me, this.bb),this.zo)};a.prototype.EA=function(){var a,c;a=0;for(c=this.ba.length;a<c;a++)this.bb[a]=this.ba[a].get();a=this.Rb.apply(this.Wf?this.Wf:this.type,this.bb);this.type.gd();return a};a.prototype.zp=function(){var a,c,d,b,e,g,l,p,f=this.type,q=f.da(),k=this.Sc.od&&!this.trigger;c=0;var n=f.hc,t=f.J,r=f.Ce,w=this.Dd,C=-1<w,L=this.qi,H=this.ba,x=this.bb,J=this.zo,N=this.Rb,v;if(L)for(c=0,e=H.length;c<e;++c)g=H[c],g.yd||(x[c]=g.get(0));else for(c=0,e=H.length;c<e;++c)x[c]=H[c].get(0);if(q.za){B(q.e); B(q.la);v=f.e;a=0;for(b=v.length;a<b;++a){p=v[a];if(L)for(c=0,e=H.length;c<e;++c)g=H[c],g.yd&&(x[c]=g.get(a));C?(c=0,t&&(c=p.type.eh[r]),c=N.apply(p.U[w+c],x)):c=N.apply(p,x);(l=Va(c,J))?q.e.push(p):k&&q.la.push(p)}f.finish&&f.finish(!0);q.za=!1;f.gd();return q.ro()}d=0;v=(l=k&&!this.Sc.Dz(this))?q.la:q.e;var P=!1;a=0;for(b=v.length;a<b;++a){p=v[a];if(L)for(c=0,e=H.length;c<e;++c)g=H[c],g.yd&&(x[c]=g.get(a));C?(c=0,t&&(c=p.type.eh[r]),c=N.apply(p.U[w+c],x)):c=N.apply(p,x);if(Va(c,J))if(P=!0,l){if(q.e.push(p), n)for(c=0,e=p.siblings.length;c<e;c++)g=p.siblings[c],g.type.da().e.push(g)}else{v[d]=p;if(n)for(c=0,e=p.siblings.length;c<e;c++)g=p.siblings[c],g.type.da().e[d]=g;d++}else if(l){v[d]=p;if(n)for(c=0,e=p.siblings.length;c<e;c++)g=p.siblings[c],g.type.da().la[d]=g;d++}else if(k&&(q.la.push(p),n))for(c=0,e=p.siblings.length;c<e;c++)g=p.siblings[c],g.type.da().la.push(g)}Aa(v,d);if(n)for(t=f.Ic,a=0,b=t.length;a<b;a++)p=t[a].da(),l?Aa(p.la,d):Aa(p.e,d);d=P;if(l&&!P)for(a=0,b=q.e.length;a<b;a++){p=q.e[a]; if(L)for(c=0,e=H.length;c<e;c++)g=H[c],g.yd&&(x[c]=g.get(a));c=C?N.apply(p.U[w],x):N.apply(p,x);if(Va(c,J)){P=!0;break}}f.finish&&f.finish(d||k);return k?P:q.ro()};cc=a;c.prototype.nb=function(){var a,c,d;a=0;for(c=this.ba.length;a<c;a++)d=this.ba[a],d.nb(),d.yd&&(this.qi=!0)};c.prototype.Ap=function(){var a=this.b,c,d,b=this.ba,e=this.bb;c=0;for(d=b.length;c<d;++c)e[c]=b[c].get();return this.Rb.apply(a.me,e)};c.prototype.zp=function(){var a=this.type,c=this.Dd,d=a.Ce,b=this.qi,e=this.ba,g=this.bb, l=this.Rb,p=a.da().Jc(),a=a.J,f=-1<c,q,k,n,t,r,w;if(b)for(k=0,t=e.length;k<t;++k)r=e[k],r.yd||(g[k]=r.get(0));else for(k=0,t=e.length;k<t;++k)g[k]=e[k].get(0);q=0;for(n=p.length;q<n;++q){w=p[q];if(b)for(k=0,t=e.length;k<t;++k)r=e[k],r.yd&&(g[k]=r.get(q));f?(k=0,a&&(k=w.type.eh[d]),l.apply(w.U[c+k],g)):l.apply(w,g)}return!1};dc=c;var C=[],w=-1;d.prototype.nb=function(){var a,c;if(11===this.type)this.ig=this.b.Gr(this.ck,this.Sc.parent);else if(13===this.type)for(a=0,c=this.Kg.length;a<c;a++)this.Kg[a].nb(); this.Xd&&this.Xd.nb()};d.prototype.Tz=function(a){this.yd||!a||a.fa.Im||(this.yd=!0)};d.prototype.Ut=function(){this.yd=!0};d.prototype.fz=function(a){this.Qe=a||0;a=e();this.Xd.get(a);w--;return a.data};d.prototype.gz=function(a){this.Qe=a||0;a=e();this.Xd.get(a);w--;return ka(a.data)?a.data:""};d.prototype.mz=function(){return this.object};d.prototype.dz=function(){return this.$q};d.prototype.kz=function(a){this.Qe=a||0;a=e();this.Xd.get(a);w--;return a.Kb()?this.b.vf(a.data):this.b.Mi(a.data)}; d.prototype.lz=function(){return this.Mb};d.prototype.jz=function(){return this.key};d.prototype.iz=function(){return this.index};d.prototype.hz=function(a){a=a||0;var c=this.qd.type,d=null,d=c.da(),b=d.Jc();if(b.length)d=b[a%b.length].type;else if(d.la.length)d=d.la[a%d.la.length].type;else if(c.e.length)d=c.e[a%c.e.length].type;else return 0;return this.index+d.Zk[c.Ce]};d.prototype.ez=function(){return this.ig};d.prototype.cz=function(){return this.xr};d.prototype.nz=function(){var a,c;a=0;for(c= this.Kg.length;a<c;a++)this.bk[a]=this.Kg[a].get();return this.bk};ec=d;l.prototype.nb=function(){this.na=b(this.na)};l.prototype.Jg=function(a){var c=this.b.Dr();this.parent&&!this.cj&&c?(this.zg>=c.length&&(c.length=this.zg+1),c[this.zg]=a):this.data=a};l.prototype.Oi=function(){var a=this.b.Dr();return!this.parent||this.cj||!a||this.zl?this.data:this.zg>=a.length||"undefined"===typeof a[this.zg]?this.vo:a[this.zg]};l.prototype.xb=function(){!this.parent||this.cj||this.zl||this.Jg(this.vo)};Zb= l;t.prototype.toString=function(){return"include:"+this.Ti.toString()};t.prototype.nb=function(){this.Ti=this.b.Wn[this.uz];this.sheet.Qr.add(this);this.na=b(this.na);for(var a=this.parent;a;)a.group&&a.Gk.push(this),a=a.parent;this.qu()};t.prototype.xb=function(){this.parent&&this.b.Ij(this.b.B);this.Ti.so||this.Ti.xb(!0);this.parent&&this.b.je(this.b.B)};t.prototype.qu=function(){for(var a=this.parent;a;){if(a.group&&!a.kh){this.Zb=!1;return}a=a.parent}this.Zb=!0};ic=t;q.prototype.reset=function(a){this.qb= a;this.vc=this.Bb=0;B(this.gu);this.Tn=this.tg=!1};q.prototype.Zr=function(){return this.qb.Hp?!0:this.Bb<this.qb.Cb.length-1?!!this.qb.na.length:!1};Yb=q})(); (function(){function f(b,a){this.qd=b;this.b=b.b;this.type=a[0];this.get=[this.ry,this.my,this.By,this.Ey,this.ay,this.Cy,this.wy,this.jy,this.vy,this.Ay,this.by,this.zy,this.ky,this.xy,this.ty,this.uy,this.ny,this.oy,this.iy,this.Dy,this.yy,this.qy,this.hy,this.ly][this.type];var c=null;this.Ke=this.ba=this.bb=this.Rb=this.Rm=this.second=this.first=this.value=null;this.Dd=-1;this.Gd=null;this.wu=-1;this.ig=this.ck=null;this.Th=!1;switch(this.type){case 0:case 1:case 2:this.value=a[1];break;case 3:this.first= new gc(b,a[1]);break;case 18:this.first=new gc(b,a[1]);this.second=new gc(b,a[2]);this.Rm=new gc(b,a[3]);break;case 19:this.Rb=this.b.bf(a[1]);this.Rb!==K.prototype.D.random&&this.Rb!==K.prototype.D.Yq||this.qd.Ut();this.bb=[];this.ba=[];3===a.length?(c=a[2],this.bb.length=c.length+1):this.bb.length=1;break;case 20:this.Ke=this.b.B[a[1]];this.Dd=-1;this.Rb=this.b.bf(a[2]);this.Th=a[3];vc&&this.Rb===vc.prototype.D.Du&&this.qd.Ut();a[4]?this.Gd=new gc(b,a[4]):this.Gd=null;this.bb=[];this.ba=[];6=== a.length?(c=a[5],this.bb.length=c.length+1):this.bb.length=1;break;case 21:this.Ke=this.b.B[a[1]];this.Th=a[2];a[3]?this.Gd=new gc(b,a[3]):this.Gd=null;this.wu=a[4];break;case 22:this.Ke=this.b.B[a[1]];this.Ke.kl(a[2]);this.Dd=this.Ke.eo(a[2]);this.Rb=this.b.bf(a[3]);this.Th=a[4];a[5]?this.Gd=new gc(b,a[5]):this.Gd=null;this.bb=[];this.ba=[];7===a.length?(c=a[6],this.bb.length=c.length+1):this.bb.length=1;break;case 23:this.ck=a[1],this.ig=null}this.qd.Tz(this.Ke);4<=this.type&&17>=this.type&&(this.first= new gc(b,a[1]),this.second=new gc(b,a[2]));if(c){var e,d;e=0;for(d=c.length;e<d;e++)this.ba.push(new gc(b,c[e]))}}function k(){++r;g.length===r&&g.push(new fc);return g[r]}function b(b,a,c){var e,d;e=0;for(d=b.length;e<d;++e)b[e].get(c),a[e+1]=c.data}function n(b,a){this.type=b||jc.Og;this.data=a||0;this.Cg=null;this.type==jc.Og&&(this.data=Math.floor(this.data))}f.prototype.nb=function(){23===this.type&&(this.ig=this.qd.b.Gr(this.ck,this.qd.Sc.parent));this.first&&this.first.nb();this.second&&this.second.nb(); this.Rm&&this.Rm.nb();this.Gd&&this.Gd.nb();if(this.ba){var b,a;b=0;for(a=this.ba.length;b<a;b++)this.ba[b].nb()}};var g=[],r=-1;f.prototype.Dy=function(g){var a=this.ba,c=this.bb;c[0]=g;g=k();b(a,c,g);--r;this.Rb.apply(this.b.me,c)};f.prototype.yy=function(g){var a=this.Ke,c=this.bb,e=this.ba,d=this.Gd,l=this.Rb,f=this.qd.Qe,q=a.da(),n=q.Jc();if(!n.length)if(q.la.length)n=q.la;else{this.Th?g.yb(""):g.Aa(0);return}c[0]=g;g.Cg=a;g=k();b(e,c,g);d&&(d.get(g),g.Kb()&&(f=g.data,n=a.e));--r;a=n.length; if(f>=a||f<=-a)f%=a;0>f&&(f+=a);l.apply(n[f],c)};f.prototype.hy=function(g){var a=this.Ke,c=this.bb,e=this.ba,d=this.Gd,l=this.Dd,f=this.Rb,q=this.qd.Qe,n=a.da(),C=n.Jc();if(!C.length)if(n.la.length)C=n.la;else{this.Th?g.yb(""):g.Aa(0);return}c[0]=g;g.Cg=a;g=k();b(e,c,g);d&&(d.get(g),g.Kb()&&(q=g.data,C=a.e));--r;e=C.length;if(q>=e||q<=-e)q%=e;0>q&&(q+=e);q=C[q];C=0;a.J&&(C=q.type.eh[a.Ce]);f.apply(q.U[l+C],c)};f.prototype.qy=function(b){var a=this.Gd,c=this.Ke,e=this.wu,d=this.qd.Qe,g=c.da(),f=g.Jc(); if(!f.length)if(g.la.length)f=g.la;else{this.Th?b.yb(""):b.Aa(0);return}if(a){g=k();a.get(g);if(g.Kb()){d=g.data;f=c.e;0!==f.length&&(d%=f.length,0>d&&(d+=f.length));d=c.jo(d);c=d.Fb[e];ka(c)?b.yb(c):b.r(c);--r;return}--r}a=f.length;if(d>=a||d<=-a)d%=a;0>d&&(d+=a);d=f[d];f=0;c.J&&(f=d.type.Zk[c.Ce]);c=d.Fb[e+f];ka(c)?b.yb(c):b.r(c)};f.prototype.ry=function(b){b.type=jc.Og;b.data=this.value};f.prototype.my=function(b){b.type=jc.Ng;b.data=this.value};f.prototype.By=function(b){b.type=jc.String;b.data= this.value};f.prototype.Ey=function(b){this.first.get(b);b.Kb()&&(b.data=-b.data)};f.prototype.ay=function(b){this.first.get(b);var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data+=a.data,a.qh()&&b.Gh());--r};f.prototype.Cy=function(b){this.first.get(b);var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data-=a.data,a.qh()&&b.Gh());--r};f.prototype.wy=function(b){this.first.get(b);var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data*=a.data,a.qh()&&b.Gh());--r};f.prototype.jy=function(b){this.first.get(b); var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data/=a.data,b.Gh());--r};f.prototype.vy=function(b){this.first.get(b);var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data%=a.data,a.qh()&&b.Gh());--r};f.prototype.Ay=function(b){this.first.get(b);var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data=Math.pow(b.data,a.data),a.qh()&&b.Gh());--r};f.prototype.by=function(b){this.first.get(b);var a=k();this.second.get(a);a.uh()||b.uh()?this.ey(b,a):this.cy(b,a);--r};f.prototype.ey=function(b,a){b.uh()&& a.uh()?this.gy(b,a):this.fy(b,a)};f.prototype.gy=function(b,a){b.data+=a.data};f.prototype.fy=function(b,a){b.uh()?b.data+=(Math.round(1E10*a.data)/1E10).toString():b.yb(b.data.toString()+a.data)};f.prototype.cy=function(b,a){b.Aa(b.data&&a.data?1:0)};f.prototype.zy=function(b){this.first.get(b);var a=k();this.second.get(a);b.Kb()&&a.Kb()&&(b.data||a.data?b.Aa(1):b.Aa(0));--r};f.prototype.iy=function(b){this.first.get(b);b.data?this.second.get(b):this.Rm.get(b)};f.prototype.ky=function(b){this.first.get(b); var a=k();this.second.get(a);b.Aa(b.data===a.data?1:0);--r};f.prototype.xy=function(b){this.first.get(b);var a=k();this.second.get(a);b.Aa(b.data!==a.data?1:0);--r};f.prototype.ty=function(b){this.first.get(b);var a=k();this.second.get(a);b.Aa(b.data<a.data?1:0);--r};f.prototype.uy=function(b){this.first.get(b);var a=k();this.second.get(a);b.Aa(b.data<=a.data?1:0);--r};f.prototype.ny=function(b){this.first.get(b);var a=k();this.second.get(a);b.Aa(b.data>a.data?1:0);--r};f.prototype.oy=function(b){this.first.get(b); var a=k();this.second.get(a);b.Aa(b.data>=a.data?1:0);--r};f.prototype.ly=function(b){var a=this.ig.Oi();ja(a)?b.r(a):b.yb(a)};gc=f;n.prototype.qh=function(){return this.type===jc.Ng};n.prototype.Kb=function(){return this.type===jc.Og||this.type===jc.Ng};n.prototype.uh=function(){return this.type===jc.String};n.prototype.Gh=function(){this.qh()||(this.uh()&&(this.data=parseFloat(this.data)),this.type=jc.Ng)};n.prototype.Aa=function(b){this.type=jc.Og;this.data=Math.floor(b)};n.prototype.r=function(b){this.type= jc.Ng;this.data=b};n.prototype.yb=function(b){this.type=jc.String;this.data=b};n.prototype.Vt=function(b){ja(b)?(this.type=jc.Ng,this.data=b):ka(b)?(this.type=jc.String,this.data=b.toString()):(this.type=jc.Og,this.data=0)};fc=n;jc={Og:0,Ng:1,String:2}})();function K(f){this.b=f;this.Gc=[]} K.prototype.Xa=function(){var f={},k,b,n,g,r,p,a,c;f.waits=[];var e=f.waits,d;k=0;for(b=this.Gc.length;k<b;k++){p=this.Gc[k];d={t:p.time,st:p.bu,s:p.Gp,ev:p.bh.ka,sm:[],sols:{}};p.bh.fd[p.vc]&&(d.act=p.bh.fd[p.vc].ka);n=0;for(g=p.na.length;n<g;n++)d.sm.push(p.na[n].ka);for(r in p.qc)if(p.qc.hasOwnProperty(r)){a=this.b.B[parseInt(r,10)];c={sa:p.qc[r].zm,insts:[]};n=0;for(g=p.qc[r].Fe.length;n<g;n++)c.insts.push(p.qc[r].Fe[n].uid);d.sols[a.ka.toString()]=c}e.push(d)}return f}; K.prototype.kb=function(f){f=f.waits;var k,b,n,g,r,p,a,c,e,d,l;B(this.Gc);k=0;for(b=f.length;k<b;k++)if(p=f[k],c=this.b.Rq[p.ev.toString()]){e=-1;n=0;for(g=c.fd.length;n<g;n++)if(c.fd[n].ka===p.act){e=n;break}if(-1!==e){a={qc:{},na:[],Rn:!1};a.time=p.t;a.bu=p.st||"";a.Gp=!!p.s;a.bh=c;a.vc=e;n=0;for(g=p.sm.length;n<g;n++)(c=this.b.nl(p.sm[n]))&&a.na.push(c);for(r in p.sols)if(p.sols.hasOwnProperty(r)&&(c=this.b.nl(parseInt(r,10)))){e=p.sols[r];d={zm:e.sa,Fe:[]};n=0;for(g=e.insts.length;n<g;n++)(l= this.b.lg(e.insts[n]))&&d.Fe.push(l);a.qc[c.index.toString()]=d}this.Gc.push(a)}}}; (function(){function f(){}function k(){}function b(){}var n=K.prototype;f.prototype.qq=function(){return!0};f.prototype.Jv=function(){return!0};f.prototype.Hu=function(b,a,c){return kc(b,a,c)};f.prototype.hw=function(b){var a=this.b.sb(),c=a.qb,e=a.Zr(),a=this.b.Ft();if(e)for(e=0;e<b&&!a.eb;e++)this.b.Eg(c.na),a.index=e,c.Gg(),this.b.je(c.na);else for(e=0;e<b&&!a.eb;e++)a.index=e,c.Gg();this.b.zt();return!1};f.prototype.Uu=function(b,a,c){var e=this.b.sb(),d=e.qb,e=e.Zr();b=this.b.Ft(b);if(c<a)if(e)for(;a>= c&&!b.eb;--a)this.b.Eg(d.na),b.index=a,d.Gg(),this.b.je(d.na);else for(;a>=c&&!b.eb;--a)b.index=a,d.Gg();else if(e)for(;a<=c&&!b.eb;++a)this.b.Eg(d.na),b.index=a,d.Gg(),this.b.je(d.na);else for(;a<=c&&!b.eb;++a)b.index=a,d.Gg();this.b.zt();return!1};f.prototype.Kw=function(){var b=this.b.ll().H;"undefined"===typeof b.TriggerOnce_lastTick&&(b.TriggerOnce_lastTick=-1);var a=b.TriggerOnce_lastTick,c=this.b.Od;b.TriggerOnce_lastTick=c;return this.b.Mo||a!==c-1};f.prototype.Su=function(b){var a=this.b.ll(), c=a.H.Every_lastTime||0,e=this.b.Lb.X;"undefined"===typeof a.H.Every_seconds&&(a.H.Every_seconds=b);var d=a.H.Every_seconds;if(e>=c+d)return a.H.Every_lastTime=c+d,e>=a.H.Every_lastTime+.04&&(a.H.Every_lastTime=e),a.H.Every_seconds=b,!0;e<c-.1&&(a.H.Every_lastTime=e);return!1};f.prototype.bw=function(b){if(!b)return!1;var a=b.da(),c=a.Jc(),e=ta(Math.random()*c.length);if(e>=c.length)return!1;a.Qh(c[e]);b.gd();return!0};f.prototype.Ju=function(b,a,c){return kc(b.Oi(),a,c)};f.prototype.bv=function(b){return(b= this.b.Ri[b.toLowerCase()])&&b.kh};f.prototype.jq=function(){var b=this.b.sb();return b.Tn?!1:!b.tg};f.prototype.rq=function(){return!0};f.prototype.sv=function(){return!0};f.prototype.nn=function(){return!0};f.prototype.uq=function(){return!0};f.prototype.Kv=function(){return!0};f.prototype.jk=function(){return!0};f.prototype.Au=function(b,a,c){return Pa(F(b),F(c))<=F(a)};f.prototype.$u=function(b,a){return Ra(F(b),F(a))};f.prototype.Zu=function(b,a,c){b=Na(b);a=Na(a);c=Na(c);return Ra(c,a)?Ra(b, a)&&!Ra(b,c):!(!Ra(b,a)&&Ra(b,c))};n.i=new f;k.prototype.Vu=function(b){this.b.wh||this.b.Zf||(this.b.Zf=b)};k.prototype.Nu=function(b,a,c,e){if(a&&b&&(a=this.b.Ik(b,a,c,e))){this.b.$c++;var d;this.b.trigger(Object.getPrototypeOf(b.fa).i.Pg,a);if(a.hc)for(c=0,e=a.siblings.length;c<e;c++)d=a.siblings[c],this.b.trigger(Object.getPrototypeOf(d.type.fa).i.Pg,d);this.b.$c--;b=b.da();b.za=!1;B(b.e);b.e[0]=a;if(a.hc)for(c=0,e=a.siblings.length;c<e;c++)d=a.siblings[c],b=d.type.da(),b.za=!1,B(b.e),b.e[0]= d}};k.prototype.iw=function(b){this.b.Ka.Dp(b)};k.prototype.zw=function(b,a){0===b.an?ja(a)?b.Jg(a):b.Jg(parseFloat(a)):1===b.an&&b.Jg(a.toString())};k.prototype.zu=function(b,a){0===b.an?ja(a)?b.Jg(b.Oi()+a):b.Jg(b.Oi()+parseFloat(a)):1===b.an&&b.Jg(b.Oi()+a.toString())};var g=[],r=[];k.prototype.Lw=function(b){if(!(0>b)){var a,c,e,d=this.b.sb(),l;g.length?l=g.pop():l={qc:{},na:[]};l.Rn=!1;l.time=this.b.Lb.X+b;l.bu="";l.Gp=!1;l.bh=d.qb;l.vc=d.vc+1;b=0;for(a=this.b.B.length;b<a;b++)e=this.b.B[b], c=e.da(),c.za&&-1===d.qb.na.indexOf(e)||(l.na.push(e),e=void 0,r.length?e=r.pop():e={Fe:[]},e.zm=!1,e.zm=c.za,Da(e.Fe,c.e),l.qc[b.toString()]=e);this.Gc.push(l);return!0}};k.prototype.Wu=function(b){if(!this.b.wh&&!this.b.Zf)for(var a in this.b.Dh)if(this.b.Dh.hasOwnProperty(a)&&ob(a,b)){this.b.Zf=this.b.Dh[a];break}};n.q=new k;b.prototype["int"]=function(b,a){ka(a)?(b.Aa(parseInt(a,10)),isNaN(b.data)&&(b.data=0)):b.Aa(a)};b.prototype["float"]=function(b,a){ka(a)?(b.r(parseFloat(a)),isNaN(b.data)&& (b.data=0)):b.r(a)};b.prototype.random=function(b,a,c){void 0===c?b.r(Math.random()*a):b.r(Math.random()*(c-a)+a)};b.prototype.sqrt=function(b,a){b.r(Math.sqrt(a))};b.prototype.abs=function(b,a){b.r(Math.abs(a))};b.prototype.round=function(b,a){b.Aa(Math.round(a))};b.prototype.floor=function(b,a){b.Aa(Math.floor(a))};b.prototype.ceil=function(b,a){b.Aa(Math.ceil(a))};b.prototype.sin=function(b,a){b.r(Math.sin(F(a)))};b.prototype.cos=function(b,a){b.r(Math.cos(F(a)))};b.prototype.tan=function(b,a){b.r(Math.tan(F(a)))}; b.prototype.asin=function(b,a){b.r(Ia(Math.asin(a)))};b.prototype.acos=function(b,a){b.r(Ia(Math.acos(a)))};b.prototype.atan=function(b,a){b.r(Ia(Math.atan(a)))};b.prototype.exp=function(b,a){b.r(Math.exp(a))};b.prototype.log10=function(b,a){b.r(Math.log(a)/Math.LN10)};b.prototype.max=function(b){var a=arguments[1];"number"!==typeof a&&(a=0);var c,e,d;c=2;for(e=arguments.length;c<e;c++)d=arguments[c],"number"===typeof d&&a<d&&(a=d);b.r(a)};b.prototype.min=function(b){var a=arguments[1];"number"!== typeof a&&(a=0);var c,e,d;c=2;for(e=arguments.length;c<e;c++)d=arguments[c],"number"===typeof d&&a>d&&(a=d);b.r(a)};b.prototype.Ae=function(b){b.r(this.b.Ae)};b.prototype.ci=function(b){b.r(this.b.ci)};b.prototype.time=function(b){b.r(this.b.Lb.X)};b.prototype.Od=function(b){b.Aa(this.b.Od)};b.prototype.Tl=function(b){b.Aa(this.b.Tl)};b.prototype.ao=function(b){b.Aa(this.b.ao)};b.prototype.Qz=function(b,a){var c,e;if(this.b.tj.length)if(a){for(e=this.b.uj;0<=e;--e)if(c=this.b.tj[e],c.name===a){b.Aa(c.index); return}b.Aa(0)}else c=this.b.Er(),b.Aa(c?c.index:-1);else b.Aa(0)};b.prototype.yx=function(b,a,c,e,d){b.r(Ta(a,c,e,d))};b.prototype.k=function(b,a,c,e,d){b.r(Ia(Oa(a,c,e,d)))};b.prototype.IA=function(b){b.r(this.b.Ka.scrollX)};b.prototype.Nz=function(b,a,c,e){b.r(Wa(a,c,e))};b.prototype.pB=function(b){b.Aa(this.b.width)};b.prototype.oB=function(b){b.Aa(this.b.height)};b.prototype.mx=function(b,a,c,e){a<c?b.r(c):a>e?b.r(e):b.r(a)};b.prototype.left=function(b,a,c){b.yb(ka(a)?a.substr(0,c):"")};b.prototype.right= function(b,a,c){b.yb(ka(a)?a.substr(a.length-c):"")};b.prototype.cB=function(b,a,c,e){ka(a)&&ka(e)?(a=a.split(e),c=ta(c),0>c||c>=a.length?b.yb(""):b.yb(a[c])):b.yb("")};b.prototype.replace=function(b,a,c,e){ka(a)&&ka(c)&&ka(e)?b.yb(a.replace(new RegExp(fb(c),"gi"),e)):b.yb(ka(a)?a:"")};b.prototype.trim=function(b,a){b.yb(ka(a)?a.trim():"")};b.prototype.Yq=function(b){var a=ta(Math.random()*(arguments.length-1));b.Vt(arguments[a+1])};b.prototype.Mn=function(b){b.r(this.b.Mn/1E3)};b.prototype.kB=function(b, a){var c=this.b.ko(a);b.r(c?c.wa:0)};b.prototype.mB=function(b,a){var c=this.b.ko(a);b.r(c?c.xa:0)};b.prototype.lB=function(b,a){var c=this.b.ko(a);b.r(c?c.Ba:0)};b.prototype.Jl=function(b){b.r(this.b.Jl)};n.D=new b;n.BA=function(){var b,a,c,e,d,l,f=this.b.sb();b=0;for(c=this.Gc.length;b<c;b++){e=this.Gc[b];if(-1===e.time){if(!e.Gp)continue}else if(e.time>this.b.Lb.X)continue;f.qb=e.bh;f.vc=e.vc;f.Bb=0;for(a in e.qc)e.qc.hasOwnProperty(a)&&(d=this.b.B[parseInt(a,10)].da(),l=e.qc[a],d.za=l.zm,Da(d.e, l.Fe),d=l,B(d.Fe),r.push(d));e.bh.zA();this.b.Kn(e.na);e.Rn=!0}a=b=0;for(c=this.Gc.length;b<c;b++)e=this.Gc[b],this.Gc[a]=e,e.Rn?(Ya(e.qc),B(e.na),g.push(e)):a++;Aa(this.Gc,a)}})(); (function(){rb=function(f,b){var n=f[1],g=f[3],r=f[4],p=f[5],a=f[6],c=f[7],e=f[8];b.i||(b.i={});b.q||(b.q={});b.D||(b.D={});var d=b.i,l=b.q,t=b.D;g&&(d.Ku=function(a,c){return kc(this.x,a,c)},d.Lu=function(a,c){return kc(this.y,a,c)},d.iv=function(){var a=this.j;this.ja();var c=this.Da;return!(c.right<a.wa||c.bottom<a.xa||c.left>a.Ba||c.top>a.Ia)},d.DB=function(){this.ja();var a=this.Da,c=this.b.Ka;return 0>a.right||0>a.bottom||a.left>c.width||a.top>c.height},d.aw=function(a,c,b){var d=this.da(), e=d.Jc();if(!e.length)return!1;var g=e[0],l=g,f=Ta(g.x,g.y,c,b),k,n,t;k=1;for(n=e.length;k<n;k++)if(g=e[k],t=Ta(g.x,g.y,c,b),0===a&&t<f||1===a&&t>f)f=t,l=g;d.Qh(l);return!0},l.mC=function(a){this.x!==a&&(this.x=a,this.A())},l.Dw=function(a){this.y!==a&&(this.y=a,this.A())},l.ww=function(a,c){if(this.x!==a||this.y!==c)this.x=a,this.y=c,this.A()},l.xq=function(a,c){var b=a.Xy(this);if(b){var d;b.Li?(d=b.Li(c,!0),b=b.Li(c,!1)):(d=b.x,b=b.y);if(this.x!==d||this.y!==b)this.x=d,this.y=b,this.A()}},l.KB= function(a){0!==a&&(this.x+=Math.cos(this.k)*a,this.y+=Math.sin(this.k)*a,this.A())},l.JB=function(a,c){0!==c&&(this.x+=Math.cos(F(a))*c,this.y+=Math.sin(F(a))*c,this.A())},t.zq=function(a){a.r(this.x)},t.wn=function(a){a.r(this.y)},t.Ae=function(a){a.r(this.b.ih(this))});r&&(d.yB=function(a,c){return kc(this.width,a,c)},d.vB=function(a,c){return kc(this.height,a,c)},l.sn=function(a){this.width!==a&&(this.width=a,this.A())},l.qw=function(a){this.height!==a&&(this.height=a,this.A())},l.jC=function(a, c){if(this.width!==a||this.height!==c)this.width=a,this.height=c,this.A()},t.Mw=function(a){a.r(this.width)},t.zB=function(a){a.r(this.height)},t.tB=function(a){this.ja();a.r(this.Da.left)},t.Cu=function(a){this.ja();a.r(this.Da.top)},t.uB=function(a){this.ja();a.r(this.Da.right)},t.iq=function(a){this.ja();a.r(this.Da.bottom)});p&&(d.Au=function(a,c){return Pa(this.k,F(c))<=F(a)},d.$u=function(a){return Ra(this.k,F(a))},d.Zu=function(a,c){var b=Na(a),d=Na(c),e=Ka(this.k);return Ra(d,b)?Ra(e,b)&& !Ra(e,d):!(!Ra(e,b)&&Ra(e,d))},l.aC=function(a){a=F(Ja(a));isNaN(a)||this.k===a||(this.k=a,this.A())},l.XB=function(a){0===a||isNaN(a)||(this.k+=F(a),this.k=Ka(this.k),this.A())},l.YB=function(a){0===a||isNaN(a)||(this.k-=F(a),this.k=Ka(this.k),this.A())},l.ZB=function(a,c){var b=Qa(this.k,F(c),F(a));isNaN(b)||this.k===b||(this.k=b,this.A())},l.$B=function(a,c,b){a=Qa(this.k,Math.atan2(b-this.y,c-this.x),F(a));isNaN(a)||this.k===a||(this.k=a,this.A())},l.yw=function(a,c){var b=Math.atan2(c-this.y, a-this.x);isNaN(b)||this.k===b||(this.k=b,this.A())},t.sB=function(a){a.r(Ma(this.k))});n||(d.Iu=function(a,c,b){return kc(this.Fb[a],c,b)},d.CB=function(a){return this.Fb[a]},d.RB=function(a,c){var b=this.da(),d=b.Jc();if(!d.length)return!1;var e=d[0],g=e,l=e.Fb[c],f,k,n;f=1;for(k=d.length;f<k;f++)if(e=d[f],n=e.Fb[c],0===a&&n<l||1===a&&n>l)l=n,g=e;b.Qh(g);return!0},d.QB=function(a){var c,b,d,e,g;if(this.b.ll().zo){g=this.da();if(g.za)for(g.za=!1,B(g.e),B(g.la),d=this.e,c=0,b=d.length;c<b;c++)e=d[c], e.uid===a?g.la.push(e):g.e.push(e);else{d=c=0;for(b=g.e.length;c<b;c++)e=g.e[c],g.e[d]=e,e.uid===a?g.la.push(e):d++;Aa(g.e,d)}this.gd();return!!g.e.length}e=this.b.lg(a);if(!e)return!1;g=this.da();if(!g.za&&-1===g.e.indexOf(e))return!1;if(this.J)for(a=e.type.Va,c=0,b=a.length;c<b;c++){if(a[c]===this)return g.Qh(e),this.gd(),!0}else if(e.type===this)return g.Qh(e),this.gd(),!0;return!1},d.Pg=function(){return!0},d.uv=function(){return!0},l.sw=function(a,c){var b=this.Fb;ja(b[a])?b[a]=ja(c)?c:parseFloat(c): ka(b[a])&&(b[a]=ka(c)?c:c.toString())},l.rB=function(a,c){var b=this.Fb;ja(b[a])?b[a]=ja(c)?b[a]+c:b[a]+parseFloat(c):ka(b[a])&&(b[a]=ka(c)?b[a]+c:b[a]+c.toString())},l.oC=function(a,c){var b=this.Fb;ja(b[a])&&(b[a]=ja(c)?b[a]-c:b[a]-parseFloat(c))},l.bC=function(a,c){this.Fb[a]=c?1:0},l.qC=function(a){this.Fb[a]=1-this.Fb[a]},l.Pu=function(){this.b.$e(this)},l.lv||(l.lv=function(a){var c,b;try{c=JSON.parse(a)}catch(d){return}this.b.Hl(this,c,!0);this.zd&&this.zd();if(this.U)for(a=0,c=this.U.length;a< c;++a)b=this.U[a],b.zd&&b.zd()}),t.Mu=function(a){var c=a.Cg.e.length,b,d,e;b=0;for(d=this.b.Ed.length;b<d;b++)e=this.b.Ed[b],a.Cg.J?0<=e.type.Va.indexOf(a.Cg)&&c++:e.type===a.Cg&&c++;a.Aa(c)},t.TB=function(a){a.Aa(a.Cg.da().Jc().length)},t.sC=function(a){a.Aa(this.uid)},t.AB=function(a){a.Aa(this.Pi())},t.Bu||(t.Bu=function(a){a.yb(JSON.stringify(this.b.Bp(this,!0)))}));a&&(d.GB=function(){return this.visible},l.Cw=function(a){!a!==!this.visible&&(this.visible=!!a,this.b.S=!0)},d.wB=function(a,c){return kc(nb(100* this.opacity),a,c)},l.hC=function(a){a=a/100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.b.S=!0)},t.Opacity=function(a){a.r(nb(100*this.opacity))});c&&(d.hv=function(a){return a?this.j===a:!1},d.SB=function(a){var c=this.da(),b=c.Jc();if(!b.length)return!1;var d=b[0],e=d,g,l;g=1;for(l=b.length;g<l;g++)if(d=b[g],0===a){if(d.j.index>e.j.index||d.j.index===e.j.index&&d.$d()>e.$d())e=d}else if(d.j.index<e.j.index||d.j.index===e.j.index&&d.$d()<e.$d())e=d;c.Qh(e);return!0},l.MB=function(){var a= this.j,c=a.e;c.length&&c[c.length-1]===this||(a.Sh(this,!1),a.si(this,!1),this.b.S=!0)},l.mv=function(){var a=this.j,c=a.e;c.length&&c[0]===this||(a.Sh(this,!1),a.nA(this),this.b.S=!0)},l.LB=function(a){a&&a!=this.j&&(this.j.Sh(this,!0),this.j=a,a.si(this,!0),this.b.S=!0)},l.Aq=function(a,c){var b=0===a;if(c){var d=c.Hr(this);d&&d.uid!==this.uid&&(this.j.index!==d.j.index&&(this.j.Sh(this,!0),this.j=d.j,d.j.si(this,!0)),this.j.Uz(this,d,b),this.b.S=!0)}},t.IB=function(a){a.Aa(this.j.Zs)},t.HB=function(a){a.yb(this.j.name)}, t.uC=function(a){a.Aa(this.$d())});e&&(l.dC=function(a,c){if(this.b.u){var b=this.type.io(c);if(!(0>b)){var d=1===a;this.ef[b]!==d&&(this.ef[b]=d,this.Qd(),this.b.S=!0)}}},l.eC=function(a,c,b){if(this.b.u){var d=this.type.io(a);0>d||(a=this.type.W[d],d=this.ab[d],c=Math.floor(c),0>c||c>=d.length||(1===this.b.u.az(a.zb,c)&&(b/=100),d[c]!==b&&(d[c]=b,a.Zb&&(this.b.S=!0))))}})};Mb=function(){this.Hn=this.Dn=!0;this.type.qk=!0;this.b.S=!0;var f,b,n=this.En;f=0;for(b=n.length;f<b;++f)n[f](this);this.j.ed&& this.ja()};Nb=function(f){f&&this.En.push(f)};Pb=function(){if(this.Dn){var f=this.Da,b=this.ac;f.set(this.x,this.y,this.x+this.width,this.y+this.height);f.offset(-this.mc*this.width,-this.nc*this.height);this.k?(f.offset(-this.x,-this.y),b.Xt(f,this.k),b.offset(this.x,this.y),b.Sq(f)):b.Oj(f);f.normalize();this.Dn=!1;this.fB()}};var f=new wa(0,0,0,0);Qb=function(){if(this.j.ed){var k=this.j.Xb,b=this.Da;f.set(k.tc(b.left),k.uc(b.top),k.tc(b.right),k.uc(b.bottom));this.Ac.Ei(f)||(this.Ac.right<this.Ac.left? k.update(this,null,f):k.update(this,this.Ac,f),this.Ac.yi(f),this.j.Md=!0)}};Rb=function(){if(this.Hn&&this.ve){this.ja();var k=this.type.Fk,b=this.Da;f.set(k.tc(b.left),k.uc(b.top),k.tc(b.right),k.uc(b.bottom));this.of.Ei(f)||(this.of.right<this.of.left?k.update(this,null,f):k.update(this,this.of,f),this.of.yi(f),this.Hn=!1)}};Ob=function(f,b){return this.Da.lc(f,b)&&this.ac.lc(f,b)?this.bi?this.UC(f,b):this.Ea&&!this.Ea.ph()?(this.Ea.Vg(this.width,this.height,this.k),this.Ea.lc(f-this.x,b-this.y)): !0:!1};Ib=function(){this.type.Xm();return this.pg};Sb=function(){this.j.Xp();return this.Rd};Tb=function(){B(this.ya);var f,b,n,g=!0;f=0;for(b=this.ef.length;f<b;f++)this.ef[f]&&(n=this.type.W[f],this.ya.push(n),n.Jd||(g=!1));this.vu=!!this.ya.length;this.Pe=g};Jb=function(){return"Inst"+this.Et};ub=function(f){if(f&&f.hc&&f.type!=this){var b,n,g;b=0;for(n=f.siblings.length;b<n;b++)if(g=f.siblings[b],g.type==this)return g}f=this.da().Jc();return f.length?f[0]:null};vb=function(f){var b=this.da().Jc(); return b.length?b[f.Pi()%b.length]:null};tb=function(){if(this.Yh&&!this.J){var f,b;f=0;for(b=this.e.length;f<b;f++)this.e[f].pg=f;var n=f,g=this.b.Ed;f=0;for(b=g.length;f<b;++f)g[f].type===this&&(g[f].pg=n++);this.Yh=!1}};Gb=function(f){if(f<this.e.length)return this.e[f];f-=this.e.length;var b=this.b.Ed,n,g;n=0;for(g=b.length;n<g;++n)if(b[n].type===this){if(0===f)return b[n];--f}return null};wb=function(){return this.Re[this.Vd]};xb=function(){this.Vd++;this.Vd===this.Re.length?this.Re.push(new sb(this)): (this.Re[this.Vd].za=!0,B(this.Re[this.Vd].la))};yb=function(){this.Vd++;this.Vd===this.Re.length&&this.Re.push(new sb(this));var f=this.Re[this.Vd],b=this.Re[this.Vd-1];b.za?f.za=!0:(f.za=!1,Da(f.e,b.e));B(f.la)};zb=function(){this.Vd--};Ab=function(f){var b,n,g,r,p,a=0;if(!this.J)for(b=0,n=this.Va.length;b<n;b++)for(p=this.Va[b],g=0,r=p.$a.length;g<r;g++){if(f===p.$a[g].name)return this.H.lastBehIndex=a,p.$a[g];a++}b=0;for(n=this.$a.length;b<n;b++){if(f===this.$a[b].name)return this.H.lastBehIndex= a,this.$a[b];a++}return null};Bb=function(f){return this.kl(f)?this.H.lastBehIndex:-1};Eb=function(f){var b,n;b=0;for(n=this.W.length;b<n;b++)if(this.W[b].name===f)return b;return-1};Fb=function(){if(this.hc&&!this.J){var f,b,n,g,r,p,a;this.Xm();p=this.da();var c=p.za,e=(f=this.b.sb())&&f.qb&&f.qb.od;f=0;for(b=this.Ic.length;f<b;f++)if(r=this.Ic[f],r!==this&&(r.Xm(),a=r.da(),a.za=c,!c)){B(a.e);n=0;for(g=p.e.length;n<g;++n)a.e[n]=r.jo(p.e[n].pg);if(e)for(B(a.la),n=0,g=p.la.length;n<g;++n)a.la[n]=r.jo(p.la[n].pg)}}}; Hb=function(){return"Type"+this.ka};kc=function(f,b,n){if("undefined"===typeof f||"undefined"===typeof n)return!1;switch(b){case 0:return f===n;case 1:return f!==n;case 2:return f<n;case 3:return f<=n;case 4:return f>n;case 5:return f>=n;default:return!1}}})();var sc={};function wc(f){this.b=f} (function(){function f(){}function k(){}var b=!1,n=null,g=null,r="",p=wc.prototype;p.O=function(a){this.fa=a;this.b=a.b};p.O.prototype.G=function(){};p.K=function(a){this.type=a;this.b=a.b;this.Fd=this.Bf="";this.P=0;this.timeout=-1;if(b=this.b.ul)n=require("path"),g=require("fs"),r=n.dirname((window.process||nw.process).execPath)+"\\"};var a=p.K.prototype,c=null;window.C2_AJAX_DCSide=function(a,b,d){c&&("success"===a?(c.Fd=b,c.Bf=d,c.b.trigger(wc.prototype.i.gn,c),c.b.trigger(wc.prototype.i.jn,c)): "error"===a?(c.Fd=b,c.b.trigger(wc.prototype.i.hn,c),c.b.trigger(wc.prototype.i.cf,c)):"progress"===a&&(c.P=d,c.Fd=b,c.b.trigger(wc.prototype.i.tq,c)))};a.G=function(){c=this};a.Xa=function(){return{lastData:this.Bf}};a.kb=function(a){this.Bf=a.lastData;this.Fd="";this.P=0};var e={},d="";a.te=function(a,c,f,k){if(this.b.Sb)AppMobi.webview.execute('C2_AJAX_WebSide("'+a+'", "'+c+'", "'+f+'", '+(k?'"'+k+'"':"null")+");");else{var n=this,p=null,h=function(){n.Fd=a;n.b.trigger(wc.prototype.i.hn,n);n.b.trigger(wc.prototype.i.cf, n)},m=function(){if(b){var d=r+c;g.existsSync(d)?g.readFile(d,{encoding:"utf8"},function(c,b){c?h():(n.Fd=a,n.Bf=b.replace(/\r\n/g,"\n"),n.b.trigger(wc.prototype.i.gn,n),n.b.trigger(wc.prototype.i.jn,n))}):h()}else h()},Q=function(c){c.lengthComputable&&(n.P=c.loaded/c.total,n.Fd=a,n.b.trigger(wc.prototype.i.tq,n))};try{this.b.zf?p=new ActiveXObject("Microsoft.XMLHTTP"):p=new XMLHttpRequest;p.onreadystatechange=function(){4===p.readyState&&(n.Fd=a,p.responseText?n.Bf=p.responseText.replace(/\r\n/g, "\n"):n.Bf="",400<=p.status?(n.b.trigger(wc.prototype.i.hn,n),n.b.trigger(wc.prototype.i.cf,n)):b&&!n.Bf.length||!b&&0===p.status&&!n.Bf.length||(n.b.trigger(wc.prototype.i.gn,n),n.b.trigger(wc.prototype.i.jn,n)))};this.b.zf||(p.onerror=m,p.ontimeout=m,p.onabort=m,p.onprogress=Q);p.open(f,c);!this.b.zf&&0<=this.timeout&&"undefined"!==typeof p.timeout&&(p.timeout=this.timeout);try{p.responseType="text"}catch(S){}k&&p.setRequestHeader&&!e.hasOwnProperty("Content-Type")&&p.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");if(p.setRequestHeader){for(var E in e)if(e.hasOwnProperty(E))try{p.setRequestHeader(E,e[E])}catch(G){}e={}}if(d&&p.overrideMimeType){try{p.overrideMimeType(d)}catch(A){}d=""}k?p.send(k):p.send()}catch(y){m()}}};f.prototype.jn=function(a){return ob(a,this.Fd)};f.prototype.gn=function(){return!0};f.prototype.cf=function(a){return ob(a,this.Fd)};f.prototype.hn=function(){return!0};f.prototype.tq=function(a){return ob(a,this.Fd)};p.i=new f;p.q=new function(){};k.prototype.fw= function(a){a.r(this.P)};p.D=new k})();function xc(f){this.b=f} (function(){function f(a){-1===Cb.indexOf(a)&&Cb.push(a)}function k(a){var c=a.p,b;try{b=c.play()}catch(d){f(a);return}b?b.catch(function(){f(a)}):Zc&&!D.yc&&f(a)}function b(){var a,c,b,d;$c||Ub||!v||(n(),"running"===v.state&&($c=!0));var e=Cb.slice(0);B(Cb);if(!ba)for(a=0,c=e.length;a<c;++a)b=e[a],b.eb||b.Lc||(d=b.p.play())&&d.catch(function(){f(b)})}function n(){"suspended"===v.state&&v.resume&&v.resume();if(v.createBuffer){var a=v.createBuffer(1,220,22050),c=v.createBufferSource();c.buffer=a;c.connect(v.destination); e(c)}}function g(a){a=Math.pow(10,a/20);isFinite(a)||(a=0);0>a&&(a=0);1<a&&(a=1);return a}function r(a){0>a&&(a=0);1<a&&(a=1);return Math.log(a)/Math.log(10)*20}function p(a){a=a.toLowerCase();return fa.hasOwnProperty(a)&&fa[a].length?fa[a][0].Xc():v.destination}function a(){return v.createGain?v.createGain():v.createGainNode()}function c(a){return v.createDelay?v.createDelay(a):v.createDelayNode(a)}function e(a,c){a.start?a.start(c||0):a.noteOn(c||0)}function d(a,c,b,d){a.start?a.start(d||0,c):a.noteGrainOn(d|| 0,c,b-c)}function l(a){try{a.stop?a.stop(0):a.noteOff(0)}catch(c){}}function t(c,b,d,e,g,h){this.type="filter";this.ic=[c,b,d,e,g,h];this.ma=a();this.T=a();this.T.gain.value=h;this.R=a();this.R.gain.value=1-h;this.rb=v.createBiquadFilter();this.rb.type="number"===typeof this.rb.type?c:md[c];this.rb.frequency.value=b;this.rb.detune&&(this.rb.detune.value=d);this.rb.Q.value=e;this.rb.gain.value=g;this.ma.connect(this.rb);this.ma.connect(this.R);this.rb.connect(this.T)}function q(b,d,e){this.type="delay"; this.ic=[b,d,e];this.ma=a();this.T=a();this.T.gain.value=e;this.R=a();this.R.gain.value=1-e;this.vj=a();this.kd=c(b);this.kd.delayTime.value=b;this.Rk=a();this.Rk.gain.value=d;this.ma.connect(this.vj);this.ma.connect(this.R);this.vj.connect(this.T);this.vj.connect(this.kd);this.kd.connect(this.Rk);this.Rk.connect(this.vj)}function L(c,b,d,e){this.type="convolve";this.ic=[b,d,e];this.ma=a();this.T=a();this.T.gain.value=d;this.R=a();this.R.gain.value=1-d;this.$f=v.createConvolver();c&&(this.$f.normalize= b,this.$f.buffer=c);this.ma.connect(this.$f);this.ma.connect(this.R);this.$f.connect(this.T)}function C(b,d,g,h,f){this.type="flanger";this.ic=[b,d,g,h,f];this.ma=a();this.R=a();this.R.gain.value=1-f/2;this.T=a();this.T.gain.value=f/2;this.$k=a();this.$k.gain.value=h;this.kd=c(b+d);this.kd.delayTime.value=b;this.Ob=v.createOscillator();this.Ob.frequency.value=g;this.Pc=a();this.Pc.gain.value=d;this.ma.connect(this.kd);this.ma.connect(this.R);this.kd.connect(this.T);this.kd.connect(this.$k);this.$k.connect(this.kd); this.Ob.connect(this.Pc);this.Pc.connect(this.kd.delayTime);e(this.Ob)}function w(c,b,d,g,h,f){this.type="phaser";this.ic=[c,b,d,g,h,f];this.ma=a();this.R=a();this.R.gain.value=1-f/2;this.T=a();this.T.gain.value=f/2;this.rb=v.createBiquadFilter();this.rb.type="number"===typeof this.rb.type?7:"allpass";this.rb.frequency.value=c;this.rb.detune&&(this.rb.detune.value=b);this.rb.Q.value=d;this.Ob=v.createOscillator();this.Ob.frequency.value=h;this.Pc=a();this.Pc.gain.value=g;this.ma.connect(this.rb); this.ma.connect(this.R);this.rb.connect(this.T);this.Ob.connect(this.Pc);this.Pc.connect(this.rb.frequency);e(this.Ob)}function h(c){this.type="gain";this.ic=[c];this.ua=a();this.ua.gain.value=c}function m(c,b){this.type="tremolo";this.ic=[c,b];this.ua=a();this.ua.gain.value=1-b/2;this.Ob=v.createOscillator();this.Ob.frequency.value=c;this.Pc=a();this.Pc.gain.value=b/2;this.Ob.connect(this.Pc);this.Pc.connect(this.ua.gain);e(this.Ob)}function Q(c,b){this.type="ringmod";this.ic=[c,b];this.ma=a();this.T= a();this.T.gain.value=b;this.R=a();this.R.gain.value=1-b;this.Lj=a();this.Lj.gain.value=0;this.Ob=v.createOscillator();this.Ob.frequency.value=c;this.Ob.connect(this.Lj.gain);e(this.Ob);this.ma.connect(this.Lj);this.ma.connect(this.R);this.Lj.connect(this.T)}function S(c,b,d,e,g){this.type="distortion";this.ic=[c,b,d,e,g];this.ma=a();this.lm=a();this.km=a();this.MA(d,Math.pow(10,e/20));this.T=a();this.T.gain.value=g;this.R=a();this.R.gain.value=1-g;this.cn=v.createWaveShaper();this.Mk=new Float32Array(65536); this.Oy(c,b);this.cn.Mk=this.Mk;this.ma.connect(this.lm);this.ma.connect(this.R);this.lm.connect(this.cn);this.cn.connect(this.km);this.km.connect(this.T)}function E(a,c,b,d,e){this.type="compressor";this.ic=[a,c,b,d,e];this.ua=v.createDynamicsCompressor();try{this.ua.threshold.value=a,this.ua.knee.value=c,this.ua.ratio.value=b,this.ua.attack.value=d,this.ua.release.value=e}catch(g){}}function G(a,c){this.type="analyser";this.ic=[a,c];this.ua=v.createAnalyser();this.ua.fftSize=a;this.ua.smoothingTimeConstant= c;this.Jy=new Float32Array(this.ua.frequencyBinCount);this.$t=new Uint8Array(a);this.Ej=0}function A(){this.Ga=null;this.Il=0}function y(c,b){this.src=c;this.ea=N;this.be=b;this.pk=!1;var d=this;this.Ih=this.Oh=null;this.Ph=[];this.Am=0;this.aq=this.Yk=this.fu=this.fm=!1;1===N&&b&&!Db&&(this.ea=0,this.Oh=a());this.se=this.ra=null;var e;switch(this.ea){case 0:this.ra=new Audio;this.ra.crossOrigin="anonymous";this.ra.addEventListener("canplaythrough",function(){d.aq=!0});1===N&&v.createMediaElementSource&& !/wiiu/i.test(navigator.userAgent)&&(this.fu=!0,this.ra.addEventListener("canplay",function(){!d.Ih&&d.ra&&(d.Ih=v.createMediaElementSource(d.ra),d.Ih.connect(d.Oh))}));this.ra.autoplay=!1;this.ra.NC="auto";this.ra.src=c;break;case 1:D.xl?D.ur(c,function(a){d.se=a;d.gr()},function(){d.Yk=!0}):(e=new XMLHttpRequest,e.open("GET",c,!0),e.responseType="arraybuffer",e.onload=function(){d.se=e.response;d.gr()},e.onerror=function(){d.Yk=!0},e.send());break;case 2:this.ra=!0;break;case 3:this.ra=!0}}function z(c, b){var d=this;this.tag=b;this.eb=this.Yd=!0;this.src=c.src;this.buffer=c;this.ea=N;this.be=c.be;this.playbackRate=1;this.mh=!0;this.Lc=this.cd=!1;this.Bc=0;this.bj=this.rh=this.ee=!1;this.volume=1;this.ip=function(a){if(!d.Lc&&!d.cd){var c=this;c||(c=a.target);c===d.nk&&(d.mh=!0,d.eb=!0,x=d.tag,D.trigger(xc.prototype.i.ik,H))}};this.nk=null;this.oh=1===Ba&&!this.be||2===Ba;this.Jh=1;this.startTime=this.oh?D.Lb.X:D.Ye.X;this.wb=this.Db=null;this.ge=!1;this.Vb=null;this.ot=this.nt=this.mt=this.lt=this.qt= this.pt=0;this.p=null;var e=!1;1!==this.ea||0!==this.buffer.ea||this.buffer.fu||(this.ea=0);switch(this.ea){case 0:this.be?(this.p=c.ra,e=!c.pk,c.pk=!0):(this.p=new Audio,this.p.crossOrigin="anonymous",this.p.autoplay=!1,this.p.src=c.ra.src,e=!0);e&&this.p.addEventListener("ended",function(){x=d.tag;d.eb=!0;D.trigger(xc.prototype.i.ik,H)});break;case 1:this.Db=a();this.Db.connect(p(b));1===this.buffer.ea?c.ra&&(this.p=v.createBufferSource(),this.p.buffer=c.ra,this.p.connect(this.Db)):(this.p=this.buffer.ra, this.buffer.Oh.connect(this.Db),this.buffer.pk||(this.buffer.pk=!0,this.buffer.ra.addEventListener("ended",function(){x=d.tag;d.eb=!0;D.trigger(xc.prototype.i.ik,H)})));break;case 2:this.p=new window.Media(J+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(d.mh=!0,d.eb=!0,x=d.tag,D.trigger(xc.prototype.i.ik,H))});break;case 3:this.p=!0}}function R(a,c){var b=a.qg()?1:0,d=c.qg()?1:0;return b===d?0:b<d?1:-1}function X(a,c){B(La);if(a.length){var b,d,e;b=0;for(d=O.length;b<d;b++)e=O[b], ob(a,e.tag)&&La.push(e);c&&La.sort(R)}else ma&&!ma.ng()&&(B(La),La[0]=ma)}function I(a,c){fa.hasOwnProperty(a)?fa[a].push(c):fa[a]=[c];var b,d,e,g,h=v.destination;if(fa.hasOwnProperty(a)&&(e=fa[a],e.length))for(h=e[0].Xc(),b=0,d=e.length;b<d;b++)g=e[b],b+1===d?g.hd(v.destination):g.hd(e[b+1].Xc());X(a);b=0;for(d=La.length;b<d;b++)La[b].tA(h);Ua&&Xb===a&&(Ua.disconnect(),Ua.connect(h))}function u(){}function M(){}function T(){}var U=xc.prototype;U.O=function(a){this.fa=a;this.b=a.b};U.O.prototype.G= function(){};var D=null,H=null,x="",J="",N=0,v=null,P=[],O=[],ma=null,V=!1,Ba=0,ba=!1,sa=1,$a=0,Za=0,Ub=!1,Vb=1,Wb=1,Yc=10,ad=1E4,bd=1,Ua=null,Xb="",Zc=!1,Cb=[],Db=!1,$c=!1;document.addEventListener("pointerup",b,!0);document.addEventListener("touchend",b,!0);document.addEventListener("click",b,!0);document.addEventListener("keydown",b,!0);document.addEventListener("gamepadconnected",b,!0);var fa={},md="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");t.prototype.hd= function(a){this.T.disconnect();this.T.connect(a);this.R.disconnect();this.R.connect(a)};t.prototype.remove=function(){this.ma.disconnect();this.rb.disconnect();this.T.disconnect();this.R.disconnect()};t.prototype.Xc=function(){return this.ma};q.prototype.hd=function(a){this.T.disconnect();this.T.connect(a);this.R.disconnect();this.R.connect(a)};q.prototype.remove=function(){this.ma.disconnect();this.vj.disconnect();this.kd.disconnect();this.Rk.disconnect();this.T.disconnect();this.R.disconnect()}; q.prototype.Xc=function(){return this.ma};L.prototype.hd=function(a){this.T.disconnect();this.T.connect(a);this.R.disconnect();this.R.connect(a)};L.prototype.remove=function(){this.ma.disconnect();this.$f.disconnect();this.T.disconnect();this.R.disconnect()};L.prototype.Xc=function(){return this.ma};C.prototype.hd=function(a){this.R.disconnect();this.R.connect(a);this.T.disconnect();this.T.connect(a)};C.prototype.remove=function(){this.ma.disconnect();this.kd.disconnect();this.Ob.disconnect();this.Pc.disconnect(); this.R.disconnect();this.T.disconnect();this.$k.disconnect()};C.prototype.Xc=function(){return this.ma};w.prototype.hd=function(a){this.R.disconnect();this.R.connect(a);this.T.disconnect();this.T.connect(a)};w.prototype.remove=function(){this.ma.disconnect();this.rb.disconnect();this.Ob.disconnect();this.Pc.disconnect();this.R.disconnect();this.T.disconnect()};w.prototype.Xc=function(){return this.ma};h.prototype.hd=function(a){this.ua.disconnect();this.ua.connect(a)};h.prototype.remove=function(){this.ua.disconnect()}; h.prototype.Xc=function(){return this.ua};m.prototype.hd=function(a){this.ua.disconnect();this.ua.connect(a)};m.prototype.remove=function(){this.Ob.disconnect();this.Pc.disconnect();this.ua.disconnect()};m.prototype.Xc=function(){return this.ua};Q.prototype.hd=function(a){this.T.disconnect();this.T.connect(a);this.R.disconnect();this.R.connect(a)};Q.prototype.remove=function(){this.Ob.disconnect();this.Lj.disconnect();this.ma.disconnect();this.T.disconnect();this.R.disconnect()};Q.prototype.Xc=function(){return this.ma}; S.prototype.MA=function(a,c){.01>a&&(a=.01);this.lm.gain.value=a;this.km.gain.value=Math.pow(1/a,.6)*c};S.prototype.shape=function(a,c,b){var d=1.05*b*c-c;b=0>a?-1:1;a=0>a?-a:a;c=a<c?a:c+d*(1-Math.exp(-(1/d)*(a-c)));return c*b};S.prototype.Oy=function(a,c){for(var b=Math.pow(10,a/20),d=Math.pow(10,c/20),e=0,g=0;32768>g;++g)e=g/32768,e=this.shape(e,b,d),this.Mk[32768+g]=e,this.Mk[32768-g-1]=-e};S.prototype.hd=function(a){this.T.disconnect();this.T.connect(a);this.R.disconnect();this.R.connect(a)}; S.prototype.remove=function(){this.ma.disconnect();this.lm.disconnect();this.cn.disconnect();this.km.disconnect();this.T.disconnect();this.R.disconnect()};S.prototype.Xc=function(){return this.ma};E.prototype.hd=function(a){this.ua.disconnect();this.ua.connect(a)};E.prototype.remove=function(){this.ua.disconnect()};E.prototype.Xc=function(){return this.ua};G.prototype.Ya=function(){this.ua.getFloatFrequencyData(this.Jy);this.ua.getByteTimeDomainData(this.$t);for(var a=this.ua.fftSize,c=0,b=this.Ej= 0,d=0;c<a;c++)d=(this.$t[c]-128)/128,0>d&&(d=-d),this.Ej<d&&(this.Ej=d),b+=d*d;this.Ej=r(this.Ej);r(Math.sqrt(b/a))};G.prototype.hd=function(a){this.ua.disconnect();this.ua.connect(a)};G.prototype.remove=function(){this.ua.disconnect()};G.prototype.Xc=function(){return this.ua};A.prototype.Mj=function(a){this.Ga=a};A.prototype.ol=function(){return!!this.Ga};A.prototype.Ya=function(){};y.prototype.uA=function(){var a,c,b,d;b=a=0;for(c=O.length;a<c;++a)d=O[a],O[b]=d,d.buffer===this?d.stop():++b;O.length= b;this.Ih&&(this.Ih.disconnect(),this.Ih=null);this.Oh&&(this.Oh.disconnect(),this.Oh=null);this.se=this.ra=null};y.prototype.gr=function(){if(!this.ra&&this.se){var a=this;if(v.decodeAudioData)v.decodeAudioData(this.se,function(c){a.ra=c;a.se=null;var b,d,e;if(ia(a.hm)||ba)ia(a.Hk)||(b=a.Hk.$f,b.normalize=a.Ys,b.buffer=c);else if(a.Ph.length){b=0;for(d=a.Ph.length;b<d;b++){c=a.Ph[b];e=new z(a,c.iu);e.Dm(!0);if("undefined"!==typeof c.$s&&(c.Ga=D.lg(c.$s),!c.Ga))continue;if(c.Ga){var g=Sa(c.Ga.x,c.Ga.y, -c.Ga.j.Eb(),$a,Za,!0),h=Sa(c.Ga.x,c.Ga.y,-c.Ga.j.Eb(),$a,Za,!1);e.Ep(g,h,Ia(c.Ga.k-c.Ga.j.Eb()),c.to,c.$o,c.dp);e.Mj(c.Ga)}else e.Ep(c.x,c.y,c.Rg,c.to,c.$o,c.dp);e.play(a.Vo,a.Zp,a.Am);a.fm&&e.pause();O.push(e)}B(a.Ph)}else e=new z(a,a.hm||""),e.play(a.Vo,a.Zp,a.Am),a.fm&&e.pause(),O.push(e)},function(){a.Yk=!0});else if(this.ra=v.createBuffer(this.se,!1),this.se=null,ia(this.hm)||ba)ia(this.Hk)||(c=this.Hk.$f,c.normalize=this.Ys,c.buffer=this.ra);else{var c=new z(this,this.hm);c.play(this.Vo,this.Zp, this.Am);this.fm&&c.pause();O.push(c)}}};y.prototype.Yr=function(){switch(this.ea){case 0:var a=4<=this.ra.readyState;a&&(this.aq=!0);return a||this.aq;case 1:return!!this.se||!!this.ra;case 2:return!0;case 3:return!0}return!1};y.prototype.Ez=function(){switch(this.ea){case 0:return this.Yr();case 1:return!!this.ra;case 2:return!0;case 3:return!0}return!1};y.prototype.sz=function(){switch(this.ea){case 0:return!!this.ra.error;case 1:return this.Yk}return!1};z.prototype.ng=function(){switch(this.ea){case 0:return this.p.ended; case 1:return 1===this.buffer.ea?!this.Yd&&!this.eb&&this.p.loop||this.Lc?!1:this.mh:this.p.ended;case 2:return this.mh;case 3:!0}return!0};z.prototype.kx=function(){return this.Yd||this.eb?!0:this.ng()};z.prototype.Dm=function(a){1===N&&(!this.ge&&a?this.Db&&(this.wb||(this.wb=v.createPanner(),this.wb.panningModel="number"===typeof this.wb.panningModel?Vb:["equalpower","HRTF","soundfield"][Vb],this.wb.distanceModel="number"===typeof this.wb.distanceModel?Wb:["linear","inverse","exponential"][Wb], this.wb.refDistance=Yc,this.wb.maxDistance=ad,this.wb.rolloffFactor=bd),this.Db.disconnect(),this.Db.connect(this.wb),this.wb.connect(p(this.tag)),this.ge=!0):this.ge&&!a&&this.Db&&(this.wb.disconnect(),this.Db.disconnect(),this.Db.connect(p(this.tag)),this.ge=!1))};z.prototype.Ep=function(a,c,b,d,e,g){this.ge&&1===N&&(this.wb.setPosition(a,c,0),this.wb.setOrientation(Math.cos(F(b)),Math.sin(F(b)),0),this.wb.coneInnerAngle=d,this.wb.coneOuterAngle=e,this.wb.coneOuterGain=g,this.pt=a,this.qt=c,this.lt= b,this.mt=d,this.nt=e,this.ot=g)};z.prototype.Mj=function(a){this.ge&&1===N&&(this.Vb||(this.Vb=new A),this.Vb.Mj(a))};z.prototype.Ya=function(a){if(this.ge&&1===N&&this.Vb&&this.Vb.ol()&&this.qg()){this.Vb.Ya(a);a=this.Vb.Ga;var c=Sa(a.x,a.y,-a.j.Eb(),$a,Za,!0),b=Sa(a.x,a.y,-a.j.Eb(),$a,Za,!1);this.wb.setPosition(c,b,0);c=0;"undefined"!==typeof this.Vb.Ga.k&&(c=a.k-a.j.Eb(),this.wb.setOrientation(Math.cos(c),Math.sin(c),0))}};z.prototype.play=function(a,c,b,g){var h=this.p;this.ee=a;this.volume= c;b=b||0;g=g||0;switch(this.ea){case 0:1!==h.playbackRate&&(h.playbackRate=1);h.volume!==c*sa&&(h.volume=c*sa);h.loop!==a&&(h.loop=a);h.muted&&(h.muted=!1);if(h.currentTime!==b)try{h.currentTime=b}catch(f){}k(this);break;case 1:this.muted=!1;this.Jh=1;if(1===this.buffer.ea)this.Db.gain.value=c*sa,this.Yd||(this.p=v.createBufferSource(),this.p.buffer=this.buffer.ra,this.p.connect(this.Db)),this.p.onended=this.ip,this.nk=this.p,this.p.loop=a,this.mh=!1,0===b?e(this.p,g):d(this.p,b,this.uf(),g);else{1!== h.playbackRate&&(h.playbackRate=1);h.loop!==a&&(h.loop=a);h.volume=c*sa;if(h.currentTime!==b)try{h.currentTime=b}catch(m){}k(this)}break;case 2:(!this.Yd&&this.eb||0!==b)&&h.seekTo(b);h.play();this.mh=!1;break;case 3:D.Sb?AppMobi.context.playSound(this.src,a):AppMobi.player.playSound(this.src,a)}this.playbackRate=1;this.startTime=(this.oh?D.Lb.X:D.Ye.X)-b;this.Lc=this.eb=this.Yd=!1};z.prototype.stop=function(){switch(this.ea){case 0:this.p.paused||this.p.pause();break;case 1:1===this.buffer.ea?l(this.p): this.p.paused||this.p.pause();break;case 2:this.p.stop();break;case 3:D.Sb&&AppMobi.context.stopSound(this.src)}this.eb=!0;this.Lc=!1};z.prototype.pause=function(){if(!(this.Yd||this.eb||this.ng()||this.Lc)){switch(this.ea){case 0:this.p.paused||this.p.pause();break;case 1:1===this.buffer.ea?(this.Bc=this.lo(!0),this.ee&&(this.Bc=this.Bc%this.uf()),this.Lc=!0,l(this.p)):this.p.paused||this.p.pause();break;case 2:this.p.pause();break;case 3:D.Sb&&AppMobi.context.stopSound(this.src)}this.Lc=!0}};z.prototype.yA= function(){if(!(this.Yd||this.eb||this.ng())&&this.Lc){switch(this.ea){case 0:k(this);break;case 1:1===this.buffer.ea?(this.p=v.createBufferSource(),this.p.buffer=this.buffer.ra,this.p.connect(this.Db),this.p.onended=this.ip,this.nk=this.p,this.p.loop=this.ee,this.Db.gain.value=sa*this.volume*this.Jh,this.Ym(),this.startTime=(this.oh?D.Lb.X:D.Ye.X)-this.Bc/(this.playbackRate||.001),d(this.p,this.Bc,this.uf())):k(this);break;case 2:this.p.play();break;case 3:D.Sb&&AppMobi.context.resumeSound(this.src)}this.Lc= !1}};z.prototype.seek=function(a){if(!(this.Yd||this.eb||this.ng()))switch(this.ea){case 0:try{this.p.currentTime=a}catch(c){}break;case 1:if(1===this.buffer.ea)this.Lc?this.Bc=a:(this.pause(),this.Bc=a,this.yA());else try{this.p.currentTime=a}catch(b){}break;case 3:D.Sb&&AppMobi.context.seekSound(this.src,a)}};z.prototype.tA=function(a){1===this.ea&&(this.ge?(this.wb.disconnect(),this.wb.connect(a)):(this.Db.disconnect(),this.Db.connect(a)))};z.prototype.uf=function(){var a=0;switch(this.ea){case 0:"undefined"!== typeof this.p.duration&&(a=this.p.duration);break;case 1:a=this.buffer.ra.duration;break;case 2:a=this.p.getDuration();break;case 3:D.Sb&&(a=AppMobi.context.getDurationSound(this.src))}return a};z.prototype.lo=function(a){var c=this.uf(),b=0;switch(this.ea){case 0:"undefined"!==typeof this.p.currentTime&&(b=this.p.currentTime);break;case 1:if(1===this.buffer.ea){if(this.Lc)return this.Bc;b=(this.oh?D.Lb.X:D.Ye.X)-this.startTime}else"undefined"!==typeof this.p.currentTime&&(b=this.p.currentTime);break; case 3:D.Sb&&(b=AppMobi.context.getPlaybackTimeSound(this.src))}a&&(b*=this.playbackRate);!this.ee&&b>c&&(b=c);return b};z.prototype.qg=function(){return!this.Lc&&!this.Yd&&!this.eb&&!this.ng()};z.prototype.TA=function(){return!this.Yd&&!this.eb&&!this.ng()};z.prototype.dB=function(){var a=this.volume*sa;isFinite(a)||(a=0);switch(this.ea){case 0:"undefined"!==typeof this.p.volume&&this.p.volume!==a&&(this.p.volume=a);break;case 1:1===this.buffer.ea?this.Db.gain.value=a*this.Jh:"undefined"!==typeof this.p.volume&& this.p.volume!==a&&(this.p.volume=a)}};z.prototype.Vk=function(a){switch(this.ea){case 0:this.p.muted!==!!a&&(this.p.muted=!!a);break;case 1:1===this.buffer.ea?(this.Jh=a?0:1,this.Db.gain.value=sa*this.volume*this.Jh):this.p.muted!==!!a&&(this.p.muted=!!a)}};z.prototype.OA=function(){this.rh=!0;this.Vk(this.rh||this.bj)};z.prototype.Tt=function(a){this.bj=!!a;this.Vk(this.rh||this.bj)};z.prototype.Ym=function(){var a=this.playbackRate;this.oh&&(a*=D.ci);switch(this.ea){case 0:this.p.playbackRate!== a&&(this.p.playbackRate=a);break;case 1:1===this.buffer.ea?this.p.playbackRate.value!==a&&(this.p.playbackRate.value=a):this.p.playbackRate!==a&&(this.p.playbackRate=a)}};z.prototype.RA=function(a){switch(this.ea){case 0:a?this.qg()?(this.cd=!0,this.p.pause()):this.cd=!1:this.cd&&(this.p.play(),this.cd=!1);break;case 1:a?this.qg()?(this.cd=!0,1===this.buffer.ea?(this.Bc=this.lo(!0),this.ee&&(this.Bc=this.Bc%this.uf()),l(this.p)):this.p.pause()):this.cd=!1:this.cd&&(1===this.buffer.ea?(this.p=v.createBufferSource(), this.p.buffer=this.buffer.ra,this.p.connect(this.Db),this.p.onended=this.ip,this.nk=this.p,this.p.loop=this.ee,this.Db.gain.value=sa*this.volume*this.Jh,this.Ym(),this.startTime=(this.oh?D.Lb.X:D.Ye.X)-this.Bc/(this.playbackRate||.001),d(this.p,this.Bc,this.uf())):this.p.play(),this.cd=!1);break;case 2:a?this.qg()?(this.p.pause(),this.cd=!0):this.cd=!1:this.cd&&(this.cd=!1,this.p.play())}};U.K=function(a){this.type=a;D=this.b=a.b;H=this;this.Mc=null;this.kj=-600;this.b.xl&&(Db=!0);!(this.b.vh||this.b.Wi&& (this.b.Ao||this.b.rl))||this.b.tl||this.b.Ja||this.b.Wr||Db||(Zc=!0);v=null;"undefined"!==typeof AudioContext?(N=1,v=new AudioContext):"undefined"!==typeof webkitAudioContext&&(N=1,v=new webkitAudioContext);this.b.vh&&v&&(v.close&&v.close(),"undefined"!==typeof AudioContext?v=new AudioContext:"undefined"!==typeof webkitAudioContext&&(v=new webkitAudioContext));1!==N&&(this.b.Kc&&"undefined"!==typeof window.Media?N=2:this.b.Xr&&(N=3));2===N&&(J=location.href,a=J.lastIndexOf("/"),-1<a&&(J=J.substr(0, a+1)),J=J.replace("file://",""));if(this.b.Fz&&this.b.Gz&&"undefined"===typeof Audio)alert("It looks like you're using Safari for Windows without Quicktime. Audio cannot be played until Quicktime is installed."),this.b.$e(this);else{if(this.b.Sb)V=this.b.Wi;else try{V=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')&&!this.b.yl}catch(c){V=!1}this.b.ai(this)}};var Ca=U.K.prototype;Ca.G=function(){this.b.Ug=this;Ba=this.n[0];this.Oe=this.n[1];this.hA=0!==this.n[2];this.Rl=0;Vb=this.n[3];Wb= this.n[4];this.kj=-this.n[5];Yc=this.n[6];ad=this.n[7];bd=this.n[8];this.Mc=new A;var a=this.b.N||this.b.width,c=this.b.M||this.b.height;1===N&&(v.listener.setPosition(a/2,c/2,this.kj),v.listener.setOrientation(0,0,1,0,-1,0),window.c2OnAudioMicStream=function(a,c){Ua&&Ua.disconnect();Xb=c.toLowerCase();Ua=v.createMediaStreamSource(a);Ua.connect(p(Xb))});this.b.Jq(function(a){H.cA(a)});var b=this;this.b.ok(function(a){b.Aj(a)})};Ca.Aj=function(a){var c,b,d;c=0;for(b=O.length;c<b;c++)d=O[c],d.Vb&&d.Vb.Ga=== a&&(d.Vb.Ga=null,d.ge&&d.qg()&&d.ee&&d.stop());this.Mc.Ga===a&&(this.Mc.Ga=null)};Ca.Xa=function(){var a={silent:ba,masterVolume:sa,listenerZ:this.kj,listenerUid:this.Mc.ol()?this.Mc.Ga.uid:-1,playing:[],effects:{}},c=a.playing,b,d,e,g,h,f;b=0;for(d=O.length;b<d;b++)e=O[b],!e.TA()||3===this.Oe||e.be&&1===this.Oe||!e.be&&2===this.Oe||(g=e.lo(),e.ee&&(g=g%e.uf()),g={tag:e.tag,buffersrc:e.buffer.src,is_music:e.be,playbackTime:g,volume:e.volume,looping:e.ee,muted:e.rh,playbackRate:e.playbackRate,paused:e.Lc, resume_position:e.Bc},e.ge&&(g.pan={},f=g.pan,e.Vb&&e.Vb.ol()?f.objUid=e.Vb.Ga.uid:(f.x=e.pt,f.y=e.qt,f.a=e.lt),f.ia=e.mt,f.oa=e.nt,f.og=e.ot),c.push(g));c=a.effects;for(h in fa)if(fa.hasOwnProperty(h)){e=[];b=0;for(d=fa[h].length;b<d;b++)e.push({type:fa[h][b].type,params:fa[h][b].ic});c[h]=e}return a};var lb=[];Ca.kb=function(a){var c=a.silent;sa=a.masterVolume;this.kj=a.listenerZ;this.Mc.Mj(null);var b=a.listenerUid;-1!==b&&(this.Mc.Il=b,lb.push(this.Mc));var b=a.playing,d,e,g,f,l,n,k,p,r,u,y;if(3!== this.Oe)for(d=0,e=O.length;d<e;d++)r=O[d],r.be&&1===this.Oe||(r.be||2!==this.Oe)&&r.stop();for(l in fa)if(fa.hasOwnProperty(l))for(d=0,e=fa[l].length;d<e;d++)fa[l][d].remove();Ya(fa);for(l in a.effects)if(a.effects.hasOwnProperty(l))for(n=a.effects[l],d=0,e=n.length;d<e;d++)switch(g=n[d].type,u=n[d].params,g){case "filter":I(l,new t(u[0],u[1],u[2],u[3],u[4],u[5]));break;case "delay":I(l,new q(u[0],u[1],u[2]));break;case "convolve":g=u[2];r=this.jl(g,!1);r.ra?g=new L(r.ra,u[0],u[1],g):(g=new L(null, u[0],u[1],g),r.Ys=u[0],r.Hk=g);I(l,g);break;case "flanger":I(l,new C(u[0],u[1],u[2],u[3],u[4]));break;case "phaser":I(l,new w(u[0],u[1],u[2],u[3],u[4],u[5]));break;case "gain":I(l,new h(u[0]));break;case "tremolo":I(l,new m(u[0],u[1]));break;case "ringmod":I(l,new Q(u[0],u[1]));break;case "distortion":I(l,new S(u[0],u[1],u[2],u[3],u[4]));break;case "compressor":I(l,new E(u[0],u[1],u[2],u[3],u[4]));break;case "analyser":I(l,new G(u[0],u[1]))}d=0;for(e=b.length;d<e;d++)3===this.Oe||(a=b[d],g=a.buffersrc, f=a.is_music,l=a.tag,n=a.playbackTime,k=a.looping,p=a.volume,y=(u=a.pan)&&u.hasOwnProperty("objUid")?u.objUid:-1,f&&1===this.Oe)||!f&&2===this.Oe||((r=this.co(g,l,f,k,p))?(r.Bc=a.resume_position,r.Dm(!!u),r.play(k,p,n),r.Ym(),r.dB(),r.Vk(r.rh||r.bj),a.paused&&r.pause(),a.muted&&r.OA(),r.Vk(r.rh||r.bj),u&&(-1!==y?(r.Vb=r.Vb||new A,r.Vb.Il=y,lb.push(r.Vb)):r.Ep(u.x,u.y,u.a,u.ia,u.oa,u.og))):(r=this.jl(g,f),r.Am=n,r.fm=a.paused,u&&(-1!==y?r.Ph.push({$s:y,to:u.ia,$o:u.oa,dp:u.og,iu:l}):r.Ph.push({x:u.x, y:u.y,Rg:u.a,to:u.ia,$o:u.oa,dp:u.og,iu:l}))));if(c&&!ba){d=0;for(e=O.length;d<e;d++)O[d].Tt(!0);ba=!0}else if(!c&&ba){d=0;for(e=O.length;d<e;d++)O[d].Tt(!1);ba=!1}};Ca.zd=function(){var a,c,b,d;a=0;for(c=lb.length;a<c;a++)b=lb[a],d=this.b.lg(b.Il),b.Mj(d),b.Il=-1,d&&($a=d.x,Za=d.y);B(lb)};Ca.cA=function(a){if(!this.hA){!a&&v&&v.resume&&(v.resume(),Ub=!1);var c,b;c=0;for(b=O.length;c<b;c++)O[c].RA(a);a&&v&&v.suspend&&(v.suspend(),Ub=!0)}};Ca.Ya=function(){var a=this.b.Ae,c,b,d;c=0;for(b=O.length;c< b;c++)d=O[c],d.Ya(a),0!==Ba&&d.Ym();var e,g;for(e in fa)if(fa.hasOwnProperty(e))for(d=fa[e],c=0,b=d.length;c<b;c++)g=d[c],g.Ya&&g.Ya();1===N&&this.Mc.ol()&&(this.Mc.Ya(a),$a=this.Mc.Ga.x,Za=this.Mc.Ga.y,v.listener.setPosition(this.Mc.Ga.x,this.Mc.Ga.y,this.kj))};var mb=[];Ca.PA=function(a){var c,b,d,e,g,h=0;c=0;for(b=a.length;c<b;++c)if(d=a[c],e=d[0],d=2*d[1],(g=4<e.length&&".ogg"===e.substr(e.length-4))&&V||!g&&!V)mb.push({filename:e,size:d,Ga:null}),h+=d;return h};Ca.VA=function(){var a,c,b,d;a= 0;for(c=mb.length;a<c;++a)b=mb[a],d=this.b.al+b.filename,b.Ga=this.jl(d,!1)};Ca.Yy=function(){var a=0,c,b,d;c=0;for(b=mb.length;c<b;++c)d=mb[c],d.Ga.Ez()||d.Ga.sz()||this.b.Ja||this.b.rl?a+=d.size:d.Ga.Yr()&&(a+=Math.floor(d.size/2));return a};Ca.vA=function(){var a,c,b,d;b=a=0;for(c=P.length;a<c;++a)d=P[a],P[b]=d,d.be?d.uA():++b;P.length=b};Ca.jl=function(a,c){var b,d,e,g=null;b=0;for(d=P.length;b<d;b++)if(e=P[b],e.src===a){g=e;break}g||(Db&&c&&this.vA(),g=new y(a,c),P.push(g));return g};Ca.co=function(a, c,b,d,e){var g,h,f;g=0;for(h=O.length;g<h;g++)if(f=O[g],f.src===a&&(f.kx()||b))return f.tag=c,f;a=this.jl(a,b);if(!a.ra)return"<preload>"!==c&&(a.hm=c,a.Vo=d,a.Zp=e),null;f=new z(a,c);O.push(f);return f};var La=[];u.prototype.ik=function(a){return ob(x,a)};U.i=new u;M.prototype.Play=function(a,c,b,d){!ba&&(b=g(b),ma=this.co(this.b.al+a[0]+(V?".ogg":".m4a"),d,a[1],0!==c,b))&&(ma.Dm(!1),ma.play(0!==c,b,0,this.Rl),this.Rl=0)};M.prototype.ew=function(a,c,b,d,e){!ba&&(d=g(d),ma=this.co(this.b.al+c.toLowerCase()+ (V?".ogg":".m4a"),e,1===a,0!==b,d))&&(ma.Dm(!1),ma.play(0!==b,d,0,this.Rl),this.Rl=0)};M.prototype.Jw=function(a){X(a);var c;a=0;for(c=La.length;a<c;a++)La[a].stop()};U.q=new M;T.prototype.Qu=function(a,c){X(c,!0);La.length?a.r(La[0].uf()):a.r(0)};U.D=new T})();function yc(f){this.b=f} (function(){function f(){p&&a&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(function(a){c.aA(a)})}function k(){}function b(){}function n(){}var g=yc.prototype;g.O=function(a){this.fa=a;this.b=a.b};var r=g.O.prototype;r.G=function(){};var p=!1,a=!1;document.addEventListener("DOMContentLoaded",function(){if(window.C2_RegisterSW&&navigator.serviceWorker){var a=document.createElement("script");a.onload=function(){p=!0;f()};a.src="offlineClient.js";document.head.appendChild(a)}}); var c=null;r.et=function(){a=!0;f()};g.K=function(a){this.type=a;this.b=a.b};r=g.K.prototype;r.G=function(){var a=this;window.addEventListener("resize",function(){a.b.trigger(yc.prototype.i.Rv,a)});c=this;"undefined"!==typeof navigator.onLine&&(window.addEventListener("online",function(){a.b.trigger(yc.prototype.i.Ov,a)}),window.addEventListener("offline",function(){a.b.trigger(yc.prototype.i.Mv,a)}));this.b.Sb||(document.addEventListener("appMobi.device.update.available",function(){a.b.trigger(yc.prototype.i.rn, a)}),document.addEventListener("backbutton",function(){a.b.trigger(yc.prototype.i.hk,a)}),document.addEventListener("menubutton",function(){a.b.trigger(yc.prototype.i.sq,a)}),document.addEventListener("searchbutton",function(){a.b.trigger(yc.prototype.i.Uv,a)}),document.addEventListener("tizenhwkey",function(c){var b;switch(c.keyName){case "back":b=a.b.trigger(yc.prototype.i.hk,a);!b&&window.tizen&&window.tizen.application.getCurrentApplication().exit();break;case "menu":(b=a.b.trigger(yc.prototype.i.sq, a))||c.preventDefault()}}));this.b.yl&&"undefined"!==typeof Windows?Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested",function(c){a.b.trigger(yc.prototype.i.hk,a)&&(c.handled=!0)}):this.b.Fo&&WinJS.Application&&(WinJS.Application.onbackclick=function(){return!!a.b.trigger(yc.prototype.i.hk,a)});this.b.Jq(function(c){c?a.b.trigger(yc.prototype.i.Pv,a):a.b.trigger(yc.prototype.i.Qv,a)});this.Jz="undefined"!==typeof window.is_scirra_arcade};r.aA=function(a){a= a.data.type;"downloading-update"===a?this.b.trigger(yc.prototype.i.Zv,this):"update-ready"===a||"update-pending"===a?this.b.trigger(yc.prototype.i.rn,this):"offline-ready"===a&&this.b.trigger(yc.prototype.i.Nv,this)};k.prototype.Ov=function(){return!0};k.prototype.Mv=function(){return!0};k.prototype.rn=function(){return!0};k.prototype.Qv=function(){return!0};k.prototype.Pv=function(){return!0};k.prototype.Rv=function(){return!0};k.prototype.hk=function(){return!0};k.prototype.sq=function(){return!0}; k.prototype.Uv=function(){return!0};k.prototype.Zv=function(){return!0};k.prototype.rn=function(){return!0};k.prototype.Nv=function(){return!0};g.i=new k;b.prototype.Xu=function(a,c){this.b.Zc?CocoonJS.App.openURL(a):this.b.md?ejecta.openURL(a):this.b.Fo?Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(a)):navigator.app&&navigator.app.loadUrl?navigator.app.loadUrl(a,{openExternal:!0}):this.b.Kc?window.open(a,"_system"):this.Jz||this.b.Ja||window.open(a,c)};g.q=new b;n.prototype.gw= function(a){a.yb(this.b.Ja?"":document.referrer)};g.D=new n})();function zc(f){this.b=f} (function(){function f(){}function k(){}var b=zc.prototype;b.O=function(b){this.fa=b;this.b=b.b};b.O.prototype.G=function(){};b.K=function(b){this.type=b;this.b=b.b};var n=b.K.prototype;n.G=function(){this.b.Ja?ga("[Construct 2] Button plugin not supported on this platform - the object will not be created"):(this.nh=1===this.n[0],this.ld=document.createElement("input"),this.Fa=this.nh?document.createElement("label"):this.ld,this.hj=null,this.ld.type=this.nh?"checkbox":"button",this.ld.id=this.n[6], jQuery(this.Fa).appendTo(this.b.zk?this.b.zk:"body"),this.nh?(jQuery(this.ld).appendTo(this.Fa),this.hj=document.createTextNode(this.n[1]),jQuery(this.Fa).append(this.hj),this.ld.checked=0!==this.n[7],jQuery(this.Fa).css("font-family","sans-serif"),jQuery(this.Fa).css("display","inline-block"),jQuery(this.Fa).css("color","black")):this.ld.value=this.n[1],this.Fa.title=this.n[2],this.ld.disabled=0===this.n[4],this.bx=0!==this.n[5],this.gg=!1,0===this.n[3]&&(jQuery(this.Fa).hide(),this.visible=!1,this.gg= !0),this.ld.onclick=function(b){return function(f){f.stopPropagation();b.b.yc=!0;b.b.trigger(zc.prototype.i.lq,b);b.b.yc=!1}}(this),this.Fa.addEventListener("touchstart",function(b){b.stopPropagation()},!1),this.Fa.addEventListener("touchmove",function(b){b.stopPropagation()},!1),this.Fa.addEventListener("touchend",function(b){b.stopPropagation()},!1),jQuery(this.Fa).mousedown(function(b){b.stopPropagation()}),jQuery(this.Fa).mouseup(function(b){b.stopPropagation()}),jQuery(this.Fa).keydown(function(b){b.stopPropagation()}), jQuery(this.Fa).keyup(function(b){b.stopPropagation()}),this.ts=this.us=this.hs=this.os=this.ss=this.ls=0,this.tu(!0),this.b.ai(this))};n.Xa=function(){var b={tooltip:this.Fa.title,disabled:!!this.ld.disabled};this.nh?(b.checked=!!this.ld.checked,b.text=this.hj.nodeValue):b.text=this.Fa.value;return b};n.kb=function(b){this.Fa.title=b.tooltip;this.ld.disabled=b.disabled;this.nh?(this.ld.checked=b.checked,this.hj.nodeValue=b.text):this.Fa.value=b.text};n.Id=function(){this.b.Ja||(jQuery(this.Fa).remove(), this.Fa=null)};n.Ya=function(){this.tu()};n.tu=function(b){if(!this.b.Ja){var f=this.j.La(this.x,this.y,!0),n=this.j.La(this.x,this.y,!1),a=this.j.La(this.x+this.width,this.y+this.height,!0),c=this.j.La(this.x+this.width,this.y+this.height,!1),e=this.b.width/this.b.devicePixelRatio,d=this.b.height/this.b.devicePixelRatio;!this.visible||!this.j.visible||0>=a||0>=c||f>=e||n>=d?(this.gg||jQuery(this.Fa).hide(),this.gg=!0):(1>f&&(f=1),1>n&&(n=1),a>=e&&(a=e-1),c>=d&&(c=d-1),e=window.innerWidth,d=window.innerHeight, b||this.ls!==f||this.ss!==n||this.os!==a||this.hs!==c||this.us!==e||this.ts!==d?(this.ls=f,this.ss=n,this.os=a,this.hs=c,this.us=e,this.ts=d,this.gg&&(jQuery(this.Fa).show(),this.gg=!1),b=Math.round(f)+jQuery(this.b.canvas).offset().left,e=Math.round(n)+jQuery(this.b.canvas).offset().top,jQuery(this.Fa).css("position","absolute"),jQuery(this.Fa).offset({left:b,top:e}),jQuery(this.Fa).width(Math.round(a-f)),jQuery(this.Fa).height(Math.round(c-n)),this.bx&&jQuery(this.Fa).css("font-size",this.j.xc(!0)/ this.b.devicePixelRatio-.2+"em")):this.gg&&(jQuery(this.Fa).show(),this.gg=!1))}};n.Uc=function(){};n.ec=function(){};f.prototype.lq=function(){return!0};b.i=new f;k.prototype.ni=function(b){this.b.Ja||(this.nh?this.hj.nodeValue=b:this.Fa.value=b)};k.prototype.Cw=function(b){this.b.Ja||(this.visible=0!==b)};k.prototype.lw=function(b,f){this.b.Ja||jQuery(this.Fa).css(b,f)};b.q=new k;b.D=new function(){}})();function Ac(f){this.b=f} (function(){function f(){}var k=Ac.prototype;k.O=function(b){this.fa=b;this.b=b.b};k.O.prototype.G=function(){};k.K=function(b){this.type=b;this.b=b.b};k.K.prototype.G=function(){};k.i={};k.q={};f.prototype.Ou=function(b,f){b.yb(Base64.btou(RawDeflate.inflate(Base64.fromBase64(f))))};k.D=new f})();function vc(f){this.b=f} (function(){function f(){this.name="";this.vm=0;this.ic=[]}function k(){p++;p===r.length&&r.push(new f);return r[p]}function b(){}function n(){}var g=vc.prototype;g.O=function(a){this.fa=a;this.b=a.b};g.O.prototype.G=function(){};g.K=function(a){this.type=a;this.b=a.b};var r=[],p=-1;g.K.prototype.G=function(){var a=this;window.c2_callFunction=function(c,b){var d,g,f,n=k();n.name=c.toLowerCase();n.vm=0;if(b)for(n.ic.length=b.length,d=0,g=b.length;d<g;++d)f=b[d],n.ic[d]="number"===typeof f||"string"=== typeof f?f:"boolean"===typeof f?f?1:0:0;else B(n.ic);a.b.trigger(vc.prototype.i.mq,a,n.name);p--;return n.vm}};b.prototype.mq=function(a){var c=0>p?null:r[p];return c?ob(a,c.name):!1};g.i=new b;g.q=new function(){};n.prototype.Du=function(a,c){var b=k();b.name=c.toLowerCase();b.vm=0;B(b.ic);var d,g;d=2;for(g=arguments.length;d<g;d++)b.ic.push(arguments[d]);this.b.trigger(vc.prototype.i.mq,this,b.name);p--;a.Vt(b.vm)};g.D=new n})();function Bc(f){this.b=f} (function(){function f(){}var k=Bc.prototype;k.O=function(b){this.fa=b;this.b=b.b};k.O.prototype.G=function(){};k.K=function(b){this.type=b;this.b=b.b};var b=k.K.prototype;b.G=function(){this.Tq=this.n[0];this.nr=this.n[2];this.mr=this.n[3];this.or=this.n[4];this.My=this.n[5];this.KA=this.n[6];this.Ly=this.n[7];this.JA=this.n[8];this.Ny=this.n[9];this.LA=this.n[10];this.Nk=[];this.Ok=[];this.Pk=[];this.tm=[];this.um=[]};b.Id=function(){};b.Xa=function(){return{}};b.kb=function(){};b.Uc=function(){}; b.ec=function(){};k.i=new function(){};f.prototype.xz=function(){if("function"==typeof window.GameAnalytics.initialize){var b=window.GameAnalytics;this.mr&&b.setEnabledInfoLog(!0);this.or&&b.setEnabledVerboseLog(!0);this.nr&&b.setEnabledManualSessionHandling(!0);0<this.Nk.length&&b.configureAvailableCustomDimensions01(this.Nk);0<this.Ok.length&&b.configureAvailableCustomDimensions02(this.Ok);0<this.Pk.length&&b.configureAvailableCustomDimensions03(this.Pk);0<this.tm.length&&b.configureAvailableResourceCurrencies(this.tm); 0<this.um.length&&b.configureAvailableResourceItemTypes(this.um);b.configureBuild(this.Tq);b.initialize({gameKey:"Android"===window.device.platform?this.Ly:this.Ny,secretKey:"Android"===window.device.platform?this.JA:this.LA,sdkVersion:"construct 2.2.0"})}else"undefined"!=typeof window.gameanalytics.GameAnalytics?(b=window.gameanalytics.GameAnalytics,this.mr&&b.setEnabledInfoLog(!0),this.or&&b.setEnabledVerboseLog(!0),this.nr&&b.setEnabledManualSessionHandling(!0),0<this.Nk.length&&b.configureAvailableCustomDimensions01(this.Nk), 0<this.Ok.length&&b.configureAvailableCustomDimensions02(this.Ok),0<this.Pk.length&&b.configureAvailableCustomDimensions03(this.Pk),0<this.tm.length&&b.configureAvailableResourceCurrencies(this.tm),0<this.um.length&&b.configureAvailableResourceItemTypes(this.um),b.configureBuild(this.Tq),b.configureSdkGameEngineVersion("construct 2.2.0"),b.initialize(this.My,this.KA)):console.log("initialize: GameAnalytics object not found")};f.prototype.Tw=function(b,g){"function"==typeof window.GameAnalytics.addErrorEvent? window.GameAnalytics.addErrorEvent({severity:b,message:g}):"undefined"!=typeof window.gameanalytics.GameAnalytics?window.gameanalytics.GameAnalytics.addErrorEvent(b,g):console.log("addErrorEvent: GameAnalytics object not found")};k.q=new f;k.D=new function(){}})();function Cc(f){this.b=f} (function(){function f(){}var k=Cc.prototype;k.O=function(b){this.fa=b;this.b=b.b};k.O.prototype.G=function(){};k.K=function(b){this.type=b;this.b=b.b;this.gj=Array(256);this.ak=Array(256);this.Ve=0};var b=k.K.prototype;b.G=function(){var b=this;this.b.Ja||(jQuery(document).keydown(function(f){b.fp(f)}),jQuery(document).keyup(function(f){b.gp(f)}))};var n=[32,33,34,35,36,37,38,39,40,44];b.fp=function(b){var f=!1;window!=window.top&&-1<n.indexOf(b.which)&&(b.preventDefault(),f=!0,b.stopPropagation()); if(this.gj[b.which])this.ak[b.which]&&!f&&b.preventDefault();else{this.gj[b.which]=!0;this.Ve=b.which;this.b.yc=!0;this.b.trigger(Cc.prototype.i.rv,this);var k=this.b.trigger(Cc.prototype.i.oq,this),a=this.b.trigger(Cc.prototype.i.Hv,this);this.b.yc=!1;if(k||a)this.ak[b.which]=!0,f||b.preventDefault()}};b.gp=function(b){this.gj[b.which]=!1;this.Ve=b.which;this.b.yc=!0;this.b.trigger(Cc.prototype.i.kq,this);var f=this.b.trigger(Cc.prototype.i.kn,this),k=this.b.trigger(Cc.prototype.i.pq,this);this.b.yc= !1;if(f||k||this.ak[b.which])this.ak[b.which]=!0,b.preventDefault()};b.Dg=function(){var b;for(b=0;256>b;++b)if(this.gj[b]){this.gj[b]=!1;this.Ve=b;this.b.trigger(Cc.prototype.i.kq,this);var f=this.b.trigger(Cc.prototype.i.kn,this),k=this.b.trigger(Cc.prototype.i.pq,this);if(f||k)this.ak[b]=!0}};b.Xa=function(){return{triggerKey:this.Ve}};b.kb=function(b){this.Ve=b.triggerKey};f.prototype.oq=function(b){return b===this.Ve};f.prototype.rv=function(){return!0};f.prototype.kq=function(){return!0};f.prototype.kn= function(b){return b===this.Ve};f.prototype.Hv=function(b){return b===this.Ve};f.prototype.pq=function(b){return b===this.Ve};k.i=new f;k.q=new function(){};k.D=new function(){}})();var Dc=!1; try{!function(){var f,k,b;!function(){var n={},g={};f=function(b,g,a){n[b]={wx:g,jx:a}};b=k=function(f){function p(a){if("."!==a.charAt(0))return a;a=a.split("/");for(var c=f.split("/").slice(0,-1),b=0,d=a.length;d>b;b++){var e=a[b];".."===e?c.pop():"."!==e&&c.push(e)}return c.join("/")}if(b.vC=n,g[f])return g[f];if(g[f]={},!n[f])throw Error("Could not find module "+f);for(var a,c=n[f],e=c.wx,c=c.jx,d=[],l=0,t=e.length;t>l;l++)"exports"===e[l]?d.push(a={}):d.push(k(p(e[l])));e=c.apply(this,d);return g[f]= a||e}}();f("promise/all",["./utils","exports"],function(b,g){var f=b.isArray,k=b.isFunction;g.all=function(a){if(!f(a))throw new TypeError("You must pass an array to all.");return new this(function(c,b){function d(a){return function(b){f[a]=b;0===--n&&c(f)}}var g,f=[],n=a.length;0===n&&c([]);for(var r=0;r<a.length;r++)(g=a[r])&&k(g.then)?g.then(d(r),b):(f[r]=g,0===--n&&c(f))})}});f("promise/asap",["exports"],function(b){function g(){return function(){process.MC(a)}}function f(){var c=0,b=new d(a), e=document.createTextNode("");return b.observe(e,{characterData:!0}),function(){e.data=c=++c%2}}function k(){return function(){l.setTimeout(a,1)}}function a(){for(var a=0;a<t.length;a++){var c=t[a];(0,c[0])(c[1])}t=[]}var c,e="undefined"!=typeof window?window:{},d=e.MutationObserver||e.WebKitMutationObserver,l="undefined"!=typeof global?global:void 0===this?window:this,t=[];c="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?g():d?f():k();b.$w=function(a,b){1===t.push([a, b])&&c()}});f("promise/config",["exports"],function(b){var g={EC:!1};b.br=g;b.nx=function(b,f){return 2!==arguments.length?g[b]:void(g[b]=f)}});f("promise/polyfill",["./promise","./utils","exports"],function(b,g,f){var k=b.Promise,a=g.isFunction;f.iA=function(){var c;c="undefined"!=typeof global?global:"undefined"!=typeof window&&window.document?window:self;"Promise"in c&&"resolve"in c.Promise&&"reject"in c.Promise&&"all"in c.Promise&&"race"in c.Promise&&function(){var b;return new c.Promise(function(a){b= a}),a(b)}()||(c.Promise=k)}});f("promise/promise","./config ./utils ./all ./race ./resolve ./reject ./asap exports".split(" "),function(b,g,f,k,a,c,e,d){function l(a){if(!y(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof l))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.mk=[];t(a,this)}function t(a,c){function b(a){h(c, a)}function d(a){Q(c,a)}try{a(b,d)}catch(e){d(e)}}function q(a,c,b,d){var e,g,f,m,l=y(b);if(l)try{e=b(d),f=!0}catch(k){m=!0,g=k}else e=d,f=!0;w(c,e)||(l&&f?h(c,e):m?Q(c,g):a===X?h(c,e):a===I&&Q(c,e))}function L(a,c,b,d){a=a.mk;var e=a.length;a[e]=c;a[e+X]=b;a[e+I]=d}function C(a,c){for(var b,d,e=a.mk,g=a.lk,h=0;h<e.length;h+=3)b=e[h],d=e[h+c],q(c,b,d,g);a.mk=null}function w(a,c){var b,d=null;try{if(a===c)throw new TypeError("A promises callback cannot return that same promise.");if(A(c)&&(d=c.then, y(d)))return d.call(c,function(d){return b?!0:(b=!0,void(c!==d?h(a,d):m(a,d)))},function(c){return b?!0:(b=!0,void Q(a,c))}),!0}catch(e){return b?!0:(Q(a,e),!0)}return!1}function h(a,c){a===c?m(a,c):w(a,c)||m(a,c)}function m(a,c){a.qe===z&&(a.qe=R,a.lk=c,G.async(S,a))}function Q(a,c){a.qe===z&&(a.qe=R,a.lk=c,G.async(E,a))}function S(a){C(a,a.qe=X)}function E(a){C(a,a.qe=I)}var G=b.br,A=(b.nx,g.Vz),y=g.isFunction;b=(g.now,f.all);k=k.race;a=a.resolve;c=c.reject;G.async=e.$w;var z=void 0,R=0,X=1,I=2; l.prototype={constructor:l,qe:void 0,lk:void 0,mk:void 0,then:function(a,c){var b=this,d=new this.constructor(function(){});if(this.qe){var e=arguments;G.async(function(){q(b.qe,d,e[b.qe-1],b.lk)})}else L(this,d,a,c);return d},"catch":function(a){return this.then(null,a)}};l.all=b;l.race=k;l.resolve=a;l.reject=c;d.Promise=l});f("promise/race",["./utils","exports"],function(b,g){var f=b.isArray;g.race=function(b){if(!f(b))throw new TypeError("You must pass an array to race.");return new this(function(a, c){for(var e,d=0;d<b.length;d++)(e=b[d])&&"function"==typeof e.then?e.then(a,c):a(e)})}});f("promise/reject",["exports"],function(b){b.reject=function(b){return new this(function(f,k){k(b)})}});f("promise/resolve",["exports"],function(b){b.resolve=function(b){return b&&"object"==typeof b&&b.constructor===this?b:new this(function(f){f(b)})}});f("promise/utils",["exports"],function(b){function g(b){return"function"==typeof b}var f=Date.now||function(){return(new Date).getTime()};b.Vz=function(b){return g(b)|| "object"==typeof b&&null!==b};b.isFunction=g;b.isArray=function(b){return"[object Array]"===Object.prototype.toString.call(b)};b.now=f});k("promise/polyfill").iA()}();var Ec=function(){return function(f){function k(n){if(b[n])return b[n].Wd;var g=b[n]={Wd:{},id:n,loaded:!1};return f[n].call(g.Wd,g,g.Wd,k),g.loaded=!0,g.Wd}var b={};return k.te=f,k.vi=b,k.Dj="",k(0)}([function(f,k,b){k.kk=!0;var n=function(g){function f(a,c){a[c]=function(){var b=arguments;return a.ready().then(function(){return a[c].apply(a, b)})}}function k(){for(var a=1;a<arguments.length;a++){var c=arguments[a];if(c)for(var b in c)c.hasOwnProperty(b)&&(q(c[b])?arguments[0][b]=c[b].slice():arguments[0][b]=c[b])}return arguments[0]}function a(a){for(var c in e)if(e.hasOwnProperty(c)&&e[c]===a)return!0;return!1}var c={},e={li:"asyncStorage",mi:"localStorageWrapper",oi:"webSQLStorage"},d="clear getItem iterate key keys length removeItem setItem".split(" "),l={description:"",ah:[e.li,e.oi,e.mi].slice(),name:"localforage",size:4980736,Ha:"keyvaluepairs", version:1},n=function(a){var c={},b;try{var d=d||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.lr||a.msIndexedDB;b="undefined"!=typeof a.openDatabase&&a.navigator&&a.navigator.userAgent&&/Safari/.test(a.navigator.userAgent)&&!/Chrome/.test(a.navigator.userAgent)?!1:d&&"function"==typeof d.open&&"undefined"!=typeof a.IDBKeyRange}catch(g){b=!1}c[e.li]=!!b;var f;try{f=a.openDatabase}catch(l){f=!1}c[e.oi]=!!f;var k;try{k=a.localStorage&&"setItem"in a.localStorage&&a.localStorage.setItem}catch(n){k= !1}return c[e.mi]=!!k,c}(g),q=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};return new (function(){function g(a){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");this.li=e.li;this.mi=e.mi;this.oi=e.oi;this.xn=k({},l);this.Tf=k({},this.xn,a);this.Cq=this.Sd=null;this.df=!1;this.Ca=null;this.Dq();this.Pt(this.Tf.ah)}return g.prototype.br=function(a){if("object"==typeof a){if(this.df)return Error("Can't call config() after localforage has been used."); for(var c in a)"storeName"===c&&(a[c]=a[c].replace(/\W/g,"_")),this.Tf[c]=a[c];return"driver"in a&&a.ah&&this.Pt(this.Tf.ah),!0}return"string"==typeof a?this.Tf[a]:this.Tf},g.prototype.ah=function(){return this.pi||null},g.prototype.Fr=function(d,e,g){var f=this,l=function(){if(a(d))switch(d){case f.li:return new Promise(function(a){a(b(1))});case f.mi:return new Promise(function(a){a(b(2))});case f.oi:return new Promise(function(a){a(b(4))})}else if(c[d])return Promise.resolve(c[d]);return Promise.reject(Error("Driver not found."))}(); return l.then(e,g),l},g.prototype.ready=function(a){var c=this,b=c.Sd.then(function(){return null===c.df&&(c.df=c.Cq()),c.df});return b.then(a,a),b},g.prototype.Pt=function(a,c,b){function d(){g.Tf.ah=g.ah()}function e(a){return function(){function c(){for(;b<a.length;){var e=a[b];return b++,g.Ca=null,g.df=null,g.Fr(e).then(function(a){return g.Ow(a),d(),g.df=g.zn(g.Tf),g.df})["catch"](c)}d();return g.Sd=Promise.reject(Error("No available storage method found.")),g.Sd}var b=0;return c()}}var g=this; q(a)||(a=[a]);var f=this.Pw(a);return this.Sd=(null!==this.Sd?this.Sd["catch"](function(){return Promise.resolve()}):Promise.resolve()).then(function(){var a=f[0];return g.Ca=null,g.df=null,g.Fr(a).then(function(a){g.pi=a.pi;d();g.Dq();g.Cq=e(f)})})["catch"](function(){d();return g.Sd=Promise.reject(Error("No available storage method found.")),g.Sd}),this.Sd.then(c,b),this.Sd},g.prototype.supports=function(a){return!!n[a]},g.prototype.Ow=function(a){k(this,a)},g.prototype.Pw=function(a){for(var c= [],b=0,d=a.length;d>b;b++){var e=a[b];this.supports(e)&&c.push(e)}return c},g.prototype.Dq=function(){for(var a=0;a<d.length;a++)f(this,d[a])},g.prototype.Ik=function(a){return new g(a)},g}())}("undefined"!=typeof window?window:self);k["default"]=n;f.Wd=k["default"]},function(f,k){k.kk=!0;k["default"]=function(b){function f(a,c){a=a||[];c=c||{};try{return new Blob(a,c)}catch(d){if("TypeError"!==d.name)throw d;for(var e=new (b.BlobBuilder||b.te||b.fr||b.WebKitBlobBuilder),g=0;g<a.length;g+=1)e.append(a[g]); return e.getBlob(c.type)}}function g(a){return new Promise(function(c,b){var d=new XMLHttpRequest;d.open("GET",a);d.withCredentials=!0;d.responseType="arraybuffer";d.onreadystatechange=function(){return 4===d.readyState?200===d.status?c({response:d.response,type:d.getResponseHeader("Content-Type")}):void b({status:d.status,response:d.response}):void 0};d.send()})}function k(a){return(new Promise(function(c,b){var d=f([""],{type:"image/png"}),e=a.transaction([z],"readwrite");e.objectStore(z).put(d, "key");e.oncomplete=function(){var d=a.transaction([z],"readwrite").objectStore(z).get("key");d.onerror=b;d.onsuccess=function(a){var b=URL.createObjectURL(a.target.result);g(b).then(function(a){c(!(!a||"image/png"!==a.type))},function(){c(!1)}).then(function(){URL.revokeObjectURL(b)})}};e.onerror=e.onabort=b}))["catch"](function(){return!1})}function p(a){return"boolean"==typeof A?Promise.resolve(A):k(a).then(function(a){return A=a})}function a(a){return new Promise(function(c,b){var d=new FileReader; d.onerror=b;d.onloadend=function(b){c({Bq:!0,data:btoa(b.target.result||""),type:a.type})};d.readAsBinaryString(a)})}function c(a){for(var c=atob(a.data),b=c.length,d=new ArrayBuffer(b),e=new Uint8Array(d),g=0;b>g;g++)e[g]=c.charCodeAt(g);return f([d],{type:a.type})}function e(a){var c=this,b=c.yn().then(function(){var a=y[c.Ca.name];return a&&a.Zg?a.Zg:void 0});return b.then(a,a),b}function d(a){a=y[a.name];var c={};c.promise=new Promise(function(a){c.resolve=a});a.hr.push(c);a.Zg?a.Zg=a.Zg.then(function(){return c.promise}): a.Zg=c.promise}function l(a){function c(){return Promise.resolve()}var d=this,g={db:null};if(a)for(var h in a)g[h]=a[h];y||(y={});var f=y[g.name];f||(f={fl:[],db:null,Zg:null,hr:[]},y[g.name]=f);f.fl.push(d);d.yn||(d.yn=d.ready,d.ready=e);a=[];for(h=0;h<f.fl.length;h++){var m=f.fl[h];m!==d&&a.push(m.yn()["catch"](c))}var l=f.fl.slice(0);return Promise.all(a).then(function(){return g.db=f.db,t(g,!1)}).then(function(a){g.db=a;var c;c=d.xn.version;if(g.db){var e=!g.db.objectStoreNames.contains(g.Ha), h=g.version>g.db.version;(g.version<g.db.version&&(g.version!==c&&b.console.warn('The database "'+g.name+"\" can't be downgraded from version "+g.db.version+" to version "+g.version+"."),g.version=g.db.version),h||e)?(e&&(c=g.db.version+1,c>g.version&&(g.version=c)),c=!0):c=!1}else c=!0;return c?t(g,!0):a}).then(function(a){g.db=f.db=a;d.Ca=g;for(a=0;a<l.length;a++){var c=l[a];c!==d&&(c.Ca.db=g.db,c.Ca.version=g.version)}})}function t(a,c){return new Promise(function(e,g){if(a.db){if(!c)return e(a.db); d(a);a.db.close()}var h=[a.name];c&&h.push(a.version);var f=G.open.apply(G,h);c&&(f.onupgradeneeded=function(c){var d=f.result;try{d.createObjectStore(a.Ha),1>=c.oldVersion&&d.createObjectStore(z)}catch(e){if("ConstraintError"!==e.name)throw e;b.console.warn('The database "'+a.name+'" has been upgraded from version '+c.oldVersion+" to version "+c.newVersion+', but the storage "'+a.Ha+'" already exists.')}});f.onerror=function(){g(f.error)};f.onsuccess=function(){e(f.result);var c=y[a.name].hr.pop(); c&&c.resolve()}})}function q(a,d){var e=this;"string"!=typeof a&&(b.console.warn(a+" used as a key, but it is not a string."),a=String(a));var g=new Promise(function(b,d){e.ready().then(function(){var g=e.Ca,h=g.db.transaction(g.Ha,"readonly").objectStore(g.Ha).get(a);h.onsuccess=function(){var a=h.result;void 0===a&&(a=null);a&&a.Bq&&(a=c(a));b(a)};h.onerror=function(){d(h.error)}})["catch"](d)});return E(g,d),g}function L(a,b){var d=this,e=new Promise(function(b,e){d.ready().then(function(){var g= d.Ca,h=g.db.transaction(g.Ha,"readonly").objectStore(g.Ha).openCursor(),f=1;h.onsuccess=function(){var d=h.result;if(d){var e=d.value;e&&e.Bq&&(e=c(e));e=a(e,d.key,f++);void 0!==e?b(e):d["continue"]()}else b()};h.onerror=function(){e(h.error)}})["catch"](e)});return E(e,b),e}function C(c,d,e){var g=this;"string"!=typeof c&&(b.console.warn(c+" used as a key, but it is not a string."),c=String(c));var h=new Promise(function(b,e){var h;g.ready().then(function(){return h=g.Ca,d instanceof Blob?p(h.db).then(function(c){return c? d:a(d)}):d}).then(function(a){var d=h.db.transaction(h.Ha,"readwrite"),g=d.objectStore(h.Ha);null===a&&(a=void 0);d.oncomplete=function(){void 0===a&&(a=null);b(a)};d.onabort=d.onerror=function(){e(f.error?f.error:f.transaction.error)};var f=g.put(a,c)})["catch"](e)});return E(h,e),h}function w(a,c){var d=this;"string"!=typeof a&&(b.console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new Promise(function(c,b){d.ready().then(function(){var e=d.Ca,g=e.db.transaction(e.Ha,"readwrite"), h=g.objectStore(e.Ha)["delete"](a);g.oncomplete=function(){c()};g.onerror=function(){b(h.error)};g.onabort=function(){b(h.error?h.error:h.transaction.error)}})["catch"](b)});return E(e,c),e}function h(a){var c=this,b=new Promise(function(a,b){c.ready().then(function(){var d=c.Ca,e=d.db.transaction(d.Ha,"readwrite"),g=e.objectStore(d.Ha).clear();e.oncomplete=function(){a()};e.onabort=e.onerror=function(){b(g.error?g.error:g.transaction.error)}})["catch"](b)});return E(b,a),b}function m(a){var c=this, b=new Promise(function(a,b){c.ready().then(function(){var d=c.Ca,e=d.db.transaction(d.Ha,"readonly").objectStore(d.Ha).count();e.onsuccess=function(){a(e.result)};e.onerror=function(){b(e.error)}})["catch"](b)});return E(b,a),b}function Q(a,c){var b=this,d=new Promise(function(c,d){return 0>a?void c(null):void b.ready().then(function(){var e=b.Ca,g=!1,h=e.db.transaction(e.Ha,"readonly").objectStore(e.Ha).openCursor();h.onsuccess=function(){var b=h.result;return b?void(0===a?c(b.key):g?c(b.key):(g= !0,b.advance(a))):void c(null)};h.onerror=function(){d(h.error)}})["catch"](d)});return E(d,c),d}function S(a){var c=this,b=new Promise(function(a,b){c.ready().then(function(){var d=c.Ca,e=d.db.transaction(d.Ha,"readonly").objectStore(d.Ha).openCursor(),g=[];e.onsuccess=function(){var c=e.result;return c?(g.push(c.key),void c["continue"]()):void a(g)};e.onerror=function(){b(e.error)}})["catch"](b)});return E(b,a),b}function E(a,c){c&&a.then(function(a){c(null,a)},function(a){c(a)})}var G=G||b.indexedDB|| b.webkitIndexedDB||b.mozIndexedDB||b.lr||b.msIndexedDB;if(G){var A,y,z="local-forage-detect-blob-support";return{pi:"asyncStorage",zn:l,es:L,getItem:q,setItem:C,removeItem:w,clear:h,length:m,key:Q,keys:S}}}("undefined"!=typeof window?window:self);f.Wd=k["default"]},function(f,k,b){k.kk=!0;k["default"]=function(f){function g(a,c){c&&a.then(function(a){c(null,a)},function(a){c(a)})}var k=null;try{if(!(f.localStorage&&"setItem"in f.localStorage))return;k=f.localStorage}catch(p){return}return{pi:"localStorageWrapper", zn:function(a){var c={};if(a)for(var e in a)c[e]=a[e];return c.de=c.name+"/",c.Ha!==this.xn.Ha&&(c.de+=c.Ha+"/"),this.Ca=c,(new Promise(function(a){a(b(3))})).then(function(a){return c.Hg=a,Promise.resolve()})},es:function(a,c){var b=this,d=b.ready().then(function(){for(var c=b.Ca,d=c.de,g=d.length,f=k.length,n=1,p=0;f>p;p++){var h=k.key(p);if(0===h.indexOf(d)){var m=k.getItem(h);if(m&&(m=c.Hg.Tk(m)),m=a(m,h.substring(g),n++),void 0!==m)return m}}});return g(d,c),d},getItem:function(a,c){var b=this; "string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=b.ready().then(function(){var c=b.Ca,d=k.getItem(c.de+a);return d&&(d=c.Hg.Tk(d)),d});return g(d,c),d},setItem:function(a,c,b){var d=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var l=d.ready().then(function(){void 0===c&&(c=null);var b=c;return new Promise(function(e,g){var f=d.Ca;f.Hg.serialize(c,function(c,d){if(d)g(d);else try{k.setItem(f.de+ a,c),e(b)}catch(m){"QuotaExceededError"!==m.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==m.name||g(m),g(m)}})})});return g(l,b),l},removeItem:function(a,c){var b=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=b.ready().then(function(){k.removeItem(b.Ca.de+a)});return g(d,c),d},clear:function(a){var c=this,b=c.ready().then(function(){for(var a=c.Ca.de,b=k.length-1;0<=b;b--){var e=k.key(b);0===e.indexOf(a)&&k.removeItem(e)}});return g(b,a),b},length:function(a){var c= this.keys().then(function(a){return a.length});return g(c,a),c},key:function(a,c){var b=this,d=b.ready().then(function(){var c,d=b.Ca;try{c=k.key(a)}catch(g){c=null}return c&&(c=c.substring(d.de.length)),c});return g(d,c),d},keys:function(a){var c=this,b=c.ready().then(function(){for(var a=c.Ca,b=k.length,e=[],g=0;b>g;g++)0===k.key(g).indexOf(a.de)&&e.push(k.key(g).substring(a.de.length));return e});return g(b,a),b}}}("undefined"!=typeof window?window:self);f.Wd=k["default"]},function(f,k){k.kk=!0; k["default"]=function(b){function f(a){var c,b,d,g,n;c=.75*a.length;var q=a.length,p=0;"="===a[a.length-1]&&(c--,"="===a[a.length-2]&&c--);var C=new ArrayBuffer(c),w=new Uint8Array(C);for(c=0;q>c;c+=4)b=k.indexOf(a[c]),d=k.indexOf(a[c+1]),g=k.indexOf(a[c+2]),n=k.indexOf(a[c+3]),w[p++]=b<<2|d>>4,w[p++]=(15&d)<<4|g>>2,w[p++]=(3&g)<<6|63&n;return C}function g(a){var c=new Uint8Array(a),b="";for(a=0;a<c.length;a+=3)b+=k[c[a]>>2],b+=k[(3&c[a])<<4|c[a+1]>>4],b+=k[(15&c[a+1])<<2|c[a+2]>>6],b+=k[63&c[a+2]]; return 2===c.length%3?b=b.substring(0,b.length-1)+"=":1===c.length%3&&(b=b.substring(0,b.length-2)+"=="),b}var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=/^~~local_forage_type~([^~]+)~/;return{serialize:function(a,c){var b="";if(a&&(b=a.toString()),a&&("[object ArrayBuffer]"===a.toString()||a.buffer&&"[object ArrayBuffer]"===a.buffer.toString())){var d,f="__lfsc__:";a instanceof ArrayBuffer?(d=a,f+="arbf"):(d=a.buffer,"[object Int8Array]"===b?f+="si08":"[object Uint8Array]"=== b?f+="ui08":"[object Uint8ClampedArray]"===b?f+="uic8":"[object Int16Array]"===b?f+="si16":"[object Uint16Array]"===b?f+="ur16":"[object Int32Array]"===b?f+="si32":"[object Uint32Array]"===b?f+="ui32":"[object Float32Array]"===b?f+="fl32":"[object Float64Array]"===b?f+="fl64":c(Error("Failed to get type for BinaryArray")));c(f+g(d))}else if("[object Blob]"===b)b=new FileReader,b.onload=function(){var b="~~local_forage_type~"+a.type+"~"+g(this.result);c("__lfsc__:blob"+b)},b.readAsArrayBuffer(a);else try{c(JSON.stringify(a))}catch(k){console.error("Couldn't convert value into a JSON string: ", a),c(null,k)}},Tk:function(a){if("__lfsc__:"!==a.substring(0,9))return JSON.parse(a);var c,e=a.substring(13);a=a.substring(9,13);if("blob"===a&&p.test(e)){var d=e.match(p);c=d[1];e=e.substring(d[0].length)}e=f(e);switch(a){case "arbf":return e;case "blob":var g;e=[e];c={type:c};e=e||[];c=c||{};try{g=new Blob(e,c)}catch(k){if("TypeError"!==k.name)throw k;g=new (b.BlobBuilder||b.te||b.fr||b.WebKitBlobBuilder);for(a=0;a<e.length;a+=1)g.append(e[a]);g=g.getBlob(c.type)}return g;case "si08":return new Int8Array(e); case "ui08":return new Uint8Array(e);case "uic8":return new Uint8ClampedArray(e);case "si16":return new Int16Array(e);case "ur16":return new Uint16Array(e);case "si32":return new Int32Array(e);case "ui32":return new Uint32Array(e);case "fl32":return new Float32Array(e);case "fl64":return new Float64Array(e);default:throw Error("Unkown type: "+a);}},TC:f,yC:g}}("undefined"!=typeof window?window:self);f.Wd=k["default"]},function(f,k,b){k.kk=!0;k["default"]=function(f){function g(a){var c=this,d={db:null}; if(a)for(var e in a)d[e]="string"!=typeof a[e]?a[e].toString():a[e];var g=new Promise(function(a,b){try{d.db=L(d.name,String(d.version),d.description,d.size)}catch(e){return b(e)}d.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+d.Ha+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){c.Ca=d;a()},function(a,c){b(c)})})});return(new Promise(function(a){a(b(3))})).then(function(a){return d.Hg=a,g})}function k(a,c){var b=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."), a=String(a));var d=new Promise(function(c,d){b.ready().then(function(){var e=b.Ca;e.db.transaction(function(b){b.executeSql("SELECT * FROM "+e.Ha+" WHERE key = ? LIMIT 1",[a],function(a,b){var d=b.rows.length?b.rows.item(0).value:null;d&&(d=e.Hg.Tk(d));c(d)},function(a,c){d(c)})})})["catch"](d)});return q(d,c),d}function p(a,c){var b=this,d=new Promise(function(c,d){b.ready().then(function(){var e=b.Ca;e.db.transaction(function(b){b.executeSql("SELECT * FROM "+e.Ha,[],function(b,d){for(var g=d.rows, h=g.length,f=0;h>f;f++){var m=g.item(f),l=m.value;if(l&&(l=e.Hg.Tk(l)),l=a(l,m.key,f+1),void 0!==l)return void c(l)}c()},function(a,c){d(c)})})})["catch"](d)});return q(d,c),d}function a(a,c,b){var d=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new Promise(function(b,e){d.ready().then(function(){void 0===c&&(c=null);var g=c,h=d.Ca;h.Hg.serialize(c,function(c,d){d?e(d):h.db.transaction(function(d){d.executeSql("INSERT OR REPLACE INTO "+h.Ha+ " (key, value) VALUES (?, ?)",[a,c],function(){b(g)},function(a,c){e(c)})},function(a){a.code===a.QUOTA_ERR&&e(a)})})})["catch"](e)});return q(e,b),e}function c(a,c){var b=this;"string"!=typeof a&&(f.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new Promise(function(c,d){b.ready().then(function(){var e=b.Ca;e.db.transaction(function(b){b.executeSql("DELETE FROM "+e.Ha+" WHERE key = ?",[a],function(){c()},function(a,c){d(c)})})})["catch"](d)});return q(d,c),d}function e(a){var c= this,b=new Promise(function(a,b){c.ready().then(function(){var d=c.Ca;d.db.transaction(function(c){c.executeSql("DELETE FROM "+d.Ha,[],function(){a()},function(a,c){b(c)})})})["catch"](b)});return q(b,a),b}function d(a){var c=this,b=new Promise(function(a,b){c.ready().then(function(){var d=c.Ca;d.db.transaction(function(c){c.executeSql("SELECT COUNT(key) as c FROM "+d.Ha,[],function(c,b){var d=b.rows.item(0).vi;a(d)},function(a,c){b(c)})})})["catch"](b)});return q(b,a),b}function l(a,c){var b=this, d=new Promise(function(c,d){b.ready().then(function(){var e=b.Ca;e.db.transaction(function(b){b.executeSql("SELECT key FROM "+e.Ha+" WHERE id = ? LIMIT 1",[a+1],function(a,b){var d=b.rows.length?b.rows.item(0).key:null;c(d)},function(a,c){d(c)})})})["catch"](d)});return q(d,c),d}function t(a){var c=this,b=new Promise(function(a,b){c.ready().then(function(){var d=c.Ca;d.db.transaction(function(c){c.executeSql("SELECT key FROM "+d.Ha,[],function(c,b){for(var d=[],e=0;e<b.rows.length;e++)d.push(b.rows.item(e).key); a(d)},function(a,c){b(c)})})})["catch"](b)});return q(b,a),b}function q(a,c){c&&a.then(function(a){c(null,a)},function(a){c(a)})}var L=f.openDatabase;if(L)return{pi:"webSQLStorage",zn:g,es:p,getItem:k,setItem:a,removeItem:c,clear:e,length:d,key:l,keys:t}}("undefined"!=typeof window?window:self);f.Wd=k["default"]}])};"object"==typeof exports&&"object"==typeof module?module.Wd=Ec():"function"==typeof define&&define.xC?define([],Ec):"object"==typeof exports?exports.localforage=Ec():this.localforage= Ec()}catch(Fc){Dc=!0}function Gc(f){this.b=f} (function(){function f(a){return a?"string"===typeof a?a:"string"===typeof a.message?a.message:"string"===typeof a.name?a.name:"string"===typeof a.data?a.data:"unknown error":"unknown error"}function k(a){p="storage failed to initialise - may be disabled in browser settings";a.b.trigger(Gc.prototype.i.cf,a)}function b(){}function n(){}function g(){}var r="",p="",a="";"undefined"!==typeof window.is_scirra_arcade&&(a="sa"+window.scirra_arcade_id+"_");var c=Gc.prototype;c.O=function(a){this.fa=a;this.b= a.b};c.O.prototype.G=function(){};c.K=function(a){this.type=a;this.b=a.b};var e=c.K.prototype;e.G=function(){this.lp=0};e.Id=function(){};e.Xa=function(){return{}};e.kb=function(){};b.prototype.Fv=function(a){return r===a};b.prototype.qv=function(){return!0};b.prototype.cf=function(){return!0};b.prototype.Ev=function(a){return r===a};b.prototype.nq=function(a){return r===a};b.prototype.nv=function(){return!0};c.i=new b;n.prototype.uw=function(c,b){if(Dc)k(this);else{var e=a+c;this.lp++;var g=this; localforage.setItem(e,b,function(a){g.lp--;a?(p=f(a),g.b.trigger(Gc.prototype.i.cf,g)):(r=c,g.b.trigger(Gc.prototype.i.qv,g),g.b.trigger(Gc.prototype.i.Fv,g),r="");0===g.lp&&g.b.trigger(Gc.prototype.i.nv,g)})}};n.prototype.Eu=function(c){if(Dc)k(this);else{var b=this;localforage.getItem(a+c,function(a,e){a?(p=f(a),b.b.trigger(Gc.prototype.i.cf,b)):(r=c,null===e?b.b.trigger(Gc.prototype.i.nq,b):b.b.trigger(Gc.prototype.i.Ev,b),r="")})}};c.q=new n;g.prototype.Ru=function(a){a.yb(p)};c.D=new g})(); function W(f){this.b=f} (function(){function f(){if(0===this.Pn.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var c=a.getContext("2d");this.Xh?c.drawImage(this.L,this.Lh,this.Mh,this.width,this.height,0,0,this.width,this.height):c.drawImage(this.L,0,0,this.width,this.height);this.Pn=a.toDataURL("image/png")}return this.Pn}function k(){}function b(a){a[0]=0;a[1]=0;a[2]=0;t.push(a)}function n(a,c){return a<c?""+a+","+c:""+c+","+a}function g(a,c,b,d){c=c.uid;b=b.uid;var e=n(c,b);if(a.hasOwnProperty(e))a[e][2]= d;else{var g=t.length?t.pop():[0,0,0];g[0]=c;g[1]=b;g[2]=d;a[e]=g}}function r(a,c,d){c=n(c.uid,d.uid);a.hasOwnProperty(c)&&(b(a[c]),delete a[c])}function p(a,c,b){c=n(c.uid,b.uid);if(a.hasOwnProperty(c))return q=a[c][2],!0;q=-2;return!1}function a(){}var c=W.prototype;c.O=function(a){this.fa=a;this.b=a.b};var e=c.O.prototype;e.G=function(){if(!this.J){var a,c,b,d,e,g,l,k,n;this.Ad=[];this.Si=!1;a=0;for(c=this.Hc.length;a<c;a++){e=this.Hc[a];l={};l.name=e[0];l.speed=e[1];l.loop=e[2];l.xp=e[3];l.yp= e[4];l.Ne=e[5];l.ka=e[6];l.frames=[];b=0;for(d=e[7].length;b<d;b++)g=e[7][b],k={},k.Pm=g[0],k.Lp=g[1],k.Lh=g[2],k.Mh=g[3],k.width=g[4],k.height=g[5],k.duration=g[6],k.mc=g[7],k.nc=g[8],k.uo=g[9],k.im=g[10],k.xt=g[11],k.Xh=0!==k.width,k.Pn="",k.CC=f,n={left:0,top:0,right:1,bottom:1},k.Fp=n,k.Y=null,(n=this.b.Iy(g[0]))?k.L=n:(k.L=new Image,k.L.qx=g[0],k.L.cr=g[1],k.L.ix=null,this.b.$p(k.L,g[0])),l.frames.push(k),this.Ad.push(k);this.Hc[a]=l}}};e.su=function(){var a,c,b;a=0;for(c=this.e.length;a<c;a++)b= this.e[a],b.Kk=b.Sa.Y};e.Cj=function(){if(!this.J){var a,c,b;a=0;for(c=this.Ad.length;a<c;++a)b=this.Ad[a],b.L.ix=null,b.Y=null;this.Si=!1;this.su()}};e.Xl=function(){if(!this.J&&this.e.length){var a,c,b;a=0;for(c=this.Ad.length;a<c;++a)b=this.Ad[a],b.Y=this.b.u.Eh(b.L,!1,this.b.Na,b.xt);this.su()}};e.Qo=function(){if(!this.J&&!this.Si&&this.b.u){var a,c,b;a=0;for(c=this.Ad.length;a<c;++a)b=this.Ad[a],b.Y=this.b.u.Eh(b.L,!1,this.b.Na,b.xt);this.Si=!0}};e.Wm=function(){if(!this.J&&!this.e.length&& this.Si){var a,c,b;a=0;for(c=this.Ad.length;a<c;++a)b=this.Ad[a],this.b.u.deleteTexture(b.Y),b.Y=null;this.Si=!1}};var d=[];e.mm=function(a){var c,b,e;B(d);c=0;for(b=this.Ad.length;c<b;++c)e=this.Ad[c].L,-1===d.indexOf(e)&&(a.drawImage(e,0,0),d.push(e))};c.K=function(a){this.type=a;this.b=a.b;a=this.type.Hc[0].frames[0].im;this.pc?this.Ea.Pj(a):this.Ea=new gb(a)};var l=c.K.prototype;l.G=function(){this.visible=0===this.n[0];this.ql=this.aj=!1;this.ve=0!==this.n[3];this.Qa=this.Br(this.n[1])||this.type.Hc[0]; this.I=this.n[2];0>this.I&&(this.I=0);this.I>=this.Qa.frames.length&&(this.I=this.Qa.frames.length-1);var a=this.Qa.frames[this.I];this.Ea.Pj(a.im);this.mc=a.mc;this.nc=a.nc;this.Xg=this.Qa.speed;this.qf=this.Qa.yp;1===this.type.Hc.length&&1===this.type.Hc[0].frames.length||0===this.Xg||(this.b.ai(this),this.aj=!0);this.pc?this.Td.reset():this.Td=new eb;this.De=this.Td.X;this.Vf=!0;this.re=0;this.Uf=!0;this.Bk=this.Nq="";this.Xq=0;this.Ak=-1;this.type.Qo();var c,b,d,e,g,f,l,a=0;for(c=this.type.Hc.length;a< c;a++)for(e=this.type.Hc[a],b=0,d=e.frames.length;b<d;b++)g=e.frames[b],0===g.width&&(g.width=g.L.width,g.height=g.L.height),g.Xh&&(l=g.L,f=g.Fp,f.left=g.Lh/l.width,f.top=g.Mh/l.height,f.right=(g.Lh+g.width)/l.width,f.bottom=(g.Mh+g.height)/l.height,0===g.Lh&&0===g.Mh&&g.width===l.width&&g.height===l.height&&(g.Xh=!1));this.Sa=this.Qa.frames[this.I];this.Kk=this.Sa.Y};l.Xa=function(){var a={a:this.Qa.ka,f:this.I,cas:this.Xg,fs:this.De,ar:this.re,at:this.Td.X,rt:this.qf};this.Vf||(a.ap=this.Vf);this.Uf|| (a.af=this.Uf);return a};l.kb=function(a){var c=this.Py(a.a);c&&(this.Qa=c);this.I=a.f;0>this.I&&(this.I=0);this.I>=this.Qa.frames.length&&(this.I=this.Qa.frames.length-1);this.Xg=a.cas;this.De=a.fs;this.re=a.ar;this.Td.reset();this.Td.X=a.at;this.Vf=a.hasOwnProperty("ap")?a.ap:!0;this.Uf=a.hasOwnProperty("af")?a.af:!0;a.hasOwnProperty("rt")?this.qf=a.rt:this.qf=this.Qa.yp;this.Sa=this.Qa.frames[this.I];this.Kk=this.Sa.Y;this.Ea.Pj(this.Sa.im);this.mc=this.Sa.mc;this.nc=this.Sa.nc};l.Cn=function(a){this.I= a?0:this.Qa.frames.length-1;this.Vf=!1;this.Nq=this.Qa.name;this.ql=!0;this.b.trigger(W.prototype.i.pv,this);this.b.trigger(W.prototype.i.ov,this);this.ql=!1;this.re=0};l.te=function(){return this.Td.X};l.Ya=function(){this.Td.add(this.b.ih(this));this.Bk.length&&this.ir();0<=this.Ak&&this.jr();var a=this.Td.X,c=this.Qa,b=c.frames[this.I],d=b.duration/this.Xg;this.Vf&&a>=this.De+d&&(this.Uf?this.I++:this.I--,this.De+=d,this.I>=c.frames.length&&(c.Ne?(this.Uf=!1,this.I=c.frames.length-2):c.loop?this.I= this.qf:(this.re++,this.re>=c.xp?this.Cn(!1):this.I=this.qf)),0>this.I&&(c.Ne?(this.I=1,this.Uf=!0,c.loop||(this.re++,this.re>=c.xp&&this.Cn(!0))):c.loop?this.I=this.qf:(this.re++,this.re>=c.xp?this.Cn(!0):this.I=this.qf)),0>this.I?this.I=0:this.I>=c.frames.length&&(this.I=c.frames.length-1),a>this.De+c.frames[this.I].duration/this.Xg&&(this.De=a),a=c.frames[this.I],this.Qg(b,a),this.b.S=!0)};l.Br=function(a){var c,b,d;c=0;for(b=this.type.Hc.length;c<b;c++)if(d=this.type.Hc[c],ob(d.name,a))return d; return null};l.Py=function(a){var c,b,d;c=0;for(b=this.type.Hc.length;c<b;c++)if(d=this.type.Hc[c],d.ka===a)return d;return null};l.ir=function(){var a=this.Qa.frames[this.I],c=this.Br(this.Bk);this.Bk="";!c||ob(c.name,this.Qa.name)&&this.Vf||(this.Qa=c,this.Xg=c.speed,this.qf=c.yp,0>this.I&&(this.I=0),this.I>=this.Qa.frames.length&&(this.I=this.Qa.frames.length-1),1===this.Xq&&(this.I=0),this.Vf=!0,this.De=this.Td.X,this.Uf=!0,this.Qg(a,this.Qa.frames[this.I]),this.b.S=!0)};l.jr=function(){var a= this.Qa.frames[this.I],c=this.I;this.I=ta(this.Ak);0>this.I&&(this.I=0);this.I>=this.Qa.frames.length&&(this.I=this.Qa.frames.length-1);c!==this.I&&(this.Qg(a,this.Qa.frames[this.I]),this.De=this.Td.X,this.b.S=!0);this.Ak=-1};l.Qg=function(a,c){var b=a.width,d=a.height,e=c.width,g=c.height;b!=e&&(this.width*=e/b);d!=g&&(this.height*=g/d);this.mc=c.mc;this.nc=c.nc;this.Ea.Pj(c.im);this.A();this.Sa=c;this.Kk=c.Y;b=0;for(d=this.U.length;b<d;b++)e=this.U[b],e.bA&&e.bA(a,c);this.b.trigger(W.prototype.i.Qg, this)};l.Uc=function(a){a.globalAlpha=this.opacity;var c=this.Sa,b=c.Xh,d=c.L,e=this.x,g=this.y,f=this.width,l=this.height;if(0===this.k&&0<=f&&0<=l)e-=this.mc*f,g-=this.nc*l,this.b.bd&&(e=Math.round(e),g=Math.round(g)),b?a.drawImage(d,c.Lh,c.Mh,c.width,c.height,e,g,f,l):a.drawImage(d,e,g,f,l);else{this.b.bd&&(e=Math.round(e),g=Math.round(g));a.save();var k=0<f?1:-1,n=0<l?1:-1;a.translate(e,g);1===k&&1===n||a.scale(k,n);a.rotate(this.k*k*n);e=0-this.mc*oa(f);g=0-this.nc*oa(l);b?a.drawImage(d,c.Lh, c.Mh,c.width,c.height,e,g,oa(f),oa(l)):a.drawImage(d,e,g,oa(f),oa(l));a.restore()}};l.bg=function(a){this.ec(a)};l.ec=function(a){a.Dc(this.Kk);a.Pf(this.opacity);var c=this.Sa,b=this.ac;if(this.b.bd){var d=Math.round(this.x)-this.x,e=Math.round(this.y)-this.y;c.Xh?a.Ld(b.Oa+d,b.Pa+e,b.ob+d,b.pb+e,b.ib+d,b.jb+e,b.gb+d,b.hb+e,c.Fp):a.Jj(b.Oa+d,b.Pa+e,b.ob+d,b.pb+e,b.ib+d,b.jb+e,b.gb+d,b.hb+e)}else c.Xh?a.Ld(b.Oa,b.Pa,b.ob,b.pb,b.ib,b.jb,b.gb,b.hb,c.Fp):a.Jj(b.Oa,b.Pa,b.ob,b.pb,b.ib,b.jb,b.gb,b.hb)}; l.Ty=function(a){var c=this.Sa,b,d;b=0;for(d=c.uo.length;b<d;b++)if(ob(a,c.uo[b][0]))return b;return-1};l.Li=function(a,c){var b=this.Sa,d=b.uo,e;ka(a)?e=this.Ty(a):e=a-1;e=ta(e);if(0>e||e>=d.length)return c?this.x:this.y;var g=(d[e][1]-b.mc)*this.width,d=d[e][2],d=(d-b.nc)*this.height,b=Math.cos(this.k);e=Math.sin(this.k);var f=g*b-d*e,d=d*b+g*e,g=f+this.x,d=d+this.y;return c?g:d};var t=[],q=-2,L=[];k.prototype.tv=function(a){if(!a)return!1;var c=this.b,d=c.ll(),e=d.type,f=null;d.H.collmemory?f= d.H.collmemory:(f={},d.H.collmemory=f);d.H.spriteCreatedDestroyCallback||(d.H.spriteCreatedDestroyCallback=!0,c.ok(function(a){var c=d.H.collmemory;a=a.uid;var e,g;for(e in c)c.hasOwnProperty(e)&&(g=c[e],g[0]===a||g[1]===a)&&(b(c[e]),delete c[e])}));var l=e.da(),k=a.da(),l=l.Jc(),n,t,w,C,I,u,M,T=this.b.Od,U=T-1,D=c.sb().qb;for(t=0;t<l.length;t++){w=l[t];k.za?(w.ja(),this.b.Cr(w.j,a,w.Da,L),n=L,this.b.Vw(w,a,n)):n=k.Jc();for(C=0;C<n.length;C++)I=n[C],c.Fc(w,I)||c.lx(w,I)?(u=p(f,w,I),u=!u||q<U,g(f, w,I,T),u&&(c.Eg(D.na),u=e.da(),M=a.da(),u.za=!1,M.za=!1,e===a?(u.e.length=2,u.e[0]=w,u.e[1]=I,e.gd()):(u.e.length=1,M.e.length=1,u.e[0]=w,M.e[0]=I,e.gd(),a.gd()),D.Gg(),c.je(D.na))):r(f,w,I);B(L)}return!1};var C=new da,w=!1;new wa(0,0,0,0);e.finish=function(a){if(w){if(a){var c=this.b.sb().qb.od;a=null.da();var b=C.Sf(),d,e;if(a.za){a.za=!1;B(a.e);d=0;for(e=b.length;d<e;++d)a.e[d]=b[d];if(c)for(B(a.la),d=0,e=null.e.length;d<e;++d)b=null.e[d],C.contains(b)||a.la.push(b)}else if(c)for(c=a.e.length, d=0,e=b.length;d<e;++d)a.e[c+d]=b[d],Ga(a.la,b[d]);else Da(a.e,b);null.gd()}C.clear();w=!1}};k.prototype.ov=function(a){return ob(this.Nq,a)};k.prototype.pv=function(){return!0};k.prototype.Qg=function(){return!0};c.i=new k;a.prototype.Fw=function(a,c,b){if(a&&c&&(c=this.b.Ik(a,c,this.Li(b,!0),this.Li(b,!1)))){"undefined"!==typeof c.k&&(c.k=this.k,c.A());this.b.$c++;var d,e,g;this.b.trigger(Object.getPrototypeOf(a.fa).i.Pg,c);if(c.hc)for(d=0,e=c.siblings.length;d<e;d++)g=c.siblings[d],this.b.trigger(Object.getPrototypeOf(g.type.fa).i.Pg, g);this.b.$c--;d=this.b.Ry();b=!1;if(ia(d.H.Spawn_LastExec)||d.H.Spawn_LastExec<this.b.jg)b=!0,d.H.Spawn_LastExec=this.b.jg;if(a!=this.type&&(a=a.da(),a.za=!1,b?(B(a.e),a.e[0]=c):a.e.push(c),c.hc))for(d=0,e=c.siblings.length;d<e;d++)g=c.siblings[d],a=g.type.da(),a.za=!1,b?(B(a.e),a.e[0]=g):a.e.push(g)}};a.prototype.jw=function(a,c){this.Bk=a;this.Xq=c;this.aj||(this.b.ai(this),this.aj=!0);this.ql||this.ir()};a.prototype.kw=function(a){this.Ak=a;this.aj||(this.b.ai(this),this.aj=!0);this.ql||this.jr()}; a.prototype.vw=function(a){a=oa(this.width)*(0===a?-1:1);this.width!==a&&(this.width=a,this.A())};a.prototype.yq=function(a){var c=this.Sa,b=c.width*a*(0>this.width?-1:1);a=c.height*a*(0>this.height?-1:1);if(this.width!==b||this.height!==a)this.width=b,this.height=a,this.A()};c.q=new a;c.D=new function(){}})();function Hc(f){this.b=f} (function(){function f(a,c){return a.length?a.pop():new c}function k(a,c,b){if(b){var d;b=0;for(d=c.length;b<d;b++)a.length<p&&a.push(c[b]);B(c)}else for(d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a.length<p&&a.push(c[d]),delete c[d])}function b(c,b,d){var e=c.oc;d=d.replace(/\s\s*$/,"");b>=e.length&&e.push(f(a,Object));b=e[b];b.text=d;b.width=c.Xo(d);c.Te=pa(c.Te,b.width)}function n(){}var g=Hc.prototype;g.G=function(){};g.O=function(a){this.fa=a;this.b=a.b};var r=g.O.prototype;r.G=function(){this.J|| (this.L=new Image,this.b.$p(this.L,this.Pm),this.Y=null)};r.Cj=function(){this.J||(this.Y=null)};r.Xl=function(){if(!this.J&&this.e.length){this.Y||(this.Y=this.b.u.Eh(this.L,!1,this.b.Na,this.Yj));var a,c;a=0;for(c=this.e.length;a<c;a++)this.e[a].Y=this.Y}};r.Wm=function(){this.J||this.e.length||!this.Y||(this.b.u.deleteTexture(this.Y),this.Y=null)};r.mm=function(a){a.drawImage(this.L,0,0)};g.K=function(a){this.type=a;this.b=a.b};r=g.K.prototype;r.Id=function(){k(a,this.oc,!0);k(c,this.Dk,!1);k(e, this.Ek,!1);Ya(this.lf)};r.G=function(){this.L=this.type.L;this.Ck=this.n[0];this.kf=this.n[1];this.characterSet=this.n[2];this.text=this.n[3];this.Ud=this.n[4];this.visible=0===this.n[5];this.Ee=this.n[6]/2;this.We=this.n[7]/2;this.gk=0===this.n[9];this.Wg=this.n[10];this.lineHeight=this.n[11];this.ne=this.Te=0;this.pc?(B(this.oc),Ya(this.Dk),Ya(this.Ek),Ya(this.lf)):(this.oc=[],this.Dk={},this.Ek={},this.lf={});this.sc=!0;this.wg=this.width;this.b.u&&(this.type.Y||(this.type.Y=this.b.u.Eh(this.type.L, !1,this.b.Na,this.type.Yj)),this.Y=this.type.Y);this.Gw()};r.Xa=function(){var a={t:this.text,csc:this.Ud,csp:this.Wg,lh:this.lineHeight,tw:this.Te,th:this.ne,lrt:this.vg,ha:this.Ee,va:this.We,cw:{}},c;for(c in this.lf)a.cw[c]=this.lf[c];return a};r.kb=function(a){this.text=a.t;this.Ud=a.csc;this.Wg=a.csp;this.lineHeight=a.lh;this.Te=a.tw;this.ne=a.th;this.vg=a.lrt;a.hasOwnProperty("ha")&&(this.Ee=a.ha);a.hasOwnProperty("va")&&(this.We=a.va);for(var c in a.cw)this.lf[c]=a.cw[c];this.sc=!0;this.wg= this.width};var p=1E3,a=[],c=[],e=[];r.Gw=function(){for(var a=this.L,b=a.width,d=a.height,a=this.Ck,g=this.kf,l=a/b,h=g/d,m=this.characterSet,b=Math.floor(b/a),d=Math.floor(d/g),k=0;k<m.length&&!(k>=b*d);k++){var n=k%b,p=Math.floor(k/b),r=m.charAt(k);if(this.b.u){var A=this.Ek,y=n*l,z=p*h,n=(n+1)*l,p=(p+1)*h;void 0===A[r]&&(A[r]=f(e,wa));A[r].left=y;A[r].top=z;A[r].right=n;A[r].bottom=p}else A=this.Dk,n=n*a,p=p*g,y=a,z=g,void 0===A[r]&&(A[r]=f(c,Object)),A[r].x=n,A[r].y=p,A[r].xu=y,A[r].Lr=z}};var d= [];g.tn=function(a){B(d);for(var c="",b,e=0;e<a.length;)if(b=a.charAt(e),"\n"===b)c.length&&(d.push(c),c=""),d.push("\n"),++e;else if(" "===b||"\t"===b||"-"===b){do c+=a.charAt(e),e++;while(e<a.length&&(" "===a.charAt(e)||"\t"===a.charAt(e)));d.push(c);c=""}else e<a.length&&(c+=b,e++);c.length&&d.push(c)};g.un=function(c){var b=c.text,d=c.oc;if(b&&b.length){var e=c.width;if(2>=e)k(a,d,!0);else{var g=c.Ud,h=c.Wg;if(b.length*(c.Ck*g+h)-h<=e&&-1===b.indexOf("\n")&&(h=c.Xo(b),h<=e)){k(a,d,!0);d.push(f(a, Object));d[0].text=b;d[0].width=h;c.Te=h;c.ne=c.kf*g+c.lineHeight;return}this.vn(c);c.ne=d.length*(c.kf*g+c.lineHeight)}}else k(a,d,!0)};g.vn=function(c){var e=c.gk,g=c.text,f=c.oc,l=c.width;e&&(this.tn(g),g=d);var h="",m,k,n,r=0,G=!1;for(n=0;n<g.length;n++)"\n"===g[n]?(!0===G?G=!1:(b(c,r,h),r++),h=""):(G=!1,m=h,h+=g[n],k=c.Xo(h.replace(/\s\s*$/,"")),k>l&&(""===m?(b(c,r,h),h="",G=!0):(b(c,r,m),h=g[n]),r++,e||" "!==h||(h="")));h.replace(/\s\s*$/,"").length&&(b(c,r,h),r++);for(n=r;n<f.length;n++)a.length< p&&a.push(f[n]);f.length=r};r.Xo=function(a){for(var c=this.Wg,b=a.length,d=0,e=0;e<b;e++)d+=this.fo(a.charAt(e))*this.Ud+c;return d-(0<d?c:0)};r.fo=function(a){var c=this.lf;return void 0!==c[a]?c[a]:this.Ck};r.Gt=function(){if(this.sc||this.width!==this.wg)this.ne=this.Te=0,this.type.fa.un(this),this.sc=!1,this.wg=this.width};r.Uc=function(a){var c=this.L;if(""!==this.text&&null!=c&&(this.Gt(),!(this.height<this.kf*this.Ud+this.lineHeight))){a.globalAlpha=this.opacity;var c=this.x,b=this.y;this.b.bd&& (c=Math.round(c),b=Math.round(b));var d=this.j.wa,e=this.j.xa,g=this.j.Ba,f=this.j.Ia;a.save();a.translate(c,b);a.rotate(this.k);for(var l=this.k,k=this.Ee,n=this.Ud,p=this.kf*n,r=this.lineHeight,y=this.Wg,z=this.oc,R,X=-(this.mc*this.width),I=-(this.nc*this.height),I=I+this.We*pa(0,this.height-this.ne),u,M,T,U=0;U<z.length;U++){var D=z[U].text;R=k*pa(0,this.width-z[U].width);u=X+R;I+=r;if(0===l&&b+I+p<e)I+=p;else{for(var H=0;H<D.length;H++){M=D.charAt(H);R=this.fo(M);var x=this.Dk[M];if(0===l&&c+ u+R*n+y<d)u+=R*n+y;else{if(u+R*n>this.width+1E-5)break;void 0!==x&&(M=u,T=I,0===l&&1===n&&(M=Math.round(M),T=Math.round(T)),a.drawImage(this.L,x.x,x.y,x.xu,x.Lr,M,T,x.xu*n,x.Lr*n));u+=R*n+y;if(0===l&&c+u>g)break}}I+=p;if(0===l&&(I+p+r>this.height||b+I>f))break}}a.restore()}};var l=new xa;r.ec=function(a){a.Dc(this.Y);a.Pf(this.opacity);if(this.text&&(this.Gt(),!(this.height<this.kf*this.Ud+this.lineHeight))){this.ja();var c=this.ac,b=0,d=0;this.b.bd&&(b=Math.round(this.x)-this.x,d=Math.round(this.y)- this.y);var e=this.j.wa,g=this.j.xa,f=this.j.Ba,k=this.j.Ia,n=this.k,p=this.Ee,r=this.We,A=this.Ud,y=this.kf*A,z=this.lineHeight,R=this.Wg,X=this.oc,I=this.ne,u,M,T;0!==n&&(M=Math.cos(n),T=Math.sin(n));for(var b=c.Oa+b,c=c.Pa+d,U,r=r*pa(0,this.height-I),D,H,I=0;I<X.length;I++)if(d=X[I].text,U=u=p*pa(0,this.width-X[I].width),r+=z,0===n&&c+r+y<g)r+=y;else{for(var x=0;x<d.length;x++){var J=d.charAt(x);u=this.fo(J);J=this.Ek[J];if(0===n&&b+U+u*A+R<e)U+=u*A+R;else{if(U+u*A>this.width+1E-5)break;if(void 0!== J){var N=this.Ck*A,v=this.kf*A;D=U;H=r;0===n&&1===A&&(D=Math.round(D),H=Math.round(H));l.Oa=D;l.Pa=H;l.ob=D+N;l.pb=H;l.gb=D;l.hb=H+v;l.ib=D+N;l.jb=H+v;0!==n&&(D=l,H=M,N=T,v=void 0,v=D.Oa*H-D.Pa*N,D.Pa=D.Pa*H+D.Oa*N,D.Oa=v,v=D.ob*H-D.pb*N,D.pb=D.pb*H+D.ob*N,D.ob=v,v=D.gb*H-D.hb*N,D.hb=D.hb*H+D.gb*N,D.gb=v,v=D.ib*H-D.jb*N,D.jb=D.jb*H+D.ib*N,D.ib=v);l.offset(b,c);a.Ld(l.Oa,l.Pa,l.ob,l.pb,l.ib,l.jb,l.gb,l.hb,J)}U+=u*A+R;if(0===n&&b+U>f)break}}r+=y;if(0===n&&(r+y+z>this.height||c+r>k))break}}};g.i=new function(){}; n.prototype.ni=function(a){ja(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.sc=!0,this.b.S=!0)};n.prototype.hq=function(a){ja(a)&&(a=Math.round(1E10*a)/1E10);if(a=a.toString())this.text+=a,this.sc=!0,this.b.S=!0};n.prototype.yq=function(a){a!==this.Ud&&(this.Ud=a,this.sc=!0,this.b.S=!0)};r.te=function(a,c){var b=parseInt(c,10);this.lf[a]!==b&&(this.lf[a]=b,this.sc=!0,this.b.S=!0)};g.q=new n;g.D=new function(){}})();function Ic(f){this.b=f} (function(){function f(){return a.length?a.pop():{}}function k(c){var b,d;b=0;for(d=c.length;b<d;b++)a.push(c[b]);B(c)}function b(a){return a.length&&" "===a.charAt(a.length-1)?a.substring(0,a.length-1):a}function n(){}var g=Ic.prototype;g.G=function(){g.q.sn=function(a){this.width!==a&&(this.width=a,this.sc=!0,this.A())}};g.O=function(a){this.fa=a;this.b=a.b};var r=g.O.prototype;r.G=function(){};r.Cj=function(){if(!this.J){var a,b,d;a=0;for(b=this.e.length;a<b;a++)d=this.e[a],d.fe=null,d.Bg=null, d.Nc=null}};g.K=function(a){this.type=a;this.b=a.b;this.pc?B(this.oc):this.oc=[];this.sc=!0};r=g.K.prototype;r.G=function(){this.text=this.n[0];this.visible=0===this.n[1];this.font=this.n[2];this.color=this.n[3];this.Ee=this.n[4];this.We=this.n[5];this.gk=0===this.n[7];this.wg=this.Dl=this.width;this.Cl=this.height;this.No=this.n[8];this.el=this.dh="";this.ne=this.Te=this.Hj=0;this.fA();this.Nc=this.Bg=this.fe=null;this.Ws=!1;this.vg=this.b.Od;this.pc?this.Kf.set(0,0,1,1):this.Kf=new wa(0,0,1,1); this.b.u&&this.b.ai(this)};r.fA=function(){var a=this.font.split(" "),b;for(b=0;b<a.length;b++)if("pt"===a[b].substr(a[b].length-2,2)){this.Hj=parseInt(a[b].substr(0,a[b].length-2));this.sp=Math.ceil(this.Hj/72*96)+4;0<b&&(this.el=a[b-1]);this.dh=a[b+1];for(b+=2;b<a.length;b++)this.dh+=" "+a[b];break}};r.Xa=function(){return{t:this.text,f:this.font,c:this.color,ha:this.Ee,va:this.We,wr:this.gk,lho:this.No,fn:this.dh,fs:this.el,ps:this.Hj,pxh:this.sp,tw:this.Te,th:this.ne,lrt:this.vg}};r.kb=function(a){this.text= a.t;this.font=a.f;this.color=a.c;this.Ee=a.ha;this.We=a.va;this.gk=a.wr;this.No=a.lho;this.dh=a.fn;this.el=a.fs;this.Hj=a.ps;this.sp=a.pxh;this.Te=a.tw;this.ne=a.th;this.vg=a.lrt;this.sc=!0;this.wg=this.Dl=this.width;this.Cl=this.height};r.Ya=function(){if(this.b.u&&this.Nc&&300<=this.b.Od-this.vg){var a=this.j;this.ja();var b=this.Da;if(b.right<a.wa||b.bottom<a.xa||b.left>a.Ba||b.top>a.Ia)this.b.u.deleteTexture(this.Nc),this.fe=this.Bg=this.Nc=null}};r.Id=function(){this.fe=this.Bg=null;this.b.u&& this.Nc&&this.b.u.deleteTexture(this.Nc);this.Nc=null};r.te=function(){this.font=this.el+" "+this.Hj.toString()+"pt "+this.dh;this.sc=!0;this.b.S=!0};r.Uc=function(a,b){a.font=this.font;a.textBaseline="top";a.fillStyle=this.color;a.globalAlpha=b?1:this.opacity;var d=1;b&&(d=Math.abs(this.j.xc()),a.save(),a.scale(d,d));if(this.sc||this.width!==this.wg)this.type.fa.un(this.text,this.oc,a,this.width,this.gk),this.sc=!1,this.wg=this.width;this.ja();var d=b?0:this.ac.Oa,g=b?0:this.ac.Pa;this.b.bd&&(d= d+.5|0,g=g+.5|0);0===this.k||b||(a.save(),a.translate(d,g),a.rotate(this.k),g=d=0);var f=g+this.height,k=this.sp,k=k+this.No,n,p;1===this.We?g+=Math.max(this.height/2-this.oc.length*k/2,0):2===this.We&&(g+=Math.max(this.height-this.oc.length*k-2,0));for(p=0;p<this.oc.length&&!(n=d,1===this.Ee?n=d+(this.width-this.oc[p].width)/2:2===this.Ee&&(n=d+(this.width-this.oc[p].width)),a.fillText(this.oc[p].text,n,g),g+=k,g>=f-k);p++);(0!==this.k||b)&&a.restore();this.vg=this.b.Od};r.ec=function(a){if(!(1> this.width||1>this.height)){var b=this.sc||this.Ws;this.Ws=!1;var d=this.j.xc(),g=this.j.Eb(),f=this.Kf,k=d*this.width,n=d*this.height,p=Math.ceil(k),r=Math.ceil(n),h=Math.abs(p),m=Math.abs(r),Q=this.b.N/2,S=this.b.M/2;this.Bg||(this.fe=document.createElement("canvas"),this.fe.width=h,this.fe.height=m,this.Dl=h,this.Cl=m,b=!0,this.Bg=this.fe.getContext("2d"));if(h!==this.Dl||m!==this.Cl)this.fe.width=h,this.fe.height=m,this.Nc&&(a.deleteTexture(this.Nc),this.Nc=null),b=!0;b&&(this.Bg.clearRect(0, 0,h,m),this.Uc(this.Bg,!0),this.Nc||(this.Nc=a.Tc(h,m,this.b.Na,this.b.yf)),a.jB(this.fe,this.Nc,this.b.yf));this.Dl=h;this.Cl=m;a.Dc(this.Nc);a.Pf(this.opacity);a.td();a.translate(-Q,-S);a.dd();var E=this.ac,b=this.j.La(E.Oa,E.Pa,!0,!0),h=this.j.La(E.Oa,E.Pa,!1,!0),m=this.j.La(E.ob,E.pb,!0,!0),Q=this.j.La(E.ob,E.pb,!1,!0),S=this.j.La(E.ib,E.jb,!0,!0),G=this.j.La(E.ib,E.jb,!1,!0),A=this.j.La(E.gb,E.hb,!0,!0),E=this.j.La(E.gb,E.hb,!1,!0);if(this.b.bd||0===this.k&&0===g)var y=(b+.5|0)-b,z=(h+.5|0)- h,b=b+y,h=h+z,m=m+y,Q=Q+z,S=S+y,G=G+z,A=A+y,E=E+z;0===this.k&&0===g?(m=b+p,Q=h,S=m,G=h+r,A=b,E=G,f.right=1,f.bottom=1):(f.right=k/p,f.bottom=n/r);a.Ld(b,h,m,Q,S,G,A,E,f);a.td();a.scale(d,d);a.xm(-this.j.Eb());a.translate((this.j.wa+this.j.Ba)/-2,(this.j.xa+this.j.Ia)/-2);a.dd();this.vg=this.b.Od}};var p=[];g.tn=function(a){B(p);for(var b="",d,g=0;g<a.length;)if(d=a.charAt(g),"\n"===d)b.length&&(p.push(b),b=""),p.push("\n"),++g;else if(" "===d||"\t"===d||"-"===d){do b+=a.charAt(g),g++;while(g<a.length&& (" "===a.charAt(g)||"\t"===a.charAt(g)));p.push(b);b=""}else g<a.length&&(b+=d,g++);b.length&&p.push(b)};var a=[];g.un=function(a,b,d,g,n){if(a&&a.length)if(2>=g)k(b);else{if(100>=a.length&&-1===a.indexOf("\n")){var p=d.measureText(a).width;if(p<=g){k(b);b.push(f());b[0].text=a;b[0].width=p;return}}this.vn(a,b,d,g,n)}else k(b)};g.vn=function(c,e,d,g,k){k&&(this.tn(c),c=p);var n="",r,C,w,h=0;for(w=0;w<c.length;w++)"\n"===c[w]?(h>=e.length&&e.push(f()),n=b(n),C=e[h],C.text=n,C.width=d.measureText(n).width, h++,n=""):(r=n,n+=c[w],C=d.measureText(n).width,C>=g&&(h>=e.length&&e.push(f()),r=b(r),C=e[h],C.text=r,C.width=d.measureText(r).width,h++,n=c[w],k||" "!==n||(n="")));n.length&&(h>=e.length&&e.push(f()),n=b(n),C=e[h],C.text=n,C.width=d.measureText(n).width,h++);for(w=h;w<e.length;w++)a.push(e[w]);e.length=h};g.i=new function(){};n.prototype.ni=function(a){ja(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.sc=!0,this.b.S=!0)};n.prototype.hq=function(a){ja(a)&& (a=Math.round(1E10*a)/1E10);if(a=a.toString())this.text+=a,this.sc=!0,this.b.S=!0};g.q=new n;g.D=new function(){}})();function Jc(f){this.b=f} (function(){var f=Jc.prototype;f.O=function(b){this.fa=b;this.b=b.b};var k=f.O.prototype;k.G=function(){this.J||(this.L=new Image,this.L.cr=this.Lp,this.b.$p(this.L,this.Pm),this.Y=this.pattern=null)};k.Cj=function(){this.J||(this.Y=null)};k.Xl=function(){if(!this.J&&this.e.length){this.Y||(this.Y=this.b.u.Eh(this.L,!0,this.b.Na,this.Yj));var b,f;b=0;for(f=this.e.length;b<f;b++)this.e[b].Y=this.Y}};k.Qo=function(){this.J||this.Y||!this.b.u||(this.Y=this.b.u.Eh(this.L,!0,this.b.Na,this.Yj))};k.Wm= function(){this.J||this.e.length||!this.Y||(this.b.u.deleteTexture(this.Y),this.Y=null)};k.mm=function(b){b.drawImage(this.L,0,0)};f.K=function(b){this.type=b;this.b=b.b};k=f.K.prototype;k.G=function(){this.visible=0===this.n[0];this.Kf=new wa(0,0,0,0);this.Pr=!1;this.L=this.type.L;this.b.u?(this.type.Qo(),this.Y=this.type.Y):(this.type.pattern||(this.type.pattern=this.b.Ra.createPattern(this.type.L,"repeat")),this.pattern=this.type.pattern)};k.zd=function(){this.Pr=!1;this.L=this.type.L};k.Id=function(){this.b.u&& this.Pr&&this.Y&&(this.b.u.deleteTexture(this.Y),this.Y=null)};k.Uc=function(b){b.globalAlpha=this.opacity;b.save();b.fillStyle=this.pattern;var f=this.x,g=this.y;this.b.bd&&(f=Math.round(f),g=Math.round(g));var k=-(this.mc*this.width),p=-(this.nc*this.height),a=k%this.L.width,c=p%this.L.height;0>a&&(a+=this.L.width);0>c&&(c+=this.L.height);b.translate(f,g);b.rotate(this.k);b.translate(a,c);b.fillRect(k-a,p-c,this.width,this.height);b.restore()};k.bg=function(b){this.ec(b)};k.ec=function(b){b.Dc(this.Y); b.Pf(this.opacity);var f=this.Kf;f.right=this.width/this.L.width;f.bottom=this.height/this.L.height;var g=this.ac;if(this.b.bd){var k=Math.round(this.x)-this.x,p=Math.round(this.y)-this.y;b.Ld(g.Oa+k,g.Pa+p,g.ob+k,g.pb+p,g.ib+k,g.jb+p,g.gb+k,g.hb+p,f)}else b.Ld(g.Oa,g.Pa,g.ob,g.pb,g.ib,g.jb,g.gb,g.hb,f)};f.i=new function(){};f.q=new function(){};f.D=new function(){}})();function Kc(f){this.b=f} (function(){function f(a){e=a.x;d=a.y;l=a.z}function k(a,c,d,e){var g;g=t.length?t.pop():new b;g.init(a,c,d,e);return g}function b(){this.Uj=this.id=this.y=this.x=this.Lm=this.Km=this.Lo=this.time=this.Jp=0;this.$j=this.Um=!1}function n(a){return a.sourceCapabilities&&a.sourceCapabilities.firesTouchEvents||a.originalEvent&&a.originalEvent.sourceCapabilities&&a.originalEvent.sourceCapabilities.firesTouchEvents}function g(){}function r(){}var p=Kc.prototype;p.O=function(a){this.fa=a;this.b=a.b};p.O.prototype.G= function(){};p.K=function(a){this.type=a;this.b=a.b;this.touches=[];this.Yo=!1};var a=p.K.prototype,c={left:0,top:0};a.Ii=function(a){var c,b;c=0;for(b=this.touches.length;c<b;c++)if(this.touches[c].id===a)return c;return-1};var e=0,d=0,l=0,t=[];b.prototype.init=function(a,c,b,d){var e=ab();this.Jp=this.Lo=this.time=e;this.Km=a;this.Lm=c;this.x=a;this.y=c;this.pressure=this.height=this.width=0;this.id=b;this.Uj=d;this.$j=this.Um=!1};b.prototype.update=function(a,c,b,d,e,g){this.Lo=this.time;this.time= a;this.x=c;this.y=b;this.width=d;this.height=e;this.pressure=g;!this.$j&&15<=Ta(this.Km,this.Lm,this.x,this.y)&&(this.$j=!0)};b.prototype.Sz=function(a,c){!this.Um&&500<=ab()-this.Jp&&!this.$j&&15>Ta(this.Km,this.Lm,this.x,this.y)&&(this.Um=!0,a.pe=this.Uj,a.di=this.id,a.jh=c,a.b.trigger(Kc.prototype.i.Cv,a),a.xe=this.x,a.ye=this.y,a.b.trigger(Kc.prototype.i.Dv,a),a.jh=0)};var q=-1E3,L=-1E3,C=-1E4;b.prototype.Rs=function(a,c){if(!this.Um){var b=ab();333>=b-this.Jp&&!this.$j&&15>Ta(this.Km,this.Lm, this.x,this.y)&&(a.pe=this.Uj,a.di=this.id,a.jh=c,666>=b-C&&25>Ta(q,L,this.x,this.y)?(a.b.trigger(Kc.prototype.i.vv,a),a.xe=this.x,a.ye=this.y,a.b.trigger(Kc.prototype.i.wv,a),L=q=-1E3,C=-1E4):(a.b.trigger(Kc.prototype.i.Xv,a),a.xe=this.x,a.ye=this.y,a.b.trigger(Kc.prototype.i.Yv,a),q=this.x,L=this.y,C=b),a.jh=0)}};a.G=function(){this.Hz=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.jh=this.di=this.pe=this.ye=this.xe=this.Gq=this.Fq=this.Eq=this.Sw=this.Rw=this.Qw=this.em= this.dm=this.cm=0;this.hB=0!==this.n[0];var a=0<this.b.wc?document:this.b.canvas,c=document;this.b.Sb?c=a=window.Canvas:this.b.Zc&&(c=a=window);var b=this;"undefined"!==typeof PointerEvent?(a.addEventListener("pointerdown",function(a){b.ht(a)},!1),a.addEventListener("pointermove",function(a){b.gt(a)},!1),c.addEventListener("pointerup",function(a){b.Wl(a,!1)},!1),c.addEventListener("pointercancel",function(a){b.Wl(a,!0)},!1),this.b.canvas&&(this.b.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()}, !1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.b.canvas.addEventListener("gesturehold",function(a){a.preventDefault()},!1),document.addEventListener("gesturehold",function(a){a.preventDefault()},!1))):window.navigator.msPointerEnabled?(a.addEventListener("MSPointerDown",function(a){b.ht(a)},!1),a.addEventListener("MSPointerMove",function(a){b.gt(a)},!1),c.addEventListener("MSPointerUp",function(a){b.Wl(a,!1)},!1),c.addEventListener("MSPointerCancel",function(a){b.Wl(a, !0)},!1),this.b.canvas&&(this.b.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(a.addEventListener("touchstart",function(a){b.jt(a)},!1),a.addEventListener("touchmove",function(a){b.it(a)},!1),c.addEventListener("touchend",function(a){b.hp(a,!1)},!1),c.addEventListener("touchcancel",function(a){b.hp(a,!0)},!1));if(this.Hz){var d=function(a){a=a.reading;b.Eq=a.accelerationX;b.Fq=a.accelerationY; b.Gq=a.accelerationZ},e=function(a){a=a.reading;b.cm=a.yawDegrees;b.dm=a.pitchDegrees;b.em=a.rollDegrees},g=Windows.Devices.Sensors.Accelerometer.getDefault();g&&(g.reportInterval=Math.max(g.minimumReportInterval,16),g.addEventListener("readingchanged",d));var l=Windows.Devices.Sensors.Inclinometer.getDefault();l&&(l.reportInterval=Math.max(l.minimumReportInterval,16),l.addEventListener("readingchanged",e));document.addEventListener("visibilitychange",function(){document.hidden||document.msHidden? (g&&g.removeEventListener("readingchanged",d),l&&l.removeEventListener("readingchanged",e)):(g&&g.addEventListener("readingchanged",d),l&&l.addEventListener("readingchanged",e))},!1)}else window.addEventListener("deviceorientation",function(a){b.cm=a.alpha||0;b.dm=a.beta||0;b.em=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(b.Qw=a.accelerationIncludingGravity.x||0,b.Rw=a.accelerationIncludingGravity.y||0,b.Sw=a.accelerationIncludingGravity.z|| 0);a.acceleration&&(b.Eq=a.acceleration.x||0,b.Fq=a.acceleration.y||0,b.Gq=a.acceleration.z||0)},!1);this.hB&&!this.b.Ja&&(jQuery(document).mousemove(function(a){b.Zz(a)}),jQuery(document).mousedown(function(a){b.Yz(a)}),jQuery(document).mouseup(function(a){b.$z(a)}));!this.b.vh&&this.b.Kc&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(f,null,{frequency:40});this.b.ZA(this)};a.gt=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&& "mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.Ii(a.pointerId),d=ab();if(0<=b){var e=this.b.Ja?c:jQuery(this.b.canvas).offset(),b=this.touches[b];2>d-b.time||b.update(d,a.pageX-e.left,a.pageY-e.top,a.width||0,a.height||0,a.pressure||0)}}};a.ht=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&pb(a)&&a.preventDefault();var b=this.b.Ja?c:jQuery(this.b.canvas).offset(),d=a.pageX-b.left,b=a.pageY-b.top;ab();this.pe=this.touches.length; this.di=a.pointerId;this.touches.push(k(d,b,a.pointerId,this.pe));this.b.yc=!0;this.b.trigger(Kc.prototype.i.mn,this);this.b.trigger(Kc.prototype.i.wq,this);this.xe=d;this.ye=b;this.b.trigger(Kc.prototype.i.qn,this);this.b.yc=!1}};a.Wl=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&pb(a)&&a.preventDefault();var c=this.Ii(a.pointerId);this.pe=0<=c?this.touches[c].Uj:-1;this.di=0<=c?this.touches[c].id:-1;this.b.yc=!0;this.b.trigger(Kc.prototype.i.ln, this);this.b.trigger(Kc.prototype.i.vq,this);0<=c&&(b||this.touches[c].Rs(this,c),100>t.length&&t.push(this.touches[c]),this.touches.splice(c,1));this.b.yc=!1}};a.it=function(a){a.preventDefault&&a.preventDefault();var b=ab(),d,e,g,f;d=0;for(e=a.changedTouches.length;d<e;d++)if(g=a.changedTouches[d],f=this.Ii(g.identifier),0<=f){var l=this.b.Ja?c:jQuery(this.b.canvas).offset();f=this.touches[f];2>b-f.time||f.update(b,g.pageX-l.left,g.pageY-l.top,2*(g.PC||g.YC||g.HC||g.KC||0),2*(g.QC||g.ZC||g.IC|| g.LC||0),g.AC||g.XC||g.GC||g.JC||0)}};a.jt=function(a){a.preventDefault&&pb(a)&&a.preventDefault();var b=this.b.Ja?c:jQuery(this.b.canvas).offset();ab();this.b.yc=!0;var d,e,g,f;d=0;for(e=a.changedTouches.length;d<e;d++)if(g=a.changedTouches[d],f=this.Ii(g.identifier),-1===f){f=g.pageX-b.left;var l=g.pageY-b.top;this.pe=this.touches.length;this.di=g.identifier;this.touches.push(k(f,l,g.identifier,this.pe));this.b.trigger(Kc.prototype.i.mn,this);this.b.trigger(Kc.prototype.i.wq,this);this.xe=f;this.ye= l;this.b.trigger(Kc.prototype.i.qn,this)}this.b.yc=!1};a.hp=function(a,b){a.preventDefault&&pb(a)&&a.preventDefault();this.b.yc=!0;var c,d,e;c=0;for(d=a.changedTouches.length;c<d;c++)e=a.changedTouches[c],e=this.Ii(e.identifier),0<=e&&(this.pe=this.touches[e].Uj,this.di=this.touches[e].id,this.b.trigger(Kc.prototype.i.ln,this),this.b.trigger(Kc.prototype.i.vq,this),b||this.touches[e].Rs(this,e),100>t.length&&t.push(this.touches[e]),this.touches.splice(e,1));this.b.yc=!1};a.te=function(){return this.b.Kc&& 0===this.cm&&0!==l?90*l:this.cm};a.fr=function(){return this.b.Kc&&0===this.dm&&0!==d?90*d:this.dm};a.lr=function(){return this.b.Kc&&0===this.em&&0!==e?90*e:this.em};a.Yz=function(a){n(a)||(this.jt({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]}),this.Yo=!0)};a.Zz=function(a){this.Yo&&!n(a)&&this.it({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};a.$z=function(a){a.preventDefault&&this.b.Mr&&!this.b.yf&&a.preventDefault();this.b.Mr=!0;n(a)||(this.hp({changedTouches:[{pageX:a.pageX, pageY:a.pageY,identifier:0}]}),this.Yo=!1)};a.Sm=function(){var a,b,c,d=ab();a=0;for(b=this.touches.length;a<b;++a)c=this.touches[a],c.time<=d-50&&(c.Lo=d),c.Sz(this,a)};g.prototype.wq=function(){return!0};g.prototype.vq=function(){return!0};g.prototype.qn=function(a){return a?this.b.Nm(a,this.xe,this.ye):!1};g.prototype.mn=function(a){a=Math.floor(a);return a===this.pe};g.prototype.ln=function(a){a=Math.floor(a);return a===this.pe};g.prototype.Yu=function(a){a=Math.floor(a);return this.touches.length>= a+1};g.prototype.Cv=function(){return!0};g.prototype.Xv=function(){return!0};g.prototype.vv=function(){return!0};g.prototype.Dv=function(a){return a?this.b.Nm(a,this.xe,this.ye):!1};g.prototype.Yv=function(a){return a?this.b.Nm(a,this.xe,this.ye):!1};g.prototype.wv=function(a){return a?this.b.Nm(a,this.xe,this.ye):!1};p.i=new g;r.prototype.zq=function(a,b){var c=this.jh;if(0>c||c>=this.touches.length)a.r(0);else{var d,e,g,f,l;ia(b)?(d=this.b.vf(0),e=d.scale,g=d.Rc,f=d.zc,l=d.k,d.scale=1,d.Rc=1,d.zc= 1,d.k=0,a.r(d.Pb(this.touches[c].x,this.touches[c].y,!0)),d.scale=e,d.Rc=g,d.zc=f,d.k=l):(d=ja(b)?this.b.vf(b):this.b.Mi(b))?a.r(d.Pb(this.touches[c].x,this.touches[c].y,!0)):a.r(0)}};r.prototype.Nw=function(a,b,c){b=Math.floor(b);if(0>b||b>=this.touches.length)a.r(0);else{var d,e,g,f;ia(c)?(c=this.b.vf(0),d=c.scale,e=c.Rc,g=c.zc,f=c.k,c.scale=1,c.Rc=1,c.zc=1,c.k=0,a.r(c.Pb(this.touches[b].x,this.touches[b].y,!0)),c.scale=d,c.Rc=e,c.zc=g,c.k=f):(c=ja(c)?this.b.vf(c):this.b.Mi(c))?a.r(c.Pb(this.touches[b].x, this.touches[b].y,!0)):a.r(0)}};r.prototype.wn=function(a,c){var b=this.jh;if(0>b||b>=this.touches.length)a.r(0);else{var d,e,g,f,l;ia(c)?(d=this.b.vf(0),e=d.scale,g=d.Rc,f=d.rd,l=d.k,d.scale=1,d.Rc=1,d.rd=1,d.k=0,a.r(d.Pb(this.touches[b].x,this.touches[b].y,!1)),d.scale=e,d.Rc=g,d.rd=f,d.k=l):(d=ja(c)?this.b.vf(c):this.b.Mi(c))?a.r(d.Pb(this.touches[b].x,this.touches[b].y,!1)):a.r(0)}};p.D=new r})();function Lc(f){this.b=f} (function(){var f=Lc.prototype;f.O=function(b){this.behavior=b;this.b=b.b};f.O.prototype.G=function(){};f.K=function(b,f){this.type=b;this.behavior=b.behavior;this.d=f;this.b=b.b};var k=f.K.prototype;k.G=function(){this.Lq=this.n[0];this.Mq=this.n[1];this.Zw=this.n[2];this.Yw=this.n[3];this.d.ja();this.bq=this.d.Da.left;this.fq=this.d.Da.top;this.cq=this.b.mb-this.d.Da.left;this.dq=this.b.lb-this.d.Da.top;this.vp=this.b.mb-this.d.Da.right;this.Fn=this.b.lb-this.d.Da.bottom;this.enabled=0!==this.n[4]}; k.Xa=function(){return{xleft:this.bq,ytop:this.fq,xright:this.cq,ybottom:this.dq,rdiff:this.vp,bdiff:this.Fn,enabled:this.enabled}};k.kb=function(b){this.bq=b.xleft;this.fq=b.ytop;this.cq=b.xright;this.dq=b.ybottom;this.vp=b.rdiff;this.Fn=b.bdiff;this.enabled=b.enabled};k.Ya=function(){if(this.enabled){var b,f=this.d.j,g=this.d,k=this.d.Da;0===this.Lq?(g.ja(),b=f.wa+this.bq-k.left,0!==b&&(g.x+=b,g.A())):1===this.Lq&&(g.ja(),b=f.Ba-this.cq-k.left,0!==b&&(g.x+=b,g.A()));0===this.Mq?(g.ja(),b=f.xa+this.fq- k.top,0!==b&&(g.y+=b,g.A())):1===this.Mq&&(g.ja(),b=f.Ia-this.dq-k.top,0!==b&&(g.y+=b,g.A()));1===this.Zw&&(g.ja(),b=f.Ba-this.vp-k.right,0!==b&&(g.width+=b,0>g.width&&(g.width=0),g.A()));1===this.Yw&&(g.ja(),b=f.Ia-this.Fn-k.bottom,0!==b&&(g.height+=b,0>g.height&&(g.height=0),g.A()))}};f.i=new function(){};f.q=new function(){};f.D=new function(){}})();function Mc(f){this.b=f} (function(){function f(){}function k(){}var b=Mc.prototype;b.O=function(b){this.behavior=b;this.b=b.b};b.O.prototype.G=function(){};b.K=function(b,f){this.type=b;this.behavior=b.behavior;this.d=f;this.b=b.b};var n=b.K.prototype;n.G=function(){this.An=1===this.n[0];this.St=!1;this.Gi=this.n[1];this.ek=this.n[2];this.Xk=this.n[3];this.xx=this.n[4];this.Ab=this.An?0:3;this.pc?this.vd.reset():this.vd=new eb;this.If=this.d.opacity?this.d.opacity:1;this.An&&(0===this.Gi?(this.Ab=1,0===this.ek&&(this.Ab= 2)):(this.d.opacity=0,this.b.S=!0))};n.Xa=function(){return{fit:this.Gi,wt:this.ek,fot:this.Xk,s:this.Ab,st:this.vd.X,mo:this.If}};n.kb=function(b){this.Gi=b.fit;this.ek=b.wt;this.Xk=b.fot;this.Ab=b.s;this.vd.reset();this.vd.X=b.st;this.If=b.mo};n.Ya=function(){this.vd.add(this.b.ih(this.d));0===this.Ab&&(this.d.opacity=this.vd.X/this.Gi*this.If,this.b.S=!0,this.d.opacity>=this.If&&(this.d.opacity=this.If,this.Ab=1,this.vd.reset(),this.b.trigger(Mc.prototype.i.yv,this.d)));1===this.Ab&&this.vd.X>= this.ek&&(this.Ab=2,this.vd.reset(),this.b.trigger(Mc.prototype.i.$v,this.d));2===this.Ab&&0!==this.Xk&&(this.d.opacity=this.If-this.vd.X/this.Xk*this.If,this.b.S=!0,0>this.d.opacity&&(this.d.opacity=0,this.Ab=3,this.vd.reset(),this.b.trigger(Mc.prototype.i.zv,this.d),1===this.xx&&this.b.$e(this.d)))};n.Ox=function(){this.Ab=0;this.vd.reset();0===this.Gi?(this.Ab=1,0===this.ek&&(this.Ab=2)):(this.d.opacity=0,this.b.S=!0)};f.prototype.zv=function(){return!0};f.prototype.yv=function(){return!0};f.prototype.$v= function(){return!0};b.i=new f;k.prototype.Iw=function(){this.An||this.St||(this.If=this.d.opacity?this.d.opacity:1,this.St=!0);3===this.Ab&&this.Ox()};b.q=new k;b.D=new function(){}})();function Nc(f){this.b=f} (function(){function f(){}function k(){}var b=Nc.prototype;b.O=function(b){this.behavior=b;this.b=b.b};b.O.prototype.G=function(){};b.K=function(b,f){this.type=b;this.behavior=b.behavior;this.d=f;this.b=b.b};var n=b.K.prototype;n.G=function(){this.oe=this.le=this.Ab=this.Ul=this.$l=0};n.Xa=function(){return{ontime:this.$l,offtime:this.Ul,stage:this.Ab,stagetimeleft:this.le,timeleft:this.oe}};n.kb=function(b){this.$l=b.ontime;this.Ul=b.offtime;this.Ab=b.stage;this.le=b.stagetimeleft;this.oe=b.timeleft; null===this.oe&&(this.oe=Infinity)};n.Ya=function(){if(!(0>=this.oe)){var b=this.b.ih(this.d);this.oe-=b;0>=this.oe?(this.oe=0,this.d.visible=!0,this.b.S=!0,this.b.trigger(Nc.prototype.i.Bv,this.d)):(this.le-=b,0>=this.le&&(0===this.Ab?(this.d.visible=!1,this.Ab=1,this.le+=this.Ul):(this.d.visible=!0,this.Ab=0,this.le+=this.$l),this.b.S=!0))}};f.prototype.Bv=function(){return!0};b.i=new f;k.prototype.Tu=function(b,f,k){this.$l=b;this.Ul=f;this.Ab=1;this.le=f;this.oe=k;this.d.visible=!1;this.b.S=!0}; b.q=new k;b.D=new function(){}})();function Oc(f){this.b=f} (function(){function f(){}var k=Oc.prototype;k.O=function(b){this.behavior=b;this.b=b.b};k.O.prototype.G=function(){};k.K=function(b,g){this.type=b;this.behavior=b.behavior;this.d=g;this.b=b.b};var b=k.K.prototype;b.G=function(){this.Ib=null;this.gm=-1;this.mode=this.zh=this.Qm=this.Kh=this.Me=this.Fj=0;var b=this;this.pc||(this.wj=function(g){b.Aj(g)});this.b.ok(this.wj)};b.Xa=function(){return{uid:this.Ib?this.Ib.uid:-1,pa:this.Fj,pd:this.Me,msa:this.Kh,tsa:this.Qm,lka:this.zh,m:this.mode}};b.kb= function(b){this.gm=b.uid;this.Fj=b.pa;this.Me=b.pd;this.Kh=b.msa;this.Qm=b.tsa;this.zh=b.lka;this.mode=b.m};b.zd=function(){-1===this.gm?this.Ib=null:this.Ib=this.b.lg(this.gm);this.gm=-1};b.Aj=function(b){this.Ib==b&&(this.Ib=null)};b.Id=function(){this.Ib=null;this.b.It(this.wj)};b.Ya=function(){};b.Sm=function(){if(this.Ib){this.zh!==this.d.k&&(this.Kh=Ka(this.Kh+(this.d.k-this.zh)));var b=this.d.x,g=this.d.y;if(3===this.mode||4===this.mode){var f=Ta(this.d.x,this.d.y,this.Ib.x,this.Ib.y);if(f> this.Me||4===this.mode&&f<this.Me)g=Oa(this.Ib.x,this.Ib.y,this.d.x,this.d.y),b=this.Ib.x+Math.cos(g)*this.Me,g=this.Ib.y+Math.sin(g)*this.Me}else b=this.Ib.x+Math.cos(this.Ib.k+this.Fj)*this.Me,g=this.Ib.y+Math.sin(this.Ib.k+this.Fj)*this.Me;this.zh=f=Ka(this.Kh+(this.Ib.k-this.Qm));0!==this.mode&&1!==this.mode&&3!==this.mode&&4!==this.mode||this.d.x===b&&this.d.y===g||(this.d.x=b,this.d.y=g,this.d.A());0!==this.mode&&2!==this.mode||this.d.k===f||(this.d.k=f,this.d.A())}};k.i=new function(){};f.prototype.dw= function(b,g){if(b){var f=b.Hr(this.d);f&&(this.Ib=f,this.Fj=Oa(f.x,f.y,this.d.x,this.d.y)-f.k,this.Me=Ta(f.x,f.y,this.d.x,this.d.y),this.zh=this.Kh=this.d.k,this.Qm=f.k,this.mode=g)}};k.q=new f;k.D=new function(){}})();function Pc(f){this.b=f} (function(){function f(){}function k(){}var b=Pc.prototype;b.O=function(b){this.behavior=b;this.b=b.b};b.O.prototype.G=function(){};b.K=function(b,f){this.type=b;this.behavior=b.behavior;this.d=f;this.b=b.b;this.Rj=this.Hm=this.Gm=this.pl=this.wi=this.Di=this.xh=this.yh=this.Kj=this.jj=!1;this.Tb=null;this.Oo=-1;this.Df=this.Cf=0;this.Ki=!1;this.kg=this.Bd=0;this.dl=!0;this.ca=this.V=0};var n=b.K.prototype;n.Up=function(){this.Ta=Math.cos(this.hh);this.Ua=Math.sin(this.hh);this.Mf=Math.cos(this.hh- Math.PI/2);this.Nf=Math.sin(this.hh-Math.PI/2);this.Ta=nb(this.Ta);this.Ua=nb(this.Ua);this.Mf=nb(this.Mf);this.Nf=nb(this.Nf);this.il=this.Zd;0>this.Zd&&(this.Ta*=-1,this.Ua*=-1,this.Zd=Math.abs(this.Zd))};n.G=function(){this.Hh=this.n[0];this.Sg=this.n[1];this.$g=this.n[2];this.fj=this.n[3];this.il=this.Zd=this.n[4];this.Pl=this.n[5];this.Un=0!==this.n[6];this.Io=this.n[7]/1E3;this.ux=1===this.n[8];this.enabled=0!==this.n[9];this.ji=!1;this.ki=this.b.Se(this.d);this.Po=-1;this.Lg=0;this.hh=F(90); this.Up();var b=this;this.ux&&!this.b.Ja&&(jQuery(document).keydown(function(f){b.fp(f)}),jQuery(document).keyup(function(f){b.gp(f)}));this.pc||(this.wj=function(f){b.Aj(f)});this.b.ok(this.wj);this.d.H.isPlatformBehavior=!0};n.Xa=function(){return{ii:this.pl,lfx:this.Cf,lfy:this.Df,lfo:this.Tb?this.Tb.uid:-1,am:this.Bd,en:this.enabled,fall:this.kg,ft:this.dl,dx:this.V,dy:this.ca,ms:this.Hh,acc:this.Sg,dec:this.$g,js:this.fj,g:this.Zd,g1:this.il,mf:this.Pl,wof:this.ji,woj:this.ki?this.ki.uid:-1, ga:this.hh,edj:this.Un,cdj:this.wi,dj:this.Di,sus:this.Io}};n.kb=function(b){this.pl=b.ii;this.Cf=b.lfx;this.Df=b.lfy;this.Oo=b.lfo;this.Bd=b.am;this.enabled=b.en;this.kg=b.fall;this.dl=b.ft;this.V=b.dx;this.ca=b.dy;this.Hh=b.ms;this.Sg=b.acc;this.$g=b.dec;this.fj=b.js;this.Zd=b.g;this.il=b.g1;this.Pl=b.mf;this.ji=b.wof;this.Po=b.woj;this.hh=b.ga;this.Un=b.edj;this.wi=b.cdj;this.Di=b.dj;this.Io=b.sus;this.Rj=this.Hm=this.Gm=this.xh=this.yh=this.Kj=this.jj=!1;this.Lg=0;this.Up()};n.zd=function(){-1=== this.Oo?this.Tb=null:this.Tb=this.b.lg(this.Oo);-1===this.Po?this.ki=null:this.ki=this.b.lg(this.Po)};n.Aj=function(b){this.Tb==b&&(this.Tb=null)};n.Id=function(){this.Tb=null;this.b.It(this.wj)};n.fp=function(b){switch(b.which){case 38:b.preventDefault();this.yh=!0;break;case 37:b.preventDefault();this.jj=!0;break;case 39:b.preventDefault(),this.Kj=!0}};n.gp=function(b){switch(b.which){case 38:b.preventDefault();this.xh=this.yh=!1;break;case 37:b.preventDefault();this.jj=!1;break;case 39:b.preventDefault(), this.Kj=!1}};n.Dg=function(){this.yh=this.Kj=this.jj=!1};n.te=function(){return 0>this.Zd?-1:1};n.$r=function(){var b=null,f=null,k,a;k=this.d.x;a=this.d.y;this.d.x+=this.Ta;this.d.y+=this.Ua;this.d.A();if(this.Tb&&this.b.Fc(this.d,this.Tb)&&(!this.b.Qp(this.Tb.type,uc)||this.Tb.H.solidEnabled))return this.d.x=k,this.d.y=a,this.d.A(),this.Tb;(b=this.b.kc(this.d))||0!==this.kg||(f=this.b.Se(this.d,!0));this.d.x=k;this.d.y=a;this.d.A();if(b){if(this.b.Fc(this.d,b))return null;this.Ki=!1;return b}if(f&& f.length){a=b=0;for(k=f.length;b<k;b++)f[a]=f[b],this.b.Fc(this.d,f[b])||a++;if(1<=a)return this.Ki=!0,f[0]}return null};n.Ya=function(){};n.Bt=function(){var b=this.b.ih(this.d),f,k,a,c,e,d,l,n,q;this.yh||this.Rj||(this.xh=!1);var L=this.jj||this.Gm;a=this.Kj||this.Hm;var C=(c=this.yh||this.Rj)&&!this.xh;this.Rj=this.Hm=this.Gm=!1;if(this.enabled){this.pl&&(C=c=a=L=!1);c||(this.Lg=0);n=this.Tb;q=!1;this.dl&&((this.b.kc(this.d)||this.b.Se(this.d))&&this.b.sd(this.d,-this.Ta,-this.Ua,4,!0),this.dl= !1);!n||0!==this.ca||n.y===this.Df&&n.x===this.Cf||(f=n.x-this.Cf,k=n.y-this.Df,this.d.x+=f,this.d.y+=k,this.d.A(),this.Cf=n.x,this.Df=n.y,q=!0,this.b.kc(this.d)&&this.b.sd(this.d,-f,-k,2.5*Math.sqrt(f*f+k*k)));var w=this.$r();if(k=this.b.kc(this.d))if(this.d.H.inputPredicted)this.b.sd(this.d,-this.Ta,-this.Ua,10,!1);else if(this.b.rp(this.d,-this.Ta,-this.Ua,this.d.height/8))this.b.Lf(this.d,k);else if(this.b.rp(this.d,this.Mf,this.Nf,this.d.width/2))this.b.Lf(this.d,k);else if(this.b.rp(this.d, this.Ta,this.Ua,this.d.height/2))this.b.Lf(this.d,k);else if(this.b.rA(this.d,Math.max(this.d.width,this.d.height)/2))this.b.Lf(this.d,k);else return;w?(this.wi=this.Di=!1,0<this.ca&&(this.ji||(this.b.pm(this.d,-this.Ta,-this.Ua,w),this.ji=!0),this.ca=0),n!=w)?(this.Tb=w,this.Cf=w.x,this.Df=w.y,this.b.Lf(this.d,w)):q&&(k=this.b.kc(this.d))&&(this.b.Lf(this.d,k),0!==f&&(0<f?this.b.sd(this.d,-this.Mf,-this.Nf):this.b.sd(this.d,this.Mf,this.Nf)),this.b.sd(this.d,-this.Ta,-this.Ua)):c||(this.wi=!0);if(w&& C||!w&&this.Un&&c&&this.wi&&!this.Di)n=this.d.x,q=this.d.y,this.d.x-=this.Ta,this.d.y-=this.Ua,this.d.A(),this.b.kc(this.d)?C=!1:(this.Lg=this.Io,this.b.trigger(Pc.prototype.i.Gv,this.d),this.Bd=2,this.ca=-this.fj,C=!0,w?this.xh=!0:this.Di=!0),this.d.x=n,this.d.y=q,this.d.A();w||(c&&0<this.Lg?(this.ca=-this.fj,this.Lg-=b):(this.Tb=null,this.ca+=this.Zd*b,this.ca>this.Pl&&(this.ca=this.Pl)),C&&(this.xh=!0));this.ji=!!w;L==a&&(0>this.V?(this.V+=this.$g*b,0<this.V&&(this.V=0)):0<this.V&&(this.V-=this.$g* b,0>this.V&&(this.V=0)));L&&!a&&(this.V=0<this.V?this.V-(this.Sg+this.$g)*b:this.V-this.Sg*b);a&&!L&&(this.V=0>this.V?this.V+(this.Sg+this.$g)*b:this.V+this.Sg*b);this.V>this.Hh?this.V=this.Hh:this.V<-this.Hh&&(this.V=-this.Hh);L=!1;0!==this.V&&(n=this.d.x,q=this.d.y,f=this.V*b*this.Mf,k=this.V*b*this.Nf,this.d.x+=this.Mf*(1<this.V?1:-1)-this.Ta,this.d.y+=this.Nf*(1<this.V?1:-1)-this.Ua,this.d.A(),c=!1,e=this.b.kc(this.d),this.d.x=n+f,this.d.y=q+k,this.d.A(),a=this.b.kc(this.d),!a&&w&&(a=this.b.Se(this.d))&& (this.d.x=n,this.d.y=q,this.d.A(),this.b.Fc(this.d,a)?(a=null,c=!1):c=!0,this.d.x=n+f,this.d.y=q+k,this.d.A()),a?(f=Math.abs(this.V*b)+2,e||!this.b.sd(this.d,-this.Ta,-this.Ua,f,c,a))?(this.b.Lf(this.d,a),f=Math.max(Math.abs(this.V*b*2.5),30),this.b.sd(this.d,this.Mf*(0>this.V?1:-1),this.Nf*(0>this.V?1:-1),f,!1)?!w||c||this.Ki||(n=this.d.x,q=this.d.y,this.d.x+=this.Ta,this.d.y+=this.Ua,this.b.kc(this.d)?this.b.sd(this.d,-this.Ta,-this.Ua,3,!1)||(this.d.x=n,this.d.y=q,this.d.A()):(this.d.x=n,this.d.y= q,this.d.A())):(this.d.x=n,this.d.y=q,this.d.A()),c||(this.V=0)):!e&&!C&&Math.abs(this.ca)<Math.abs(this.fj/4)&&(this.ca=0,w||(L=!0)):(n=this.$r(),w&&!n?(k=Math.ceil(Math.abs(this.V*b))+2,n=this.d.x,q=this.d.y,this.d.x+=this.Ta*k,this.d.y+=this.Ua*k,this.d.A(),this.b.kc(this.d)||this.b.Se(this.d)?this.b.sd(this.d,-this.Ta,-this.Ua,k+2,!0):(this.d.x=n,this.d.y=q,this.d.A())):n&&(!w&&this.Ki&&(this.Tb=n,this.Cf=n.x,this.Df=n.y,this.ca=0,L=!0),0===this.ca&&this.b.pm(this.d,-this.Ta,-this.Ua,n))));if(0!== this.ca){n=this.d.x;q=this.d.y;this.d.x+=this.ca*b*this.Ta;this.d.y+=this.ca*b*this.Ua;f=this.d.x;a=this.d.y;this.d.A();k=this.b.kc(this.d);c=!1;if(!k&&0<this.ca&&!w){if((c=0<this.kg?null:this.b.Se(this.d,!0))&&c.length){if(this.ki){this.d.x=n;this.d.y=q;this.d.A();l=e=0;for(d=c.length;e<d;e++)c[l]=c[e],this.b.Fc(this.d,c[e])||l++;c.length=l;this.d.x=f;this.d.y=a;this.d.A()}1<=c.length&&(k=c[0])}c=!!k}k&&(this.b.Lf(this.d,k),this.Lg=0,f=c?Math.abs(this.ca*b*2.5+10):Math.max(Math.abs(this.ca*b*2.5+ 10),30),this.b.sd(this.d,this.Ta*(0>this.ca?1:-1),this.Ua*(0>this.ca?1:-1),f,c,k)?(this.Tb=k,this.Cf=k.x,this.Df=k.y,(this.Ki=c)&&(L=!0),this.ca=0):(this.d.x=n,this.d.y=q,this.d.A(),this.ji=!0,c||(this.ca=0)))}3!==this.Bd&&0<this.ca&&!w&&(this.b.trigger(Pc.prototype.i.Av,this.d),this.Bd=3);(w||L)&&0<=this.ca&&(3===this.Bd||L||C&&0===this.ca?(this.b.trigger(Pc.prototype.i.Iv,this.d),this.Bd=0===this.V&&0===this.ca?0:1):(0!==this.Bd&&0===this.V&&0===this.ca&&(this.b.trigger(Pc.prototype.i.Wv,this.d), this.Bd=0),1===this.Bd||0===this.V&&0===this.ca||C||(this.b.trigger(Pc.prototype.i.Lv,this.d),this.Bd=1)));0<this.kg&&this.kg--;this.ki=this.b.Se(this.d)}};f.prototype.dv=function(){return 0!==this.V||0!==this.ca};f.prototype.gv=function(){if(0!==this.ca)return!1;var b=null,f=null,k,a;k=this.d.x;a=this.d.y;this.d.x+=this.Ta;this.d.y+=this.Ua;this.d.A();(b=this.b.kc(this.d))||0!==this.kg||(f=this.b.Se(this.d,!0));this.d.x=k;this.d.y=a;this.d.A();if(b)return!this.b.Fc(this.d,b);if(f&&f.length){a=b= 0;for(k=f.length;b<k;b++)f[a]=f[b],this.b.Fc(this.d,f[b])||a++;if(1<=a)return!0}return!1};f.prototype.cv=function(){return 0>this.ca};f.prototype.av=function(){return 0<this.ca};f.prototype.Gv=function(){return!0};f.prototype.Av=function(){return!0};f.prototype.Wv=function(){return!0};f.prototype.Lv=function(){return!0};f.prototype.Iv=function(){return!0};b.i=new f;k.prototype.rw=function(b){this.pl=b};k.prototype.pw=function(b){this.il!==b&&(this.Zd=b,this.Up(),this.b.kc(this.d)&&(this.b.sd(this.d, this.Ta,this.Ua,10),this.d.x+=2*this.Ta,this.d.y+=2*this.Ua,this.d.A()),this.Tb=null)};k.prototype.Ew=function(b){switch(b){case 0:this.Gm=!0;break;case 1:this.Hm=!0;break;case 2:this.Rj=!0}};k.prototype.Aw=function(b){this.V=b};k.prototype.Bw=function(b){this.ca=b};b.q=new k;b.D=new function(){}})();var Qc=[],Rc=[],Sc=[],Tc=[],Uc=[],Vc=[],Wc=[],Xc=[],cd=[],dd=[]; function ed(f){return result=(f/=1)<1/2.75?7.5625*f*f+0:f<2/2.75?1*(7.5625*(f-=1.5/2.75)*f+.75)+0:f<2.5/2.75?1*(7.5625*(f-=2.25/2.75)*f+.9375)+0:1*(7.5625*(f-=2.625/2.75)*f+.984375)+0}function fd(f,k){return Math.round(f/k*1E4)} function gd(f,k,b,n,g){var r=0;switch(f){case 0:r=1*k/b+0;break;case 1:r=1*(k/=b)*k+0;break;case 2:r=-1*(k/=b)*(k-2)+0;break;case 3:r=1>(k/=b/2)?.5*k*k+0:-.5*(--k*(k-2)-1)+0;break;case 4:r=1*(k/=b)*k*k+0;break;case 5:r=1*((k=k/b-1)*k*k+1)+0;break;case 6:r=1>(k/=b/2)?.5*k*k*k+0:.5*((k-=2)*k*k+2)+0;break;case 7:r=1*(k/=b)*k*k*k+0;break;case 8:r=-1*((k=k/b-1)*k*k*k-1)+0;break;case 9:r=1>(k/=b/2)?.5*k*k*k*k+0:-.5*((k-=2)*k*k*k-2)+0;break;case 10:r=1*(k/=b)*k*k*k*k+0;break;case 11:r=1*((k=k/b-1)*k*k*k* k+1)+0;break;case 12:r=1>(k/=b/2)?.5*k*k*k*k*k+0:.5*((k-=2)*k*k*k*k+2)+0;break;case 13:g.Oc?r=Uc[fd(k,b)]:r=-(Math.sqrt(1-k*k)-1);break;case 14:g.Oc?r=Vc[fd(k,b)]:r=Math.sqrt(1-(k-1)*(k-1));break;case 15:r=g.Oc?Wc[fd(k,b)]:1>(k/=b/2)?-.5*(Math.sqrt(1-k*k)-1)+0:.5*(Math.sqrt(1-(k-=2)*k)+1)+0;break;case 16:g.Oc?r=Xc[fd(k,b)]:(g=g.Cc,r=1*(k/=b)*k*((g+1)*k-g)+0);break;case 17:g.Oc?r=cd[fd(k,b)]:(g=g.Cc,r=1*((k=k/b-1)*k*((g+1)*k+g)+1)+0);break;case 18:g.Oc?r=dd[fd(k,b)]:(g=g.Cc,r=1>(k/=b/2)?.5*k*k*(((g*= 1.525)+1)*k-g)+0:.5*((k-=2)*k*(((g*=1.525)+1)*k+g)+2)+0);break;case 19:g.Oc?r=Rc[fd(k,b)]:(r=g.Rg,f=g.Dj,k/=b,0==f&&(f=.3*b),0==r||r<Math.abs(1)?(r=1,g=f/4):g=f/(2*Math.PI)*Math.asin(1/r),r=-(r*Math.pow(2,10*--k)*Math.sin(2*(k*b-g)*Math.PI/f))+0);break;case 20:g.Oc?r=Sc[fd(k,b)]:(r=g.Rg,f=g.Dj,k/=b,0==f&&(f=.3*b),0==r||r<Math.abs(1)?(r=1,g=f/4):g=f/(2*Math.PI)*Math.asin(1/r),r=r*Math.pow(2,-10*k)*Math.sin(2*(k*b-g)*Math.PI/f)+1);break;case 21:g.Oc?r=Tc[fd(k,b)]:(r=g.Rg,f=g.Dj,k/=b/2,0==f&&(f=.3*b* 1.5),0==r||r<Math.abs(1)?(r=1,g=f/4):g=f/(2*Math.PI)*Math.asin(1/r),r=1>k?-.5*r*Math.pow(2,10*--k)*Math.sin(2*(k*b-g)*Math.PI/f)+0:r*Math.pow(2,-10*--k)*Math.sin(2*(k*b-g)*Math.PI/f)*.5+1);break;case 22:r=g.Oc?1-Qc[fd(b-k,b)]+0:1-ed(b-k/b)+0;break;case 23:r=g.Oc?Qc[fd(k,b)]:ed(k/b);break;case 24:r=g.Oc?k<b/2?.5*(1-Qc[fd(b-2*k,b)]+0)+0:.5*Qc[fd(2*k-b,b)]+.5:k<b/2?.5*(1-ed(b-2*k)+0)+0:.5*ed((2*k-b)/b)+.5;break;case 25:k=k/b/2;r=2*k*k*(3-2*k);break;case 26:k=(k/b+1)/2;r=2*k*k*(3-2*k)-1;break;case 27:k= k/b,r=k*k*(3-2*k)}return n?1-r:r} for(var hd=0,id=0,jd=0,Y=0,Z=0,kd=0;1E4>=kd;kd++)Y=kd/1E4,hd=(Y/=1)<1/2.75?7.5625*Y*Y+0:Y<2/2.75?1*(7.5625*(Y-=1.5/2.75)*Y+.75)+0:Y<2.5/2.75?1*(7.5625*(Y-=2.25/2.75)*Y+.9375)+0:1*(7.5625*(Y-=2.625/2.75)*Y+.984375)+0,Qc[kd]=hd,Y=kd/1E4,jd=id=0,Y/=1,0==jd&&(jd=.3),0==id||id<Math.abs(1)?(id=1,Z=jd/4):Z=jd/(2*Math.PI)*Math.asin(1/id),hd=-(id*Math.pow(2,10*--Y)*Math.sin(2*(1*Y-Z)*Math.PI/jd))+0,Rc[kd]=hd,Y=kd/1E4,jd=id=0,Y/=1,0==jd&&(jd=.3),0==id||id<Math.abs(1)?(id=1,Z=jd/4):Z=jd/(2*Math.PI)*Math.asin(1/ id),hd=id*Math.pow(2,-10*Y)*Math.sin(2*(1*Y-Z)*Math.PI/jd)+1,Sc[kd]=hd,Y=kd/1E4,jd=id=0,Y/=.5,0==jd&&(jd=.3*1.5),0==id||id<Math.abs(1)?(id=1,Z=jd/4):Z=jd/(2*Math.PI)*Math.asin(1/id),hd=1>Y?-.5*id*Math.pow(2,10*--Y)*Math.sin(2*(1*Y-Z)*Math.PI/jd)+0:id*Math.pow(2,-10*--Y)*Math.sin(2*(1*Y-Z)*Math.PI/jd)*.5+1,Tc[kd]=hd,Y=kd/1E4,Uc[kd]=-(Math.sqrt(1-Y*Y)-1),Y=kd/1E4,Vc[kd]=Math.sqrt(1-(Y-1)*(Y-1)),Y=kd/1E4,hd=1>(Y/=.5)?-.5*(Math.sqrt(1-Y*Y)-1)+0:.5*(Math.sqrt(1-(Y-=2)*Y)+1)+0,Wc[kd]=hd,Y=kd/1E4,Z=0,0== Z&&(Z=1.70158),hd=1*(Y/=1)*Y*((Z+1)*Y-Z)+0,Xc[kd]=hd,Y=kd/1E4,Z=0,0==Z&&(Z=1.70158),hd=1*((Y=Y/1-1)*Y*((Z+1)*Y+Z)+1)+0,cd[kd]=hd,Y=kd/1E4,Z=0,0==Z&&(Z=1.70158),hd=1>(Y/=.5)?.5*Y*Y*(((Z*=1.525)+1)*Y-Z)+0:.5*((Y-=2)*Y*(((Z*=1.525)+1)*Y+Z)+2)+0,dd[kd]=hd; function ld(f,k,b,n,g,r,p){this.name=f;this.value=0;this.Uh(n);this.Fm(g);this.fg=b;this.Za=k;this.duration=r;this.state=this.P=0;this.Yl=this.Zl=this.Vl=this.Nh=!1;this.Ub=this.Wa=0;this.fc=p;this.Ne=1;this.Ji=!1;this.Vc=[];this.rs=1;for(f=0;28>f;f++)this.Vc[f]={},this.Vc[f].Rg=0,this.Vc[f].Dj=0,this.Vc[f].Zh=0,this.Vc[f].Cc=0,this.Vc[f].Oc=!0}ld.prototype={};ld.prototype.Uh=function(f){this.ta=parseFloat(f.split(",")[0]);this.tb=parseFloat(f.split(",")[1]);this.Ub=this.Wa=0}; ld.prototype.Fm=function(f){this.qa=parseFloat(f.split(",")[0]);this.fb=parseFloat(f.split(",")[1]);isNaN(this.fb)&&(this.fb=this.qa)}; ld.prototype.pn=function(f){if(0===this.state)return-1;1===this.state&&(this.P+=f);2===this.state&&(this.P-=f);3===this.state&&(this.state=0);if(4===this.state||6===this.state)this.P+=f*this.Ne;5===this.state&&(this.P+=f*this.Ne);return 0>this.P?(this.P=0,4===this.state?this.Ne=1:6===this.state?(this.Ne=1,this.Ji=!1):this.state=0,this.Yl=!0,0):this.P>this.duration?(this.P=this.duration,4===this.state?this.Ne=-1:6===this.state?(this.Ne=-1,this.Ji=!0):5===this.state?this.P=0:this.state=0,this.Vl=!0, 1):this.Ji?gd(this.fg,this.duration-this.P,this.duration,this.Ji,this.Vc[this.fg]):gd(this.fg,this.P,this.duration,this.Ji,this.Vc[this.fg])};function nd(f){this.b=f} (function(){var f=nd.prototype;f.O=function(b){this.behavior=b;this.b=b.b};f.O.prototype.G=function(){};f.K=function(b,f){this.type=b;this.behavior=b.behavior;this.d=f;this.b=b.b};var k=f.K.prototype;k.G=function(){this.Rh=this.n[0];this.Zb=1==this.Rh||2==this.Rh||3==this.Rh||4==this.Rh;this.Za=this.n[1];this.Sn=this.n[2];this.target=this.n[3];this.Mm=this.n[4];this.$m=!1;1===this.Mm&&(this.target="relative("+this.target+")");this.duration=this.n[5];this.fc=1===this.n[6];this.value=0;this.C={};this.Kq(this.Za, this.Sn,"current",this.target,this.duration,this.fc);1===this.n[0]&&this.Tj(0);2===this.n[0]&&this.Tj(2);3===this.n[0]&&this.Tj(3);4===this.n[0]&&this.Tj(4)};k.he=function(b,f){void 0===f&&(f="current");var g=f.replace(/^\s\s*/,"").replace(/\s\s*$/,"");f=f.replace(/^\s\s*/,"").replace(/\s\s*$/,"");var k=this.value;if("current"===f)switch(b){case 0:g=this.d.x+","+this.d.y;break;case 1:g=this.d.width+","+this.d.height;break;case 2:g=this.d.width+","+this.d.height;break;case 3:g=this.d.width+","+this.d.height; break;case 4:g=Ia(this.d.k)+","+Ia(this.d.k);break;case 5:g=100*this.d.opacity+","+100*this.d.opacity;break;case 6:g=k+","+k;break;case 7:g=this.d.x+","+this.d.y;break;case 8:g=this.d.x+","+this.d.y;break;case 9:g=void 0!==this.d.Sa?this.d.width/this.d.Sa.width+","+this.d.height/this.d.Sa.height:"1,1"}if("relative"===f.substring(0,8)){var p=f.match(/\((.*?)\)/);if(p)var a=parseFloat(p[1].split(",")[0]),c=parseFloat(p[1].split(",")[1]);isNaN(a)&&(a=0);isNaN(c)&&(c=0);switch(b){case 0:g=this.d.x+a+ ","+(this.d.y+c);break;case 1:g=this.d.width+a+","+(this.d.height+c);break;case 2:g=this.d.width+a+","+(this.d.height+c);break;case 3:g=this.d.width+a+","+(this.d.height+c);break;case 4:g=Ia(this.d.k)+a+","+(Ia(this.d.k)+c);break;case 5:g=100*this.d.opacity+a+","+(100*this.d.opacity+c);break;case 6:g=k+a+","+k+a;break;case 7:g=this.d.x+a+","+this.d.y;break;case 8:g=this.d.x+","+(this.d.y+a);break;case 9:g=a+","+c}}return g};k.Kq=function(b,f,g,k,p,a){g=this.he(b,g);k=this.he(b,k);void 0!==this.C["default"]&& delete this.C["default"];this.C["default"]=new ld("default",b,f,g,k,p,a);this.C["default"].Ae=0};k.Xa=function(){JSON.stringify(this.C["default"]);return{playmode:this.Rh,active:this.Zb,tweened:this.Za,easing:this.Sn,target:this.target,targetmode:this.Mm,useCurrent:this.$m,duration:this.duration,enforce:this.fc,value:this.value,tweenlist:JSON.stringify(this.C["default"])}};ld.kv=function(b,f,g,k,p,a,c,e){f=new ld(f,g,k,p,a,c,e);for(var d in b)f[d]=b[d];return f};k.kb=function(b){var f=JSON.parse(b.tweenlist), f=ld.kv(f,f.name,f.Za,f.fg,f.ta+","+f.tb,f.qa+","+f.fb,f.duration,f.fc);this.C["default"]=f;this.Rh=b.playmode;this.Zb=b.active;this.Sn=b.easing;this.target=b.target;this.Mm=b.targetmode;this.$m=b.useCurrent;this.duration=b.duration;this.fc=b.enforce;this.value=b.value};k.QA=function(b){1<b&&(b=1);0>b&&(b=0);for(var f in this.C){var g=this.C[f];g.Wa=0;g.Ub=0;g.state=3;g.P=b*g.duration;var k=g.pn(0);this.Wp(g,k)}};k.Tj=function(b){for(var f in this.C){var g=this.C[f];if(this.$m){var k=this.he(g.Za, "current"),p=this.he(g.Za,this.target);g.Uh(k);g.Fm(p)}0===b&&(g.P=1E-6,g.Wa=0,g.Ub=0,g.Nh=!0,g.state=1);1===b&&(g.state=g.rs);if(2===b||4===b)g.P=1E-6,g.Wa=0,g.Ub=0,g.Nh=!0,2==b&&(g.state=4),4==b&&(g.state=6);3===b&&(g.P=1E-6,g.Wa=0,g.Ub=0,g.Nh=!0,g.state=5)}};k.XA=function(b){for(var f in this.C){var g=this.C[f];3!=g.state&&0!=g.state&&(g.rs=g.state);1===b&&(g.P=0);2===b&&(g.P=g.duration);g.state=3;var k=g.pn(0);this.Wp(g,k)}};k.AA=function(b){for(var f in this.C){var g=this.C[f];1===b&&(g.P=g.duration, g.Wa=0,g.Ub=0,g.Zl=!0);g.state=2}};k.Wp=function(b,f){if(0===b.Za)b.fc?(this.d.x=b.ta+(b.qa-b.ta)*f,this.d.y=b.tb+(b.fb-b.tb)*f):(this.d.x+=(b.qa-b.ta)*f-b.Wa,this.d.y+=(b.fb-b.tb)*f-b.Ub,b.Wa=(b.qa-b.ta)*f,b.Ub=(b.fb-b.tb)*f);else if(1===b.Za)b.fc?(this.d.width=b.ta+(b.qa-b.ta)*f,this.d.height=b.tb+(b.fb-b.tb)*f):(this.d.width+=(b.qa-b.ta)*f-b.Wa,this.d.height+=(b.fb-b.tb)*f-b.Ub,b.Wa=(b.qa-b.ta)*f,b.Ub=(b.fb-b.tb)*f);else if(2===b.Za)b.fc?this.d.width=b.ta+(b.qa-b.ta)*f:(this.d.width+=(b.qa-b.ta)* f-b.Wa,b.Wa=(b.qa-b.ta)*f);else if(3===b.Za)b.fc?this.d.height=b.tb+(b.fb-b.tb)*f:(this.d.height+=(b.fb-b.tb)*f-b.Ub,b.Ub=(b.fb-b.tb)*f);else if(4===b.Za)if(b.fc){var g=b.ta+(b.qa-b.ta)*f;this.d.k=Ka(F(g))}else g=(b.qa-b.ta)*f-b.Wa,this.d.k=Ka(this.d.k+F(g)),b.Wa=(b.qa-b.ta)*f;else if(5===b.Za)b.fc?this.d.opacity=(b.ta+(b.qa-b.ta)*f)/100:(this.d.opacity+=((b.qa-b.ta)*f-b.Wa)/100,b.Wa=(b.qa-b.ta)*f);else if(6===b.Za)b.fc?this.value=b.ta+(b.qa-b.ta)*f:(this.value+=(b.qa-b.ta)*f-b.Wa,b.Wa=(b.qa-b.ta)* f);else if(7===b.Za)b.fc?this.d.x=b.ta+(b.qa-b.ta)*f:(this.d.x+=(b.qa-b.ta)*f-b.Wa,b.Wa=(b.qa-b.ta)*f);else if(8===b.Za)b.fc?this.d.y=b.tb+(b.fb-b.tb)*f:(this.d.y+=(b.fb-b.tb)*f-b.Ub,b.Ub=(b.fb-b.tb)*f);else if(9===b.Za){var g=b.ta+(b.qa-b.ta)*f,k=b.tb+(b.fb-b.tb)*f;0>this.d.width&&(g=b.ta+(b.qa+b.ta)*-f);0>this.d.height&&(k=b.tb+(b.fb+b.tb)*-f);b.fc?(this.d.width=this.d.Sa.width*g,this.d.height=this.d.Sa.height*k):(0>this.d.width?(this.d.width=this.d.width/(-1+b.Wa)*g,b.Wa=g+1):(this.d.width=this.d.width/ (1+b.Wa)*g,b.Wa=g-1),0>this.d.height?(this.d.height=this.d.height/(-1+b.Ub)*k,b.Ub=k+1):(this.d.height=this.d.height/(1+b.Ub)*k,b.Ub=k-1))}this.d.A()};k.Ya=function(){var b=this.b.ih(this.d),f=this.C["default"];0!==f.state&&(f.Nh&&(this.b.trigger(nd.prototype.i.Vv,this.d),f.Nh=!1),f.Zl&&(this.b.trigger(nd.prototype.i.Tv,this.d),f.Zl=!1),this.Zb=1==f.state||2==f.state||4==f.state||5==f.state||6==f.state,b=f.pn(b),this.Wp(f,b),f.Vl&&(this.b.trigger(nd.prototype.i.xv,this.d),f.Vl=!1),f.Yl&&(this.b.trigger(nd.prototype.i.Sv, this.d),f.Yl=!1))};f.i={};k=f.i;k.BB=function(){return 0!==this.C["default"].state};k.EB=function(){return 2==this.C["default"].state};k.xB=function(b,f){var g=this.C["default"];return kc(g.P/g.duration,b,f)};k.OB=function(b,f){var g=this.C["default"];this.Zj=kc(g.P/g.duration,b,f);if(g=this.ep!=this.Zj&&this.Zj)this.ep=this.Zj;return g};k.Vv=function(){return void 0===this.C["default"]?!1:this.C["default"].Nh};k.Tv=function(){return void 0===this.C["default"]?!1:this.C["default"].Zl};k.xv=function(){return void 0=== this.C["default"]?!1:this.C["default"].Vl};k.Sv=function(){return void 0===this.C["default"]?!1:this.C["default"].Yl};f.q={};k=f.q;k.Hw=function(b,f){this.ep=this.Zj=!1;this.$m=1==f;this.Tj(b)};k.Jw=function(b){this.XA(b)};k.WB=function(b){this.ep=this.Zj=!1;this.AA(b)};k.UB=function(b){this.QA(b)};k.mw=function(b){isNaN(b)||0>b||void 0===this.C["default"]||(this.C["default"].duration=b)};k.fC=function(b){void 0!==this.C["default"]&&(this.C["default"].fc=1===b)};k.gC=function(b){void 0!==this.C["default"]&& (b=this.he(this.C["default"].Za,b),this.C["default"].Uh(b))};k.xw=function(b,f,g){if(void 0!==this.C["default"]&&!isNaN(g)){var k=this.C["default"],p=g+"";this.Mm=f;var a="",c="";if(1===f){this.target="relative("+p+")";switch(b){case 0:a=this.d.x+g;c=k.fb;break;case 1:a=k.qa;c=this.d.y+g;break;case 2:c=a=""+Ia(this.d.k+F(g));break;case 3:c=a=""+100*this.d.opacity+g;break;case 4:a=this.d.width+g;c=k.fb;break;case 5:a=k.qa;c=this.d.height+g;break;case 6:c=a=g}p=a+","+c}else{switch(b){case 0:a=g;c=k.fb; break;case 1:a=k.qa;c=g;break;case 2:c=a=g;break;case 3:c=a=g;break;case 4:a=g;c=k.fb;break;case 5:a=k.qa;c=g;break;case 6:c=a=g}this.target=p=a+","+c}b=this.he(this.C["default"].Za,"current");p=this.he(this.C["default"].Za,p);k.Uh(b);k.Fm(p)}};k.kC=function(b){void 0!==this.C["default"]&&(this.C["default"].Za=b)};k.ow=function(b){void 0!==this.C["default"]&&(this.C["default"].fg=b)};k.cC=function(b,f,g,k,p){void 0!==this.C["default"]&&(this.C["default"].Vc[b].Oc=!1,this.C["default"].Vc[b].Rg=f,this.C["default"].Vc[b].Dj= g,this.C["default"].Vc[b].Zh=k,this.C["default"].Vc[b].Cc=p)};k.VB=function(){void 0!==this.C["default"]&&(this.C["default"].Oc=!0)};k.lC=function(b){var f=this.C["default"];this.value=b;6===f.Za&&f.Uh(this.he(f.Za,"current"))};k.iC=function(b,f,g,k,p){if(void 0===this.C["default"])this.Kq(b,f,initial,g,k,p);else{var a=this.C["default"];a.Za=b;a.fg=f;a.Uh(this.he(b,"current"));a.Fm(this.he(b,g));a.duration=k;a.fc=1===p}};f.D={};f=f.D;f.nC=function(b){var f="N/A";switch(this.C["default"].state){case 0:f= "paused";break;case 1:f="playing";break;case 2:f="reversing";break;case 3:f="seeking"}b.yb(f)};f.fw=function(b){b.r(this.C["default"].P/this.C["default"].duration)};f.Qu=function(b){b.r(this.C["default"].duration)};f.pC=function(b){var f=this.C["default"],g="N/A";switch(f.Za){case 0:g=f.qa;break;case 1:g=f.fb;break;case 2:g=f.qa;break;case 3:g=f.qa;break;case 4:g=f.qa;break;case 5:g=f.fb;break;case 6:g=f.qa}b.r(g)};f.tC=function(b){b.r(this.value)};f.rC=function(b,f,g,k,p){k=1<k?1:k;p=gd(p,0>k?0: k,1,!1,!1);b.r(f+p*(g-f))}})();function uc(f){this.b=f}(function(){var f=uc.prototype;f.O=function(b){this.behavior=b;this.b=b.b};f.O.prototype.G=function(){};f.K=function(b,f){this.type=b;this.behavior=b.behavior;this.d=f;this.b=b.b};var k=f.K.prototype;k.G=function(){this.d.H.solidEnabled=0!==this.n[0]};k.Ya=function(){};f.i=new function(){};f.q=new function(){}})(); function tc(){return[Ac,Bc,Gc,vc,Cc,W,Kc,Jc,Hc,Ic,wc,xc,yc,zc,uc,Lc,Pc,Oc,Nc,nd,Mc,K.prototype.i.qq,Pc.prototype.q.pw,W.prototype.q.Pu,W.prototype.q.xq,Jc.prototype.q.xq,Jc.prototype.q.qw,Jc.prototype.D.Cu,W.prototype.D.wn,K.prototype.i.bv,W.prototype.i.Iu,Kc.prototype.i.mn,K.prototype.i.Hu,Kc.prototype.D.Nw,W.prototype.D.zq,W.prototype.q.vw,Kc.prototype.i.Yu,Pc.prototype.q.Ew,Cc.prototype.i.oq,Pc.prototype.i.gv,xc.prototype.q.Play,xc.prototype.q.ew,K.prototype.D["int"],K.prototype.D.Yq,W.prototype.i.aw, K.prototype.D.yx,W.prototype.i.Lu,Pc.prototype.q.rw,Pc.prototype.q.Aw,Pc.prototype.q.Bw,W.prototype.q.sw,K.prototype.D.k,W.prototype.q.Fw,W.prototype.q.sn,Cc.prototype.i.kn,Kc.prototype.i.ln,K.prototype.D.cos,W.prototype.q.ww,K.prototype.D.sin,W.prototype.q.yw,W.prototype.i.tv,K.prototype.i.Ju,K.prototype.q.iw,K.prototype.D.Nz,K.prototype.D.IA,K.prototype.D.lB,K.prototype.D.Ae,Jc.prototype.q.sn,Jc.prototype.D.Mw,K.prototype.i.Su,K.prototype.q.Nu,K.prototype.D.random,W.prototype.q.mv,W.prototype.q.kw, Jc.prototype.q.Aq,W.prototype.q.Aq,K.prototype.D.min,K.prototype.D.mx,W.prototype.D.Mu,K.prototype.i.Uu,K.prototype.D.Qz,K.prototype.D.mB,W.prototype.q.yq,W.prototype.i.Ku,K.prototype.D.kB,K.prototype.i.Kw,K.prototype.q.zw,W.prototype.q.Dw,Jc.prototype.D.wn,W.prototype.i.iv,K.prototype.i.jq,K.prototype.q.Lw,Hc.prototype.q.ni,Hc.prototype.q.hq,Nc.prototype.q.Tu,Kc.prototype.i.qn,K.prototype.q.Vu,Pc.prototype.i.dv,W.prototype.q.jw,Pc.prototype.i.cv,Pc.prototype.i.av,W.prototype.i.hv,Oc.prototype.q.dw, zc.prototype.q.lw,zc.prototype.q.ni,K.prototype.D.cB,Ac.prototype.D.Ou,Gc.prototype.q.Eu,Bc.prototype.q.xz,K.prototype.i.hw,K.prototype.D.pB,K.prototype.D.oB,nd.prototype.q.Hw,nd.prototype.q.ow,nd.prototype.q.mw,nd.prototype.q.xw,Mc.prototype.q.Iw,Hc.prototype.D.iq,Gc.prototype.i.nq,Gc.prototype.q.uw,Bc.prototype.q.Tw,yc.prototype.D.gw,Gc.prototype.i.cf,Gc.prototype.D.Ru,K.prototype.q.zu,K.prototype.q.Wu,zc.prototype.i.lq,yc.prototype.q.Xu,K.prototype.i.bw,Ic.prototype.q.ni,W.prototype.D.iq]};
mit
gautelinga/BERNAISE
problems/single_channel.py
6342
import dolfin as df import numpy as np import os from . import * from common.io import mpi_is_root from common.bcs import Fixed, Charged, Pressure __author__ = "Gaute Linga" class ChannelSubDomain(df.SubDomain): def __init__(self, Lx, Ly, Lx_inner): self.Lx = Lx self.Ly = Ly self.Lx_inner = Lx_inner df.SubDomain.__init__(self) def on_wall(self, x, on_boundary): return bool(df.near(x[1], 0.) or df.near(x[1], self.Ly)) def within_inner(self, x, on_boundary): return bool((x[0] > self.Lx/2 - self.Lx_inner/2) and (x[0] < self.Lx/2 + self.Lx_inner/2)) class Left(ChannelSubDomain): def inside(self, x, on_boundary): return bool(df.near(x[0], 0.0) and on_boundary) class Right(ChannelSubDomain): def inside(self, x, on_boundary): return bool(df.near(x[0], self.Lx) and on_boundary) class OuterWall(ChannelSubDomain): def inside(self, x, on_boundary): return bool(on_boundary and self.on_wall(x, on_boundary) and not self.within_inner(x, on_boundary)) class InnerWall(ChannelSubDomain): def inside(self, x, on_boundary): return bool(on_boundary and self.on_wall(x, on_boundary) and self.within_inner(x, on_boundary)) class Wall(ChannelSubDomain): def inside(self, x, on_boundary): return bool(on_boundary and self.on_wall(x, on_boundary)) def problem(): info_cyan("Flow in a channel with single-phase electrohydrodynamics.") Re = 0.001 Pe = 1./2.189 lambda_D = 1.5 # 1.5 c_inf = 1.0 sigma_e = -6. #-6. f = 0.02 solutes = [["c_p", 1, 1./Pe, 1./Pe, 0., 0.], ["c_m", -1, 1./Pe, 1./Pe, 0., 0.]] # Format: name : (family, degree, is_vector) base_elements = dict(u=["Lagrange", 2, True], p=["Lagrange", 1, False], c=["Lagrange", 1, False], V=["Lagrange", 1, False]) # Default parameters to be loaded unless starting from checkpoint. parameters = dict( solver="stable_single", folder="results_single_channel", restart_folder=False, enable_NS=True, enable_PF=False, enable_EC=True, save_intv=5, stats_intv=5, checkpoint_intv=50, tstep=0, dt=0.01, t_0=0., T=100*1.0, grid_spacing=1./4, solutes=solutes, base_elements=base_elements, Lx=50., # 40., Lx_inner=20., Ly=6., concentration_init=c_inf, surface_charge=sigma_e, # density=[Re, Re], viscosity=[1., 1.], permittivity=[2.*lambda_D**2, 2.*lambda_D**2], EC_scheme="NL2", use_iterative_solvers=True, grav_const=f/Re, grav_dir=[1., 0], c_cutoff=0.1 ) return parameters def mesh(Lx=1., Ly=2., grid_spacing=1./16., **namespace): m = df.RectangleMesh(df.Point(0., 0.), df.Point(Lx, Ly), int(Lx/grid_spacing), int(Ly/grid_spacing)) x = m.coordinates() beta = 1. x[:, 1] = beta*x[:, 1] + (1.-beta)*0.5*Ly*(1 + np.arctan( np.pi*((x[:, 1]-0.5*Ly) / (0.5*Ly)))/np.arctan(np.pi)) return m def initialize(Lx, Ly, solutes, restart_folder, field_to_subspace, concentration_init, enable_NS, enable_EC, **namespace): """ Create the initial state. """ w_init_field = dict() if not restart_folder: if enable_EC: for solute in solutes: c_init_expr = df.Expression("c0", c0=concentration_init, degree=2) c_init = df.interpolate( c_init_expr, field_to_subspace[solute[0]].collapse()) w_init_field[solute[0]] = c_init return w_init_field def create_bcs(Lx, Ly, Lx_inner, solutes, concentration_init, mesh, surface_charge, enable_NS, enable_EC, **namespace): """ The boundaries and boundary conditions are defined here. """ boundaries = dict( right=[Right(Lx, Ly, Lx_inner)], left=[Left(Lx, Ly, Lx_inner)], #inner_wall=[InnerWall(Lx, Ly, Lx_inner)], #outer_wall=[OuterWall(Lx, Ly, Lx_inner)] wall=[Wall(Lx, Ly, Lx_inner)] ) bcs = dict() for boundary_name in boundaries.keys(): bcs[boundary_name] = dict() # Apply pointwise BCs e.g. to pin pressure. bcs_pointwise = dict() noslip = Fixed((0., 0.)) if enable_NS: bcs["left"]["p"] = Pressure(0.) bcs["right"]["p"] = Pressure(0.) #bcs["inner_wall"]["u"] = noslip #bcs["outer_wall"]["u"] = noslip bcs["wall"]["u"] = noslip if enable_EC: bcs["left"]["V"] = Fixed(0.) bcs["right"]["V"] = Charged(0.) #bcs["right"]["V"] = Fixed(0.) #bcs["outer_wall"]["V"] = Charged(0.) #bcs["inner_wall"]["V"] = Charged(surface_charge) bcs["wall"]["V"] = Charged(df.Expression( "0.5*sigma_e*(tanh((x[0]-0.5*(Lx-Lx_inner))/delta)-" "tanh((x[0]-0.5*(Lx+Lx_inner))/delta))", sigma_e=surface_charge, delta=2., Lx=Lx, Lx_inner=Lx_inner, degree=1)) for solute in solutes: bcs["left"][solute[0]] = Fixed(concentration_init) bcs["right"][solute[0]] = Fixed(concentration_init) return boundaries, bcs, bcs_pointwise def tstep_hook(t, tstep, stats_intv, field_to_subspace, field_to_subproblem, subproblems, w_, **namespace): info_blue("Timestep = {}".format(tstep)) def start_hook(w_, w_1, test_functions, solutes, permittivity, dx, ds, normal, dirichlet_bcs, neumann_bcs, boundary_to_mark, use_iterative_solvers, V_lagrange, enable_EC, **namespace): if enable_EC: from solvers.stable_single import equilibrium_EC info_blue("Equilibrating with a non-linear solver.") equilibrium_EC(**vars()) w_1["EC"].assign(w_["EC"]) return dict()
mit
netcredit/NetCreditHub
src/NetCreditHub.Kernel/Application/Services/Dto/IHasLongPageCount.cs
315
namespace NetCreditHub.Application.Services.Dto { /// <summary> /// ³éÏóÒ»¸öΪ DTOs ¶¨ÒåÒ»¸ö±ê×¼µÄ'ÏîÄ¿×ÜÒ³Êý(long)'µÄ½Ó¿Ú. /// </summary> public interface IHasLongPageCount { /// <summary> /// ÏîÄ¿×ÜÒ³Êý(long). /// </summary> long PageCount { get; set; } } }
mit
luckydonald/pytg2
examples/dump.py
681
# -*- coding: utf-8 -*- __author__ = 'luckydonald' from pytg2.receiver import Receiver from pytg2.utils import coroutine @coroutine def example_function(receiver): try: while True: msg = (yield) print('Full dump: {array}'.format(array=str( msg ))) except KeyboardInterrupt: receiver.stop() print("Exiting") if __name__ == '__main__': receiver = Receiver(port=4458) #get a Receiver Connector instance receiver.start() #start the Connector. receiver.message(example_function(receiver)) # add "example_function" function as listeners. You can supply arguments here (like receiver). # continues here, after exiting while loop in example_function() receiver.stop()
mit
ryanchanwo/FabricVegetation
documentation/html/search/functions_1.js
281
var searchData= [ ['bud',['Bud',['../_bud_8kl.html#a9fd193d7b03635da2b63cd2ebf99ccea',1,'Bud(Boolean active, Vec3 position):&#160;Bud.kl'],['../_bud_8kl.html#a190d273cd2108f4d38e8aec9138a3d40',1,'Bud(Boolean active, Vec3 position, Bud parent, UInt32 samples):&#160;Bud.kl']]] ];
mit
franklai/lyric-get-js
lyric_engine_js/index.js
2081
const fs = require('fs').promises; const path = require('path'); const urlModule = require('url'); const BlockedError = require('./include/blocked-error'); // let site_dict = {}; const site_array = []; class SiteNotSupportError extends Error { constructor(domain) { const message = `Site ${domain} is not supported`; super(message); this.domain = domain; } } const load_modules = async () => { let files; try { files = await fs.readdir(path.join(__dirname, 'modules')); } catch (error) { console.error('Failed to load modules. err:', error); return; } for (const f of files) { const object = path.parse(f); if (object.ext !== '.js') { continue; } if (f.includes('.test.js')) { continue; } const object_name = `./modules/${object.name}`; // eslint-disable-next-line import/no-dynamic-require, global-require site_array.push(require(object_name)); } }; const get_object = async (url) => { await load_modules(); let site; site_array.some((item) => { if (!url.includes(item.keyword)) { return false; } site = item; return true; }); if (!site) { const domain = urlModule.parse(url).hostname; throw new SiteNotSupportError(domain); } const object = new site.Lyric(url); if (!(await object.parse_page())) { throw new Error('Parse failed.'); } return object; }; const get_full = async (url) => { const object = await get_object(url); return object.get_full(); }; const get_json = async (url) => { const object = await get_object(url); return object.get_json(); }; exports.get_full = get_full; exports.get_json = get_json; exports.SiteNotSupportError = SiteNotSupportError; exports.BlockedError = BlockedError; async function main() { let url = 'http://www.utamap.com/showkasi.php?surl=70380'; if (process.argv.length > 2) { url = process.argv[2]; // eslint-disable-line prefer-destructuring } const lyric = await get_full(url); console.log('lyric:', lyric); } if (require.main === module) { main(); }
mit
l4l/android_sudoku
src/org/awesome_sudoku/io/FileManager.java
983
package org.awesome_sudoku.io; import java.io.File; import java.io.IOException; /** * Created by kitsu. * This file is part of AwesomeSudoku in package org.sudoku.io. */ public abstract class FileManager { protected final File file; /** * @param file is file for the next operation * @throws IOException */ protected FileManager(File file) throws IOException { this.file = file; if (!file.exists() && !file.createNewFile()) { throw new IOException(); } } /** * @return true if file empty */ public final boolean isEmpty() { return file.length() == 0; } /** * Removing file * @throws IOException */ protected final void remove() throws IOException { if (!file.delete()) throw new IOException(); } /** * Method for stream closing * @throws IOException */ public abstract void close() throws IOException; }
mit
rootulp/exercism
ruby/exercises/roman-numerals/roman.rb
498
# Fixnum # HACK: I don't like monkey patching class Integer NUMERALS = { 1 => 'I', 4 => 'IV', 5 => 'V', 9 => 'IX', 10 => 'X', 40 => 'XL', 50 => 'L', 90 => 'XC', 100 => 'C', 400 => 'CD', 500 => 'D', 900 => 'CM', 1000 => 'M' }.freeze def to_roman result = '' target = self NUMERALS.keys.reverse_each do |num| while target >= num target -= num result += NUMERALS[num] end end result end end
mit
pjtown/csharp-redis
Redis/RedisResponse.cs
1066
// Copyright 2012 Peter Townsend // Licensed under the MIT License using System.Collections.Generic; using System.Text; namespace Redis { public class RedisResponse { public string Value { get; set; } public List<RedisResponse> Responses { get; set; } public override string ToString() { if (this.Value != null) { return this.Value; } if (this.Responses == null || this.Responses.Count == 0) { return "nil"; } var sb = new StringBuilder("["); for (int i = 0; i < this.Responses.Count; i++) { if (i > 0) { sb.Append(","); } var childValue = this.Responses[i]; var childValueText = childValue != null ? childValue.ToString() : "nil"; if (childValueText == "nil") { sb.Append(childValueText); } else if (childValueText.StartsWith("[")) { sb.Append(childValueText); } else { sb.AppendFormat("\"{0}\"", childValueText); } } sb.Append("]"); return sb.ToString(); } } }
mit
inpsyde/WP-API-JSON-Adapter
test/bootstrap.php
775
<?php # -*- coding: utf-8 -*- namespace WPAPIAdapter\Test; use WPAPIAdapter; use Requisite; require_once dirname( __DIR__ ) . '/inc/init-requisite.php'; require_once dirname( __DIR__ ) . '/inc/register-autoloading.php'; require_once dirname( __DIR__ ) . '/vendor/autoload.php'; // there's a bug in WP_Mock's expectAction() // for now we use a own stub #require_once __DIR__ . '/Stub/do_action.php'; $requisite = WPAPIAdapter\init_requisite( dirname( __DIR__ ) . '/lib' ); WPAPIAdapter\register_autoloading( dirname( __DIR__ ), $requisite ); $requisite->addRule( new Requisite\Rule\NamespaceDirectoryMapper( __DIR__ . '/Stub', '\\' ) ); $requisite->addRule( new Requisite\Rule\NamespaceDirectoryMapper( __DIR__ . '/TestCase', __NAMESPACE__ . '\TestCase' ) );
mit
mode51/Tungsten
Src/Tungsten.IO.Pipes/PipeReadWriteExtensions.cs
16251
using System; using System.Threading.Tasks; namespace W.IO.Pipes { /// <summary> /// Read/Write functionality for Pipe /// </summary> public static class PipeReadWriteExtensions { //#region Read/Write ///// <summary> ///// Write an array of bytes to the pipe ///// </summary> ///// <param name="pipe">The pipe on which to write data</param> ///// <param name="bytes">The bytes to write</param> ///// <returns>True if the bytes were sent successfully, otherwise false</returns> //public static bool Write(this Pipe pipe, byte[] bytes) //{ // var result = pipe.Stream.Write(bytes, out Exception e); // if (e != null) // pipe.HandleDisconnection(e); // return result; //} ///// <summary> ///// Write a subset of an array of bytes to the pipe ///// </summary> ///// <param name="pipe">The pipe on which to write data</param> ///// <param name="bytes">The array containing the bytes to write</param> ///// <param name="offset">The index of the first byte to write</param> ///// <param name="count">The number of bytes to write</param> ///// <returns>True if the bytes were sent successfully, otherwise false</returns> //public static bool Write(this Pipe pipe, byte[] bytes, int offset, int count) //{ // var result = pipe.Stream.Write(bytes, offset, count, out Exception e); // if (e != null) // pipe.HandleDisconnection(e); // return result; //} ///// <summary> ///// Asynchronously write an array of bytes to the pipe ///// </summary> ///// <param name="pipe">The pipe on which to write data</param> ///// <param name="bytes">the bytes to write</param> ///// <returns>True if the bytes were sent successfully, otherwise false</returns> //public static async Task<bool> WriteAsync(this Pipe pipe, byte[] bytes) //{ // var result = await pipe.Stream.WriteAsync(bytes, e => // { // if (e != null) // pipe.HandleDisconnection(e); // }); // return result; //} ///// <summary> ///// Asynchronously write a subset of an array of bytes to the pipe ///// </summary> ///// <param name="pipe">The pipe on which to write data</param> ///// <param name="bytes">The array containing the bytes to write</param> ///// <param name="offset">The index of the first byte to write</param> ///// <param name="count">The number of bytes to write</param> ///// <returns>True if the bytes were sent successfully, otherwise false</returns> //public static async Task<bool> WriteAsync(this Pipe pipe, byte[] bytes, int offset, int count) //{ // var result = await pipe.Stream.WriteAsync(bytes, offset, count, e => // { // if (e != null) // pipe.HandleDisconnection(e); // }); // return result; //} ///// <summary> ///// Wait for data to be read from the pipe ///// </summary> ///// <param name="pipe">The pipe from which to read data</param> ///// <returns>An array of bytes read from the pipe, or null if the read failed (the pipe was closed)</returns> //public static byte[] Read(this Pipe pipe) //{ // var bytes = pipe.Stream.Read(out Exception e); // if (bytes != null) // pipe.HandleBytesReceived(bytes); // if (e != null) // pipe.HandleDisconnection(e); // return bytes; //} ///// <summary> ///// Asynchronously wait for data to be read from the pipe ///// </summary> ///// <param name="pipe">The pipe from which to read data</param> ///// <returns>An array of bytes read from the pipe, or null if the read failed (the pipe was closed)</returns> //public static async Task<byte[]> ReadAsync(this Pipe pipe) //{ // Exception exception = null; // var bytes = await pipe.Stream.ReadAsync(e => exception = e); // if (bytes != null) // pipe.HandleBytesReceived(bytes); // if (exception != null) // pipe.HandleDisconnection(exception); // return bytes; //} //#endregion //#region Read/Write Generics ///// <summary> ///// Asynchronously waits for a message to be read from the pipe ///// </summary> ///// <param name="pipe">The pipe from which to read data</param> ///// <returns>The message received or null if the read failed (the pipe was closed)</returns> //public static async Task<TMessage> ReadAsync<TMessage>(this Pipe pipe) where TMessage : new() //{ // TMessage result = default(TMessage); // var bytes = await Helpers.ReadAsync(pipe.Stream); // if (bytes?.Length > 0) // pipe.HandleBytesReceived(bytes); // return result; //} //#endregion private class PipeBuffer<TMessage> { private W.Threading.Lockers.SpinLocker _locker = new Threading.Lockers.SpinLocker(); private System.Collections.Generic.List<byte[]> _messageBuffer = new System.Collections.Generic.List<byte[]>(); private int _totalLength = 0; private int _messageLength; public int MessageLength { get { return _locker.InLock(() => { return _messageLength; }); } set { _locker.InLock(() => { _messageLength = value; }); } } ///// <summary> ///// Raised when a full message has been received ///// </summary> //public event Action<PipeBuffer<TMessage>, byte[]> BytesReceived; ///// <summary> ///// Raises the BytesReceived event ///// </summary> ///// <param name="bytes">The full message</param> //protected void RaiseBytesReceived(PipeBuffer<TMessage> pipeBuffer, byte[] bytes) //{ // BytesReceived?.Invoke(pipeBuffer, bytes); //} /// <summary> /// Raised when a full message has been received /// </summary> public event Action<PipeBuffer<TMessage>, TMessage> MessageReceived; /// <summary> /// Raises the MessageReceived event /// </summary> /// <param name="message">The full message</param> protected void RaiseMessageReceived(PipeBuffer<TMessage> pipeBuffer, TMessage message) { MessageReceived?.Invoke(pipeBuffer, message); } /// <summary> /// Adds a PipeBufferPart to the full message /// </summary> /// <param name="bufferPart">The PipeBufferPart recieved from the pipe</param> public void Add(byte[] bytes) { _locker.InLock(() => { if (_messageLength == 0) throw new InvalidOperationException("Message length is 0. Cannot add bytes to a message of 0 length"); if (_totalLength + bytes.Length > _messageLength) throw new InvalidOperationException("The length of additional bytes makes the number of total bytes greater than the specified message length"); _messageBuffer.Add(bytes); _totalLength += bytes.Length; if (_totalLength == _messageLength) { var fullMessageBytes = new byte[_messageLength]; var offset = 0; for (int t = 0; t < _messageBuffer.Count; t++) { Buffer.BlockCopy(_messageBuffer[t], 0, fullMessageBytes, offset, _messageBuffer[t].Length); offset += _messageBuffer[t].Length; } _messageBuffer.Clear(); _messageLength = 0; _totalLength = 0; //RaiseBytesReceived(this, fullMessageBytes); TMessage message = default(TMessage); if (typeof(TMessage) == typeof(byte[])) message = (TMessage)Convert.ChangeType(fullMessageBytes, typeof(TMessage)); else { var json = fullMessageBytes.AsString(); message = Activator.CreateInstance<TMessage>(); Newtonsoft.Json.JsonConvert.PopulateObject(json, message); } RaiseMessageReceived(this, message); } }); } } #region Chunked Pipe Messages /// <summary> /// Waits for a message to be read from the pipe /// </summary> /// <param name="pipe">The pipe from which to read data</param> /// <returns>The message received or null if the read failed (the pipe was closed)</returns> public static TMessage Read<TMessage>(this Pipe<TMessage> pipe) { return Read<TMessage>((Pipe)pipe); } /// <summary> /// Waits for a message to be read from the pipe /// </summary> /// <param name="pipe">The pipe from which to read data</param> /// <returns>The message received or null if the read failed (the pipe was closed)</returns> public static async Task<TMessage> ReadAsync<TMessage>(this Pipe<TMessage> pipe) { return await ReadAsync<TMessage>((Pipe)pipe); } /// <summary> /// Write a message to the pipe /// </summary> /// <param name="pipe">The pipe on which to write data</param> /// <param name="message">The message to write</param> /// <returns>True if the message was sent successfully, otherwise false</returns> public static bool Write<TMessage>(this Pipe<TMessage> pipe, TMessage message) { if (typeof(TMessage) == typeof(byte[])) return Write(pipe, (byte[])Convert.ChangeType(message, typeof(byte[]))); var json = Newtonsoft.Json.JsonConvert.SerializeObject(message); return Write(pipe, json.AsBytes()); } /// <summary> /// Asynchronously write a message to the pipe /// </summary> /// <param name="pipe">The pipe on which to write data</param> /// <param name="message">The message to write</param> /// <returns>True if the message was sent successfully, otherwise false</returns> public static async Task<bool> WriteAsync<TMessage>(this Pipe<TMessage> pipe, TMessage message) { if (typeof(TMessage) == typeof(byte[])) { var bytes = (byte[])Convert.ChangeType(message, typeof(byte[])); var result = await Helpers.WriteAsync(pipe.Stream, BitConverter.GetBytes(bytes.Length)); if (result) result = await Helpers.WriteAsync(pipe.Stream, bytes); return result; } else { var json = Newtonsoft.Json.JsonConvert.SerializeObject(message); return await WriteAsync(pipe, json.AsBytes()); } } #endregion private static TMessage Read<TMessage>(this Pipe pipe) { TMessage result = default(TMessage); try { var bytes = Helpers.Read(pipe.Stream); if (bytes?.Length == 4) //only accept a proper header { var exit = false; var buffer = new PipeBuffer<TMessage>(); buffer.MessageLength = BitConverter.ToInt32(bytes, 0); buffer.MessageReceived += (b, m) => { //pipe.HandleBytesReceived(m); if (typeof(TMessage) == typeof(byte[])) result = (TMessage)Convert.ChangeType(m, typeof(TMessage)); else { result = m; //result = (TMessage)Activator.CreateInstance(typeof(TMessage)); //Newtonsoft.Json.JsonConvert.PopulateObject(m.AsString(), result); } exit = true; }; while (!exit) { bytes = Helpers.Read(pipe.Stream); if (bytes != null) buffer.Add(bytes); }; } return result; } catch (TaskCanceledException) { } catch (OperationCanceledException) { } catch (System.IO.IOException) { } catch (ObjectDisposedException) { } #if NET45 catch (System.Threading.ThreadAbortException e) { System.Threading.Thread.ResetAbort(); } #endif catch (InvalidOperationException) { } //pipe is in a disconnected state catch (Exception e) { System.Diagnostics.Debugger.Break(); } return result; } private static async Task<TMessage> ReadAsync<TMessage>(this Pipe pipe) { TMessage result = default(TMessage); try { var bytes = await Helpers.ReadAsync(pipe.Stream); if (bytes?.Length == 4) //only accept a proper header { var exit = false; var buffer = new PipeBuffer<TMessage>(); buffer.MessageLength = BitConverter.ToInt32(bytes, 0); buffer.MessageReceived += (b, m) => { //pipe.HandleBytesReceived(m); if (typeof(TMessage) == typeof(byte[])) result = (TMessage)Convert.ChangeType(m, typeof(byte[])); else result = m; //result = (TMessage)Activator.CreateInstance(typeof(TMessage)); //Newtonsoft.Json.JsonConvert.PopulateObject(m.AsString(), result); exit = true; }; while (!exit) { bytes = await Helpers.ReadAsync(pipe.Stream); if (bytes != null) buffer.Add(bytes); }; } } catch (TaskCanceledException) { } catch (OperationCanceledException) { } catch (System.IO.IOException) { } catch (ObjectDisposedException) { } #if NET45 catch (System.Threading.ThreadAbortException e) { System.Threading.Thread.ResetAbort(); } #endif catch (InvalidOperationException) { } //pipe is in a disconnected state catch (Exception e) { System.Diagnostics.Debugger.Break(); } return result; } private static bool Write(this Pipe pipe, byte[] bytes) { if (Helpers.Write(pipe.Stream, BitConverter.GetBytes(bytes.Length))) return Helpers.Write(pipe.Stream, bytes); return false; } private static async Task<bool> WriteAsync(this Pipe pipe, byte[] bytes) { var result = await Helpers.WriteAsync(pipe.Stream, BitConverter.GetBytes(bytes.Length)); if (result) result = await Helpers.WriteAsync(pipe.Stream, bytes); return result; } } }
mit
susisu/Loquat
packages/core/test.js
567
"use strict"; const $utils = require("./lib/utils")(); const $pos = require("./lib/pos")(); const $error = require("./lib/error")({ $pos }); const $parser = require("./lib/parser")({ $pos, $error }); const $stream = require("./lib/stream")({ $utils }); const $core = require("./lib/core")({ $utils, $pos, $error, $parser, $stream }); Object.assign(global, { $utils, $pos, $error, $stream, $parser, $core }); require("./test/utils"); require("./test/pos"); require("./test/error"); require("./test/stream"); require("./test/parser"); require("./test/core");
mit
godaddy/node-soap-client-utils
integration/soap-client-utils.js
103
'use strict'; describe('soap-client-utils', function(){ it('does something', function(){ }); });
mit
yohanesmario/Skripsi
software/WiFiWebAutoLogin/WiFiWebAutoLogin.RuntimeComponents/Properties/AssemblyInfo.cs
1088
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("WiFiWebAutoLogin.RuntimeComponents")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("WiFiWebAutoLogin.RuntimeComponents")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)]
mit
daxadax/tarot_backend
lib/tarot/entities/correspondence.rb
417
module Tarot module Entities class Correspondence < Entity attr_reader :golden_dawn def initialize(options) @golden_dawn = set_attribute options, :golden_dawn end private def set_attribute(options, name) options.fetch(name) do msg = "Missing required correspondence: #{name}" raise ArgumentError, msg end end end end end
mit
StephenCleary/AsyncEx
test/AsyncEx.Coordination.UnitTests/AsyncProducerConsumerQueueUnitTests.cs
6478
using System; using System.Collections.Generic; using System.Threading.Tasks; using Nito.AsyncEx; using System.Linq; using System.Threading; using System.Diagnostics.CodeAnalysis; using Xunit; using Nito.AsyncEx.Testing; namespace UnitTests { public class AsyncProducerConsumerQueueUnitTests { [Fact] public void ConstructorWithZeroMaxCount_Throws() { AsyncAssert.Throws<ArgumentOutOfRangeException>(() => new AsyncProducerConsumerQueue<int>(0)); } [Fact] public void ConstructorWithZeroMaxCountAndCollection_Throws() { AsyncAssert.Throws<ArgumentOutOfRangeException>(() => new AsyncProducerConsumerQueue<int>(new int[0], 0)); } [Fact] public void ConstructorWithMaxCountSmallerThanCollectionCount_Throws() { AsyncAssert.Throws<ArgumentException>(() => new AsyncProducerConsumerQueue<int>(new[] { 3, 5 }, 1)); } [Fact] public async Task ConstructorWithCollection_AddsItems() { var queue = new AsyncProducerConsumerQueue<int>(new[] { 3, 5, 7 }); var result1 = await queue.DequeueAsync(); var result2 = await queue.DequeueAsync(); var result3 = await queue.DequeueAsync(); Assert.Equal(3, result1); Assert.Equal(5, result2); Assert.Equal(7, result3); } [Fact] public async Task EnqueueAsync_SpaceAvailable_EnqueuesItem() { var queue = new AsyncProducerConsumerQueue<int>(); await queue.EnqueueAsync(3); var result = await queue.DequeueAsync(); Assert.Equal(3, result); } [Fact] public async Task EnqueueAsync_CompleteAdding_ThrowsException() { var queue = new AsyncProducerConsumerQueue<int>(); queue.CompleteAdding(); await AsyncAssert.ThrowsAsync<InvalidOperationException>(() => queue.EnqueueAsync(3)); } [Fact] public async Task DequeueAsync_EmptyAndComplete_ThrowsException() { var queue = new AsyncProducerConsumerQueue<int>(); queue.CompleteAdding(); await AsyncAssert.ThrowsAsync<InvalidOperationException>(() => queue.DequeueAsync()); } [Fact] public async Task DequeueAsync_Empty_DoesNotComplete() { var queue = new AsyncProducerConsumerQueue<int>(); var task = queue.DequeueAsync(); await AsyncAssert.NeverCompletesAsync(task); } [Fact] public async Task DequeueAsync_Empty_ItemAdded_Completes() { var queue = new AsyncProducerConsumerQueue<int>(); var task = queue.DequeueAsync(); await queue.EnqueueAsync(13); var result = await task; Assert.Equal(13, result); } [Fact] public async Task DequeueAsync_Cancelled_Throws() { var queue = new AsyncProducerConsumerQueue<int>(); var cts = new CancellationTokenSource(); var task = queue.DequeueAsync(cts.Token); cts.Cancel(); await AsyncAssert.ThrowsAsync<OperationCanceledException>(() => task); } [Fact] public async Task EnqueueAsync_Full_DoesNotComplete() { var queue = new AsyncProducerConsumerQueue<int>(new[] { 13 }, 1); var task = queue.EnqueueAsync(7); await AsyncAssert.NeverCompletesAsync(task); } [Fact] public async Task EnqueueAsync_SpaceAvailable_Completes() { var queue = new AsyncProducerConsumerQueue<int>(new[] { 13 }, 1); var task = queue.EnqueueAsync(7); await queue.DequeueAsync(); await task; } [Fact] public async Task EnqueueAsync_Cancelled_Throws() { var queue = new AsyncProducerConsumerQueue<int>(new[] { 13 }, 1); var cts = new CancellationTokenSource(); var task = queue.EnqueueAsync(7, cts.Token); cts.Cancel(); await AsyncAssert.ThrowsAsync<OperationCanceledException>(() => task); } [Fact] public void CompleteAdding_MultipleTimes_DoesNotThrow() { var queue = new AsyncProducerConsumerQueue<int>(); queue.CompleteAdding(); queue.CompleteAdding(); } [Fact] public async Task OutputAvailableAsync_NoItemsInQueue_IsNotCompleted() { var queue = new AsyncProducerConsumerQueue<int>(); var task = queue.OutputAvailableAsync(); await AsyncAssert.NeverCompletesAsync(task); } [Fact] public async Task OutputAvailableAsync_ItemInQueue_ReturnsTrue() { var queue = new AsyncProducerConsumerQueue<int>(); queue.Enqueue(13); var result = await queue.OutputAvailableAsync(); Assert.True(result); } [Fact] public async Task OutputAvailableAsync_NoItemsAndCompleted_ReturnsFalse() { var queue = new AsyncProducerConsumerQueue<int>(); queue.CompleteAdding(); var result = await queue.OutputAvailableAsync(); Assert.False(result); } [Fact] public async Task OutputAvailableAsync_ItemInQueueAndCompleted_ReturnsTrue() { var queue = new AsyncProducerConsumerQueue<int>(); queue.Enqueue(13); queue.CompleteAdding(); var result = await queue.OutputAvailableAsync(); Assert.True(result); } [Fact] public async Task StandardAsyncSingleConsumerCode() { var queue = new AsyncProducerConsumerQueue<int>(); var producer = Task.Run(() => { queue.Enqueue(3); queue.Enqueue(13); queue.Enqueue(17); queue.CompleteAdding(); }); var results = new List<int>(); while (await queue.OutputAvailableAsync()) { results.Add(queue.Dequeue()); } Assert.Equal(3, results.Count); Assert.Equal(3, results[0]); Assert.Equal(13, results[1]); Assert.Equal(17, results[2]); } } }
mit
umpirsky/platform
src/Oro/Bundle/EmailBundle/Entity/EmailOrigin.php
4254
<?php namespace Oro\Bundle\EmailBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; use JMS\Serializer\Annotation\Type; use JMS\Serializer\Annotation\Exclude; /** * Email Origin * * @ORM\Table(name="oro_email_origin") * @ORM\Entity * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="name", type="string", length=30) */ abstract class EmailOrigin { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @Type("integer") */ protected $id; /** * @var ArrayCollection * * @ORM\OneToMany(targetEntity="EmailFolder", mappedBy="origin", cascade={"persist", "remove"}, orphanRemoval=true) * @Exclude */ protected $folders; /** * @var boolean * * @ORM\Column(name="isActive", type="boolean") */ protected $isActive = true; /** * @var \DateTime * * @ORM\Column(name="sync_code_updated", type="datetime", nullable=true) */ protected $syncCodeUpdatedAt; /** * @var \DateTime * * @ORM\Column(name="synchronized", type="datetime", nullable=true) */ protected $synchronizedAt; /** * @var int * * @ORM\Column(name="sync_code", type="integer", nullable=true) */ protected $syncCode; /** * Constructor */ public function __construct() { $this->folders = new ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Get an email folder * * @param string $type Can be 'inbox', 'sent', 'trash', 'drafts' or 'other' * @return EmailFolder|null */ public function getFolder($type) { return $this->folders ->filter( function (EmailFolder $folder) use (&$type) { return $folder->getType() === $type; } )->first(); } /** * Get email folders * * @return EmailFolder[] */ public function getFolders() { return $this->folders; } /** * Add folder * * @param EmailFolder $folder * @return EmailOrigin */ public function addFolder(EmailFolder $folder) { $this->folders[] = $folder; $folder->setOrigin($this); return $this; } /** * Indicate whether this email origin is in active state or not * * @return boolean */ public function getIsActive() { return $this->isActive; } /** * Set this email origin in active/inactive state * * @param boolean $isActive * @return EmailOrigin */ public function setIsActive($isActive) { $this->isActive = $isActive; return $this; } /** * Get date/time when this object was changed * * @return \DateTime */ public function getSyncCodeUpdatedAt() { return $this->syncCodeUpdatedAt; } /** * Get date/time when emails from this origin were synchronized * * @return \DateTime */ public function getSynchronizedAt() { return $this->synchronizedAt; } /** * Set date/time when emails from this origin were synchronized * * @param \DateTime $synchronizedAt * @return EmailOrigin */ public function setSynchronizedAt($synchronizedAt) { $this->synchronizedAt = $synchronizedAt; return $this; } /** * Get the last synchronization result code * * @return int */ public function getSyncCode() { return $this->syncCode; } /** * Set the last synchronization result code * * @param int $syncCode * @return EmailOrigin */ public function setSyncCode($syncCode) { $this->syncCode = $syncCode; return $this; } /** * Get a human-readable representation of this object. * * @return string */ public function __toString() { return sprintf('EmailOrigin(%d)', $this->id); } }
mit
stripecoin/stripecoin
src/qt/locale/bitcoin_ro_RO.ts
110035
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ro_RO" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About stripecoin</source> <translation>Despre stripecoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;stripecoin&lt;/b&gt; version</source> <translation>&lt;b&gt;stripecoin&lt;/b&gt; versiunea</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young ([email protected]) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The stripecoin developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>Listă de adrese</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>Dublu-click pentru a edita adresa sau eticheta</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Creaţi o adresă nouă</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copiați adresa selectată în clipboard</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>&amp;Adresă nouă</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your stripecoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>Acestea sunt adresele dumneavoastră stripecoin pentru a primi plăţi. Dacă doriţi, puteți da o adresa diferită fiecărui expeditor, pentru a putea ţine evidenţa plăţilor.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>&amp;Copiază adresa</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>Arata codul QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a stripecoin address</source> <translation>Semneaza mesajul pentru a dovedi ca detii aceasta adresa Bitocin</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>Semneaza mesajul</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>Sterge adresele curent selectate din lista</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified stripecoin address</source> <translation>Verifica mesajul pentru a te asigura ca a fost insemnat cu o adresa stripecoin specifica</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation> Verifica mesajele</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Șterge</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your stripecoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>Copiază &amp;eticheta</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>&amp;Editează</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>Exportă Lista de adrese</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Fisier csv: valori separate prin virgulă (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>Eroare la exportare.</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Eroare la scrierea în fişerul %1.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Etichetă</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresă</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(fără etichetă)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Introduceți fraza de acces.</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Frază de acces nouă </translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Repetaţi noua frază de acces</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Introduceţi noua parolă a portofelului electronic.&lt;br/&gt;Vă rugăm să folosiţi &lt;b&gt;minimum 10 caractere aleatoare&lt;/b&gt;, sau &lt;b&gt;minimum 8 cuvinte&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Criptează portofelul</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Aceasta operație are nevoie de un portofel deblocat.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Deblochează portofelul</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Această operaţiune necesită parola pentru decriptarea portofelului electronic.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Decriptează portofelul.</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Schimbă fraza de acces</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Introduceţi vechea parola a portofelului eletronic şi apoi pe cea nouă.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Confirmă criptarea portofelului.</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR LITECOINS&lt;/b&gt;!</source> <translation>Atenție: Dacă pierdeţi parola portofelului electronic dupa criptare, &lt;b&gt;VEŢI PIERDE ÎNTREAGA SUMĂ DE stripecoin ACUMULATĂ&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Sunteţi sigur că doriţi să criptaţi portofelul electronic?</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Atentie! Caps Lock este pornit</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>Portofel criptat </translation> </message> <message> <location line="-56"/> <source>stripecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your litecoins from being stolen by malware infecting your computer.</source> <translation>stripecoin se va închide acum pentru a termina procesul de criptare. Amintiți-vă că criptarea portofelului dumneavoastră nu poate proteja în totalitate litecoins dvs. de a fi furate de intentii rele.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Criptarea portofelului a eșuat.</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Criptarea portofelului a eșuat din cauza unei erori interne. Portofelul tău nu a fost criptat.</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>Fraza de acces introdusă nu se potrivește.</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>Deblocarea portofelului electronic a eşuat.</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Parola introdusă pentru decriptarea portofelului electronic a fost incorectă.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Decriptarea portofelului electronic a eşuat.</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Parola portofelului electronic a fost schimbată.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>Semneaza &amp;mesaj...</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>Se sincronizează cu reţeaua...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>&amp;Detalii</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Afişează detalii despre portofelul electronic</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;Tranzacţii</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Istoricul tranzacţiilor</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>Editaţi lista de adrese şi etichete.</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>Lista de adrese pentru recepţionarea plăţilor</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>Ieșire</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Părăsiţi aplicaţia</translation> </message> <message> <location line="+4"/> <source>Show information about stripecoin</source> <translation>Informaţii despre stripecoin</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Despre &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Informaţii despre Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Setări...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>Criptează portofelul electronic...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Backup portofelul electronic...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>&amp;Schimbă parola...</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation>Importare blocks de pe disk...</translation> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a stripecoin address</source> <translation>&amp;Trimiteţi stripecoin către o anumită adresă</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for stripecoin</source> <translation>Modifică setările pentru stripecoin</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>Creaza copie de rezerva a portofelului intr-o locatie diferita</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>&amp;Schimbă parola folosită pentru criptarea portofelului electronic</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>&amp; Fereastra debug</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Deschide consola de debug si diagnosticare</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>Verifica mesajul</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>stripecoin</source> <translation>stripecoin</translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>Portofelul</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About stripecoin</source> <translation>&amp;Despre stripecoin</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>Arata/Ascunde</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your stripecoin addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified stripecoin addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>&amp;Fişier</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>&amp;Setări</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>&amp;Ajutor</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>Bara de ferestre de lucru</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> <message> <location line="+47"/> <source>stripecoin client</source> <translation>Client stripecoin</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to stripecoin network</source> <translation><numerusform>%n active connections to stripecoin network</numerusform><numerusform>%n active connections to stripecoin network</numerusform><numerusform>%n active connections to stripecoin network</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>Actualizat</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>Se actualizează...</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>Confirma taxa tranzactiei</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>Tranzacţie expediată</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>Tranzacţie recepţionată</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Data: %1⏎ Suma: %2⏎ Tipul: %3⏎ Addresa: %4⏎</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid stripecoin address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Portofelul electronic este &lt;b&gt;criptat&lt;/b&gt; iar in momentul de faţă este &lt;b&gt;deblocat&lt;/b&gt;</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Portofelul electronic este &lt;b&gt;criptat&lt;/b&gt; iar in momentul de faţă este &lt;b&gt;blocat&lt;/b&gt;</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. stripecoin can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>Alerta retea</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Editează adresa</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Eticheta</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Eticheta asociată cu această înregistrare în Lista de adrese</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adresă</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>Adresa asociată cu această înregistrare în Lista de adrese. Aceasta poate fi modificată doar pentru expediere.</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>Noua adresă de primire</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Noua adresă de trimitere</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Editează adresa de primire</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Editează adresa de trimitere</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Adresa introdusă &quot;%1&quot; se află deja în Lista de adrese.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid stripecoin address.</source> <translation>Adresa introdusă &quot;%1&quot; nu este o adresă stripecoin valabilă.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Portofelul electronic nu a putut fi deblocat .</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>New key generation failed.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>stripecoin-Qt</source> <translation>stripecoin-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>versiunea</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>Uz:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>command-line setări</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>UI setări</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Seteaza limba, de exemplu: &quot;de_DE&quot; (initialt: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Incepe miniaturizare</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Afișează pe ecran splash la pornire (implicit: 1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Setări</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Principal</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Plăteşte comision pentru tranzacţie &amp;f</translation> </message> <message> <location line="+31"/> <source>Automatically start stripecoin after logging in to the system.</source> <translation>Porneşte automat programul stripecoin la pornirea computerului.</translation> </message> <message> <location line="+3"/> <source>&amp;Start stripecoin on system login</source> <translation>&amp;S Porneşte stripecoin la pornirea sistemului</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>&amp;Retea</translation> </message> <message> <location line="+6"/> <source>Automatically open the stripecoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Deschide automat în router portul aferent clientului stripecoin. Funcţionează doar în cazul în care routerul e compatibil UPnP şi opţiunea e activată.</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>Mapeaza portul folosind &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the stripecoin network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>Conectare la reţeaua stripecoin folosind un proxy SOCKS (de exemplu, când conexiunea se stabileşte prin reţeaua Tor)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>&amp;Conectează prin proxy SOCKS:</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>Proxy &amp;IP:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>Adresa de IP a proxy serverului (de exemplu: 127.0.0.1)</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Port:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Portul pe care se concetează proxy serverul (de exemplu: 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS &amp;Versiune:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>Versiunea SOCKS a proxiului (ex. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Fereastra</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Afişează doar un icon in tray la ascunderea ferestrei</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;M Ascunde în tray în loc de taskbar</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>Ascunde fereastra în locul părăsirii programului în momentul închiderii ferestrei. Când acestă opţiune e activă, aplicaţia se va opri doar în momentul selectării comenzii Quit din menu.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>&amp;i Ascunde fereastra în locul închiderii programului</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>&amp;Afişare</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>Interfata &amp; limba userului</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting stripecoin.</source> <translation>Limba interfeței utilizatorului poate fi setat aici. Această setare va avea efect după repornirea stripecoin.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Unitatea de măsură pentru afişarea sumelor:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Alege subdiviziunea folosită la afişarea interfeţei şi la trimiterea de stripecoin.</translation> </message> <message> <location line="+9"/> <source>Whether to show stripecoin addresses in the transaction list or not.</source> <translation>Vezi dacă adresele stripecoin sunt în lista de tranzacție sau nu</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>&amp;Afişează adresele în lista de tranzacţii</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>&amp; OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp; Renunta</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>Aplica</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>Initial</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>Atentie!</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting stripecoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>Adresa stripecoin pe care a-ti specificat-o este invalida</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the stripecoin network after a connection is established, but this process has not completed yet.</source> <translation>Informațiile afișate pot fi expirate. Portofelul tău se sincronizează automat cu rețeaua stripecoin după ce o conexiune este stabilita, dar acest proces nu a fost finalizat încă.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>Balanţă:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>Neconfirmat:</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>Portofelul</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>Nematurizat:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>Balanta minata care nu s-a maturizat inca</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Ultimele tranzacţii&lt;/b&gt;</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>Soldul contul</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>Totalul tranzacţiilor care aşteaptă să fie confirmate şi care nu sunt încă luate în calcul la afişarea soldului contului.</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>Nu este sincronizat</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start stripecoin: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>Dialogul codului QR</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>Cerere de plata</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>Sumă:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>Etichetă:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>Mesaj:</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>Salvare ca...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>Eroare la incercarea codarii URl-ului in cod QR</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>Suma introdusa nu este valida, verifica suma.</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>Salveaza codul QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>Imagini de tip PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Numaele clientului</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>N/A</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Versiunea clientului</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp; Informatie</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Foloseste versiunea OpenSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Data pornirii</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Retea</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Numarul de conexiuni</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>Pe testnet</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Lant bloc</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Numarul curent de blockuri</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Estimarea totala a blocks</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Ultimul block a fost gasit la:</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Deschide</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Command-line setări</translation> </message> <message> <location line="+7"/> <source>Show the stripecoin-Qt help message to get a list with possible stripecoin command-line options.</source> <translation>Arata mesajul de ajutor stripecoin-QT pentru a obtine o lista cu posibilele optiuni ale comenzilor stripecoin</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>&amp; Arata</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Consola</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Construit la data:</translation> </message> <message> <location line="-104"/> <source>stripecoin - Debug window</source> <translation>stripecoin-Fereastra pentru debug</translation> </message> <message> <location line="+25"/> <source>stripecoin Core</source> <translation>stripecoin Core</translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Loguri debug</translation> </message> <message> <location line="+7"/> <source>Open the stripecoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Deschide logurile debug din directorul curent. Aceasta poate dura cateva secunde pentru fisierele mai mari</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>Curata consola</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the stripecoin RPC console.</source> <translation>Bun venit la consola stripecoin RPC</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Foloseste sagetile sus si jos pentru a naviga in istoric si &lt;b&gt;Ctrl-L&lt;/b&gt; pentru a curata.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Scrie &lt;b&gt;help&lt;/b&gt; pentru a vedea comenzile disponibile</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Trimite stripecoin</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>Trimite simultan către mai mulţi destinatari</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>&amp;Adaugă destinatar</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>Sterge toate spatiile de tranzactie</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>Şterge &amp;tot</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>Balanţă:</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 BTC</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Confirmă operaţiunea de trimitere</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;S Trimite</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>&lt;b&gt;%1&lt;/b&gt; la %2 (%3)</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>Confirmaţi trimiterea de stripecoin</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation>Sunteţi sigur că doriţi să trimiteţi %1?</translation> </message> <message> <location line="+0"/> <source> and </source> <translation> şi </translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>Adresa destinatarului nu este validă, vă rugăm să o verificaţi.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Suma de plată trebuie să fie mai mare decât 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>Suma depăşeşte soldul contului.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Total depăşeşte soldul contului in cazul plăţii comisionului de %1.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>S-a descoperit o adresă care figurează de două ori. Expedierea se poate realiza către fiecare adresă doar o singură dată pe operaţiune.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>Eroare: Tranyacţia a fost respinsă. Acesta poate fi rezultatul cheltuirii prealabile a unei sume de stripecoin din portofelul electronic, ca în cazul folosirii unei copii a fisierului wallet.dat, în care s-au efectuat tranzacţii neînregistrate în fisierul curent.</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Su&amp;mă :</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Plăteşte Că&amp;tre:</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>Adaugă o etichetă acestei adrese pentru a o trece în Lista de adrese</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;L Etichetă:</translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>Alegeţi adresa din Listă</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Lipiţi adresa copiată in clipboard.</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>Şterge destinatarul</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a stripecoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă stripecoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>Semnatura- Semneaza/verifica un mesaj</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>Semneaza Mesajul</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă stripecoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>Alegeţi adresa din Listă</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>Lipiţi adresa copiată in clipboard.</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>Introduce mesajul pe care vrei sa il semnezi, aici.</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>Copiaza semnatura curenta in clipboard-ul sistemului</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this stripecoin address</source> <translation>Semneaza mesajul pentru a dovedi ca detii acesta adresa stripecoin</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>Reseteaza toate spatiile mesajelor semnate.</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Şterge &amp;tot</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>Verifica mesajul</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă stripecoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified stripecoin address</source> <translation>Verifica mesajul pentru a fi sigur ca a fost semnat cu adresa stripecoin specifica</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>Reseteaza toate spatiile mesajelor semnate.</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a stripecoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>Introduceţi o adresă stripecoin (de exemplu: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Click &quot;Semneaza msajul&quot; pentru a genera semnatura</translation> </message> <message> <location line="+3"/> <source>Enter stripecoin signature</source> <translation>Introduce semnatura bitocin</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>Adresa introdusa nu este valida</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>Te rugam verifica adresa si introduce-o din nou</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>Adresa introdusa nu se refera la o cheie.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>Blocarea portofelului a fost intrerupta</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>Cheia privata pentru adresa introdusa nu este valida.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Semnarea mesajului a esuat</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Mesaj Semnat!</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>Aceasta semnatura nu a putut fi decodata</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Verifica semnatura si incearca din nou</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>Semnatura nu seamana!</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Verificarea mesajului a esuat</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Mesaj verificat</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The stripecoin developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>[testnet]</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Deschis până la %1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/neconfirmat</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 confirmări</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Stare</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Sursa</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generat</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>De la</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Către</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>Adresa posedata</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>etichetă</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Credit</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>nu este acceptat</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Debit</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Comisionul tranzacţiei</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Suma netă</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Mesaj</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Comentarii</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>ID-ul tranzactiei</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>Monedele stripecoin generate se pot cheltui dupa parcurgerea a 120 de blocuri. După ce a fost generat, s-a propagat în reţea, urmând să fie adăugat lanţului de blocuri. Dacă nu poate fi inclus in lanţ, starea sa va deveni &quot;neacceptat&quot; si nu va putea fi folosit la tranzacţii. Acest fenomen se întâmplă atunci cand un alt nod a generat un bloc la o diferenţa de câteva secunde.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Informatii pentru debug</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Tranzacţie</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>Intrari</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Sumă</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>Adevarat!</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>Fals!</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>, nu s-a propagat încă</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>necunoscut</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Detaliile tranzacţiei</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Afişează detalii despre tranzacţie</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Tipul</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresa</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Cantitate</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>Deschis până la %1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>Neconectat (%1 confirmări)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>Neconfirmat (%1 din %2 confirmări)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>Confirmat (%1 confirmări)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Blocul nu a fost recepţionat de niciun alt nod şi e probabil că nu va fi acceptat.</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generat, dar neacceptat</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>Recepţionat cu</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Primit de la:</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Trimis către</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Plată către un cont propriu</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Produs</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(n/a)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Starea tranzacţiei. Treceţi cu mouse-ul peste acest câmp pentru afişarea numărului de confirmări.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Data şi ora la care a fost recepţionată tranzacţia.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Tipul tranzacţiei.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Adresa de destinaţie a tranzacţiei.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Suma extrasă sau adăugată la sold.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>Toate</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Astăzi</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Săptămâna aceasta</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Luna aceasta</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Luna trecută</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Anul acesta</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Între...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Recepţionat cu...</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Trimis către</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Către propriul cont</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Produs</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Altele</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Introduceţi adresa sau eticheta pentru căutare</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Cantitatea produsă</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Copiază adresa</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copiază eticheta</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copiază sumă</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Editează eticheta</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Arata detaliile tranzactiei</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>Exportă tranzacţiile</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Fişier text cu valori separate prin virgulă (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Confirmat</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Tipul</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Etichetă</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adresă</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Sumă</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>Eroare în timpul exportului</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>Fisierul %1 nu a putut fi accesat pentru scriere.</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Interval:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>către</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>Trimite stripecoin</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation>Date portofel (*.dat)</translation> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation>Copia de rezerva a esuat</translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation>A apărut o eroare la încercarea de a salva datele din portofel intr-o noua locație.</translation> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>stripecoin version</source> <translation>versiunea stripecoin</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>Uz:</translation> </message> <message> <location line="-29"/> <source>Send command to -server or stripecoind</source> <translation>Trimite comanda la -server sau stripecoind</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>Listă de comenzi</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>Ajutor pentru o comandă</translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>Setări:</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: stripecoin.conf)</source> <translation>Specifica-ți configurația fisierului (in mod normal: stripecoin.conf)</translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: stripecoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Specifica datele directorului</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Seteaza marimea cache a bazei de date in MB (initial: 25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 33615 or testnet: 19333)</source> <translation>Lista a conectiunile in &lt;port&gt; (initial: 33615 sau testnet: 19333)</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Se menține la cele mai multe conexiuni &lt;n&gt; cu colegii (implicit: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Conecteaza-te la nod pentru a optine adresa peer, si deconecteaza-te</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>Specifica adresa ta publica</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Prag pentru deconectarea colegii funcționează corect (implicit: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Numărul de secunde pentru a păstra colegii funcționează corect la reconectare (implicit: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 33616 or testnet: 19332)</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>Se accepta command line si comenzi JSON-RPC</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>Ruleaza în background ca un demon și accepta comenzi.</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>Utilizeaza test de retea</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Accepta conexiuni de la straini (initial: 1 if no -proxy or -connect) </translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=litecoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;stripecoin Alert&quot; [email protected] </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. stripecoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Seteaza marimea maxima a tranzactie mare/mica in bytes (initial:27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong stripecoin will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>Optiuni creare block</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>Conecteaza-te doar la nod(urile) specifice</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Descopera propria ta adresa IP (intial: 1)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>Copie de ieșire de depanare cu timestamp</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the stripecoin Wiki for SSL setup instructions)</source> <translation>Optiuni SSl (vezi stripecoin wiki pentru intructiunile de instalare)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>Selecteaza versiunea socks-ului pe care vrei sa il folosesti (4-5, initial: 5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Trimite urmări / debug info la consola loc de debug.log fișier</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Trimite urmări / debug info la depanatorul</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Foloseste UPnP pentru a vedea porturile (initial: 0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Foloseste UPnP pentru a vedea porturile (initial: 1 cand listezi)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>Username pentru conectiunile JSON-RPC</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>Parola pentru conectiunile JSON-RPC</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Permiteti conectiunile JSON-RPC de la o adresa IP specifica.</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Trimite comenzi la nod, ruland pe ip-ul (initial: 127.0.0.1)</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Executa comanda cand cel mai bun block se schimba (%s in cmd se inlocuieste cu block hash)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>Actualizeaza portofelul la ultimul format</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Setarea marimii cheii bezinului la &lt;n&gt;(initial 100)</translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Rescanare lanțul de bloc pentru tranzacțiile portofel lipsă</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Foloseste Open SSL(https) pentru coneciunile JSON-RPC</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation>Certificatul serverulu (initial: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Cheia privata a serverului ( initial: server.pem)</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Accepta cifruri (initial: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>Acest mesaj de ajutor.</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Nu se poate lega %s cu acest calculator (retunare eroare legatura %d, %s) </translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>Conectează prin proxy SOCKS</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Permite DNS-ului sa se uite dupa -addnode, -seednode si -connect</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>Încarc adrese...</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Eroare incarcand wallet.dat: Portofel corupt</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of stripecoin</source> <translation>Eroare incarcare wallet.dat: Portofelul are nevoie de o versiune stripecoin mai noua</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart stripecoin to complete</source> <translation>Portofelul trebuie rescris: restarteaza aplicatia stripecoin pentru a face asta.</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>Eroare incarcand wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Adresa proxy invalida: &apos;%s&apos;</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Retea specificata necunoscuta -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Necunoscut -socks proxy version requested: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Nu se poate rezolca -bind address: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Nu se poate rezolva -externalip address: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Suma invalida pentru -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>Suma invalida</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>Fonduri insuficiente</translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>Încarc indice bloc...</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Add a node to connect to and attempt to keep the connection open details suggestions history </translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. stripecoin is probably already running.</source> <translation>Imposibilitatea de a lega la% s pe acest computer. stripecoin este, probabil, deja în execuție.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>Taxa pe kb pentru a adauga tranzactii trimise</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>Încarc portofel...</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>Nu se poate face downgrade la portofel</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>Nu se poate scrie adresa initiala</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>Rescanez...</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>Încărcare terminată</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>Pentru a folosii optiunea %s</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>Eroare</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
mit
TwilioDevEd/api-snippets
notifications/rest/users/add-user-to-segment/add-user-to-segment.7.x.py
601
#!/usr/bin/env python # Install the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client # To set up environmental variables, see http://twil.io/secure ACCOUNT_SID = os.environ['TWILIO_ACCOUNT_SID'] AUTH_TOKEN = os.environ['TWILIO_AUTH_TOKEN'] client = Client(ACCOUNT_SID, AUTH_TOKEN) segment_membership = client.notify \ .services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \ .users('User0001') \ .segment_memberships.create(segment='premium') print(segment_membership.url)
mit
cdetrio/remix
src/solidity/types/Address.js
407
'use strict' var util = require('./util') var ValueType = require('./ValueType') class Address extends ValueType { constructor () { super(1, 20, 'address') } decodeValue (value) { if (!value) { return '0x0000000000000000000000000000000000000000' } else { return '0x' + util.extractHexByteSlice(value, this.storageBytes, 0).toUpperCase() } } } module.exports = Address
mit
kasperlewau/casketUI
BasicBuffs/BasicBuffs.lua
2554
local f = CreateFrame("Frame", "BasicBuffsFrame", UIParent) f:RegisterEvent("PLAYER_LOGIN") f:SetScript("OnEvent", function(display) if not BasicBuffsStorage then BasicBuffsStorage = {} end display:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"}) display:SetFrameStrata("BACKGROUND") display:SetPoint("CENTER", UIParent, "CENTER", 0, 0) display:SetBackdropColor(0,1,0) display:SetWidth(280) display:SetHeight(225) display:Show() display:EnableMouse(true) display:RegisterForDrag("LeftButton") display:SetMovable(true) display:SetScript("OnDragStart", function(frame) frame:StartMoving() end) display:SetScript("OnDragStop", function(frame) frame:StopMovingOrSizing() local s = frame:GetEffectiveScale() BasicBuffsStorage.x = frame:GetLeft() * s BasicBuffsStorage.y = frame:GetTop() * s end) if BasicBuffsStorage.x and BasicBuffsStorage.y then local s = display:GetEffectiveScale() display:ClearAllPoints() display:SetPoint("TOPLEFT", "UIParent", "BOTTOMLEFT", BasicBuffsStorage.x / s, BasicBuffsStorage.y / s) end if BasicBuffsStorage.lock then display:SetBackdropColor(0,1,0,0) display:EnableMouse(false) display:SetMovable(false) end local setCons = ConsolidatedBuffs.SetPoint ConsolidatedBuffs:ClearAllPoints() setCons(ConsolidatedBuffs, "TOPRIGHT", display, "TOPRIGHT") hooksecurefunc(ConsolidatedBuffs, "SetPoint", function(frame) frame:ClearAllPoints() setCons(frame, "TOPRIGHT", display, "TOPRIGHT") end) local setBuff = BuffFrame.SetPoint BuffFrame:ClearAllPoints() setBuff(BuffFrame, "TOPRIGHT", display, "TOPRIGHT") hooksecurefunc(BuffFrame, "SetPoint", function(frame) frame:ClearAllPoints() setBuff(frame, "TOPRIGHT", display, "TOPRIGHT") end) SlashCmdList.BASICBUFFS = function(msg) if msg:lower() == "lock" then if not BasicBuffsStorage.lock then display:SetBackdropColor(0,1,0,0) display:EnableMouse(false) display:SetMovable(false) BasicBuffsStorage.lock = true print("|cFF33FF99BasicBuffs|r: Locked") else display:SetBackdropColor(0,1,0,1) display:EnableMouse(true) display:SetMovable(true) BasicBuffsStorage.lock = nil print("|cFF33FF99BasicBuffs|r: Unlocked") end else print("|cFF33FF99BasicBuffs|r: Commands:") print("|cFF33FF99BasicBuffs|r: /bb lock") end end SLASH_BASICBUFFS1 = "/bb" SLASH_BASICBUFFS2 = "/basicbuffs" display:UnregisterEvent("PLAYER_LOGIN") display:SetScript("OnEvent", nil) end)
mit
stivalet/PHP-Vulnerability-test-suite
Injection/CWE_95/safe/CWE_95__GET__CAST-cast_float_sort_of__variable-concatenation_simple_quote.php
1182
<?php /* Safe sample input : reads the field UserData from the variable $_GET sanitize : cast via + = 0.0 construction : concatenation with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.*/ $tainted = $_GET['UserData']; $tainted += 0.0 ; $query = "$temp = '". $tainted . "';"; $res = eval($query); ?>
mit
bhaptics/tactosy-unity
samples/csharp/src/Bhaptics.Tact/CustomWebSocketSharp/WebSocketState.cs
2312
#region License /* * WebSocketState.cs * * The MIT License * * Copyright (c) 2010-2016 sta.blockhead * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #endregion using System; namespace CustomWebSocketSharp { /// <summary> /// Indicates the state of a WebSocket connection. /// </summary> /// <remarks> /// The values of this enumeration are defined in /// <see href="http://www.w3.org/TR/websockets/#dom-websocket-readystate"> /// The WebSocket API</see>. /// </remarks> public enum WebSocketState : ushort { /// <summary> /// Equivalent to numeric value 0. Indicates that the connection has not /// yet been established. /// </summary> Connecting = 0, /// <summary> /// Equivalent to numeric value 1. Indicates that the connection has /// been established, and the communication is possible. /// </summary> Open = 1, /// <summary> /// Equivalent to numeric value 2. Indicates that the connection is /// going through the closing handshake, or the close method has /// been invoked. /// </summary> Closing = 2, /// <summary> /// Equivalent to numeric value 3. Indicates that the connection has /// been closed or could not be established. /// </summary> Closed = 3 } }
mit
sahandy/lepp2
src/lepp2/visualization/StairVisualizer.hpp
3307
#ifndef LEPP2_VISUALIZATION_STAIR_VISUALIZER_H__ #define LEPP2_VISUALIZATION_STAIR_VISUALIZER_H__ #include <vector> #include <pcl/visualization/cloud_viewer.h> #include <pcl/visualization/pcl_visualizer.h> #include "lepp2/VideoObserver.hpp" #include "lepp2/StairAggregator.hpp" namespace lepp{ template<class PointT> class StairVisualizer : public VideoObserver<PointT>, public StairAggregator<PointT> { public: StairVisualizer() : viewer_("StairVisualizer") {} /** * VideoObserver interface implementation: show the current point cloud. */ virtual void notifyNewFrame( int idx, const typename pcl::PointCloud<PointT>::ConstPtr& pointCloud) { viewer_.showCloud(pointCloud); } /** * StairAggregator interface implementation: processes detected obstacles. */ virtual void updateStairs(std::vector<typename pcl::PointCloud<PointT>::ConstPtr> cloud_stairs); void drawStairs(std::vector<typename pcl::PointCloud<PointT>::ConstPtr> stairs, pcl::visualization::PCLVisualizer& viewer); private: /** * Used for the visualization of the scene. */ pcl::visualization::CloudViewer viewer_; }; template<class PointT> void StairVisualizer<PointT>::drawStairs( std::vector<typename pcl::PointCloud<PointT>::ConstPtr> stairs, pcl::visualization::PCLVisualizer& pclViz) { size_t const sz = stairs.size(); for (size_t i = 0; i < sz; ++i) { // drawer.drawStair(stairs[i]); //single_cloud->clear (); // *single_cloud = *stairs[i]; if (i == 0) { // pcl::visualization::PointCloudColorHandlerCustom<PointT> red (stairs[i], 255, 0, 0); if(!pclViz.updatePointCloud(stairs[i], "STAIRS1")) pclViz.addPointCloud (stairs[i], "STAIRS1"); pclViz.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR, 1.0,0,0, "STAIRS1"); } if (i == 1) { // pcl::visualization::PointCloudColorHandlerCustom<PointT> green (stairs[i], 0, 255, 0); if(!pclViz.updatePointCloud(stairs[i], "STAIRS2")) pclViz.addPointCloud (stairs[i], "STAIRS2"); pclViz.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR, 0,1.0,0, "STAIRS2"); } if (i == 2) { // pcl::visualization::PointCloudColorHandlerCustom<PointT> blue (stairs[i], 0, 0, 255); if(!pclViz.updatePointCloud(stairs[i], "STAIRS3")) pclViz.addPointCloud (stairs[i], "STAIRS3"); pclViz.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR, 0,0,1.0, "STAIRS3"); } if (i == 3) { // pcl::visualization::PointCloudColorHandlerCustom<PointT> pink (stairs[i], 200, 18, 170); if(!pclViz.updatePointCloud(stairs[i], "STAIRS4")) pclViz.addPointCloud (stairs[i], "STAIRS4"); pclViz.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR, 0.4,0.5,0.3, "STAIRS4"); } } } template<class PointT> void StairVisualizer<PointT>::updateStairs( std::vector<typename pcl::PointCloud<PointT>::ConstPtr> stairs) { pcl::visualization::CloudViewer::VizCallable stair_visualization = boost::bind(&StairVisualizer::drawStairs, this, stairs, _1); viewer_.runOnVisualizationThread(stair_visualization); } } // namespace lepp #endif
mit
ejl888/spring-hateoas-extended
src/main/java/nl/my888/springframework/hateoas/resource/TypedEmbeddedResourceSupport.java
1101
package nl.my888.springframework.hateoas.resource; import java.util.LinkedList; import java.util.List; import javax.xml.bind.annotation.XmlElement; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import nl.my888.springframework.hateoas.configuration.StrictHalResourcesSerializer; import org.springframework.hateoas.ResourceSupport; /** * Resource supporting _embedded entries. * @author ejl * @param <T> type embedded object. */ public class TypedEmbeddedResourceSupport<T> extends ResourceSupport { @XmlElement(name = "embedded") @JsonProperty("_embedded") @JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY, using = StrictHalResourcesSerializer.class) private final List<T> embedded = new LinkedList<>(); public List<T> getEmbedded() { return embedded; } /** * Embed the object. * @param toEmbed object to embed. * @return this. */ public TypedEmbeddedResourceSupport<T> embed(T toEmbed) { embedded.add(toEmbed); return this; } }
mit
NickLargen/Junctionizer
Utilities/Comparers/StringOrIntegerComparer.cs
1073
using System; using System.Collections.Generic; using JetBrains.Annotations; namespace Utilities.Comparers { /// <summary>If both strings represent integers (as determined by int.TryParse) then their integer values are compared. Otherwise normal string comparison is used.</summary> public class StringOrIntegerComparer : IComparer<string> { public StringOrIntegerComparer(StringComparison comparisonType) { ComparisonType = comparisonType; } private StringComparison ComparisonType { get; } /// <inheritdoc/> public int Compare(string x, string y) => Compare(x, y, ComparisonType); public static int Compare([CanBeNull] string first, [CanBeNull] string second, StringComparison comparisonType) { if (int.TryParse(first, out var numericalFirst) && int.TryParse(second, out var numericalSecond)) { return numericalFirst - numericalSecond; } return string.Compare(first, second, comparisonType); } } }
mit
yeleman/ramed-desktop
ramed/tools/ramed_form_pdf_export.py
16484
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu import os import datetime from path import Path from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.pagesizes import A4 from reportlab.platypus import (Paragraph, Table, TableStyle, Image, SimpleDocTemplate) from ramed.app_logging import logger from ramed.tools.ramed_instance import RamedInstance from ramed.tools import create_shortcut BLANK = "néant" def gen_pdf_export(export_folder, instance): story = [] styles = getSampleStyleSheet() b_style = styles["BodyText"] h3 = styles["Heading3"] h4 = styles["Heading4"] output_folder = os.path.join(export_folder, instance.folder_name) Path(output_folder).makedirs_p() fname = "{name}.pdf".format(name=instance.name) fpath = os.path.join(output_folder, fname) # writting data def format_location(parts): return " / ".join([part for part in parts if part]) def concat(parts, sep=" / "): return sep.join([part for part in parts if part]) def get_lieu_naissance(data, key, village=False): region = data.get('{}region'.format(key)) cercle = data.get('{}cercle'.format(key)) commune = data.get('{}commune'.format(key)) lieu_naissance = format_location([commune, cercle, region]) return region, cercle, commune, lieu_naissance def get_lieu(data, key): region, cercle, commune, _ = get_lieu_naissance(data, key) village = data.get('{}village'.format(key)) lieu = format_location([village, commune, cercle, region]) return region, cercle, commune, village, lieu def get_other(data, key): profession = data.get(key) profession_other = data.get('{}_other'.format(key)) return profession_other if profession == 'other' else profession def get_int(data, key, default=0): try: return int(data.get(key, default)) except: return default def get_date(data, key): try: return datetime.date(*[int(x) for x in data.get(key).split('-')]) except: return None def get_dob(data, key, female=False): type_naissance = data.get('{}type-naissance'.format(key), 'ne-vers') annee_naissance = get_int(data, '{}annee-naissance'.format(key), None) ddn = get_date(data, '{}ddn'.format(key)) human = "Né{f} ".format(f="e" if female else "") if type_naissance == 'ddn': human += "le {}".format(ddn.strftime("%d-%m-%Y")) else: human += "vers {}".format(annee_naissance) return type_naissance, annee_naissance, ddn, human def get_bool(data, key, default='non'): text = data.get(key, default) return text == 'oui', text def get_nom(data, p='', s=''): nom = RamedInstance.clean_lastname( data.get('{p}nom{s}'.format(p=p, s=s))) prenoms = RamedInstance.clean_firstnames(data.get('{p}prenoms{s}' .format(p=p, s=s))) name = RamedInstance.clean_name(nom, prenoms) return nom, prenoms, name def draw_String_title(text): return """<para align=center spaceb=5><b><font size=11>{}</font> </b></para>""".format(text) def draw_String(label, text): # if len(text) == 0: # text = BLANK return """<para align=left spaceb=5><font size=9><u>{label}</u></font> : {text}</para>""".format(label=label, text=text) # lieu (pas sur papier) lieu_region, lieu_cercle, lieu_commune, lieu_village, lieu = get_lieu( instance, 'lieu_') numero_enquete = instance.get('numero') or "" objet_enquete = instance.get('objet') or instance.get('objet_other') identifiant_enqueteur = instance.get('enqueteur') or BLANK demandeur = instance.get('demandeur') or BLANK # enquêté nom, prenoms, name = get_nom(instance) sexe = instance.get('sexe') or 'masculin' is_female = sexe == 'feminin' type_naissance, annee_naissance, ddn, naissance = get_dob( instance, '', is_female) region_naissance, cercle_naissance, commune_naissance, lieu_naissance = get_lieu_naissance( instance, '') # enquêté / instance nom_pere, prenoms_pere, name_pere = get_nom(instance, s='-pere') nom_mere, prenoms_mere, name_mere = get_nom(instance, s='-mere') situation_matrioniale = instance.get('situation-matrimoniale', BLANK) profession = get_other(instance, 'profession') adresse = instance.get('adresse') or "" nina_text = instance.get('nina_text') or "" telephones = [str(tel.get('numero')) for tel in instance.get('telephones', [])] nb_epouses = get_int(instance, 'nb_epouses', 0) # enfants logger.info("enfants") nb_enfants = get_int(instance, 'nb_enfants') nb_enfants_handicapes = get_int(instance, 'nb_enfants_handicapes') nb_enfants_acharge = get_int(instance, 'nb_enfants_acharge') # ressources salaire = get_int(instance, 'salaire') pension = get_int(instance, 'pension') allocations = get_int(instance, 'allocations') has_autres_revenus = get_bool(instance, 'autres-sources-revenu') autres_revenus = [ (revenu.get('source-revenu'), get_int(revenu, 'montant-revenu')) for revenu in instance.get('autres_revenus', [])] total_autres_revenus = get_int(instance, 'total_autres_revenus') # charges loyer = get_int(instance, 'loyer') impot = get_int(instance, 'impot') dettes = get_int(instance, 'dettes') aliments = get_int(instance, 'aliments') sante = get_int(instance, 'sante') autres_charges = get_int(instance, 'autres_charges') # habitat type_habitat = get_other(instance, 'type') materiau_habitat = get_other(instance, 'materiau') # antecedents antecedents_personnels = instance.get('personnels') antecedents_personnels_details = instance.get( 'personnels-details') or BLANK antecedents_familiaux = instance.get('familiaux') antecedents_familiaux_details = instance.get('familiaux-details') or BLANK antecedents_sociaux = instance.get('sociaux') antecedents_sociaux_details = instance.get('sociaux-details') or BLANK situation_actuelle = instance.get('situation-actuelle') or BLANK diagnostic = instance.get('diagnostic') or BLANK diagnostic_details = instance.get('diagnostic-details') or BLANK recommande_assistance = get_bool(instance, 'observation') or BLANK doc = SimpleDocTemplate(fpath, pagesize=A4, fontsize=3) logger.info("Headers") headers = [["MINISTÈRE DE LA SOLIDARITÉ", "", " REPUBLIQUE DU MALI"], ["DE L’ACTION HUMANITAIRE", "", "UN PEUPLE UN BUT UNE FOI"], ["ET DE LA RECONSTRUCTION DU NORD", "", ""], ["AGENCE NATIONALE D’ASSISTANCE MEDICALE (ANAM)", "", ""]] # headers_t = Table(headers, colWidths=(160)) headers_t = Table(headers, colWidths=150, rowHeights=11) story.append(headers_t) headers_t.setStyle(TableStyle([('SPAN', (1, 30), (1, 13)), ('ALIGN', (0, 0), (-1, -1), 'LEFT'), ])) story.append(Paragraph(draw_String_title("CONFIDENTIEL"), styles["Title"])) numero_enquete_t = Table([["FICHE D’ENQUETE SOCIALE N°.............../{year}" .format(year=datetime.datetime.now().year), ]],) numero_enquete_t.setStyle(TableStyle( [('BOX', (0, 0), (-1, -1), 0.25, colors.black), ])) story.append(numero_enquete_t) story.append(Paragraph(draw_String("Identifiant enquêteur", numero_enquete), b_style)) story.append(Paragraph(draw_String("Objet de l’enquête", objet_enquete), b_style)) story.append(Paragraph(draw_String("Enquête demandée par", demandeur), b_style)) story.append(Paragraph("Enquêté", h3)) logger.info("Enquêté") story.append(Paragraph(draw_String("Concernant", concat( [name, sexe, situation_matrioniale])), b_style)) story.append(Paragraph(draw_String( naissance, "à {}".format(lieu_naissance)), b_style)) logger.info("Parent") story.append(Paragraph(draw_String("Père", name_pere), b_style)) story.append(Paragraph(draw_String("Mère", name_mere), b_style)) story.append(Paragraph(draw_String("Profession", profession), b_style)) story.append(Paragraph(draw_String("Adresse", adresse), b_style)) logger.info("NINA CARD") story.append(Paragraph(draw_String("N° NINA", nina_text), b_style)) story.append(Paragraph(draw_String( "Téléphones", concat(telephones)), b_style)) story.append(Paragraph("COMPOSITION DE LA FAMILLE", h3)) story.append(Paragraph("Situation des Epouses", h4)) epouses = instance.get('epouses', []) logger.info("Epouses") if epouses == []: story.append(Paragraph(BLANK, b_style)) for nb, epouse in enumerate(epouses): nom_epouse, prenoms_epouse, name_epouse = get_nom(epouse, p='e_') nom_pere_epouse, prenoms_pere_epouse, name_pere_epouse = get_nom( epouse, p='e_p_') nom_mere_epouse, prenoms_mere_epouse, name_mere_epouse = get_nom( epouse, p='e_m_') region_epouse, cercle_epouse, commune_epouse, lieu_naissance_epouse = get_lieu_naissance( epouse, 'e_') type_naissance_epouse, annee_naissance_epouse, \ ddn_epouse, naissance_epouse = get_dob(epouse, 'e_', True) profession_epouse = get_other(epouse, 'e_profession') nb_enfants_epouse = get_int(epouse, 'e_nb_enfants', 0) story.append(Paragraph(draw_String( "EPOUSE", "{}".format(nb + 1)), b_style)) epouses = concat([name_epouse, str(nb_enfants_epouse) + " enfant{p}".format(p="s" if nb_enfants_epouse > 1 else "")]) story.append(Paragraph(epouses, b_style)) dob = "{naissance} à {lieu_naissance}".format( naissance=naissance_epouse, lieu_naissance=lieu_naissance_epouse) story.append(Paragraph(dob, b_style)) story.append(Paragraph(draw_String("Père", name_pere_epouse), b_style)) story.append(Paragraph(draw_String("Mère", name_mere_epouse), b_style)) story.append(Paragraph(draw_String( "Profession", profession_epouse), b_style)) story.append(Paragraph("Situation des Enfants", h4)) # c.setFont('Courier', 10) # row -= interligne # enfants logger.debug("Child") enfants = instance.get('enfants', []) if enfants == []: story.append(Paragraph(BLANK, b_style)) for nb, enfant in enumerate(enfants): nom_enfant, prenoms_enfant, name_enfant = get_nom( enfant, p='enfant_') nom_autre_parent, prenoms_autre_parent, name_autre_parent = get_nom( instance, s='-autre-parent') region_enfant, cercle_enfant, commune_enfant, \ lieu_naissance_enfant = get_lieu_naissance(enfant, 'enfant_') type_naissance_enfant, annee_naissance_enfant, \ ddn_enfant, naissance_enfant = get_dob(enfant, 'enfant_') # situation scolarise, scolarise_text = get_bool(enfant, 'scolarise') handicape, handicape_text = get_bool(enfant, 'handicape') acharge, acharge_text = get_bool(enfant, 'acharge') nb_enfant_handicap = get_int(enfant, 'nb_enfant_handicap') nb_enfant_acharge = get_int(enfant, 'nb_enfant_acharge') story.append(Paragraph("{nb}. {enfant}".format( nb=nb + 1, enfant=concat([name_enfant or BLANK, naissance_enfant, "à {lieu}".format( lieu=lieu_naissance_enfant), scolarise_text, handicape_text, name_autre_parent])), b_style)) story.append(Paragraph("AUTRES PERSONNES à la charge de l’enquêté", h4)) # # autres autres = instance.get('autres', []) if autres == []: story.append(Paragraph(BLANK, b_style)) logger.debug("Other") for nb, autre in enumerate(autres): nom_autre, prenoms_autre, name_autre = get_nom(autre, p='autre_') region_autre, cercle_autre, commune_autre, \ lieu_naissance_autre = get_lieu_naissance(autre, 'autre_') type_naissance_autre, annee_naissance_autre, \ ddn_autre, naissance_autre = get_dob(autre, 'autre_') parente_autre = get_other(autre, 'autre_parente') profession_autre = get_other(autre, 'autre_profession') story.append(Paragraph("{nb}. {enfant}".format(nb=nb + 1, enfant=concat( [name_autre or BLANK, naissance_autre, "à {lieu}".format(lieu=lieu_naissance_autre), parente_autre, profession_autre])), b_style)) # ressources logger.debug("Ressources") story.append( Paragraph("RESSOURCES ET CONDITIONS DE VIE DE L’ENQUETE (E)", h4)) story.append(Paragraph( concat(["Salaire : {}/mois".format(salaire), "Pension : {}/mois".format(pension), "Allocations : {}/mois".format(allocations)], sep=". "), b_style)) autres_revenus_f = ["[{}/{}]".format(source_revenu, montant_revenu) for source_revenu, montant_revenu in autres_revenus] story.append(Paragraph(draw_String("Autre", concat( autres_revenus_f, sep=". ")), b_style)) story.append(Paragraph( "LES CHARGES DE L’ENQUETE (Préciser le montant et la période)", h4)) story.append(Paragraph(concat(["Loyer : {}".format(loyer), "Impot : {}".format(impot), "Dettes : {}".format(dettes), "Aliments : {}".format(aliments), "Santé : {}".format(sante), ], sep=". "), b_style)) story.append(Paragraph(draw_String( "Autres Charges", autres_charges), b_style)) story.append(Paragraph(draw_String("HABITAT", concat( [type_habitat, materiau_habitat])), b_style)) story.append(Paragraph("EXPOSER DETAILLE DES FAITS", h4)) # antecedents logger.debug("Antecedents") story.append(Paragraph(draw_String("Antécédents personnels", concat(antecedents_personnels)), b_style)) story.append(Paragraph(draw_String("Détails Antécédents personnels", antecedents_personnels_details), b_style)) story.append(Paragraph(draw_String("Antécédents familiaux", antecedents_familiaux), b_style)) story.append(Paragraph(draw_String("Détails Antécédents familiaux", antecedents_familiaux_details), b_style)) story.append(Paragraph(draw_String("Antécédents sociaux", antecedents_sociaux), b_style)) story.append(Paragraph(draw_String("Détails Antécédents sociaux", antecedents_sociaux_details), b_style)) story.append(Paragraph(draw_String("Situation actuelle", concat(situation_actuelle)), b_style)) story.append(Paragraph(draw_String("Diagnostic", diagnostic), b_style)) story.append(Paragraph(draw_String( "Diagnostic details", diagnostic_details), b_style)) signature_dict = instance.get("signature") img = "" if signature_dict: dir_media = os.path.join(output_folder, "signature_{}".format( signature_dict.get("filename"))) img = Image(dir_media, width=80, height=82) signature = [["SIGNATURE DE L’ENQUÊTEUR", "", "VISA DU CHEF DU SERVICE SOCIAL"], [img, ""]] signature_t = Table(signature, colWidths=150, rowHeights=90) signature_t.setStyle(TableStyle([('FONTSIZE', (0, 0), (-1, -1), 8), ])) story.append(signature_t) # Fait le 01-06-2016 à cercle-de-mopti # VISA DU CHEF DU SERVICE SOCIAL # SIGNATURE DE L’ENQUÊTEUR doc.build(story) logger.info("Save") # create shortcut shortcut_folder = os.path.join(export_folder, "PDF") Path(shortcut_folder).makedirs_p() shortcut_fname = "{}.lnk".format(instance.folder_name) create_shortcut(fpath, os.path.join(shortcut_folder, shortcut_fname)) return fname, fpath
mit
citruz/beacontools
examples/scanner_exposure_notification.py
380
import time from beacontools import BeaconScanner, ExposureNotificationFrame def callback(bt_addr, rssi, packet, additional_info): print("<%s, %d> %s %s" % (bt_addr, rssi, packet, additional_info)) # scan for all COVID-19 exposure notifications scanner = BeaconScanner(callback, packet_filter=[ExposureNotificationFrame] ) scanner.start() time.sleep(5) scanner.stop()
mit
kakashidinho/HQEngine
ThirdParty-mod/java2cpp/org/apache/http/impl/EnglishReasonPhraseCatalog.hpp
4226
/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://[email protected] class: org.apache.http.impl.EnglishReasonPhraseCatalog ================================================================================*/ #ifndef J2CPP_INCLUDE_IMPLEMENTATION #ifndef J2CPP_ORG_APACHE_HTTP_IMPL_ENGLISHREASONPHRASECATALOG_HPP_DECL #define J2CPP_ORG_APACHE_HTTP_IMPL_ENGLISHREASONPHRASECATALOG_HPP_DECL namespace j2cpp { namespace java { namespace lang { class Object; } } } namespace j2cpp { namespace java { namespace lang { class String; } } } namespace j2cpp { namespace java { namespace util { class Locale; } } } namespace j2cpp { namespace org { namespace apache { namespace http { class ReasonPhraseCatalog; } } } } #include <java/lang/Object.hpp> #include <java/lang/String.hpp> #include <java/util/Locale.hpp> #include <org/apache/http/ReasonPhraseCatalog.hpp> namespace j2cpp { namespace org { namespace apache { namespace http { namespace impl { class EnglishReasonPhraseCatalog; class EnglishReasonPhraseCatalog : public object<EnglishReasonPhraseCatalog> { public: J2CPP_DECLARE_CLASS J2CPP_DECLARE_METHOD(0) J2CPP_DECLARE_METHOD(1) J2CPP_DECLARE_METHOD(2) J2CPP_DECLARE_FIELD(0) explicit EnglishReasonPhraseCatalog(jobject jobj) : object<EnglishReasonPhraseCatalog>(jobj) { } operator local_ref<java::lang::Object>() const; operator local_ref<org::apache::http::ReasonPhraseCatalog>() const; local_ref< java::lang::String > getReason(jint, local_ref< java::util::Locale > const&); static static_field< J2CPP_CLASS_NAME, J2CPP_FIELD_NAME(0), J2CPP_FIELD_SIGNATURE(0), local_ref< org::apache::http::impl::EnglishReasonPhraseCatalog > > INSTANCE; }; //class EnglishReasonPhraseCatalog } //namespace impl } //namespace http } //namespace apache } //namespace org } //namespace j2cpp #endif //J2CPP_ORG_APACHE_HTTP_IMPL_ENGLISHREASONPHRASECATALOG_HPP_DECL #else //J2CPP_INCLUDE_IMPLEMENTATION #ifndef J2CPP_ORG_APACHE_HTTP_IMPL_ENGLISHREASONPHRASECATALOG_HPP_IMPL #define J2CPP_ORG_APACHE_HTTP_IMPL_ENGLISHREASONPHRASECATALOG_HPP_IMPL namespace j2cpp { org::apache::http::impl::EnglishReasonPhraseCatalog::operator local_ref<java::lang::Object>() const { return local_ref<java::lang::Object>(get_jobject()); } org::apache::http::impl::EnglishReasonPhraseCatalog::operator local_ref<org::apache::http::ReasonPhraseCatalog>() const { return local_ref<org::apache::http::ReasonPhraseCatalog>(get_jobject()); } local_ref< java::lang::String > org::apache::http::impl::EnglishReasonPhraseCatalog::getReason(jint a0, local_ref< java::util::Locale > const &a1) { return call_method< org::apache::http::impl::EnglishReasonPhraseCatalog::J2CPP_CLASS_NAME, org::apache::http::impl::EnglishReasonPhraseCatalog::J2CPP_METHOD_NAME(1), org::apache::http::impl::EnglishReasonPhraseCatalog::J2CPP_METHOD_SIGNATURE(1), local_ref< java::lang::String > >(get_jobject(), a0, a1); } static_field< org::apache::http::impl::EnglishReasonPhraseCatalog::J2CPP_CLASS_NAME, org::apache::http::impl::EnglishReasonPhraseCatalog::J2CPP_FIELD_NAME(0), org::apache::http::impl::EnglishReasonPhraseCatalog::J2CPP_FIELD_SIGNATURE(0), local_ref< org::apache::http::impl::EnglishReasonPhraseCatalog > > org::apache::http::impl::EnglishReasonPhraseCatalog::INSTANCE; J2CPP_DEFINE_CLASS(org::apache::http::impl::EnglishReasonPhraseCatalog,"org/apache/http/impl/EnglishReasonPhraseCatalog") J2CPP_DEFINE_METHOD(org::apache::http::impl::EnglishReasonPhraseCatalog,0,"<init>","()V") J2CPP_DEFINE_METHOD(org::apache::http::impl::EnglishReasonPhraseCatalog,1,"getReason","(ILjava/util/Locale;)Ljava/lang/String;") J2CPP_DEFINE_METHOD(org::apache::http::impl::EnglishReasonPhraseCatalog,2,"<clinit>","()V") J2CPP_DEFINE_FIELD(org::apache::http::impl::EnglishReasonPhraseCatalog,0,"INSTANCE","Lorg/apache/http/impl/EnglishReasonPhraseCatalog;") } //namespace j2cpp #endif //J2CPP_ORG_APACHE_HTTP_IMPL_ENGLISHREASONPHRASECATALOG_HPP_IMPL #endif //J2CPP_INCLUDE_IMPLEMENTATION
mit
walmartreact/babel-plugin-react-cssmoduleify
test/fixtures/compiled/logical-expression/actual.js
2391
"use strict"; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var _react = require("react"); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var _class = (function (_React$Component) { _inherits(_class, _React$Component); function _class() { _classCallCheck(this, _class); return _possibleConstructorReturn(this, Object.getPrototypeOf(_class).apply(this, arguments)); } _createClass(_class, [{ key: "render", value: function render() { var conservative = ["good", "luck"]; return _react2.default.createElement( "div", { className: "yup" || conservative.join(" ") }, "Base test.", conservative.map(function (c) { return c; }) ); } }]); return _class; })(_react2.default.Component); exports.default = _class; ;
mit
localheinz/opencfp
migrations/20181002234013_create_user_joind_in_username_column.php
2267
<?php declare(strict_types=1); /** * Copyright (c) 2013-2018 OpenCFP * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. * * @see https://github.com/opencfp/opencfp */ use Cartalyst\Sentinel\Users\EloquentUser; use Phinx\Migration\AbstractMigration; class CreateUserJoindInUsernameColumn extends AbstractMigration { /** @var Capsule $capsule */ public $capsule; public function bootEloquent(): void { $adapter = $this->getAdapter()->getAdapter(); $options = $adapter->getOptions(); $this->capsule = new Capsule(); $this->capsule->addConnection([ 'driver' => 'mysql', 'database' => $options['name'], ]); $this->capsule->getConnection()->setPdo($adapter->getConnection()); $this->capsule->bootEloquent(); $this->capsule->setAsGlobal(); } public function up(): void { // Create joindin_username $this->table('users') ->addColumn('joindin_username', 'string', ['null' => true]) ->update(); // Go through each record in user, strip out (https://joind.in/user/) and copy to joindin_username $joindInRegex = '/^https:\/\/joind\.in\/user\/(.{1,100})$/'; $users = EloquentUser::all(); foreach ($users as $user) { if (\preg_match($joindInRegex, $user->url, $matches) === 1) { $user->joindin_username = $matches[1]; $user->url = null; $user->save(); } } } public function down(): void { // Go through each record in user, update `url` to move the joindin_username to there $users = EloquentUser::all(); foreach ($users as $user) { $user->url = $user->joindin_username ? 'https://joind.in/user/' . $user->joindin_username : null; $user->joindin_username = null; $user->save(); } // Drop the joindin_username column $this->table('users') ->removeColumn('joindin_username') ->update(); } }
mit
prometheusresearch/react-ui
src/DangerButton.js
1174
/** * @copyright 2015, Prometheus Research, LLC * @flow */ import {css} from 'react-stylesheet'; import * as ButtonStylesheet from './ButtonStylesheet'; import ButtonBase from './ButtonBase'; let textColor = css.rgb(255, 231, 231); export default class DangerButton extends ButtonBase { static stylesheet = ButtonStylesheet.create({ raised: true, textWidth: 300, text: textColor, textHover: textColor, textFocus: textColor, textActive: css.rgb(241, 203, 203), textDisabled: textColor, background: css.rgb(210, 77, 77), backgroundHover: css.rgb(173, 48, 48), backgroundFocus: css.rgb(210, 77, 77), backgroundActive: css.rgb(173, 48, 48), backgroundDisabled: css.rgb(226, 135, 135), border: css.rgb(191, 55, 55), borderHover: css.rgb(146, 39, 39), borderFocus: css.rgb(146, 39, 39), borderActive: css.rgb(146, 39, 39), borderDisabled: css.rgb(226, 135, 135), shadow: css.rgb(210, 77, 77), shadowHover: css.rgb(173, 48, 48), shadowFocus: css.rgb(173, 48, 48), shadowActive: css.rgb(70, 21, 20), shadowFocusRing: css.boxShadow(0, 0, 0, 2, css.rgba(0, 126, 229, 0.5)), }); }
mit
portchris/NaturalRemedyCompany
src/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php
1737
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Adminhtml system templates grid block sender item renderer * * @category Mage * @package Mage_Adminhtml * @author Magento Core Team <[email protected]> */ class Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Sender extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { public function render(Varien_Object $row) { $str = ''; if($row->getTemplateSenderName()) { $str .= htmlspecialchars($row->getTemplateSenderName()) . ' '; } if($row->getTemplateSenderEmail()) { $str .= '[' . $row->getTemplateSenderEmail() . ']'; } if($str == '') { $str .= '---'; } return $str; } }
mit
dr4fters/dr4ft
backend/pool.spec.js
4341
/* eslint-env node, mocha */ const assert = require("assert"); const Pool = require("./pool"); const {range, times, constant} = require("lodash"); const {getPlayableSets} = require("./data"); const assertPackIsCorrect = (got) => { const cardIds = new Set(); let expectedCardsSize = 0; got.forEach(pool => pool.forEach(card => { assert(card.name !== undefined); assert(card.cardId !== undefined); cardIds.add(card.cardId); expectedCardsSize++; })); assert.equal(cardIds.size, expectedCardsSize, "cards should all have a unique ID"); }; describe("Acceptance tests for Pool class", () => { describe("can make a cube pool", () => { it("should return a sealed cube pool with length equal to player length", () => { const cubeList = times(720, constant("island")); const playersLength = 8; const playerPoolSize = 90; const got = Pool.SealedCube({cubeList, playersLength, playerPoolSize}); assert.equal(got.length, playersLength); assertPackIsCorrect(got); }); it("should return a draft cube pool with length equal to player length per playersPack", () => { const cubeList = times(720, constant("island")); const playersLength = 8; const packsNumber = 3; const playerPackSize = 15; const got = Pool.DraftCube({cubeList, playersLength, packsNumber, playerPackSize}); assert.equal(got.length, playersLength * packsNumber); assertPackIsCorrect(got); }); }); describe("can make a normal pool", () => { it("should return a sealed pool with length equal to player length", () => { const packsNumber = 6; const sets = times(packsNumber, constant("M19")); const playersLength = 8; const got = Pool.SealedNormal({sets, playersLength}); assert.equal(got.length, playersLength); assertPackIsCorrect(got); }); it("should return a draft pool with length equal to player length per playersPack", () => { const packsNumber = 3; const sets = times(packsNumber, constant("M19")); const playersLength = 8; const got = Pool.DraftNormal({sets, playersLength}); assert.equal(got.length, playersLength * packsNumber); assertPackIsCorrect(got); }); }); describe("can make a chaos pool", () => { it("should return a sealed chaos pool with length equal to player length", () => { const playersLength = 8; const got = Pool.SealedChaos({ modernOnly: true, totalChaos: true, playersLength }); assert.equal(got.length, playersLength); assertPackIsCorrect(got); }); it("should return a draft chaos pool with length equal to player length per playersPack", () => { const playersLength = 8; const packsNumber = 3; const got = Pool.DraftChaos({packsNumber, modernOnly: true, totalChaos: true, playersLength}); assert.equal(got.length, playersLength * packsNumber); assertPackIsCorrect(got); }); }); describe("can make a TimeSpiral pool", () => { it("should return a timespiral pool", () => { const [got] = Pool.DraftNormal({playersLength: 1, sets: ["TSP"]}); assert.equal(got.length, 15); assertPackIsCorrect([got]); }); }); describe("can make all playable sets", () => { it("should return a normal booster", () => { const playableSets = getPlayableSets(); Object.values(playableSets).forEach((sets) => { sets.forEach(({code, releaseDate}) => { if (code === "random" || Date.parse(releaseDate) > new Date() || code === "UST") { return; } const got = Pool.DraftNormal({playersLength: 1, sets: [code]}); assertPackIsCorrect(got); }); }); }); }); describe("EMN boosters do not have cards in multiple", () => { it("1000 EMN boosters don't have cards in multiple unless double faced card", () => { range(1000).forEach(() => { const [got] = Pool.DraftNormal({playersLength: 1, sets: ["EMN"]}); got.forEach(card => { const isMultiple = got.filter(c => c.name === card.name && !c.foil).length > 1; const isSpecial = card.rarity === "special" || card.isDoubleFaced || card.foil; assert(!isMultiple || isSpecial, `${card.name} is in multiple and was not special`); }); }); }); }); });
mit
vynessa/dman
server/models/User.js
1273
import bcrypt from 'bcrypt'; import jwt from 'jsonwebtoken'; module.exports = (sequelize, DataTypes) => { const User = sequelize.define('User', { fullName: { type: DataTypes.STRING, allowNull: false, }, email: { type: DataTypes.STRING, allowNull: false, unique: true, validate: { isEmail: true, } }, role: { type: DataTypes.STRING, allowNull: true, }, password: { type: DataTypes.STRING, allowNull: false, validate: { notEmpty: true } } }); User.prototype.generateHash = (password) => { return bcrypt.hashSync(password.toString(), bcrypt.genSaltSync(8), null); }; User.prototype.validatePassword = (password, savedPassword) => { return bcrypt.compareSync(password.toString(), savedPassword); }; User.prototype.generateToken = (id, role, fullName) => { return jwt.sign({ id, role, fullName }, process.env.JWT_SECRET, { expiresIn: '72h' }); }; User.associate = (models) => { User.hasMany(models.Document, { foreignKey: 'userId', as: 'myDocuments', }); User.belongsTo(models.Role, { foreignKey: 'role', onDelete: 'CASCADE', }); }; return User; };
mit
Dubrzr/Statusctrl
manage.py
249
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Status.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mit
maldrasen/archive
Rysh.3/spec/models/skill_spec.rb
68
require 'spec_helper' describe Skill do pending "Spec this" end
mit
egg82/Pi
Events/Patterns/Command/CommandEvent.cs
287
using System; namespace Events.Patterns.Command { class CommandEvent { //vars public const string COMPLETE = "complete"; public const string ERROR = "error"; public const string TIMER = "timer"; //constructor public CommandEvent() { } //public //private } }
mit
trustyou/tyluigiutils
tyluigiutils/url.py
6534
""" Adapted from https://github.com/edx/edx-analytics-pipeline/blob/master/edx/analytics/tasks/url.py Support URLs. Specifically, we want to be able to refer to data stored in a variety of locations and formats using a standard URL syntax. Examples:: s3://some-bucket/path/to/file /path/to/local/file.gz hdfs://some/directory/ file://some/local/directory """ from __future__ import absolute_import import os import urlparse import luigi import luigi.configuration import luigi.format import luigi.contrib.hdfs import luigi.contrib.s3 from luigi.contrib.s3 import S3Target luigi_config = luigi.configuration.LuigiConfigParser.instance() class ExternalURL(luigi.ExternalTask): """Simple Task that returns a target based on its URL""" url = luigi.Parameter() def output(self): return get_target_from_url(self.url) class UncheckedExternalURL(ExternalURL): """A ExternalURL task that does not verify if the source file exists, which can be expensive for S3 URLs.""" def complete(self): return True class IgnoredTarget(luigi.contrib.hdfs.HdfsTarget): """Dummy target for use in Hadoop jobs that produce no explicit output file.""" def __init__(self): super(IgnoredTarget, self).__init__(is_tmp=True) def exists(self): return False def open(self, mode='r'): return open('/dev/null', mode) DEFAULT_TARGET_CLASS = luigi.LocalTarget URL_SCHEME_TO_TARGET_CLASS = { 'hdfs': luigi.contrib.hdfs.HdfsTarget, 's3': S3Target, 'file': luigi.LocalTarget } def get_target_class_from_url(url): """Returns a luigi target class based on the url scheme""" parsed_url = urlparse.urlparse(url) target_class = URL_SCHEME_TO_TARGET_CLASS.get(parsed_url.scheme, DEFAULT_TARGET_CLASS) kwargs = {} if issubclass(target_class, luigi.LocalTarget) or parsed_url.scheme == 'hdfs': # LocalTarget and HdfsTarget both expect paths without any scheme, netloc etc, just bare paths. So strip # everything else off the url and pass that in to the target. url = parsed_url.path # if issubclass(target_class, luigi.contrib.s3.S3Target): # kwargs['client'] = ScalableS3Client() url = url.rstrip('/') args = (url,) return target_class, args, kwargs def get_target_from_url(url): """Returns a luigi target based on the url scheme""" cls, args, kwargs = get_target_class_from_url(url) return cls(*args, **kwargs) def url_path_join(url, *extra_path): """ Extend the path component of the given URL. Relative paths extend the existing path, absolute paths replace it. Special path elements like '.' and '..' are not treated any differently than any other path element. Examples: url=http://foo.com/bar, extra_path=baz -> http://foo.com/bar/baz url=http://foo.com/bar, extra_path=/baz -> http://foo.com/baz url=http://foo.com/bar, extra_path=../baz -> http://foo.com/bar/../baz Args: url (str): The URL to modify. extra_path (str): The path to join with the current URL path. Returns: The URL with the path component joined with `extra_path` argument. """ (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url) joined_path = os.path.join(path, *extra_path) return urlparse.urlunparse((scheme, netloc, joined_path, params, query, fragment)) def get_hdfs_target_from_rel_path(path, use_hdfs_dir=False): """ Transform paths into hdfs url using hdfs_dir param: use_hdfs_dir : if True, it will use hdfs_dir configuration to build the path. """ user = os.getenv('USER') hdfs_dir = luigi_config.get('core', 'hdfs-dir') if use_hdfs_dir: url = "hdfs:///user/{user}/{hdfs_dir}/{path}" else: url = "hdfs:///user/{user}/{path}" url = url.format( user=user, hdfs_dir=hdfs_dir, path=path ) return get_target_from_url(url) def get_hdfs_dir_url(): user = os.getenv('USER') hdfs_dir = luigi_config.get('core', 'hdfs-dir') url = "hdfs:///user/{user}/{hdfs_dir}/".format( user=user, hdfs_dir=hdfs_dir ) return url def get_hdfs_target_with_date(filename): """ Returns the default Target formatted hdfs:///user/{username}/{hdfs_dir}/{date}/{filename} """ url = get_hdfs_url_with_date(filename) return get_target_from_url(url) def get_hdfs_url_with_date(filename): date = luigi_config.get('task_params', 'date') return get_hdfs_url_with_specific_date(filename, date) def get_hdfs_target_with_specific_date(filename, date): """ Returns the default Target formatted hdfs:///user/{username}/{hdfs_dir}/{date}/{filename} """ url = get_hdfs_url_with_specific_date(filename, date) return get_target_from_url(url) def get_hdfs_url_with_specific_date(filename, date): user = os.getenv('USER') hdfs_dir = luigi_config.get('core', 'hdfs-dir') date_format = luigi_config.get('core', 'date_format') if not isinstance(date, basestring): # assume datetime date = date.strftime(date_format) url = "hdfs:///user/{user}/{hdfs_dir}/{date}/{filename}".format( user=user, hdfs_dir=hdfs_dir, date=date, filename=filename ) return url def get_s3_url_with_date(filename): bucket = luigi_config.get('aws', 's3-bucket') date = luigi_config.get('task_params', 'date') date_format = luigi_config.get('core', 'date_format') if not isinstance(date, basestring): # assume datetime date = date.strftime(date_format) url = "s3://{bucket}/{date}/{filename}".format( bucket=bucket, date=date, filename=filename ) return url def get_s3_bucket_url(bucket): return "s3://{bucket}".format( bucket=bucket ) def get_absulute_hdfs_dir(): user = os.getenv('USER') hdfs_dir = luigi_config.get('core', 'hdfs-dir') path = "/user/{user}/{hdfs_dir}".format( user=user, hdfs_dir=hdfs_dir ) return path def get_absulute_hdfs_dir_url(): return "hdfs://" + get_absulute_hdfs_dir() def get_absulute_hdfs_dir_url_with_date(d): abs_path = get_absulute_hdfs_dir_url() path = "{abs_path}/{date}".format( abs_path=abs_path, date=d ) return path def normalize_hdfs_url(hdfs_path): """Normalizes an hdfs url to return an hdfs path""" if "hdfs://" in hdfs_path: return hdfs_path[7:] return hdfs_path
mit
cookbookcms/contracts
OAuth/ConsumerRepositoryContract.php
716
<?php /* * This file is part of the congraph/contracts package. * * (c) Nikola Plavšić <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Congraph\Contracts\OAuth; use Congraph\Contracts\Core\RepositoryContract; /** * Interface for Consumer Repository class * * @uses Congraph\Contracts\Core\RepositoryContract * * @author Nikola Plavšić <[email protected]> * @copyright Nikola Plavšić <[email protected]> * @package congraph/contracts * @since 0.1.0-alpha * @version 0.1.0-alpha */ interface ConsumerRepositoryContract extends RepositoryContract { }
mit
GeoSensorWebLab/arctic-portal
config/initializers/assets.rb
807
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path Rails.application.config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components') # Add Yarn node_modules folder to the asset load path. Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) Rails.application.config.assets.precompile += %w( map-notes.js map-notes.css )
mit
crackcomm/chromedp
cdp/tethering/tethering.go
1389
// Package tethering provides the Chrome Debugging Protocol // commands, types, and events for the Tethering domain. // // The Tethering domain defines methods and events for browser port binding. // // Generated by the chromedp-gen command. package tethering // AUTOGENERATED. DO NOT EDIT. import ( "context" cdp "github.com/knq/chromedp/cdp" ) // BindParams request browser port binding. type BindParams struct { Port int64 `json:"port"` // Port number to bind. } // Bind request browser port binding. // // parameters: // port - Port number to bind. func Bind(port int64) *BindParams { return &BindParams{ Port: port, } } // Do executes Tethering.bind against the provided context and // target handler. func (p *BindParams) Do(ctxt context.Context, h cdp.Handler) (err error) { return h.Execute(ctxt, cdp.CommandTetheringBind, p, nil) } // UnbindParams request browser port unbinding. type UnbindParams struct { Port int64 `json:"port"` // Port number to unbind. } // Unbind request browser port unbinding. // // parameters: // port - Port number to unbind. func Unbind(port int64) *UnbindParams { return &UnbindParams{ Port: port, } } // Do executes Tethering.unbind against the provided context and // target handler. func (p *UnbindParams) Do(ctxt context.Context, h cdp.Handler) (err error) { return h.Execute(ctxt, cdp.CommandTetheringUnbind, p, nil) }
mit
conveyal/datatools-manager
lib/gtfsplus/components/GtfsPlusField.js
4631
// @flow import React, {Component} from 'react' import {FormControl} from 'react-bootstrap' import EditableTextField from '../../common/components/EditableTextField' import {getRouteName} from '../../editor/util/gtfs' import GtfsSearch from '../../gtfs/components/gtfs-search' import type {Props as GtfsPlusTableProps} from './GtfsPlusTable' import type {GtfsSpecField as GtfsPlusFieldType, GtfsRoute, GtfsStop} from '../../types' type Props = GtfsPlusTableProps & { currentValue: any, field: GtfsPlusFieldType, row: number } export default class GtfsPlusField extends Component<Props> { _onChangeRoute = ({route}: {route: GtfsRoute}) => { const {field, receiveGtfsEntities, row: rowIndex, table, updateGtfsPlusField} = this.props // Simulate the GraphQL response. receiveGtfsEntities({feed: {routes: [route]}}) updateGtfsPlusField({tableId: table.id, rowIndex, fieldName: field.name, newValue: route.route_id}) } _onChangeStop = ({stop}: {stop: GtfsStop}) => { const {field, receiveGtfsEntities, row: rowIndex, table, updateGtfsPlusField} = this.props // Simulate the GraphQL response. receiveGtfsEntities({feed: {stops: [stop]}}) updateGtfsPlusField({tableId: table.id, rowIndex, fieldName: field.name, newValue: stop.stop_id}) } _onChangeValue = (newValue: any) => { const {field, row: rowIndex, table, updateGtfsPlusField} = this.props updateGtfsPlusField({tableId: table.id, rowIndex, fieldName: field.name, newValue}) } _onChange = ({target}: SyntheticInputEvent<HTMLInputElement>) => { const {field, row: rowIndex, table, updateGtfsPlusField} = this.props updateGtfsPlusField({tableId: table.id, rowIndex, fieldName: field.name, newValue: target.value}) } render () { const {currentValue, feedVersion, field, getGtfsEntity} = this.props switch (field.inputType) { case 'TEXT': case 'GTFS_TRIP': case 'GTFS_FARE': case 'GTFS_SERVICE': case 'GTFS_ZONE': return ( <EditableTextField value={currentValue} onChange={this._onChangeValue} /> ) case 'DROPDOWN': const {options} = field if (!options) { console.warn(`GTFS+ field has no options defined.`, field) return null } // NOTE: client has requested that GTFS+ fields be case insensitive // (hence the toUpperCase call) const option = currentValue && options.find(o => o.value.toUpperCase() === currentValue.toUpperCase()) return ( <FormControl componentClass='select' value={option ? option.value : ''} onChange={this._onChange}> {/* Add field for empty string value if that is not an allowable option so that user selection triggers onChange */} {options.findIndex(option => option.value === '') === -1 ? <option disabled value=''> {field.required ? '-- select an option --' : '(optional)' } </option> : null } {options.map(option => { // NOTE: client has requested that GTFS+ fields be case // insensitive (hence the toLowerCase call) return <option value={option.value} key={option.value}> {option.text || option.value} </option> })} </FormControl> ) case 'GTFS_ROUTE': const routeEntity = ((getGtfsEntity('route', currentValue): any): GtfsRoute) const routeValue = routeEntity ? { value: routeEntity.route_id, label: getRouteName(routeEntity) } : null return ( <GtfsSearch feeds={[]} namespace={feedVersion && feedVersion.namespace} limit={100} entities={['routes']} minimumInput={1} clearable={false} onChange={this._onChangeRoute} value={routeValue} /> ) case 'GTFS_STOP': const stopEntity = ((getGtfsEntity('stop', currentValue): any): GtfsStop) const stopValue = stopEntity ? {value: stopEntity.stop_id, label: stopEntity.stop_name} : null return ( <GtfsSearch feeds={[]} namespace={feedVersion && feedVersion.namespace} limit={100} entities={['stops']} clearable={false} minimumInput={1} onChange={this._onChangeStop} value={stopValue} /> ) } return null } }
mit
Catel/Catel.Fody
src/Catel.Fody.TestAssembly.Shared/BackupTestModel.cs
265
namespace Catel.Fody.TestAssembly { using Catel.Data; public class BackupTestModel : ModelBase { [ExcludeFromBackup] public string A { get; set; } public string B { get; set; } public string C { get; set; } } }
mit
positive-js/mosaic
wallaby.js
354
module.exports = () => ({ autoDetect: true, files: [ 'packages/**/*.ts', "!packages/**/*.spec.ts", ], tests: [ "packages/**/*.spec.ts", "!packages/mosaic/schematics/**/*.spec.ts", "!packages/docs/**/*.*", "!packages/mosaic-dev/**/*.*", "!packages/mosaic-examples/**/*.*" ] });
mit
SmartPowerSocket/DesktopApp
app/components/Home.js
2456
import React, { Component, PropTypes } from 'react'; import { reduxForm, propTypes } from 'redux-form'; import styles from './Home.css'; import * as actions from '../actions/auth'; class Home extends Component { static contextTypes = { router: PropTypes.object }; static propTypes = { ...propTypes, signinUser: PropTypes.func, errorMessage: PropTypes.string }; constructor(props) { super(props); // We are calling the React.Component constructor method this.state = { loading: false }; } componentWillReceiveProps(nextProps) { if (nextProps.errorMessage) { this.setState({ loading: false }); } } handleFormSubmit({ email, password }) { this.setState({ loading: true }); // {email, password} - {email: email, password: password} this.props.signinUser({ email, password }); } renderAlert() { if (this.props.errorMessage) { return ( <div className="alert alert-danger"> <strong>Oops! </strong> {this.props.errorMessage} </div> ); } } render() { const { handleSubmit, fields: { email, password } } = this.props; return ( <div> <div className={styles.container}> <img src="images/logo.png" alt="Smart Power Socket logo" /> <br /> <div className={styles.menu}> <form onSubmit={handleSubmit(this.handleFormSubmit.bind(this))}> <fieldset className="form-group"> <label htmlFor={'email'}>Email:</label> <input {...email} className="form-control" /> </fieldset> <fieldset className="form-group"> <label htmlFor={'password'}>Password:</label> <input {...password} type="password" className="form-control" /> </fieldset> {this.renderAlert()} <button action="submit" className="btn btn-primary"> {this.state.loading ? <img width="60px" height="60px" src="images/spinner.gif" alt="Loading spinner" /> : <span />} Sign in </button> </form> </div> </div> </div> ); } } function mapStateToProps(state) { return { errorMessage: state.auth.error }; } // just like connect export default reduxForm({ form: 'signin', fields: ['email', 'password'] }, mapStateToProps, actions)(Home);
mit
Alec-WAM/CrystalMod
src/main/java/alec_wam/CrystalMod/CrystalMod.java
7606
package alec_wam.CrystalMod; import java.util.Collections; import java.util.Comparator; import java.util.Locale; import alec_wam.CrystalMod.api.CrystalModAPI; import alec_wam.CrystalMod.blocks.BlockCrystal.CrystalBlockType; import alec_wam.CrystalMod.blocks.ModBlocks; import alec_wam.CrystalMod.blocks.crops.material.IMaterialCrop; import alec_wam.CrystalMod.blocks.crops.material.ItemMaterialSeed; import alec_wam.CrystalMod.fluids.ModFluids; import alec_wam.CrystalMod.handler.GuiHandler; import alec_wam.CrystalMod.handler.MissingItemHandler; import alec_wam.CrystalMod.items.ItemCrystal.CrystalType; import alec_wam.CrystalMod.items.ModItems; import alec_wam.CrystalMod.network.CrystalModNetwork; import alec_wam.CrystalMod.network.commands.CommandCrystalMod; import alec_wam.CrystalMod.proxy.CommonProxy; import alec_wam.CrystalMod.tiles.pipes.covers.CoverUtil.CoverData; import alec_wam.CrystalMod.tiles.pipes.covers.ItemPipeCover; import alec_wam.CrystalMod.util.CrystalColors; import alec_wam.CrystalMod.util.ItemUtil; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLMissingMappingsEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @Mod(modid = CrystalMod.MODID, name = CrystalMod.MODNAME, version = CrystalMod.VERSION, guiFactory = "alec_wam.CrystalMod.config.ConfigFactoryCM") public class CrystalMod { public static final String MODID = "crystalmod"; public static final String MODNAME = "Crystal Mod"; public static final String VERSION = "@VERSION@"; static { ModFluids.registerBucket(); } @Instance(MODID) public static CrystalMod instance; @SidedProxy(clientSide="alec_wam.CrystalMod.proxy.ClientProxy", serverSide="alec_wam.CrystalMod.proxy.CommonProxy") public static CommonProxy proxy; public static abstract class CustomCreativeTab extends CreativeTabs implements Comparator<ItemStack> { public CustomCreativeTab(String label) { super(label); } @Override @SideOnly(Side.CLIENT) public void displayAllRelevantItems(final NonNullList<ItemStack> list) { final NonNullList<ItemStack> newList = NonNullList.create(); super.displayAllRelevantItems(newList); Collections.sort(newList, this); list.addAll(newList); } } public static CreativeTabs tabItems = new CustomCreativeTab(MODID.toLowerCase()+".items") { @Override @SideOnly(Side.CLIENT) public ItemStack getTabIconItem() { return new ItemStack(ModItems.crystals, 1, CrystalType.BLUE.getMeta()); } @Override public int compare(ItemStack arg0, ItemStack arg1) { if(arg0.getItem() !=arg1.getItem()){ return ItemUtil.compareNames(arg0, arg1); } return 0; } }; public static CreativeTabs tabTools = new CustomCreativeTab(MODID.toLowerCase()+".tools") { @Override public ItemStack getTabIconItem() { return new ItemStack(ModItems.wrench); } @Override public int compare(ItemStack arg0, ItemStack arg1) { if(arg0.getItem() !=arg1.getItem()){ return ItemUtil.compareNames(arg0, arg1); } return 0; } }; public static CreativeTabs tabBlocks = new CustomCreativeTab(MODID.toLowerCase()+".blocks") { @Override @SideOnly(Side.CLIENT) public ItemStack getTabIconItem() { return new ItemStack(ModBlocks.crystal, 1, CrystalBlockType.BLUE.getMeta()); } @Override public int compare(ItemStack arg0, ItemStack arg1) { if(arg0.getItem() !=arg1.getItem()){ return ItemUtil.compareNames(arg0, arg1); } return 0; } }; public static CreativeTabs tabCovers = new CustomCreativeTab(MODID.toLowerCase()+".covers") { @Override @SideOnly(Side.CLIENT) public ItemStack getTabIconItem() { return ItemPipeCover.getCover(new CoverData(ModBlocks.crystal.getDefaultState())); } @Override public boolean hasSearchBar() { return true; } @Override public int compare(ItemStack arg0, ItemStack arg1) { return ItemUtil.compareNames(arg0, arg1); } }; public static CreativeTabs tabCrops = new CustomCreativeTab(MODID.toLowerCase()+".crops") { @Override @SideOnly(Side.CLIENT) public ItemStack getTabIconItem() { return new ItemStack(ModBlocks.crystalSapling, 1, CrystalColors.Basic.BLUE.getMeta()); } @Override public boolean hasSearchBar() { return true; } @Override public int compare(ItemStack arg0, ItemStack arg1) { if(arg0.getItem() instanceof ItemMaterialSeed){ if(arg1.getItem() instanceof ItemMaterialSeed){ IMaterialCrop crop0 = ItemMaterialSeed.getCrop(arg0); IMaterialCrop crop1 = ItemMaterialSeed.getCrop(arg1); if((crop0 !=null && crop0.getSeedInfo() !=null) && (crop1 !=null && crop1.getSeedInfo() !=null)){ int tier0 = crop0.getSeedInfo().getTier(); int tier1 = crop1.getSeedInfo().getTier(); if(tier0 == tier1){ int index0 = -1; int index1 = -1; int i = 0; for(String key : CrystalModAPI.getCropMap().keySet()){ if(key.equals(crop0.getUnlocalizedName())){ index0 = i; } if(key.equals(crop1.getUnlocalizedName())){ index1 = i; } if(index0 !=-1 && index1 !=-1){ break; } i++; } return Integer.compare(index0, index1); } return Integer.compare(tier0, tier1); } } } return ItemUtil.compareNames(arg0, arg1); } }; @EventHandler public void preInit(FMLPreInitializationEvent event) { CrystalModNetwork.instance.setup(); proxy.preInit(event); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } @EventHandler public void missingItems(FMLMissingMappingsEvent event){ MissingItemHandler.missingFix(event); } @EventHandler public void severStart(FMLServerStartingEvent evt) { evt.registerServerCommand(new CommandCrystalMod()); } public static String resource(String res) { return String.format("%s:%s", CrystalMod.MODID.toLowerCase(Locale.US), res); } public static String prefix(String name) { return String.format("%s.%s", CrystalMod.MODID.toLowerCase(Locale.US), name); } public static ResourceLocation resourceL(String string) { return new ResourceLocation(resource(string)); } }
mit
ulisesantana/DAW
DOR/DOR_RECURSOS_UT5/numerosenInput.js
138
$(".classInput").keypress(function(e){ if((e.which!=8) && (e.which!=0) && (e.which<48 || e.which>57)) { return false; } });
mit
geex-arts/scrollity
src/utils/lethargy.ts
2165
export class Lethargy { lastUpDeltas = []; lastDownDeltas = []; deltasTimestamp = []; createInitialDeltas() { const results = []; for (let i = 1, ref = this.stability * 2; 1 <= ref ? i <= ref : i >= ref; 1 <= ref ? i++ : i--) { results.push(null); } return results; } constructor(private stability = 8, private sensitivity = 100, private tolerance = 1.1, private delay = 150) { this.lastUpDeltas = this.createInitialDeltas(); this.lastDownDeltas = this.createInitialDeltas(); this.deltasTimestamp = this.createInitialDeltas(); } check(e) { let lastDelta; e = e.originalEvent || e; if (e.wheelDelta != null) { lastDelta = e.wheelDelta; } else if (e.deltaY != null) { lastDelta = e.deltaY * -40; } else if ((e.detail != null) || e.detail === 0) { lastDelta = e.detail * -40; } this.deltasTimestamp.push(Date.now()); this.deltasTimestamp.shift(); if (lastDelta > 0) { this.lastUpDeltas.push(lastDelta); this.lastUpDeltas.shift(); return this.isInertia(1); } else { this.lastDownDeltas.push(lastDelta); this.lastDownDeltas.shift(); return this.isInertia(-1); } } isInertia(direction) { const lastDeltas = direction === -1 ? this.lastDownDeltas : this.lastUpDeltas; if (lastDeltas[0] === null) { return direction; } if (this.deltasTimestamp[(this.stability * 2) - 2] + this.delay > Date.now() && lastDeltas[0] === lastDeltas[(this.stability * 2) - 1]) { return false; } const lastDeltasOld = lastDeltas.slice(0, this.stability); const lastDeltasNew = lastDeltas.slice(this.stability, this.stability * 2); const oldSum = lastDeltasOld.reduce((t, s) => t + s, 0); const newSum = lastDeltasNew.reduce((t, s) => t + s, 0); const oldAverage = oldSum / lastDeltasOld.length; const newAverage = newSum / lastDeltasNew.length; if (Math.abs(oldAverage) < Math.abs(newAverage * this.tolerance) && (this.sensitivity < Math.abs(newAverage))) { return direction; } else { return false; } } }
mit
lifeart/ember-hell-filters
addon/mixins/filter-group-message-receiver.js
2130
import Ember from 'ember'; const { get, set, run, RSVP, computed, merge } = Ember; export default Ember.Mixin.create({ _mapData: computed(function () { return {}; }), messageDebounce: computed(function () { return 50; }), _messageReceiver(uid,datum) { this._addDataToMap(uid,datum); this._debouncePromiseResolver(uid); }, _debouncePromiseResolver(uid) { run.debounce(this,this._resolvePromiseByHash,uid,get(this,'messageDebounce')); }, _getMapData() { return get(this,'_mapData') || {}; }, _setMapData(data) { set(this,'_mapData',data||{}); }, _addDataToMap(uid,datum) { let data = this._getMapData(); if (!data.hasOwnProperty(uid)) { data[uid] = []; } data[uid].push(datum); this._setMapData(data); }, _getDataFromMap(uid) { return get(this._getMapData(),`${uid}`) || []; }, _removeDataFromMap(uid) { let data = this._getMapData(); if (data.hasOwnProperty(uid)) { delete data[uid]; } this._setMapData(data); }, _resolvePromiseByHash(hash) { let p = get(this,`_pHashResolve`); if (p) { RSVP.all(this._getDataFromMap(hash)).then(resultsArray=>{ let resultHash = {}; resultsArray.forEach(result=>{ merge(resultHash,result); }); p.get(hash)(resultHash); }).finally(()=>{ this._clearUIDdata(hash); }); } }, _clearUIDdata(uid) { let pHashResolve = get(this,'_pHashResolve'); let pHashReject = get(this,'_pHashReject'); if (pHashResolve) { pHashResolve.delete(uid); } if (pHashReject) { pHashReject.delete(uid); } this._removeDataFromMap(uid); }, initMessageResolver(uid) { run.debounce(this,this._resolvePromiseByHash,uid,get(this,'messageDebounce')); }, messageResolver(uid,resolve,reject) { let pHashResolve = get(this,'_pHashResolve') || new Map(); let pHashReject = get(this,'_pHashReject') || new Map(); pHashResolve.set(uid,resolve); pHashReject.set(uid,reject); set(this,'_pHashResolve',pHashResolve); set(this,'_pHashReject',pHashReject); } });
mit
matarillo/dot-gimei
DotGimei/GenderIdentity.cs
501
using System; namespace DotGimei { /// <summary> /// ISO 5218に従って性自認を表現します。 /// </summary> public enum GenderIdentity { /// <summary>コード値0 不明</summary> NotKnown = 0, /// <summary>コード値1 男性</summary> Male = 1, /// <summary>コード値2 女性</summary> Female = 2, /// <summary>コード値9 適用不能</summary> NotApplicable = 9 } }
mit
cizekm/dbfaker
src/Database/Driver/Driver.php
952
<?php namespace DbFaker\Database\Driver; use DbFaker\Config; use DbFaker\Database\Driver\Exception\UpdateException; abstract class Driver { /** @var Config */ protected $config = null; public function __construct(Config $config) { $this->config = $config; $this->connect($this->config); } abstract protected function connect(Config $config): self; abstract public function fetchAll(string $tableName, array $columns = null): array; abstract public function onTableUpdateStart(string $tableName): self; abstract public function onTableUpdateFinished(string $tableName): self; abstract public function onTableUpdateFailed(string $tableName): self; /** * @param string $tableName * @param array $data * @param array $identifier * @return bool * @throws UpdateException */ abstract public function replace(string $tableName, array $data, array $identifier): bool; abstract protected function isConnected(): bool; }
mit
zoedujeux/EI
src/EI/UserBundle/DependencyInjection/EIUserExtension.php
852
<?php namespace EI\UserBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; /** * This is the class that loads and manages your bundle configuration. * * @link http://symfony.com/doc/current/cookbook/bundles/extension.html */ class EIUserExtension extends Extension { /** * {@inheritdoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); } }
mit
sonata-project/SonataDoctrinePhpcrAdminBundle
tests/custom_bootstrap.php
1098
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Sonata\DoctrinePHPCRAdminBundle\Tests\Fixtures\App\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\ConsoleOutput; $_ENV['KERNEL_CLASS'] = Kernel::class; putenv(sprintf('KERNEL_CLASS=%s', $_ENV['KERNEL_CLASS'])); require_once __DIR__.'/../vendor/symfony-cmf/testing/bootstrap/bootstrap.php'; $application = new Application(new Kernel()); $application->setAutoExit(false); // Load fixtures of the AppTestBundle $input = new ArrayInput([ 'command' => 'doctrine:phpcr:init:dbal', '--drop' => true, '--force' => true, ]); $application->run($input, new ConsoleOutput()); $input = new ArrayInput([ 'command' => 'doctrine:phpcr:repository:init', ]); $application->run($input, new ConsoleOutput());
mit
Masa331/pohoda
lib/pohoda.rb
527
require 'ox' require 'parser_core' require 'pohoda/requires' module Pohoda def self.parse(raw) parsed = Ox.load(raw, skip: :skip_none) if parsed.locate('dat:dataPack').any? Parsers::Dat::DataPackType.new(parsed.locate('dat:dataPack').first) elsif parsed.locate('rsp:responsePack').any? Parsers::Rsp::ResponsePackType.new(parsed.locate('rsp:responsePack').first) end end def self.build(data, options = {}) Builders::Dat::DataPackType.new('dat:dataPack', data, options).to_xml end end
mit
anchorchat/anchor-ui
src/checkbox/index.js
232
import Radium from 'radium'; import compose from 'recompose/compose'; import themeable from '../themeable'; import Checkbox from './component'; const enhance = compose( themeable(), Radium ); export default enhance(Checkbox);
mit
thesharp/daemonize
setup.py
1598
#!/usr/bin/python import re import ast from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('daemonize.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) setup( name="daemonize", version=version, py_modules=["daemonize"], author="Ilya Otyutskiy", author_email="[email protected]", maintainer="Ilya Otyutskiy", url="https://github.com/thesharp/daemonize", description="Library to enable your code run as a daemon process on Unix-like systems.", license="MIT", classifiers=["Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Operating System :: POSIX :: BSD :: FreeBSD", "Operating System :: POSIX :: BSD :: OpenBSD", "Operating System :: POSIX :: BSD :: NetBSD", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development"] )
mit
vc3/ExoWeb
ExoWeb.UnitTests/JavaScriptTests.Helpers.cs
1860
using System; using ExoModel; using ExoWeb.UnitTests.Models.Requests; using Jurassic; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ExoWeb.UnitTests { public partial class JavaScriptTests { private static void Allocate(EventHandler onFinalized) { var data = new Request { Description = "asdasdasd" }; data.Finalized += onFinalized; } private static void TestExpression<T>(Func<ScriptEngine, object> instanceFactory, string javascript, T expectedResult) { var engine = new ScriptEngine(); engine.ForceStrictMode = true; engine.SetGlobalValue("$instance", instanceFactory(engine)); var result = engine.Evaluate<T>(javascript); Assert.AreEqual(expectedResult, result, javascript + " ---> " + expectedResult); } private static void TestAdapterExpression<T>(object instance, string propertyName, string javascript, T expectedResult) { TestExpression(engine => Accessors.CreateAdapter(engine, (IModelInstance)instance, propertyName), javascript, expectedResult); } private static void TestEntityExpression<T>(object instance, string javascript, T expectedResult) { TestExpression(engine => Accessors.CreateEntity(engine, (IModelInstance)instance), javascript, expectedResult); } private static void TestEntityException(object instance, string javascript, Predicate<Exception> expected) { var engine = new ScriptEngine(); engine.ForceStrictMode = true; engine.SetGlobalValue("$instance", Accessors.CreateEntity(engine, (IModelInstance)instance)); try { var result = engine.Evaluate(javascript); Assert.Fail("Expected an exception but one was not thrown: " + javascript + " --> " + result); } catch (Exception error) { Assert.IsTrue(expected(error), "An error was expected but not '" + error.Message + "': " + javascript); } } } }
mit
Chrisr850/Snake.io-player
test.py
583
import testnetwork as network import numpy as np import testPopulation def testCrossover(): x = network.network() x.graph('x') y = network.network() y.graph('y') z = x.crossover(y) x.mutation(1) combined_data = np.array([q[1][0],x.dna[1][0]]) _min, _max = np.amin(combined_data), np.amax(combined_data) x.graph('y') print(x.dna[1][0]) def crossSim(): x = testPopulation.population(3) x.fake() x.writeMetaDeta() x.genNextgen() x.generation+=1 x.writeMetaDeta() if __name__ == '__main__': crossSim()
mit
cloew/kao-ng-auth
dist/kao_auth.js
3621
$traceurRuntime.ModuleStore.getAnonymousModule(function() { "use strict"; angular.module("kao.auth", ["kao.utils"]).value("userEvents", { login: "user-login", update: "user-update", logout: "user-logout" }).provider("AuthConfig", function() { this.configure = function(config) { for (var $__0 = Object.keys(config)[$traceurRuntime.toProperty(Symbol.iterator)](), $__1; !($__1 = $__0.next()).done; ) { var key = $__1.value; { var value = config[key]; this[key] = value; } } }; this.$get = function() { return this; }; }).factory("login", function($location, AuthConfig) { return function() { return $location.path(AuthConfig.loginRoute); }; }).service("UserService", function($http, $window, $rootScope, AuthConfig, KaoDefer, login, userEvents) { var user = void 0; var responseHandler = function(promise, event) { var deferred = KaoDefer(); promise.success(function(data) { if (data.error) { deferred.reject(data.error); } else { user = data.user; $window.localStorage.token = data.token; $rootScope.$broadcast(event, user); deferred.resolve(user); } }).error(function(error) { deferred.reject(error); }); return deferred.promise; }; this.login = function(loginInfo) { return responseHandler($http.post(AuthConfig.loginApi, loginInfo), userEvents.login); }; this.register = function(user) { return responseHandler($http.post(AuthConfig.usersApi, user), userEvents.login); }; this.update = function(user) { return responseHandler($http.put(AuthConfig.currentUserApi, user), userEvents.update); }; this.logout = function() { delete $window.localStorage.token; user = void 0; $rootScope.$broadcast(userEvents.logout); login(); }; this.isLoggedIn = function() { return typeof $window.localStorage.token !== "undefined" && $window.localStorage.token !== null; }; this.withUser = function() { var deferred = KaoDefer(); if (!!this.isLoggedIn() && !(typeof user !== "undefined" && user !== null)) { $http.get(AuthConfig.currentUserApi).success(function(data) { user = data.user; deferred.resolve(user); }).error(function(error) { deferred.reject(error); }); } else { deferred.resolve(user); } return deferred.promise; }; }).service("AuthRejected", function($location, login) { return {toLogin: function() { var returnToPath = $location.path(); login().search("returnTo", returnToPath); }}; }).factory("authInterceptor", function($rootScope, $q, $window, AuthRejected) { return { request: function(config) { config.headers = config.headers == null ? {} : config.headers; if ($window.localStorage.token) { config.headers.Authorization = "Bearer " + $window.localStorage.token; } return config; }, responseError: function(rejection) { if (rejection.status === 401) { AuthRejected.toLogin(); } return $q.reject(rejection); } }; }).service("requireAuth", function(UserService, AuthRejected) { return function(event) { if (!UserService.isLoggedIn()) { event.preventDefault(); AuthRejected.toLogin(); } }; }).config(function($httpProvider) { $httpProvider.interceptors.push("authInterceptor"); }); return {}; });
mit
mllrsohn/gulp-protractor
index.js
3191
'use strict'; var es = require('event-stream'); var path = require('path'); var childProcess = require('child_process'); var PluginError = require('plugin-error'); var winExt = /^win/.test(process.platform) ? '.cmd' : ''; // optimization: cache for protractor binaries directory var protractorDir = null; function getProtractorCli() { var result = require.resolve('protractor'); if (result) { return result.replace('index', 'cli'); } else { throw new Error('Please check whether protractor is installed or not.'); } } function getProtractorDir() { if (protractorDir) { return protractorDir; } var result = require.resolve('protractor'); if (result) { // console.log(result); // result is now something like // c:\\Source\\gulp-protractor\\node_modules\\protractor\\built\\index.js protractorDir = path.resolve(path.join(path.dirname(result), '..', '..', '.bin')); return protractorDir; } throw new Error('No protractor installation found.'); } var protractor = function(options) { var files = [], child, args; options = options || {}; args = options.args || []; return es.through(function(file) { files.push(file.path); this.push(file); }, function() { var stream = this; // Enable debug mode if (options.debug) { args.push('debug'); } // Attach Files, if any if (files.length) { args.push('--specs'); args.push(files.join(',')); } // Pass in the config file if (options.configFile) { args.unshift(options.configFile); } // console.log(getProtractorCli()); // child = childProcess.spawn(path.resolve(getProtractorDir() + '/protractor'), args, { child = childProcess.fork(getProtractorCli(), args, { stdio: 'inherit', env: process.env }).on('exit', function(code, signal) { if (child) { child.kill(); } if (stream) { if (code !== 0) { var errorMessage = 'protractor exited with code ' + code + ' and signal ' + signal stream.emit('error', new PluginError('gulp-protractor', errorMessage)); } else { stream.emit('end'); } } }); }); }; var wdUpdate = function(opts, cb) { var callback = (cb ? cb : opts); var options = (cb ? opts : null); var args = ['update', '--standalone']; if (options) { if (options.webdriverManagerArgs) { options.webdriverManagerArgs.forEach(function(element) { args.push(element); }); } if (options.browsers) { options.browsers.forEach(function(element) { args.push('--' + element); }); } } childProcess.spawn(path.resolve(getProtractorDir() + '/webdriver-manager' + winExt), args, { stdio: 'inherit' }).once('close', callback); }; var webdriverUpdateSpecific = function(opts) { return wdUpdate.bind(this, opts); }; wdUpdate.bind(null, ['ie', 'chrome']); var webdriverStandalone = function(cb) { childProcess.spawn(path.resolve(getProtractorDir() + '/webdriver-manager' + winExt), ['start'], { stdio: 'inherit' }).once('close', cb); }; module.exports = { getProtractorDir: getProtractorDir, getProtractorCli: getProtractorCli, protractor: protractor, webdriver_standalone: webdriverStandalone, webdriver_update: wdUpdate, webdriver_update_specific: webdriverUpdateSpecific };
mit
MDE4CPP/MDE4CPP
src/common/umlReflection/src_gen/umlReflectionExec/InstanceSpecificationObject.cpp
38758
#include "umlReflectionExec/InstanceSpecificationObject.hpp" //General Includes #include "abstractDataTypes/SubsetUnion.hpp" #include "uml/InstanceSpecification.hpp" #include "umlReflection/UMLPackage.hpp" #include "fUML/Semantics/Loci/Locus.hpp" #include "uml/Class.hpp" //Includes From Composite Structures /*Not done for metamodel object classes*/ //Execution Engine Includes #include "abstractDataTypes/Any.hpp" #include "PSCS/Semantics/StructuredClassifiers/StructuredClassifiersFactory.hpp" #include "PSCS/Semantics/StructuredClassifiers/CS_Reference.hpp" #include "fUML/Semantics/SimpleClassifiers/SimpleClassifiersFactory.hpp" #include "fUML/Semantics/Values/Value.hpp" #include "fUML/Semantics/SimpleClassifiers/FeatureValue.hpp" #include "PSCS/Semantics/StructuredClassifiers/CS_Link.hpp" #include "PSCS/Semantics/StructuredClassifiers/CS_InteractionPoint.hpp" #include "fUML/Semantics/CommonBehavior/Execution.hpp" #include "fUML/Semantics/CommonBehavior/CommonBehaviorFactory.hpp" #include "fUML/Semantics/Loci/ExecutionFactory.hpp" #include "fUML/Semantics/Loci/ChoiceStrategy.hpp" //UML Includes #include "uml/umlPackage.hpp" #include "uml/Association.hpp" #include "uml/Connector.hpp" #include "uml/ConnectorEnd.hpp" #include "uml/Operation.hpp" #include "uml/Property.hpp" #include "uml/Port.hpp" //Property Includes #include "uml/PackageableElement.hpp" #include "umlReflectionExec/PackageableElementObject.hpp" #include "uml/Deployment.hpp" #include "umlReflectionExec/DeploymentObject.hpp" #include "uml/Comment.hpp" #include "umlReflectionExec/CommentObject.hpp" #include "uml/Element.hpp" #include "umlReflectionExec/ElementObject.hpp" #include "uml/Element.hpp" #include "umlReflectionExec/ElementObject.hpp" #include "uml/Classifier.hpp" #include "umlReflectionExec/ClassifierObject.hpp" #include "uml/Slot.hpp" #include "umlReflectionExec/SlotObject.hpp" #include "uml/ValueSpecification.hpp" #include "umlReflectionExec/ValueSpecificationObject.hpp" #include "uml/Dependency.hpp" #include "umlReflectionExec/DependencyObject.hpp" #include "fUML/Semantics/SimpleClassifiers/StringValue.hpp" #include "uml/StringExpression.hpp" #include "umlReflectionExec/StringExpressionObject.hpp" #include "uml/Namespace.hpp" #include "umlReflectionExec/NamespaceObject.hpp" #include "fUML/Semantics/SimpleClassifiers/StringValue.hpp" #include "fUML/Semantics/SimpleClassifiers/EnumerationValue.hpp" #include "uml/VisibilityKind.hpp" #include "fUML/Semantics/SimpleClassifiers/EnumerationValue.hpp" #include "uml/VisibilityKind.hpp" #include "uml/TemplateParameter.hpp" #include "umlReflectionExec/TemplateParameterObject.hpp" #include "uml/TemplateParameter.hpp" #include "umlReflectionExec/TemplateParameterObject.hpp" //Property Packages Includes #include "primitivetypesReflection/PrimitiveTypesPackage.hpp" using namespace UML; InstanceSpecificationObject::InstanceSpecificationObject(std::shared_ptr<uml::InstanceSpecification> _element): m_InstanceSpecificationValue(_element) { this->getTypes()->insert(this->getTypes()->begin(), UML::UMLPackage::eInstance()->get_UML_InstanceSpecification()); } InstanceSpecificationObject::InstanceSpecificationObject(InstanceSpecificationObject &obj): CS_ObjectImpl(obj) { } InstanceSpecificationObject::InstanceSpecificationObject() { this->getTypes()->insert(this->getTypes()->begin(), UML::UMLPackage::eInstance()->get_UML_InstanceSpecification()); } InstanceSpecificationObject::~InstanceSpecificationObject() { } std::shared_ptr<ecore::EObject> InstanceSpecificationObject::copy() { std::shared_ptr<InstanceSpecificationObject> element(new InstanceSpecificationObject(*this)); element->setThisInstanceSpecificationObjectPtr(element); return element; } void InstanceSpecificationObject::destroy() { m_InstanceSpecificationValue.reset(); fUML::Semantics::StructuredClassifiers::ObjectImpl::destroy(); } std::shared_ptr<uml::Element> InstanceSpecificationObject::getUmlValue() const { return getInstanceSpecificationValue(); } std::shared_ptr<uml::InstanceSpecification> InstanceSpecificationObject::getInstanceSpecificationValue() const { return m_InstanceSpecificationValue; } void InstanceSpecificationObject::setUmlValue(std::shared_ptr<uml::Element> _element) { setInstanceSpecificationValue(std::dynamic_pointer_cast<uml::InstanceSpecification>(_element)); } void InstanceSpecificationObject::setInstanceSpecificationValue(std::shared_ptr<uml::InstanceSpecification> _InstanceSpecificationElement) { m_InstanceSpecificationValue = _InstanceSpecificationElement; //set super type values UML::DeployedArtifactObject::setDeployedArtifactValue(_InstanceSpecificationElement); UML::DeploymentTargetObject::setDeploymentTargetValue(_InstanceSpecificationElement); UML::PackageableElementObject::setPackageableElementValue(_InstanceSpecificationElement); } void InstanceSpecificationObject::setThisInstanceSpecificationObjectPtr(std::weak_ptr<InstanceSpecificationObject> thisObjectPtr) { setThisCS_ObjectPtr(thisObjectPtr); } bool InstanceSpecificationObject::equals(std::shared_ptr<fUML::Semantics::Values::Value> otherValue) { bool isEqual = false; std::shared_ptr<InstanceSpecificationObject> otherInstanceSpecificationObject = std::dynamic_pointer_cast<InstanceSpecificationObject>(otherValue); if(otherInstanceSpecificationObject != nullptr) { if(this->getInstanceSpecificationValue() == otherInstanceSpecificationObject->getInstanceSpecificationValue()) { isEqual = true; } } return isEqual; } std::string InstanceSpecificationObject::toString() { std::string buffer = "Instance of 'InstanceSpecificationObject', " + std::to_string(getTypes()->size()) + " types ("; for(unsigned int i = 0; i < getTypes()->size(); ++i) { buffer += "type{" + std::to_string(i) + "}: '" + getTypes()->at(i)->getName() + "', "; } buffer +=")"; return buffer; } std::shared_ptr<Bag<PSCS::Semantics::StructuredClassifiers::CS_Object>> InstanceSpecificationObject::getDirectContainers() { std::shared_ptr<Bag<PSCS::Semantics::StructuredClassifiers::CS_Object>> directContainers(new Bag<PSCS::Semantics::StructuredClassifiers::CS_Object>()); /*Not done for metamodel object classes*/ return directContainers; } std::shared_ptr<Bag<PSCS::Semantics::StructuredClassifiers::CS_Link>> InstanceSpecificationObject::getLinks(std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_InteractionPoint> interactionPoint) { std::shared_ptr<Bag<PSCS::Semantics::StructuredClassifiers::CS_Link>> allLinks(new Bag<PSCS::Semantics::StructuredClassifiers::CS_Link>()); /*Not done for metamodel object classes*/ return allLinks; } std::shared_ptr<Bag<fUML::Semantics::Values::Value>> InstanceSpecificationObject::retrieveEndValueAsInteractionPoint(std::shared_ptr<fUML::Semantics::Values::Value> endValue, std::shared_ptr<uml::ConnectorEnd> end) { /*Not done for metamodel object classes*/ return nullptr; } void InstanceSpecificationObject::removeValue(std::shared_ptr<uml::StructuralFeature> feature, std::shared_ptr<fUML::Semantics::Values::Value> value) { if (feature->getMetaElementID() != uml::umlPackage::PROPERTY_CLASS && feature->getMetaElementID() != uml::umlPackage::PORT_CLASS && feature->getMetaElementID() != uml::umlPackage::EXTENSIONEND_CLASS) { std::cerr << __PRETTY_FUNCTION__ << ": feature is null or not kind of uml::Property" << std::endl; throw "feature is null or not kind of uml::Property"; } if (m_InstanceSpecificationValue == nullptr) { std::cerr << __PRETTY_FUNCTION__ << ": no value stored inside InstanceSpecificationObject (property: " << feature->getName() << ")" << std::endl; throw "NullPointerException"; } if (feature == UML::UMLPackage::eInstance()->get_UML_DeploymentTarget_deployment()) { if (value == nullptr) // clear mode { m_InstanceSpecificationValue->getDeployment()->clear(); } else { /* Should use PSCS::CS_Reference but dynamic_pointer_cast fails --> using fUML::Reference instead std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(value); */ std::shared_ptr<fUML::Semantics::StructuredClassifiers::Reference> reference = std::dynamic_pointer_cast<fUML::Semantics::StructuredClassifiers::Reference>(value); std::shared_ptr<UML::DeploymentObject> inputValue = std::dynamic_pointer_cast<UML::DeploymentObject>(reference->getReferent()); if (inputValue != nullptr) { m_InstanceSpecificationValue->getDeployment()->erase(inputValue->getDeploymentValue()); } } } if (feature == UML::UMLPackage::eInstance()->get_UML_Element_ownedComment()) { if (value == nullptr) // clear mode { m_InstanceSpecificationValue->getOwnedComment()->clear(); } else { /* Should use PSCS::CS_Reference but dynamic_pointer_cast fails --> using fUML::Reference instead std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(value); */ std::shared_ptr<fUML::Semantics::StructuredClassifiers::Reference> reference = std::dynamic_pointer_cast<fUML::Semantics::StructuredClassifiers::Reference>(value); std::shared_ptr<UML::CommentObject> inputValue = std::dynamic_pointer_cast<UML::CommentObject>(reference->getReferent()); if (inputValue != nullptr) { m_InstanceSpecificationValue->getOwnedComment()->erase(inputValue->getCommentValue()); } } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_classifier()) { if (value == nullptr) // clear mode { m_InstanceSpecificationValue->getClassifier()->clear(); } else { /* Should use PSCS::CS_Reference but dynamic_pointer_cast fails --> using fUML::Reference instead std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(value); */ std::shared_ptr<fUML::Semantics::StructuredClassifiers::Reference> reference = std::dynamic_pointer_cast<fUML::Semantics::StructuredClassifiers::Reference>(value); std::shared_ptr<UML::ClassifierObject> inputValue = std::dynamic_pointer_cast<UML::ClassifierObject>(reference->getReferent()); if (inputValue != nullptr) { m_InstanceSpecificationValue->getClassifier()->erase(inputValue->getClassifierValue()); } } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_slot()) { if (value == nullptr) // clear mode { m_InstanceSpecificationValue->getSlot()->clear(); } else { /* Should use PSCS::CS_Reference but dynamic_pointer_cast fails --> using fUML::Reference instead std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(value); */ std::shared_ptr<fUML::Semantics::StructuredClassifiers::Reference> reference = std::dynamic_pointer_cast<fUML::Semantics::StructuredClassifiers::Reference>(value); std::shared_ptr<UML::SlotObject> inputValue = std::dynamic_pointer_cast<UML::SlotObject>(reference->getReferent()); if (inputValue != nullptr) { m_InstanceSpecificationValue->getSlot()->erase(inputValue->getSlotValue()); } } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_specification()) { m_InstanceSpecificationValue->getSpecification().reset(); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_name()) { // no default value defined, clear not realized } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_nameExpression()) { m_InstanceSpecificationValue->getNameExpression().reset(); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_visibility()) { // no default value defined, clear not realized } if (feature == UML::UMLPackage::eInstance()->get_UML_PackageableElement_visibility()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PUBLIC /*defined default value*/); } if (feature == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_owningTemplateParameter()) { m_InstanceSpecificationValue->getOwningTemplateParameter().reset(); } if (feature == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_templateParameter()) { m_InstanceSpecificationValue->getTemplateParameter().reset(); } } std::shared_ptr<Bag<fUML::Semantics::Values::Value>> InstanceSpecificationObject::getValues(std::shared_ptr<uml::StructuralFeature> feature, std::shared_ptr<Bag<fUML::Semantics::SimpleClassifiers::FeatureValue>> featureValues) { if (feature->getMetaElementID() != uml::umlPackage::PROPERTY_CLASS && feature->getMetaElementID() != uml::umlPackage::PORT_CLASS && feature->getMetaElementID() != uml::umlPackage::EXTENSIONEND_CLASS) { std::cerr << __PRETTY_FUNCTION__ << ": feature is null or not kind of uml::Property" << std::endl; throw "feature is null or not kind of uml::Property"; } if (m_InstanceSpecificationValue == nullptr) { std::cerr << __PRETTY_FUNCTION__ << ": no value stored inside InstanceSpecificationObject (property: " << feature->getName() << ")" << std::endl; throw "NullPointerException"; } std::shared_ptr<Bag<fUML::Semantics::Values::Value>> values(new Bag<fUML::Semantics::Values::Value>()); if (feature == UML::UMLPackage::eInstance()->get_UML_DeploymentTarget_deployedElement()) { std::shared_ptr<Bag<uml::PackageableElement>> deployedElementList = m_InstanceSpecificationValue->getDeployedElement(); Bag<uml::PackageableElement>::iterator iter = deployedElementList->begin(); Bag<uml::PackageableElement>::iterator end = deployedElementList->end(); while (iter != end) { std::shared_ptr<UML::PackageableElementObject> value(new UML::PackageableElementObject()); value->setThisPackageableElementObjectPtr(value); value->setLocus(this->getLocus()); value->setPackageableElementValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_DeploymentTarget_deployment()) { std::shared_ptr<Bag<uml::Deployment>> deploymentList = m_InstanceSpecificationValue->getDeployment(); Bag<uml::Deployment>::iterator iter = deploymentList->begin(); Bag<uml::Deployment>::iterator end = deploymentList->end(); while (iter != end) { std::shared_ptr<UML::DeploymentObject> value(new UML::DeploymentObject()); value->setThisDeploymentObjectPtr(value); value->setLocus(this->getLocus()); value->setDeploymentValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); reference->setCompositeReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_Element_ownedComment()) { std::shared_ptr<Bag<uml::Comment>> ownedCommentList = m_InstanceSpecificationValue->getOwnedComment(); Bag<uml::Comment>::iterator iter = ownedCommentList->begin(); Bag<uml::Comment>::iterator end = ownedCommentList->end(); while (iter != end) { std::shared_ptr<UML::CommentObject> value(new UML::CommentObject()); value->setThisCommentObjectPtr(value); value->setLocus(this->getLocus()); value->setCommentValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); reference->setCompositeReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_Element_ownedElement()) { std::shared_ptr<Bag<uml::Element>> ownedElementList = m_InstanceSpecificationValue->getOwnedElement(); Bag<uml::Element>::iterator iter = ownedElementList->begin(); Bag<uml::Element>::iterator end = ownedElementList->end(); while (iter != end) { std::shared_ptr<UML::ElementObject> value(new UML::ElementObject()); value->setThisElementObjectPtr(value); value->setLocus(this->getLocus()); value->setElementValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); reference->setCompositeReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_Element_owner()) { std::shared_ptr<UML::ElementObject> value(new UML::ElementObject()); value->setThisElementObjectPtr(value); value->setLocus(this->getLocus()); value->setElementValue(m_InstanceSpecificationValue->getOwner().lock()); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_classifier()) { std::shared_ptr<Bag<uml::Classifier>> classifierList = m_InstanceSpecificationValue->getClassifier(); Bag<uml::Classifier>::iterator iter = classifierList->begin(); Bag<uml::Classifier>::iterator end = classifierList->end(); while (iter != end) { std::shared_ptr<UML::ClassifierObject> value(new UML::ClassifierObject()); value->setThisClassifierObjectPtr(value); value->setLocus(this->getLocus()); value->setClassifierValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_slot()) { std::shared_ptr<Bag<uml::Slot>> slotList = m_InstanceSpecificationValue->getSlot(); Bag<uml::Slot>::iterator iter = slotList->begin(); Bag<uml::Slot>::iterator end = slotList->end(); while (iter != end) { std::shared_ptr<UML::SlotObject> value(new UML::SlotObject()); value->setThisSlotObjectPtr(value); value->setLocus(this->getLocus()); value->setSlotValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); reference->setCompositeReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_specification()) { std::shared_ptr<UML::ValueSpecificationObject> value(new UML::ValueSpecificationObject()); value->setThisValueSpecificationObjectPtr(value); value->setLocus(this->getLocus()); value->setValueSpecificationValue(m_InstanceSpecificationValue->getSpecification()); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); reference->setCompositeReferent(value); values->add(reference); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_clientDependency()) { std::shared_ptr<Bag<uml::Dependency>> clientDependencyList = m_InstanceSpecificationValue->getClientDependency(); Bag<uml::Dependency>::iterator iter = clientDependencyList->begin(); Bag<uml::Dependency>::iterator end = clientDependencyList->end(); while (iter != end) { std::shared_ptr<UML::DependencyObject> value(new UML::DependencyObject()); value->setThisDependencyObjectPtr(value); value->setLocus(this->getLocus()); value->setDependencyValue(*iter); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_name()) { std::shared_ptr<fUML::Semantics::SimpleClassifiers::StringValue> value = fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance()->createStringValue(); value->setValue(m_InstanceSpecificationValue->getName()); values->add(value); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_nameExpression()) { std::shared_ptr<UML::StringExpressionObject> value(new UML::StringExpressionObject()); value->setThisStringExpressionObjectPtr(value); value->setLocus(this->getLocus()); value->setStringExpressionValue(m_InstanceSpecificationValue->getNameExpression()); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); reference->setCompositeReferent(value); values->add(reference); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_namespace()) { std::shared_ptr<UML::NamespaceObject> value(new UML::NamespaceObject()); value->setThisNamespaceObjectPtr(value); value->setLocus(this->getLocus()); value->setNamespaceValue(m_InstanceSpecificationValue->getNamespace().lock()); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_qualifiedName()) { std::shared_ptr<fUML::Semantics::SimpleClassifiers::StringValue> value = fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance()->createStringValue(); value->setValue(m_InstanceSpecificationValue->getQualifiedName()); values->add(value); } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_visibility()) { uml::VisibilityKind visibility = m_InstanceSpecificationValue->getVisibility(); std::shared_ptr<fUML::Semantics::SimpleClassifiers::EnumerationValue> value = fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance()->createEnumerationValue(); if (visibility == uml::VisibilityKind::PUBLIC) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_public()); } if (visibility == uml::VisibilityKind::PRIVATE) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_private()); } if (visibility == uml::VisibilityKind::PROTECTED) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_protected()); } if (visibility == uml::VisibilityKind::PACKAGE) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_package()); } values->add(value); } if (feature == UML::UMLPackage::eInstance()->get_UML_PackageableElement_visibility()) { uml::VisibilityKind visibility = m_InstanceSpecificationValue->getVisibility(); std::shared_ptr<fUML::Semantics::SimpleClassifiers::EnumerationValue> value = fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance()->createEnumerationValue(); if (visibility == uml::VisibilityKind::PUBLIC) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_public()); } if (visibility == uml::VisibilityKind::PRIVATE) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_private()); } if (visibility == uml::VisibilityKind::PROTECTED) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_protected()); } if (visibility == uml::VisibilityKind::PACKAGE) { value->setLiteral(UML::UMLPackage::eInstance()->get_UML_VisibilityKind_package()); } values->add(value); } if (feature == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_owningTemplateParameter()) { std::shared_ptr<UML::TemplateParameterObject> value(new UML::TemplateParameterObject()); value->setThisTemplateParameterObjectPtr(value); value->setLocus(this->getLocus()); value->setTemplateParameterValue(m_InstanceSpecificationValue->getOwningTemplateParameter().lock()); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); } if (feature == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_templateParameter()) { std::shared_ptr<UML::TemplateParameterObject> value(new UML::TemplateParameterObject()); value->setThisTemplateParameterObjectPtr(value); value->setLocus(this->getLocus()); value->setTemplateParameterValue(m_InstanceSpecificationValue->getTemplateParameter()); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = PSCS::Semantics::StructuredClassifiers::StructuredClassifiersFactory::eInstance()->createCS_Reference(); reference->setReferent(value); values->add(reference); } return values; } std::shared_ptr<fUML::Semantics::SimpleClassifiers::FeatureValue> InstanceSpecificationObject::retrieveFeatureValue(std::shared_ptr<uml::StructuralFeature> feature) { std::shared_ptr<fUML::Semantics::SimpleClassifiers::FeatureValue> featureValue(fUML::Semantics::SimpleClassifiers::SimpleClassifiersFactory::eInstance()->createFeatureValue()); featureValue->setFeature(feature); std::shared_ptr<Bag<fUML::Semantics::SimpleClassifiers::FeatureValue>> featureValues(new Bag<fUML::Semantics::SimpleClassifiers::FeatureValue>()); std::shared_ptr<Bag<fUML::Semantics::Values::Value>> values = this->getValues(feature, featureValues); unsigned int valuesSize = values->size(); for(unsigned int i = 0; i < valuesSize; i++) { featureValue->getValues()->add(values->at(i)); } return featureValue; } void InstanceSpecificationObject::setFeatureValue(std::shared_ptr<uml::StructuralFeature> feature, std::shared_ptr<Bag<fUML::Semantics::Values::Value>> values, int position) { if (feature->getMetaElementID() != uml::umlPackage::PROPERTY_CLASS && feature->getMetaElementID() != uml::umlPackage::PORT_CLASS && feature->getMetaElementID() != uml::umlPackage::EXTENSIONEND_CLASS) { std::cerr << __PRETTY_FUNCTION__ << ": feature is null or not kind of uml::Property" << std::endl; throw "feature is null or not kind of uml::Property"; } if (m_InstanceSpecificationValue == nullptr) { std::cerr << __PRETTY_FUNCTION__ << ": no value stored inside InstanceSpecificationObject (property: " << feature->getName() << ")" << std::endl; throw "NullPointerException"; } if (values->size() == 0) { std::cout << __PRETTY_FUNCTION__ << ": no input value given" << std::endl; return; } if (feature == UML::UMLPackage::eInstance()->get_UML_DeploymentTarget_deployment()) { Bag<fUML::Semantics::Values::Value>::iterator iter = values->begin(); Bag<fUML::Semantics::Values::Value>::iterator end = values->end(); m_InstanceSpecificationValue->getDeployment()->clear(); while (iter != end) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = *iter; std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::DeploymentObject> value = std::dynamic_pointer_cast<UML::DeploymentObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->getDeployment()->push_back(value->getDeploymentValue()); } iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_Element_ownedComment()) { Bag<fUML::Semantics::Values::Value>::iterator iter = values->begin(); Bag<fUML::Semantics::Values::Value>::iterator end = values->end(); m_InstanceSpecificationValue->getOwnedComment()->clear(); while (iter != end) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = *iter; std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::CommentObject> value = std::dynamic_pointer_cast<UML::CommentObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->getOwnedComment()->push_back(value->getCommentValue()); } iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_classifier()) { Bag<fUML::Semantics::Values::Value>::iterator iter = values->begin(); Bag<fUML::Semantics::Values::Value>::iterator end = values->end(); m_InstanceSpecificationValue->getClassifier()->clear(); while (iter != end) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = *iter; std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::ClassifierObject> value = std::dynamic_pointer_cast<UML::ClassifierObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->getClassifier()->push_back(value->getClassifierValue()); } iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_slot()) { Bag<fUML::Semantics::Values::Value>::iterator iter = values->begin(); Bag<fUML::Semantics::Values::Value>::iterator end = values->end(); m_InstanceSpecificationValue->getSlot()->clear(); while (iter != end) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = *iter; std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::SlotObject> value = std::dynamic_pointer_cast<UML::SlotObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->getSlot()->push_back(value->getSlotValue()); } iter++; } } if (feature == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_specification()) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = values->at(0); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::ValueSpecificationObject> value = std::dynamic_pointer_cast<UML::ValueSpecificationObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->setSpecification(value->getValueSpecificationValue()); } } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_name()) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = values->at(0); std::shared_ptr<fUML::Semantics::SimpleClassifiers::StringValue> valueObject = std::dynamic_pointer_cast<fUML::Semantics::SimpleClassifiers::StringValue>(inputValue); if (valueObject != nullptr) { m_InstanceSpecificationValue->setName(valueObject->getValue()); } } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_nameExpression()) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = values->at(0); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::StringExpressionObject> value = std::dynamic_pointer_cast<UML::StringExpressionObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->setNameExpression(value->getStringExpressionValue()); } } if (feature == UML::UMLPackage::eInstance()->get_UML_NamedElement_visibility()) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = values->at(0); std::shared_ptr<fUML::Semantics::SimpleClassifiers::EnumerationValue> enumValue = std::dynamic_pointer_cast<fUML::Semantics::SimpleClassifiers::EnumerationValue>(inputValue); std::shared_ptr<uml::EnumerationLiteral> literal = enumValue->getLiteral(); if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_public()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PUBLIC); } if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_private()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PRIVATE); } if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_protected()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PROTECTED); } if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_package()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PACKAGE); } } if (feature == UML::UMLPackage::eInstance()->get_UML_PackageableElement_visibility()) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = values->at(0); std::shared_ptr<fUML::Semantics::SimpleClassifiers::EnumerationValue> enumValue = std::dynamic_pointer_cast<fUML::Semantics::SimpleClassifiers::EnumerationValue>(inputValue); std::shared_ptr<uml::EnumerationLiteral> literal = enumValue->getLiteral(); if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_public()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PUBLIC); } if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_private()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PRIVATE); } if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_protected()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PROTECTED); } if (literal == UML::UMLPackage::eInstance()->get_UML_VisibilityKind_package()) { m_InstanceSpecificationValue->setVisibility(uml::VisibilityKind::PACKAGE); } } if (feature == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_templateParameter()) { std::shared_ptr<fUML::Semantics::Values::Value> inputValue = values->at(0); std::shared_ptr<PSCS::Semantics::StructuredClassifiers::CS_Reference> reference = std::dynamic_pointer_cast<PSCS::Semantics::StructuredClassifiers::CS_Reference>(inputValue); std::shared_ptr<UML::TemplateParameterObject> value = std::dynamic_pointer_cast<UML::TemplateParameterObject>(reference->getReferent()); if (value != nullptr) { m_InstanceSpecificationValue->setTemplateParameter(value->getTemplateParameterValue()); } } } void InstanceSpecificationObject::assignFeatureValue(std::shared_ptr<uml::StructuralFeature> feature, std::shared_ptr<Bag<fUML::Semantics::Values::Value>> values, int position) { this->setFeatureValue(feature, values, position); } std::shared_ptr<Bag<fUML::Semantics::SimpleClassifiers::FeatureValue>> InstanceSpecificationObject::retrieveFeatureValues() { std::shared_ptr<uml::Classifier> type = this->getTypes()->at(0); std::shared_ptr<Bag<uml::Property>> allAttributes = type->getAllAttributes(); std::shared_ptr<Bag<fUML::Semantics::SimpleClassifiers::FeatureValue>> featureValues(new Bag<fUML::Semantics::SimpleClassifiers::FeatureValue>()); unsigned int allAttributesSize = allAttributes->size(); for(unsigned int i = 0; i < allAttributesSize; i++) { std::shared_ptr<uml::Property> property = allAttributes->at(i); if (property == UML::UMLPackage::eInstance()->get_UML_DeploymentTarget_deployedElement() && m_InstanceSpecificationValue->getDeployedElement() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_DeploymentTarget_deployment() && m_InstanceSpecificationValue->getDeployment() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_Element_ownedComment() && m_InstanceSpecificationValue->getOwnedComment() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_Element_ownedElement() && m_InstanceSpecificationValue->getOwnedElement() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_Element_owner() && m_InstanceSpecificationValue->getOwner().lock() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_classifier() && m_InstanceSpecificationValue->getClassifier() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_slot() && m_InstanceSpecificationValue->getSlot() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_InstanceSpecification_specification() && m_InstanceSpecificationValue->getSpecification() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_NamedElement_clientDependency() && m_InstanceSpecificationValue->getClientDependency() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_NamedElement_nameExpression() && m_InstanceSpecificationValue->getNameExpression() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_NamedElement_namespace() && m_InstanceSpecificationValue->getNamespace().lock() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_owningTemplateParameter() && m_InstanceSpecificationValue->getOwningTemplateParameter().lock() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } if (property == UML::UMLPackage::eInstance()->get_UML_ParameterableElement_templateParameter() && m_InstanceSpecificationValue->getTemplateParameter() != nullptr) { featureValues->add(this->retrieveFeatureValue(property)); } } return featureValues; }
mit
ehopealot/datastores-coloredboxes
ColoredBoxApp.js
1296
var DROPBOX_APP_KEY = '<YOUR APP KEY>'; function ColoredBox($el, record) { this.$square = $('.color-box', $el); this.$textbox = $('input', $el); this.record = record; this.update(); this.$textbox.on('focusout', this.changed.bind(this)); } ColoredBox.prototype.changed = function() { this.record.set('color', this.$textbox.val()); }; ColoredBox.prototype.update = function() { var color = this.record.get('color'); this.$textbox.val(color); return this.$square.css('background', color); }; $(function() { var client = new Dropbox.Client({ key: DROPBOX_APP_KEY }); client.authenticate(function(error) { if (error) { alert('Authentication error: ' + error ); } client.getDatastoreManager().openDefaultDatastore(function(error, datastore) { var colored_boxes = []; var $elements = $('ul.color-boxes li'); var table = datastore.getTable('colors'); var records = table.query(); $elements.each(function(i, $el) { var record = table.getOrInsert('record'+i, {order: i, color: '#000000'}); colored_boxes.push(new ColoredBox($el, record)); }); datastore.recordsChanged.addListener(function(event) { event.affectedRecordsForTable('colors').forEach(function(record) { return colored_boxes[record.get('order')].update(); }); }); }); }); });
mit
robo-coin/robocoin-wallet-source
src/qt/paymentserver.cpp
4505
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <QApplication> #include "paymentserver.h" #include "guiconstants.h" #include "ui_interface.h" #include "util.h" #include <QByteArray> #include <QDataStream> #include <QDebug> #include <QFileOpenEvent> #include <QHash> #include <QLocalServer> #include <QLocalSocket> #include <QStringList> #if QT_VERSION < 0x050000 #include <QUrl> #endif using namespace boost; const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds const QString BITCOIN_IPC_PREFIX("robocoin:"); // // Create a name that is unique for: // testnet / non-testnet // data directory // static QString ipcServerName() { QString name("BitcoinQt"); // Append a simple hash of the datadir // Note that GetDataDir(true) returns a different path // for -testnet versus main net QString ddir(GetDataDir(true).string().c_str()); name.append(QString::number(qHash(ddir))); return name; } // // This stores payment requests received before // the main GUI window is up and ready to ask the user // to send payment. // static QStringList savedPaymentRequests; // // Sending to the server is done synchronously, at startup. // If the server isn't already running, startup continues, // and the items in savedPaymentRequest will be handled // when uiReady() is called. // bool PaymentServer::ipcSendCommandLine() { bool fResult = false; const QStringList& args = qApp->arguments(); for (int i = 1; i < args.size(); i++) { if (!args[i].startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) continue; savedPaymentRequests.append(args[i]); } foreach (const QString& arg, savedPaymentRequests) { QLocalSocket* socket = new QLocalSocket(); socket->connectToServer(ipcServerName(), QIODevice::WriteOnly); if (!socket->waitForConnected(BITCOIN_IPC_CONNECT_TIMEOUT)) return false; QByteArray block; QDataStream out(&block, QIODevice::WriteOnly); out.setVersion(QDataStream::Qt_4_0); out << arg; out.device()->seek(0); socket->write(block); socket->flush(); socket->waitForBytesWritten(BITCOIN_IPC_CONNECT_TIMEOUT); socket->disconnectFromServer(); delete socket; fResult = true; } return fResult; } PaymentServer::PaymentServer(QApplication* parent) : QObject(parent), saveURIs(true) { // Install global event filter to catch QFileOpenEvents on the mac (sent when you click bitcoin: links) parent->installEventFilter(this); QString name = ipcServerName(); // Clean up old socket leftover from a crash: QLocalServer::removeServer(name); uriServer = new QLocalServer(this); if (!uriServer->listen(name)) qDebug() << tr("Cannot start robocoin: click-to-pay handler"); else connect(uriServer, SIGNAL(newConnection()), this, SLOT(handleURIConnection())); } bool PaymentServer::eventFilter(QObject *object, QEvent *event) { // clicking on bitcoin: URLs creates FileOpen events on the Mac: if (event->type() == QEvent::FileOpen) { QFileOpenEvent* fileEvent = static_cast<QFileOpenEvent*>(event); if (!fileEvent->url().isEmpty()) { if (saveURIs) // Before main window is ready: savedPaymentRequests.append(fileEvent->url().toString()); else emit receivedURI(fileEvent->url().toString()); return true; } } return false; } void PaymentServer::uiReady() { saveURIs = false; foreach (const QString& s, savedPaymentRequests) emit receivedURI(s); savedPaymentRequests.clear(); } void PaymentServer::handleURIConnection() { QLocalSocket *clientConnection = uriServer->nextPendingConnection(); while (clientConnection->bytesAvailable() < (int)sizeof(quint32)) clientConnection->waitForReadyRead(); connect(clientConnection, SIGNAL(disconnected()), clientConnection, SLOT(deleteLater())); QDataStream in(clientConnection); in.setVersion(QDataStream::Qt_4_0); if (clientConnection->bytesAvailable() < (int)sizeof(quint16)) { return; } QString message; in >> message; if (saveURIs) savedPaymentRequests.append(message); else emit receivedURI(message); }
mit
dwslab/RoCA
src/main/java/de/dwslab/risk/gui/exception/RoCAException.java
368
package de.dwslab.risk.gui.exception; public class RoCAException extends RuntimeException { /** */ private static final long serialVersionUID = -6069816604710951328L; public RoCAException(String message) { super(message); } public RoCAException(String message, Throwable cause) { super(message, cause); } }
mit
Mysh3ll/Pharma
app/src/main/java/fr/btssio/pharma/orm/runtime/util/handlers/IntegerResultSetHandler.java
710
package fr.btssio.pharma.orm.runtime.util.handlers; import android.database.Cursor; import android.database.SQLException; import fr.btssio.pharma.orm.runtime.util.ResultSetHandler; import java.util.LinkedList; import java.util.List; /** * Converts first column of every row in cursor into List<Integer>. */ public class IntegerResultSetHandler implements ResultSetHandler<Integer> { @Override public List<Integer> getObjects(Cursor cursor) throws SQLException { List<Integer> ret = new LinkedList<Integer>(); cursor.moveToFirst(); while (!cursor.isAfterLast()) { ret.add(cursor.getInt(0)); cursor.moveToNext(); } return ret; } }
mit