Location: PHPKode > scripts > Genghis > genghis-1.2.0/genghis-1.2.0/genghis.php
<?php

/**
 * Genghis v1.2.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
class Api extends App { const ROUTE_PATTERN = '~^/?servers(?:/(?P<server>[^/]+)(?P<databases>/databases(?:/(?P<database>[^/]+)(?P<collections>/collections(?:/(?P<collection>[^/]+)(?P<documents>/documents(?:/(?P<document>[^/]+))?)?)?)?)?)?)?/?$~'; const CONVERT_JSON_ROUTE = '~/?convert-json/?$~'; const CHECK_STATUS_ROUTE = '~/?check-status/?$~'; const PAGE_LIMIT = 50; protected $servers; public function run() { try { return parent::run(); } catch (HttpException $e) { $msg = $e->getMessage() ? $e->getMessage() : Response::getStatusText($e->getStatus()); $response = new JsonResponse(array('error' => $msg), $e->getStatus()); $response->render(); } } public function route($method, $path) { if (preg_match(self::CHECK_STATUS_ROUTE, $path)) { return $this->checkStatus(); } if (preg_match(self::CONVERT_JSON_ROUTE, $path)) { $decoder = new JsonDecoder(); return new JsonResponse($decoder->decode(file_get_contents('php://input'))); } $p = array(); if (preg_match(self::ROUTE_PATTERN, $path, $p)) { foreach ($p as $i => $val) { if (is_numeric($i) || empty($val)) { unset($p[$i]); } } if (isset($p['documents'])) { if (isset($p['document'])) { switch ($method) { case 'GET': return $this->findDocument($p['server'], $p['database'], $p['collection'], $p['document']); case 'PUT': return $this->updateDocument($p['server'], $p['database'], $p['collection'], $p['document'], $this->getRequestData()); case 'DELETE': return $this->removeDocument($p['server'], $p['database'], $p['collection'], $p['document']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->findDocuments( $p['server'], $p['database'], $p['collection'], (string) $this->getQueryParam('q', ''), (int) $this->getQueryParam('page', 1) ); case 'POST': return $this->insertDocument($p['server'], $p['database'], $p['collection'], $this->getRequestData()); case 'DELETE': return $this->truncateCollection($p['server'], $p['database'], $p['collection']); default: throw new HttpException(405); } } } elseif (isset($p['collections'])) { if (isset($p['collection'])) { switch ($method) { case 'GET': return $this->selectCollection($p['server'], $p['database'], $p['collection']); case 'DELETE': return $this->dropCollection($p['server'], $p['database'], $p['collection']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->listCollections($p['server'], $p['database']); case 'POST': return $this->createCollection($p['server'], $p['database'], $this->getRequestData()); default: throw new HttpException(405); } } } elseif (isset($p['databases'])) { if (isset($p['database'])) { switch ($method) { case 'GET': return $this->selectDatabase($p['server'], $p['database']); case 'DELETE': return $this->dropDatabase($p['server'], $p['database']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->listDatabases($p['server']); case 'POST': return $this->createDatabase($p['server'], $this->getRequestData()); default: throw new HttpException(405); } } } else { if (isset($p['server'])) { switch ($method) { case 'GET': return $this->showServer($p['server']); case 'DELETE': return $this->removeServer($p['server']); default: throw new HttpException(405); } } else { switch ($method) { case 'GET': return $this->listServers(); case 'POST': return $this->addServer($this->getRequestData()); default: throw new HttpException(405); } } } } throw new HttpException(404); } protected function checkStatus() { $alerts = array(); if (!class_exists('Mongo', false)) { $alerts[] = array( 'level' => 'error', 'msg' => '<strong>Mongo PHP class not found.</strong> ' . 'Have you installed and enabled the PECL Mongo drivers?', ); } return new JsonResponse(compact('alerts')); } protected function listServers() { $this->initServers(); $servers = array(); foreach (array_keys($this->servers) as $name) { $servers[] = $this->dumpServer($name); } return new JsonResponse($servers); } protected function addServer(array $data) { if (!isset($data['name'])) { throw new HttpException(400, 'Server name must be specified'); } $dsn = $data['name']; if (strpos($dsn, '://') === false) { $dsn = 'mongodb://'.$dsn; } else if (strpos($dsn, 'mongodb://') !== 0) { throw new HttpException(400, 'Malformed server dsn'); } $chunks = parse_url($dsn); if ($chunks === false || isset($chunks['query']) || isset($chunks['fragment']) || !isset($chunks['host'])) { throw new HttpException(400, 'Malformed server dsn'); } $name = $chunks['host']; if (isset($chunks['user'])) { $name = $chunks['user'].'@'.$name; } if (isset($chunks['port']) && $chunks['port'] !== 27017) { $name .= ':'.$chunks['port']; } $this->initServers(); $this->servers[$name] = $dsn; $this->saveServers(); return $this->showServer($name); } protected function removeServer($name) { $this->initServers(); if (isset($this->servers[$name])) { unset($this->servers[$name]); $this->saveServers(); return new JsonResponse(array('success' => true)); } throw new HttpException(404); } protected function showServer($name) { $this->initServers(); if (isset($this->servers[$name])) { return new JsonResponse($this->dumpServer($name)); } else { throw new HttpException(404); } } protected function dumpServer($name) { try { $res = $this->getMongo($name)->listDBs(); $dbs = array_map(function($db) { return $db['name']; }, $res['databases']); return array( 'id' => $name, 'name' => $name, 'size' => $res['totalSize'], 'count' => count($dbs), 'databases' => $dbs, ); } catch (Exception $e) { return array( 'id' => $name, 'name' => $name, 'error' => 'Unable to connect to Mongo server at "'.$name.'".', ); } } protected function initServers() { if (!isset($this->servers)) { if (isset($_COOKIE['genghis_servers']) && $servers = json_decode($_COOKIE['genghis_servers'], true)) { $this->servers = $servers; } else { $this->servers = array('localhost' => 'localhost:27017'); } } } protected function saveServers() { setcookie('genghis_servers', json_encode($this->servers), time()+60*60*24*365, '/'); } protected function dumpDatabase($server, $database) { $dbs = $this->getMongo($server)->listDBs(); foreach ($dbs['databases'] as $db) { if ($db['name'] == $database) { $colls = array(); foreach ($this->getDatabase($server, $database)->listCollections() as $coll) { $colls[] = $coll->getName(); } return array( 'id' => $db['name'], 'name' => $db['name'], 'count' => count($colls), 'collections' => $colls, 'size' => $db['sizeOnDisk'], ); } } } protected function selectDatabase($server, $database) { if ($db = $this->dumpDatabase($server, $database)) { return new JsonResponse($db); } throw new HttpException(404); } protected function dropDatabase($server, $database) { $this->getDatabase($server, $database)->drop(); return new JsonResponse(array('success' => true)); } protected function listDatabases($server) { $dbs = array(); $mongo = $this->getMongo($server); $res = $this->getMongo($server)->listDBs(); foreach ($res['databases'] as $db) { $dbs[] = $this->dumpDatabase($server, $db['name']); } return new JsonResponse($dbs); } protected function createDatabase($server, array $data) { if (!isset($data['name'])) { throw new HttpException(400, 'Database name must be specified'); } $this->getCollection($server, $data['name'], '__genghis_tmp_collection__')->drop(); return $this->selectDatabase($server, $data['name']); } protected function dumpCollection($server, $database, $collection) { foreach ($this->getDatabase($server, $database)->listCollections() as $coll) { if ($coll->getName() == $collection) { return array( 'id' => $coll->getName(), 'name' => $coll->getName(), 'count' => $coll->count(), 'indexes' => $coll->getIndexInfo(), ); } } } public function selectCollection($server, $database, $collection) { if ($coll = $this->dumpCollection($server, $database, $collection)) { return new JsonResponse($coll); } throw new HttpException(404); } public function truncateCollection($server, $database, $collection) { if ($coll = $this->getCollection($server, $database, $collection)) { $coll->remove(array()); return $this->selectCollection($server, $database, $collection); } throw new HttpException(404); } public function dropCollection($server, $database, $collection) { if ($coll = $this->getCollection($server, $database, $collection)) { $coll->drop(); return new JsonResponse(array('success' => true)); } throw new HttpException(404); } public function listCollections($server, $database) { $colls = array(); foreach ($this->getDatabase($server, $database)->listCollections() as $coll) { $colls[] = $this->dumpCollection($server, $database, $coll->getName()); } return new JsonResponse($colls); } public function createCollection($server, $database, array $data = array()) { if (!isset($data['name'])) { throw new HttpException(400, 'Database name must be specified'); } $this->getDatabase($server, $database)->createCollection($data['name']); return $this->selectCollection($server, $database, $data['name']); } public function findDocument($server, $database, $collection, $document) { $doc = $this->getCollection($server, $database, $collection)->findOne(array( '_id' => new MongoId($document), )); if ($doc) { return new JsonResponse($doc); } throw new HttpException(404); } public function updateDocument($server, $database, $collection, $document, array $data) { $coll = $this->getCollection($server, $database, $collection); $query = array('_id' => new MongoId($document)); if ($coll->findOne($query)) { $result = $coll->update($query, $data, array('safe' => true)); if (isset($result['ok']) && $result['ok']) { return $this->findDocument($server, $database, $collection, $document); } else { throw new HttpException(); } } else { throw new HttpException(404); } } public function removeDocument($server, $database, $collection, $document) { $coll = $this->getCollection($server, $database, $collection); $query = array('_id' => new MongoId($document)); if ($coll->findOne($query)) { $result = $coll->remove($query, array('safe' => true)); if (isset($result['ok']) && $result['ok']) { return new JsonResponse(array('success' => true)); } else { throw new HttpException(); } } else { throw new HttpException(404); } } public function findDocuments($server, $database, $collection, $query = null, $page = 1) { $offset = self::PAGE_LIMIT * ($page - 1); $cursor = $this->getCollection($server, $database, $collection) ->find($query ? $this->decodeJson($query) : array()) ->limit(self::PAGE_LIMIT) ->skip($offset); $count = $cursor->count(); return new JsonResponse(array( 'count' => $count, 'page' => $page, 'pages' => max(1, ceil($count / self::PAGE_LIMIT)), 'per_page' => self::PAGE_LIMIT, 'offset' => $offset, 'documents' => array_values(iterator_to_array($cursor)), )); } public function insertDocument($server, $database, $collection, array $data = null) { if (empty($data)) { throw new HttpException(400, 'Malformed document'); } $result = $this->getCollection($server, $database, $collection) ->insert($data, array('safe' => true)); if (isset($result['ok']) && $result['ok']) { return new JsonResponse($data); } else { throw new HttpException(); } } protected function decodeJson($data) { try { $decoder = new JsonDecoder(); return $this->thunkMongoQuery($decoder->decode($data)); } catch (JsonException $e) { throw new HttpException(400, 'Malformed document'); } } protected function thunkMongoQuery(array $query) { foreach ($query as $key => $val) { if (is_array($val)) { if (isset($val['$id']) && count($val) == 1) { $query[$key] = new MongoId($val['$id']); } else if(count($val) == 2 && isset($val['sec']) && isset($val['usec'])) { $query[$key] = new MongoDate($val['sec'], $val['usec']); } else { $query[$key] = $this->thunkMongoQuery($val); } } else if ($val instanceof JsonRegex) { $query[$key] = new MongoRegex($val->pattern); } } return $query; } protected function getRequestData() { return $this->decodeJson(file_get_contents('php://input')); } protected function getMongo($server) { $this->initServers(); if (isset($this->servers[$server])) { return new Mongo($this->servers[$server]); } } protected function getDatabase($server, $database) { return $this->getMongo($server)->selectDB($database); } protected function getCollection($server, $database, $collection) { return $this->getDatabase($server, $database)->selectCollection($collection); } }
class App { protected $assets = array(); protected $assetEtags = array(); protected $baseUrl; public function run() { try { $response = $this->route($this->getRequestMethod(), $this->getRequestPath()); if ($response instanceof Response) { $response->render(); } else { throw new HttpException(500); } } catch (HttpException $e) { $errorResponse = $this->renderTemplate( 'error.html.mustache', $e->getStatus(), array( 'message' => $e->getMessage(), 'status' => $e->getStatus(), ) ); $errorResponse->render(); } } public function route($method, $path) { if ($this->isJsonRequest()) { try { $api = new Api(); return $api->route($method, $path); } catch (HttpException $e) { $msg = $e->getMessage() ? $e->getMessage() : Response::getStatusText($e->getStatus()); return new JsonResponse(array('error' => $msg, 'status' => $e->getStatus()), $e->getStatus()); } } else { if (strpos($path, '/assets/') === 0) { return $this->getAsset(substr($path, 8)); } else { return $this->renderTemplate('index.html.mustache'); } break; } } protected function isJsonRequest() { if (in_array($this->getRequestMethod(), array('POST', 'PUT'))) { $type = isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : 'x-www-form-urlencoded'; } else { $type = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : 'text/html'; } return strpos($type, 'application/json') !== false || strpos($type, 'application/javascript') !== false; } protected function getBaseUrl() { if (!isset($this->baseUrl)) { $this->baseUrl = $this->prepareBaseUrl(); } return $this->baseUrl; } protected function prepareBaseUrl() { $filename = basename($_SERVER['SCRIPT_FILENAME']); foreach (array('SCRIPT_NAME', 'PHP_SELF', 'ORIG_SCRIPT_NAME') as $key) { if (isset($_SERVER[$key]) && basename($_SERVER[$key]) == $filename) { $baseUrl = $_SERVER[$key]; break; } } if (!isset($baseUrl)) { $path = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''; $file = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : ''; $chunks = array_reverse(explode('/', trim($file, '/'))); $index = 0; $last = count($chunks); $baseUrl = ''; do { $seg = $segs[$index]; $baseUrl = '/'.$seg.$baseUrl; ++$index; } while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos)); } $requestUri = $_SERVER['REQUEST_URI']; if ($baseUrl && 0 === strpos($requestUri, $baseUrl)) { return $baseUrl; } if ($baseUrl && 0 === strpos($requestUri, dirname($baseUrl))) { return rtrim(dirname($baseUrl), '/'); } $truncatedRequestUri = $requestUri; if (($pos = strpos($requestUri, '?')) !== false) { $truncatedRequestUri = substr($requestUri, 0, $pos); } $basename = basename($baseUrl); if (empty($basename) || !strpos($truncatedRequestUri, $basename)) { return ''; } if ((strlen($requestUri) >= strlen($baseUrl)) && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) { $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); } return rtrim($baseUrl, '/'); } protected function getRequestMethod() { return $_SERVER['REQUEST_METHOD']; } protected function getRequestPath() { return isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/'; } protected function getQueryParams() { global $_GET; return $_GET; } protected function getQueryParam($name, $default = null) { $params = $this->getQueryParams(); if (isset($params[$name])) { return $params[$name]; } else { return $default; } } protected function renderTemplate($name, $status = 200, array $vars = array()) { $this->initAssets(); $defaults = array( 'base_url' => $this->getBaseUrl(), ); return new Response(strtr($this->assets[$name], $this->prepareVars(array_merge($defaults, $vars))), $status); } protected function prepareVars($vars) { $ret = array(); foreach ($vars as $name => $var) { $ret['{{ '.$name.' }}'] = $var; } return $ret; } protected function getAsset($name) { $this->initAssets(); if (isset($this->assets[$name])) { return new AssetResponse($name, $this->assets[$name], array( 'Last-Modified' => gmdate("D, d M Y H:i:s", filemtime(__FILE__))." GMT", 'Etag' => sprintf('"%s"', $this->assetEtags[$name]), )); } throw new HttpException(404); } protected function initAssets() { if (empty($this->assets)) { $data = file_get_contents(__FILE__, false, null, __COMPILER_HALT_OFFSET__); foreach (preg_split("/^@@(?=[\w\d\.]+( [\w\d\.]+)?$)/m", $data, -1) as $asset) { if (trim($asset)) { list($line, $content) = explode("\n", $asset, 2); list($name, $etag) = explode(" ", $line, 2); $this->assets[$name] = trim($content); $this->assetEtags[$name] = $etag; } } } } }
class AssetResponse extends Response { protected $headers; public function __construct($name, $content, $headers = array()) { parent::__construct($content); $this->name = $name; $this->headers = array_merge(array('Content-type' => $this->getContentType()), $headers); } protected function getContentType() { $parts = explode('.', $this->name); $ext = array_pop($parts); switch ($ext) { case "js": return "application/x-javascript"; case "json": return "application/json"; case "css": return "text/css"; case "html": case "htm": case "php": return "text/html"; case "txt": return "text/plain"; default: return "unknown/" . trim($ext); } } }
class HttpException extends Exception { protected $status; public function __construct($status = 500, $msg = '') { $this->status = $status; parent::__construct(empty($msg) ? Response::getStatusText($status) : $msg); } public function getStatus() { return $this->status; } }
class JsonDecoder { const SLICE = 1; const IN_STR = 2; const IN_ARR = 3; const IN_OBJ = 4; const IN_CMT = 5; const IN_REGEX = 6; function __construct() { $this->_mb_strlen = function_exists('mb_strlen'); $this->_mb_convert_encoding = function_exists('mb_convert_encoding'); $this->_mb_substr = function_exists('mb_substr'); } var $_mb_strlen = false; var $_mb_substr = false; var $_mb_convert_encoding = false; function utf162utf8($utf16) { if($this->_mb_convert_encoding) { return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16'); } $bytes = (ord($utf16{0}) << 8) | ord($utf16{1}); switch(true) { case ((0x7F & $bytes) == $bytes): return chr(0x7F & $bytes); case (0x07FF & $bytes) == $bytes: return chr(0xC0 | (($bytes >> 6) & 0x1F)) . chr(0x80 | ($bytes & 0x3F)); case (0xFFFF & $bytes) == $bytes: return chr(0xE0 | (($bytes >> 12) & 0x0F)) . chr(0x80 | (($bytes >> 6) & 0x3F)) . chr(0x80 | ($bytes & 0x3F)); } return ''; } function utf82utf16($utf8) { if($this->_mb_convert_encoding) { return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); } switch($this->strlen8($utf8)) { case 1: return $utf8; case 2: return chr(0x07 & (ord($utf8{0}) >> 2)) . chr((0xC0 & (ord($utf8{0}) << 6)) | (0x3F & ord($utf8{1}))); case 3: return chr((0xF0 & (ord($utf8{0}) << 4)) | (0x0F & (ord($utf8{1}) >> 2))) . chr((0xC0 & (ord($utf8{1}) << 6)) | (0x7F & ord($utf8{2}))); } return ''; } function reduce_string($str) { $str = preg_replace(array( '#^\s*//(.+)$#m', '#^\s*/\*(.+)\*/#Us', '#/\*(.+)\*/\s*$#Us' ), '', $str); return trim($str); } function decode($str) { $str = $this->reduce_string($str); switch (strtolower($str)) { case 'true': return true; case 'false': return false; case 'null': return null; default: $m = array(); if (is_numeric($str)) { return ((float)$str == (integer)$str) ? (integer)$str : (float)$str; } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { $delim = $this->substr8($str, 0, 1); $chrs = $this->substr8($str, 1, -1); $utf8 = ''; $strlen_chrs = $this->strlen8($chrs); for ($c = 0; $c < $strlen_chrs; ++$c) { $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); $ord_chrs_c = ord($chrs{$c}); switch (true) { case $substr_chrs_c_2 == '\b': $utf8 .= chr(0x08); ++$c; break; case $substr_chrs_c_2 == '\t': $utf8 .= chr(0x09); ++$c; break; case $substr_chrs_c_2 == '\n': $utf8 .= chr(0x0A); ++$c; break; case $substr_chrs_c_2 == '\f': $utf8 .= chr(0x0C); ++$c; break; case $substr_chrs_c_2 == '\r': $utf8 .= chr(0x0D); ++$c; break; case $substr_chrs_c_2 == '\\"': case $substr_chrs_c_2 == '\\\'': case $substr_chrs_c_2 == '\\\\': case $substr_chrs_c_2 == '\\/': if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || ($delim == "'" && $substr_chrs_c_2 != '\\"')) { $utf8 .= $chrs{++$c}; } break; case preg_match('/\\\u[0-9A-F]{4}/i', $this->substr8($chrs, $c, 6)): $utf16 = chr(hexdec($this->substr8($chrs, ($c + 2), 2))) . chr(hexdec($this->substr8($chrs, ($c + 4), 2))); $utf8 .= $this->utf162utf8($utf16); $c += 5; break; case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): $utf8 .= $chrs{$c}; break; case ($ord_chrs_c & 0xE0) == 0xC0: $utf8 .= $this->substr8($chrs, $c, 2); ++$c; break; case ($ord_chrs_c & 0xF0) == 0xE0: $utf8 .= $this->substr8($chrs, $c, 3); $c += 2; break; case ($ord_chrs_c & 0xF8) == 0xF0: $utf8 .= $this->substr8($chrs, $c, 4); $c += 3; break; case ($ord_chrs_c & 0xFC) == 0xF8: $utf8 .= $this->substr8($chrs, $c, 5); $c += 4; break; case ($ord_chrs_c & 0xFE) == 0xFC: $utf8 .= $this->substr8($chrs, $c, 6); $c += 5; break; } } return $utf8; } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { if ($str{0} == '[') { $stk = array(self::IN_ARR); $arr = array(); } else { $stk = array(self::IN_OBJ); $obj = array(); } array_push($stk, array('what' => self::SLICE, 'where' => 0, 'delim' => false)); $chrs = $this->substr8($str, 1, -1); $chrs = $this->reduce_string($chrs); if ($chrs == '') { if (reset($stk) == self::IN_ARR) { return $arr; } else { return $obj; } } $strlen_chrs = $this->strlen8($chrs); for ($c = 0; $c <= $strlen_chrs; ++$c) { $top = end($stk); $substr_chrs_c_2 = $this->substr8($chrs, $c, 2); if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == self::SLICE))) { $slice = $this->substr8($chrs, $top['where'], ($c - $top['where'])); array_push($stk, array('what' => self::SLICE, 'where' => ($c + 1), 'delim' => false)); if (reset($stk) == self::IN_ARR) { array_push($arr, $this->decode($slice)); } elseif (reset($stk) == self::IN_OBJ) { $parts = array(); if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:/Uis', $slice, $parts)) { $key = $this->decode($parts[1]); $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); $obj[$key] = $val; } elseif (preg_match('/^\s*([\p{L}\p{Nl}$_][\p{L}\p{Nl}$\p{Mn}\p{Mc}\p{Nd}\p{Pc}]*)\s*:/Uis', $slice, $parts)) { $key = $parts[1]; $val = $this->decode(trim(substr($slice, strlen($parts[0])), ", \t\n\r\0\x0B")); $obj[$key] = $val; } else { throw new JsonException(); } } } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != self::IN_STR)) { array_push($stk, array('what' => self::IN_STR, 'where' => $c, 'delim' => $chrs{$c})); } elseif (($chrs{$c} == $top['delim']) && ($top['what'] == self::IN_STR) && (($this->strlen8($this->substr8($chrs, 0, $c)) - $this->strlen8(rtrim($this->substr8($chrs, 0, $c), '\\'))) % 2 != 1)) { array_pop($stk); } elseif (($chrs{$c} == '[') && in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) { array_push($stk, array('what' => self::IN_ARR, 'where' => $c, 'delim' => false)); } elseif (($chrs{$c} == ']') && ($top['what'] == self::IN_ARR)) { array_pop($stk); } elseif (($chrs{$c} == '{') && in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) { array_push($stk, array('what' => self::IN_OBJ, 'where' => $c, 'delim' => false)); } elseif (($chrs{$c} == '}') && ($top['what'] == self::IN_OBJ)) { array_pop($stk); } elseif (($substr_chrs_c_2 == '/*') && in_array($top['what'], array(self::SLICE, self::IN_ARR, self::IN_OBJ))) { array_push($stk, array('what' => self::IN_CMT, 'where' => $c, 'delim' => false)); $c++; } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == self::IN_CMT)) { array_pop($stk); $c++; for ($i = $top['where']; $i <= $c; ++$i) $chrs = substr_replace($chrs, ' ', $i, 1); } } if (in_array($top['what'], array(self::IN_CMT, self::IN_STR))) { throw new JsonException(); } if (reset($stk) == self::IN_ARR) { return $arr; } elseif (reset($stk) == self::IN_OBJ) { return $obj; } } elseif (preg_match('/^\/.*\/$/s', $str)) { return new JsonRegex($str); } else { throw new JsonException(); } } } function strlen8( $str ) { if ( $this->_mb_strlen ) { return mb_strlen( $str, "8bit" ); } return strlen( $str ); } function substr8( $string, $start, $length=false ) { if ( $length === false ) { $length = $this->strlen8( $string ) - $start; } if ( $this->_mb_substr ) { return mb_substr( $string, $start, $length, "8bit" ); } return substr( $string, $start, $length ); } } class JsonRegex { public $pattern; public function __construct($pattern) { $this->pattern = $pattern; } public function __toString() { return $this->getPattern(); } } class JsonException extends Exception {}
class JsonResponse extends Response { public function renderHeaders() { $this->headers['Content-type'] = 'application/json'; $this->headers['Cache-Control'] = 'no-cache, must-revalidate'; $this->headers['Expires'] = 'Wed, 04 Aug 1982 00:00:00 GMT'; parent::renderHeaders(); } public function renderContent() { if (version_compare(Mongo::VERSION, '1.0.11', '<')) { array_walk_recursive($this->data, array(__CLASS__, 'prepareData'), ini_get('mongo.cmd')); } print(json_encode($this->data)); } private static function prepareData(&$data, $key, $cmd = '$') { if (is_object($data) && $data instanceof MongoId) { $data = array($cmd.'id' => (string) $data); } } }
class RedirectResponse extends Response { public function __construct($url, $status = 301) { parent::__construct($url, $status); } public function render() { header(sprintf('Location: %s', $this->data), $this->status); } }
class Response { protected static $statusCodes = array( 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 204 => 'No Content', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 400 => 'Bad Request', 401 => 'Unauthorized', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 412 => 'Precondition Failed', 415 => 'Unsupported Media Type', 417 => 'Expectation Failed', 500 => 'Internal Server Error', 501 => 'Not Implemented', ); protected $data = ''; protected $status = 200; protected $headers = array(); public function __construct($data, $status = 200, $headers = array()) { $this->data = $data; $this->status = $status; $this->headers = $headers; } public function render() { $this->renderHeaders(); $this->renderContent(); } public static function getStatusText($status) { if (isset(self::$statusCodes[$status])) { return self::$statusCodes[$status]; } } protected function renderHeaders() { header(sprintf('HTTP/1.0 %s %s', $this->status, self::$statusCodes[$this->status])); foreach ($this->headers as $name => $val) { header(sprintf('%s: %s', $name, $val)); } } protected function renderContent() { print((string) $this->data); } }


$app = new App;
$app->run();

__halt_compiler();

@@index.html.mustache 96d88092165e0240940650b27609a19a
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Genghis</title> <link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADL0lEQVRYw8VW r1fbQBy/P2X8SNpcAsgZYHJ7o0zyUhRvRS6ojap1ap1hGFaTIgCzGmqKADME NTU1MRVFVGwiIqIVERWfJYHA5Zq7lO5ty3ufd9f7fu/z+eT6vcuRlZUV/E+Q 5eXlqBO2syCeGxM+lY9kEf9tkH8hkmlgaWlpIpA2xsfCNg2y+fxcIiOb1gAv mMXJ5hJRggiGTqHl81BVBYqiBq0atblgjOo6jCjPANU0aAGobkg5iUzsQdQw AmENytwrfLTP0XH6cL0RRiMPrutF7c++g9bpAbbmVWjURKvTRbfbRau2J+Um sQArxifpmor3p214mObx0G514N//8ntndy9wD15DaCCeoGs5HHXcVKmxP4IX rIQ/FtsZOccJAzyILGgYFB/O+7wsbq8bKG+/SORulw/R7rlM1owG9LCQ7lu6 8Q3Jdx+hWV6PYizYeXvHnYkVEOVGBkRkelDt1XZSvnO4mUqSnKfjy/Wvx5Xg amBiBXgDjzDRGTLq7jXeCAQnUcRxo4lms4lauSjJ0yUGNuuJqu+d7UqJZgWh lIJF9N+H/QJrYIyrT5tCkrt5FPngMEoDpfoEf8LAgyjTL1QuGAMe6gUdvFl2 jrb6Dke2DZvHqY3PbwvTG3iAeRbUfPwM0ShpUgNm3RGeBWEhiuYSUYAW64wB wKmb0dkene9BPG5jFGtd8dnYrYkNsIQsKN1Hb8zuZxt5jQqJKF3HrmXBsnZh mlUMBOZ5EFEgRKPnMzRD2FtKYEKcHyP32k7soPbhYw3wLyw1sFa5Sq6le4Od BSX49ErE1UUcdRl534El0YgMhFslLRiON2+5L43n4GDnOeYXFqEEd4FcLgdV Ce8Gi5h79hL2j0Ei3amXpKtFYvF4z/J9TQtqwZ8srKHbx81lC99PTvD9/DK6 I4w4r+PBBVYF/AkDWdDW9tEe+HjK4zlNbKRxTWsgXFp+zPragDPwIP78j+EN HDSqJWTxhm0Iwg+IxJNYhVmyUKlUUK1Wo9YqmdFyp4nIuEiWw2mQZVqWS7KI ZzU1LRdR462k3l2x475obNa4KCZdgTgpC7yBLM6EARGpEhwu0xr4E/wGQ3S1 MEjLIesAAAAASUVORK5CYII="> <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Rokkitt:400,700"> <link type="text/css" rel="stylesheet" href="{{ base_url }}/assets/style.css"> <script type="text/template" id="alert-template"><div class="alert<% if (block) { %> alert-block<% } %> alert-<%= level %>"> <a class="close" href="#">×</a> <% if (block) { %> <p><%= msg %></p> <% } else { %> <%= msg %> <% } %> </div></script> <script type="text/template" id="collection-row-template"><td> <a href="<%= obj.url() %>" class="name value"><%= obj.get('name') %></a> </td> <td> <span class="documents value"><%= obj.get('count') %></span> </td> <td> <span class="indexes has-details value"><%= obj.get('indexes').length %></span> <div class="details" title="<%= obj.get('indexes').length %> Index<% if (obj.get('indexes').length != 1) { %>es<% } %>"> <% if (obj.get('indexes').length> 0) { %> <ul class="index-details"> <% _.each(obj.get('indexes'), function(index) { %> <li><%= Genghis.Util.formatJSON(index.key) %></li> <% }); %> </ul> <% } else { %> <em>None.</em> <% } %> </div> </td> <td class="action-column"> <button class="btn btn-mini btn-danger destroy">Remove</button> </td></script> <script type="text/template" id="collections-template"><header><h2>Collections</h2></header> <div class="content"> <table> <thead> <tr> <th>name</th> <th>documents</th> <th>indexes</th> <th></th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="add-form inactive form-horizontal"> <input class="name span4" type="text" size="30"> <button class="show btn">Add collection</button> <button class="add btn btn-primary">Add collection</button> <button class="cancel btn">Cancel</button> </div></script> <script type="text/template" id="database-row-template"><td> <a href="<%= obj.url() %>" class="name value"><%= obj.get('name') %></a> </td> <td> <span class="collections has-details value"><%= obj.get('count') %></span> <div class="details" title="<%= obj.get('count') %> Collection<% if (obj.get('count') != 1) { %>s<% } %>"> <% if (obj.get('count')> 0) { %> <ul> <% _.each(_.first(obj.get('collections'), 15), function(collection) { %> <li><%= collection %></li> <% }); %> <% if (obj.get('count')> 15) { %> <li>&hellip;</li> <% } %> </ul> <% } else { %> <em>None.</em> <% } %> </div> </td> <td> <span class="size value"><%= Genghis.Util.humanizeSize(obj.get('size')) %></span> </td> <td class="action-column"> <button class="btn btn-mini btn-danger destroy">Remove</button> </td></script> <script type="text/template" id="databases-template"><header><h2>Databases</h2></header> <div class="content"> <table> <thead> <tr> <th>name</th> <th>collections</th> <th>size</th> <th></th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="add-form inactive form-horizontal"> <input class="name span4" type="text" size="30"> <button class="show btn">Add database</button> <button class="add btn btn-primary">Add database</button> <button class="cancel btn">Cancel</button> </div></script> <script type="text/template" id="document-view-template"><div class="well"> <div class="document-actions"> <button class="btn btn-small btn-primary save">Save</button> <button class="btn btn-small cancel">Cancel</button> <button class="btn btn-small edit">Edit</button> <button class="btn btn-small btn-danger destroy">Delete</button> </div> <h3> <a class="id" href="<%= obj.url() %>"><%= obj.id %></a> </h3> <div class="document"><%= obj.prettyPrint() %></div> </div></script> <script type="text/template" id="document-template"><header><h2><%= model.id %></h2></header> <div class="content document-wrapper"></div></script> <script type="text/template" id="documents-template"><header><h2>Documents</h2></header> <div class="controls"> <button class="add-document btn btn-large">Add document</button> <div class="pagination-wrapper top"></div> </div> <div class="content document-wrapper"></div> <div class="controls"> <button class="add-document btn btn-large">Add document</button> <div class="pagination-wrapper top"></div> </div></script> <script type="text/template" id="nav-section-menu-template"><% _.each(collection.toArray().slice(0, 10), function(m) { %> <li<% if (m.id == model.id) { %> class="active"<% } %>><a href="<%= m.url() %>"> <%= m.id %> <span><%= Genghis.Util.humanizeCount(m.get('count') || 0) %></span> </a></li> <% }); %> <% if (collection.size()> 10) { %> <li class="divider"></li> <li><a href="<%= collection.url %>">More &raquo;</a></li> <% } %></script> <script type="text/template" id="nav-section-template"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= model.id %></a> <ul class="dropdown-menu"></ul></script> <script type="text/template" id="nav-template"><ul class="nav"> <li class="dropdown server"></li> <li class="dropdown database"></li> <li class="dropdown collection"></li> </ul> <form class="navbar-search"><input id="navbar-query" class="search-query" name="q" type="text" value="<%= Genghis.Util.escape(query) %>" /></form></script> <script type="text/template" id="new-document-template"><div id="new-document" class="modal editor"> <div class="modal-header"> <a class="close" data-dismiss="modal">&times;</a> <h3>New Document</h3> </div> <div class="modal-body"> <div class="wrapper"> <div id="editor-new" class="genghis-document-editor"></div> </div> </div> <div class="modal-footer"> <button class="btn btn-primary save">Save</button> <button class="btn cancel">Cancel</button> </div> </div></script> <script type="text/template" id="pagination-template"><div class="pagination pagination-right"> <ul> <li class="prev<% if (page == 1) print(' disabled'); %>"> <a<% if (page != 1) { %> href="<%= url(prev) %>"<% } %>>&larr;</a> </li> <% if (start> 1) { %> <li class="first"><a href="<%= url(1) %>">1</a></li> <li class="disabled"><a>&hellip;</a></li> <% } %> <% for (var i = start; i <= end; i++) { %> <li<% if (page == i) print(' class="active"'); %>><a href="<%= url(i) %>"><%= i %></a></li> <% } %> <% if (end < pages) { %> <li class="disabled"><a>&hellip;</a></li> <li class="last"><a href="<%= url(pages) %>"><%= pages %></a></li> <% } %> <li class="next<% if (page == pages) print(' disabled'); %>"> <a<% if (page != pages) { %> href="<%= url(next) %>"<% } %>>&rarr;</a> </li> </ul> </div></script> <script type="text/template" id="server-row-template"><% if (obj.get('error')) { %> <td> <span class="value"><%= obj.get('name') %></span> <span class="label label-important" title="<%= Genghis.Util.escape(obj.get('error')) %>">Error</span> </td> <td></td> <td></td> <% } else { %> <td> <a href="<%= obj.url() %>" class="name value"><%= obj.get('name') %></a> </td> <td> <span class="databases has-details value"><%= obj.get('count') %></span> <div class="details" title="<%= obj.get('count') %> Database<% if (obj.get('count') != 1) { %>s<% } %>"> <% if (obj.get('count')> 0) { %> <ul> <% _.each(_.first(obj.get('databases'), 15), function(database) { %> <li><%= database %></li> <% }); %> <% if (obj.get('count')> 15) { %> <li>&hellip;</li> <% } %> </ul> <% } else { %> <em>None.</em> <% } %> </div> </td> <td> <span class="size value"><%= Genghis.Util.humanizeSize(obj.get('size')) %></span> </td> <% } %> <td class="action-column"> <button class="btn btn-mini btn-danger destroy">Remove</button> </td></script> <script type="text/template" id="servers-template"><header><h2>Servers</h2></header> <div class="content"> <table> <thead> <tr> <th>name</th> <th>databases</th> <th>size</th> <th></th> </tr> </thead> <tbody> </tbody> </table> </div> <div class="add-form inactive form-horizontal"> <span class="input-append"> <input class="name span4" type="text" size="30"> <span class="add-on help" title="user:hide@address.com:27017">?</span> </span> <button class="show btn">Add server</button> <button class="add btn btn-primary">Add server</button> <button class="cancel btn">Cancel</button> </div></script> <script type="text/javascript" src="{{ base_url }}/assets/script.js"></script> <script type="text/javascript">jQuery(function() { Genghis.boot('{{ base_url }}'); });</script> </head> <body> <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container fixed"> <h3><a class="magic brand" href="{{ base_url }}">Genghis</a></h3> <nav></nav> </div> </div> </header> <noscript><h1>You won&#146;t get far in life without JavaScript&hellip;</h1></noscript> <section id="genghis" class="container fluid"> <aside id="alerts"></aside> <section id="servers"></section> <section id="databases"></section> <section id="collections"></section> <section id="documents"></section> <section id="document"><header></header></section> <section id="error"></section> </section> <footer class="container"><p>Genghis, by <a href="http://justinhileman.info">Justin Hileman</a>.</p></footer> </body> </html>

@@error.html.mustache 7cccaa236e3d2a9bec261429b634c4f7
<!DOCTYPE html> <html> <head> <title>Genghis &mdash; {{ status }}: {{ message }}</title> <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Rokkitt:400,700"> <link type="text/css" rel="stylesheet" href="{{ base_url }}/assets/style.css"> </head> <body> <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container fixed"> <h3><a class="magic brand" href="{{ base_url }}">Genghis</a></h3> <nav></nav> </div> </div> </header> <section id="genghis" class="container fluid"> <section id="error" style="display:block;"> <header><h2>{{ status }}: {{ message }}</h2></header> <div class="content"> <p> If you think you've reached this message in error, please press <strong>0</strong> to speak with an operator. Otherwise, hang up and try again. </p> </div> </section> </section> <footer class="container"><p>Genghis, by <a href="http://justinhileman.info">Justin Hileman</a>.</p></footer> </body> </html>

@@style.css 242744863bff0632df392ddf1e736c55
/**
 * Genghis v1.2.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.span1{width:60px}.span2{width:140px}.span3{width:220px}.span4{width:300px}.span5{width:380px}.span6{width:460px}.span7{width:540px}.span8{width:620px}.span9{width:700px}.span10{width:780px}.span11{width:860px}.span12,.container{width:940px}.offset1{margin-left:100px}.offset2{margin-left:180px}.offset3{margin-left:260px}.offset4{margin-left:340px}.offset5{margin-left:420px}.offset6{margin-left:500px}.offset7{margin-left:580px}.offset8{margin-left:660px}.offset9{margin-left:740px}.offset10{margin-left:820px}.offset11{margin-left:900px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid > [class*="span"]{float:left;margin-left:2.127659574%}.row-fluid > [class*="span"]:first-child{margin-left:0}.row-fluid > .span1{width:6.382978723%}.row-fluid > .span2{width:14.89361702%}.row-fluid > .span3{width:23.404255317%}.row-fluid > .span4{width:31.914893614%}.row-fluid > .span5{width:40.425531911%}.row-fluid > .span6{width:48.93617020799999%}.row-fluid > .span7{width:57.446808505%}.row-fluid > .span8{width:65.95744680199999%}.row-fluid > .span9{width:74.468085099%}.row-fluid > .span10{width:82.97872339599999%}.row-fluid > .span11{width:91.489361693%}.row-fluid > .span12{width:99.99999998999999%}.container{width:940px;margin-left:auto;margin-right:auto;*zoom:1}.container:before,.container:after{display:table;content:""}.container:after{clear:both}.container-fluid{padding-left:20px;padding-right:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:""}.container-fluid:after{clear:both}p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px}p small{font-size:11px;color:#999}.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px}h1,h2,h3,h4,h5,h6{margin:0;font-weight:700;color:#333;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:400;color:#999}h1{font-size:30px;line-height:36px}h1 small{font-size:18px}h2{font-size:24px;line-height:36px}h2 small{font-size:18px}h3{line-height:27px;font-size:18px}h3 small{font-size:14px}h4,h5,h6{line-height:18px}h4{font-size:14px}h4 small{font-size:12px}h5{font-size:12px}h6{font-size:11px;color:#999;text-transform:uppercase}.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid#eee}.page-header h1{line-height:1}ul,ol{padding:0;margin:0 0 9px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}ul{list-style:disc}ol{list-style:decimal}li{line-height:18px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:18px}dt,dd{line-height:18px}dt{font-weight:700}dd{margin-left:9px}hr{margin:18px 0;border:0;border-top:1px solid#eee;border-bottom:1px solid#fff}strong{font-weight:700}em{font-style:italic}.muted{color:#999}abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help}blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid#eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px}blockquote small{display:block;line-height:18px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid#eee}blockquote.pull-right p,blockquote.pull-right small{text-align:right}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:18px;line-height:18px;font-style:normal}small{font-size:100%}cite{font-style:normal}code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:3px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;word-wrap:break-word}pre.prettyprint{margin-bottom:18px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 18px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333;border:0;border-bottom:1px solid #eee}legend small{font-size:13.5px;color:#999}label,input,button,select,textarea{font-size:13px;font-weight:400;line-height:18px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px;color:#333}input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.uneditable-textarea{width:auto;height:auto}label input,label textarea,label select{display:block}input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;border:0 \9}input[type="image"]{border:0}input[type="file"]{width:auto;padding:initial;line-height:initial;border:initial;background-color:#fff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto}select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px}input[type="file"]{line-height:18px \9}select{width:220px;background-color:#fff}select[multiple],select[size]{height:auto}input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}textarea{height:auto}input[type="hidden"]{display:none}.radio,.checkbox{padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls > .radio:first-child,.controls > .checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline + .radio.inline,.checkbox.inline + .checkbox.inline{margin-left:10px}input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-ms-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}input:focus,textarea:focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);outline:0;outline:thin dotted \9}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0}input.span1,textarea.span1,.uneditable-input.span1{width:50px}input.span2,textarea.span2,.uneditable-input.span2{width:130px}input.span3,textarea.span3,.uneditable-input.span3{width:210px}input.span4,textarea.span4,.uneditable-input.span4{width:290px}input.span5,textarea.span5,.uneditable-input.span5{width:370px}input.span6,textarea.span6,.uneditable-input.span6{width:450px}input.span7,textarea.span7,.uneditable-input.span7{width:530px}input.span8,textarea.span8,.uneditable-input.span8{width:610px}input.span9,textarea.span9,.uneditable-input.span9{width:690px}input.span10,textarea.span10,.uneditable-input.span10{width:770px}input.span11,textarea.span11,.uneditable-input.span11{width:850px}input.span12,textarea.span12,.uneditable-input.span12{width:930px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed}.control-group.warning > label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error > label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success > label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd}.uneditable-input{display:block;background-color:#fff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);cursor:not-allowed}:-moz-placeholder{color:#999}::-webkit-input-placeholder{color:#999}.help-block{display:block;margin-top:5px;margin-bottom:0;color:#999}.help-inline{display:inline-block;*display:inline;*zoom:1;margin-bottom:9px;vertical-align:middle;padding-left:5px}.input-prepend,.input-append{margin-bottom:5px;*zoom:1}.input-prepend:before,.input-append:before,.input-prepend:after,.input-append:after{display:table;content:""}.input-prepend:after,.input-append:after{clear:both}.input-prepend input,.input-append input,.input-prepend .uneditable-input,.input-append .uneditable-input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend input:focus,.input-append input:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2}.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc}.input-prepend .add-on,.input-append .add-on{float:left;display:block;width:auto;min-width:16px;height:18px;margin-right:-1px;padding:4px 5px;font-weight:400;line-height:18px;color:#999;text-align:center;text-shadow:0 1px 0#fff;background-color:#f5f5f5;border:1px solid #ccc;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on{*margin-top:1px}.input-append input,.input-append .uneditable-input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .uneditable-input{border-left-color:#eee;border-right-color:#ccc}.input-append .add-on{margin-right:0;margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:first-child{*margin-left:-160px}.input-append input:first-child + .add-on{*margin-left:-21px}.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input{display:inline-block;margin-bottom:0}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{display:inline-block}.form-search .input-append .add-on,.form-inline .input-prepend .add-on,.form-search .input-append .add-on,.form-inline .input-prepend .add-on{vertical-align:middle}.form-search .radio,.form-inline .radio,.form-search .checkbox,.form-inline .checkbox{margin-bottom:0;vertical-align:middle}.control-group{margin-bottom:9px}legend + .control-group{margin-top:18px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:18px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right}.form-horizontal .controls{margin-left:160px}.form-horizontal .form-actions{padding-left:160px}table{max-width:100%;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:18px}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:700}.table thead th{vertical-align:bottom}.table thead:first-child tr th,.table thead:first-child tr td{border-top:0}.table tbody + tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th + th,.table-bordered td + td,.table-bordered th + td,.table-bordered td + th{border-left:1px solid #ddd}.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5}table .span1{float:none;width:44px;margin-left:0}table .span2{float:none;width:124px;margin-left:0}table .span3{float:none;width:204px;margin-left:0}table .span4{float:none;width:284px;margin-left:0}table .span5{float:none;width:364px;margin-left:0}table .span6{float:none;width:444px;margin-left:0}table .span7{float:none;width:524px;margin-left:0}table .span8{float:none;width:604px;margin-left:0}table .span9{float:none;width:684px;margin-left:0}table .span10{float:none;width:764px;margin-left:0}table .span11{float:none;width:844px;margin-left:0}table .span12{float:none;width:924px;margin-left:0}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0}.icon-white{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;text-indent:-99999px;*text-indent:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid#000;opacity:.3;filter:alpha(opacity=30);content:"\2193"}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100)}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;_width:160px;padding:4px 0;margin:0;list-style:none;background-color:#fff;border-color:#ccc;border-color:rgba(0,0,0,0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px}.dropdown-menu.bottom-up{top:auto;bottom:100%;margin-bottom:2px}.dropdown-menu .divider{height:1px;margin:5px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid#fff;*width:100%;*margin:-5px 0 5px}.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:400;line-height:18px;color:#555;white-space:nowrap}.dropdown-menu li > a:hover,.dropdown-menu .active > a,.dropdown-menu .active > a:hover{color:#fff;text-decoration:none;background-color:#08c}.dropdown.open{*z-index:1000}.dropdown.open .dropdown-toggle{color:#fff;background:#ccc;background:rgba(0,0,0,0.3)}.dropdown.open .dropdown-menu{display:block}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0,0,0,0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.fade{-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-ms-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear;opacity:0}.fade.in{opacity:1}.collapse{-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-ms-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease;position:relative;overflow:hidden;height:0}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:700;line-height:18px;color:#000;text-shadow:0 1px 0#fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;opacity:.4;filter:alpha(opacity=40);cursor:pointer}.btn{display:inline-block;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);cursor:pointer;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);*margin-left:.3em}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-ms-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;outline:0}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:1px}.btn-small{padding:5px 9px;font-size:11px;line-height:16px}.btn-small [class^="icon-"]{margin-top:-1px}.btn-mini{padding:2px 6px;font-size:11px;line-height:14px}.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{text-shadow:0 -1px 0 rgba(0,0,0,0.25);color:#fff}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-dark.active{color:rgba(255,255,255,0.75)}.btn-primary{background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(top,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #0044cc #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#04c}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-ms-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-ms-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#bd362f',GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-ms-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',endColorstr='#51a351',GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-ms-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de',endColorstr='#2f96b4',GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{background-color:#393939;background-image:-moz-linear-gradient(top,#454545,#262626);background-image:-ms-linear-gradient(top,#454545,#262626);background-image:-webkit-gradient(linear,0 0,0 100%,from(#454545),to(#262626));background-image:-webkit-linear-gradient(top,#454545,#262626);background-image:-o-linear-gradient(top,#454545,#262626);background-image:linear-gradient(top,#454545,#262626);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#454545',endColorstr='#262626',GradientType=0);border-color:#262626 #262626#000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#262626}.btn-inverse:active,.btn-inverse.active{background-color:#0c0c0c \9}button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.large,input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px}button.btn.small,input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px}.btn-group{position:relative;*zoom:1;*margin-left:.3em}.btn-group:before,.btn-group:after{display:table;content:""}.btn-group:after{clear:both}.btn-group:first-child{*margin-left:0}.btn-group + .btn-group{margin-left:5px}.btn-toolbar{margin-top:9px;margin-bottom:9px}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px}.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px}.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px}.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px}.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);*padding-top:5px;*padding-bottom:5px}.btn-group.open{*z-index:1000}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 6px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn .caret{margin-top:7px;margin-left:0}.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100)}.btn-primary .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;opacity:.75;filter:alpha(opacity=75)}.btn-small .caret{margin-top:4px}.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert-heading{color:#c09853}.alert .close{position:relative;top:-2px;right:-21px;line-height:18px}.alert-success{background-color:#dff0d8;border-color:#d6e9c6}.alert-success,.alert-success .alert-heading{color:#468847}.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7}.alert-danger,.alert-error,.alert-danger .alert-heading,.alert-error .alert-heading{color:#b94a48}.alert-info{background-color:#d9edf7;border-color:#bce8f1}.alert-info,.alert-info .alert-heading{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block > p,.alert-block > ul{margin-bottom:0}.alert-block p + p{margin-top:5px}.nav{margin-left:0;margin-bottom:18px;list-style:none}.nav > li > a{display:block}.nav > li > a:hover{text-decoration:none;background-color:#eee}.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:18px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li + .nav-header{margin-top:9px}.nav-list{padding-left:14px;padding-right:14px;margin-bottom:0}.nav-list > li > a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list > li > a{padding:3px 15px}.nav-list .active > a,.nav-list .active > a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs > li,.nav-pills > li{float:left}.nav-tabs > li > a,.nav-pills > li > a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs > li{margin-bottom:-1px}.nav-tabs > li > a{padding-top:9px;padding-bottom:9px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs > li > a:hover{border-color:#eee #eeeeee#ddd}.nav-tabs > .active > a,.nav-tabs > .active > a:hover{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills > li > a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills .active > a,.nav-pills .active > a:hover{color:#fff;background-color:#08c}.nav-stacked > li{float:none}.nav-stacked > li > a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked > li > a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked > li:first-child > a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs.nav-stacked > li:last-child > a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.nav-tabs.nav-stacked > li > a:hover{border-color:#ddd;z-index:2}.nav-pills.nav-stacked > li > a{margin-bottom:3px}.nav-pills.nav-stacked > li:last-child > a{margin-bottom:1px}.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px}.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#08c;margin-top:6px}.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580}.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333}.nav > .dropdown.active > a:hover{color:#000;cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav > .open.active > a:hover{color:#fff;background-color:#999;border-color:#999}.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open > a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;content:""}.tabbable:after{clear:both}.tab-content{overflow:hidden}.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0}.tab-content > .tab-pane,.pill-content > .pill-pane{display:none}.tab-content > .active,.pill-content > .active{display:block}.tabs-below .nav-tabs{border-top:1px solid #ddd}.tabs-below .nav-tabs > li{margin-top:-1px;margin-bottom:0}.tabs-below .nav-tabs > li > a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below .nav-tabs > li > a:hover{border-bottom-color:transparent;border-top-color:#ddd}.tabs-below .nav-tabs .active > a,.tabs-below .nav-tabs .active > a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left .nav-tabs > li,.tabs-right .nav-tabs > li{float:none}.tabs-left .nav-tabs > li > a,.tabs-right .nav-tabs > li > a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left .nav-tabs > li > a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left .nav-tabs > li > a:hover{border-color:#eee #dddddd#eee #eeeeee}.tabs-left .nav-tabs .active > a,.tabs-left .nav-tabs .active > a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right .nav-tabs > li > a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right .nav-tabs > li > a:hover{border-color:#eee #eeeeee#eee #dddddd}.tabs-right .nav-tabs .active > a,.tabs-right .nav-tabs .active > a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.navbar{overflow:visible;margin-bottom:18px}.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top,#333,#222);background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#333),to(#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333',endColorstr='#222222',GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1)}.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top,#333,#222);background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#333),to(#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333',endColorstr='#222222',GradientType=0);border-color:#222 #222222#000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222}.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9}.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar + .icon-bar{margin-top:3px}.nav-collapse.collapse{height:auto}.navbar .brand:hover{text-decoration:none}.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#fff}.navbar .navbar-text{margin-bottom:0;line-height:40px;color:#999}.navbar .navbar-text a:hover{color:#fff;background-color:transparent}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select{display:inline-block;margin-top:5px;margin-bottom:0}.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:400;line-height:1;color:#fff;color:rgba(255,255,255,0.75);background:#666;background:rgba(255,255,255,0.3);border:1px solid #111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.navbar-search .search-query:-moz-placeholder{color:#eee}.navbar-search .search-query::-webkit-input-placeholder{color:#eee}.navbar-search .search-query:hover{color:#fff;background-color:#999;background-color:rgba(255,255,255,0.5)}.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333;text-shadow:0 1px 0#fff;background-color:#fff;border:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15);outline:0}.navbar-fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.navbar-fixed-top .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right}.navbar .nav > li{display:block;float:left}.navbar .nav > li > a{float:none;padding:10px 10px 11px;line-height:19px;color:#999;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar .nav > li > a:hover{background-color:transparent;color:#fff;text-decoration:none}.navbar .nav .active > a,.navbar .nav .active > a:hover{color:#fff;text-decoration:none;background-color:#222}.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222;border-right:1px solid#333}.navbar .nav.pull-right{margin-left:10px;margin-right:0}.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);position:absolute;top:-7px;left:9px}.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid#fff;position:absolute;top:-6px;left:10px}.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#fff}.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100)}.navbar .nav .open > .dropdown-toggle,.navbar .nav .active > .dropdown-toggle,.navbar .nav .open.active > .dropdown-toggle{background-color:transparent}.navbar .nav .active > .dropdown-toggle:hover{color:#fff}.navbar .nav.pull-right .dropdown-menu{left:auto;right:0}.navbar .nav.pull-right .dropdown-menu:before{left:auto;right:12px}.navbar .nav.pull-right .dropdown-menu:after{left:auto;right:13px}.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#fbfbfb;background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-ms-linear-gradient(top,#fff,#f5f5f5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#fff,#f5f5f5);background-image:-o-linear-gradient(top,#fff,#f5f5f5);background-image:linear-gradient(top,#fff,#f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#f5f5f5',GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0#fff;-moz-box-shadow:inset 0 1px 0#fff;box-shadow:inset 0 1px 0#fff}.breadcrumb li{display:inline-block;text-shadow:0 1px 0#fff}.breadcrumb .divider{padding:0 5px;color:#999}.breadcrumb .active a{color:#333}.pagination{height:36px;margin:18px 0}.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination li{display:inline}.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0}.pagination a:hover,.pagination .active a{background-color:#f5f5f5}.pagination .active a{color:#999;cursor:default}.pagination .disabled a,.pagination .disabled a:hover{color:#999;background-color:transparent;cursor:default}.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1}.pager:before,.pager:after{display:table;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a{float:right}.pager .previous a{float:left}.modal-open .dropdown-menu{z-index:2050}.modal-open .dropdown.open{*z-index:2050}.modal-open .popover{z-index:2060}.modal-open .tooltip{z-index:2070}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-ms-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-body{padding:15px}.modal-body .modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0#fff;-moz-box-shadow:inset 0 1px 0#fff;box-shadow:inset 0 1px 0#fff;*zoom:1}.modal-footer:before,.modal-footer:after{display:table;content:""}.modal-footer:after{clear:both}.modal-footer .btn{float:right;margin-left:5px;margin-bottom:0}.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-2px}.tooltip.right{margin-left:2px}.tooltip.bottom{margin-top:2px}.tooltip.left{margin-left:-2px}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid#000}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px}.popover.top{margin-top:-5px}.popover.right{margin-left:5px}.popover.bottom{margin-top:5px}.popover.left{margin-left:-5px}.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid#000}.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid#000}.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid#000}.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid#000}.popover .arrow{position:absolute;width:0;height:0}.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000;background:rgba(0,0,0,0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}.popover-content{padding:14px;background-color:#fff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;content:""}.thumbnails:after{clear:both}.thumbnails > li{float:left;margin:0 0 18px 20px}.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075);box-shadow:0 1px 1px rgba(0,0,0,0.075)}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail > img{display:block;max-width:100%;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px}.label{padding:2px 4px 3px;font-size:11.049999999999999px;font-weight:700;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.label:hover{color:#fff;text-decoration:none}.label-important{background-color:#b94a48}.label-important:hover{background-color:#953b39}.label-warning{background-color:#f89406}.label-warning:hover{background-color:#c67605}.label-success{background-color:#468847}.label-success:hover{background-color:#356635}.label-info{background-color:#3a87ad}.label-info:hover{background-color:#2d6987}@-webkit-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-ms-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(top,#f5f5f5,#f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5',endColorstr='#f9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.progress .bar{width:0;height:18px;color:#fff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-ms-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(top,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf',endColorstr='#0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-ms-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-ms-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(top,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#c43c35',GradientType=0)}.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-ms-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(top,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',endColorstr='#57a957',GradientType=0)}.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-ms-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(top,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de',endColorstr='#339bb9',GradientType=0)}.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:18px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:18px;line-height:1}.carousel-inner{overflow:hidden;width:100%;position:relative}.carousel .item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-ms-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item > img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid#fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{left:auto;right:15px}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{color:#fff}.hero-unit{padding:60px;margin-bottom:30px;background-color:#f5f5f5;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px}.hero-unit p{font-size:18px;font-weight:200;line-height:27px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.container{padding-left:20px;padding-right:20px;width:auto;min-width:480px;max-width:1400px}.navbar{height:60px}.navbar .brand{font-size:32px;line-height:26px;padding:16px 20px 12px}.navbar ul .dropdown-menu li a{padding-right:45px;position:relative}.navbar ul .dropdown-menu li a span{padding:0 6px;display:inline-block;position:absolute;top:50%;right:10px;margin-top:-8px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;line-height:16px;color:#666;background-color:rgba(0,0,0,0.1);-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.2);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.2);box-shadow:inset 0 1px 0 rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.2)}.navbar ul .dropdown-menu li a:hover span{color:#DDD}.navbar ul .dropdown-menu li.active a span{color:#CCC;background-color:rgba(0,0,0,0.2)}.navbar form{padding-left:20px;margin:15px 0 15px -10px}.nav .dropdown,.navbar-search{background:transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAiCAQAAADMxIBtAAABLUlEQVQoz2NgYPzPxMDEgAaY/7OrsGMIruJs4GFAE2aU4vooxCCCrpb7pbiaNAMbqiBblfhsRQYpNAN4xH5qcuuju0Fwj5qfIYMYqiB7gPI+cwYjdMvk3lmLuzBwoQoKzTMqdGHQQhVkNdG55s3sw8CIKqx4wc0ojEEGVVC4wa4jgsEJzQAlk9sx/CnolilvC/BNR3eYcJrbkiy2GFTLhLM8FmUzRKKqVN0f4prBoIMSVtpm1+K4klGDUHyiY3kEgxWa5ic+8lEMgshCnIH6+7wYXFHVie8183NlkEMJe36lz3bsrgzMKFHXrDrJjEEDVbPYc205YwZOZCEmbYlnmqiOBmreJhOlyiCEKsj/X5ZDES0tJfFuE0VXx/6WT0EA1THAEP/PgR7aDNgSLQDySzbpQ/g6wQAAAABJRU5ErkJggg==') center left no-repeat}.nav .dropdown .dropdown-toggle{padding:20px 10px 21px 20px;height:19px;line-height:19px;white-space:nowrap;color:#EEE}.nav .dropdown .dropdown-toggle:hover{background-color:transparent}html,body{margin:0;padding:0;color:#111;background-color:#D3D3D3;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAADmCAYAAADx5uiaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFiklEQVR4nO3csY4bRxRE0ddc/v8fi+NAWsCZbeEVrEadkyhZNMiZuSNGdWbma2Zes+/H8nlnZj7LZ34tnzfz81o+gXObr+f255zZv56J+75+PROhA38owUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUMRwUORMz+jP4Fzt+d+tj/j95mJz3nDmTP701Gpe5Q4c/t6PnPBZNj7eZ71vbBzTuolsi1xk27Zikv4PM+zGtI558z+vY/8sg189+3dPT/poYngoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgocj712bYttSLJDEOmdjeS1zTbd8DpruHnnPLgOe2xGdcv0fvvx38p0sMTiZeTM9kFlG3z0x899dkHvwbFmYT1rv0kx6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KCB6KvOdn9NvbWa+5YzNsJvPdE2duO7N/jxLbiIkRy8Q9mnPOj+0zt6VGLBMjgbesl85kgr9lHHJb6p6nXk7bVl8iftJDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDke9Nu8RI4Psf/+q/SYwuJsY2E/tziT2/M/sv/NTn3PbMHdfz+9w17/n5wN+w3HoCZyYkHqbPLI8Zzj3DmJ/JDKJun/m1fF6En/RQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQ5D2ZbbPEVlpi0+6WgcSUxPdP7M8l7vsNG3Trw5jvyQz6fWb/oU/coMTK6jN3DE5GYn+eZ/W7n3NuedHP7N/39WfeT3ooIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngoIngo8r1pt72dlRhyTA1jJiQ22BJnrg9OnnMS24M3jIImOlq/lu8JXczneVbPPedsDwTO3PUS2faZ/eBfc8cSbuI/pK/JvJRXP6ef9FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FBE8FAktml30ZjhDbt2t+zkJT7nLd995oJn6T0zn8DgZGLQb2b/gia+e2JhNrXamlgWviHQ9XHIyYyCrj9LftJDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDEcFDkffMfJ1zfvzfH+RfOBN4QZ1zbhnG3HZmZnto9DV3fPfEZ3zNBeOl7wkM5f2y/RJJrOC+Zn94cAJnPrP/kN4yNPrM/rOUejElrufqs+QnPRQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBQRPBR5//o3Ef72vldigyyxZ5cYh0xs2t2y6ZY4N7HjeGb/eYqMWN6wMjoz83meZ/WznnMSNz7yqynw3RNLxTe9RLZ95oLxUj/poYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgoYjgocj7n//kt7wmsEV2zkmMBN6w6Zfaiku88BNjmzfcoyuu5/eI5fYFTQSfGjNMPKCJNdxt11zP0IDnFeOlY8QS+F2ChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyKChyLvmfkKnPua/V23M5mdvBv2/L532P50kSHHc05ixPKWYczVPv8CiVTGPJBHFUsAAAAASUVORK5CYII=")}body{padding-top:60px}h1,h2,h3,body > footer p{font-family:"Rokkitt",serif;font-weight:700}body > footer{font-weight:400;text-align:center}a:link,a:visited{color:#0058e1}a:hover,a:active{color:#111}noscript h1{font-size:2.2em;text-align:center;margin:80px 40px}.document-wrapper article h3{line-height:1;margin-bottom:10px}.document-wrapper .document{color:#111;position:relative}.document-wrapper .document .prop:after{content:':';color:#998;padding-right:.5em}.document-wrapper .document .null,.document-wrapper .document .bool{color:#0086b3}.document-wrapper .document .num{color:#40A070}.document-wrapper .document .string{color:#D20}.document-wrapper .document .string .value{color:#D14}.document-wrapper .document .string a:link .value,.document-wrapper .document .string a:visited .value{text-decoration:underline}.document-wrapper .document .string a:hover .value,.document-wrapper .document .string a:active .value{color:#0058E1}.document-wrapper .document .db-ref .db-ref-ref .string .value,.document-wrapper .document .db-ref .db-ref-id .string .value,.document-wrapper .document .db-ref .db-ref-db .string .value{cursor:pointer;border-bottom:1px dotted #D14}.document-wrapper .document .db-ref .db-ref-ref .string .value:hover,.document-wrapper .document .db-ref .db-ref-id .string .value:hover,.document-wrapper .document .db-ref .db-ref-db .string .value:hover{color:#0058E1;border-bottom:1px solid #0058E1}.document-wrapper .document .collapser{position:absolute;left:-1.5em;padding:0 .5em;color:#998;cursor:pointer}.document-wrapper .document .ellipsis{color:#998;cursor:pointer}.document-wrapper .document .ellipsis .summary{padding-left:5px;font-style:italic}.document-wrapper .document .fn{color:#458}.document-wrapper .document ul{list-style:none;margin:0 0 0 2em;padding:0}.document-wrapper .document li{position:relative;color:#111}.document-wrapper .document li:after{content:','}.document-wrapper .document li:last-of-type:after{content:''}aside#alerts{margin-top:20px}body > section{min-height:150px}body > section section{background-color:#fff;margin:20px 0;padding:20px;border:1px solid #AAA;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,0.1),inset 0 1px 0#fff}body > section section > header{background-color:#d8d8d8;min-height:40px;margin:-20px -20px 20px;padding:0 20px;border-top-left-radius:4px;border-top-right-radius:4px;background-image:-moz-linear-gradient(-90deg,#e4e4e4,#d8d8d8);background-image:-webkit-gradient(linear,0 top,0 bottom,from(#e4e4e4),to(#d8d8d8));box-shadow:inset 0 1px 0 rgba(255,255,255,0.6)}body > section section > header h2{margin:0;line-height:40px}body > section section > .content{min-height:100px;-webkit-transition:.1s linear all;-moz-transition:.1s linear all;-ms-transition:.1s linear all;-o-transition:.1s linear all;transition:.1s linear all}body > section section > p:first-child{margin-top:0}body > section section > p:last-child{margin-bottom:0}body > section section.spinning{height:180px}body > section section.spinning header h2{background:transparent url('data:image/gif;base64,R0lGODlhEAALAPQAAN7e3oiIiNHR0c3NzdbW1omJiYiIiJeXl7Ozs6enp8bGxpKSkqCgoLa2tqmpqcjIyJSUlIiIiKKiotXV1dDQ0Nra2pqamtLS0tnZ2cXFxb29vcvLy9jY2AAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA') left center no-repeat;text-indent:-10000em}body > section section.spinning .controls,body > section section.spinning .add-form,body > section section.spinning .content{display:none}body > section section .details{display:none}body > section section .has-details{border-bottom:1px dotted#998;cursor:default}.add-form button.show{display:none}.add-form.inactive button,.add-form.inactive input,.add-form.inactive .input-append{display:none}.add-form.inactive button.show{display:inherit}.add-form.inactive .help{display:none}.add-form span.input-append .add-on{margin-right:4px}.add-form .help{cursor:default}#query-editor{width:888px;height:100px;position:relative;-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1);margin:0 0 10px;padding:4px;border:1px solid #CCC;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}table{width:100%;margin-bottom:18px;border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}table th,table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd}table th{font-weight:700}table thead th{vertical-align:bottom}table thead:first-child tr th,table thead:first-child tr td{border-top:0}table tbody + tbody{border-top:2px solid #ddd}table tbody tr:hover td,table tbody tr:hover th{background-color:#f5f5f5}table th + th,table td + td,table th + td,table td + th{border-left:1px solid #ddd}table thead:first-child tr:first-child th,table tbody:first-child tr:first-child th,table tbody:first-child tr:first-child td{border-top:0}table thead:first-child tr:first-child th:first-child,table tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0}table thead:first-child tr:first-child th:last-child,table tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0}table thead:last-child tr:last-child th:first-child,table tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px}table thead:last-child tr:last-child th:last-child,table tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0}table tbody tr:nth-child(odd) td,table tbody tr:nth-child(odd) th{background-color:#f9f9f9}table .header{cursor:pointer}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden}table .header.headerSortUp,table .header.headerSortDown{background-color:rgba(4,156,219,0.050000000000000044);text-shadow:0 1px 1px rgba(255,255,255,0.75)}table .header:hover:after{visibility:visible}table .header.headerSortDown:after,table .header.headerSortDown:hover:after{visibility:visible;opacity:.6;filter:alpha(opacity=60)}table .header.headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.6;filter:alpha(opacity=60)}tr td.action-column{padding:7px 10px 0;text-align:right}tr td.action-column button{visibility:hidden;-o-transition-property:color,background,box-shadow;-moz-transition-property:color,background,box-shadow;-webkit-transition-property:color,background,box-shadow;transition-property:color,background,box-shadow}tr:hover td.action-column button{visibility:inherit}section#servers .alert.alert-error{padding:3px 10px;font-weight:700}section#servers tr.spinning td:first-child{padding-left:35px;background:transparent url('data:image/gif;base64,R0lGODlhEAALAPQAAP///zMzM+Hh4dnZ2e7u7jc3NzMzM1dXV5qamn9/f8fHx05OTm5ubqGhoYKCgsrKylFRUTY2NnFxcerq6t/f3/b29l9fX+Li4vT09MTExLKystTU1PHx8QAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA') 10px center no-repeat}section#servers tr input{display:none}section#servers tr.editing span.name{display:none}section#servers tr.editing input{display:inherit}.index-details{color:#111;list-style:none;margin:0}.index-details > li{display:block;margin-bottom:5px}.index-details > li ul,.index-details > li li{display:inline-block;list-style:none;margin:0;padding:0}.index-details > li li{color:#111}.index-details > li li:after{content:',';padding-right:.25em}.index-details > li li:last-of-type:after{content:'';padding-right:0}.index-details > li .prop:after{content:':';color:#998;padding-right:.25em}.index-details > li .num{color:#40A070}.document-wrapper div.well{overflow-x:auto}.document-wrapper div.well h3 a{color:#333}.document-wrapper div.well h3 a:hover,.document-wrapper div.well h3 a:active{color:#0058e1}.document-wrapper article{position:relative}.document-wrapper article div.document-actions{position:absolute;right:20px;z-index:10}.document-wrapper article div.document-actions button.save,.document-wrapper article div.document-actions button.cancel{display:none}.document-wrapper article div.document-actions button.edit,.document-wrapper article div.document-actions button.destroy{visibility:hidden}.document-wrapper article:hover div.document-actions button.edit,.document-wrapper article:hover div.document-actions button.destroy{visibility:inherit}.document-wrapper article div.well{-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-ms-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.document-wrapper article.edit div.document-actions{margin-top:20px}.document-wrapper article.edit div.document-actions button.edit,.document-wrapper article.edit div.document-actions button.destroy{display:none}.document-wrapper article.edit div.document-actions button.save,.document-wrapper article.edit div.document-actions button.cancel{display:inline-block}.document-wrapper article.edit div.well{padding:0;height:400px;border-color:rgba(82,168,236,0.8);background-color:#fff;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);*zoom:1}.document-wrapper article.edit div.well h3{display:none}.document-wrapper article.edit div.well:before,.document-wrapper article.edit div.well:after{display:table;content:""}.document-wrapper article.edit div.well:after{clear:both}.document-wrapper article.edit div.well .genghis-document-editor{position:relative;left:1px;right:1px;height:400px}.document-wrapper article.edit div.well .genghis-document-editor .ace_scroller{background-color:transparent}section#documents .controls{*zoom:1;margin-bottom:20px}section#documents .controls:before,section#documents .controls:after{display:table;content:""}section#documents .controls:after{clear:both}section#documents .controls .add-document{float:left}section#documents .controls .pagination{margin:0}section#documents .controls .pagination li.disabled a{cursor:default}section#documents .controls .pagination li.prev a:after{content:' Previous'}section#documents .controls .pagination li.next a:before{content:'Next '}section#document article h3{display:none}.modal.editor{width:820px;margin-left:-410px;max-height:90%}.modal.editor .wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border:1px solid rgba(82,168,236,0.8);background-color:#fff;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 3px rgba(0,0,0,0.1),0 0 8px rgba(82,168,236,0.6);*zoom:1}.modal.editor .wrapper:before,.modal.editor .wrapper:after{display:table;content:""}.modal.editor .wrapper:after{clear:both}.modal.editor .genghis-document-editor{height:250px;position:relative}.modal.editor .genghis-document-editor .ace_scroller{background-color:transparent}@media screen and (max-width:1200px){section#documents .controls .pagination li.prev a:after,section#documents .controls .pagination li.next a:before{content:''}section#documents .controls .pagination li.prev a:after{content:' Prev'}}@media screen and (max-width:860px){.modal.editor{left:20px;right:20px;width:auto;margin-left:0}table th,table td{padding:4px 5px}table td.action-column{padding-top:2px}section#documents .controls .pagination li.prev a:after,section#documents .controls .pagination li.next a:before{content:''}section#documents .controls .pagination li.prev a:after{content:' Prev'}}.appriseOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.appriseOverlay.fade{opacity:0}.appriseOuter{position:fixed;top:50%;left:50%;z-index:1050;max-height:500px;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;width:auto;top:inherit;left:inherit;margin:0;min-width:200px;min-height:50px;max-width:75%;display:none}.appriseOuter.fade{-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-ms-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out;top:-25%}.appriseOuter.fade.in{top:50%}.appriseInner{padding:15px}.appriseInner button{display:inline-block;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);cursor:pointer;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);*margin-left:.3em}.appriseInner button:hover,.appriseInner button:active,.appriseInner button.active,.appriseInner button.disabled,.appriseInner button[disabled]{background-color:#e6e6e6}.appriseInner button:active,.appriseInner button.active{background-color:#ccc \9}.appriseInner button:first-child{*margin-left:0}.appriseInner button[value="ok"]{text-shadow:0 -1px 0 rgba(0,0,0,0.25);color:#fff;background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-ms-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(top,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc',endColorstr='#0044cc',GradientType=0);border-color:#04c #0044cc #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.appriseInner button[value="ok"]:hover,.appriseInner button[value="ok"]:active,.appriseInner button[value="ok"].active,.appriseInner button[value="ok"].disabled,.appriseInner button[value="ok"][disabled]{background-color:#04c}.appriseInner button[value="ok"]:active,.appriseInner button[value="ok"].active{background-color:#039 \9}.appriseInner button[value="ok"] .caret{border-top-color:#fff;opacity:.75;filter:alpha(opacity=75)}.appriseInner button:last-child{margin-left:0}.aButtons{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0#fff;-moz-box-shadow:inset 0 1px 0#fff;box-shadow:inset 0 1px 0#fff;*zoom:1;margin:20px -15px -15px}.aButtons:before,.aButtons:after{display:table;content:""}.aButtons:after{clear:both}.aButtons .btn{float:right;margin-left:5px;margin-bottom:0}.aButtons button{float:right;margin-left:5px;margin-bottom:0}.aTextbox{width:94%;min-width:180px;display:block;margin:20px auto 0}

@@script.js e29864efc5f883cc21775348a5b69377
/**
 * Genghis v1.2.0
 *
 * The single-file MongoDB admin app
 *
 * http://genghisapp.com
 *
 * @author Justin Hileman <hide@address.com>
 */
(function(c,m){function j(e){var o=O[e]={},h,a,e=e.split(/\s+/);for(h=0,a=e.length;h<a;h++)o[e[h]]=!0;return o}function b(e,o,a){if(a===m&&1===e.nodeType)if(a="data-"+o.replace(N,"-$1").toLowerCase(),a=e.getAttribute(a),"string"===typeof a){try{a="true"===a?!0:"false"===a?!1:"null"===a?null:h.isNumeric(a)?parseFloat(a):ca.test(a)?h.parseJSON(a):a}catch(b){}h.data(e,o,a)}else a=m;return a}function d(e){for(var o in e)if(!("data"===o&&h.isEmptyObject(e[o]))&&"toJSON"!==o)return!1;return!0}function k(e,
o,a){var b=o+"defer",f=o+"queue",c=o+"mark",d=h._data(e,b);d&&("queue"===a||!h._data(e,f))&&("mark"===a||!h._data(e,c))&&setTimeout(function(){!h._data(e,f)&&!h._data(e,c)&&(h.removeData(e,b,!0),d.fire())},0)}function g(){return!1}function a(){return!0}function f(e,o,a){o=o||0;if(h.isFunction(o))return h.grep(e,function(e,h){return!!o.call(e,h,e)===a});if(o.nodeType)return h.grep(e,function(e){return e===o===a});if("string"===typeof o){var b=h.grep(e,function(e){return 1===e.nodeType});if(La.test(o))return h.filter(o,
b,!a);o=h.filter(o,b)}return h.grep(e,function(e){return 0<=h.inArray(e,o)===a})}function n(e){var o=ka.split("|"),e=e.createDocumentFragment();if(e.createElement)for(;o.length;)e.createElement(o.pop());return e}function v(e,o){if(1===o.nodeType&&h.hasData(e)){var a,b,f;b=h._data(e);var c=h._data(o,b),d=b.events;if(d)for(a in delete c.handle,c.events={},d)for(b=0,f=d[a].length;b<f;b++)h.event.add(o,a+(d[a][b].namespace?".":"")+d[a][b].namespace,d[a][b],d[a][b].data);c.data&&(c.data=h.extend({},c.data))}}
function t(e,o){var a;if(1===o.nodeType){o.clearAttributes&&o.clearAttributes();o.mergeAttributes&&o.mergeAttributes(e);a=o.nodeName.toLowerCase();if("object"===a)o.outerHTML=e.outerHTML;else if("input"===a&&("checkbox"===e.type||"radio"===e.type))e.checked&&(o.defaultChecked=o.checked=e.checked),o.value!==e.value&&(o.value=e.value);else if("option"===a)o.selected=e.defaultSelected;else if("input"===a||"textarea"===a)o.defaultValue=e.defaultValue;o.removeAttribute(h.expando)}}function u(e){return"undefined"!==
typeof e.getElementsByTagName?e.getElementsByTagName("*"):"undefined"!==typeof e.querySelectorAll?e.querySelectorAll("*"):[]}function s(e){if("checkbox"===e.type||"radio"===e.type)e.defaultChecked=e.checked}function y(e){var o=(e.nodeName||"").toLowerCase();"input"===o?s(e):"script"!==o&&"undefined"!==typeof e.getElementsByTagName&&h.grep(e.getElementsByTagName("input"),s)}function q(e,o){o.src?h.ajax({url:o.src,async:!1,dataType:"script"}):h.globalEval((o.text||o.textContent||o.innerHTML||"").replace(Ma,
"/*$0*/"));o.parentNode&&o.parentNode.removeChild(o)}function x(e,o,a){var b="width"===o?e.offsetWidth:e.offsetHeight,f="width"===o?Na:Oa,c=0,d=f.length;if(0<b){if("border"!==a)for(;c<d;c++)a||(b-=parseFloat(h.css(e,"padding"+f[c]))||0),b="margin"===a?b+(parseFloat(h.css(e,a+f[c]))||0):b-(parseFloat(h.css(e,"border"+f[c]+"Width"))||0);return b+"px"}b=S(e,o,o);if(0>b||null==b)b=e.style[o]||0;b=parseFloat(b)||0;if(a)for(;c<d;c++)b+=parseFloat(h.css(e,"padding"+f[c]))||0,"padding"!==a&&(b+=parseFloat(h.css(e,
"border"+f[c]+"Width"))||0),"margin"===a&&(b+=parseFloat(h.css(e,a+f[c]))||0);return b+"px"}function A(e){return function(o,a){"string"!==typeof o&&(a=o,o="*");if(h.isFunction(a))for(var b=o.toLowerCase().split(la),c=0,f=b.length,d,g;c<f;c++)d=b[c],(g=/^\+/.test(d))&&(d=d.substr(1)||"*"),d=e[d]=e[d]||[],d[g?"unshift":"push"](a)}}function B(e,o,h,a,b,c){b=b||o.dataTypes[0];c=c||{};c[b]=!0;for(var b=e[b],d=0,f=b?b.length:0,g=e===da,n;d<f&&(g||!n);d++)n=b[d](o,h,a),"string"===typeof n&&(!g||c[n]?n=m:
(o.dataTypes.unshift(n),n=B(e,o,h,a,n,c)));if((g||!n)&&!c["*"])n=B(e,o,h,a,"*",c);return n}function r(e,o){var a,b,c=h.ajaxSettings.flatOptions||{};for(a in o)o[a]!==m&&((c[a]?e:b||(b={}))[a]=o[a]);b&&h.extend(!0,e,b)}function p(e,o,a,b){if(h.isArray(o))h.each(o,function(o,c){a||Pa.test(e)?b(e,c):p(e+"["+("object"===typeof c||h.isArray(c)?o:"")+"]",c,a,b)});else if(!a&&null!=o&&"object"===typeof o)for(var c in o)p(e+"["+c+"]",o[c],a,b);else b(e,o)}function z(){try{return new c.XMLHttpRequest}catch(e){}}
function E(){setTimeout(C,0);return W=h.now()}function C(){W=m}function F(e,o){var a={};h.each(ma.concat.apply([],ma.slice(0,o)),function(){a[this]=e});return a}function G(e){if(!ea[e]){var o=w.body,a=h("<"+e+">").appendTo(o),b=a.css("display");a.remove();if("none"===b||""===b){I||(I=w.createElement("iframe"),I.frameBorder=I.width=I.height=0);o.appendChild(I);if(!T||!I.createElement)T=(I.contentWindow||I.contentDocument).document,T.write(("CSS1Compat"===w.compatMode?"<!doctype html>":"")+"<html><body>"),
T.close();a=T.createElement(e);T.body.appendChild(a);b=h.css(a,"display");o.removeChild(I)}ea[e]=b}return ea[e]}function J(e){return h.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var w=c.document,D=c.navigator,K=c.location,h=function(){function e(){if(!o.isReady){try{w.documentElement.doScroll("left")}catch(h){setTimeout(e,1);return}o.ready()}}var o=function(e,h){return new o.fn.init(e,h,b)},h=c.jQuery,a=c.$,b,d=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,f=/\S/,g=/^\s+/,n=/\s+$/,
k=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,j=/^[\],:{}\s]*$/,q=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,r=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,s=/(?:^|:|,)(?:\s*\[)+/g,p=/(webkit)[ \/]([\w.]+)/,x=/(opera)(?:.*version)?[ \/]([\w.]+)/,y=/(msie) ([\w.]+)/,z=/(mozilla)(?:.*? rv:([\w.]+))?/,A=/-([a-z]|[0-9])/ig,v=/^-ms-/,t=function(e,o){return(o+"").toUpperCase()},B=D.userAgent,X,K,E=Object.prototype.toString,u=Object.prototype.hasOwnProperty,C=Array.prototype.push,F=Array.prototype.slice,
O=String.prototype.trim,G=Array.prototype.indexOf,L={};o.fn=o.prototype={constructor:o,init:function(e,h,a){var b;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!h&&w.body)return this.context=w,this[0]=w.body,this.selector=e,this.length=1,this;if("string"===typeof e){if((b="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:d.exec(e))&&(b[1]||!h)){if(b[1])return a=(h=h instanceof o?h[0]:h)?h.ownerDocument||h:w,(e=k.exec(e))?o.isPlainObject(h)?
(e=[w.createElement(e[1])],o.fn.attr.call(e,h,!0)):e=[a.createElement(e[1])]:(e=o.buildFragment([b[1]],[a]),e=(e.cacheable?o.clone(e.fragment):e.fragment).childNodes),o.merge(this,e);if((h=w.getElementById(b[2]))&&h.parentNode){if(h.id!==b[2])return a.find(e);this.length=1;this[0]=h}this.context=w;this.selector=e;return this}return!h||h.jquery?(h||a).find(e):this.constructor(h).find(e)}if(o.isFunction(e))return a.ready(e);e.selector!==m&&(this.selector=e.selector,this.context=e.context);return o.makeArray(e,
this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,h,a){var b=this.constructor();o.isArray(e)?C.apply(b,e):o.merge(b,e);b.prevObject=this;b.context=this.context;"find"===h?b.selector=this.selector+(this.selector?" ":"")+a:h&&(b.selector=this.selector+"."+h+"("+a+")");return b},each:function(e,h){return o.each(this,e,h)},ready:function(e){o.bindReady();
X.add(e);return this},eq:function(e){e=+e;return-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(e){return this.pushStack(o.map(this,function(h,o){return e.call(h,o,h)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice};o.fn.init.prototype=o.fn;o.extend=o.fn.extend=function(){var e,
h,a,b,c,d=arguments[0]||{},f=1,g=arguments.length,n=!1;"boolean"===typeof d&&(n=d,d=arguments[1]||{},f=2);"object"!==typeof d&&!o.isFunction(d)&&(d={});g===f&&(d=this,--f);for(;f<g;f++)if(null!=(e=arguments[f]))for(h in e)a=d[h],b=e[h],d!==b&&(n&&b&&(o.isPlainObject(b)||(c=o.isArray(b)))?(c?(c=!1,a=a&&o.isArray(a)?a:[]):a=a&&o.isPlainObject(a)?a:{},d[h]=o.extend(n,a,b)):b!==m&&(d[h]=b));return d};o.extend({noConflict:function(e){c.$===o&&(c.$=a);e&&c.jQuery===o&&(c.jQuery=h);return o},isReady:!1,
readyWait:1,holdReady:function(e){e?o.readyWait++:o.ready(!0)},ready:function(e){if(!0===e&&!--o.readyWait||!0!==e&&!o.isReady){if(!w.body)return setTimeout(o.ready,1);o.isReady=!0;!0!==e&&0<--o.readyWait||(X.fireWith(w,[o]),o.fn.trigger&&o(w).trigger("ready").off("ready"))}},bindReady:function(){if(!X){X=o.Callbacks("once memory");if("complete"===w.readyState)return setTimeout(o.ready,1);if(w.addEventListener)w.addEventListener("DOMContentLoaded",K,!1),c.addEventListener("load",o.ready,!1);else if(w.attachEvent){w.attachEvent("onreadystatechange",
K);c.attachEvent("onload",o.ready);var h=!1;try{h=null==c.frameElement}catch(a){}w.documentElement.doScroll&&h&&e()}}},isFunction:function(e){return"function"===o.type(e)},isArray:Array.isArray||function(e){return"array"===o.type(e)},isWindow:function(e){return e&&"object"===typeof e&&"setInterval"in e},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?""+e:L[E.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==o.type(e)||e.nodeType||o.isWindow(e))return!1;
try{if(e.constructor&&!u.call(e,"constructor")&&!u.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(h){return!1}for(var a in e);return a===m||u.call(e,a)},isEmptyObject:function(e){for(var h in e)return!1;return!0},error:function(e){throw Error(e);},parseJSON:function(e){if("string"!==typeof e||!e)return null;e=o.trim(e);if(c.JSON&&c.JSON.parse)return c.JSON.parse(e);if(j.test(e.replace(q,"@").replace(r,"]").replace(s,"")))return(new Function("return "+e))();o.error("Invalid JSON: "+e)},
parseXML:function(e){var h,a;try{c.DOMParser?(a=new DOMParser,h=a.parseFromString(e,"text/xml")):(h=new ActiveXObject("Microsoft.XMLDOM"),h.async="false",h.loadXML(e))}catch(b){h=m}(!h||!h.documentElement||h.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+e);return h},noop:function(){},globalEval:function(e){e&&f.test(e)&&(c.execScript||function(e){c.eval.call(c,e)})(e)},camelCase:function(e){return e.replace(v,"ms-").replace(A,t)},nodeName:function(e,h){return e.nodeName&&e.nodeName.toUpperCase()===
h.toUpperCase()},each:function(e,h,a){var b,c=0,d=e.length,f=d===m||o.isFunction(e);if(a)if(f)for(b in e){if(!1===h.apply(e[b],a))break}else for(;c<d&&!(!1===h.apply(e[c++],a)););else if(f)for(b in e){if(!1===h.call(e[b],b,e[b]))break}else for(;c<d&&!(!1===h.call(e[c],c,e[c++])););return e},trim:O?function(e){return null==e?"":O.call(e)}:function(e){return null==e?"":e.toString().replace(g,"").replace(n,"")},makeArray:function(e,h){var a=h||[];if(null!=e){var b=o.type(e);null==e.length||"string"===
b||"function"===b||"regexp"===b||o.isWindow(e)?C.call(a,e):o.merge(a,e)}return a},inArray:function(e,h,o){var a;if(h){if(G)return G.call(h,e,o);a=h.length;for(o=o?0>o?Math.max(0,a+o):o:0;o<a;o++)if(o in h&&h[o]===e)return o}return-1},merge:function(e,h){var o=e.length,a=0;if("number"===typeof h.length)for(var b=h.length;a<b;a++)e[o++]=h[a];else for(;h[a]!==m;)e[o++]=h[a++];e.length=o;return e},grep:function(e,h,o){for(var a=[],b,o=!!o,c=0,d=e.length;c<d;c++)b=!!h(e[c],c),o!==b&&a.push(e[c]);return a},
map:function(e,h,a){var b,c,d=[],f=0,g=e.length;if(e instanceof o||g!==m&&"number"===typeof g&&(0<g&&e[0]&&e[g-1]||0===g||o.isArray(e)))for(;f<g;f++)b=h(e[f],f,a),null!=b&&(d[d.length]=b);else for(c in e)b=h(e[c],c,a),null!=b&&(d[d.length]=b);return d.concat.apply([],d)},guid:1,proxy:function(e,h){if("string"===typeof h)var a=e[h],h=e,e=a;if(!o.isFunction(e))return m;var b=F.call(arguments,2),a=function(){return e.apply(h,b.concat(F.call(arguments)))};a.guid=e.guid=e.guid||a.guid||o.guid++;return a},
access:function(e,h,a,b,c,d){var f=e.length;if("object"===typeof h){for(var g in h)o.access(e,g,h[g],b,c,a);return e}if(a!==m){b=!d&&b&&o.isFunction(a);for(g=0;g<f;g++)c(e[g],h,b?a.call(e[g],g,c(e[g],h)):a,d);return e}return f?c(e[0],h):m},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();e=p.exec(e)||x.exec(e)||y.exec(e)||0>e.indexOf("compatible")&&z.exec(e)||[];return{browser:e[1]||"",version:e[2]||"0"}},sub:function(){function e(h,o){return new e.fn.init(h,o)}o.extend(!0,
e,this);e.superclass=this;e.fn=e.prototype=this();e.fn.constructor=e;e.sub=this.sub;e.fn.init=function(a,b){b&&b instanceof o&&!(b instanceof e)&&(b=e(b));return o.fn.init.call(this,a,b,h)};e.fn.init.prototype=e.fn;var h=e(w);return e},browser:{}});o.each("Boolean,Number,String,Function,Array,Date,RegExp,Object".split(","),function(e,h){L["[object "+h+"]"]=h.toLowerCase()});B=o.uaMatch(B);B.browser&&(o.browser[B.browser]=!0,o.browser.version=B.version);o.browser.webkit&&(o.browser.safari=!0);f.test("\u00a0")&&
(g=/^[\s\xA0]+/,n=/[\s\xA0]+$/);b=o(w);w.addEventListener?K=function(){w.removeEventListener("DOMContentLoaded",K,!1);o.ready()}:w.attachEvent&&(K=function(){"complete"===w.readyState&&(w.detachEvent("onreadystatechange",K),o.ready())});return o}(),O={};h.Callbacks=function(e){var e=e?O[e]||j(e):{},o=[],a=[],b,c,d,f,g,n=function(a){var b,c,d,f;for(b=0,c=a.length;b<c;b++)d=a[b],f=h.type(d),"array"===f?n(d):"function"===f&&(!e.unique||!q.has(d))&&o.push(d)},k=function(h,n){n=n||[];b=!e.memory||[h,n];
c=!0;g=d||0;d=0;for(f=o.length;o&&g<f;g++)if(!1===o[g].apply(h,n)&&e.stopOnFalse){b=!0;break}c=!1;o&&(e.once?!0===b?q.disable():o=[]:a&&a.length&&(b=a.shift(),q.fireWith(b[0],b[1])))},q={add:function(){if(o){var e=o.length;n(arguments);c?f=o.length:b&&!0!==b&&(d=e,k(b[0],b[1]))}return this},remove:function(){if(o)for(var h=arguments,a=0,b=h.length;a<b;a++)for(var d=0;d<o.length&&!(h[a]===o[d]&&(c&&d<=f&&(f--,d<=g&&g--),o.splice(d--,1),e.unique));d++);return this},has:function(e){if(o)for(var h=0,
a=o.length;h<a;h++)if(e===o[h])return!0;return!1},empty:function(){o=[];return this},disable:function(){o=a=b=m;return this},disabled:function(){return!o},lock:function(){a=m;(!b||!0===b)&&q.disable();return this},locked:function(){return!a},fireWith:function(h,o){a&&(c?e.once||a.push([h,o]):(!e.once||!b)&&k(h,o));return this},fire:function(){q.fireWith(this,arguments);return this},fired:function(){return!!b}};return q};var L=[].slice;h.extend({Deferred:function(e){var o=h.Callbacks("once memory"),
a=h.Callbacks("once memory"),b=h.Callbacks("memory"),c="pending",d={resolve:o,reject:a,notify:b},f={done:o.add,fail:a.add,progress:b.add,state:function(){return c},isResolved:o.fired,isRejected:a.fired,then:function(e,h,o){g.done(e).fail(h).progress(o);return this},always:function(){g.done.apply(g,arguments).fail.apply(g,arguments);return this},pipe:function(e,o,a){return h.Deferred(function(b){h.each({done:[e,"resolve"],fail:[o,"reject"],progress:[a,"notify"]},function(e,o){var a=o[0],c=o[1],d;if(h.isFunction(a))g[e](function(){if((d=
a.apply(this,arguments))&&h.isFunction(d.promise))d.promise().then(b.resolve,b.reject,b.notify);else b[c+"With"](this===g?b:this,[d])});else g[e](b[c])})}).promise()},promise:function(e){if(null==e)e=f;else for(var h in f)e[h]=f[h];return e}},g=f.promise({}),n;for(n in d)g[n]=d[n].fire,g[n+"With"]=d[n].fireWith;g.done(function(){c="resolved"},a.disable,b.lock).fail(function(){c="rejected"},o.disable,b.lock);e&&e.call(g,g);return g},when:function(e){function o(e){return function(h){b[e]=1<arguments.length?
L.call(arguments,0):h;--g||n.resolveWith(n,b)}}function a(e){return function(h){f[e]=1<arguments.length?L.call(arguments,0):h;n.notifyWith(k,f)}}var b=L.call(arguments,0),c=0,d=b.length,f=Array(d),g=d,n=1>=d&&e&&h.isFunction(e.promise)?e:h.Deferred(),k=n.promise();if(1<d){for(;c<d;c++)b[c]&&b[c].promise&&h.isFunction(b[c].promise)?b[c].promise().then(o(c),n.reject,a(c)):--g;g||n.resolveWith(n,b)}else n!==e&&n.resolveWith(n,d?[e]:[]);return k}});h.support=function(){var e,o,a,b,d,f,g,n,k=w.createElement("div");
k.setAttribute("className","t");k.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";o=k.getElementsByTagName("*");a=k.getElementsByTagName("a")[0];if(!o||!o.length||!a)return{};b=w.createElement("select");d=b.appendChild(w.createElement("option"));o=k.getElementsByTagName("input")[0];e={leadingWhitespace:3===k.firstChild.nodeType,tbody:!k.getElementsByTagName("tbody").length,htmlSerialize:!!k.getElementsByTagName("link").length,
style:/top/.test(a.getAttribute("style")),hrefNormalized:"/a"===a.getAttribute("href"),opacity:/^0.55/.test(a.style.opacity),cssFloat:!!a.style.cssFloat,checkOn:"on"===o.value,optSelected:d.selected,getSetAttribute:"t"!==k.className,enctype:!!w.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==w.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};
o.checked=!0;e.noCloneChecked=o.cloneNode(!0).checked;b.disabled=!0;e.optDisabled=!d.disabled;try{delete k.test}catch(q){e.deleteExpando=!1}!k.addEventListener&&k.attachEvent&&k.fireEvent&&(k.attachEvent("onclick",function(){e.noCloneEvent=!1}),k.cloneNode(!0).fireEvent("onclick"));o=w.createElement("input");o.value="t";o.setAttribute("type","radio");e.radioValue="t"===o.value;o.setAttribute("checked","checked");k.appendChild(o);a=w.createDocumentFragment();a.appendChild(k.lastChild);e.checkClone=
a.cloneNode(!0).cloneNode(!0).lastChild.checked;e.appendChecked=o.checked;a.removeChild(o);a.appendChild(k);k.innerHTML="";c.getComputedStyle&&(o=w.createElement("div"),o.style.width="0",o.style.marginRight="0",k.style.width="2px",k.appendChild(o),e.reliableMarginRight=0===(parseInt((c.getComputedStyle(o,null)||{marginRight:0}).marginRight,10)||0));if(k.attachEvent)for(g in{submit:1,change:1,focusin:1})o="on"+g,n=o in k,n||(k.setAttribute(o,"return;"),n="function"===typeof k[o]),e[g+"Bubbles"]=n;
a.removeChild(k);a=b=d=o=k=o=null;h(function(){var a,o,b,c,d=w.getElementsByTagName("body")[0];d&&(a=w.createElement("div"),a.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",d.insertBefore(a,d.firstChild),k=w.createElement("div"),a.appendChild(k),k.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",f=k.getElementsByTagName("td"),n=0===f[0].offsetHeight,f[0].style.display="",f[1].style.display="none",e.reliableHiddenOffsets=
n&&0===f[0].offsetHeight,k.innerHTML="",k.style.width=k.style.paddingLeft="1px",h.boxModel=e.boxModel=2===k.offsetWidth,"undefined"!==typeof k.style.zoom&&(k.style.display="inline",k.style.zoom=1,e.inlineBlockNeedsLayout=2===k.offsetWidth,k.style.display="",k.innerHTML="<div style='width:4px;'></div>",e.shrinkWrapBlocks=2!==k.offsetWidth),k.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;",k.innerHTML="<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>",
o=k.firstChild,b=o.firstChild,c={doesNotAddBorder:5!==b.offsetTop,doesAddBorderForTableAndCells:5===o.nextSibling.firstChild.firstChild.offsetTop},b.style.position="fixed",b.style.top="20px",c.fixedPosition=20===b.offsetTop||15===b.offsetTop,b.style.position=b.style.top="",o.style.overflow="hidden",o.style.position="relative",c.subtractsBorderForOverflowNotVisible=-5===b.offsetTop,c.doesNotIncludeMarginInBodyOffset=1!==d.offsetTop,d.removeChild(a),k=null,h.extend(e,c))});return e}();var ca=/^(?:\{.*\}|\[.*\])$/,
N=/([A-Z])/g;h.extend({cache:{},uuid:0,expando:"jQuery"+(h.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){e=e.nodeType?h.cache[e[h.expando]]:e[h.expando];return!!e&&!d(e)},data:function(e,a,b,c){if(h.acceptData(e)){var d;d=h.expando;var f="string"===typeof a,g=e.nodeType,n=g?h.cache:e,k=g?e[d]:e[d]&&d,q="events"===a;if(k&&n[k]&&(q||c||n[k].data)||!(f&&b===m)){k||(g?e[d]=k=++h.uuid:k=d);n[k]||(n[k]={},g||
(n[k].toJSON=h.noop));if("object"===typeof a||"function"===typeof a)c?n[k]=h.extend(n[k],a):n[k].data=h.extend(n[k].data,a);d=e=n[k];c||(e.data||(e.data={}),e=e.data);b!==m&&(e[h.camelCase(a)]=b);if(q&&!e[a])return d.events;f?(b=e[a],null==b&&(b=e[h.camelCase(a)])):b=e;return b}}},removeData:function(e,a,b){if(h.acceptData(e)){var c,f,g,n=h.expando,k=e.nodeType,q=k?h.cache:e,j=k?e[n]:n;if(q[j]){if(a&&(c=b?q[j]:q[j].data)){h.isArray(a)||(a in c?a=[a]:(a=h.camelCase(a),a=a in c?[a]:a.split(" ")));for(f=
0,g=a.length;f<g;f++)delete c[a[f]];if(!(b?d:h.isEmptyObject)(c))return}if(!b&&(delete q[j].data,!d(q[j])))return;h.support.deleteExpando||!q.setInterval?delete q[j]:q[j]=null;k&&(h.support.deleteExpando?delete e[n]:e.removeAttribute?e.removeAttribute(n):e[n]=null)}}},_data:function(e,a,b){return h.data(e,a,b,!0)},acceptData:function(e){if(e.nodeName){var a=h.noData[e.nodeName.toLowerCase()];if(a)return!(!0===a||e.getAttribute("classid")!==a)}return!0}});h.fn.extend({data:function(e,a){var c,d,f,
g=null;if("undefined"===typeof e){if(this.length&&(g=h.data(this[0]),1===this[0].nodeType&&!h._data(this[0],"parsedAttrs"))){d=this[0].attributes;for(var n=0,k=d.length;n<k;n++)f=d[n].name,0===f.indexOf("data-")&&(f=h.camelCase(f.substring(5)),b(this[0],f,g[f]));h._data(this[0],"parsedAttrs",!0)}return g}if("object"===typeof e)return this.each(function(){h.data(this,e)});c=e.split(".");c[1]=c[1]?"."+c[1]:"";return a===m?(g=this.triggerHandler("getData"+c[1]+"!",[c[0]]),g===m&&this.length&&(g=h.data(this[0],
e),g=b(this[0],e,g)),g===m&&c[1]?this.data(c[0]):g):this.each(function(){var b=h(this),d=[c[0],a];b.triggerHandler("setData"+c[1]+"!",d);h.data(this,e,a);b.triggerHandler("changeData"+c[1]+"!",d)})},removeData:function(e){return this.each(function(){h.removeData(this,e)})}});h.extend({_mark:function(e,a){e&&(a=(a||"fx")+"mark",h._data(e,a,(h._data(e,a)||0)+1))},_unmark:function(e,a,b){!0!==e&&(b=a,a=e,e=!1);if(a){var b=b||"fx",c=b+"mark";(e=e?0:(h._data(a,c)||1)-1)?h._data(a,c,e):(h.removeData(a,
c,!0),k(a,b,"mark"))}},queue:function(e,a,b){var c;if(e)return a=(a||"fx")+"queue",c=h._data(e,a),b&&(!c||h.isArray(b)?c=h._data(e,a,h.makeArray(b)):c.push(b)),c||[]},dequeue:function(e,a){var a=a||"fx",b=h.queue(e,a),c=b.shift(),d={};"inprogress"===c&&(c=b.shift());c&&("fx"===a&&b.unshift("inprogress"),h._data(e,a+".run",d),c.call(e,function(){h.dequeue(e,a)},d));b.length||(h.removeData(e,a+"queue "+a+".run",!0),k(e,a,"queue"))}});h.fn.extend({queue:function(e,a){"string"!==typeof e&&(a=e,e="fx");
return a===m?h.queue(this[0],e):this.each(function(){var b=h.queue(this,e,a);"fx"===e&&"inprogress"!==b[0]&&h.dequeue(this,e)})},dequeue:function(e){return this.each(function(){h.dequeue(this,e)})},delay:function(e,a){e=h.fx?h.fx.speeds[e]||e:e;return this.queue(a||"fx",function(a,h){var b=setTimeout(a,e);h.stop=function(){clearTimeout(b)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e){function a(){--f||b.resolveWith(c,[c])}"string"!==typeof e&&(e=m);for(var e=e||"fx",
b=h.Deferred(),c=this,d=c.length,f=1,g=e+"defer",n=e+"queue",e=e+"mark",k;d--;)if(k=h.data(c[d],g,m,!0)||(h.data(c[d],n,m,!0)||h.data(c[d],e,m,!0))&&h.data(c[d],g,h.Callbacks("once memory"),!0))f++,k.add(a);a();return b.promise()}});var na=/[\n\t\r]/g,Y=/\s+/,Qa=/\r/g,Ra=/^(?:button|input)$/i,Sa=/^(?:button|input|object|select|textarea)$/i,Ta=/^a(?:rea)?$/i,oa=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,pa=h.support.getSetAttribute,
M,qa,ra;h.fn.extend({attr:function(e,a){return h.access(this,e,a,!0,h.attr)},removeAttr:function(e){return this.each(function(){h.removeAttr(this,e)})},prop:function(e,a){return h.access(this,e,a,!0,h.prop)},removeProp:function(e){e=h.propFix[e]||e;return this.each(function(){try{this[e]=m,delete this[e]}catch(a){}})},addClass:function(e){var a,b,c,d,f,g,n;if(h.isFunction(e))return this.each(function(a){h(this).addClass(e.call(this,a,this.className))});if(e&&"string"===typeof e){a=e.split(Y);for(b=
0,c=this.length;b<c;b++)if(d=this[b],1===d.nodeType)if(!d.className&&1===a.length)d.className=e;else{f=" "+d.className+" ";for(g=0,n=a.length;g<n;g++)~f.indexOf(" "+a[g]+" ")||(f+=a[g]+" ");d.className=h.trim(f)}}return this},removeClass:function(e){var a,b,c,d,f,g,n;if(h.isFunction(e))return this.each(function(a){h(this).removeClass(e.call(this,a,this.className))});if(e&&"string"===typeof e||e===m){a=(e||"").split(Y);for(b=0,c=this.length;b<c;b++)if(d=this[b],1===d.nodeType&&d.className)if(e){f=
(" "+d.className+" ").replace(na," ");for(g=0,n=a.length;g<n;g++)f=f.replace(" "+a[g]+" "," ");d.className=h.trim(f)}else d.className=""}return this},toggleClass:function(e,a){var b=typeof e,c="boolean"===typeof a;return h.isFunction(e)?this.each(function(b){h(this).toggleClass(e.call(this,b,this.className,a),a)}):this.each(function(){if("string"===b)for(var d,f=0,g=h(this),n=a,k=e.split(Y);d=k[f++];)n=c?n:!g.hasClass(d),g[n?"addClass":"removeClass"](d);else if("undefined"===b||"boolean"===b)this.className&&
h._data(this,"__className__",this.className),this.className=this.className||!1===e?"":h._data(this,"__className__")||""})},hasClass:function(e){for(var e=" "+e+" ",a=0,h=this.length;a<h;a++)if(1===this[a].nodeType&&-1<(" "+this[a].className+" ").replace(na," ").indexOf(e))return!0;return!1},val:function(e){var a,b,c,d=this[0];if(arguments.length)return c=h.isFunction(e),this.each(function(b){var d=h(this);if(1===this.nodeType&&(b=c?e.call(this,b,d.val()):e,null==b?b="":"number"===typeof b?b+="":h.isArray(b)&&
(b=h.map(b,function(e){return null==e?"":e+""})),a=h.valHooks[this.nodeName.toLowerCase()]||h.valHooks[this.type],!a||!("set"in a)||a.set(this,b,"value")===m))this.value=b});if(d){if((a=h.valHooks[d.nodeName.toLowerCase()]||h.valHooks[d.type])&&"get"in a&&(b=a.get(d,"value"))!==m)return b;b=d.value;return"string"===typeof b?b.replace(Qa,""):null==b?"":b}}});h.extend({valHooks:{option:{get:function(e){var a=e.attributes.value;return!a||a.specified?e.value:e.text}},select:{get:function(e){var a,b,c=
e.selectedIndex,d=[],f=e.options,g="select-one"===e.type;if(0>c)return null;e=g?c:0;for(b=g?c+1:f.length;e<b;e++)if(a=f[e],a.selected&&(h.support.optDisabled?!a.disabled:null===a.getAttribute("disabled"))&&(!a.parentNode.disabled||!h.nodeName(a.parentNode,"optgroup"))){a=h(a).val();if(g)return a;d.push(a)}return g&&!d.length&&f.length?h(f[c]).val():d},set:function(e,a){var b=h.makeArray(a);h(e).find("option").each(function(){this.selected=0<=h.inArray(h(this).val(),b)});b.length||(e.selectedIndex=
-1);return b}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,a,b,c){var d,f,g=e.nodeType;if(e&&!(3===g||8===g||2===g)){if(c&&a in h.attrFn)return h(e)[a](b);if("undefined"===typeof e.getAttribute)return h.prop(e,a,b);if(c=1!==g||!h.isXMLDoc(e))a=a.toLowerCase(),f=h.attrHooks[a]||(oa.test(a)?qa:M);if(b!==m)if(null===b)h.removeAttr(e,a);else{if(f&&"set"in f&&c&&(d=f.set(e,b,a))!==m)return d;e.setAttribute(a,""+b);return b}else{if(f&&"get"in f&&c&&null!==
(d=f.get(e,a)))return d;d=e.getAttribute(a);return null===d?m:d}}},removeAttr:function(e,a){var b,c,d,f,g=0;if(a&&1===e.nodeType){c=a.toLowerCase().split(Y);for(f=c.length;g<f;g++)if(d=c[g])b=h.propFix[d]||d,h.attr(e,d,""),e.removeAttribute(pa?d:b),oa.test(d)&&b in e&&(e[b]=!1)}},attrHooks:{type:{set:function(e,a){if(Ra.test(e.nodeName)&&e.parentNode)h.error("type property can't be changed");else if(!h.support.radioValue&&"radio"===a&&h.nodeName(e,"input")){var b=e.value;e.setAttribute("type",a);
b&&(e.value=b);return a}}},value:{get:function(e,a){return M&&h.nodeName(e,"button")?M.get(e,a):a in e?e.value:null},set:function(e,a,b){if(M&&h.nodeName(e,"button"))return M.set(e,a,b);e.value=a}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,a,b){var c,d,f=
e.nodeType;if(e&&!(3===f||8===f||2===f)){if(1!==f||!h.isXMLDoc(e))a=h.propFix[a]||a,d=h.propHooks[a];return b!==m?d&&"set"in d&&(c=d.set(e,b,a))!==m?c:e[a]=b:d&&"get"in d&&null!==(c=d.get(e,a))?c:e[a]}},propHooks:{tabIndex:{get:function(e){var a=e.getAttributeNode("tabindex");return a&&a.specified?parseInt(a.value,10):Sa.test(e.nodeName)||Ta.test(e.nodeName)&&e.href?0:m}}}});h.attrHooks.tabindex=h.propHooks.tabIndex;qa={get:function(e,a){var b,d=h.prop(e,a);return!0===d||"boolean"!==typeof d&&(b=
e.getAttributeNode(a))&&!1!==b.nodeValue?a.toLowerCase():m},set:function(e,a,b){!1===a?h.removeAttr(e,b):(a=h.propFix[b]||b,a in e&&(e[a]=!0),e.setAttribute(b,b.toLowerCase()));return b}};pa||(ra={name:!0,id:!0},M=h.valHooks.button={get:function(e,a){var b;return(b=e.getAttributeNode(a))&&(ra[a]?""!==b.nodeValue:b.specified)?b.nodeValue:m},set:function(e,a,b){var h=e.getAttributeNode(b);h||(h=w.createAttribute(b),e.setAttributeNode(h));return h.nodeValue=a+""}},h.attrHooks.tabindex.set=M.set,h.each(["width",
"height"],function(e,a){h.attrHooks[a]=h.extend(h.attrHooks[a],{set:function(e,b){if(""===b)return e.setAttribute(a,"auto"),b}})}),h.attrHooks.contenteditable={get:M.get,set:function(e,a,b){""===a&&(a="false");M.set(e,a,b)}});h.support.hrefNormalized||h.each(["href","src","width","height"],function(e,a){h.attrHooks[a]=h.extend(h.attrHooks[a],{get:function(e){e=e.getAttribute(a,2);return null===e?m:e}})});h.support.style||(h.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||m},
set:function(e,a){return e.style.cssText=""+a}});h.support.optSelected||(h.propHooks.selected=h.extend(h.propHooks.selected,{get:function(e){if(e=e.parentNode)e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex;return null}}));h.support.enctype||(h.propFix.enctype="encoding");h.support.checkOn||h.each(["radio","checkbox"],function(){h.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}});h.each(["radio","checkbox"],function(){h.valHooks[this]=h.extend(h.valHooks[this],
{set:function(e,a){if(h.isArray(a))return e.checked=0<=h.inArray(h(e).val(),a)}})});var ga=/^(?:textarea|input|select)$/i,sa=/^([^\.]*)?(?:\.(.+))?$/,Ua=/\bhover(\.\S+)?\b/,Va=/^key/,Wa=/^(?:mouse|contextmenu)|click/,ta=/^(?:focusinfocus|focusoutblur)$/,Xa=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Ya=function(e){if(e=Xa.exec(e))e[1]=(e[1]||"").toLowerCase(),e[3]=e[3]&&RegExp("(?:^|\\s)"+e[3]+"(?:\\s|$)");return e},ua=function(e){return h.event.special.hover?e:e.replace(Ua,"mouseenter$1 mouseleave$1")};
h.event={add:function(e,a,b,d,c){var f,g,n,k,q,j,r,s,p;if(!(3===e.nodeType||8===e.nodeType||!a||!b||!(f=h._data(e)))){b.handler&&(r=b,b=r.handler);b.guid||(b.guid=h.guid++);n=f.events;n||(f.events=n={});g=f.handle;g||(f.handle=g=function(e){return"undefined"!==typeof h&&(!e||h.event.triggered!==e.type)?h.event.dispatch.apply(g.elem,arguments):m},g.elem=e);a=h.trim(ua(a)).split(" ");for(f=0;f<a.length;f++){k=sa.exec(a[f])||[];q=k[1];j=(k[2]||"").split(".").sort();p=h.event.special[q]||{};q=(c?p.delegateType:
p.bindType)||q;p=h.event.special[q]||{};k=h.extend({type:q,origType:k[1],data:d,handler:b,guid:b.guid,selector:c,quick:Ya(c),namespace:j.join(".")},r);s=n[q];if(!s&&(s=n[q]=[],s.delegateCount=0,!p.setup||!1===p.setup.call(e,d,j,g)))e.addEventListener?e.addEventListener(q,g,!1):e.attachEvent&&e.attachEvent("on"+q,g);p.add&&(p.add.call(e,k),k.handler.guid||(k.handler.guid=b.guid));c?s.splice(s.delegateCount++,0,k):s.push(k);h.event.global[q]=!0}e=null}},global:{},remove:function(e,a,b,d,c){var f=h.hasData(e)&&
h._data(e),g,n,k,q,j,m,r,s,p,x;if(f&&(r=f.events)){a=h.trim(ua(a||"")).split(" ");for(g=0;g<a.length;g++)if(n=sa.exec(a[g])||[],k=q=n[1],n=n[2],k){s=h.event.special[k]||{};k=(d?s.delegateType:s.bindType)||k;p=r[k]||[];j=p.length;n=n?RegExp("(^|\\.)"+n.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(m=0;m<p.length;m++)if(x=p[m],(c||q===x.origType)&&(!b||b.guid===x.guid)&&(!n||n.test(x.namespace))&&(!d||d===x.selector||"**"===d&&x.selector))p.splice(m--,1),x.selector&&p.delegateCount--,
s.remove&&s.remove.call(e,x);0===p.length&&j!==p.length&&((!s.teardown||!1===s.teardown.call(e,n))&&h.removeEvent(e,k,f.handle),delete r[k])}else for(k in r)h.event.remove(e,k+a[g],b,d,!0);if(h.isEmptyObject(r)){if(a=f.handle)a.elem=null;h.removeData(e,["events","handle"],!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(e,a,b,d){if(!b||!(3===b.nodeType||8===b.nodeType)){var f=e.type||e,g=[],n,k,q,j,r;if(!ta.test(f+h.event.triggered)&&(0<=f.indexOf("!")&&(f=f.slice(0,-1),n=
!0),0<=f.indexOf(".")&&(g=f.split("."),f=g.shift(),g.sort()),b&&!h.event.customEvent[f]||h.event.global[f]))if(e="object"===typeof e?e[h.expando]?e:new h.Event(f,e):new h.Event(f),e.type=f,e.isTrigger=!0,e.exclusive=n,e.namespace=g.join("."),e.namespace_re=e.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,n=0>f.indexOf(":")?"on"+f:"",b){if(e.result=m,e.target||(e.target=b),a=null!=a?h.makeArray(a):[],a.unshift(e),q=h.event.special[f]||{},!(q.trigger&&!1===q.trigger.apply(b,a))){r=
[[b,q.bindType||f]];if(!d&&!q.noBubble&&!h.isWindow(b)){j=q.delegateType||f;g=ta.test(j+f)?b:b.parentNode;for(k=null;g;g=g.parentNode)r.push([g,j]),k=g;k&&k===b.ownerDocument&&r.push([k.defaultView||k.parentWindow||c,j])}for(k=0;k<r.length&&!e.isPropagationStopped();k++)g=r[k][0],e.type=r[k][1],(j=(h._data(g,"events")||{})[e.type]&&h._data(g,"handle"))&&j.apply(g,a),(j=n&&g[n])&&h.acceptData(g)&&!1===j.apply(g,a)&&e.preventDefault();e.type=f;if(!d&&!e.isDefaultPrevented()&&(!q._default||!1===q._default.apply(b.ownerDocument,
a))&&!("click"===f&&h.nodeName(b,"a"))&&h.acceptData(b))if(n&&b[f]&&("focus"!==f&&"blur"!==f||0!==e.target.offsetWidth)&&!h.isWindow(b))(k=b[n])&&(b[n]=null),h.event.triggered=f,b[f](),h.event.triggered=m,k&&(b[n]=k);return e.result}}else for(k in b=h.cache,b)b[k].events&&b[k].events[f]&&h.event.trigger(e,a,b[k].handle.elem,!0)}},dispatch:function(e){var e=h.event.fix(e||c.event),a=(h._data(this,"events")||{})[e.type]||[],b=a.delegateCount,d=[].slice.call(arguments,0),f=!e.exclusive&&!e.namespace,
g=[],n,k,q,j,r,s,p;d[0]=e;e.delegateTarget=this;if(b&&!e.target.disabled&&!(e.button&&"click"===e.type)){q=h(this);q.context=this.ownerDocument||this;for(k=e.target;k!=this;k=k.parentNode||this){r={};s=[];q[0]=k;for(n=0;n<b;n++){j=a[n];p=j.selector;if(r[p]===m){var x=r,y=p,D;if(j.quick){D=j.quick;var z=k.attributes||{};D=(!D[1]||k.nodeName.toLowerCase()===D[1])&&(!D[2]||(z.id||{}).value===D[2])&&(!D[3]||D[3].test((z["class"]||{}).value))}else D=q.is(p);x[y]=D}r[p]&&s.push(j)}s.length&&g.push({elem:k,
matches:s})}}a.length>b&&g.push({elem:this,matches:a.slice(b)});for(n=0;n<g.length&&!e.isPropagationStopped();n++){b=g[n];e.currentTarget=b.elem;for(a=0;a<b.matches.length&&!e.isImmediatePropagationStopped();a++)if(j=b.matches[a],f||!e.namespace&&!j.namespace||e.namespace_re&&e.namespace_re.test(j.namespace))e.data=j.data,e.handleObj=j,j=((h.event.special[j.origType]||{}).handle||j.handler).apply(b.elem,d),j!==m&&(e.result=j,!1===j&&(e.preventDefault(),e.stopPropagation()))}return e.result},props:"attrChange,attrName,relatedNode,srcElement,altKey,bubbles,cancelable,ctrlKey,currentTarget,eventPhase,metaKey,relatedTarget,shiftKey,target,timeStamp,view,which".split(","),
fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(e,a){null==e.which&&(e.which=null!=a.charCode?a.charCode:a.keyCode);return e}},mouseHooks:{props:"button,buttons,clientX,clientY,fromElement,offsetX,offsetY,pageX,pageY,screenX,screenY,toElement".split(","),filter:function(e,a){var b,h,d=a.button,c=a.fromElement;null==e.pageX&&null!=a.clientX&&(b=e.target.ownerDocument||w,h=b.documentElement,b=b.body,e.pageX=a.clientX+(h&&h.scrollLeft||b&&b.scrollLeft||0)-(h&&h.clientLeft||
b&&b.clientLeft||0),e.pageY=a.clientY+(h&&h.scrollTop||b&&b.scrollTop||0)-(h&&h.clientTop||b&&b.clientTop||0));!e.relatedTarget&&c&&(e.relatedTarget=c===e.target?a.toElement:c);!e.which&&d!==m&&(e.which=d&1?1:d&2?3:d&4?2:0);return e}},fix:function(e){if(e[h.expando])return e;var a,b,d=e,c=h.event.fixHooks[e.type]||{},f=c.props?this.props.concat(c.props):this.props,e=h.Event(d);for(a=f.length;a;)b=f[--a],e[b]=d[b];e.target||(e.target=d.srcElement||w);3===e.target.nodeType&&(e.target=e.target.parentNode);
e.metaKey===m&&(e.metaKey=e.ctrlKey);return c.filter?c.filter(e,d):e},special:{ready:{setup:h.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,a,b){h.isWindow(this)&&(this.onbeforeunload=b)},teardown:function(e,a){this.onbeforeunload===a&&(this.onbeforeunload=null)}}},simulate:function(e,a,b,d){e=h.extend(new h.Event,b,{type:e,isSimulated:!0,originalEvent:{}});d?h.event.trigger(e,null,a):h.event.dispatch.call(a,e);e.isDefaultPrevented()&&
b.preventDefault()}};h.event.handle=h.event.dispatch;h.removeEvent=w.removeEventListener?function(e,a,b){e.removeEventListener&&e.removeEventListener(a,b,!1)}:function(e,a,b){e.detachEvent&&e.detachEvent("on"+a,b)};h.Event=function(e,b){if(!(this instanceof h.Event))return new h.Event(e,b);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?a:g):this.type=e;b&&h.extend(this,b);this.timeStamp=e&&
e.timeStamp||h.now();this[h.expando]=!0};h.Event.prototype={preventDefault:function(){this.isDefaultPrevented=a;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=a;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=a;this.stopPropagation()},isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g};
h.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,a){h.event.special[e]={delegateType:a,bindType:a,handle:function(e){var b=e.relatedTarget,d=e.handleObj,c;if(!b||b!==this&&!h.contains(this,b))e.type=d.origType,c=d.handler.apply(this,arguments),e.type=a;return c}}});h.support.submitBubbles||(h.event.special.submit={setup:function(){if(h.nodeName(this,"form"))return!1;h.event.add(this,"click._submit keypress._submit",function(e){e=e.target;if((e=h.nodeName(e,"input")||h.nodeName(e,"button")?
e.form:m)&&!e._submit_attached)h.event.add(e,"submit._submit",function(e){this.parentNode&&!e.isTrigger&&h.event.simulate("submit",this.parentNode,e,!0)}),e._submit_attached=!0})},teardown:function(){if(h.nodeName(this,"form"))return!1;h.event.remove(this,"._submit")}});h.support.changeBubbles||(h.event.special.change={setup:function(){if(ga.test(this.nodeName)){if("checkbox"===this.type||"radio"===this.type)h.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&
(this._just_changed=!0)}),h.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,h.event.simulate("change",this,e,!0))});return!1}h.event.add(this,"beforeactivate._change",function(e){e=e.target;ga.test(e.nodeName)&&!e._change_attached&&(h.event.add(e,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&h.event.simulate("change",this.parentNode,e,!0)}),e._change_attached=!0)})},handle:function(e){var a=e.target;if(this!==a||e.isSimulated||
e.isTrigger||"radio"!==a.type&&"checkbox"!==a.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){h.event.remove(this,"._change");return ga.test(this.nodeName)}});h.support.focusinBubbles||h.each({focus:"focusin",blur:"focusout"},function(e,a){var b=0,d=function(e){h.event.simulate(a,e.target,h.event.fix(e),!0)};h.event.special[a]={setup:function(){0===b++&&w.addEventListener(e,d,!0)},teardown:function(){0===--b&&w.removeEventListener(e,d,!0)}}});h.fn.extend({on:function(e,
a,b,d,c){var f,n;if("object"===typeof e){"string"!==typeof a&&(b=a,a=m);for(n in e)this.on(n,a,b,e[n],c);return this}null==b&&null==d?(d=a,b=a=m):null==d&&("string"===typeof a?(d=b,b=m):(d=b,b=a,a=m));if(!1===d)d=g;else if(!d)return this;1===c&&(f=d,d=function(e){h().off(e);return f.apply(this,arguments)},d.guid=f.guid||(f.guid=h.guid++));return this.each(function(){h.event.add(this,e,d,b,a)})},one:function(e,a,b,h){return this.on.call(this,e,a,b,h,1)},off:function(e,a,b){if(e&&e.preventDefault&&
e.handleObj){var d=e.handleObj;h(e.delegateTarget).off(d.namespace?d.type+"."+d.namespace:d.type,d.selector,d.handler);return this}if("object"===typeof e){for(d in e)this.off(d,a,e[d]);return this}if(!1===a||"function"===typeof a)b=a,a=m;!1===b&&(b=g);return this.each(function(){h.event.remove(this,e,b,a)})},bind:function(e,a,b){return this.on(e,null,a,b)},unbind:function(e,a){return this.off(e,null,a)},live:function(e,a,b){h(this.context).on(e,this.selector,a,b);return this},die:function(e,a){h(this.context).off(e,
this.selector||"**",a);return this},delegate:function(e,a,b,h){return this.on(a,e,b,h)},undelegate:function(e,a,b){return 1==arguments.length?this.off(e,"**"):this.off(a,e,b)},trigger:function(e,a){return this.each(function(){h.event.trigger(e,a,this)})},triggerHandler:function(e,a){if(this[0])return h.event.trigger(e,a,this[0],!0)},toggle:function(e){var a=arguments,b=e.guid||h.guid++,d=0,c=function(b){var c=(h._data(this,"lastToggle"+e.guid)||0)%d;h._data(this,"lastToggle"+e.guid,c+1);b.preventDefault();
return a[c].apply(this,arguments)||!1};for(c.guid=b;d<a.length;)a[d++].guid=b;return this.click(c)},hover:function(e,a){return this.mouseenter(e).mouseleave(a||e)}});h.each("blur,focus,focusin,focusout,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error,contextmenu".split(","),function(e,a){h.fn[a]=function(e,b){null==b&&(b=e,e=null);return 0<arguments.length?this.on(a,null,e,b):this.trigger(a)};
h.attrFn&&(h.attrFn[a]=!0);Va.test(a)&&(h.event.fixHooks[a]=h.event.keyHooks);Wa.test(a)&&(h.event.fixHooks[a]=h.event.mouseHooks)});(function(){function e(e,a,b,h,c,f){for(var c=0,g=h.length;c<g;c++){var n=h[c];if(n){for(var k=!1,n=n[e];n;){if(n[d]===b){k=h[n.sizset];break}1===n.nodeType&&!f&&(n[d]=b,n.sizset=c);if(n.nodeName.toLowerCase()===a){k=n;break}n=n[e]}h[c]=k}}}function a(e,b,h,c,f,g){for(var f=0,n=c.length;f<n;f++){var k=c[f];if(k){for(var j=!1,k=k[e];k;){if(k[d]===h){j=c[k.sizset];break}if(1===
k.nodeType)if(g||(k[d]=h,k.sizset=f),"string"!==typeof b){if(k===b){j=!0;break}}else if(0<r.filter(b,[k]).length){j=k;break}k=k[e]}c[f]=j}}}var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),c=0,f=Object.prototype.toString,g=!1,n=!0,k=/\\/g,q=/\r\n/g,j=/\W/;[0,0].sort(function(){n=!1;return 0});var r=function(e,a,h,d){var h=h||[],c=a=a||w;if(1!==a.nodeType&&9!==
a.nodeType)return[];if(!e||"string"!==typeof e)return h;var g,n,k,j,q,o=!0,m=r.isXML(a),s=[],y=e;do if(b.exec(""),g=b.exec(y))if(y=g[3],s.push(g[1]),g[2]){j=g[3];break}while(g);if(1<s.length&&x.exec(e))if(2===s.length&&p.relative[s[0]])n=B(s[0]+s[1],a,d);else for(n=p.relative[s[0]]?[a]:r(s.shift(),a);s.length;)e=s.shift(),p.relative[e]&&(e+=s.shift()),n=B(e,n,d);else if(!d&&1<s.length&&9===a.nodeType&&!m&&p.match.ID.test(s[0])&&!p.match.ID.test(s[s.length-1])&&(g=r.find(s.shift(),a,m),a=g.expr?r.filter(g.expr,
g.set)[0]:g.set[0]),a){g=d?{expr:s.pop(),set:z(d)}:r.find(s.pop(),1===s.length&&("~"===s[0]||"+"===s[0])&&a.parentNode?a.parentNode:a,m);n=g.expr?r.filter(g.expr,g.set):g.set;for(0<s.length?k=z(n):o=!1;s.length;)g=q=s.pop(),p.relative[q]?g=s.pop():q="",null==g&&(g=a),p.relative[q](k,g,m)}else k=[];k||(k=n);k||r.error(q||e);if("[object Array]"===f.call(k))if(o)if(a&&1===a.nodeType)for(e=0;null!=k[e];e++)k[e]&&(!0===k[e]||1===k[e].nodeType&&r.contains(a,k[e]))&&h.push(n[e]);else for(e=0;null!=k[e];e++)k[e]&&
1===k[e].nodeType&&h.push(n[e]);else h.push.apply(h,k);else z(k,h);j&&(r(j,c,h,d),r.uniqueSort(h));return h};r.uniqueSort=function(e){if(v&&(g=n,e.sort(v),g))for(var a=1;a<e.length;a++)e[a]===e[a-1]&&e.splice(a--,1);return e};r.matches=function(e,a){return r(e,null,null,a)};r.matchesSelector=function(e,a){return 0<r(a,null,null,[e]).length};r.find=function(e,a,b){var h,d,c,f,g,n;if(!e)return[];for(d=0,c=p.order.length;d<c;d++)if(g=p.order[d],f=p.leftMatch[g].exec(e))if(n=f[1],f.splice(1,1),"\\"!==
n.substr(n.length-1)&&(f[1]=(f[1]||"").replace(k,""),h=p.find[g](f,a,b),null!=h)){e=e.replace(p.match[g],"");break}h||(h="undefined"!==typeof a.getElementsByTagName?a.getElementsByTagName("*"):[]);return{set:h,expr:e}};r.filter=function(e,a,b,h){for(var d,c,f,g,k,n,j,q,o=e,s=[],x=a,y=a&&a[0]&&r.isXML(a[0]);e&&a.length;){for(f in p.filter)if(null!=(d=p.leftMatch[f].exec(e))&&d[2])if(n=p.filter[f],k=d[1],c=!1,d.splice(1,1),"\\"!==k.substr(k.length-1)){x===s&&(s=[]);if(p.preFilter[f])if(d=p.preFilter[f](d,
x,b,s,h,y)){if(!0===d)continue}else c=g=!0;if(d)for(j=0;null!=(k=x[j]);j++)k&&(g=n(k,d,j,x),q=h^g,b&&null!=g?q?c=!0:x[j]=!1:q&&(s.push(k),c=!0));if(g!==m){b||(x=s);e=e.replace(p.match[f],"");if(!c)return[];break}}if(e===o)if(null==c)r.error(e);else break;o=e}return x};r.error=function(e){throw Error("Syntax error, unrecognized expression: "+e);};var s=r.getText=function(e){var a,b;a=e.nodeType;var h="";if(a)if(1===a||9===a){if("string"===typeof e.textContent)return e.textContent;if("string"===typeof e.innerText)return e.innerText.replace(q,
"");for(e=e.firstChild;e;e=e.nextSibling)h+=s(e)}else{if(3===a||4===a)return e.nodeValue}else for(a=0;b=e[a];a++)8!==b.nodeType&&(h+=s(b));return h},p=r.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,a){var b="string"===typeof a,h=b&&!j.test(a),b=b&&!h;h&&(a=a.toLowerCase());for(var h=0,d=e.length,c;h<d;h++)if(c=e[h]){for(;(c=c.previousSibling)&&1!==c.nodeType;);
e[h]=b||c&&c.nodeName.toLowerCase()===a?c||!1:c===a}b&&r.filter(a,e,!0)},">":function(e,a){var b,h="string"===typeof a,d=0,c=e.length;if(h&&!j.test(a))for(a=a.toLowerCase();d<c;d++){if(b=e[d])b=b.parentNode,e[d]=b.nodeName.toLowerCase()===a?b:!1}else{for(;d<c;d++)(b=e[d])&&(e[d]=h?b.parentNode:b.parentNode===a);h&&r.filter(a,e,!0)}},"":function(b,h,d){var f,g=c++,k=a;"string"===typeof h&&!j.test(h)&&(f=h=h.toLowerCase(),k=e);k("parentNode",h,g,b,f,d)},"~":function(b,h,d){var f,g=c++,k=a;"string"===
typeof h&&!j.test(h)&&(f=h=h.toLowerCase(),k=e);k("previousSibling",h,g,b,f,d)}},find:{ID:function(e,a,b){if("undefined"!==typeof a.getElementById&&!b)return(e=a.getElementById(e[1]))&&e.parentNode?[e]:[]},NAME:function(e,a){if("undefined"!==typeof a.getElementsByName){for(var b=[],h=a.getElementsByName(e[1]),d=0,c=h.length;d<c;d++)h[d].getAttribute("name")===e[1]&&b.push(h[d]);return 0===b.length?null:b}},TAG:function(e,a){if("undefined"!==typeof a.getElementsByTagName)return a.getElementsByTagName(e[1])}},
preFilter:{CLASS:function(e,a,b,h,d,c){e=" "+e[1].replace(k,"")+" ";if(c)return e;for(var c=0,f;null!=(f=a[c]);c++)f&&(d^(f.className&&0<=(" "+f.className+" ").replace(/[\t\n\r]/g," ").indexOf(e))?b||h.push(f):b&&(a[c]=!1));return!1},ID:function(e){return e[1].replace(k,"")},TAG:function(e){return e[1].replace(k,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||r.error(e[0]);e[2]=e[2].replace(/^\+|\s*/g,"");var a=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||
!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=a[1]+(a[2]||1)-0;e[3]=a[3]-0}else e[2]&&r.error(e[0]);e[0]=c++;return e},ATTR:function(e,a,b,h,d,c){a=e[1]=e[1].replace(k,"");!c&&p.attrMap[a]&&(e[1]=p.attrMap[a]);e[4]=(e[4]||e[5]||"").replace(k,"");"~="===e[2]&&(e[4]=" "+e[4]+" ");return e},PSEUDO:function(e,a,h,d,c){if("not"===e[1])if(1<(b.exec(e[3])||"").length||/^\w/.test(e[3]))e[3]=r(e[3],null,null,a);else return e=r.filter(e[3],a,h,1^c),h||d.push.apply(d,e),!1;else if(p.match.POS.test(e[0])||p.match.CHILD.test(e[0]))return!0;
return e},POS:function(e){e.unshift(!0);return e}},filters:{enabled:function(e){return!1===e.disabled&&"hidden"!==e.type},disabled:function(e){return!0===e.disabled},checked:function(e){return!0===e.checked},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return!0===e.selected},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,a,b){return!!r(b[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var a=e.getAttribute("type"),
b=e.type;return"input"===e.nodeName.toLowerCase()&&"text"===b&&(a===b||null===a)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var a=e.nodeName.toLowerCase();return("input"===a||"button"===a)&&"submit"===e.type},
image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var a=e.nodeName.toLowerCase();return("input"===a||"button"===a)&&"reset"===e.type},button:function(e){var a=e.nodeName.toLowerCase();return"input"===a&&"button"===e.type||"button"===a},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,a){return 0===a},last:function(e,a,b,h){return a===h.length-
1},even:function(e,a){return 0===a%2},odd:function(e,a){return 1===a%2},lt:function(e,a,b){return a<b[3]-0},gt:function(e,a,b){return a>b[3]-0},nth:function(e,a,b){return b[3]-0===a},eq:function(e,a,b){return b[3]-0===a}},filter:{PSEUDO:function(e,a,b,h){var d=a[1],c=p.filters[d];if(c)return c(e,b,a,h);if("contains"===d)return 0<=(e.textContent||e.innerText||s([e])||"").indexOf(a[3]);if("not"===d){a=a[3];b=0;for(h=a.length;b<h;b++)if(a[b]===e)return!1;return!0}r.error(d)},CHILD:function(e,a){var b,
h,c,f,g,k;b=a[1];k=e;switch(b){case "only":case "first":for(;k=k.previousSibling;)if(1===k.nodeType)return!1;if("first"===b)return!0;k=e;case "last":for(;k=k.nextSibling;)if(1===k.nodeType)return!1;return!0;case "nth":b=a[2];h=a[3];if(1===b&&0===h)return!0;c=a[0];if((f=e.parentNode)&&(f[d]!==c||!e.nodeIndex)){g=0;for(k=f.firstChild;k;k=k.nextSibling)1===k.nodeType&&(k.nodeIndex=++g);f[d]=c}k=e.nodeIndex-h;return 0===b?0===k:0===k%b&&0<=k/b}},ID:function(e,a){return 1===e.nodeType&&e.getAttribute("id")===
a},TAG:function(e,a){return"*"===a&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===a},CLASS:function(e,a){return-1<(" "+(e.className||e.getAttribute("class"))+" ").indexOf(a)},ATTR:function(e,a){var b=a[1],b=r.attr?r.attr(e,b):p.attrHandle[b]?p.attrHandle[b](e):null!=e[b]?e[b]:e.getAttribute(b),h=b+"",d=a[2],c=a[4];return null==b?"!="===d:!d&&r.attr?null!=b:"="===d?h===c:"*="===d?0<=h.indexOf(c):"~="===d?0<=(" "+h+" ").indexOf(c):!c?h&&!1!==b:"!="===d?h!==c:"^="===d?0===h.indexOf(c):"$="===
d?h.substr(h.length-c.length)===c:"|="===d?h===c||h.substr(0,c.length+1)===c+"-":!1},POS:function(e,a,b,h){var d=p.setFilters[a[2]];if(d)return d(e,b,a,h)}}},x=p.match.POS,y=function(e,a){return"\\"+(a-0+1)},D;for(D in p.match)p.match[D]=RegExp(p.match[D].source+/(?![^\[]*\])(?![^\(]*\))/.source),p.leftMatch[D]=RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[D].source.replace(/\\(\d+)/g,y));var z=function(e,a){e=Array.prototype.slice.call(e,0);return a?(a.push.apply(a,e),a):e};try{Array.prototype.slice.call(w.documentElement.childNodes,
0)[0].nodeType}catch(A){z=function(e,a){var b=0,h=a||[];if("[object Array]"===f.call(e))Array.prototype.push.apply(h,e);else if("number"===typeof e.length)for(var d=e.length;b<d;b++)h.push(e[b]);else for(;e[b];b++)h.push(e[b]);return h}}var v,t;w.documentElement.compareDocumentPosition?v=function(e,a){return e===a?(g=!0,0):!e.compareDocumentPosition||!a.compareDocumentPosition?e.compareDocumentPosition?-1:1:e.compareDocumentPosition(a)&4?-1:1}:(v=function(e,a){if(e===a)return g=!0,0;if(e.sourceIndex&&
a.sourceIndex)return e.sourceIndex-a.sourceIndex;var b,h,d=[],c=[];b=e.parentNode;h=a.parentNode;var f=b;if(b===h)return t(e,a);if(b){if(!h)return 1}else return-1;for(;f;)d.unshift(f),f=f.parentNode;for(f=h;f;)c.unshift(f),f=f.parentNode;b=d.length;h=c.length;for(f=0;f<b&&f<h;f++)if(d[f]!==c[f])return t(d[f],c[f]);return f===b?t(e,c[f],-1):t(d[f],a,1)},t=function(e,a,b){if(e===a)return b;for(e=e.nextSibling;e;){if(e===a)return-1;e=e.nextSibling}return 1});(function(){var e=w.createElement("div"),
a="script"+(new Date).getTime(),b=w.documentElement;e.innerHTML="<a name='"+a+"'/>";b.insertBefore(e,b.firstChild);w.getElementById(a)&&(p.find.ID=function(e,a,b){if("undefined"!==typeof a.getElementById&&!b)return(a=a.getElementById(e[1]))?a.id===e[1]||"undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id").nodeValue===e[1]?[a]:m:[]},p.filter.ID=function(e,a){var b="undefined"!==typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&b&&b.nodeValue===a});b.removeChild(e);
b=e=null})();(function(){var e=w.createElement("div");e.appendChild(w.createComment(""));0<e.getElementsByTagName("*").length&&(p.find.TAG=function(e,a){var b=a.getElementsByTagName(e[1]);if("*"===e[1]){for(var h=[],d=0;b[d];d++)1===b[d].nodeType&&h.push(b[d]);b=h}return b});e.innerHTML="<a href='#'></a>";e.firstChild&&"undefined"!==typeof e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(p.attrHandle.href=function(e){return e.getAttribute("href",2)});e=null})();w.querySelectorAll&&
function(){var e=r,a=w.createElement("div");a.innerHTML="<p class='TEST'></p>";if(!(a.querySelectorAll&&0===a.querySelectorAll(".TEST").length)){r=function(a,b,h,d){b=b||w;if(!d&&!r.isXML(b)){var c=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);if(c&&(1===b.nodeType||9===b.nodeType)){if(c[1])return z(b.getElementsByTagName(a),h);if(c[2]&&p.find.CLASS&&b.getElementsByClassName)return z(b.getElementsByClassName(c[2]),h)}if(9===b.nodeType){if("body"===a&&b.body)return z([b.body],h);if(c&&c[3]){var f=b.getElementById(c[3]);
if(f&&f.parentNode){if(f.id===c[3])return z([f],h)}else return z([],h)}try{return z(b.querySelectorAll(a),h)}catch(g){}}else if(1===b.nodeType&&"object"!==b.nodeName.toLowerCase()){var c=b,k=(f=b.getAttribute("id"))||"__sizzle__",n=b.parentNode,j=/^\s*[+~]/.test(a);f?k=k.replace(/'/g,"\\$&"):b.setAttribute("id",k);j&&n&&(b=b.parentNode);try{if(!j||n)return z(b.querySelectorAll("[id='"+k+"'] "+a),h)}catch(q){}finally{f||c.removeAttribute("id")}}}return e(a,b,h,d)};for(var b in e)r[b]=e[b];a=null}}();
(function(){var e=w.documentElement,a=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(a){var b=!a.call(w.createElement("div"),"div"),h=!1;try{a.call(w.documentElement,"[test!='']:sizzle")}catch(d){h=!0}r.matchesSelector=function(e,d){d=d.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!r.isXML(e))try{if(h||!p.match.PSEUDO.test(d)&&!/!=/.test(d)){var c=a.call(e,d);if(c||!b||e.document&&11!==e.document.nodeType)return c}}catch(f){}return 0<r(d,null,null,[e]).length}}})();
(function(){var e=w.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(p.order.splice(1,0,"CLASS"),p.find.CLASS=function(e,a,b){if("undefined"!==typeof a.getElementsByClassName&&!b)return a.getElementsByClassName(e[1])},e=null))})();r.contains=w.documentElement.contains?function(e,a){return e!==a&&(e.contains?e.contains(a):!0)}:
w.documentElement.compareDocumentPosition?function(e,a){return!!(e.compareDocumentPosition(a)&16)}:function(){return!1};r.isXML=function(e){return(e=(e?e.ownerDocument||e:0).documentElement)?"HTML"!==e.nodeName:!1};var B=function(e,a,b){for(var h,d=[],c="",a=a.nodeType?[a]:a;h=p.match.PSEUDO.exec(e);)c+=h[0],e=e.replace(p.match.PSEUDO,"");e=p.relative[e]?e+"*":e;h=0;for(var f=a.length;h<f;h++)r(e,a[h],d,b);return r.filter(c,d)};r.attr=h.attr;r.selectors.attrMap={};h.find=r;h.expr=r.selectors;h.expr[":"]=
h.expr.filters;h.unique=r.uniqueSort;h.text=r.getText;h.isXMLDoc=r.isXML;h.contains=r.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,La=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,va=h.expr.match.POS,cb={children:!0,contents:!0,next:!0,prev:!0};h.fn.extend({find:function(e){var a=this,b,d;if("string"!==typeof e)return h(e).filter(function(){for(b=0,d=a.length;b<d;b++)if(h.contains(a[b],this))return!0});var c=this.pushStack("","find",e),f,g,k;for(b=0,d=this.length;b<d;b++)if(f=
c.length,h.find(e,this[b],c),0<b)for(g=f;g<c.length;g++)for(k=0;k<f;k++)if(c[k]===c[g]){c.splice(g--,1);break}return c},has:function(e){var a=h(e);return this.filter(function(){for(var e=0,b=a.length;e<b;e++)if(h.contains(this,a[e]))return!0})},not:function(e){return this.pushStack(f(this,e,!1),"not",e)},filter:function(e){return this.pushStack(f(this,e,!0),"filter",e)},is:function(e){return!!e&&("string"===typeof e?va.test(e)?0<=h(e,this.context).index(this[0]):0<h.filter(e,this).length:0<this.filter(e).length)},
closest:function(e,a){var b=[],d,c,f=this[0];if(h.isArray(e)){for(c=1;f&&f.ownerDocument&&f!==a;){for(d=0;d<e.length;d++)h(f).is(e[d])&&b.push({selector:e[d],elem:f,level:c});f=f.parentNode;c++}return b}var g=va.test(e)||"string"!==typeof e?h(e,a||this.context):0;for(d=0,c=this.length;d<c;d++)for(f=this[d];f;)if(g?-1<g.index(f):h.find.matchesSelector(f,e)){b.push(f);break}else if(f=f.parentNode,!f||!f.ownerDocument||f===a||11===f.nodeType)break;b=1<b.length?h.unique(b):b;return this.pushStack(b,"closest",
e)},index:function(e){return!e?this[0]&&this[0].parentNode?this.prevAll().length:-1:"string"===typeof e?h.inArray(this[0],h(e)):h.inArray(e.jquery?e[0]:e,this)},add:function(e,a){var b="string"===typeof e?h(e,a):h.makeArray(e&&e.nodeType?[e]:e),d=h.merge(this.get(),b);return this.pushStack(!b[0]||!b[0].parentNode||11===b[0].parentNode.nodeType||!d[0]||!d[0].parentNode||11===d[0].parentNode.nodeType?d:h.unique(d))},andSelf:function(){return this.add(this.prevObject)}});h.each({parent:function(e){return(e=
e.parentNode)&&11!==e.nodeType?e:null},parents:function(e){return h.dir(e,"parentNode")},parentsUntil:function(e,a,b){return h.dir(e,"parentNode",b)},next:function(e){return h.nth(e,2,"nextSibling")},prev:function(e){return h.nth(e,2,"previousSibling")},nextAll:function(e){return h.dir(e,"nextSibling")},prevAll:function(e){return h.dir(e,"previousSibling")},nextUntil:function(e,a,b){return h.dir(e,"nextSibling",b)},prevUntil:function(e,a,b){return h.dir(e,"previousSibling",b)},siblings:function(e){return h.sibling(e.parentNode.firstChild,
e)},children:function(e){return h.sibling(e.firstChild)},contents:function(e){return h.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:h.makeArray(e.childNodes)}},function(e,a){h.fn[e]=function(b,d){var c=h.map(this,a,b);Za.test(e)||(d=b);d&&"string"===typeof d&&(c=h.filter(d,c));c=1<this.length&&!cb[e]?h.unique(c):c;if((1<this.length||ab.test(d))&&$a.test(e))c=c.reverse();return this.pushStack(c,e,bb.call(arguments).join(","))}});h.extend({filter:function(e,a,b){b&&(e=":not("+e+
")");return 1===a.length?h.find.matchesSelector(a[0],e)?[a[0]]:[]:h.find.matches(e,a)},dir:function(e,a,b){for(var d=[],e=e[a];e&&9!==e.nodeType&&(b===m||1!==e.nodeType||!h(e).is(b));)1===e.nodeType&&d.push(e),e=e[a];return d},nth:function(e,a,b){for(var a=a||1,h=0;e&&!(1===e.nodeType&&++h===a);e=e[b]);return e},sibling:function(e,a){for(var b=[];e;e=e.nextSibling)1===e.nodeType&&e!==a&&b.push(e);return b}});var ka="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
db=/ jQuery\d+="(?:\d+|null)"/g,ha=/^\s+/,wa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,xa=/<([\w:]+)/,eb=/<tbody/i,fb=/<|&#?\w+;/,gb=/<(?:script|style)/i,hb=/<(?:script|object|embed|option|style)/i,ya=RegExp("<(?:"+ka+")","i"),za=/checked\s*(?:[^=]|=\s*.checked.)/i,ib=/\/(java|ecma)script/i,Ma=/^\s*<!(?:\[CDATA\[|\-\-)/,H={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>",
"</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Aa=n(w);H.optgroup=H.option;H.tbody=H.tfoot=H.colgroup=H.caption=H.thead;H.th=H.td;h.support.htmlSerialize||(H._default=[1,"div<div>","</div>"]);h.fn.extend({text:function(e){return h.isFunction(e)?this.each(function(a){var b=h(this);b.text(e.call(this,a,b.text()))}):"object"!==typeof e&&e!==m?this.empty().append((this[0]&&
this[0].ownerDocument||w).createTextNode(e)):h.text(this)},wrapAll:function(e){if(h.isFunction(e))return this.each(function(a){h(this).wrapAll(e.call(this,a))});if(this[0]){var a=h(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&a.insertBefore(this[0]);a.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return h.isFunction(e)?this.each(function(a){h(this).wrapInner(e.call(this,a))}):this.each(function(){var a=
h(this),b=a.contents();b.length?b.wrapAll(e):a.append(e)})},wrap:function(e){var a=h.isFunction(e);return this.each(function(b){h(this).wrapAll(a?e.call(this,b):e)})},unwrap:function(){return this.parent().each(function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.insertBefore(e,
this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=h.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,
h.clean(arguments));return e}},remove:function(e,a){for(var b=0,d;null!=(d=this[b]);b++)if(!e||h.filter(e,[d]).length)!a&&1===d.nodeType&&(h.cleanData(d.getElementsByTagName("*")),h.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var e=0,a;null!=(a=this[e]);e++)for(1===a.nodeType&&h.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);return this},clone:function(e,a){e=null==e?!1:e;a=null==a?e:a;return this.map(function(){return h.clone(this,
e,a)})},html:function(e){if(e===m)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(db,""):null;if("string"===typeof e&&!gb.test(e)&&(h.support.leadingWhitespace||!ha.test(e))&&!H[(xa.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(wa,"<$1></$2>");try{for(var a=0,b=this.length;a<b;a++)1===this[a].nodeType&&(h.cleanData(this[a].getElementsByTagName("*")),this[a].innerHTML=e)}catch(d){this.empty().append(e)}}else h.isFunction(e)?this.each(function(a){var b=h(this);b.html(e.call(this,a,
b.html()))}):this.empty().append(e);return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(h.isFunction(e))return this.each(function(a){var b=h(this),d=b.html();b.replaceWith(e.call(this,a,d))});"string"!==typeof e&&(e=h(e).detach());return this.each(function(){var a=this.nextSibling,b=this.parentNode;h(this).remove();a?h(a).before(e):h(b).append(e)})}return this.length?this.pushStack(h(h.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,
a,b){var d,c,f,g=e[0],k=[];if(!h.support.checkClone&&3===arguments.length&&"string"===typeof g&&za.test(g))return this.each(function(){h(this).domManip(e,a,b,!0)});if(h.isFunction(g))return this.each(function(d){var c=h(this);e[0]=g.call(this,d,a?c.html():m);c.domManip(e,a,b)});if(this[0]){d=g&&g.parentNode;d=h.support.parentNode&&d&&11===d.nodeType&&d.childNodes.length===this.length?{fragment:d}:h.buildFragment(e,this,k);f=d.fragment;if(c=1===f.childNodes.length?f=f.firstChild:f.firstChild){a=a&&
h.nodeName(c,"tr");c=0;for(var n=this.length,j=n-1;c<n;c++)b.call(a?h.nodeName(this[c],"table")?this[c].getElementsByTagName("tbody")[0]||this[c].appendChild(this[c].ownerDocument.createElement("tbody")):this[c]:this[c],d.cacheable||1<n&&c<j?h.clone(f,!0,!0):f)}k.length&&h.each(k,q)}return this}});h.buildFragment=function(e,a,b){var d,c,f,g,k=e[0];a&&a[0]&&(g=a[0].ownerDocument||a[0]);g.createDocumentFragment||(g=w);if(1===e.length&&"string"===typeof k&&512>k.length&&g===w&&"<"===k.charAt(0)&&!hb.test(k)&&
(h.support.checkClone||!za.test(k))&&(h.support.html5Clone||!ya.test(k)))c=!0,(f=h.fragments[k])&&1!==f&&(d=f);d||(d=g.createDocumentFragment(),h.clean(e,g,d,b));c&&(h.fragments[k]=f?d:1);return{fragment:d,cacheable:c}};h.fragments={};h.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){h.fn[e]=function(b){var d=[],b=h(b),c=1===this.length&&this[0].parentNode;if(c&&11===c.nodeType&&1===c.childNodes.length&&1===b.length)return b[a](this[0]),
this;for(var c=0,f=b.length;c<f;c++){var g=(0<c?this.clone(!0):this).get();h(b[c])[a](g);d=d.concat(g)}return this.pushStack(d,e,b.selector)}});h.extend({clone:function(e,a,b){var d,c,f;h.support.html5Clone||!ya.test("<"+e.nodeName)?d=e.cloneNode(!0):(d=w.createElement("div"),Aa.appendChild(d),d.innerHTML=e.outerHTML,d=d.firstChild);var g=d;if((!h.support.noCloneEvent||!h.support.noCloneChecked)&&(1===e.nodeType||11===e.nodeType)&&!h.isXMLDoc(e)){t(e,g);d=u(e);c=u(g);for(f=0;d[f];++f)c[f]&&t(d[f],
c[f])}if(a&&(v(e,g),b)){d=u(e);c=u(g);for(f=0;d[f];++f)v(d[f],c[f])}return g},clean:function(e,a,b,d){a=a||w;"undefined"===typeof a.createElement&&(a=a.ownerDocument||a[0]&&a[0].ownerDocument||w);for(var c=[],f,g=0,k;null!=(k=e[g]);g++)if("number"===typeof k&&(k+=""),k){if("string"===typeof k)if(fb.test(k)){k=k.replace(wa,"<$1></$2>");f=(xa.exec(k)||["",""])[1].toLowerCase();var j=H[f]||H._default,q=j[0],r=a.createElement("div");a===w?Aa.appendChild(r):n(a).appendChild(r);for(r.innerHTML=j[1]+k+j[2];q--;)r=
r.lastChild;if(!h.support.tbody){q=eb.test(k);j="table"===f&&!q?r.firstChild&&r.firstChild.childNodes:"<table>"===j[1]&&!q?r.childNodes:[];for(f=j.length-1;0<=f;--f)h.nodeName(j[f],"tbody")&&!j[f].childNodes.length&&j[f].parentNode.removeChild(j[f])}!h.support.leadingWhitespace&&ha.test(k)&&r.insertBefore(a.createTextNode(ha.exec(k)[0]),r.firstChild);k=r.childNodes}else k=a.createTextNode(k);var s;if(!h.support.appendChecked)if(k[0]&&"number"===typeof(s=k.length))for(f=0;f<s;f++)y(k[f]);else y(k);
k.nodeType?c.push(k):c=h.merge(c,k)}if(b){e=function(e){return!e.type||ib.test(e.type)};for(g=0;c[g];g++)d&&h.nodeName(c[g],"script")&&(!c[g].type||"text/javascript"===c[g].type.toLowerCase())?d.push(c[g].parentNode?c[g].parentNode.removeChild(c[g]):c[g]):(1===c[g].nodeType&&(a=h.grep(c[g].getElementsByTagName("script"),e),c.splice.apply(c,[g+1,0].concat(a))),b.appendChild(c[g]))}return c},cleanData:function(e){for(var a,b,d=h.cache,c=h.event.special,f=h.support.deleteExpando,g=0,k;null!=(k=e[g]);g++)if(!k.nodeName||
!h.noData[k.nodeName.toLowerCase()])if(b=k[h.expando]){if((a=d[b])&&a.events){for(var n in a.events)c[n]?h.event.remove(k,n):h.removeEvent(k,n,a.handle);a.handle&&(a.handle.elem=null)}f?delete k[h.expando]:k.removeAttribute&&k.removeAttribute(h.expando);delete d[b]}}});var ia=/alpha\([^)]*\)/i,jb=/opacity=([^)]*)/,kb=/([A-Z]|^ms)/g,Ba=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb=/^([\-+])=([\-+.\de]+)/,nb={position:"absolute",visibility:"hidden",display:"block"},Na=["Left","Right"],Oa=["Top","Bottom"],S,Ca,Da;
h.fn.css=function(e,a){return 2===arguments.length&&a===m?this:h.access(this,e,a,!0,function(e,a,b){return b!==m?h.style(e,a,b):h.css(e,a)})};h.extend({cssHooks:{opacity:{get:function(e,a){if(a){var b=S(e,"opacity","opacity");return""===b?"1":b}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":h.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,a,b,d){if(e&&!(3===e.nodeType||8===e.nodeType||
!e.style)){var c,f=h.camelCase(a),g=e.style,k=h.cssHooks[f],a=h.cssProps[f]||f;if(b!==m){d=typeof b;if("string"===d&&(c=mb.exec(b)))b=+(c[1]+1)*+c[2]+parseFloat(h.css(e,a)),d="number";if(!(null==b||"number"===d&&isNaN(b)))if("number"===d&&!h.cssNumber[f]&&(b+="px"),!k||!("set"in k)||(b=k.set(e,b))!==m)try{g[a]=b}catch(n){}}else return k&&"get"in k&&(c=k.get(e,!1,d))!==m?c:g[a]}},css:function(e,a,b){var d,c,a=h.camelCase(a);c=h.cssHooks[a];a=h.cssProps[a]||a;"cssFloat"===a&&(a="float");if(c&&"get"in
c&&(d=c.get(e,!0,b))!==m)return d;if(S)return S(e,a)},swap:function(e,a,b){var h={},d;for(d in a)h[d]=e.style[d],e.style[d]=a[d];b.call(e);for(d in a)e.style[d]=h[d]}});h.curCSS=h.css;h.each(["height","width"],function(e,a){h.cssHooks[a]={get:function(e,b,d){var c;if(b){if(0!==e.offsetWidth)return x(e,a,d);h.swap(e,nb,function(){c=x(e,a,d)});return c}},set:function(e,a){if(Ba.test(a)){if(a=parseFloat(a),0<=a)return a+"px"}else return a}}});h.support.opacity||(h.cssHooks.opacity={get:function(e,a){return jb.test((a&&
e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":a?"1":""},set:function(e,a){var b=e.style,d=e.currentStyle,c=h.isNumeric(a)?"alpha(opacity="+100*a+")":"",f=d&&d.filter||b.filter||"";b.zoom=1;if(1<=a&&""===h.trim(f.replace(ia,""))&&(b.removeAttribute("filter"),d&&!d.filter))return;b.filter=ia.test(f)?f.replace(ia,c):f+" "+c}});h(function(){h.support.reliableMarginRight||(h.cssHooks.marginRight={get:function(e,a){var b;h.swap(e,{display:"inline-block"},function(){b=
a?S(e,"margin-right","marginRight"):e.style.marginRight});return b}})});w.defaultView&&w.defaultView.getComputedStyle&&(Ca=function(e,a){var b,d,c,a=a.replace(kb,"-$1").toLowerCase();if((d=e.ownerDocument.defaultView)&&(c=d.getComputedStyle(e,null)))b=c.getPropertyValue(a),""===b&&!h.contains(e.ownerDocument.documentElement,e)&&(b=h.style(e,a));return b});w.documentElement.currentStyle&&(Da=function(e,a){var b,h,d=e.currentStyle&&e.currentStyle[a],c=e.style;if(null===d&&c&&(b=c[a]))d=b;if(!Ba.test(d)&&
lb.test(d)){b=c.left;if(h=e.runtimeStyle&&e.runtimeStyle.left)e.runtimeStyle.left=e.currentStyle.left;c.left="fontSize"===a?"1em":d||0;d=c.pixelLeft+"px";c.left=b;h&&(e.runtimeStyle.left=h)}return""===d?"auto":d});S=Ca||Da;h.expr&&h.expr.filters&&(h.expr.filters.hidden=function(e){var a=e.offsetHeight;return 0===e.offsetWidth&&0===a||!h.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||h.css(e,"display"))},h.expr.filters.visible=function(e){return!h.expr.filters.hidden(e)});var ob=
/%20/g,Pa=/\[\]$/,Ea=/\r?\n/g,pb=/#.*$/,qb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rb=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,sb=/^(?:GET|HEAD)$/,tb=/^\/\//,Fa=/\?/,ub=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,vb=/^(?:select|textarea)/i,la=/\s+/,wb=/([?&])_=[^&]*/,Ga=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Ha=h.fn.load,da={},Ia={},Q,R,Ja=["*/"]+["*"];try{Q=K.href}catch(Cb){Q=w.createElement("a"),Q.href="",Q=Q.href}R=
Ga.exec(Q.toLowerCase())||[];h.fn.extend({load:function(e,a,b){if("string"!==typeof e&&Ha)return Ha.apply(this,arguments);if(!this.length)return this;var d=e.indexOf(" ");if(0<=d)var c=e.slice(d,e.length),e=e.slice(0,d);d="GET";a&&(h.isFunction(a)?(b=a,a=m):"object"===typeof a&&(a=h.param(a,h.ajaxSettings.traditional),d="POST"));var f=this;h.ajax({url:e,type:d,dataType:"html",data:a,complete:function(e,a,d){d=e.responseText;e.isResolved()&&(e.done(function(e){d=e}),f.html(c?h("<div>").append(d.replace(ub,
"")).find(c):d));b&&f.each(b,[d,a,e])}});return this},serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?h.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||vb.test(this.nodeName)||rb.test(this.type))}).map(function(e,a){var b=h(this).val();return null==b?null:h.isArray(b)?h.map(b,function(e){return{name:a.name,value:e.replace(Ea,"\r\n")}}):{name:a.name,value:b.replace(Ea,
"\r\n")}}).get()}});h.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(e,a){h.fn[a]=function(e){return this.on(a,e)}});h.each(["get","post"],function(e,a){h[a]=function(e,b,d,c){h.isFunction(b)&&(c=c||d,d=b,b=m);return h.ajax({type:a,url:e,data:b,success:d,dataType:c})}});h.extend({getScript:function(e,a){return h.get(e,m,a,"script")},getJSON:function(e,a,b){return h.get(e,a,b,"json")},ajaxSetup:function(e,a){a?r(e,h.ajaxSettings):(a=e,e=h.ajaxSettings);r(e,
a);return e},ajaxSettings:{url:Q,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(R[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ja},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":c.String,"text html":!0,"text json":h.parseJSON,
"text xml":h.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:A(da),ajaxTransport:A(Ia),ajax:function(e,a){function b(e,a,q,r){if(2!==z){z=2;y&&clearTimeout(y);x=m;s=r||"";t.readyState=0<e?4:0;var p,o,D,r=a;if(q){var v=d,B=t,K=v.contents,E=v.dataTypes,u=v.responseFields,w,C,F,O;for(C in u)C in q&&(B[u[C]]=q[C]);for(;"*"===E[0];)E.shift(),w===m&&(w=v.mimeType||B.getResponseHeader("content-type"));if(w)for(C in K)if(K[C]&&K[C].test(w)){E.unshift(C);break}if(E[0]in q)F=E[0];else{for(C in q){if(!E[0]||
v.converters[C+" "+E[0]]){F=C;break}O||(O=C)}F=F||O}F?(F!==E[0]&&E.unshift(F),q=q[F]):q=void 0}else q=m;if(200<=e&&300>e||304===e){if(d.ifModified){if(w=t.getResponseHeader("Last-Modified"))h.lastModified[j]=w;if(w=t.getResponseHeader("Etag"))h.etag[j]=w}if(304===e)r="notmodified",p=!0;else try{w=d;w.dataFilter&&(q=w.dataFilter(q,w.dataType));var ba=w.dataTypes;C={};var G,L,ca=ba.length,J,N=ba[0],U,fa,H,P,I;for(G=1;G<ca;G++){if(1===G)for(L in w.converters)"string"===typeof L&&(C[L.toLowerCase()]=
w.converters[L]);U=N;N=ba[G];if("*"===N)N=U;else if("*"!==U&&U!==N){fa=U+" "+N;H=C[fa]||C["* "+N];if(!H)for(P in I=m,C)if(J=P.split(" "),J[0]===U||"*"===J[0])if(I=C[J[1]+" "+N]){P=C[P];!0===P?H=I:!0===I&&(H=P);break}!H&&!I&&h.error("No conversion from "+fa.replace(" "," to "));!0!==H&&(q=H?H(q):I(P(q)))}}o=q;r="success";p=!0}catch(M){r="parsererror",D=M}}else if(D=r,!r||e)r="error",0>e&&(e=0);t.status=e;t.statusText=""+(a||r);p?g.resolveWith(c,[o,r,t]):g.rejectWith(c,[t,r,D]);t.statusCode(n);n=m;
A&&f.trigger("ajax"+(p?"Success":"Error"),[t,d,p?o:D]);k.fireWith(c,[t,r]);A&&(f.trigger("ajaxComplete",[t,d]),--h.active||h.event.trigger("ajaxStop"))}}"object"===typeof e&&(a=e,e=m);var a=a||{},d=h.ajaxSetup({},a),c=d.context||d,f=c!==d&&(c.nodeType||c instanceof h)?h(c):h.event,g=h.Deferred(),k=h.Callbacks("once memory"),n=d.statusCode||{},j,q={},r={},s,p,x,y,D,z=0,A,v,t={readyState:0,setRequestHeader:function(e,a){if(!z){var b=e.toLowerCase(),e=r[b]=r[b]||e;q[e]=a}return this},getAllResponseHeaders:function(){return 2===
z?s:null},getResponseHeader:function(e){var a;if(2===z){if(!p)for(p={};a=qb.exec(s);)p[a[1].toLowerCase()]=a[2];a=p[e.toLowerCase()]}return a===m?null:a},overrideMimeType:function(e){z||(d.mimeType=e);return this},abort:function(e){e=e||"abort";x&&x.abort(e);b(0,e);return this}};g.promise(t);t.success=t.done;t.error=t.fail;t.complete=k.add;t.statusCode=function(e){if(e){var a;if(2>z)for(a in e)n[a]=[n[a],e[a]];else a=e[t.status],t.then(a,a)}return this};d.url=((e||d.url)+"").replace(pb,"").replace(tb,
R[1]+"//");d.dataTypes=h.trim(d.dataType||"*").toLowerCase().split(la);null==d.crossDomain&&(D=Ga.exec(d.url.toLowerCase()),d.crossDomain=!(!D||!(D[1]!=R[1]||D[2]!=R[2]||(D[3]||("http:"===D[1]?80:443))!=(R[3]||("http:"===R[1]?80:443)))));d.data&&d.processData&&"string"!==typeof d.data&&(d.data=h.param(d.data,d.traditional));B(da,d,a,t);if(2===z)return!1;A=d.global;d.type=d.type.toUpperCase();d.hasContent=!sb.test(d.type);A&&0===h.active++&&h.event.trigger("ajaxStart");if(!d.hasContent&&(d.data&&(d.url+=
(Fa.test(d.url)?"&":"?")+d.data,delete d.data),j=d.url,!1===d.cache)){D=h.now();var K=d.url.replace(wb,"$1_="+D);d.url=K+(K===d.url?(Fa.test(d.url)?"&":"?")+"_="+D:"")}(d.data&&d.hasContent&&!1!==d.contentType||a.contentType)&&t.setRequestHeader("Content-Type",d.contentType);d.ifModified&&(j=j||d.url,h.lastModified[j]&&t.setRequestHeader("If-Modified-Since",h.lastModified[j]),h.etag[j]&&t.setRequestHeader("If-None-Match",h.etag[j]));t.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?
d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Ja+"; q=0.01":""):d.accepts["*"]);for(v in d.headers)t.setRequestHeader(v,d.headers[v]);if(d.beforeSend&&(!1===d.beforeSend.call(c,t,d)||2===z))return t.abort(),!1;for(v in{success:1,error:1,complete:1})t[v](d[v]);if(x=B(Ia,d,a,t)){t.readyState=1;A&&f.trigger("ajaxSend",[t,d]);d.async&&0<d.timeout&&(y=setTimeout(function(){t.abort("timeout")},d.timeout));try{z=1,x.send(q,b)}catch(E){if(2>z)b(-1,E);else throw E;}}else b(-1,"No Transport");return t},
param:function(e,a){var b=[],d=function(e,a){a=h.isFunction(a)?a():a;b[b.length]=encodeURIComponent(e)+"="+encodeURIComponent(a)};a===m&&(a=h.ajaxSettings.traditional);if(h.isArray(e)||e.jquery&&!h.isPlainObject(e))h.each(e,function(){d(this.name,this.value)});else for(var c in e)p(c,e[c],a,d);return b.join("&").replace(ob,"+")}});h.extend({active:0,lastModified:{},etag:{}});var xb=h.now(),Z=/(\=)\?(&|$)|\?\?/i;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return h.expando+"_"+xb++}});h.ajaxPrefilter("json jsonp",
function(e,a,b){a="application/x-www-form-urlencoded"===e.contentType&&"string"===typeof e.data;if("jsonp"===e.dataTypes[0]||!1!==e.jsonp&&(Z.test(e.url)||a&&Z.test(e.data))){var d,f=e.jsonpCallback=h.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,g=c[f],k=e.url,n=e.data,j="$1"+f+"$2";!1!==e.jsonp&&(k=k.replace(Z,j),e.url===k&&(a&&(n=n.replace(Z,j)),e.data===n&&(k+=(/\?/.test(k)?"&":"?")+e.jsonp+"="+f)));e.url=k;e.data=n;c[f]=function(e){d=[e]};b.always(function(){c[f]=g;if(d&&h.isFunction(g))c[f](d[0])});
e.converters["script json"]=function(){d||h.error(f+" was not called");return d[0]};e.dataTypes[0]="json";return"script"}});h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){h.globalEval(e);return e}}});h.ajaxPrefilter("script",function(e){e.cache===m&&(e.cache=!1);e.crossDomain&&(e.type="GET",e.global=!1)});h.ajaxTransport("script",function(e){if(e.crossDomain){var a,
b=w.head||w.getElementsByTagName("head")[0]||w.documentElement;return{send:function(d,h){a=w.createElement("script");a.async="async";e.scriptCharset&&(a.charset=e.scriptCharset);a.src=e.url;a.onload=a.onreadystatechange=function(e,d){if(d||!a.readyState||/loaded|complete/.test(a.readyState))a.onload=a.onreadystatechange=null,b&&a.parentNode&&b.removeChild(a),a=m,d||h(200,"success")};b.insertBefore(a,b.firstChild)},abort:function(){if(a)a.onload(0,1)}}}});var ja=c.ActiveXObject?function(){for(var e in V)V[e](0,
1)}:!1,yb=0,V;h.ajaxSettings.xhr=c.ActiveXObject?function(){var e;if(!(e=!this.isLocal&&z()))a:{try{e=new c.ActiveXObject("Microsoft.XMLHTTP");break a}catch(a){}e=void 0}return e}:z;(function(e){h.extend(h.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})})(h.ajaxSettings.xhr());h.support.ajax&&h.ajaxTransport(function(e){if(!e.crossDomain||h.support.cors){var a;return{send:function(b,d){var f=e.xhr(),k,g;e.username?f.open(e.type,e.url,e.async,e.username,e.password):f.open(e.type,e.url,e.async);
if(e.xhrFields)for(g in e.xhrFields)f[g]=e.xhrFields[g];e.mimeType&&f.overrideMimeType&&f.overrideMimeType(e.mimeType);!e.crossDomain&&!b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");try{for(g in b)f.setRequestHeader(g,b[g])}catch(n){}f.send(e.hasContent&&e.data||null);a=function(b,c){var g,n,j,q,r;try{if(a&&(c||4===f.readyState))if(a=m,k&&(f.onreadystatechange=h.noop,ja&&delete V[k]),c)4!==f.readyState&&f.abort();else{g=f.status;j=f.getAllResponseHeaders();q={};if((r=f.responseXML)&&
r.documentElement)q.xml=r;q.text=f.responseText;try{n=f.statusText}catch(s){n=""}!g&&e.isLocal&&!e.crossDomain?g=q.text?200:404:1223===g&&(g=204)}}catch(p){c||d(-1,p)}q&&d(g,n,q,j)};!e.async||4===f.readyState?a():(k=++yb,ja&&(V||(V={},h(c).unload(ja)),V[k]=a),f.onreadystatechange=a)},abort:function(){a&&a(0,1)}}}});var ea={},I,T,zb=/^(?:toggle|show|hide)$/,Ab=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,aa,ma=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight",
"paddingLeft","paddingRight"],["opacity"]],W;h.fn.extend({show:function(e,a,b){if(e||0===e)return this.animate(F("show",3),e,a,b);for(var b=0,d=this.length;b<d;b++)e=this[b],e.style&&(a=e.style.display,!h._data(e,"olddisplay")&&"none"===a&&(a=e.style.display=""),""===a&&"none"===h.css(e,"display")&&h._data(e,"olddisplay",G(e.nodeName)));for(b=0;b<d;b++)if(e=this[b],e.style&&(a=e.style.display,""===a||"none"===a))e.style.display=h._data(e,"olddisplay")||"";return this},hide:function(e,a,b){if(e||0===
e)return this.animate(F("hide",3),e,a,b);for(var b=0,d=this.length;b<d;b++)e=this[b],e.style&&(a=h.css(e,"display"),"none"!==a&&!h._data(e,"olddisplay")&&h._data(e,"olddisplay",a));for(b=0;b<d;b++)this[b].style&&(this[b].style.display="none");return this},_toggle:h.fn.toggle,toggle:function(e,a,b){var d="boolean"===typeof e;h.isFunction(e)&&h.isFunction(a)?this._toggle.apply(this,arguments):null==e||d?this.each(function(){var a=d?e:h(this).is(":hidden");h(this)[a?"show":"hide"]()}):this.animate(F("toggle",
3),e,a,b);return this},fadeTo:function(e,a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:a},e,b,d)},animate:function(e,a,b,d){function c(){!1===f.queue&&h._mark(this);var a=h.extend({},f),b=1===this.nodeType,d=b&&h(this).is(":hidden"),g,k,n,j,q;a.animatedProperties={};for(n in e){g=h.camelCase(n);n!==g&&(e[g]=e[n],delete e[n]);k=e[g];h.isArray(k)?(a.animatedProperties[g]=k[1],k=e[g]=k[0]):a.animatedProperties[g]=a.specialEasing&&a.specialEasing[g]||a.easing||"swing";
if("hide"===k&&d||"show"===k&&!d)return a.complete.call(this);if(b&&("height"===g||"width"===g))a.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===h.css(this,"display")&&"none"===h.css(this,"float")&&(!h.support.inlineBlockNeedsLayout||"inline"===G(this.nodeName)?this.style.display="inline-block":this.style.zoom=1)}null!=a.overflow&&(this.style.overflow="hidden");for(n in e)if(b=new h.fx(this,a,n),k=e[n],zb.test(k))if(g=h._data(this,"toggle"+n)||("toggle"===k?d?
"show":"hide":0))h._data(this,"toggle"+n,"show"===g?"hide":"show"),b[g]();else b[k]();else g=Ab.exec(k),j=b.cur(),g?(k=parseFloat(g[2]),q=g[3]||(h.cssNumber[n]?"":"px"),"px"!==q&&(h.style(this,n,(k||1)+q),j*=(k||1)/b.cur(),h.style(this,n,j+q)),g[1]&&(k=("-="===g[1]?-1:1)*k+j),b.custom(j,k,q)):b.custom(j,k,"");return!0}var f=h.speed(a,b,d);if(h.isEmptyObject(e))return this.each(f.complete,[!1]);e=h.extend({},e);return!1===f.queue?this.each(c):this.queue(f.queue,c)},stop:function(e,a,b){"string"!==
typeof e&&(b=a,a=e,e=m);a&&!1!==e&&this.queue(e||"fx",[]);return this.each(function(){var a,d=!1,c=h.timers,f=h._data(this);b||h._unmark(!0,this);if(null==e)for(a in f){if(f[a]&&f[a].stop&&a.indexOf(".run")===a.length-4){var g=f[a];h.removeData(this,a,!0);g.stop(b)}}else if(f[a=e+".run"]&&f[a].stop)f=f[a],h.removeData(this,a,!0),f.stop(b);for(a=c.length;a--;)if(c[a].elem===this&&(null==e||c[a].queue===e)){if(b)c[a](!0);else c[a].saveState();d=!0;c.splice(a,1)}(!b||!d)&&h.dequeue(this,e)})}});h.each({slideDown:F("show",
1),slideUp:F("hide",1),slideToggle:F("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){h.fn[a]=function(a,e,d){return this.animate(b,a,e,d)}});h.extend({speed:function(a,b,d){var c=a&&"object"===typeof a?h.extend({},a):{complete:d||!d&&b||h.isFunction(a)&&a,duration:a,easing:d&&b||b&&!h.isFunction(b)&&b};c.duration=h.fx.off?0:"number"===typeof c.duration?c.duration:c.duration in h.fx.speeds?h.fx.speeds[c.duration]:h.fx.speeds._default;if(null==
c.queue||!0===c.queue)c.queue="fx";c.old=c.complete;c.complete=function(a){h.isFunction(c.old)&&c.old.call(this);c.queue?h.dequeue(this,c.queue):!1!==a&&h._unmark(this)};return c},easing:{linear:function(a,b,d,h){return d+h*a},swing:function(a,b,d,h){return(-Math.cos(a*Math.PI)/2+0.5)*h+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;b.orig=b.orig||{}}});h.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(h.fx.step[this.prop]||
h.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var a,b=h.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||"auto"===b?0:b:a},custom:function(a,b,d){function c(a){return f.step(a)}var f=this,g=h.fx;this.startTime=W||E();this.end=b;this.now=this.start=a;this.pos=this.state=0;this.unit=d||this.unit||(h.cssNumber[this.prop]?"":"px");c.queue=this.options.queue;c.elem=this.elem;c.saveState=
function(){f.options.hide&&h._data(f.elem,"fxshow"+f.prop)===m&&h._data(f.elem,"fxshow"+f.prop,f.start)};c()&&h.timers.push(c)&&!aa&&(aa=setInterval(g.tick,g.interval))},show:function(){var a=h._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||h.style(this.elem,this.prop);this.options.show=!0;a!==m?this.custom(this.cur(),a):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur());h(this.elem).show()},hide:function(){this.options.orig[this.prop]=h._data(this.elem,"fxshow"+
this.prop)||h.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(a){var b,d=W||E(),c=!0,f=this.elem,g=this.options;if(a||d>=g.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();g.animatedProperties[this.prop]=!0;for(b in g.animatedProperties)!0!==g.animatedProperties[b]&&(c=!1);if(c){null!=g.overflow&&!h.support.shrinkWrapBlocks&&h.each(["","X","Y"],function(a,e){f.style["overflow"+e]=g.overflow[a]});g.hide&&h(f).hide();if(g.hide||
g.show)for(b in g.animatedProperties)h.style(f,b,g.orig[b]),h.removeData(f,"fxshow"+b,!0),h.removeData(f,"toggle"+b,!0);if(a=g.complete)g.complete=!1,a.call(f)}return!1}Infinity==g.duration?this.now=d:(a=d-this.startTime,this.state=a/g.duration,this.pos=h.easing[g.animatedProperties[this.prop]](this.state,a,0,1,g.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};h.extend(h.fx,{tick:function(){for(var a,b=h.timers,d=0;d<b.length;d++)a=b[d],!a()&&b[d]===a&&b.splice(d--,
1);b.length||h.fx.stop()},interval:13,stop:function(){clearInterval(aa);aa=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){h.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&null!=a.elem.style[a.prop]?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}});h.each(["width","height"],function(a,b){h.fx.step[b]=function(a){h.style(a.elem,b,Math.max(0,a.now)+a.unit)}});h.expr&&h.expr.filters&&(h.expr.filters.animated=function(a){return h.grep(h.timers,function(b){return a===
b.elem}).length});var Bb=/^t(?:able|d|h)$/i,Ka=/^(?:body|html)$/i;h.fn.offset="getBoundingClientRect"in w.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(b){h.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return h.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(c){}var f=b.ownerDocument,g=f.documentElement;if(!d||!h.contains(g,b))return d?{top:d.top,left:d.left}:{top:0,left:0};b=f.body;f=J(f);return{top:d.top+(f.pageYOffset||
h.support.boxModel&&g.scrollTop||b.scrollTop)-(g.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||h.support.boxModel&&g.scrollLeft||b.scrollLeft)-(g.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(b){h.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return h.offset.bodyOffset(b);var d,c=b.offsetParent,f=b.ownerDocument,g=f.documentElement,k=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
for(var n=b.offsetTop,j=b.offsetLeft;(b=b.parentNode)&&b!==k&&b!==g&&!(h.support.fixedPosition&&"fixed"===d.position);){d=f?f.getComputedStyle(b,null):b.currentStyle;n-=b.scrollTop;j-=b.scrollLeft;if(b===c){n+=b.offsetTop;j+=b.offsetLeft;if(h.support.doesNotAddBorder&&(!h.support.doesAddBorderForTableAndCells||!Bb.test(b.nodeName)))n+=parseFloat(d.borderTopWidth)||0,j+=parseFloat(d.borderLeftWidth)||0;c=b.offsetParent}h.support.subtractsBorderForOverflowNotVisible&&"visible"!==d.overflow&&(n+=parseFloat(d.borderTopWidth)||
0,j+=parseFloat(d.borderLeftWidth)||0)}if("relative"===d.position||"static"===d.position)n+=k.offsetTop,j+=k.offsetLeft;h.support.fixedPosition&&"fixed"===d.position&&(n+=Math.max(g.scrollTop,k.scrollTop),j+=Math.max(g.scrollLeft,k.scrollLeft));return{top:n,left:j}};h.offset={bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;h.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(h.css(a,"marginTop"))||0,d+=parseFloat(h.css(a,"marginLeft"))||0);return{top:b,left:d}},setOffset:function(a,
b,d){var c=h.css(a,"position");"static"===c&&(a.style.position="relative");var f=h(a),g=f.offset(),k=h.css(a,"top"),n=h.css(a,"left"),j={},q={};("absolute"===c||"fixed"===c)&&-1<h.inArray("auto",[k,n])?(q=f.position(),c=q.top,n=q.left):(c=parseFloat(k)||0,n=parseFloat(n)||0);h.isFunction(b)&&(b=b.call(a,d,g));null!=b.top&&(j.top=b.top-g.top+c);null!=b.left&&(j.left=b.left-g.left+n);"using"in b?b.using.call(a,j):f.css(j)}};h.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),
d=this.offset(),c=Ka.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(h.css(a,"marginTop"))||0;d.left-=parseFloat(h.css(a,"marginLeft"))||0;c.top+=parseFloat(h.css(b[0],"borderTopWidth"))||0;c.left+=parseFloat(h.css(b[0],"borderLeftWidth"))||0;return{top:d.top-c.top,left:d.left-c.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||w.body;a&&!Ka.test(a.nodeName)&&"static"===h.css(a,"position");)a=a.offsetParent;return a})}});h.each(["Left","Top"],function(a,
b){var d="scroll"+b;h.fn[d]=function(b){var c,f;if(b===m){c=this[0];return!c?null:(f=J(c))?"pageXOffset"in f?f[a?"pageYOffset":"pageXOffset"]:h.support.boxModel&&f.document.documentElement[d]||f.document.body[d]:c[d]}return this.each(function(){(f=J(this))?f.scrollTo(!a?b:h(f).scrollLeft(),a?b:h(f).scrollTop()):this[d]=b})}});h.each(["Height","Width"],function(a,b){var d=b.toLowerCase();h.fn["inner"+b]=function(){var a=this[0];return a?a.style?parseFloat(h.css(a,d,"padding")):this[d]():null};h.fn["outer"+
b]=function(a){var e=this[0];return e?e.style?parseFloat(h.css(e,d,a?"margin":"border")):this[d]():null};h.fn[d]=function(a){var e=this[0];if(!e)return null==a?null:this;if(h.isFunction(a))return this.each(function(e){var b=h(this);b[d](a.call(this,e,b[d]()))});if(h.isWindow(e)){var c=e.document.documentElement["client"+b],f=e.document.body;return"CSS1Compat"===e.document.compatMode&&c||f&&f["client"+b]||c}if(9===e.nodeType)return Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+
b],e.body["offset"+b],e.documentElement["offset"+b]);return a===m?(e=h.css(e,d),c=parseFloat(e),h.isNumeric(c)?c:e):this.css(d,"string"===typeof a?a:a+"px")}});c.jQuery=c.$=h;"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return h})})(window);
(function(c){c.fn.hoverIntent=function(m,j){var b={sensitivity:7,interval:100,timeout:0},b=c.extend(b,j?{over:m,out:j}:m),d,k,g,a,f=function(a){d=a.pageX;k=a.pageY},n=function(j,m){m.hoverIntent_t=clearTimeout(m.hoverIntent_t);if(Math.abs(g-d)+Math.abs(a-k)<b.sensitivity)return c(m).unbind("mousemove",f),m.hoverIntent_s=1,b.over.apply(m,[j]);g=d;a=k;m.hoverIntent_t=setTimeout(function(){n(j,m)},b.interval)},v=function(d){var k=jQuery.extend({},d),j=this;j.hoverIntent_t&&(j.hoverIntent_t=clearTimeout(j.hoverIntent_t));
"mouseenter"==d.type?(g=k.pageX,a=k.pageY,c(j).bind("mousemove",f),1!=j.hoverIntent_s&&(j.hoverIntent_t=setTimeout(function(){n(k,j)},b.interval))):(c(j).unbind("mousemove",f),1==j.hoverIntent_s&&(j.hoverIntent_t=setTimeout(function(){j.hoverIntent_t=clearTimeout(j.hoverIntent_t);j.hoverIntent_s=0;b.out.apply(j,[k])},b.timeout)))};return this.bind("mouseenter",v).bind("mouseleave",v)}})(jQuery);
(function(c){c.extend({tablesorter:new function(){function j(a,d){b(a+","+((new Date).getTime()-d.getTime())+"ms")}function b(a){"undefined"!=typeof console&&"undefined"!=typeof console.debug?console.log(a):alert(a)}function d(d,f){if(d.config.debug)var g="";if(0!=d.tBodies.length){var n=d.tBodies[0].rows;if(n[0])for(var j=[],q=n[0].cells.length,m=0;m<q;m++){var s=!1;c.metadata&&c(f[m]).metadata()&&c(f[m]).metadata().sorter?s=k(c(f[m]).metadata().sorter):d.config.headers[m]&&d.config.headers[m].sorter&&
(s=k(d.config.headers[m].sorter));if(!s)a:{for(var s=d,p=n,h=-1,x=m,y=r.length,t=!1,A=!1,v=!0;""==A&&v;)h++,p[h]?(t=p[h].cells[x],A=c.trim(a(s.config,t)),s.config.debug&&b("Checking if value was empty on row:"+h)):v=!1;for(p=1;p<y;p++)if(r[p].is(A,s,t)){s=r[p];break a}s=r[0]}d.config.debug&&(g+="column:"+m+" parser:"+s.id+"\n");j.push(s)}d.config.debug&&b(g);return j}}function k(a){for(var b=r.length,d=0;d<b;d++)if(r[d].id.toLowerCase()==a.toLowerCase())return r[d];return!1}function g(b){if(b.config.debug)var d=
new Date;for(var f=b.tBodies[0]&&b.tBodies[0].rows.length||0,g=b.tBodies[0].rows[0]&&b.tBodies[0].rows[0].cells.length||0,k=b.config.parsers,n={row:[],normalized:[]},q=0;q<f;++q){var r=c(b.tBodies[0].rows[q]),m=[];if(r.hasClass(b.config.cssChildRow))n.row[n.row.length-1]=n.row[n.row.length-1].add(r);else{n.row.push(r);for(var h=0;h<g;++h)m.push(k[h].format(a(b.config,r[0].cells[h]),b,r[0].cells[h]));m.push(n.normalized.length);n.normalized.push(m)}}b.config.debug&&j("Building cache for "+f+" rows:",
d);return n}function a(a,b){var d="";if(!b)return"";a.supportsTextContent||(a.supportsTextContent=b.textContent||!1);return d="simple"==a.textExtraction?a.supportsTextContent?b.textContent:b.childNodes[0]&&b.childNodes[0].hasChildNodes()?b.childNodes[0].innerHTML:b.innerHTML:"function"==typeof a.textExtraction?a.textExtraction(b):c(b).text()}function f(a,b){if(a.config.debug)var d=new Date;for(var f=b.row,g=b.normalized,k=g.length,n=g[0].length-1,q=c(a.tBodies[0]),r=[],h=0;h<k;h++){var m=g[h][n];
r.push(f[m]);if(!a.config.appender)for(var s=f[m].length,p=0;p<s;p++)q[0].appendChild(f[m][p])}a.config.appender&&a.config.appender(a,r);r=null;a.config.debug&&j("Rebuilt table:",d);u(a);setTimeout(function(){c(a).trigger("sortEnd")},0)}function n(a){if(a.config.debug)var d=new Date;var f=m(a);$tableHeaders=c(a.config.selectorHeaders,a).each(function(b){this.column=f[this.parentNode.rowIndex+"-"+this.cellIndex];this.count=this.order="Number"!=typeof a.config.sortInitialOrder?"desc"==a.config.sortInitialOrder.toLowerCase()?
1:0:1==a.config.sortInitialOrder?1:0;var d;d=c.metadata&&!1===c(this).metadata().sorter?!0:!1;d||(d=a.config.headers[b]&&!1===a.config.headers[b].sorter?!0:!1);d&&(this.sortDisabled=!0);t(a,b)&&(this.order=this.lockedOrder=t(a,b));this.sortDisabled||(d=c(this).addClass(a.config.cssHeader),a.config.onRenderHeader&&a.config.onRenderHeader.apply(d));a.config.headerList[b]=this});a.config.debug&&(j("Built headers:",d),b($tableHeaders));return $tableHeaders}function m(a){for(var b=[],d={},a=a.getElementsByTagName("THEAD")[0].getElementsByTagName("TR"),
c=0;c<a.length;c++)for(var f=a[c].cells,g=0;g<f.length;g++){var k=f[g],n=k.parentNode.rowIndex,j=n+"-"+k.cellIndex,h=k.rowSpan||1,k=k.colSpan||1,q;"undefined"==typeof b[n]&&(b[n]=[]);for(var r=0;r<b[n].length+1;r++)if("undefined"==typeof b[n][r]){q=r;break}d[j]=q;for(r=n;r<n+h;r++){"undefined"==typeof b[r]&&(b[r]=[]);for(var j=b[r],s=q;s<q+k;s++)j[s]="x"}}return d}function t(a,b){return a.config.headers[b]&&a.config.headers[b].lockedOrder?a.config.headers[b].lockedOrder:!1}function u(a){for(var b=
a.config.widgets,d=b.length,c=0;c<d;c++)s(b[c]).format(a)}function s(a){for(var b=p.length,d=0;d<b;d++)if(p[d].id.toLowerCase()==a.toLowerCase())return p[d]}function y(a,b){for(var d=b.length,c=0;c<d;c++)if(b[c][0]==a)return!0;return!1}function q(a,b,d,f){b.removeClass(f[0]).removeClass(f[1]);var g=[];b.each(function(){this.sortDisabled||(g[this.column]=c(this))});a=d.length;for(b=0;b<a;b++)g[d[b][0]].addClass(f[d[b][1]])}function x(a){if(a.config.widthFixed){var b=c("<colgroup>");c("tr:first td",
a.tBodies[0]).each(function(){b.append(c("<col>").css("width",c(this).width()))});c(a).prepend(b)}}function A(a,b,d){if(a.config.debug)var c=new Date;for(var f="var sortWrapper = function(a,b) {",g=b.length,k=0;k<g;k++)var n=b[k][0],q=b[k][1],n="text"==a.config.parsers[n].type?0==q?B("text","asc",n):B("text","desc",n):0==q?B("numeric","asc",n):B("numeric","desc",n),h="e"+k,f=f+("var "+h+" = "+n),f=f+("if("+h+") { return "+h+"; } "),f=f+"else { ";k=d.normalized[0].length-1;f+="return a["+k+"]-b["+
k+"];";for(k=0;k<g;k++)f+="}; ";f+="return 0; }; ";a.config.debug&&j("Evaling expression:"+f,new Date);eval(f);d.normalized.sort(sortWrapper);a.config.debug&&j("Sorting on "+b.toString()+" and dir "+q+" time:",c);return d}function B(a,b,d){var c="a["+d+"]",d="b["+d+"]";if("text"==a&&"asc"==b)return"("+c+" == "+d+" ? 0 : ("+c+" === null ? Number.POSITIVE_INFINITY : ("+d+" === null ? Number.NEGATIVE_INFINITY : ("+c+" < "+d+") ? -1 : 1 )));";if("text"==a&&"desc"==b)return"("+c+" == "+d+" ? 0 : ("+c+
" === null ? Number.POSITIVE_INFINITY : ("+d+" === null ? Number.NEGATIVE_INFINITY : ("+d+" < "+c+") ? -1 : 1 )));";if("numeric"==a&&"asc"==b)return"("+c+" === null && "+d+" === null) ? 0 :("+c+" === null ? Number.POSITIVE_INFINITY : ("+d+" === null ? Number.NEGATIVE_INFINITY : "+c+" - "+d+"));";if("numeric"==a&&"desc"==b)return"("+c+" === null && "+d+" === null) ? 0 :("+c+" === null ? Number.POSITIVE_INFINITY : ("+d+" === null ? Number.NEGATIVE_INFINITY : "+d+" - "+c+"));"}var r=[],p=[];this.defaults=
{cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:!0,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:!1,cancelSelection:!0,sortList:[],headerList:[],dateFormat:"us",decimal:"/.|,/g",onRenderHeader:null,selectorHeaders:"thead th",debug:!1};this.benchmark=j;this.construct=function(b){return this.each(function(){if(this.tHead&&
this.tBodies){var k,j,r,m;this.config={};m=c.extend(this.config,c.tablesorter.defaults,b);k=c(this);c.data(this,"tablesorter",m);j=n(this);this.config.parsers=d(this,j);r=g(this);var p=[m.cssDesc,m.cssAsc];x(this);j.click(function(a){var b=k[0].tBodies[0]&&k[0].tBodies[0].rows.length||0;if(!this.sortDisabled&&0<b){k.trigger("sortStart");c(this);b=this.column;this.order=this.count++%2;this.lockedOrder&&(this.order=this.lockedOrder);if(a[m.sortMultiSortKey])if(y(b,m.sortList))for(a=0;a<m.sortList.length;a++){var d=
m.sortList[a],h=m.headerList[d[0]];d[0]==b&&(h.count=d[1],h.count++,d[1]=h.count%2)}else m.sortList.push([b,this.order]);else{m.sortList=[];if(null!=m.sortForce){d=m.sortForce;for(a=0;a<d.length;a++)d[a][0]!=b&&m.sortList.push(d[a])}m.sortList.push([b,this.order])}setTimeout(function(){q(k[0],j,m.sortList,p);f(k[0],A(k[0],m.sortList,r))},1);return!1}}).mousedown(function(){if(m.cancelSelection)return this.onselectstart=function(){return!1},!1});k.bind("update",function(){var a=this;setTimeout(function(){a.config.parsers=
d(a,j);r=g(a)},1)}).bind("updateCell",function(b,d){var c=this.config,h=[d.parentNode.rowIndex-1,d.cellIndex];r.normalized[h[0]][h[1]]=c.parsers[h[1]].format(a(c,d),d)}).bind("sorton",function(a,b){c(this).trigger("sortStart");m.sortList=b;for(var d=m.sortList,h=this.config,g=d.length,k=0;k<g;k++){var n=d[k],s=h.headerList[n[0]];s.count=n[1];s.count++}q(this,j,d,p);f(this,A(this,d,r))}).bind("appendCache",function(){f(this,r)}).bind("applyWidgetId",function(a,b){s(b).format(this)}).bind("applyWidgets",
function(){u(this)});c.metadata&&c(this).metadata()&&c(this).metadata().sortlist&&(m.sortList=c(this).metadata().sortlist);0<m.sortList.length&&k.trigger("sorton",[m.sortList]);u(this)}})};this.addParser=function(a){for(var b=r.length,d=!0,c=0;c<b;c++)r[c].id.toLowerCase()==a.id.toLowerCase()&&(d=!1);d&&r.push(a)};this.addWidget=function(a){p.push(a)};this.formatFloat=function(a){a=parseFloat(a);return isNaN(a)?0:a};this.formatInt=function(a){a=parseInt(a);return isNaN(a)?0:a};this.isDigit=function(a){return/^[-+]?\d*$/.test(c.trim(a.replace(/[,.']/g,
"")))};this.clearTableBody=function(a){c.browser.msie?function(){for(;this.firstChild;)this.removeChild(this.firstChild)}.apply(a.tBodies[0]):a.tBodies[0].innerHTML=""}}});c.fn.extend({tablesorter:c.tablesorter.construct});var m=c.tablesorter;m.addParser({id:"text",is:function(){return!0},format:function(j){return c.trim(j.toLocaleLowerCase())},type:"text"});m.addParser({id:"digit",is:function(j,b){return c.tablesorter.isDigit(j,b.config)},format:function(j){return c.tablesorter.formatFloat(j)},type:"numeric"});
m.addParser({id:"currency",is:function(c){return/^[\u00c2\u00a3$\u00e2\u201a\u00ac?.]/.test(c)},format:function(j){return c.tablesorter.formatFloat(j.replace(RegExp(/[\u00c2\u00a3$\u00e2\u201a\u00ac]/g),""))},type:"numeric"});m.addParser({id:"ipAddress",is:function(c){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(c)},format:function(j){for(var j=j.split("."),b="",d=j.length,k=0;k<d;k++)var g=j[k],b=2==g.length?b+("0"+g):b+g;return c.tablesorter.formatFloat(b)},type:"numeric"});m.addParser({id:"url",
is:function(c){return/^(https?|ftp|file):\/\/$/.test(c)},format:function(c){return jQuery.trim(c.replace(RegExp(/(https?|ftp|file):\/\//),""))},type:"text"});m.addParser({id:"isoDate",is:function(c){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},format:function(j){return c.tablesorter.formatFloat(""!=j?(new Date(j.replace(RegExp(/-/g),"/"))).getTime():"0")},type:"numeric"});m.addParser({id:"percent",is:function(j){return/\%$/.test(c.trim(j))},format:function(j){return c.tablesorter.formatFloat(j.replace(RegExp(/%/g),
""))},type:"numeric"});m.addParser({id:"usLongDate",is:function(c){return c.match(RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(j){return c.tablesorter.formatFloat((new Date(j)).getTime())},type:"numeric"});m.addParser({id:"shortDate",is:function(c){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(c)},format:function(j,b){var d=b.config,j=j.replace(/\-/g,"/");if("us"==d.dateFormat)j=j.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,
"$3/$1/$2");else if("uk"==d.dateFormat)j=j.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");else if("dd/mm/yy"==d.dateFormat||"dd-mm-yy"==d.dateFormat)j=j.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");return c.tablesorter.formatFloat((new Date(j)).getTime())},type:"numeric"});m.addParser({id:"time",is:function(c){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(c)},format:function(j){return c.tablesorter.formatFloat((new Date("2000/01/01 "+j)).getTime())},
type:"numeric"});m.addParser({id:"metadata",is:function(){return!1},format:function(j,b,d){j=b.config;j=!j.parserMetadataName?"sortValue":j.parserMetadataName;return c(d).metadata()[j]},type:"numeric"});m.addWidget({id:"zebra",format:function(j){if(j.config.debug)var b=new Date;var d,k=-1,g;c("tr:visible",j.tBodies[0]).each(function(){d=c(this);d.hasClass(j.config.cssChildRow)||k++;g=0==k%2;d.removeClass(j.config.widgetZebra.css[g?0:1]).addClass(j.config.widgetZebra.css[g?1:0])});j.config.debug&&
c.tablesorter.benchmark("Applying Zebra widget",b)}})})(jQuery);
(function(){var c=this,m=c._,j={},b=Array.prototype,d=Object.prototype,k=b.slice,g=b.unshift,a=d.toString,f=d.hasOwnProperty,n=b.forEach,v=b.map,t=b.reduce,u=b.reduceRight,s=b.filter,y=b.every,q=b.some,x=b.indexOf,A=b.lastIndexOf,d=Array.isArray,B=Object.keys,r=Function.prototype.bind,p=function(a){return new G(a)};"undefined"!==typeof module&&module.exports?(module.exports=p,p._=p):c._=p;p.VERSION="1.1.7";var z=p.each=p.forEach=function(a,b,d){if(null!=a)if(n&&a.forEach===n)a.forEach(b,d);else if(a.length===
+a.length)for(var c=0,g=a.length;c<g&&!(c in a&&b.call(d,a[c],c,a)===j);c++);else for(c in a)if(f.call(a,c)&&b.call(d,a[c],c,a)===j)break};p.map=function(a,b,d){var c=[];if(null==a)return c;if(v&&a.map===v)return a.map(b,d);z(a,function(a,f,g){c[c.length]=b.call(d,a,f,g)});return c};p.reduce=p.foldl=p.inject=function(a,b,d,c){var f=void 0!==d;null==a&&(a=[]);if(t&&a.reduce===t)return c&&(b=p.bind(b,c)),f?a.reduce(b,d):a.reduce(b);z(a,function(a,g,k){f?d=b.call(c,d,a,g,k):(d=a,f=!0)});if(!f)throw new TypeError("Reduce of empty array with no initial value");
return d};p.reduceRight=p.foldr=function(a,b,d,c){null==a&&(a=[]);if(u&&a.reduceRight===u)return c&&(b=p.bind(b,c)),void 0!==d?a.reduceRight(b,d):a.reduceRight(b);a=(p.isArray(a)?a.slice():p.toArray(a)).reverse();return p.reduce(a,b,d,c)};p.find=p.detect=function(a,b,d){var c;E(a,function(a,f,g){if(b.call(d,a,f,g))return c=a,!0});return c};p.filter=p.select=function(a,b,d){var c=[];if(null==a)return c;if(s&&a.filter===s)return a.filter(b,d);z(a,function(a,f,g){b.call(d,a,f,g)&&(c[c.length]=a)});return c};
p.reject=function(a,b,d){var c=[];if(null==a)return c;z(a,function(a,f,g){b.call(d,a,f,g)||(c[c.length]=a)});return c};p.every=p.all=function(a,b,d){var c=!0;if(null==a)return c;if(y&&a.every===y)return a.every(b,d);z(a,function(a,f,g){if(!(c=c&&b.call(d,a,f,g)))return j});return c};var E=p.some=p.any=function(a,b,d){var b=b||p.identity,c=!1;if(null==a)return c;if(q&&a.some===q)return a.some(b,d);z(a,function(a,f,g){if(c|=b.call(d,a,f,g))return j});return!!c};p.include=p.contains=function(a,b){var d=
!1;if(null==a)return d;if(x&&a.indexOf===x)return-1!=a.indexOf(b);E(a,function(a){if(d=a===b)return!0});return d};p.invoke=function(a,b){var d=k.call(arguments,2);return p.map(a,function(a){return(b.call?b||a:a[b]).apply(a,d)})};p.pluck=function(a,b){return p.map(a,function(a){return a[b]})};p.max=function(a,b,d){if(!b&&p.isArray(a))return Math.max.apply(Math,a);var c={computed:-Infinity};z(a,function(a,f,g){f=b?b.call(d,a,f,g):a;f>=c.computed&&(c={value:a,computed:f})});return c.value};p.min=function(a,
b,d){if(!b&&p.isArray(a))return Math.min.apply(Math,a);var c={computed:Infinity};z(a,function(a,f,g){f=b?b.call(d,a,f,g):a;f<c.computed&&(c={value:a,computed:f})});return c.value};p.sortBy=function(a,b,d){return p.pluck(p.map(a,function(a,c,f){return{value:a,criteria:b.call(d,a,c,f)}}).sort(function(a,b){var d=a.criteria,c=b.criteria;return d<c?-1:d>c?1:0}),"value")};p.groupBy=function(a,b){var d={};z(a,function(a,c){var f=b(a,c);(d[f]||(d[f]=[])).push(a)});return d};p.sortedIndex=function(a,b,d){d||
(d=p.identity);for(var c=0,f=a.length;c<f;){var g=c+f>>1;d(a[g])<d(b)?c=g+1:f=g}return c};p.toArray=function(a){return!a?[]:a.toArray?a.toArray():p.isArray(a)||p.isArguments(a)?k.call(a):p.values(a)};p.size=function(a){return p.toArray(a).length};p.first=p.head=function(a,b,d){return null!=b&&!d?k.call(a,0,b):a[0]};p.rest=p.tail=function(a,b,d){return k.call(a,null==b||d?1:b)};p.last=function(a){return a[a.length-1]};p.compact=function(a){return p.filter(a,function(a){return!!a})};p.flatten=function(a){return p.reduce(a,
function(a,b){if(p.isArray(b))return a.concat(p.flatten(b));a[a.length]=b;return a},[])};p.without=function(a){return p.difference(a,k.call(arguments,1))};p.uniq=p.unique=function(a,b){return p.reduce(a,function(a,d,c){if(0==c||(!0===b?p.last(a)!=d:!p.include(a,d)))a[a.length]=d;return a},[])};p.union=function(){return p.uniq(p.flatten(arguments))};p.intersection=p.intersect=function(a){var b=k.call(arguments,1);return p.filter(p.uniq(a),function(a){return p.every(b,function(b){return 0<=p.indexOf(b,
a)})})};p.difference=function(a,b){return p.filter(a,function(a){return!p.include(b,a)})};p.zip=function(){for(var a=k.call(arguments),b=p.max(p.pluck(a,"length")),d=Array(b),c=0;c<b;c++)d[c]=p.pluck(a,""+c);return d};p.indexOf=function(a,b,d){if(null==a)return-1;var c;if(d)return d=p.sortedIndex(a,b),a[d]===b?d:-1;if(x&&a.indexOf===x)return a.indexOf(b);for(d=0,c=a.length;d<c;d++)if(a[d]===b)return d;return-1};p.lastIndexOf=function(a,b){if(null==a)return-1;if(A&&a.lastIndexOf===A)return a.lastIndexOf(b);
for(var d=a.length;d--;)if(a[d]===b)return d;return-1};p.range=function(a,b,d){1>=arguments.length&&(b=a||0,a=0);for(var d=arguments[2]||1,c=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(c);f<c;)g[f++]=a,a+=d;return g};p.bind=function(a,b){if(a.bind===r&&r)return r.apply(a,k.call(arguments,1));var d=k.call(arguments,2);return function(){return a.apply(b,d.concat(k.call(arguments)))}};p.bindAll=function(a){var b=k.call(arguments,1);0==b.length&&(b=p.functions(a));z(b,function(b){a[b]=p.bind(a[b],a)});
return a};p.memoize=function(a,b){var d={};b||(b=p.identity);return function(){var c=b.apply(this,arguments);return f.call(d,c)?d[c]:d[c]=a.apply(this,arguments)}};p.delay=function(a,b){var d=k.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};p.defer=function(a){return p.delay.apply(p,[a,1].concat(k.call(arguments,1)))};var C=function(a,b,d){var c;return function(){var f=this,g=arguments,k=function(){c=null;a.apply(f,g)};d&&clearTimeout(c);if(d||!c)c=setTimeout(k,b)}};p.throttle=
function(a,b){return C(a,b,!1)};p.debounce=function(a,b){return C(a,b,!0)};p.once=function(a){var b=!1,d;return function(){if(b)return d;b=!0;return d=a.apply(this,arguments)}};p.wrap=function(a,b){return function(){var d=[a].concat(k.call(arguments));return b.apply(this,d)}};p.compose=function(){var a=k.call(arguments);return function(){for(var b=k.call(arguments),d=a.length-1;0<=d;d--)b=[a[d].apply(this,b)];return b[0]}};p.after=function(a,b){return function(){if(1>--a)return b.apply(this,arguments)}};
p.keys=B||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],d;for(d in a)f.call(a,d)&&(b[b.length]=d);return b};p.values=function(a){return p.map(a,p.identity)};p.functions=p.methods=function(a){var b=[],d;for(d in a)p.isFunction(a[d])&&b.push(d);return b.sort()};p.extend=function(a){z(k.call(arguments,1),function(b){for(var d in b)void 0!==b[d]&&(a[d]=b[d])});return a};p.defaults=function(a){z(k.call(arguments,1),function(b){for(var d in b)null==a[d]&&(a[d]=b[d])});return a};
p.clone=function(a){return p.isArray(a)?a.slice():p.extend({},a)};p.tap=function(a,b){b(a);return a};p.isEqual=function(a,b){if(a===b)return!0;var d=typeof a;if(d!=typeof b)return!1;if(a==b)return!0;if(!a&&b||a&&!b)return!1;a._chain&&(a=a._wrapped);b._chain&&(b=b._wrapped);if(a.isEqual)return a.isEqual(b);if(b.isEqual)return b.isEqual(a);if(p.isDate(a)&&p.isDate(b))return a.getTime()===b.getTime();if(p.isNaN(a)&&p.isNaN(b))return!1;if(p.isRegExp(a)&&p.isRegExp(b))return a.source===b.source&&a.global===
b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if("object"!==d||a.length&&a.length!==b.length)return!1;var d=p.keys(a),c=p.keys(b);if(d.length!=c.length)return!1;for(var f in a)if(!(f in b)||!p.isEqual(a[f],b[f]))return!1;return!0};p.isEmpty=function(a){if(p.isArray(a)||p.isString(a))return 0===a.length;for(var b in a)if(f.call(a,b))return!1;return!0};p.isElement=function(a){return!!(a&&1==a.nodeType)};p.isArray=d||function(b){return"[object Array]"===a.call(b)};p.isObject=function(a){return a===
Object(a)};p.isArguments=function(a){return!(!a||!f.call(a,"callee"))};p.isFunction=function(a){return!(!a||!a.constructor||!a.call||!a.apply)};p.isString=function(a){return!!(""===a||a&&a.charCodeAt&&a.substr)};p.isNumber=function(a){return!!(0===a||a&&a.toExponential&&a.toFixed)};p.isNaN=function(a){return a!==a};p.isBoolean=function(a){return!0===a||!1===a};p.isDate=function(a){return!(!a||!a.getTimezoneOffset||!a.setUTCFullYear)};p.isRegExp=function(a){return!(!a||!a.test||!a.exec||!(a.ignoreCase||
!1===a.ignoreCase))};p.isNull=function(a){return null===a};p.isUndefined=function(a){return void 0===a};p.noConflict=function(){c._=m;return this};p.identity=function(a){return a};p.times=function(a,b,d){for(var c=0;c<a;c++)b.call(d,c)};p.mixin=function(a){z(p.functions(a),function(b){w(b,p[b]=a[b])})};var F=0;p.uniqueId=function(a){var b=F++;return a?a+b:b};p.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};p.template=function(a,b){var d=p.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+
a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",d=new Function("obj",d);return b?d(b):d};var G=function(a){this._wrapped=a};p.prototype=G.prototype;var J=function(a,b){return b?p(a).chain():a},w=function(a,b){G.prototype[a]=function(){var a=
k.call(arguments);g.call(a,this._wrapped);return J(b.apply(p,a),this._chain)}};p.mixin(p);z("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var d=b[a];G.prototype[a]=function(){d.apply(this._wrapped,arguments);return J(this._wrapped,this._chain)}});z(["concat","join","slice"],function(a){var d=b[a];G.prototype[a]=function(){return J(d.apply(this._wrapped,arguments),this._chain)}});G.prototype.chain=function(){this._chain=!0;return this};G.prototype.value=function(){return this._wrapped}})();
(function(){var c=this,m=c.Backbone,j;j="undefined"!==typeof exports?exports:c.Backbone={};j.VERSION="0.5.3";var b=c._;!b&&"undefined"!==typeof require&&(b=require("underscore")._);var d=c.jQuery||c.Zepto;j.noConflict=function(){c.Backbone=m;return this};j.emulateHTTP=!1;j.emulateJSON=!1;j.Events={bind:function(a,b,d){var c=this._callbacks||(this._callbacks={});(c[a]||(c[a]=[])).push([b,d]);return this},unbind:function(a,b){var d;if(a){if(d=this._callbacks)if(b){d=d[a];if(!d)return this;for(var c=
0,f=d.length;c<f;c++)if(d[c]&&b===d[c][0]){d[c]=null;break}}else d[a]=[]}else this._callbacks={};return this},trigger:function(a){var b,d,c,f,g=2;if(!(d=this._callbacks))return this;for(;g--;)if(b=g?a:"all",b=d[b])for(var k=0,n=b.length;k<n;k++)(c=b[k])?(f=g?Array.prototype.slice.call(arguments,1):arguments,c[0].apply(c[1]||this,f)):(b.splice(k,1),k--,n--);return this}};j.Model=function(a,d){var c;a||(a={});if(c=this.defaults)b.isFunction(c)&&(c=c.call(this)),a=b.extend({},c,a);this.attributes={};
this._escapedAttributes={};this.cid=b.uniqueId("c");this.set(a,{silent:!0});this._changed=!1;this._previousAttributes=b.clone(this.attributes);d&&d.collection&&(this.collection=d.collection);this.initialize(a,d)};b.extend(j.Model.prototype,j.Events,{_previousAttributes:null,_changed:!1,idAttribute:"id",initialize:function(){},toJSON:function(){return b.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.attributes[a];
return this._escapedAttributes[a]=(null==b?"":""+b).replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},has:function(a){return null!=this.attributes[a]},set:function(a,d){d||(d={});if(!a)return this;a.attributes&&(a=a.attributes);var c=this.attributes,f=this._escapedAttributes;if(!d.silent&&this.validate&&!this._performValidation(a,d))return!1;this.idAttribute in a&&(this.id=a[this.idAttribute]);
var g=this._changing;this._changing=!0;for(var k in a){var n=a[k];b.isEqual(c[k],n)||(c[k]=n,delete f[k],this._changed=!0,d.silent||this.trigger("change:"+k,this,n,d))}!g&&!d.silent&&this._changed&&this.change(d);this._changing=!1;return this},unset:function(a,b){if(!(a in this.attributes))return this;b||(b={});var d={};d[a]=void 0;if(!b.silent&&this.validate&&!this._performValidation(d,b))return!1;delete this.attributes[a];delete this._escapedAttributes[a];a==this.idAttribute&&delete this.id;this._changed=
!0;b.silent||(this.trigger("change:"+a,this,void 0,b),this.change(b));return this},clear:function(a){a||(a={});var b,d=this.attributes,c={};for(b in d)c[b]=void 0;if(!a.silent&&this.validate&&!this._performValidation(c,a))return!1;this.attributes={};this._escapedAttributes={};this._changed=!0;if(!a.silent){for(b in d)this.trigger("change:"+b,this,void 0,a);this.change(a)}return this},fetch:function(a){a||(a={});var b=this,d=a.success;a.success=function(c,f,g){if(!b.set(b.parse(c,g),a))return!1;d&&
d(b,c)};a.error=B(a.error,b,a);return(this.sync||j.sync).call(this,"read",this,a)},save:function(a,b){b||(b={});if(a&&!this.set(a,b))return!1;var d=this,c=b.success;b.success=function(a,f,g){if(!d.set(d.parse(a,g),b))return!1;c&&c(d,a,g)};b.error=B(b.error,d,b);var f=this.isNew()?"create":"update";return(this.sync||j.sync).call(this,f,this,b)},destroy:function(a){a||(a={});if(this.isNew())return this.trigger("destroy",this,this.collection,a);var b=this,d=a.success;a.success=function(c){b.trigger("destroy",
b,b.collection,a);d&&d(b,c)};a.error=B(a.error,b,a);return(this.sync||j.sync).call(this,"delete",this,a)},url:function(){var a=x(this.collection)||this.urlRoot||A();return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this)},isNew:function(){return null==this.id},change:function(a){this.trigger("change",this,a);this._previousAttributes=b.clone(this.attributes);this._changed=!1},hasChanged:function(a){return a?
this._previousAttributes[a]!=this.attributes[a]:this._changed},changedAttributes:function(a){a||(a=this.attributes);var d=this._previousAttributes,c=!1,f;for(f in a)b.isEqual(d[f],a[f])||(c=c||{},c[f]=a[f]);return c},previous:function(a){return!a||!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return b.clone(this._previousAttributes)},_performValidation:function(a,b){var d=this.validate(a);return d?(b.error?b.error(this,d,b):this.trigger("error",this,d,b),
!1):!0}});j.Collection=function(a,d){d||(d={});d.comparator&&(this.comparator=d.comparator);b.bindAll(this,"_onModelEvent","_removeReference");this._reset();a&&this.reset(a,{silent:!0});this.initialize.apply(this,arguments)};b.extend(j.Collection.prototype,j.Events,{model:j.Model,initialize:function(){},toJSON:function(){return this.map(function(a){return a.toJSON()})},add:function(a,d){if(b.isArray(a))for(var c=0,f=a.length;c<f;c++)this._add(a[c],d);else this._add(a,d);return this},remove:function(a,
d){if(b.isArray(a))for(var c=0,f=a.length;c<f;c++)this._remove(a[c],d);else this._remove(a,d);return this},get:function(a){return null==a?null:this._byId[null!=a.id?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");this.models=this.sortBy(this.comparator);a.silent||this.trigger("reset",this,a);return this},pluck:function(a){return b.map(this.models,
function(b){return b.get(a)})},reset:function(a,b){a||(a=[]);b||(b={});this.each(this._removeReference);this._reset();this.add(a,{silent:!0});b.silent||this.trigger("reset",this,b);return this},fetch:function(a){a||(a={});var b=this,d=a.success;a.success=function(c,f,g){b[a.add?"add":"reset"](b.parse(c,g),a);d&&d(b,c)};a.error=B(a.error,b,a);return(this.sync||j.sync).call(this,"read",this,a)},create:function(a,b){var d=this;b||(b={});a=this._prepareModel(a,b);if(!a)return!1;var c=b.success;b.success=
function(a,f,g){d.add(a,b);c&&c(a,f,g)};a.save(null,b);return a},parse:function(a){return a},chain:function(){return b(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId={};this._byCid={}},_prepareModel:function(a,b){if(a instanceof j.Model)a.collection||(a.collection=this);else{var d=a,a=new this.model(d,{collection:this});a.validate&&!a._performValidation(d,b)&&(a=!1)}return a},_add:function(a,b){b||(b={});a=this._prepareModel(a,b);if(!a)return!1;var d=this.getByCid(a);
if(d)throw Error(["Can't add the same model to a set twice",d.id]);this._byId[a.id]=a;this._byCid[a.cid]=a;this.models.splice(null!=b.at?b.at:this.comparator?this.sortedIndex(a,this.comparator):this.length,0,a);a.bind("all",this._onModelEvent);this.length++;b.silent||a.trigger("add",a,this,b);return a},_remove:function(a,b){b||(b={});a=this.getByCid(a)||this.get(a);if(!a)return null;delete this._byId[a.id];delete this._byCid[a.cid];this.models.splice(this.indexOf(a),1);this.length--;b.silent||a.trigger("remove",
a,this,b);this._removeReference(a);return a},_removeReference:function(a){this==a.collection&&delete a.collection;a.unbind("all",this._onModelEvent)},_onModelEvent:function(a,b,d,c){("add"==a||"remove"==a)&&d!=this||("destroy"==a&&this._remove(b,c),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,arguments))}});b.each("forEach,each,map,reduce,reduceRight,find,detect,filter,select,reject,every,all,some,any,include,contains,invoke,max,min,sortBy,sortedIndex,toArray,size,first,rest,last,without,indexOf,lastIndexOf,isEmpty,groupBy".split(","),
function(a){j.Collection.prototype[a]=function(){return b[a].apply(b,[this.models].concat(b.toArray(arguments)))}});j.Router=function(a){a||(a={});a.routes&&(this.routes=a.routes);this._bindRoutes();this.initialize.apply(this,arguments)};var k=/:([\w\d]+)/g,g=/\*([\w\d]+)/g,a=/[-[\]{}()+?.,\\^$|#\s]/g;b.extend(j.Router.prototype,j.Events,{initialize:function(){},route:function(a,d,c){j.history||(j.history=new j.History);b.isRegExp(a)||(a=this._routeToRegExp(a));j.history.route(a,b.bind(function(b){b=
this._extractParameters(a,b);c.apply(this,b);this.trigger.apply(this,["route:"+d].concat(b))},this))},navigate:function(a,b){j.history.navigate(a,b)},_bindRoutes:function(){if(this.routes){var a=[],b;for(b in this.routes)a.unshift([b,this.routes[b]]);b=0;for(var d=a.length;b<d;b++)this.route(a[b][0],a[b][1],this[a[b][1]])}},_routeToRegExp:function(b){b=b.replace(a,"\\$&").replace(k,"([^/]*)").replace(g,"(.*?)");return RegExp("^"+b+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});
j.History=function(){this.handlers=[];b.bindAll(this,"checkUrl")};var f=/^#*/,n=/msie [\w.]+/,v=!1;b.extend(j.History.prototype,{interval:50,getFragment:function(a,b){if(null==a)if(this._hasPushState||b){var a=window.location.pathname,d=window.location.search;d&&(a+=d);0==a.indexOf(this.options.root)&&(a=a.substr(this.options.root.length))}else a=window.location.hash;return decodeURIComponent(a.replace(f,""))},start:function(a){if(v)throw Error("Backbone.history has already been started");this.options=
b.extend({},{root:"/"},this.options,a);this._wantsPushState=!!this.options.pushState;this._hasPushState=!(!this.options.pushState||!window.history||!window.history.pushState);var a=this.getFragment(),c=document.documentMode;if(c=n.exec(navigator.userAgent.toLowerCase())&&(!c||7>=c))this.iframe=d('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(a);this._hasPushState?d(window).bind("popstate",this.checkUrl):"onhashchange"in window&&!c?d(window).bind("hashchange",
this.checkUrl):setInterval(this.checkUrl,this.interval);this.fragment=a;v=!0;a=window.location;c=a.pathname==this.options.root;if(this._wantsPushState&&!this._hasPushState&&!c)return this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&c&&a.hash&&(this.fragment=a.hash.replace(f,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},
route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.iframe.location.hash));if(a==this.fragment||a==decodeURIComponent(this.fragment))return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(window.location.hash)},loadUrl:function(a){var d=this.fragment=this.getFragment(a);return b.any(this.handlers,function(a){if(a.route.test(d))return a.callback(d),!0})},navigate:function(a,
b){var d=(a||"").replace(f,"");if(!(this.fragment==d||this.fragment==decodeURIComponent(d))){if(this._hasPushState){var c=window.location;0!=d.indexOf(this.options.root)&&(d=this.options.root+d);this.fragment=d;window.history.pushState({},document.title,c.protocol+"//"+c.host+d)}else window.location.hash=this.fragment=d,this.iframe&&d!=this.getFragment(this.iframe.location.hash)&&(this.iframe.document.open().close(),this.iframe.location.hash=d);b&&this.loadUrl(a)}}});j.View=function(a){this.cid=b.uniqueId("view");
this._configure(a||{});this._ensureElement();this.delegateEvents();this.initialize.apply(this,arguments)};var t=/^(\S+)\s*(.*)$/,u="model,collection,el,id,attributes,className,tagName".split(",");b.extend(j.View.prototype,j.Events,{tagName:"div",$:function(a){return d(a,this.el)},initialize:function(){},render:function(){return this},remove:function(){d(this.el).remove();return this},make:function(a,b,c){a=document.createElement(a);b&&d(a).attr(b);c&&d(a).html(c);return a},delegateEvents:function(a){if(a||
(a=this.events)){b.isFunction(a)&&(a=a.call(this));d(this.el).unbind(".delegateEvents"+this.cid);for(var c in a){var f=this[a[c]];if(!f)throw Error('Event "'+a[c]+'" does not exist');var g=c.match(t),k=g[1],g=g[2],f=b.bind(f,this),k=k+(".delegateEvents"+this.cid);""===g?d(this.el).bind(k,f):d(this.el).delegate(g,k,f)}}},_configure:function(a){this.options&&(a=b.extend({},this.options,a));for(var d=0,c=u.length;d<c;d++){var f=u[d];a[f]&&(this[f]=a[f])}this.options=a},_ensureElement:function(){if(this.el)b.isString(this.el)&&
(this.el=d(this.el).get(0));else{var a=this.attributes||{};this.id&&(a.id=this.id);this.className&&(a["class"]=this.className);this.el=this.make(this.tagName,a)}}});j.Model.extend=j.Collection.extend=j.Router.extend=j.View.extend=function(a,b){var d=q(this,a,b);d.extend=this.extend;return d};var s={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};j.sync=function(a,c,f){var g=s[a],f=b.extend({type:g,dataType:"json"},f);f.url||(f.url=x(c)||A());if(!f.data&&c&&("create"==a||"update"==a))f.contentType=
"application/json",f.data=JSON.stringify(c.toJSON());j.emulateJSON&&(f.contentType="application/x-www-form-urlencoded",f.data=f.data?{model:f.data}:{});if(j.emulateHTTP&&("PUT"===g||"DELETE"===g))j.emulateJSON&&(f.data._method=g),f.type="POST",f.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",g)};"GET"!==f.type&&!j.emulateJSON&&(f.processData=!1);return d.ajax(f)};var y=function(){},q=function(a,d,c){var f;f=d&&d.hasOwnProperty("constructor")?d.constructor:function(){return a.apply(this,
arguments)};b.extend(f,a);y.prototype=a.prototype;f.prototype=new y;d&&b.extend(f.prototype,d);c&&b.extend(f,c);f.prototype.constructor=f;f.__super__=a.prototype;return f},x=function(a){return!a||!a.url?null:b.isFunction(a.url)?a.url():a.url},A=function(){throw Error('A "url" property or function must be specified');},B=function(a,b,d){return function(c){a?a(b,c,d):b.trigger("error",b,c,d)}}}).call(this);
(function(){var c=function(){return this}();if(c.require&&c.define)require.packaged=!0;else{var m=function(b,c,g){"string"!==typeof b?m.original?m.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(g=c),define.modules||(define.modules={}),define.modules[b]=g)};c.define&&(m.original=c.define);c.define=m;var j=function(d,c){if("[object Array]"===Object.prototype.toString.call(d)){for(var g=[],a=0,f=d.length;a<f;++a){var n=
b(d[a]);if(!n&&j.original)return j.original.apply(window,arguments);g.push(n)}c&&c.apply(null,g)}else{if("string"===typeof d){g=b(d);if(!g&&j.original)return j.original.apply(window,arguments);c&&c();return g}if(j.original)return j.original.apply(window,arguments)}};c.require&&(j.original=c.require);c.require=j;require.packaged=!0;var b=function(b){var c=define.modules[b];if(null==c)return console.error("Missing module: "+b),null;if("function"===typeof c){var g={};c(require,g,{id:b,uri:""});return define.modules[b]=
g}return c}}})();
define("pilot/fixoldbrowsers",["require","exports","module"],function(){if(!Function.prototype.bind){var c=Array.prototype.slice;Function.prototype.bind=function(a){var b=this;if("function"!==typeof b.apply||"function"!==typeof b.call)return new TypeError;var d=c.call(arguments),f=function z(){if(this instanceof z){var a=Object.create(b.prototype);b.apply(a,d.concat(c.call(arguments)));return a}return b.call.apply(b,d.concat(c.call(arguments)))};f.length="function"===typeof b?Math.max(b.length-d.length,
0):0;return f}}var m=Function.prototype.call,j=Object.prototype,b=m.bind(j.hasOwnProperty),d,k,g,a,f;if(f=b(j,"__defineGetter__"))d=m.bind(j.__defineGetter__),k=m.bind(j.__defineSetter__),g=m.bind(j.__lookupGetter__),a=m.bind(j.__lookupSetter__);Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});Array.prototype.forEach||(Array.prototype.forEach=function(a,b){for(var d=+this.length,c=0;c<d;c++)c in this&&a.call(b,this[c],c,this)});Array.prototype.map||
(Array.prototype.map=function(a,b){var d=+this.length;if("function"!==typeof a)throw new TypeError;for(var c=Array(d),f=0;f<d;f++)f in this&&(c[f]=a.call(b,this[f],f,this));return c});Array.prototype.filter||(Array.prototype.filter=function(a,b){for(var d=[],c=0;c<this.length;c++)a.call(b,this[c])&&d.push(this[c]);return d});Array.prototype.every||(Array.prototype.every=function(a,b){for(var d=0;d<this.length;d++)if(!a.call(b,this[d]))return!1;return!0});Array.prototype.some||(Array.prototype.some=
function(a,b){for(var d=0;d<this.length;d++)if(a.call(b,this[d]))return!0;return!1});Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=+this.length;if("function"!==typeof a)throw new TypeError;if(0===b&&1===arguments.length)throw new TypeError;var d=0;if(2<=arguments.length)var c=arguments[1];else{do{if(d in this){c=this[d++];break}if(++d>=b)throw new TypeError;}while(1)}for(;d<b;d++)d in this&&(c=a.call(null,c,this[d],d,this));return c});Array.prototype.reduceRight||(Array.prototype.reduceRight=
function(a){var b=+this.length;if("function"!==typeof a)throw new TypeError;if(0===b&&1===arguments.length)throw new TypeError;b-=1;if(2<=arguments.length)var d=arguments[1];else{do{if(b in this){d=this[b--];break}if(0>--b)throw new TypeError;}while(1)}for(;0<=b;b--)b in this&&(d=a.call(null,d,this[b],b,this));return d});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,d){var c=this.length;if(!c)return-1;var f=d||0;if(f>=c)return-1;for(0>f&&(f+=c);f<c;f++)if(b(this,f)&&a===this[f])return f;
return-1});Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a,d){var c=this.length;if(!c)return-1;var f=d||c;0>f&&(f+=c);for(f=Math.min(f,c-1);0<=f;f--)if(b(this,f)&&a===this[f])return f;return-1});Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||a.constructor.prototype});Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(d,c){if("object"!==typeof d&&"function"!==typeof d||null===d)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+
d);if(b(d,c)){var k,n;if(f){var q=d.__proto__;d.__proto__=j;k=g(d,c);n=a(d,c);d.__proto__=q;if(k||n)return k&&(descriptor.get=k),n&&(descriptor.set=n),descriptor}descriptor.value=d[c];return descriptor}});Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)});Object.create||(Object.create=function(a,b){var d;if(null===a)d={__proto__:null};else{if("object"!==typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");d=function(){};d.prototype=a;
d=new d;d.__proto__=a}"undefined"!==typeof b&&Object.defineProperties(d,b);return d});Object.defineProperty||(Object.defineProperty=function(c,n,q){if("object"!==typeof c&&"function"!==typeof c)throw new TypeError("Object.defineProperty called on non-object: "+c);if("object"!==typeof c||null===c)throw new TypeError("Property description must be an object: "+q);if(b(q,"value"))f&&(g(c,n)||a(c,n))?(c.__proto__=j,delete c[n],c[n]=q.value,c.prototype):c[n]=q.value;else{if(!f)throw new TypeError("getters & setters can not be defined on this javascript engine");
b(q,"get")&&d(c,n,q.get);b(q,"set")&&k(c,n,q.set)}return c});Object.defineProperties||(Object.defineProperties=function(a,d){for(var c in d)b(d,c)&&Object.defineProperty(a,c,d[c]);return a});Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(n){Object.freeze=function(a){return function(b){return"function"===typeof b?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a});
Object.isSealed||(Object.isSealed=function(){return!1});Object.isFrozen||(Object.isFrozen=function(){return!1});Object.isExtensible||(Object.isExtensible=function(){return!0});if(!Object.keys){var v=!0,t="toString,toLocaleString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,constructor".split(","),u=t.length,s;for(s in{toString:null})v=!1;Object.keys=function(a){if("object"!==typeof a&&"function"!==typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var d=[],c;
for(c in a)b(a,c)&&d.push(c);if(v)for(c=0;c<u;c++){var f=t[c];b(a,f)&&d.push(f)}return d}}Date.prototype.toISOString||(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+(this.getUTCMonth()+1)+"-"+this.getUTCDate()+"T"+this.getUTCHours()+":"+this.getUTCMinutes()+":"+this.getUTCSeconds()+"Z"});Date.now||(Date.now=function(){return(new Date).getTime()});Date.prototype.toJSON||(Date.prototype.toJSON=function(){if("function"!==typeof this.toISOString)throw new TypeError;return this.toISOString()});
isNaN(Date.parse("T00:00"))&&(Date=function(a){var b=function(d,c,f,g,k,n,j){var q=arguments.length;return this instanceof a?(q=1===q&&""+d===d?new a(b.parse(d)):7<=q?new a(d,c,f,g,k,n,j):6<=q?new a(d,c,f,g,k,n):5<=q?new a(d,c,f,g,k):4<=q?new a(d,c,f,g):3<=q?new a(d,c,f):2<=q?new a(d,c):1<=q?new a(d):new a,q.constructor=b,q):a.apply(this,arguments)},d=RegExp("^(?:((?:[+-]\\d\\d)?\\d\\d\\d\\d)(?:-(\\d\\d)(?:-(\\d\\d))?)?)?(?:T(\\d\\d):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?)?(?:Z|([+-])(\\d\\d):(\\d\\d))?$"),
c;for(c in a)b[c]=a[c];b.now=a.now;b.UTC=a.UTC;b.prototype=a.prototype;b.prototype.constructor=b;b.parse=function(b){var c=d.exec(b);if(c){c.shift();for(var f=void 0===c[0],g=0;10>g;g++)7!==g&&(c[g]=+(c[g]||(3>g?1:0)),1===g&&c[g]--);if(f)return 1E3*(60*(60*c[3]+c[4])+c[5])+c[6];f=6E4*(60*c[8]+c[9]);"-"===c[6]&&(f=-f);return a.UTC.apply(this,c.slice(0,7))+f}return a.parse.apply(this,arguments)};return b}(Date));if(!String.prototype.trim){var y=/^\s\s*/,q=/\s\s*$/;String.prototype.trim=function(){return(""+
this).replace(y,"").replace(q,"")}}});
define("ace/ace","require,exports,module,pilot/index,pilot/fixoldbrowsers,pilot/plugin_manager,pilot/dom,pilot/event,ace/editor,ace/edit_session,ace/undomanager,ace/virtual_renderer,ace/theme/textmate,pilot/environment".split(","),function(c,m){c("pilot/index");c("pilot/fixoldbrowsers");var j=c("pilot/plugin_manager").catalog;j.registerPlugins(["pilot/index"]);var b=c("pilot/dom"),d=c("pilot/event"),k=c("ace/editor").Editor,g=c("ace/edit_session").EditSession,a=c("ace/undomanager").UndoManager,f=
c("ace/virtual_renderer").VirtualRenderer;m.edit=function(n){"string"==typeof n&&(n=document.getElementById(n));var m=new g(b.getInnerText(n));m.setUndoManager(new a);n.innerHTML="";var t=new k(new f(n,c("ace/theme/textmate")));t.setSession(m);var u=c("pilot/environment").create();j.startupPlugins({env:u}).then(function(){u.document=m;u.editor=t;t.resize();d.addListener(window,"resize",function(){t.resize()});n.env=u});t.env=u;return t}});
define("pilot/index","require,exports,module,pilot/fixoldbrowsers,pilot/types/basic,pilot/types/command,pilot/types/settings,pilot/commands/settings,pilot/commands/basic,pilot/settings/canon,pilot/canon".split(","),function(c,m){m.startup=function(j,b){c("pilot/fixoldbrowsers");c("pilot/types/basic").startup(j,b);c("pilot/types/command").startup(j,b);c("pilot/types/settings").startup(j,b);c("pilot/commands/settings").startup(j,b);c("pilot/commands/basic").startup(j,b);c("pilot/settings/canon").startup(j,
b);c("pilot/canon").startup(j,b)};m.shutdown=function(j,b){c("pilot/types/basic").shutdown(j,b);c("pilot/types/command").shutdown(j,b);c("pilot/types/settings").shutdown(j,b);c("pilot/commands/settings").shutdown(j,b);c("pilot/commands/basic").shutdown(j,b);c("pilot/settings/canon").shutdown(j,b);c("pilot/canon").shutdown(j,b)}});
define("pilot/types/basic",["require","exports","module","pilot/types"],function(c,m){function j(a){if(!Array.isArray(a.data)&&"function"!==typeof a.data)throw Error("instances of SelectionType need typeSpec.data to be an array or function that returns an array:"+JSON.stringify(a));Object.keys(a).forEach(function(b){this[b]=a[b]},this)}function b(a){if("function"!==typeof a.defer)throw Error("Instances of DeferredType need typeSpec.defer to be a function that returns a type");Object.keys(a).forEach(function(b){this[b]=
a[b]},this)}function d(a){if(a instanceof g)this.subtype=a;else if("string"===typeof a){if(this.subtype=k.getType(a),null==this.subtype)throw Error("Unknown array subtype: "+a);}else throw Error("Can' handle array subtype");}var k=c("pilot/types"),g=k.Type,a=k.Conversion,f=k.Status,n=new g;n.stringify=function(a){return a};n.parse=function(b){if("string"!=typeof b)throw Error("non-string passed to text.parse()");return new a(b)};n.name="text";var v=new g;v.stringify=function(a){return!a?null:""+a};
v.parse=function(b){if("string"!=typeof b)throw Error("non-string passed to number.parse()");if(0===b.replace(/\s/g,"").length)return new a(null,f.INCOMPLETE,"");var d=new a(parseInt(b,10));isNaN(d.value)&&(d.status=f.INVALID,d.message="Can't convert \""+b+'" to a number.');return d};v.decrement=function(a){return a-1};v.increment=function(a){return a+1};v.name="number";j.prototype=new g;j.prototype.stringify=function(a){return a};j.prototype.parse=function(b){if("string"!=typeof b)throw Error("non-string passed to parse()");
if(!this.data)throw Error("Missing data on selection type extension.");var d=!1,c,g=[];("function"===typeof this.data?this.data():this.data).forEach(function(a){b==a?(c=this.fromString(a),d=!0):0===a.indexOf(b)&&g.push(this.fromString(a))},this);if(d)return new a(c);this.noMatch&&this.noMatch();if(0<g.length){var k="Possibilities"+(0===b.length?"":" for '"+b+"'");return new a(null,f.INCOMPLETE,k,g)}return new a(null,f.INVALID,"Can't use '"+b+"'.",g)};j.prototype.fromString=function(a){return a};j.prototype.decrement=
function(a){var b="function"===typeof this.data?this.data():this.data;null==a?a=b.length-1:(a=this.stringify(a),a=b.indexOf(a),a=0===a?b.length-1:a-1);return this.fromString(b[a])};j.prototype.increment=function(a){var b="function"===typeof this.data?this.data():this.data;null==a?a=0:(a=this.stringify(a),a=b.indexOf(a),a=a===b.length-1?0:a+1);return this.fromString(b[a])};j.prototype.name="selection";m.SelectionType=j;var t=new j({name:"bool",data:["true","false"],stringify:function(a){return""+a},
fromString:function(a){return"true"===a?!0:!1}});b.prototype=new g;b.prototype.stringify=function(a){return this.defer().stringify(a)};b.prototype.parse=function(a){return this.defer().parse(a)};b.prototype.decrement=function(a){var b=this.defer();return b.decrement?b.decrement(a):void 0};b.prototype.increment=function(a){var b=this.defer();return b.increment?b.increment(a):void 0};b.prototype.name="deferred";m.DeferredType=b;d.prototype=new g;d.prototype.stringify=function(a){return a.join(" ")};
d.prototype.parse=function(a){return this.defer().parse(a)};d.prototype.name="array";var u=!1;m.startup=function(){u||(u=!0,k.registerType(n),k.registerType(v),k.registerType(t),k.registerType(j),k.registerType(b),k.registerType(d))};m.shutdown=function(){u=!1;k.unregisterType(n);k.unregisterType(v);k.unregisterType(t);k.unregisterType(j);k.unregisterType(b);k.unregisterType(d)}});
define("pilot/types",["require","exports","module"],function(c,m){function j(){}function b(b,a){if("[]"===b.substr(-2)){var d=b.slice(0,-2);return new k.array(d)}d=k[b];"function"===typeof d&&(d=new d(a));return d}var d={VALID:{toString:function(){return"VALID"},valueOf:function(){return 0}},INCOMPLETE:{toString:function(){return"INCOMPLETE"},valueOf:function(){return 1}},INVALID:{toString:function(){return"INVALID"},valueOf:function(){return 2}},combine:function(b){for(var a=d.VALID,c=0;c<b.length;c++)b[c].valueOf()>
a.valueOf()&&(a=b[c]);return a}};m.Status=d;m.Conversion=function(b,a,c,k){this.value=b;this.status=a||d.VALID;this.message=c;this.predictions=k||[]};j.prototype={stringify:function(){throw Error("not implemented");},parse:function(){throw Error("not implemented");},name:void 0,increment:function(){},decrement:function(){},getDefault:function(){return this.parse("")}};m.Type=j;var k={};m.registerType=function(b){if("object"===typeof b)if(b instanceof j){if(!b.name)throw Error("All registered types must have a name");
k[b.name]=b}else throw Error("Can't registerType using: "+b);else if("function"===typeof b){if(!b.prototype.name)throw Error("All registered types must have a name");k[b.prototype.name]=b}else throw Error("Unknown type: "+b);};m.registerTypes=function(b){Object.keys(b).forEach(function(a){var d=b[a];d.name=a;m.registerType(d)})};m.deregisterType=function(b){delete k[b.name]};m.getType=function(d){if("string"===typeof d)return b(d);if("object"===typeof d){if(!d.name)throw Error("Missing 'name' member to typeSpec");
return b(d.name,d)}throw Error("Can't extract type from "+d);}});define("pilot/types/command","require,exports,module,pilot/canon,pilot/types/basic,pilot/types".split(","),function(c,m){var j=c("pilot/canon"),b=c("pilot/types/basic").SelectionType,d=c("pilot/types"),k=new b({name:"command",data:function(){return j.getCommandNames()},stringify:function(b){return b.name},fromString:function(b){return j.getCommand(b)}});m.startup=function(){d.registerType(k)};m.shutdown=function(){d.unregisterType(k)}});
define("pilot/canon","require,exports,module,pilot/console,pilot/stacktrace,pilot/oop,pilot/useragent,pilot/keys,pilot/event_emitter,pilot/typecheck,pilot/catalog,pilot/types,pilot/lang".split(","),function(c,m){function j(a,b,d,c){return(c&&a.toLowerCase()||a).replace(/(?:^\s+|\n|\s+$)/g,"").split(RegExp("[\\s ]*"+b+"[\\s ]*","g"),d||999)}function b(a,b,d){for(var c,f=0,a=j(a,"\\-",null,!0),g=0,k=a.length;g<k;++g)s.KEY_MODS[a[g]]?f|=s.KEY_MODS[a[g]]:c=a[g]||"-";if(null==d)return{key:c,hashId:f};
(d[f]||(d[f]={}))[c]=b}function d(a){var d=a.bindKey,c=d[F],f=E,g=C;if(!d.sender)throw Error("All key bindings must have a sender");if(!d.mac&&null!==d.mac)throw Error("All key bindings must have a mac key binding");if(!d.win&&null!==d.win)throw Error("All key bindings must have a windows key binding");if(d[F])if("string"==typeof d.sender)j(d.sender,"\\|",null,!0).forEach(function(d){f[d]||(f[d]={});c.split("|").forEach(function(c){b(c,a,f[d])})});else if(q.isFunction(d.sender))d={command:a,sender:d.sender},
keyData=b(c),g[keyData.hashId]||(g[keyData.hashId]={}),g[keyData.hashId][keyData.key]?g[keyData.hashId][keyData.key].push(d):g[keyData.hashId][keyData.key]=[d];else throw Error("Key binding must have a sender that is a string or function");}function k(a,b,d,c){q.isNumber(c)&&(c=s.keyCodeToString(c));for(var f=(C[d]||{})[c]||[],g=0;g<f.length;g++)if(f[g].sender(a,b,d,c))return f[g].command;return(a=E[b])&&a[d]&&a[d][c]}function g(a,b){var d=b.type;b.type=B.getType(d);if(null==b.type)throw Error("In "+
a+"/"+b.name+": can't find type for: "+JSON.stringify(d));}function a(a,b){for(var d=a.args,c=a.command.params,f=0;f<c.length;f++){var g=c[f];if(a.getParamStatus(g)!=A.VALID||null===g.defaultValue){var k=g.description;null===g.defaultValue&&(k+=" (optional)");if(k=prompt(k,g.defaultValue||""))d[g.name]=k;else{b();return}}}b()}function f(b,d,c,f,g){function k(){b.exec(d,j.args,j);!j.isAsync&&!j.isDone&&j.done()}"string"===typeof b&&(b=z[b]);if(!b)return!1;var j=new n({sender:c,command:b,args:f||{},
typed:g});if(j.getStatus()==A.INVALID)return v.error("Canon.exec: Invalid parameter(s) passed to "+b.name),!1;if(j.getStatus()==A.INCOMPLETE){var q,c=d[c];if(!c||!c.getArgsProvider||!(q=c.getArgsProvider()))q=a;q(j,function(){j.getStatus()==A.VALID&&k()})}else k();return!0}function n(a){a=a||{};this.command=a.command;this.args=a.args;this.typed=a.typed;this._begunOutput=!1;this.start=new Date;this.end=null;this.error=this.completed=!1}var v=c("pilot/console");c("pilot/stacktrace");var t=c("pilot/oop"),
u=c("pilot/useragent"),s=c("pilot/keys"),y=c("pilot/event_emitter").EventEmitter,q=c("pilot/typecheck"),x=c("pilot/catalog"),A=c("pilot/types").Status,B=c("pilot/types"),r=c("pilot/lang"),p={name:"command",description:"A command is a bit of functionality with optional typed arguments which can do something small like moving the cursor around the screen, or large like cloning a project from VCS.",indexOn:"name"};m.startup=function(){x.addExtensionSpec(p)};m.shutdown=function(){x.removeExtensionSpec(p)};
var z={},E={},C={},F=u.isMac?"mac":"win",G=[];m.removeCommand=function(a){var b="string"===typeof a?a:a.name,a=z[b];delete z[b];r.arrayRemove(G,b);var b=E,d;for(d in b)for(var c in b[d])for(var f in b[d][c])b[d][c][f]==a&&delete b[d][c][f];var g=C;for(d in g)for(c in g[d])g[d][c].forEach(function(b,f){b.command==a&&g[d][c].splice(f,1)})};m.addCommand=function(a){if(!a.name)throw Error("All registered commands must have a name");null==a.params&&(a.params=[]);if(!Array.isArray(a.params))throw Error("command.params must be an array in "+
a.name);a.params.forEach(function(b){if(!b.name)throw Error("In "+a.name+": all params must have a name");g(a.name,b)},this);z[a.name]=a;a.bindKey&&d(a);G.push(a.name);G.sort()};m.getCommand=function(a){return z[a]};m.getCommandNames=function(){return G};m.findKeyCommand=k;m.exec=f;m.execKeyCommand=function(a,b,d,c){return(d=k(a,b,d,c))?f(d,a,b,{}):!1};m.upgradeType=g;t.implement(m,y);var J=[];t.implement(n.prototype,y);n.prototype.getParamStatus=function(a){var b=this.args||{};if(a.name in b){if(null==
b[a.name])return null===a.defaultValue?A.VALID:A.INCOMPLETE;var d,b=b[a.name].toString();try{d=a.type.parse(b)}catch(c){return A.INVALID}if(d.status!=A.VALID)return d.status}else if(void 0===a.defaultValue)return A.INCOMPLETE;return A.VALID};n.prototype.getParamNameStatus=function(a){for(var b=this.command.params||[],d=0;d<b.length;d++)if(b[d].name==a)return this.getParamStatus(b[d]);throw"Parameter '"+a+"' not defined on command '"+this.command.name+"'";};n.prototype.getStatus=function(){var a=this.command.params;
if(!a||0==a.length)return A.VALID;for(var b=[],d=0;d<a.length;d++)b.push(this.getParamStatus(a[d]));return A.combine(b)};n.prototype._beginOutput=function(){this._begunOutput=!0;this.outputs=[];for(J.push(this);100<J.length;)J.shiftObject();m._dispatchEvent("output",{requests:J,request:this})};n.prototype.doneWithError=function(a){this.error=!0;this.done(a)};n.prototype.async=function(){this.isAsync=!0;this._begunOutput||this._beginOutput()};n.prototype.output=function(a){this._begunOutput||this._beginOutput();
"string"!==typeof a&&!(a instanceof Node)&&(a=a.toString());this.outputs.push(a);this.isDone=!0;this._dispatchEvent("output",{});return this};n.prototype.done=function(a){this.completed=!0;this.end=new Date;this.duration=this.end.getTime()-this.start.getTime();a&&this.output(a);this.isDone||(this.isDone=!0,this._dispatchEvent("output",{}))};m.Request=n});
define("pilot/console",["require","exports","module"],function(c,m){var j=function(){},b="assert,count,debug,dir,dirxml,error,group,groupEnd,info,log,profile,profileEnd,time,timeEnd,trace,warn".split(",");"undefined"===typeof window?b.forEach(function(b){m[b]=function(){var c=Array.prototype.slice.call(arguments);postMessage(JSON.stringify({op:"log",method:b,args:c}))}}):b.forEach(function(b){m[b]=window.console&&window.console[b]?Function.prototype.bind.call(window.console[b],window.console):j})});
define("pilot/stacktrace",["require","exports","module","pilot/useragent","pilot/console"],function(c,m){function j(){}var b=c("pilot/useragent"),d=c("pilot/console"),k=b.isGecko?"firefox":b.isOpera?"opera":"other",g={chrome:function(a){var b=a.stack;return!b?(d.log(a),[]):b.replace(/^.*?\n/,"").replace(/^.*?\n/,"").replace(/^.*?\n/,"").replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@").split("\n")},firefox:function(a){var b=a.stack;if(!b)return d.log(a),
[];b=b.replace(/(?:\n@:0)?\s+$/m,"");b=b.replace(/^\(/gm,"{anonymous}(");return b.split("\n")},opera:function(a){var a=a.message.split("\n"),b=/Line\s+(\d+).*?script\s+(http\S+)(?:.*?in\s+function\s+(\S+))?/i,d,c,f;for(d=4,c=0,f=a.length;d<f;d+=2)b.test(a[d])&&(a[c++]=(RegExp.$3?RegExp.$3+"()@"+RegExp.$2+RegExp.$1:"{anonymous}()@"+RegExp.$2+":"+RegExp.$1)+" -- "+a[d+1].replace(/^\s+/,""));a.splice(c,a.length-c);return a},other:function(a){for(var b=/function\s*([\w\-$]+)?\s*\(/i,d=[],c=0,f,g;a&&10>
d.length;){f=b.test(a.toString())?RegExp.$1||"{anonymous}":"{anonymous}";g=Array.prototype.slice.call(a.arguments);var k=d,j=c++;f+="(";for(var m=0;m<g.length;++m){var B=g[m];"object"==typeof B?g[m]="#object":"function"==typeof B?g[m]="#function":"string"==typeof B&&(g[m]='"'+B+'"')}g=g.join(",");k[j]=f+g+")";if(a===a.caller&&window.opera)break;a=a.caller}return d}};j.prototype={sourceCache:{},ajax:function(a){var b=this.createXMLHTTPObject();if(b)return b.open("GET",a,!1),b.setRequestHeader("User-Agent",
"XMLHTTP/1.0"),b.send(""),b.responseText},createXMLHTTPObject:function(){for(var a,b=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],d=0;d<b.length;d++)try{return a=b[d](),this.createXMLHTTPObject=b[d],a}catch(c){}},getSource:function(a){a in this.sourceCache||(this.sourceCache[a]=this.ajax(a).split("\n"));return this.sourceCache[a]},guessFunctions:function(a){for(var b=
0;b<a.length;++b){var d=a[b],c=/{anonymous}\(.*\)@(\w+:\/\/([-\w\.]+)+(:\d+)?[^:]+):(\d+):?(\d+)?/.exec(d);if(c){var f=c[1],c=c[4];f&&c&&(f=this.guessFunctionName(f,c),a[b]=d.replace("{anonymous}",f))}}return a},guessFunctionName:function(a,b){try{return this.guessFunctionNameFromLines(b,this.getSource(a))}catch(d){return"getSource failed with url: "+a+", exception: "+d.toString()}},guessFunctionNameFromLines:function(a,b){for(var d=/function ([^(]*)\(([^)]*)\)/,c=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,
f="",g=0;10>g;++g)if(f=b[a-g]+f,void 0!==f){var k=c.exec(f);if(k||(k=d.exec(f))&&k[1])return k[1]}return"(?)"}};var a=new j,f=[/http:\/\/localhost:4020\/sproutcore.js:/];m.ignoreFramesMatching=function(a){f.push(a)};m.Trace=function(b,d){this._ex=b;this._stack=g[k](b);d&&(this._stack=a.guessFunctions(this._stack))};m.Trace.prototype.log=function(a){0>=a&&(a=999999999);for(var b=0,c=0;c<this._stack.length&&b<a;c++){var g=this._stack[c],k=!0;f.forEach(function(a){a.test(g)&&(k=!1)});k&&(d.debug(g),
b++)}}});
define("pilot/useragent",["require","exports","module"],function(c,m){var j=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),b=navigator.userAgent;m.isWin="win"==j;m.isMac="mac"==j;m.isLinux="linux"==j;m.isIE=!+"\v1";m.isGecko=m.isMozilla=window.controllers&&"Gecko"===window.navigator.product;m.isOldGecko=m.isGecko&&/rv\:1/.test(navigator.userAgent);m.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera);m.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0;
m.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0;m.isAIR=0<=b.indexOf("AdobeAIR");m.isIPad=0<=b.indexOf("iPad");m.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"};m.getOS=function(){return m.isMac?m.OS.MAC:m.isLinux?m.OS.LINUX:m.OS.WINDOWS}});
define("pilot/oop",["require","exports","module"],function(c,m){m.inherits=function(){var c=function(){};return function(b,d){c.prototype=d.prototype;b.super_=d.prototype;b.prototype=new c;b.prototype.constructor=b}}();m.mixin=function(c,b){for(var d in b)c[d]=b[d]};m.implement=function(c,b){m.mixin(c,b)}});
define("pilot/keys",["require","exports","module","pilot/oop"],function(c,m){var j=c("pilot/oop"),b=function(){var b={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",
120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:'"'}};for(i in b.FUNCTION_KEYS){var c=b.FUNCTION_KEYS[i].toUpperCase();
b[c]=parseInt(i,10)}j.mixin(b,b.MODIFIER_KEYS);j.mixin(b,b.PRINTABLE_KEYS);j.mixin(b,b.FUNCTION_KEYS);return b}();j.mixin(m,b);m.keyCodeToString=function(d){return(b[d]||String.fromCharCode(d)).toLowerCase()}});
define("pilot/event_emitter",["require","exports","module"],function(c,m){var j={};j._emit=j._dispatchEvent=function(b,d){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[b];if(c&&c.length){d=d||{};d.type=b;for(var g=0;g<c.length;g++)c[g](d)}};j.on=j.addEventListener=function(b,d){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[b];c||(c=this._eventRegistry[b]=[]);-1==c.indexOf(d)&&c.push(d)};j.removeListener=j.removeEventListener=function(b,d){this._eventRegistry=
this._eventRegistry||{};var c=this._eventRegistry[b];if(c){var g=c.indexOf(d);-1!==g&&c.splice(g,1)}};j.removeAllListeners=function(b){this._eventRegistry&&(this._eventRegistry[b]=[])};m.EventEmitter=j});
define("pilot/typecheck",["require","exports","module"],function(c,m){var j=Object.prototype.toString;m.isString=function(b){return b&&"[object String]"===j.call(b)};m.isBoolean=function(b){return b&&"[object Boolean]"===j.call(b)};m.isNumber=function(b){return b&&"[object Number]"===j.call(b)&&isFinite(b)};m.isObject=function(b){return void 0!==b&&(null===b||"object"==typeof b||Array.isArray(b)||m.isFunction(b))};m.isFunction=function(b){return b&&"[object Function]"===j.call(b)}});
define("pilot/catalog",["require","exports","module"],function(c,m){var j={};m.addExtensionSpec=function(b){j[b.name]=b};m.removeExtensionSpec=function(b){"string"===typeof b?delete j[b]:delete j[b.name]};m.getExtensionSpec=function(b){return j[b]};m.getExtensionSpecs=function(){return Object.keys(j)}});
define("pilot/lang",["require","exports","module"],function(c,m){m.stringReverse=function(b){return b.split("").reverse().join("")};m.stringRepeat=function(b,c){return Array(c+1).join(b)};var j=/^\s\s*/,b=/\s\s*$/;m.stringTrimLeft=function(b){return b.replace(j,"")};m.stringTrimRight=function(d){return d.replace(b,"")};m.copyObject=function(b){var c={},g;for(g in b)c[g]=b[g];return c};m.copyArray=function(b){var c=[];for(i=0,l=b.length;i<l;i++)c[i]=b[i]&&"object"==typeof b[i]?this.copyObject(b[i]):
b[i];return c};m.deepCopy=function(b){if("object"!=typeof b)return b;var c=b.constructor(),g;for(g in b)c[g]="object"==typeof b[g]?this.deepCopy(b[g]):b[g];return c};m.arrayToMap=function(b){for(var c={},g=0;g<b.length;g++)c[b[g]]=1;return c};m.arrayRemove=function(b,c){for(var g=0;g<=b.length;g++)c===b[g]&&b.splice(g,1)};m.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")};m.deferredCall=function(b){var c=null,g=function(){c=null;b()},a=function(b){c||(c=setTimeout(g,b||
0));return a};a.schedule=a;a.call=function(){this.cancel();b();return a};a.cancel=function(){clearTimeout(c);c=null;return a};return a}});
define("pilot/types/settings","require,exports,module,pilot/types/basic,pilot/types,pilot/settings".split(","),function(c,m){var j=c("pilot/types/basic").SelectionType,b=c("pilot/types/basic").DeferredType,d=c("pilot/types"),k=c("pilot/settings").settings,g,a=new j({name:"setting",data:function(){return n.settings.getSettingNames()},stringify:function(a){g=a;return a.name},fromString:function(a){return g=k.getSetting(a)},noMatch:function(){g=null}}),f=new b({name:"settingValue",defer:function(){return g?
g.type:d.getType("text")},getDefault:function(){var a=this.parse("");if(g){var b=g.get();if(0===a.predictions.length)a.predictions.push(b);else{for(var d=!1;;){var c=a.predictions.indexOf(b);if(-1===c)break;a.predictions.splice(c,1);d=!0}d&&a.predictions.push(b)}}return a}}),n;m.startup=function(b){n=b.env;d.registerType(a);d.registerType(f)};m.shutdown=function(){d.unregisterType(a);d.unregisterType(f)}});
define("pilot/settings","require,exports,module,pilot/console,pilot/oop,pilot/types,pilot/event_emitter,pilot/catalog".split(","),function(c,m){function j(b,d){this._settings=d;Object.keys(b).forEach(function(a){this[a]=b[a]},this);this.type=a.getType(this.type);if(null==this.type)throw Error("In "+this.name+": can't find type for: "+JSON.stringify(b.type));if(!this.name)throw Error("Setting.name == undefined. Ignoring.",this);if(void 0===!this.defaultValue)throw Error("Setting.defaultValue == undefined",
this);if(this.onChange)this.on("change",this.onChange.bind(this));this.set(this.defaultValue)}function b(a){this._deactivated={};this._settings={};this._settingNames=[];a&&this.setPersister(a)}function d(){}var k=c("pilot/console"),g=c("pilot/oop"),a=c("pilot/types"),f=c("pilot/event_emitter").EventEmitter,n=c("pilot/catalog"),v={name:"setting",description:"A setting is something that the application offers as a way to customize how it works",register:"env.settings.addSetting",indexOn:"name"};m.startup=
function(){n.addExtensionSpec(v)};m.shutdown=function(){n.removeExtensionSpec(v)};j.prototype={get:function(){return this.value},set:function(a){this.value!==a&&(this.value=a,this._settings.persister&&this._settings.persister.persistValue(this._settings,this.name,a),this._dispatchEvent("change",{setting:this,value:a}))},resetValue:function(){this.set(this.defaultValue)},toString:function(){return this.name}};g.implement(j.prototype,f);b.prototype={addSetting:function(a){a=new j(a,this);this._settings[a.name]=
a;this._settingNames.push(a.name);this._settingNames.sort()},addSettings:function(a){Object.keys(a).forEach(function(b){var d=a[b];"name"in d||(d.name=b);this.addSetting(d)},this)},removeSetting:function(a){a="string"===typeof a?a:a.name;delete this._settings[a];util.arrayRemove(this._settingNames,a);settings.removeAllListeners("change")},removeSettings:function(a){Object.keys(a).forEach(function(b){var d=a[b];"name"in d||(d.name=b);this.removeSettings(d)},this)},getSettingNames:function(){return this._settingNames},
getSetting:function(a){return this._settings[a]},setPersister:function(a){(this._persister=a)&&a.loadInitialValues(this)},resetAll:function(){this.getSettingNames().forEach(function(a){this.resetValue(a)},this)},_list:function(){var a=[];this.getSettingNames().forEach(function(b){a.push({key:b,value:this.getSetting(b).get()})},this);return a},_loadDefaultValues:function(){this._loadFromObject(this._getDefaultValues())},_loadFromObject:function(a){for(var b in a)if(a.hasOwnProperty(b)){var d=this._settings[b];
d?(d=d.type.parse(a[b]),this.set(b,d)):this.set(b,a[b])}},_saveToObject:function(){return this.getSettingNames().map(function(a){return this._settings[a].type.stringify(this.get(a))}.bind(this))},_getDefaultValues:function(){return this.getSettingNames().map(function(a){return this._settings[a].spec.defaultValue}.bind(this))}};m.settings=new b;d.prototype={loadInitialValues:function(a){a._loadDefaultValues();var b=cookie.get("settings");a._loadFromObject(JSON.parse(b))},persistValue:function(a){try{var b=
JSON.stringify(a._saveToObject());cookie.set("settings",b)}catch(d){k.error("Unable to JSONify the settings! "+d)}}};m.CookiePersister=d});
define("pilot/commands/settings",["require","exports","module","pilot/canon"],function(c,m){var j={name:"set",params:[{name:"setting",type:"setting",description:"The name of the setting to display or alter",defaultValue:null},{name:"value",type:"settingValue",description:"The new value for the chosen setting",defaultValue:null}],description:"define and show settings",exec:function(b,d,a){var c;d.setting?void 0===d.value?c="<strong>"+setting.name+"</strong> = "+setting.get():(d.setting.set(d.value),
c="Setting: <strong>"+d.setting.name+"</strong> = "+d.setting.get()):(d=b.settings.getSettingNames(),c="",d.sort(function(a,b){return a.localeCompare(b)}),d.forEach(function(a){a=b.settings.getSetting(a);c+='<a class="setting" href="https://wiki.mozilla.org/Labs/Skywriter/Settings#'+a.name+'" title="View external documentation on setting: '+a.name+'" target="_blank">'+a.name+"</a> = "+a.value+"<br/>"}));a.done(c)}},b={name:"unset",params:[{name:"setting",type:"setting",description:"The name of the setting to return to defaults"}],
description:"unset a setting entirely",exec:function(b,d,a){var c=b.settings.get(d.setting);c?(c.reset(),a.done("Reset "+c.name+" to default: "+b.settings.get(d.setting))):a.doneWithError("No setting with the name <strong>"+d.setting+"</strong>.")}},d=c("pilot/canon");m.startup=function(){d.addCommand(j);d.addCommand(b)};m.shutdown=function(){d.removeCommand(j);d.removeCommand(b)}});
define("pilot/commands/basic",["require","exports","module","pilot/typecheck","pilot/canon"],function(c,m){var j=c("pilot/typecheck"),b=c("pilot/canon"),d={name:"help",params:[{name:"search",type:"text",description:"Search string to narrow the output.",defaultValue:null}],description:"Get help on the available commands.",exec:function(d,a,c){var d=[],k=b.getCommand(a.search);if(k&&k.exec)d.push(k.description?k.description:"No description for "+a.search);else{var j=!1;k?(d.push("<h2>Sub-Commands of "+
k.name+"</h2>"),d.push("<p>"+k.description+"</p>")):a.search?("hidden"==a.search&&(a.search="",j=!0),d.push("<h2>Commands starting with '"+a.search+"':</h2>")):d.push("<h2>Available Commands:</h2>");var m=b.getCommandNames();m.sort();d.push("<table>");for(var u=0;u<m.length;u++)if(k=b.getCommand(m[u]),j||!k.hidden)if(void 0!==k.description&&!(a.search&&0!==k.name.indexOf(a.search))&&(a.search||-1==k.name.indexOf(" "))&&!(k&&k.name==a.search))d.push("<tr>"),d.push('<th class="right">'+k.name+"</th>"),
d.push("<td>"+k.description+"</td>"),d.push("</tr>");d.push("</table>")}c.done(d.join(""))}},k={name:"eval",params:[{name:"javascript",type:"text",description:"The JavaScript to evaluate"}],description:"evals given js code and show the result",hidden:!0,exec:function(b,a,d){var c,b=a.javascript;try{c=eval(b)}catch(k){c="<b>Error: "+k.message+"</b>"}var m=a="",u;if(j.isFunction(c))a=(c+"").replace(/\n/g,"<br>").replace(/ /g,"&#160"),m="function";else if(j.isObject(c)){var m=Array.isArray(c)?"array":
"object",s=[],y;for(u in c)c.hasOwnProperty(u)&&(y=j.isFunction(c[u])?"[function]":j.isObject(c[u])?"[object]":c[u],s.push({name:u,value:y}));s.sort(function(a,b){return a.name.toLowerCase()<b.name.toLowerCase()?-1:1});for(u=0;u<s.length;u++)a+="<b>"+s[u].name+"</b>: "+s[u].value+"<br>"}else a=c,m=typeof c;d.done("Result for eval <b>'"+b+"'</b> (type: "+m+"): <br><br>"+a)}},b=c("pilot/canon");m.startup=function(){b.addCommand(d);b.addCommand(k)};m.shutdown=function(){b.removeCommand(d);b.removeCommand(k)}});
define("pilot/settings/canon",["require","exports","module"],function(c,m){var j={name:"historyLength",description:"How many typed commands do we recall for reference?",type:"number",defaultValue:50};m.startup=function(b){b.env.settings.addSetting(j)};m.shutdown=function(b){b.env.settings.removeSetting(j)}});
define("pilot/plugin_manager",["require","exports","module","pilot/promise"],function(c,m){var j=c("pilot/promise").Promise;m.REASONS={APP_STARTUP:1,APP_SHUTDOWN:2,PLUGIN_ENABLE:3,PLUGIN_DISABLE:4,PLUGIN_INSTALL:5,PLUGIN_UNINSTALL:6,PLUGIN_UPGRADE:7,PLUGIN_DOWNGRADE:8};m.Plugin=function(b){this.name=b;this.status=this.INSTALLED};m.Plugin.prototype={NEW:0,INSTALLED:1,REGISTERED:2,STARTED:3,UNREGISTERED:4,SHUTDOWN:5,install:function(b,d){var k=new j;if(this.status>this.NEW)return k.resolve(this),k;
c([this.name],function(c){c.install&&c.install(b,d);this.status=this.INSTALLED;k.resolve(this)}.bind(this));return k},register:function(b,d){var k=new j;if(this.status!=this.INSTALLED)return k.resolve(this),k;c([this.name],function(c){c.register&&c.register(b,d);this.status=this.REGISTERED;k.resolve(this)}.bind(this));return k},startup:function(b,d){var d=d||m.REASONS.APP_STARTUP,k=new j;if(this.status!=this.REGISTERED)return k.resolve(this),k;c([this.name],function(c){c.startup&&c.startup(b,d);this.status=
this.STARTED;k.resolve(this)}.bind(this));return k},shutdown:function(b,d){this.status==this.STARTED&&(pluginModule=c(this.name),pluginModule.shutdown&&pluginModule.shutdown(b,d))}};m.PluginCatalog=function(){this.plugins={}};m.PluginCatalog.prototype={registerPlugins:function(b,d,c){var g=[];b.forEach(function(a){var b=this.plugins[a];void 0===b&&(b=new m.Plugin(a),this.plugins[a]=b,g.push(b.register(d,c)))}.bind(this));return j.group(g)},startupPlugins:function(b,d){var c=[],g;for(g in this.plugins)c.push(this.plugins[g].startup(b,
d));return j.group(c)}};m.catalog=new m.PluginCatalog});
define("pilot/promise",["require","exports","module","pilot/console","pilot/stacktrace"],function(c,m){var j=c("pilot/console");c("pilot/stacktrace");var b=0,d=[],k=[];Promise=function(){this._status=0;this._value=void 0;this._onSuccessHandlers=[];this._onErrorHandlers=[];this._id=b++;d[this._id]=this};Promise.prototype.isPromise=!0;Promise.prototype.isComplete=function(){return 0!=this._status};Promise.prototype.isResolved=function(){return 1==this._status};Promise.prototype.isRejected=function(){return-1==
this._status};Promise.prototype.then=function(b,a){"function"===typeof b&&(1===this._status?b.call(null,this._value):0===this._status&&this._onSuccessHandlers.push(b));"function"===typeof a&&(-1===this._status?a.call(null,this._value):0===this._status&&this._onErrorHandlers.push(a));return this};Promise.prototype.chainPromise=function(b){var a=new Promise;a._chainedFrom=this;this.then(function(d){try{a.resolve(b(d))}catch(c){a.reject(c)}},function(b){a.reject(b)});return a};Promise.prototype.resolve=
function(b){return this._complete(this._onSuccessHandlers,1,b,"resolve")};Promise.prototype.reject=function(b){return this._complete(this._onErrorHandlers,-1,b,"reject")};Promise.prototype._complete=function(b,a,c,n){if(0!=this._status)return j.group("Promise already closed"),j.error("Attempted "+n+"() with ",c),j.error("Previous status = ",this._status,", previous value = ",this._value),j.trace(),this._completeTrace&&(j.error("Trace of previous completion:"),this._completeTrace.log(5)),j.groupEnd(),
this;this._status=a;this._value=c;b.forEach(function(a){a.call(null,this._value)},this);this._onSuccessHandlers.length=0;this._onErrorHandlers.length=0;delete d[this._id];for(k.push(this);20<k.length;)k.shift();return this};Promise.group=function(b){b instanceof Array||(b=Array.prototype.slice.call(arguments));if(0===b.length)return(new Promise).resolve([]);var a=new Promise,d=[],c=0,k=function(k){return function(j){d[k]=j;c++;-1!==a._status&&c===b.length&&a.resolve(d)}};b.forEach(function(b,d){var c=
k(d),f=a.reject.bind(a);b.then(c,f)});return a};m.Promise=Promise;m._outstanding=d;m._recent=k});
define("pilot/dom",["require","exports","module"],function(c,m){m.createElement=function(c,b){return document.createElementNS?document.createElementNS(b||"http://www.w3.org/1999/xhtml",c):document.createElement(c)};m.setText=function(c,b){void 0!==c.innerText&&(c.innerText=b);void 0!==c.textContent&&(c.textContent=b)};document.documentElement.classList?(m.hasCssClass=function(c,b){return c.classList.contains(b)},m.addCssClass=function(c,b){c.classList.add(b)},m.removeCssClass=function(c,b){c.classList.remove(b)},
m.toggleCssClass=function(c,b){return c.classList.toggle(b)}):(m.hasCssClass=function(c,b){return-1!==c.className.split(/\s+/g).indexOf(b)},m.addCssClass=function(c,b){m.hasCssClass(c,b)||(c.className+=" "+b)},m.removeCssClass=function(c,b){for(var d=c.className.split(/\s+/g);;){var k=d.indexOf(b);if(-1==k)break;d.splice(k,1)}c.className=d.join(" ")},m.toggleCssClass=function(c,b){for(var d=c.className.split(/\s+/g),k=!0;;){var g=d.indexOf(b);if(-1==g)break;k=!1;d.splice(g,1)}k&&d.push(b);c.className=
d.join(" ");return k});m.setCssClass=function(c,b,d){d?m.addCssClass(c,b):m.removeCssClass(c,b)};m.importCssString=function(c,b){b=b||document;if(b.createStyleSheet)b.createStyleSheet().cssText=c;else{var d=b.createElementNS?b.createElementNS("http://www.w3.org/1999/xhtml","style"):b.createElement("style");d.appendChild(b.createTextNode(c));(b.getElementsByTagName("head")[0]||b.documentElement).appendChild(d)}};m.getInnerWidth=function(c){return parseInt(m.computedStyle(c,"paddingLeft"))+parseInt(m.computedStyle(c,
"paddingRight"))+c.clientWidth};m.getInnerHeight=function(c){return parseInt(m.computedStyle(c,"paddingTop"))+parseInt(m.computedStyle(c,"paddingBottom"))+c.clientHeight};void 0!==window.pageYOffset?(m.getPageScrollTop=function(){return window.pageYOffset},m.getPageScrollLeft=function(){return window.pageXOffset}):(m.getPageScrollTop=function(){return document.body.scrollTop},m.getPageScrollLeft=function(){return document.body.scrollLeft});m.computedStyle=window.getComputedStyle?function(c,b){return b?
(window.getComputedStyle(c,"")||{})[b]||"":window.getComputedStyle(c,"")||{}}:function(c,b){return b?c.currentStyle[b]:c.currentStyle};m.scrollbarWidth=function(){var c=m.createElement("p");c.style.width="100%";c.style.minWidth="0px";c.style.height="200px";var b=m.createElement("div"),d=b.style;d.position="absolute";d.left="-10000px";d.overflow="hidden";d.width="200px";d.minWidth="0px";d.height="150px";b.appendChild(c);var k=document.body||document.documentElement;k.appendChild(b);var g=c.offsetWidth;
d.overflow="scroll";c=c.offsetWidth;g==c&&(c=b.clientWidth);k.removeChild(b);return g-c};m.setInnerHtml=function(c,b){var d=c.cloneNode(!1);d.innerHTML=b;c.parentNode.replaceChild(d,c);return d};m.setInnerText=function(c,b){document.body&&"textContent"in document.body?c.textContent=b:c.innerText=b};m.getInnerText=function(c){return document.body&&"textContent"in document.body?c.textContent:c.innerText||c.textContent||""};m.getParentWindow=function(c){return c.defaultView||c.parentWindow};m.getSelectionStart=
function(c){var b;try{b=c.selectionStart||0}catch(d){b=0}return b};m.setSelectionStart=function(c,b){return c.selectionStart=b};m.getSelectionEnd=function(c){var b;try{b=c.selectionEnd||0}catch(d){b=0}return b};m.setSelectionEnd=function(c,b){return c.selectionEnd=b}});
define("pilot/event","require,exports,module,pilot/keys,pilot/useragent,pilot/dom".split(","),function(c,m){function j(c,a,f){var k=0,k=d.isOpera&&d.isMac?0|(a.metaKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.ctrlKey?8:0):0|(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0);if(f in b.MODIFIER_KEYS){switch(b.MODIFIER_KEYS[f]){case "Alt":k=2;break;case "Shift":k=4;break;case "Ctrl":k=1;break;default:k=8}f=0}if(k&8&&(91==f||93==f))f=0;return 0==k&&!(f in b.FUNCTION_KEYS)?!1:c(a,k,f)}var b=
c("pilot/keys"),d=c("pilot/useragent"),k=c("pilot/dom");m.addListener=function(b,a,d){if(b.addEventListener)return b.addEventListener(a,d,!1);if(b.attachEvent){var c=function(){d(window.event)};d._wrapper=c;b.attachEvent("on"+a,c)}};m.removeListener=function(b,a,d){if(b.removeEventListener)return b.removeEventListener(a,d,!1);b.detachEvent&&b.detachEvent("on"+a,d._wrapper||d)};m.stopEvent=function(b){m.stopPropagation(b);m.preventDefault(b);return!1};m.stopPropagation=function(b){b.stopPropagation?
b.stopPropagation():b.cancelBubble=!0};m.preventDefault=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1};m.getDocumentX=function(b){return b.clientX?b.clientX+k.getPageScrollLeft():b.pageX};m.getDocumentY=function(b){return b.clientY?b.clientY+k.getPageScrollTop():b.pageY};m.getButton=function(b){return"dblclick"==b.type?0:"contextmenu"==b.type?2:b.preventDefault?b.button:{1:0,2:2,4:1}[b.button]};m.capture=document.documentElement.setCapture?function(b,a,d){function c(k){a&&a(k);
d&&d();m.removeListener(b,"mousemove",a);m.removeListener(b,"mouseup",c);m.removeListener(b,"losecapture",c);b.releaseCapture()}m.addListener(b,"mousemove",a);m.addListener(b,"mouseup",c);m.addListener(b,"losecapture",c);b.setCapture()}:function(b,a,d){function c(b){a(b);b.stopPropagation()}function k(b){a&&a(b);d&&d();document.removeEventListener("mousemove",c,!0);document.removeEventListener("mouseup",k,!0);b.stopPropagation()}document.addEventListener("mousemove",c,!0);document.addEventListener("mouseup",
k,!0)};m.addMouseWheelListener=function(b,a){var d=function(b){void 0!==b.wheelDelta?void 0!==b.wheelDeltaX?(b.wheelX=-b.wheelDeltaX/8,b.wheelY=-b.wheelDeltaY/8):(b.wheelX=0,b.wheelY=-b.wheelDelta/8):b.axis&&b.axis==b.HORIZONTAL_AXIS?(b.wheelX=5*(b.detail||0),b.wheelY=0):(b.wheelX=0,b.wheelY=5*(b.detail||0));a(b)};m.addListener(b,"DOMMouseScroll",d);m.addListener(b,"mousewheel",d)};m.addMultiMouseDownListener=function(b,a,c,k,j){var t=0,u,s,y=function(b){t+=1;1==t&&(u=b.clientX,s=b.clientY,setTimeout(function(){t=
0},k||600));var d=m.getButton(b)==a;if(!d||5<Math.abs(b.clientX-u)||5<Math.abs(b.clientY-s))t=0;t==c&&(t=0,j(b));if(d)return m.preventDefault(b)};m.addListener(b,"mousedown",y);d.isIE&&m.addListener(b,"dblclick",y)};m.addCommandKeyListener=function(b,a){var c=m.addListener;if(d.isOldGecko){var k=null;c(b,"keydown",function(a){k=a.keyCode});c(b,"keypress",function(b){return j(a,b,k)})}else{var v=null;c(b,"keydown",function(b){v=b.keyIdentifier||b.keyCode;return j(a,b,b.keyCode)});d.isMac&&d.isOpera&&
c(b,"keypress",function(b){if(v!==(b.keyIdentifier||b.keyCode))return j(a,b,b.keyCode);v=null})}}});
define("ace/editor","require,exports,module,pilot/fixoldbrowsers,pilot/oop,pilot/event,pilot/lang,pilot/useragent,ace/keyboard/textinput,ace/mouse_handler,ace/keyboard/keybinding,ace/edit_session,ace/search,ace/range,pilot/event_emitter".split(","),function(c,m){c("pilot/fixoldbrowsers");var j=c("pilot/oop");c("pilot/event");var b=c("pilot/lang"),d=c("pilot/useragent"),k=c("ace/keyboard/textinput").TextInput,g=c("ace/mouse_handler").MouseHandler,a=c("ace/keyboard/keybinding").KeyBinding,f=c("ace/edit_session").EditSession,
n=c("ace/search").Search,v=c("ace/range").Range,t=c("pilot/event_emitter").EventEmitter,u=function(b,c){this.container=b.getContainerElement();this.renderer=b;this.textInput=new k(b.getTextAreaContainer(),this);this.keyBinding=new a(this);d.isIPad||(this.$mouseHandler=new g(this));this.$blockScrolling=0;this.$search=(new n).set({wrap:!0});this.setSession(c||new f(""))};(function(){j.implement(this,t);this.$forwardEvents={gutterclick:1,gutterdblclick:1};this.$originalAddEventListener=this.addEventListener;
this.$originalRemoveEventListener=this.removeEventListener;this.addEventListener=function(a,b){return this.$forwardEvents[a]?this.renderer.addEventListener(a,b):this.$originalAddEventListener(a,b)};this.removeEventListener=function(a,b){return this.$forwardEvents[a]?this.renderer.removeEventListener(a,b):this.$originalRemoveEventListener(a,b)};this.setKeyboardHandler=function(a){this.keyBinding.setKeyboardHandler(a)};this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()};
this.setSession=function(a){if(this.session!=a){if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange);this.session.removeEventListener("changeMode",this.$onChangeMode);this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate);this.session.removeEventListener("changeTabSize",this.$onChangeTabSize);this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit);this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode);
this.session.removeEventListener("onChangeFold",this.$onChangeFold);this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker);this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker);this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint);this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation);this.session.removeEventListener("changeOverwrite",this.$onCursorChange);var d=this.session.getSelection();d.removeEventListener("changeCursor",
this.$onCursorChange);d.removeEventListener("changeSelection",this.$onSelectionChange);this.session.setScrollTopRow(this.renderer.getScrollTopRow())}this.session=a;this.$onDocumentChange=this.onDocumentChange.bind(this);a.addEventListener("change",this.$onDocumentChange);this.renderer.setSession(a);this.$onChangeMode=this.onChangeMode.bind(this);a.addEventListener("changeMode",this.$onChangeMode);this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this);a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate);
this.$onChangeTabSize=this.renderer.updateText.bind(this.renderer);a.addEventListener("changeTabSize",this.$onChangeTabSize);this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this);a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit);this.$onChangeWrapMode=this.onChangeWrapMode.bind(this);a.addEventListener("changeWrapMode",this.$onChangeWrapMode);this.$onChangeFold=this.onChangeFold.bind(this);a.addEventListener("changeFold",this.$onChangeFold);this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this);
this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker);this.$onChangeBackMarker=this.onChangeBackMarker.bind(this);this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker);this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this);this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint);this.$onChangeAnnotation=this.onChangeAnnotation.bind(this);this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation);this.$onCursorChange=
this.onCursorChange.bind(this);this.session.addEventListener("changeOverwrite",this.$onCursorChange);this.selection=a.getSelection();this.selection.addEventListener("changeCursor",this.$onCursorChange);this.$onSelectionChange=this.onSelectionChange.bind(this);this.selection.addEventListener("changeSelection",this.$onSelectionChange);this.onChangeMode();this.onCursorChange();this.onSelectionChange();this.onChangeFrontMarker();this.onChangeBackMarker();this.onChangeBreakpoint();this.onChangeAnnotation();
this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit();this.renderer.scrollToRow(a.getScrollTopRow());this.renderer.updateFull();this._dispatchEvent("changeSession",{session:a,oldSession:b})}};this.getSession=function(){return this.session};this.getSelection=function(){return this.selection};this.resize=function(){this.renderer.onResize()};this.setTheme=function(a){this.renderer.setTheme(a)};this.getTheme=function(){return this.renderer.getTheme()};this.setStyle=function(a){this.renderer.setStyle(a)};
this.unsetStyle=function(a){this.renderer.unsetStyle(a)};this.setFontSize=function(a){this.container.style.fontSize=a};this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(!this.$highlightPending){var a=this;this.$highlightPending=!0;setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());b&&(b=new v(b.row,b.column,b.row,b.column+1),a.session.$bracketHighlight=
a.session.addMarker(b,"ace_bracket","text"))},10)}};this.focus=function(){var a=this;d.isIE||setTimeout(function(){a.textInput.focus()});this.textInput.focus()};this.isFocused=function(){return this.textInput.isFocused()};this.blur=function(){this.textInput.blur()};this.onFocus=function(){this.renderer.showCursor();this.renderer.visualizeFocus();this._dispatchEvent("focus")};this.onBlur=function(){this.renderer.hideCursor();this.renderer.visualizeBlur();this._dispatchEvent("blur")};this.onDocumentChange=
function(a){var a=a.data,b=a.range;this.renderer.updateLines(b.start.row,b.start.row==b.end.row&&"insertLines"!=a.action&&"removeLines"!=a.action?b.end.row:Infinity);this.renderer.updateCursor()};this.onTokenizerUpdate=function(a){a=a.data;this.renderer.updateLines(a.first,a.last)};this.onCursorChange=function(){this.renderer.updateCursor();this.$blockScrolling||this.renderer.scrollCursorIntoView();this.renderer.moveTextAreaToCursor(this.textInput.getElement());this.$highlightBrackets();this.$updateHighlightActiveLine()};
this.$updateHighlightActiveLine=function(){var a=this.getSession();a.$highlightLineMarker&&a.removeMarker(a.$highlightLineMarker);a.$highlightLineMarker=null;if(this.getHighlightActiveLine()&&("line"!=this.getSelectionStyle()||!this.selection.isMultiLine())){var b=this.getCursorPosition(),d=this.session.getFoldLine(b.row),b=d?new v(d.start.row,0,d.end.row+1,0):new v(b.row,0,b.row+1,0);a.$highlightLineMarker=a.addMarker(b,"ace_active_line","background")}};this.onSelectionChange=function(){var a=this.getSession();
a.$selectionMarker&&a.removeMarker(a.$selectionMarker);a.$selectionMarker=null;if(this.selection.isEmpty())this.$updateHighlightActiveLine();else{var b=this.selection.getRange(),d=this.getSelectionStyle();a.$selectionMarker=a.addMarker(b,"ace_selection",d)}this.$highlightSelectedWord&&this.session.getMode().highlightSelection(this)};this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()};this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()};this.onChangeBreakpoint=
function(){this.renderer.setBreakpoints(this.session.getBreakpoints())};this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())};this.onChangeMode=function(){this.renderer.updateText()};this.onChangeWrapLimit=function(){this.renderer.updateFull()};this.onChangeWrapMode=function(){this.renderer.onResize(!0)};this.onChangeFold=function(){this.$updateHighlightActiveLine();this.renderer.updateFull()};this.getCopyText=function(){return this.selection.isEmpty()?"":
this.session.getTextRange(this.getSelectionRange())};this.onCut=function(){!this.$readOnly&&!this.selection.isEmpty()&&(this.session.remove(this.getSelectionRange()),this.clearSelection())};this.insert=function(a){if(!this.$readOnly){var b=this.session,d=b.getMode(),c=this.getCursorPosition();if(this.getBehavioursEnabled()){var f=d.transformAction(b.getState(c.row),"insertion",this,b,a);f&&(a=f.text)}a=a.replace("\t",this.session.getTabString());if(this.selection.isEmpty()){if(this.session.getOverwrite()){var k=
new v.fromPoints(c,c);k.end.column+=a.length;this.session.remove(k)}}else c=this.session.remove(this.getSelectionRange()),this.clearSelection();this.clearSelection();var g=c.column,n=b.getState(c.row),j=d.checkOutdent(n,b.getLine(c.row),a),k=b.getLine(c.row),m=d.getNextLineIndent(n,k.slice(0,c.column),b.getTabString()),t=b.insert(c,a);f&&f.selection&&(2==f.selection.length?this.selection.setSelectionRange(new v(c.row,g+f.selection[0],c.row,g+f.selection[1])):this.selection.setSelectionRange(new v(c.row+
f.selection[0],f.selection[1],c.row+f.selection[2],f.selection[3])));n=b.getState(c.row);if(b.getDocument().isNewLine(a)){this.moveCursorTo(c.row+1,0);a=b.getTabSize();d=Number.MAX_VALUE;for(f=c.row+1;f<=t.row;++f){n=0;k=b.getLine(f);for(g=0;g<k.length;++g)if("\t"==k.charAt(g))n+=a;else if(" "==k.charAt(g))n+=1;else break;/[^\s]/.test(k)&&(d=Math.min(n,d))}for(f=c.row+1;f<=t.row;++f){n=d;k=b.getLine(f);for(g=0;g<k.length&&0<n;++g)"\t"==k.charAt(g)?n-=a:" "==k.charAt(g)&&(n-=1);b.remove(new v(f,0,
f,g))}b.indentRows(c.row+1,t.row,m)}else j&&d.autoOutdent(n,b,c.row)}};this.onTextInput=function(a,b){if(b&&1==a.length)this.keyBinding.onCommandKey({},0,null,a)||this.insert(a);else this.keyBinding.onTextInput(a)};this.onCommandKey=function(a,b,d){this.keyBinding.onCommandKey(a,b,d)};this.setOverwrite=function(a){this.session.setOverwrite(a)};this.getOverwrite=function(){return this.session.getOverwrite()};this.toggleOverwrite=function(){this.session.toggleOverwrite()};this.setScrollSpeed=function(a){this.$mouseHandler.setScrollSpeed(a)};
this.getScrollSpeed=function(){return this.$mouseHandler.getScrollSpeed()};this.$selectionStyle="line";this.setSelectionStyle=function(a){this.$selectionStyle!=a&&(this.$selectionStyle=a,this.onSelectionChange(),this._dispatchEvent("changeSelectionStyle",{data:a}))};this.getSelectionStyle=function(){return this.$selectionStyle};this.$highlightActiveLine=!0;this.setHighlightActiveLine=function(a){this.$highlightActiveLine!=a&&(this.$highlightActiveLine=a,this.$updateHighlightActiveLine())};this.getHighlightActiveLine=
function(){return this.$highlightActiveLine};this.$highlightSelectedWord=!0;this.setHighlightSelectedWord=function(a){this.$highlightSelectedWord!=a&&((this.$highlightSelectedWord=a)?this.session.getMode().highlightSelection(this):this.session.getMode().clearSelectionHighlight(this))};this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord};this.setShowInvisibles=function(a){this.getShowInvisibles()!=a&&this.renderer.setShowInvisibles(a)};this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()};
this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)};this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()};this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)};this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()};this.$readOnly=!1;this.setReadOnly=function(a){this.$readOnly=a};this.getReadOnly=function(){return this.$readOnly};this.$modeBehaviours=!0;this.setBehavioursEnabled=function(a){this.$modeBehaviours=
a};this.getBehavioursEnabled=function(){return this.$modeBehaviours};this.removeRight=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectRight(),this.session.remove(this.getSelectionRange()),this.clearSelection())};this.removeLeft=function(){if(!this.$readOnly){this.selection.isEmpty()&&this.selection.selectLeft();var a=this.getSelectionRange();if(this.getBehavioursEnabled()){var b=this.session,d=b.getState(a.start.row),b=b.getMode().transformAction(d,"deletion",this,b,a);
!1!==b&&(a=b)}this.session.remove(a);this.clearSelection()}};this.removeWordRight=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection())};this.removeWordLeft=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection())};this.removeToLineStart=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectLineStart(),
this.session.remove(this.getSelectionRange()),this.clearSelection())};this.removeToLineEnd=function(){if(!this.$readOnly){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++);this.session.remove(a);this.clearSelection()}};this.splitLine=function(){if(!this.$readOnly){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();
this.insert("\n");this.moveCursorToPosition(a)}};this.transposeLetters=function(){if(!this.$readOnly&&this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!=b){var d=this.session.getLine(a.row);b<d.length?(d=d.charAt(b)+d.charAt(b-1),a=new v(a.row,b-1,a.row,b+1)):(d=d.charAt(b-1)+d.charAt(b-2),a=new v(a.row,b-2,a.row,b));this.session.replace(a,d)}}};this.indent=function(){if(!this.$readOnly){var a=this.session,d=this.getSelectionRange();if(d.start.row<d.end.row||d.start.column<
d.end.column)d=this.$getSelectedRows(),a.indentRows(d.first,d.last,"\t");else{if(this.session.getUseSoftTabs())var d=a.getTabSize(),c=this.getCursorPosition(),a=a.documentToScreenColumn(c.row,c.column),a=b.stringRepeat(" ",d-a%d);else a="\t";return this.onTextInput(a)}}};this.blockOutdent=function(){this.$readOnly||this.session.outdentRows(this.session.getSelection().getRange())};this.toggleCommentLines=function(){if(!this.$readOnly){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();
this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)}};this.removeLines=function(){if(!this.$readOnly){var a=this.$getSelectedRows();this.session.remove(0==a.last||a.last+1<this.session.getLength()?new v(a.first,0,a.last+1,0):new v(a.first-1,this.session.getLine(a.first).length,a.last,this.session.getLine(a.last).length));this.clearSelection()}};this.moveLinesDown=function(){this.$readOnly||this.$moveLines(function(a,b){return this.session.moveLinesDown(a,b)})};this.moveLinesUp=
function(){this.$readOnly||this.$moveLines(function(a,b){return this.session.moveLinesUp(a,b)})};this.moveText=function(a,b){return this.$readOnly?null:this.session.moveText(a,b)};this.copyLinesUp=function(){this.$readOnly||this.$moveLines(function(a,b){this.session.duplicateLines(a,b);return 0})};this.copyLinesDown=function(){this.$readOnly||this.$moveLines(function(a,b){return this.session.duplicateLines(a,b)})};this.$moveLines=function(a){var b=this.$getSelectedRows(),d=a.call(this,b.first,b.last),
c=this.selection;c.setSelectionAnchor(b.last+d+1,0);c.$moveSelection(function(){c.moveCursorTo(b.first+d,0)})};this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:a.start.row,last:a.end.row}};this.onCompositionStart=function(){this.renderer.showComposition(this.getCursorPosition())};this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)};this.onCompositionEnd=function(){this.renderer.hideComposition()};this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()};
this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()};this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()};this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1};this.$getPageDownRow=function(){return this.renderer.getScrollBottomRow()};this.$getPageUpRow=function(){var a=this.renderer.getScrollTopRow(),b=this.renderer.getScrollBottomRow();return a-(b-a)};this.selectPageDown=
function(){var a=this.$getPageDownRow()+Math.floor(this.$getVisibleRowCount()/2);this.scrollPageDown();var b=this.getSelection(),d=this.session.documentToScreenPosition(b.getSelectionLead()),a=this.session.screenToDocumentPosition(a,d.column);b.selectTo(a.row,a.column)};this.selectPageUp=function(){var a=this.renderer.getScrollTopRow()-this.renderer.getScrollBottomRow(),b=this.$getPageUpRow()+Math.round(a/2);this.scrollPageUp();var a=this.getSelection(),d=this.session.documentToScreenPosition(a.getSelectionLead()),
b=this.session.screenToDocumentPosition(b,d.column);a.selectTo(b.row,b.column)};this.gotoPageDown=function(){var a=this.$getPageDownRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a);this.getSelection().moveCursorToScreen(a,b)};this.gotoPageUp=function(){var a=this.$getPageUpRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a);this.getSelection().moveCursorToScreen(a,b)};this.scrollPageDown=function(){this.scrollToRow(this.$getPageDownRow())};this.scrollPageUp=function(){this.renderer.scrollToRow(this.$getPageUpRow())};
this.scrollToRow=function(a){this.renderer.scrollToRow(a)};this.scrollToLine=function(a,b){this.renderer.scrollToLine(a,b)};this.centerSelection=function(){var a=this.getSelectionRange();this.renderer.scrollToLine(Math.floor(a.start.row+(a.end.row-a.start.row)/2),!0)};this.getCursorPosition=function(){return this.selection.getCursor()};this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())};this.getSelectionRange=function(){return this.selection.getRange()};
this.selectAll=function(){this.$blockScrolling+=1;this.selection.selectAll();this.$blockScrolling-=1};this.clearSelection=function(){this.selection.clearSelection()};this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)};this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)};this.gotoLine=function(a,b){this.selection.clearSelection();this.$blockScrolling+=1;this.moveCursorTo(a-1,b||0);this.$blockScrolling-=1;this.isRowVisible(this.getCursorPosition().row)||this.scrollToLine(a,
!0)};this.navigateTo=function(a,b){this.clearSelection();this.moveCursorTo(a,b)};this.navigateUp=function(a){this.selection.clearSelection();this.selection.moveCursorBy(-(a||1),0)};this.navigateDown=function(a){this.selection.clearSelection();this.selection.moveCursorBy(a||1,0)};this.navigateLeft=function(a){if(this.selection.isEmpty())for(a=a||1;a--;)this.selection.moveCursorLeft();else this.moveCursorToPosition(this.getSelectionRange().start);this.clearSelection()};this.navigateRight=function(a){if(this.selection.isEmpty())for(a=
a||1;a--;)this.selection.moveCursorRight();else this.moveCursorToPosition(this.getSelectionRange().end);this.clearSelection()};this.navigateLineStart=function(){this.selection.moveCursorLineStart();this.clearSelection()};this.navigateLineEnd=function(){this.selection.moveCursorLineEnd();this.clearSelection()};this.navigateFileEnd=function(){this.selection.moveCursorFileEnd();this.clearSelection()};this.navigateFileStart=function(){this.selection.moveCursorFileStart();this.clearSelection()};this.navigateWordRight=
function(){this.selection.moveCursorWordRight();this.clearSelection()};this.navigateWordLeft=function(){this.selection.moveCursorWordLeft();this.clearSelection()};this.replace=function(a,b){b&&this.$search.set(b);var d=this.$search.find(this.session);d&&(this.$tryReplace(d,a),null!==d&&this.selection.setSelectionRange(d))};this.replaceAll=function(a,b){b&&this.$search.set(b);var d=this.$search.findAll(this.session);if(d.length){var c=this.getSelectionRange();this.clearSelection();this.selection.moveCursorTo(0,
0);this.$blockScrolling+=1;for(var f=d.length-1;0<=f;--f)this.$tryReplace(d[f],a);this.selection.setSelectionRange(c);this.$blockScrolling-=1}};this.$tryReplace=function(a,b){b=this.$search.replace(this.session.getTextRange(a),b);return null!==b?(a.end=this.session.replace(a,b),a):null};this.getLastSearchOptions=function(){return this.$search.getOptions()};this.find=function(a,b){this.clearSelection();b=b||{};b.needle=a;this.$search.set(b);this.$find()};this.findNext=function(a){a=a||{};"undefined"==
typeof a.backwards&&(a.backwards=!1);this.$search.set(a);this.$find()};this.findPrevious=function(a){a=a||{};"undefined"==typeof a.backwards&&(a.backwards=!0);this.$search.set(a);this.$find()};this.$find=function(a){this.selection.isEmpty()||this.$search.set({needle:this.session.getTextRange(this.getSelectionRange())});"undefined"!=typeof a&&this.$search.set({backwards:a});if(a=this.$search.find(this.session))this.gotoLine(a.end.row+1,a.end.column),this.selection.setSelectionRange(a)};this.undo=function(){this.session.getUndoManager().undo()};
this.redo=function(){this.session.getUndoManager().redo()};this.destroy=function(){this.renderer.destroy()}}).call(u.prototype);m.Editor=u});
define("ace/keyboard/textinput","require,exports,module,pilot/event,pilot/useragent,pilot/dom".split(","),function(c,m){var j=c("pilot/event"),b=c("pilot/useragent"),d=c("pilot/dom");m.TextInput=function(c,g){function a(a){if(!u&&(a=a||n.value)){if(a.charCodeAt(a.length-1)==m.charCodeAt(0)){if(a=a.slice(0,-1))g.onTextInput(a,!s)}else g.onTextInput(a,!s);if(!f())return!1}s=u=!1;n.value=m;n.select()}function f(){return document.activeElement===n}var n=d.createElement("textarea");n.style.left="-10000px";
c.appendChild(n);var m=String.fromCharCode(0);a();var t=!1,u=!1,s=!1,y="",q=function(b){setTimeout(function(){t||a(b.data)},0)},x=function(){b.isIE&&128<n.value.charCodeAt(0)||setTimeout(function(){t||a()},0)},A=function(){t=!0;g.onCompositionStart();b.isGecko||setTimeout(B,0)},B=function(){if(t)g.onCompositionUpdate(n.value)},r=function(){t=!1;g.onCompositionEnd()},p=function(b){u=!0;var d=g.getCopyText();d?n.value=d:b.preventDefault();n.select();setTimeout(function(){a()},0)},z=function(b){u=!0;
var d=g.getCopyText();d?(n.value=d,g.onCut()):b.preventDefault();n.select();setTimeout(function(){a()},0)};j.addCommandKeyListener(n,g.onCommandKey.bind(g));if(b.isIE){var E={13:1,27:1};j.addListener(n,"keyup",function(a){t&&(!n.value||E[a.keyCode])&&setTimeout(r,0);129>(n.value.charCodeAt(0)|0)||(t?B():A())})}n.attachEvent?j.addListener(n,"propertychange",x):b.isChrome||b.isSafari?j.addListener(n,"textInput",q):b.isIE?j.addListener(n,"textinput",q):j.addListener(n,"input",q);j.addListener(n,"paste",
function(b){s=!0;b.clipboardData&&b.clipboardData.getData?(a(b.clipboardData.getData("text/plain")),b.preventDefault()):x()});b.isIE?(j.addListener(n,"beforecopy",function(a){var b=g.getCopyText();b?clipboardData.setData("Text",b):a.preventDefault()}),j.addListener(c,"keydown",function(a){if(a.ctrlKey&&88==a.keyCode){var b=g.getCopyText();b&&(clipboardData.setData("Text",b),g.onCut());j.preventDefault(a)}})):(j.addListener(n,"copy",p),j.addListener(n,"cut",z));j.addListener(n,"compositionstart",A);
b.isGecko&&j.addListener(n,"text",B);b.isWebKit&&j.addListener(n,"keyup",B);j.addListener(n,"compositionend",r);j.addListener(n,"blur",function(){g.onBlur()});j.addListener(n,"focus",function(){g.onFocus();n.select()});this.focus=function(){g.onFocus();n.select();n.focus()};this.blur=function(){n.blur()};this.isFocused=f;this.getElement=function(){return n};this.onContextMenu=function(a,b){a&&(y||(y=n.style.cssText),n.style.cssText="position:fixed; z-index:1000;left:"+(a.x-2)+"px; top:"+(a.y-2)+"px;");
b&&(n.value="")};this.onContextMenuClose=function(){setTimeout(function(){y&&(n.style.cssText=y,y="");a()},0)}}});
define("ace/mouse_handler","require,exports,module,pilot/event,pilot/dom,pilot/browser_focus".split(","),function(c,m){var j=c("pilot/event"),b=c("pilot/dom"),d=c("pilot/browser_focus").BrowserFocus,k=1,g=function(a){this.editor=a;this.browserFocus=new d;j.addListener(a.container,"mousedown",function(b){a.focus();return j.preventDefault(b)});j.addListener(a.container,"selectstart",function(a){return j.preventDefault(a)});var b=a.renderer.getMouseEventTarget();j.addListener(b,"mousedown",this.onMouseDown.bind(this));
j.addMultiMouseDownListener(b,0,2,500,this.onMouseDoubleClick.bind(this));j.addMultiMouseDownListener(b,0,3,600,this.onMouseTripleClick.bind(this));j.addMultiMouseDownListener(b,0,4,600,this.onMouseQuadClick.bind(this));j.addMouseWheelListener(b,this.onMouseWheel.bind(this))};(function(){this.$scrollSpeed=1;this.setScrollSpeed=function(a){this.$scrollSpeed=a};this.getScrollSpeed=function(){return this.$scrollSpeed};this.$getEventPosition=function(a){var b=j.getDocumentX(a),a=j.getDocumentY(a),b=this.editor.renderer.screenToTextCoordinates(b,
a);b.row=Math.max(0,Math.min(b.row,this.editor.session.getLength()-1));return b};this.$distance=function(a,b,d,c){return Math.sqrt(Math.pow(d-a,2)+Math.pow(c-b,2))};this.onMouseDown=function(a){function d(b){a.shiftKey?u.selection.selectToPosition(b):s.$clickSelection||(u.moveCursorToPosition(b),u.selection.clearSelection(b.row,b.column));x=k}if(this.browserFocus.isFocused()&&!(20>(new Date).getTime()-this.browserFocus.lastFocus)&&this.editor.isFocused()){var c=j.getDocumentX(a),g=j.getDocumentY(a),
m=this.$getEventPosition(a),u=this.editor,s=this,y=u.getSelectionRange(),q=y.isEmpty(),x=0,A=!1,A=j.getButton(a);if(0!==A)q&&u.moveCursorToPosition(m),2==A&&(u.textInput.onContextMenu({x:c,y:g},q),j.capture(u.container,function(){},u.textInput.onContextMenuClose));else if(A=u.session.getFoldAt(m.row,m.column,1))u.selection.setSelectionRange(A.range);else{(A=!u.getReadOnly()&&!q&&y.contains(m.row,m.column))||d(m);var B,r;u.getOverwrite();var p=(new Date).getTime(),z,E;j.capture(u.container,function(a){B=
j.getDocumentX(a);r=j.getDocumentY(a)},function(){clearInterval(C);if(0==x)d(m);else if(2==x&&(b.removeCssClass(u.container,"ace_dragging"),u.session.removeMarker(dragSelectionMarker),!s.$clickSelection&&!z&&(u.moveCursorToPosition(m),u.selection.clearSelection(m.row,m.column)),z))if(E.contains(z.row,z.column))z=null;else{u.clearSelection();var a=u.moveText(E,z);a?u.selection.setSelectionRange(a):z=null}s.$clickSelection=null;x=0});var C=setInterval(function(){if(!(void 0===B||void 0===r)){if(0==
x){var a=s.$distance(c,g,B,r),j=(new Date).getTime();5<a?(x=k,a=u.renderer.screenToTextCoordinates(B,r),a.row=Math.max(0,Math.min(a.row,u.session.getLength()-1)),d(a)):250<j-p&&(x=2,E=u.getSelectionRange(),a=u.getSelectionStyle(),dragSelectionMarker=u.session.addMarker(E,"ace_selection",a),u.clearSelection(),b.addCssClass(u.container,"ace_dragging"))}2==x?(z=u.renderer.screenToTextCoordinates(B,r),z.row=Math.max(0,Math.min(z.row,u.session.getLength()-1)),u.moveCursorToPosition(z)):x==k&&(a=u.renderer.screenToTextCoordinates(B,
r),a.row=Math.max(0,Math.min(a.row,u.session.getLength()-1)),s.$clickSelection?s.$clickSelection.contains(a.row,a.column)?u.selection.setSelectionRange(s.$clickSelection):(j=-1==s.$clickSelection.compare(a.row,a.column)?s.$clickSelection.end:s.$clickSelection.start,u.selection.setSelectionAnchor(j.row,j.column),u.selection.selectToPosition(a)):u.selection.selectToPosition(a),u.renderer.scrollCursorIntoView())}},20);return j.preventDefault(a)}}};this.onMouseDoubleClick=function(a){var b=this.editor,
a=this.$getEventPosition(a),d=b.session.getFoldAt(a.row,a.column,1);d?b.session.expandFold(d):(b.moveCursorToPosition(a),b.selection.selectWord(),this.$clickSelection=b.getSelectionRange())};this.onMouseTripleClick=function(a){this.editor.moveCursorToPosition(this.$getEventPosition(a));this.editor.selection.selectLine();this.$clickSelection=this.editor.getSelectionRange()};this.onMouseQuadClick=function(){this.editor.selectAll();this.$clickSelection=this.editor.getSelectionRange()};this.onMouseWheel=
function(a){var b=2*this.$scrollSpeed;this.editor.renderer.scrollBy(a.wheelX*b,a.wheelY*b);return j.preventDefault(a)}}).call(g.prototype);m.MouseHandler=g});
define("pilot/browser_focus","require,exports,module,pilot/oop,pilot/event,pilot/event_emitter".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/event"),d=c("pilot/event_emitter").EventEmitter,k=function(d){d=d||window;this.lastFocus=(new Date).getTime();this._isFocused=!0;var a=this;b.addListener(d,"blur",function(){a._setFocused(!1)});b.addListener(d,"focus",function(){a._setFocused(!0)})};(function(){j.implement(this,d);this.isFocused=function(){return this._isFocused};this._setFocused=
function(b){this._isFocused!=b&&(b&&(this.lastFocus=(new Date).getTime()),this._isFocused=b,this._emit("changeFocus"))}}).call(k.prototype);m.BrowserFocus=k});
define("ace/keyboard/keybinding","require,exports,module,pilot/useragent,pilot/keys,pilot/event,pilot/settings,pilot/canon,ace/commands/default_commands".split(","),function(c,m){c("pilot/useragent");var j=c("pilot/keys"),b=c("pilot/event");c("pilot/settings");var d=c("pilot/canon");c("ace/commands/default_commands");var k=function(b){this.$editor=b;this.$data={};this.$keyboardHandler=null};(function(){this.setKeyboardHandler=function(b){this.$keyboardHandler!=b&&(this.$data={},this.$keyboardHandler=
b)};this.getKeyboardHandler=function(){return this.$keyboardHandler};this.$callKeyboardHandler=function(c,a,f,k){var j={editor:this.$editor},m;this.$keyboardHandler&&(m=this.$keyboardHandler.handleKeyboard(this.$data,a,f,k,c));if(!m||!m.command)m=0!=a||0!=k?{command:d.findKeyCommand(j,"editor",a,f)}:{command:"inserttext",args:{text:f}};a=!1;m&&(a=d.exec(m.command,j,"editor",m.args))&&b.stopEvent(c);return a};this.onCommandKey=function(b,a,d,c){c||(c=j.keyCodeToString(d));return this.$callKeyboardHandler(b,
a,c,d)};this.onTextInput=function(b){return this.$callKeyboardHandler({},0,b,0)}}).call(k.prototype);m.KeyBinding=k});
define("ace/commands/default_commands",["require","exports","module","pilot/lang","pilot/canon"],function(c){function m(b,d){return{win:b,mac:d,sender:"editor"}}var j=c("pilot/lang"),c=c("pilot/canon");c.addCommand({name:"null",exec:function(){}});c.addCommand({name:"selectall",bindKey:m("Ctrl-A","Command-A"),exec:function(b){b.editor.selectAll()}});c.addCommand({name:"removeline",bindKey:m("Ctrl-D","Command-D"),exec:function(b){b.editor.removeLines()}});c.addCommand({name:"gotoline",bindKey:m("Ctrl-L",
"Command-L"),exec:function(b){var d=parseInt(prompt("Enter line number:"));isNaN(d)||b.editor.gotoLine(d)}});c.addCommand({name:"togglecomment",bindKey:m("Ctrl-7","Command-7"),exec:function(b){b.editor.toggleCommentLines()}});c.addCommand({name:"findnext",bindKey:m("Ctrl-K","Command-G"),exec:function(b){b.editor.findNext()}});c.addCommand({name:"findprevious",bindKey:m("Ctrl-Shift-K","Command-Shift-G"),exec:function(b){b.editor.findPrevious()}});c.addCommand({name:"find",bindKey:m("Ctrl-F","Command-F"),
exec:function(b){var d=prompt("Find:");b.editor.find(d)}});c.addCommand({name:"replace",bindKey:m("Ctrl-R","Command-Option-F"),exec:function(b){var d=prompt("Find:");if(d){var c=prompt("Replacement:");c&&b.editor.replace(c,{needle:d})}}});c.addCommand({name:"replaceall",bindKey:m("Ctrl-Shift-R","Command-Shift-Option-F"),exec:function(b){var d=prompt("Find:");if(d){var c=prompt("Replacement:");c&&b.editor.replaceAll(c,{needle:d})}}});c.addCommand({name:"undo",bindKey:m("Ctrl-Z","Command-Z"),exec:function(b){b.editor.undo()}});
c.addCommand({name:"redo",bindKey:m("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(b){b.editor.redo()}});c.addCommand({name:"overwrite",bindKey:m("Insert","Insert"),exec:function(b){b.editor.toggleOverwrite()}});c.addCommand({name:"copylinesup",bindKey:m("Ctrl-Alt-Up","Command-Option-Up"),exec:function(b){b.editor.copyLinesUp()}});c.addCommand({name:"movelinesup",bindKey:m("Alt-Up","Option-Up"),exec:function(b){b.editor.moveLinesUp()}});c.addCommand({name:"selecttostart",bindKey:m("Ctrl-Shift-Home|Alt-Shift-Up",
"Command-Shift-Up"),exec:function(b){b.editor.getSelection().selectFileStart()}});c.addCommand({name:"gotostart",bindKey:m("Ctrl-Home|Ctrl-Up","Command-Home|Command-Up"),exec:function(b){b.editor.navigateFileStart()}});c.addCommand({name:"selectup",bindKey:m("Shift-Up","Shift-Up"),exec:function(b){b.editor.getSelection().selectUp()}});c.addCommand({name:"golineup",bindKey:m("Up","Up|Ctrl-P"),exec:function(b,d){b.editor.navigateUp(d.times)}});c.addCommand({name:"copylinesdown",bindKey:m("Ctrl-Alt-Down",
"Command-Option-Down"),exec:function(b){b.editor.copyLinesDown()}});c.addCommand({name:"movelinesdown",bindKey:m("Alt-Down","Option-Down"),exec:function(b){b.editor.moveLinesDown()}});c.addCommand({name:"selecttoend",bindKey:m("Ctrl-Shift-End|Alt-Shift-Down","Command-Shift-Down"),exec:function(b){b.editor.getSelection().selectFileEnd()}});c.addCommand({name:"gotoend",bindKey:m("Ctrl-End|Ctrl-Down","Command-End|Command-Down"),exec:function(b){b.editor.navigateFileEnd()}});c.addCommand({name:"selectdown",
bindKey:m("Shift-Down","Shift-Down"),exec:function(b){b.editor.getSelection().selectDown()}});c.addCommand({name:"golinedown",bindKey:m("Down","Down|Ctrl-N"),exec:function(b,d){b.editor.navigateDown(d.times)}});c.addCommand({name:"selectwordleft",bindKey:m("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(b){b.editor.getSelection().selectWordLeft()}});c.addCommand({name:"gotowordleft",bindKey:m("Ctrl-Left","Option-Left"),exec:function(b){b.editor.navigateWordLeft()}});c.addCommand({name:"selecttolinestart",
bindKey:m("Alt-Shift-Left","Command-Shift-Left"),exec:function(b){b.editor.getSelection().selectLineStart()}});c.addCommand({name:"gotolinestart",bindKey:m("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(b){b.editor.navigateLineStart()}});c.addCommand({name:"selectleft",bindKey:m("Shift-Left","Shift-Left"),exec:function(b){b.editor.getSelection().selectLeft()}});c.addCommand({name:"gotoleft",bindKey:m("Left","Left|Ctrl-B"),exec:function(b,d){b.editor.navigateLeft(d.times)}});c.addCommand({name:"selectwordright",
bindKey:m("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(b){b.editor.getSelection().selectWordRight()}});c.addCommand({name:"gotowordright",bindKey:m("Ctrl-Right","Option-Right"),exec:function(b){b.editor.navigateWordRight()}});c.addCommand({name:"selecttolineend",bindKey:m("Alt-Shift-Right","Command-Shift-Right"),exec:function(b){b.editor.getSelection().selectLineEnd()}});c.addCommand({name:"gotolineend",bindKey:m("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(b){b.editor.navigateLineEnd()}});
c.addCommand({name:"selectright",bindKey:m("Shift-Right","Shift-Right"),exec:function(b){b.editor.getSelection().selectRight()}});c.addCommand({name:"gotoright",bindKey:m("Right","Right|Ctrl-F"),exec:function(b,d){b.editor.navigateRight(d.times)}});c.addCommand({name:"selectpagedown",bindKey:m("Shift-PageDown","Shift-PageDown"),exec:function(b){b.editor.selectPageDown()}});c.addCommand({name:"pagedown",bindKey:m(null,"PageDown"),exec:function(b){b.editor.scrollPageDown()}});c.addCommand({name:"gotopagedown",
bindKey:m("PageDown","Option-PageDown|Ctrl-V"),exec:function(b){b.editor.gotoPageDown()}});c.addCommand({name:"selectpageup",bindKey:m("Shift-PageUp","Shift-PageUp"),exec:function(b){b.editor.selectPageUp()}});c.addCommand({name:"pageup",bindKey:m(null,"PageUp"),exec:function(b){b.editor.scrollPageUp()}});c.addCommand({name:"gotopageup",bindKey:m("PageUp","Option-PageUp"),exec:function(b){b.editor.gotoPageUp()}});c.addCommand({name:"selectlinestart",bindKey:m("Shift-Home","Shift-Home"),exec:function(b){b.editor.getSelection().selectLineStart()}});
c.addCommand({name:"selectlineend",bindKey:m("Shift-End","Shift-End"),exec:function(b){b.editor.getSelection().selectLineEnd()}});c.addCommand({name:"del",bindKey:m("Delete","Delete|Ctrl-D"),exec:function(b){b.editor.removeRight()}});c.addCommand({name:"backspace",bindKey:m("Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace","Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(b){b.editor.removeLeft()}});c.addCommand({name:"removetolinestart",
bindKey:m(null,"Option-Backspace"),exec:function(b){b.editor.removeToLineStart()}});c.addCommand({name:"removetolineend",bindKey:m(null,"Ctrl-K"),exec:function(b){b.editor.removeToLineEnd()}});c.addCommand({name:"removewordleft",bindKey:m("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(b){b.editor.removeWordLeft()}});c.addCommand({name:"removewordright",bindKey:m(null,"Alt-Delete"),exec:function(b){b.editor.removeWordRight()}});c.addCommand({name:"outdent",bindKey:m("Shift-Tab",
"Shift-Tab"),exec:function(b){b.editor.blockOutdent()}});c.addCommand({name:"indent",bindKey:m("Tab","Tab"),exec:function(b){b.editor.indent()}});c.addCommand({name:"inserttext",exec:function(b,d){b.editor.insert(j.stringRepeat(d.text||"",d.times||1))}});c.addCommand({name:"centerselection",bindKey:m(null,"Ctrl-L"),exec:function(b){b.editor.centerSelection()}});c.addCommand({name:"splitline",bindKey:m(null,"Ctrl-O"),exec:function(b){b.editor.splitLine()}});c.addCommand({name:"transposeletters",bindKey:m("Ctrl-T",
"Ctrl-T"),exec:function(b){b.editor.transposeLetters()}})});
define("ace/edit_session","require,exports,module,pilot/oop,pilot/lang,pilot/event_emitter,ace/selection,ace/mode/text,ace/range,ace/document,ace/background_tokenizer,ace/edit_session/folding".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/lang"),d=c("pilot/event_emitter").EventEmitter,k=c("ace/selection").Selection,g=c("ace/mode/text").Mode,a=c("ace/range").Range,f=c("ace/document").Document,n=c("ace/background_tokenizer").BackgroundTokenizer,v=function(a,b){this.$modified=!0;this.$breakpoints=
[];this.$frontMarkers={};this.$backMarkers={};this.$markerId=1;this.$rowCache=[];this.$wrapData=[];this.$foldData=[];this.$foldData.toString=function(){var a="";this.forEach(function(b){a+="\n"+b.toString()});return a};a instanceof f?this.setDocument(a):this.setDocument(new f(a));this.selection=new k(this);b?this.setMode(b):this.setMode(new g)};(function(){function f(a){return 4352>a?!1:4352<=a&&4447>=a||4515<=a&&4519>=a||4602<=a&&4607>=a||9001<=a&&9002>=a||11904<=a&&11929>=a||11931<=a&&12019>=a||
12032<=a&&12245>=a||12272<=a&&12283>=a||12288<=a&&12350>=a||12353<=a&&12438>=a||12441<=a&&12543>=a||12549<=a&&12589>=a||12593<=a&&12686>=a||12688<=a&&12730>=a||12736<=a&&12771>=a||12784<=a&&12830>=a||12832<=a&&12871>=a||12880<=a&&13054>=a||13056<=a&&19903>=a||19968<=a&&42124>=a||42128<=a&&42182>=a||43360<=a&&43388>=a||44032<=a&&55203>=a||55216<=a&&55238>=a||55243<=a&&55291>=a||63744<=a&&64255>=a||65040<=a&&65049>=a||65072<=a&&65106>=a||65108<=a&&65126>=a||65128<=a&&65131>=a||65281<=a&&65376>=a||65504<=
a&&65510>=a}j.implement(this,d);this.setDocument=function(a){if(this.doc)throw Error("Document is already set");this.doc=a;a.on("change",this.onChange.bind(this));this.on("changeFold",this.onChangeFold.bind(this))};this.getDocument=function(){return this.doc};this.$resetRowCache=function(a){if(0==a)this.$rowCache=[];else for(var b=this.$rowCache,d=0;d<b.length;d++)if(b[d].docRow>=a){b.splice(d,b.length);break}};this.onChangeFold=function(a){this.$resetRowCache(a.data.start.row)};this.onChange=function(a){var b=
a.data;this.$modified=!0;this.$resetRowCache(b.range.start.row);var d=this.$updateInternalDataOnChange(a);!this.$fromUndo&&this.$undoManager&&!b.ignore&&(this.$deltasDoc.push(b),d&&0!=d.length&&this.$deltasFold.push({action:"removeFolds",folds:d}),this.$informUndoManager.schedule());this.bgTokenizer.start(b.range.start.row);this._dispatchEvent("change",a)};this.setValue=function(a){this.doc.setValue(a);this.selection.moveCursorTo(0,0);this.selection.clearSelection();this.$resetRowCache(0);this.$deltas=
[];this.$deltasDoc=[];this.$deltasFold=[];this.getUndoManager().reset()};this.getValue=this.toString=function(){return this.doc.getValue()};this.getSelection=function(){return this.selection};this.getState=function(a){return this.bgTokenizer.getState(a)};this.getTokens=function(a,b){return this.bgTokenizer.getTokens(a,b)};this.setUndoManager=function(a){this.$undoManager=a;this.$resetRowCache(0);this.$deltas=[];this.$deltasDoc=[];this.$deltasFold=[];this.$informUndoManager&&this.$informUndoManager.cancel();
if(a){var d=this;this.$syncInformUndoManager=function(){d.$informUndoManager.cancel();d.$deltasFold.length&&(d.$deltas.push({group:"fold",deltas:d.$deltasFold}),d.$deltasFold=[]);d.$deltasDoc.length&&(d.$deltas.push({group:"doc",deltas:d.$deltasDoc}),d.$deltasDoc=[]);0<d.$deltas.length&&a.execute({action:"aceupdate",args:[d.$deltas,d]});d.$deltas=[]};this.$informUndoManager=b.deferredCall(this.$syncInformUndoManager)}};this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}};
this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager};this.getTabString=function(){return this.getUseSoftTabs()?b.stringRepeat(" ",this.getTabSize()):"\t"};this.$useSoftTabs=!0;this.setUseSoftTabs=function(a){this.$useSoftTabs!==a&&(this.$useSoftTabs=a)};this.getUseSoftTabs=function(){return this.$useSoftTabs};this.$tabSize=4;this.setTabSize=function(a){isNaN(a)||this.$tabSize===a||(this.$modified=!0,this.$tabSize=a,this._dispatchEvent("changeTabSize"))};this.getTabSize=
function(){return this.$tabSize};this.isTabStop=function(a){return this.$useSoftTabs&&0==a.column%this.$tabSize};this.$overwrite=!1;this.setOverwrite=function(a){this.$overwrite!=a&&(this.$overwrite=a,this._dispatchEvent("changeOverwrite"))};this.getOverwrite=function(){return this.$overwrite};this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)};this.getBreakpoints=function(){return this.$breakpoints};this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b<a.length;b++)this.$breakpoints[a[b]]=
!0;this._dispatchEvent("changeBreakpoint",{})};this.clearBreakpoints=function(){this.$breakpoints=[];this._dispatchEvent("changeBreakpoint",{})};this.setBreakpoint=function(a){this.$breakpoints[a]=!0;this._dispatchEvent("changeBreakpoint",{})};this.clearBreakpoint=function(a){delete this.$breakpoints[a];this._dispatchEvent("changeBreakpoint",{})};this.getBreakpoints=function(){return this.$breakpoints};this.addMarker=function(a,b,d,c){var f=this.$markerId++,a={range:a,type:d||"line",renderer:"function"==
typeof d?d:null,clazz:b,inFront:!!c};c?(this.$frontMarkers[f]=a,this._dispatchEvent("changeFrontMarker")):(this.$backMarkers[f]=a,this._dispatchEvent("changeBackMarker"));return f};this.removeMarker=function(a){var b=this.$frontMarkers[a]||this.$backMarkers[a];if(b){var d=b.inFront?this.$frontMarkers:this.$backMarkers;b&&(delete d[a],this._dispatchEvent(b.inFront?"changeFrontMarker":"changeBackMarker"))}};this.getMarkers=function(a){return a?this.$frontMarkers:this.$backMarkers};this.setAnnotations=
function(a){this.$annotations={};for(var b=0;b<a.length;b++){var d=a[b],c=d.row;this.$annotations[c]?this.$annotations[c].push(d):this.$annotations[c]=[d]}this._dispatchEvent("changeAnnotation",{})};this.getAnnotations=function(){return this.$annotations};this.clearAnnotations=function(){this.$annotations={};this._dispatchEvent("changeAnnotation",{})};this.$detectNewLine=function(a){this.$autoNewLine=(a=a.match(/^.*?(\r?\n)/m))?a[1]:"\n"};this.getWordRange=function(b,d){var c=this.getLine(b),f=!1;
0<d&&(f=!!c.charAt(d-1).match(this.tokenRe));f||(f=!!c.charAt(d).match(this.tokenRe));var f=f?this.tokenRe:this.nonTokenRe,k=d;if(0<k){do k--;while(0<=k&&c.charAt(k).match(f));k++}for(var g=d;g<c.length&&c.charAt(g).match(f);)g++;return new a(b,k,b,g)};this.setNewLineMode=function(a){this.doc.setNewLineMode(a)};this.getNewLineMode=function(){return this.doc.getNewLineMode()};this.$useWorker=!0;this.setUseWorker=function(a){this.$useWorker!=a&&(this.$useWorker=a,this.$stopWorker(),a&&this.$startWorker())};
this.getUseWorker=function(){return this.$useWorker};this.onReloadTokenizer=function(a){this.bgTokenizer.start(a.data.first);this._dispatchEvent("tokenizerUpdate",a)};this.$mode=null;this.setMode=function(a){if(this.$mode!==a){this.$mode=a;this.$stopWorker();this.$useWorker&&this.$startWorker();var b=a.getTokenizer();if(void 0!==b.addEventListener){var d=this.onReloadTokenizer.bind(this);b.addEventListener("update",d)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(b);else{this.bgTokenizer=new n(b);
var c=this;this.bgTokenizer.addEventListener("update",function(a){c._dispatchEvent("tokenizerUpdate",a)})}this.bgTokenizer.setDocument(this.getDocument());this.bgTokenizer.start(0);this.tokenRe=a.tokenRe;this.nonTokenRe=a.nonTokenRe;this._dispatchEvent("changeMode")}};this.$stopWorker=function(){this.$worker&&this.$worker.terminate();this.$worker=null};this.$startWorker=function(){if("undefined"!==typeof Worker&&!c.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(a){console.log("Could not load worker"),
console.log(a),this.$worker=null}else this.$worker=null};this.getMode=function(){return this.$mode};this.$scrollTop=0;this.setScrollTopRow=function(a){this.$scrollTop!==a&&(this.$scrollTop=a,this._dispatchEvent("changeScrollTop"))};this.getScrollTopRow=function(){return this.$scrollTop};this.getWidth=function(){this.$computeWidth();return this.width};this.getScreenWidth=function(){this.$computeWidth();return this.screenWidth};this.$computeWidth=function(a){if(this.$modified||a){this.$modified=!1;
for(var a=this.doc.getAllLines(),b=0,d=0,c=0;c<a.length;c++){var f=this.getFoldLine(c),k;k=a[c];f&&(c=f.range.end,k=this.getFoldDisplayLine(f),c=c.row);b=Math.max(b,k.length);this.$useWrapMode||(d=Math.max(d,this.$getStringScreenWidth(k)[0]))}this.width=b;this.screenWidth=this.$useWrapMode?this.$wrapLimit:d}};this.getLine=function(a){return this.doc.getLine(a)};this.getLines=function(a,b){return this.doc.getLines(a,b)};this.getLength=function(){return this.doc.getLength()};this.getTextRange=function(a){return this.doc.getTextRange(a)};
this.findMatchingBracket=function(a){if(0==a.column)return null;var b=this.getLine(a.row).charAt(a.column-1);if(""==b)return null;b=b.match(/([\(\[\{])|([\)\]\}])/);return!b?null:b[1]?this.$findClosingBracket(b[1],a):this.$findOpeningBracket(b[2],a)};this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"};this.$findOpeningBracket=function(a,b){for(var d=this.$brackets[a],c=b.column-2,f=b.row,k=1,g=this.getLine(f);;){for(;0<=c;){var n=g.charAt(c);if(n==d){if(k-=1,0==k)return{row:f,column:c}}else n==
a&&(k+=1);c-=1}f-=1;if(0>f)break;g=this.getLine(f);c=g.length-1}return null};this.$findClosingBracket=function(a,b){for(var d=this.$brackets[a],c=b.column,f=b.row,k=1,g=this.getLine(f),n=this.getLength();;){for(;c<g.length;){var m=g.charAt(c);if(m==d){if(k-=1,0==k)return{row:f,column:c}}else m==a&&(k+=1);c+=1}f+=1;if(f>=n)break;g=this.getLine(f);c=0}return null};this.insert=function(a,b){return this.doc.insert(a,b)};this.remove=function(a){return this.doc.remove(a)};this.undoChanges=function(a,b){if(a.length){this.$fromUndo=
!0;for(var d=null,c=a.length-1;-1!=c;c--)delta=a[c],"doc"==delta.group?(this.doc.revertDeltas(delta.deltas),d=this.$getUndoSelection(delta.deltas,!0,d)):delta.deltas.forEach(function(a){this.addFolds(a.folds)},this);this.$fromUndo=!1;d&&!b&&this.selection.setSelectionRange(d);return d}};this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var d=null,c=0;c<a.length;c++)delta=a[c],"doc"==delta.group&&(this.doc.applyDeltas(delta.deltas),d=this.$getUndoSelection(delta.deltas,!1,d));this.$fromUndo=
!1;d&&!b&&this.selection.setSelectionRange(d);return d}};this.$getUndoSelection=function(b,d,c){function f(a){a="insertText"==a.action||"insertLines"==a.action;return d?!a:a}var k=b[0],g,n;g=f(k)?k.range.clone():a.fromPoints(k.range.start,k.range.start);for(var m=1;m<b.length;m++)k=b[m],f(k)?(n=k.range.start,-1==g.compare(n.row,n.column)&&g.setStart(k.range.start),n=k.range.end,1==g.compare(n.row,n.column)&&g.setEnd(k.range.end)):(n=k.range.start,-1==g.compare(n.row,n.column)&&(g=a.fromPoints(k.range.start,
k.range.start)));null!=c&&(b=c.compareRange(g),1==b?g.setStart(c.start):-1==b&&g.setEnd(c.end));return g};this.replace=function(a,b){return this.doc.replace(a,b)};this.moveText=function(b,d){var c=this.getTextRange(b);this.remove(b);var f=d.row,k=d.column;!b.isMultiLine()&&b.start.row==f&&b.end.column<k&&(k-=c.length);if(b.isMultiLine()&&b.end.row<f)var g=this.doc.$split(c),f=f-(g.length-1);var g=f+b.end.row-b.start.row,n=b.isMultiLine()?b.end.column:k+b.end.column-b.start.column,f=new a(f,k,g,n);
this.insert(f.start,c);return f};this.indentRows=function(a,b,d){for(d=d.replace(/\t/g,this.getTabString());a<=b;a++)this.insert({row:a,column:0},d)};this.outdentRows=function(b){for(var b=b.collapseRows(),d=new a(0,0,0,0),c=this.getTabSize(),f=b.start.row;f<=b.end.row;++f){var k=this.getLine(f);d.start.row=f;d.end.row=f;for(var g=0;g<c&&!(" "!=k.charAt(g));++g);g<c&&"\t"==k.charAt(g)?(d.start.column=g,d.end.column=g+1):(d.start.column=0,d.end.column=g);this.remove(d)}};this.moveLinesUp=function(a,
b){if(0>=a)return 0;var d=this.doc.removeLines(a,b);this.doc.insertLines(a-1,d);return-1};this.moveLinesDown=function(a,b){if(b>=this.doc.getLength()-1)return 0;var d=this.doc.removeLines(a,b);this.doc.insertLines(a+1,d);return 1};this.duplicateLines=function(a,b){var a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b),d=this.getLines(a,b);this.doc.insertLines(a,d);return b-a+1};this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))};this.$clipPositionToDocument=
function(a,b){b=Math.max(0,b);if(0>a)b=a=0;else{var d=this.doc.getLength();a>=d?(a=d-1,b=this.doc.getLine(d-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}};this.$wrapLimit=80;this.$useWrapMode=!1;this.$wrapLimitRange={min:null,max:null};this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){this.$useWrapMode=a;this.$modified=!0;this.$resetRowCache(0);if(a){a=this.getLength();this.$wrapData=[];for(i=0;i<a;i++)this.$wrapData.push([]);this.$updateWrapData(0,a-1)}this._dispatchEvent("changeWrapMode")}};
this.getUseWrapMode=function(){return this.$useWrapMode};this.setWrapLimitRange=function(a,b){if(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)this.$wrapLimitRange.min=a,this.$wrapLimitRange.max=b,this.$modified=!0,this._dispatchEvent("changeWrapMode")};this.adjustWrapLimit=function(a){a=this.$constrainWrapLimit(a);return a!=this.$wrapLimit&&0<a?(this.$wrapLimit=a,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._dispatchEvent("changeWrapLimit")),
!0):!1};this.$constrainWrapLimit=function(a){var b=this.$wrapLimitRange.min;b&&(a=Math.max(b,a));(b=this.$wrapLimitRange.max)&&(a=Math.min(b,a));return Math.max(1,a)};this.getWrapLimit=function(){return this.$wrapLimit};this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}};this.$updateInternalDataOnChange=function(a){var b=this.$useWrapMode,d,c=a.data.action,f=a.data.range.start.row,k=a.data.range.end.row,g=a.data.range.start,n=a.data.range.end,m=null;
-1!=c.indexOf("Lines")?(k="insertLines"==c?f+a.data.lines.length:f,d=a.data.lines.length):d=k-f;if(0!=d)if(-1!=c.indexOf("remove")){b&&this.$wrapData.splice(f,d);c=this.$foldData;m=this.getFoldsInRange(a.data.range);this.removeFolds(m);var a=this.getFoldLine(n.row),j=0;if(a){a.addRemoveChars(n.row,n.column,g.column-n.column);a.shiftRow(-d);if((k=this.getFoldLine(f))&&k!==a)k.merge(a),a=k;j=c.indexOf(a)+1}for(j;j<c.length;j++)a=c[j],a.start.row>=n.row&&a.shiftRow(-d);k=f}else{if(b){c=[f,0];for(a=0;a<
d;a++)c.push([]);this.$wrapData.splice.apply(this.$wrapData,c)}c=this.$foldData;a=this.getFoldLine(f);j=0;a&&(j=a.range.compareInside(g.row,g.column),0==j?(a=a.split(g.row,g.column),a.shiftRow(d),a.addRemoveChars(k,0,n.column-g.column)):-1==j&&(a.addRemoveChars(f,0,n.column-g.column),a.shiftRow(d)),j=c.indexOf(a)+1);for(j;j<c.length;j++)a=c[j],a.start.row>=f&&a.shiftRow(d)}else d=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=c.indexOf("remove")&&(m=this.getFoldsInRange(a.data.range),
this.removeFolds(m),d=-d),(a=this.getFoldLine(f))&&a.addRemoveChars(f,g.column,d);b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!");b&&this.$updateWrapData(f,k);return m};this.$updateWrapData=function(a,d){for(var c=this.doc.getAllLines(),f=this.getTabSize(),n=this.$wrapData,j=this.$wrapLimit,v,t,C=a,d=Math.min(d,c.length-1);C<=d;){if(t=this.getFoldLine(C)){v=[];for(t.walk(function(a,b,d,f){if(a){a=this.$getDisplayTokens(a,v.length);
a[0]=k;for(b=1;b<a.length;b++)a[b]=g}else a=this.$getDisplayTokens(c[b].substring(f,d),v.length);v=v.concat(a)}.bind(this),t.end.row,c[t.end.row].length+1);0!=v.length&&v[v.length-1]>=m;)v.pop()}else v=this.$getDisplayTokens(b.stringTrimRight(c[C]));n[C]=this.$computeWrapSplits(v,j,f);C=this.getRowFoldEnd(C)+1}};var k=3,g=4,m=10;this.$computeWrapSplits=function(a,b){function d(b){var f=a.slice(n,b),k=f.length;f.join("").replace(/12/g,function(){k-=1}).replace(/2/g,function(){k-=1});j+=k;c.push(j);
n=b}if(0==a.length)return[];this.getTabSize();for(var c=[],f=a.length,n=0,j=0;f-n>b;){var v=n+b;if(a[v]>=m){for(;a[v]>=m;)v++;d(v)}else if(a[v]==k||a[v]==g){for(v;v!=n-1&&!(a[v]==k);v--);if(!(v>n)){v=n+b;for(v;v<a.length&&!(a[v]!=g);v++);if(v==a.length)break}d(v)}else{for(v;v!=n-1;v--)if(a[v]>=k){v++;break}v>n?d(v):(v=n+b,d(n+b))}}return c};this.$getDisplayTokens=function(a,b){for(var d=[],c,b=b||0,k=0;k<a.length;k++)if(c=a.charCodeAt(k),9==c){c=this.getScreenTabSize(d.length+b);d.push(11);for(var g=
1;g<c;g++)d.push(12)}else 32==c?d.push(m):f(c)?d.push(1,2):d.push(1);return d};this.$getStringScreenWidth=function(a,b,d){if(0==b)return[0,0];null==b&&(b=d+a.length*Math.max(this.getTabSize(),2));var d=d||0,c,k;for(k=0;k<a.length&&!(c=a.charCodeAt(k),d=9==c?d+this.getScreenTabSize(d):f(c)?d+2:d+1,d>b);k++);return[d,k]};this.getRowLength=function(a){return!this.$useWrapMode||!this.$wrapData[a]?1:this.$wrapData[a].length+1};this.getRowHeight=function(a,b){return this.getRowLength(b)*a.lineHeight};this.getScreenLastRowColumn=
function(a){return this.documentToScreenColumn(a,this.doc.getLine(a).length)};this.getDocumentLastRowColumn=function(a,b){return this.getScreenLastRowColumn(this.documentToScreenRow(a,b))};this.getDocumentLastRowColumnPosition=function(a,b){return this.screenToDocumentPosition(this.documentToScreenRow(a,b),Number.MAX_VALUE/10)};this.getRowSplitData=function(a){if(this.$useWrapMode)return this.$wrapData[a]};this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize};this.screenToDocumentRow=
function(a,b){return this.screenToDocumentPosition(a,b).row};this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column};this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var d,c=0,f=0,k,g=0,n=0;d=this.$rowCache;for(var j=0;j<d.length;j++)if(d[j].screenRow<a)g=d[j].screenRow,c=d[j].docRow;else break;for(var m=!d.length||j==d.length,v=this.getLength()-1,y=(j=this.getNextFold(c))?j.start.row:Infinity;g<=a;){n=this.getRowLength(c);if(g+n-1>=a||
c>=v)break;else g+=n,c++,c>y&&(c=j.end.row+1,y=(j=this.getNextFold(c))?j.start.row:Infinity);m&&d.push({docRow:c,screenRow:g})}j&&j.start.row<=c?d=this.getFoldDisplayLine(j):(d=this.getLine(c),j=null);n=[];if(this.$useWrapMode&&(n=this.$wrapData[c]))k=n[a-g],a>g&&n.length&&(f=n[a-g-1]||n[n.length-1],d=d.substring(f));f+=this.$getStringScreenWidth(d,b)[1];g+n.length<a&&(f=Number.MAX_VALUE);this.$useWrapMode?f>=k&&(f=k-1):f=Math.min(f,d.length);return j?j.idxToPosition(f):{row:c,column:f}};this.documentToScreenPosition=
function(a,b){var d="undefined"===typeof b?this.$clipPositionToDocument(a.row,a.column):this.$clipPositionToDocument(a,b),a=d.row,b=d.column,c;if(this.$useWrapMode&&(c=this.$wrapData,a>c.length-1))return{row:this.getScreenLength(),column:0==c.length?0:c[c.length-1].length-1};var d=0,f=null,f=null;if(f=this.getFoldAt(a,b,1))a=f.start.row,b=f.start.column;for(var k,f=0,g=this.$rowCache,n=0;n<g.length;n++)if(g[n].docRow<a)d=g[n].screenRow,f=g[n].docRow;else break;for(var j=!g.length||n==g.length,m=(n=
this.getNextFold(f))?n.start.row:Infinity;f<a;){if(f>=m){k=n.end.row+1;if(k>a)break;m=(n=this.getNextFold(k))?n.start.row:Infinity}else k=f+1;d+=this.getRowLength(f);f=k;j&&g.push({docRow:f,screenRow:d})}g="";n&&f>=m?(g=this.getFoldDisplayLine(n,a,b),f=n.start.row):(g=this.getLine(a).substring(0,b),f=a);if(this.$useWrapMode){c=c[f];for(f=0;g.length>=c[f];)d++,f++;g=g.substring(c[f-1]||0,g.length)}return{row:d,column:this.$getStringScreenWidth(g)[0]}};this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,
b).column};this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row};this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var d=0;d<this.$wrapData.length;d++)(b=this.getFoldLine(d,null))?(d=b.end.row,a+=1):a+=this.$wrapData[d].length+1;else for(var a=this.getLength(),d=this.$foldData,c=0;c<d.length;c++)b=d[c],a-=b.end.row-b.start.row;return a}}).call(v.prototype);c("ace/edit_session/folding").Folding.call(v.prototype);m.EditSession=v});
define("ace/selection","require,exports,module,pilot/oop,pilot/lang,pilot/event_emitter,ace/range".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/lang"),d=c("pilot/event_emitter").EventEmitter,k=c("ace/range").Range,g=function(a){this.session=a;this.doc=a.getDocument();this.clearSelection();this.selectionLead=this.doc.createAnchor(0,0);this.selectionAnchor=this.doc.createAnchor(0,0);var b=this;this.selectionLead.on("change",function(a){b._dispatchEvent("changeCursor");b.$isEmpty||b._dispatchEvent("changeSelection");
!b.$preventUpdateDesiredColumnOnChange&&a.old.column!=a.value.column&&b.$updateDesiredColumn()});this.selectionAnchor.on("change",function(){b.$isEmpty||b._dispatchEvent("changeSelection")})};(function(){j.implement(this,d);this.isEmpty=function(){return this.$isEmpty||this.selectionAnchor.row==this.selectionLead.row&&this.selectionAnchor.column==this.selectionLead.column};this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()};this.getCursor=function(){return this.selectionLead.getPosition()};
this.setSelectionAnchor=function(a,b){this.selectionAnchor.setPosition(a,b);this.$isEmpty&&(this.$isEmpty=!1,this._dispatchEvent("changeSelection"))};this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.selectionAnchor.getPosition()};this.getSelectionLead=function(){return this.selectionLead.getPosition()};this.shiftSelection=function(a){if(this.$isEmpty)this.moveCursorTo(this.selectionLead.row,this.selectionLead.column+a);else{var b=this.getSelectionAnchor(),d=this.getSelectionLead(),
c=this.isBackwards();(!c||0!==b.column)&&this.setSelectionAnchor(b.row,b.column+a);(c||0!==d.column)&&this.$moveSelection(function(){this.moveCursorTo(d.row,d.column+a)})}};this.isBackwards=function(){var a=this.selectionAnchor,b=this.selectionLead;return a.row>b.row||a.row==b.row&&a.column>b.column};this.getRange=function(){var a=this.selectionAnchor,b=this.selectionLead;return this.isEmpty()?k.fromPoints(b,b):this.isBackwards()?k.fromPoints(b,a):k.fromPoints(a,b)};this.clearSelection=function(){this.$isEmpty||
(this.$isEmpty=!0,this._dispatchEvent("changeSelection"))};this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(a,this.doc.getLine(a).length);this.moveCursorTo(0,0)};this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column));this.$updateDesiredColumn()};this.$updateDesiredColumn=function(){var a=this.getCursor();
this.$desiredColumn=this.session.documentToScreenColumn(a.row,a.column)};this.$moveSelection=function(a){var b=this.selectionLead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column);a.call(this)};this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})};this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})};this.selectUp=function(){this.$moveSelection(this.moveCursorUp)};this.selectDown=function(){this.$moveSelection(this.moveCursorDown)};
this.selectRight=function(){this.$moveSelection(this.moveCursorRight)};this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)};this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)};this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)};this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)};this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)};this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)};
this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)};this.selectWord=function(){var a=this.getCursor();this.setSelectionRange(this.session.getWordRange(a.row,a.column))};this.selectLine=function(){var a=this.selectionLead.row,b,d=this.session.getFoldLine(a);d?(a=d.start.row,b=d.end.row):b=a;this.setSelectionAnchor(a,0);this.$moveSelection(function(){this.moveCursorTo(b+1,0)})};this.moveCursorUp=function(){this.moveCursorBy(-1,0)};this.moveCursorDown=function(){this.moveCursorBy(1,
0)};this.moveCursorLeft=function(){var a=this.selectionLead.getPosition(),b;(b=this.session.getFoldAt(a.row,a.column,-1))?this.moveCursorTo(b.start.row,b.start.column):0==a.column?0<a.row&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length):(b=this.session.getTabSize(),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column-b,a.column).split(" ").length-1==b?this.moveCursorBy(0,-b):this.moveCursorBy(0,-1))};this.moveCursorRight=function(){var a=this.selectionLead.getPosition();if(a=
this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.selectionLead.column==this.doc.getLine(this.selectionLead.row).length)this.selectionLead.row<this.doc.getLength()-1&&this.moveCursorTo(this.selectionLead.row+1,0);else{var b=this.session.getTabSize(),a=this.selectionLead;this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column,a.column+b).split(" ").length-1==b?this.moveCursorBy(0,b):this.moveCursorBy(0,1)}};this.moveCursorLineStart=function(){var a=
this.selectionLead.row,b=this.selectionLead.column,d=this.session.screenToDocumentPosition(this.session.documentToScreenRow(a,b),0),a=this.session.getDisplayLine(a,null,d.row,d.column).match(/^\s*/);a[0].length==b?this.moveCursorTo(d.row,d.column):this.moveCursorTo(d.row,d.column+a[0].length)};this.moveCursorLineEnd=function(){var a=this.selectionLead,a=this.session.getDocumentLastRowColumnPosition(a.row,a.column);this.moveCursorTo(a.row,a.column)};this.moveCursorFileEnd=function(){var a=this.doc.getLength()-
1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)};this.moveCursorFileStart=function(){this.moveCursorTo(0,0)};this.moveCursorWordRight=function(){var a=this.selectionLead.row,b=this.selectionLead.column,d=this.doc.getLine(a),c=d.substring(b);this.session.nonTokenRe.lastIndex=0;this.session.tokenRe.lastIndex=0;var k;(k=this.session.getFoldAt(a,b,1))?this.moveCursorTo(k.end.row,k.end.column):b==d.length?this.moveCursorRight():(this.session.nonTokenRe.exec(c)?(b+=this.session.nonTokenRe.lastIndex,
this.session.nonTokenRe.lastIndex=0):this.session.tokenRe.exec(c)&&(b+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,b))};this.moveCursorWordLeft=function(){var a=this.selectionLead.row,d=this.selectionLead.column,c;(c=this.session.getFoldAt(a,d,-1))?this.moveCursorTo(c.start.row,c.start.column):0==d?this.moveCursorLeft():(c=this.session.getFoldStringAt(a,d,-1),null==c&&(c=this.doc.getLine(a).substring(0,d)),c=b.stringReverse(c),this.session.nonTokenRe.lastIndex=
0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)?(d-=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0):this.session.tokenRe.exec(c)&&(d-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,d))};this.moveCursorBy=function(a,b){var d=this.session.documentToScreenPosition(this.selectionLead.row,this.selectionLead.column),d=this.session.screenToDocumentPosition(d.row+a,0==b&&this.$desiredColumn||d.column);this.moveCursorTo(d.row,
d.column+b,0==b)};this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)};this.moveCursorTo=function(a,b,d){var c=this.session.getFoldAt(a,b,1);c&&(a=c.start.row,b=c.start.column);this.$preventUpdateDesiredColumnOnChange=!0;this.selectionLead.setPosition(a,b);this.$preventUpdateDesiredColumnOnChange=!1;d||this.$updateDesiredColumn(this.selectionLead.column)};this.moveCursorToScreen=function(a,b,d){b=this.session.screenToDocumentPosition(a,b);a=b.row;b=b.column;this.moveCursorTo(a,
b,d)}}).call(g.prototype);m.Selection=g});
define("ace/range",["require","exports","module"],function(c,m){var j=function(b,d,c,g){this.start={row:b,column:d};this.end={row:c,column:g}};(function(){this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"};this.contains=function(b,d){return 0==this.compare(b,d)};this.compareRange=function(b){var d;d=b.end;b=b.start;d=this.compare(d.row,d.column);if(1==d)return d=this.compare(b.row,b.column),1==d?2:0==d?1:0;if(-1==d)return-2;
d=this.compare(b.row,b.column);return-1==d?-1:1==d?42:0};this.containsRange=function(b){b=this.compareRange(b);return-1==b||0==b||1==b};this.isEnd=function(b,d){return this.end.row==b&&this.end.column==d};this.isStart=function(b,d){return this.start.row==b&&this.start.column==d};this.setStart=function(b,d){"object"==typeof b?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=d)};this.setEnd=function(b,d){"object"==typeof b?(this.end.column=b.column,this.end.row=
b.row):(this.end.row=b,this.end.column=d)};this.inside=function(b,d){return 0==this.compare(b,d)&&!this.isEnd(b,d)&&!this.isStart(b,d)?!0:!1};this.insideStart=function(b,d){return 0==this.compare(b,d)&&!this.isEnd(b,d)?!0:!1};this.insideEnd=function(b,d){return 0==this.compare(b,d)&&!this.isStart(b,d)?!0:!1};this.compare=function(b,d){return!this.isMultiLine()&&b===this.start.row?d<this.start.column?-1:d>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?d>=this.start.column?
0:-1:this.end.row===b?d<=this.end.column?0:1:0};this.compareStart=function(b,d){return this.start.row==b&&this.start.column==d?-1:this.compare(b,d)};this.compareEnd=function(b,d){return this.end.row==b&&this.end.column==d?1:this.compare(b,d)};this.compareInside=function(b,d){return this.end.row==b&&this.end.column==d?1:this.start.row==b&&this.start.column==d?-1:this.compare(b,d)};this.clipRows=function(b,d){if(this.end.row>d)var c={row:d+1,column:0};if(this.start.row>d)var g={row:d+1,column:0};this.start.row<
b&&(g={row:b,column:0});this.end.row<b&&(c={row:b,column:0});return j.fromPoints(g||this.start,c||this.end)};this.extend=function(b,d){var c=this.compare(b,d);if(0==c)return this;if(-1==c)var g={row:b,column:d};else var a={row:b,column:d};return j.fromPoints(g||this.start,a||this.end)};this.isEmpty=function(){return this.start.row==this.end.row&&this.start.column==this.end.column};this.isMultiLine=function(){return this.start.row!==this.end.row};this.clone=function(){return j.fromPoints(this.start,
this.end)};this.collapseRows=function(){return 0==this.end.column?new j(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new j(this.start.row,0,this.end.row,0)};this.toScreenRange=function(b){var d=b.documentToScreenPosition(this.start),b=b.documentToScreenPosition(this.end);return new j(d.row,d.column,b.row,b.column)}}).call(j.prototype);j.fromPoints=function(b,d){return new j(b.row,b.column,d.row,d.column)};m.Range=j});
define("ace/mode/text","require,exports,module,ace/tokenizer,ace/mode/text_highlight_rules,ace/mode/behaviour,ace/unicode".split(","),function(c,m){var j=c("ace/tokenizer").Tokenizer,b=c("ace/mode/text_highlight_rules").TextHighlightRules,d=c("ace/mode/behaviour").Behaviour,k=c("ace/unicode"),g=function(){this.$tokenizer=new j((new b).getRules());this.$behaviour=new d};(function(){this.tokenRe=RegExp("^["+k.packages.L+k.packages.Mn+k.packages.Mc+k.packages.Nd+k.packages.Pc+"\\$_]+","g");this.nonTokenRe=
RegExp("^(?:[^"+k.packages.L+k.packages.Mn+k.packages.Mc+k.packages.Nd+k.packages.Pc+"\\$_]|s])+","g");this.getTokenizer=function(){return this.$tokenizer};this.toggleCommentLines=function(){};this.getNextLineIndent=function(){return""};this.checkOutdent=function(){return!1};this.autoOutdent=function(){};this.$getIndent=function(a){return(a=a.match(/^(\s+)/))?a[1]:""};this.createWorker=function(){return null};this.highlightSelection=function(a){var b=a.session;b.$selectionOccurrences||(b.$selectionOccurrences=
[]);b.$selectionOccurrences.length&&this.clearSelectionHighlight(a);var d=a.getSelectionRange();if(!d.isEmpty()&&!d.isMultiLine()){var c=d.start.column-1,k=d.end.column+1,g=b.getLine(d.start.row),j=g.length,m=g.substring(Math.max(c,0),Math.min(k,j));if(!(0<=c&&/^[\w\d]/.test(m)||k<=j&&/[\w\d]$/.test(m)))if(m=g.substring(d.start.column,d.end.column),/^[\w\d]+$/.test(m)){var q=a.getCursorPosition(),d={wrap:!0,wholeWord:!0,caseSensitive:!0,needle:m},c=a.$search.getOptions();a.$search.set(d);a.$search.findAll(b).forEach(function(a){a.contains(q.row,
q.column)||(a=b.addMarker(a,"ace_selected_word","text"),b.$selectionOccurrences.push(a))});a.$search.set(c)}}};this.clearSelectionHighlight=function(a){a.session.$selectionOccurrences&&(a.session.$selectionOccurrences.forEach(function(b){a.session.removeMarker(b)}),a.session.$selectionOccurrences=[])};this.createModeDelegates=function(a){if(this.$embeds){this.$modes={};for(var b=0;b<this.$embeds.length;b++)a[this.$embeds[b]]&&(this.$modes[this.$embeds[b]]=new a[this.$embeds[b]]);for(var d=["toggleCommentLines",
"getNextLineIndent","checkOutdent","autoOutdent","transformAction"],b=0;b<d.length;b++)(function(a){var c=d[b],k=a[c];a[d[b]]=function(){return this.$delegator(c,arguments,k)}})(this)}};this.$delegator=function(a,b,d){for(var c=b[0],k=0;k<this.$embeds.length;k++)if(this.$modes[this.$embeds[k]]){var g=c.split(this.$embeds[k]);if(!g[0]&&g[1])return b[0]=g[1],d=this.$modes[this.$embeds[k]],d[a].apply(d,b)}a=d.apply(this,b);return d?a:void 0};this.transformAction=function(a,b,d,c,k){if(this.$behaviour){var g=
this.$behaviour.getBehaviours(),j;for(j in g)if(g[j][b]){var m=g[j][b].apply(this,arguments);if(!1!==m)return m}}return!1}}).call(g.prototype);m.Mode=g});
define("ace/tokenizer",["require","exports","module"],function(c,m){var j=function(b){this.rules=b;this.regExps={};this.matchMappings={};for(var d in this.rules){for(var b=this.rules[d],c=[],g=0,a=this.matchMappings[d]={},f=0;f<b.length;f++){var n=RegExp("(?:("+b[f].regex+")|(.))").exec("a").length-2,j=b[f].regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+g+1)});a[g]={rule:f,len:n};g+=n;c.push(j)}this.regExps[d]=RegExp("(?:("+c.join(")|(")+")|(.))","g")}};(function(){this.getLineTokens=
function(b,d){var c=d,g=this.rules[c],a=this.matchMappings[c],f=this.regExps[c];f.lastIndex=0;for(var n,j=[],m=0,u={type:null,value:""};n=f.exec(b);){for(var s="text",y=null,q=[n[0]],x=0;x<n.length-2;x++)if(void 0!==n[x+1]){y=g[a[x].rule];1<a[x].len&&(q=n.slice(x+2,x+1+a[x].len));s="function"==typeof y.token?y.token.apply(this,q):y.token;if((n=y.next)&&n!==c)c=n,g=this.rules[c],a=this.matchMappings[c],m=f.lastIndex,f=this.regExps[c],f.lastIndex=m;break}if(q[0]){"string"==typeof s&&(q=[q.join("")],
s=[s]);for(x=0;x<q.length;x++)(!y||y.merge||"text"===s[x])&&u.type===s[x]?u.value+=q[x]:(u.type&&j.push(u),u={type:s[x],value:q[x]})}if(m==b.length)break;m=f.lastIndex}u.type&&j.push(u);return{tokens:j,state:c}}}).call(j.prototype);m.Tokenizer=j});
define("ace/mode/text_highlight_rules",["require","exports","module","pilot/lang"],function(c,m){var j=c("pilot/lang"),b=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{token:"text",regex:".+"}]}};(function(){this.addRules=function(b,c){for(var g in b){for(var a=b[g],f=0;f<a.length;f++){var n=a[f];n.next=n.next?c+n.next:c+g}this.$rules[c+g]=a}};this.getRules=function(){return this.$rules};this.embedRules=function(b,c,g,a){b=(new b).getRules();if(a)for(var f=0;f<a.length;f++)a[f]=c+
a[f];else for(f in a=[],b)a.push(c+f);this.addRules(b,c);for(f=0;f<a.length;f++)Array.prototype.unshift.apply(this.$rules[a[f]],j.deepCopy(g));this.$embeds||(this.$embeds=[]);this.$embeds.push(c)};this.getEmbeds=function(){return this.$embeds}}).call(b.prototype);m.TextHighlightRules=b});
define("ace/mode/behaviour",["require","exports","module"],function(c,m){var j=function(){this.$behaviours={}};(function(){this.add=function(b,d,c){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[b]:this.$behaviours[b]={}}this.$behaviours[b][d]=c};this.addBehaviours=function(b){for(var d in b)for(var c in b[d])this.add(d,c,b[d][c])};this.remove=function(b){this.$behaviours&&this.$behaviours[b]&&delete this.$behaviours[b]};this.inherit=function(b,d){this.addBehaviours("function"===
typeof b?(new b).getBehaviours(d):b.getBehaviours(d))};this.getBehaviours=function(b){if(b){for(var d={},c=0;c<b.length;c++)this.$behaviours[b[c]]&&(d[b[c]]=this.$behaviours[b[c]]);return d}return this.$behaviours}}).call(j.prototype);m.Behaviour=j});
define("ace/unicode",["require","exports","module"],function(c,m){m.packages={};var j={L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"},
b=/\w{4}/g,d;for(d in j)m.packages[d]=j[d].replace(b,"\\u$&")});
define("ace/document","require,exports,module,pilot/oop,pilot/event_emitter,ace/range,ace/anchor".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/event_emitter").EventEmitter,d=c("ace/range").Range,k=c("ace/anchor").Anchor,g=function(a){this.$lines=[];Array.isArray(a)?this.insertLines(0,a):0==a.length?this.$lines=[""]:this.insert({row:0,column:0},a)};(function(){j.implement(this,b);this.setValue=function(a){var b=this.getLength();this.remove(new d(0,0,b,this.getLine(b-1).length));this.insert({row:0,
column:0},a)};this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())};this.createAnchor=function(a,b){return new k(this,a,b)};this.$split=0=="aaa".split(/a/).length?function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:function(a){return a.split(/\r\n|\r|\n/)};this.$detectNewLine=function(a){this.$autoNewLine=(a=a.match(/^.*?(\r?\n)/m))?a[1]:"\n"};this.getNewLineCharacter=function(){switch(this.$newLineMode){case "windows":return"\r\n";case "unix":return"\n";case "auto":return this.$autoNewLine}};
this.$autoNewLine="\n";this.$newLineMode="auto";this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a)};this.getNewLineMode=function(){return this.$newLineMode};this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a};this.getLine=function(a){return this.$lines[a]||""};this.getLines=function(a,b){return this.$lines.slice(a,b+1)};this.getAllLines=function(){return this.getLines(0,this.getLength())};this.getLength=function(){return this.$lines.length};this.getTextRange=function(a){if(a.start.row==
a.end.row)return this.$lines[a.start.row].substring(a.start.column,a.end.column);var b=[];b.push(this.$lines[a.start.row].substring(a.start.column));b.push.apply(b,this.getLines(a.start.row+1,a.end.row-1));b.push(this.$lines[a.end.row].substring(0,a.end.column));return b.join(this.getNewLineCharacter())};this.$clipPosition=function(a){var b=this.getLength();a.row>=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length);return a};this.insert=function(a,b){if(0==b.length)return a;a=this.$clipPosition(a);
1>=this.getLength()&&this.$detectNewLine(b);var d=this.$split(b),c=d.splice(0,1)[0],k=0==d.length?null:d.splice(d.length-1,1)[0],a=this.insertInLine(a,c);null!==k&&(a=this.insertNewLine(a),a=this.insertLines(a.row,d),a=this.insertInLine(a,k||""));return a};this.insertLines=function(a,b){if(0==b.length)return{row:a,column:0};var c=[a,0];c.push.apply(c,b);this.$lines.splice.apply(this.$lines,c);c=new d(a,0,a+b.length,0);this._dispatchEvent("change",{data:{action:"insertLines",range:c,lines:b}});return c.end};
this.insertNewLine=function(a){var a=this.$clipPosition(a),b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column);this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));b={row:a.row+1,column:0};this._dispatchEvent("change",{data:{action:"insertText",range:d.fromPoints(a,b),text:this.getNewLineCharacter()}});return b};this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);c={row:a.row,
column:a.column+b.length};this._dispatchEvent("change",{data:{action:"insertText",range:d.fromPoints(a,c),text:b}});return c};this.remove=function(a){a.start=this.$clipPosition(a.start);a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,d=a.end.row;if(a.isMultiLine()){var c=0==a.start.column?b:b+1,k=d-1;0<a.end.column&&this.removeInLine(d,0,a.end.column);k>=c&&this.removeLines(c,k);c!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,
a.start.column,a.end.column);return a.start};this.removeInLine=function(a,b,c){if(b!=c){var k=new d(a,b,a,c),g=this.getLine(a),j=g.substring(b,c),b=g.substring(0,b)+g.substring(c,g.length);this.$lines.splice(a,1,b);this._dispatchEvent("change",{data:{action:"removeText",range:k,text:j}});return k.start}};this.removeLines=function(a,b){var c=new d(a,0,b+1,0),k=this.$lines.splice(a,b-a+1);this._dispatchEvent("change",{data:{action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:k}});return k};
this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),k=new d(a,b.length,a+1,0);this.$lines.splice(a,2,b+c);this._dispatchEvent("change",{data:{action:"removeText",range:k,text:this.getNewLineCharacter()}})};this.replace=function(a,b){if(0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);return b?this.insert(a.start,b):a.start};this.applyDeltas=function(a){for(var b=0;b<a.length;b++){var c=a[b],k=d.fromPoints(c.range.start,c.range.end);
"insertLines"==c.action?this.insertLines(k.start.row,c.lines):"insertText"==c.action?this.insert(k.start,c.text):"removeLines"==c.action?this.removeLines(k.start.row,k.end.row-1):"removeText"==c.action&&this.remove(k)}};this.revertDeltas=function(a){for(var b=a.length-1;0<=b;b--){var c=a[b],k=d.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this.removeLines(k.start.row,k.end.row-1):"insertText"==c.action?this.remove(k):"removeLines"==c.action?this.insertLines(k.start.row,c.lines):"removeText"==
c.action&&this.insert(k.start,c.text)}}}).call(g.prototype);m.Document=g});
define("ace/anchor",["require","exports","module","pilot/oop","pilot/event_emitter"],function(c,m){var j=c("pilot/oop"),b=c("pilot/event_emitter").EventEmitter;(function(){j.implement(this,b);this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)};this.getDocument=function(){return this.document};this.onChange=function(b){var b=b.data,c=b.range;if(!(c.start.row==c.end.row&&c.start.row!=this.row||c.start.row>this.row)&&!(c.start.row==this.row&&c.start.column>this.column)){var g=
this.row,a=this.column;"insertText"===b.action?c.start.row===g&&c.start.column<=a?c.start.row===c.end.row?a+=c.end.column-c.start.column:(a-=c.start.column,g+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row<g&&(g+=c.end.row-c.start.row):"insertLines"===b.action?c.start.row<=g&&(g+=c.end.row-c.start.row):"removeText"==b.action?c.start.row==g&&c.start.column<a?a=c.end.column>=a?c.start.column:Math.max(0,a-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row<g?(c.end.row==
g&&(a=Math.max(0,a-c.end.column)+c.start.column),g-=c.end.row-c.start.row):c.end.row==g&&(g-=c.end.row-c.start.row,a=Math.max(0,a-c.end.column)+c.start.column):"removeLines"==b.action&&c.start.row<=g&&(c.end.row<=g?g-=c.end.row-c.start.row:(g=c.start.row,a=0));this.setPosition(g,a,!0)}};this.setPosition=function(b,c,g){b=g?{row:b,column:c}:this.$clipPositionToDocument(b,c);this.row==b.row&&this.column==b.column||(c={row:this.row,column:this.column},this.row=b.row,this.column=b.column,this._dispatchEvent("change",
{old:c,value:b}))};this.detach=function(){this.document.removeEventListener("change",this.$onChange)};this.$clipPositionToDocument=function(b,c){var g={};b>=this.document.getLength()?(g.row=Math.max(0,this.document.getLength()-1),g.column=this.document.getLine(g.row).length):0>b?(g.row=0,g.column=0):(g.row=b,g.column=Math.min(this.document.getLine(g.row).length,Math.max(0,c)));0>c&&(g.column=0);return g}}).call((m.Anchor=function(b,c,g){this.document=b;"undefined"==typeof g?this.setPosition(c.row,
c.column):this.setPosition(c,g);this.$onChange=this.onChange.bind(this);b.on("change",this.$onChange)}).prototype)});
define("ace/background_tokenizer",["require","exports","module","pilot/oop","pilot/event_emitter"],function(c,m){var j=c("pilot/oop"),b=c("pilot/event_emitter").EventEmitter,d=function(b){this.running=!1;this.lines=[];this.currentLine=0;this.tokenizer=b;var d=this;this.$worker=function(){if(d.running){for(var a=new Date,b=d.currentLine,c=0,k=d.doc.getLength();d.currentLine<k;)if(d.lines[d.currentLine]=d.$tokenizeRows(d.currentLine,d.currentLine)[0],d.currentLine++,c+=1,0==c%5&&20<new Date-a){d.fireUpdateEvent(b,
d.currentLine-1);d.running=setTimeout(d.$worker,20);return}d.running=!1;d.fireUpdateEvent(b,k-1)}}};(function(){j.implement(this,b);this.setTokenizer=function(b){this.tokenizer=b;this.lines=[];this.start(0)};this.setDocument=function(b){this.doc=b;this.lines=[];this.stop()};this.fireUpdateEvent=function(b,d){this._dispatchEvent("update",{data:{first:b,last:d}})};this.start=function(b){this.currentLine=Math.min(b||0,this.currentLine,this.doc.getLength());this.lines.splice(this.currentLine,this.lines.length);
this.stop();this.running=setTimeout(this.$worker,700)};this.stop=function(){this.running&&clearTimeout(this.running);this.running=!1};this.getTokens=function(b,d){return this.$tokenizeRows(b,d)};this.getState=function(b){return this.$tokenizeRows(b,b)[0].state};this.$tokenizeRows=function(b,d){if(!this.doc)return[];var a=[],c="start",j=!1;0<b&&this.lines[b-1]?(c=this.lines[b-1].state,j=!0):0==b?(c="start",j=!0):0<this.lines.length&&(c=this.lines[this.lines.length-1].state);for(var m=this.doc.getLines(b,
d),t=b;t<=d;t++)if(this.lines[t])u=this.lines[t],c=u.state,a.push(u);else{var u=this.tokenizer.getLineTokens(m[t-b]||"",c),c=u.state;a.push(u);j&&(this.lines[t]=u)}return a}}).call(d.prototype);m.BackgroundTokenizer=d});
define("ace/edit_session/folding","require,exports,module,ace/range,ace/edit_session/fold_line,ace/edit_session/fold".split(","),function(c,m){c("ace/range");var j=c("ace/edit_session/fold_line").FoldLine,b=c("ace/edit_session/fold").Fold;m.Folding=function(){this.getFoldAt=function(b,c,g){var a=this.getFoldLine(b);if(!a)return null;for(var a=a.folds,f=0;f<a.length;f++){var j=a[f];if(j.range.contains(b,c)&&!(1==g&&j.range.isEnd(b,c))&&!(-1==g&&j.range.isStart(b,c)))return j}};this.getFoldsInRange=
function(b){var b=b.clone(),c=b.start,g=b.end,a=this.$foldData,f=[];c.column+=1;g.column-=1;for(c=0;c<a.length;c++)if(g=a[c].range.compareRange(b),2!=g){if(-2==g)break;for(var j=a[c].folds,m=0;m<j.length;m++){var t=j[m],g=t.range.compareRange(b);if(-2==g)break;else if(2==g)continue;else if(42==g)break;f.push(t)}}return f};this.getFoldStringAt=function(b,c,g,a){a=a||this.getFoldLine(b);if(!a)return null;for(var f={end:{column:0}},j=0;j<a.folds.length;j++){var m=a.folds[j],t=m.range.compareEnd(b,c);
if(-1==t){var u=this.getLine(m.start.row).substring(f.end.column,m.start.column);break}else if(0==t)return null;f=m}u||(u=this.getLine(m.start.row).substring(f.end.column));return-1==g?u.substring(0,c-f.end.column):1==g?u.substring(c-f.end.column):u};this.getFoldLine=function(b,c){var g=this.$foldData,a=0;c&&(a=g.indexOf(c));-1==a&&(a=0);for(a;a<g.length;a++){var f=g[a];if(f.start.row<=b&&f.end.row>=b)return f;if(f.end.row>b)break}return null};this.getNextFold=function(b,c){var g=this.$foldData,a=
0;c&&(a=g.indexOf(c));-1==a&&(a=0);for(a;a<g.length;a++){var f=g[a];if(f.end.row>=b)return f}return null};this.getFoldedRowCount=function(b,c){for(var g=this.$foldData,a=c-b+1,f=0;f<g.length;f++){var j=g[f],m=j.end.row,j=j.start.row;if(m>=c){j<c&&(a=j>=b?a-(c-j):0);break}else m>=b&&(a=j>=b?a-(m-j):a-(m-b+1))}return a};this.$addFoldLine=function(b){this.$foldData.push(b);this.$foldData.sort(function(b,d){return b.start.row-d.start.row});return b};this.addFold=function(d,c){var g=this.$foldData,a=!1,
f=d instanceof b?d:new b(c,d),m=f.start.row,v=f.start.column,t=f.end.row,u=f.end.column;if(2>f.placeholder.length)throw"Placeholder has to be at least 2 characters";if(m==t&&2>u-v)throw"The range has to be at least 2 characters width";var s=this.getFoldAt(m,v,1);if(s&&s.range.isEnd(t,u)&&s.range.isStart(m,v))return f;if((s=this.getFoldAt(m,v,1))&&!s.range.isStart(m,v))throw"A fold can't start inside of an already existing fold";if((s=this.getFoldAt(t,u,-1))&&!s.range.isEnd(t,u))throw"A fold can't end inside of an already existing fold";
if(t>=this.doc.getLength())throw"End of fold is outside of the document.";if(u>this.getLine(t).length||v>this.getLine(m).length)throw"End of fold is outside of the document.";v=this.getFoldsInRange(f.range);0<v.length&&(this.removeFolds(v),f.subFolds=v);for(v=0;v<g.length;v++){var y=g[v];if(t==y.start.row){y.addFold(f);a=!0;break}else if(m==y.end.row){y.addFold(f);a=!0;if(!f.sameRow&&(foldLineNext=g[v+1])&&foldLineNext.start.row==t){y.merge(foldLineNext);break}break}else if(t<=y.start.row)break}a||
(y=this.$addFoldLine(new j(this.$foldData,f)));this.$useWrapMode&&this.$updateWrapData(y.start.row,y.start.row);this.$modified=!0;this._dispatchEvent("changeFold",{data:f});return f};this.addFolds=function(b){b.forEach(function(b){this.addFold(b)},this)};this.removeFold=function(b){var c=b.foldLine,g=c.start.row,a=c.end.row,f=this.$foldData,j=c.folds;1==j.length?f.splice(f.indexOf(c),1):c.range.isEnd(b.end.row,b.end.column)?(j.pop(),c.end.row=j[j.length-1].end.row,c.end.column=j[j.length-1].end.column):
c.range.isStart(b.start.row,b.start.column)?(j.shift(),c.start.row=j[0].start.row,c.start.column=j[0].start.column):b.sameRow?j.splice(j.indexOf(b),1):(f=c.split(b.start.row,b.start.column),f.folds.shift(),c.start.row=j[0].start.row,c.start.column=j[0].start.column,this.$addFoldLine(f));this.$useWrapMode&&this.$updateWrapData(g,a);this.$modified=!0;this._dispatchEvent("changeFold",{data:b})};this.removeFolds=function(b){for(var c=[],g=0;g<b.length;g++)c.push(b[g]);c.forEach(function(a){this.removeFold(a)},
this);this.$modified=!0};this.expandFold=function(b){this.removeFold(b);b.subFolds.forEach(function(b){this.addFold(b)},this);b.subFolds=[]};this.expandFolds=function(b){b.forEach(function(b){this.expandFold(b)},this)};this.isRowFolded=function(b,c){return!!this.getFoldLine(b,c)};this.getRowFoldEnd=function(b,c){var g=this.getFoldLine(b,c);return g?g.end.row:b};this.getFoldDisplayLine=function(b,c,g,a,f){null==a&&(a=b.start.row,f=0);null==c&&(c=b.end.row,g=this.getLine(c).length);var j=this.doc,m=
"";b.walk(function(b,c,d,g){if(!(c<a)){if(c==a){if(d<f)return;g=Math.max(f,g)}m=b?m+b:m+j.getLine(c).substring(g,d)}}.bind(this),c,g);return m};this.getDisplayLine=function(b,c,g,a){var f=this.getFoldLine(b);if(f)return this.getFoldDisplayLine(f,b,c,g,a);b=this.doc.getLine(b);return b.substring(a||0,c||b.length)};this.$cloneFoldData=function(){var b=[];return b=this.$foldData.map(function(c){c=c.folds.map(function(b){return b.clone()});return new j(b,c)})}}});
define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(c,m){function j(c,k){this.foldData=c;Array.isArray(k)?this.folds=k:k=this.folds=[k];var g=k[k.length-1];this.range=new b(k[0].start.row,k[0].start.column,g.end.row,g.end.column);this.start=this.range.start;this.end=this.range.end;this.folds.forEach(function(a){a.setFoldLine(this)},this)}var b=c("ace/range").Range;(function(){this.shiftRow=function(b){this.start.row+=b;this.end.row+=b;this.folds.forEach(function(c){c.start.row+=
b;c.end.row+=b})};this.addFold=function(b){if(b.sameRow){if(b.start.row<this.startRow||b.endRow>this.endRow)throw"Can't add a fold to this FoldLine as it has no connection";this.folds.push(b);this.folds.sort(function(b,c){return-b.range.compareEnd(c.start.row,c.start.column)});0<this.range.compareEnd(b.start.row,b.start.column)?(this.end.row=b.end.row,this.end.column=b.end.column):0>this.range.compareStart(b.end.row,b.end.column)&&(this.start.row=b.start.row,this.start.column=b.start.column)}else if(b.start.row==
this.end.row)this.folds.push(b),this.end.row=b.end.row,this.end.column=b.end.column;else if(b.end.row==this.start.row)this.folds.unshift(b),this.start.row=b.start.row,this.start.column=b.start.column;else throw"Trying to add fold to FoldRow that doesn't have a matching row";b.foldLine=this};this.containsRow=function(b){return b>=this.start.row&&b<=this.end.row};this.walk=function(b,c,g){var a=0,f=this.folds,j,m,t;t=!0;null==c&&(c=this.end.row,g=this.end.column);for(var u=0;u<f.length;u++){j=f[u];
m=j.range.compareStart(c,g);if(-1==m){b(null,c,g,a,t);return}t=b(null,j.start.row,j.start.column,a,t);if((t=!t&&b(j.placeholder,j.start.row,j.start.column,a))||0==m)return;t=!j.sameRow;a=j.end.column}b(null,c,g,a,t)};this.getNextFoldTo=function(b,c){for(var g,a,f=0;f<this.folds.length;f++){g=this.folds[f];a=g.range.compareEnd(b,c);if(-1==a)return{fold:g,kind:"after"};if(0==a)return{fold:g,kind:"inside"}}return null};this.addRemoveChars=function(b,c,g){var a=this.getNextFoldTo(b,c),f;if(a){f=a.fold;
if("inside"==a.kind&&f.start.column!=c&&f.start.row!=b)throw"Moving characters inside of a fold should never be reached";if(f.start.row==b){b=this.folds;c=b.indexOf(f);0==c&&(this.start.column+=g);for(c;c<b.length;c++){f=b[c];f.start.column+=g;if(!f.sameRow)return;f.end.column+=g}this.end.column+=g}}};this.split=function(b,c){var g=this.getNextFoldTo(b,c).fold,a=this.folds,f=this.foldData;if(!g)return null;var g=a.indexOf(g),m=a[g-1];this.end.row=m.end.row;this.end.column=m.end.column;a=a.splice(g,
a.length-g);a=new j(f,a);f.splice(f.indexOf(this)+1,0,a);return a};this.merge=function(b){for(var c=b.folds,g=0;g<c.length;g++)this.addFold(c[g]);c=this.foldData;c.splice(c.indexOf(b),1)};this.toString=function(){var b=[this.range.toString()+": ["];this.folds.forEach(function(c){b.push("  "+c.toString())});b.push("]");return b.join("\n")};this.idxToPosition=function(b){for(var c=0,g,a=0;a<this.folds.length;a++){g=this.folds[a];b-=g.start.column-c;if(0>b)return{row:g.start.row,column:g.start.column+
b};b-=g.placeholder.length;if(0>b)return g.start;c=g.end.column}return{row:this.end.row,column:this.end.column+b}}}).call(j.prototype);m.FoldLine=j});
define("ace/edit_session/fold",["require","exports","module"],function(c,m){var j=m.Fold=function(b,c){this.foldLine=null;this.placeholder=c;this.range=b;this.start=b.start;this.end=b.end;this.sameRow=b.start.row==b.end.row;this.subFolds=[]};(function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()};this.setFoldLine=function(b){this.foldLine=b;this.subFolds.forEach(function(c){c.setFoldLine(b)})};this.clone=function(){var b=this.range.clone(),c=new j(b,this.placeholder);
this.subFolds.forEach(function(b){c.subFolds.push(b.clone())});return c}}).call(j.prototype)});
define("ace/search","require,exports,module,pilot/lang,pilot/oop,ace/range".split(","),function(c,m){var j=c("pilot/lang"),b=c("pilot/oop"),d=c("ace/range").Range,k=function(){this.$options={needle:"",backwards:!1,wrap:!1,caseSensitive:!1,wholeWord:!1,scope:k.ALL,regExp:!1}};k.ALL=1;k.SELECTION=2;(function(){this.set=function(c){b.mixin(this.$options,c);return this};this.getOptions=function(){return j.copyObject(this.$options)};this.find=function(b){if(!this.$options.needle)return null;var a=null;
(this.$options.backwards?this.$backwardMatchIterator(b):this.$forwardMatchIterator(b)).forEach(function(b){a=b;return!0});return a};this.findAll=function(b){if(!this.$options.needle)return[];var a=[];(this.$options.backwards?this.$backwardMatchIterator(b):this.$forwardMatchIterator(b)).forEach(function(b){a.push(b)});return a};this.replace=function(b,a){var c=this.$assembleRegExp(),d=c.exec(b);return d&&d[0].length==b.length?this.$options.regExp?b.replace(c,a):a:null};this.$forwardMatchIterator=function(b){var a=
this.$assembleRegExp(),c=this;return{forEach:function(d){c.$forwardLineIterator(b).forEach(function(b,g,k){g&&(b=b.substring(g));var j=[];b.replace(a,function(a){j.push({str:a,offset:g+arguments[arguments.length-2]});return a});for(b=0;b<j.length;b++){var m=j[b],m=c.$rangeFromMatch(k,m.offset,m.str.length);if(d(m))return!0}})}}};this.$backwardMatchIterator=function(b){var a=this.$assembleRegExp(),c=this;return{forEach:function(d){c.$backwardLineIterator(b).forEach(function(b,g,k){g&&(b=b.substring(g));
var j=[];b.replace(a,function(a,b){j.push({str:a,offset:g+b});return a});for(b=j.length-1;0<=b;b--){var m=j[b],m=c.$rangeFromMatch(k,m.offset,m.str.length);if(d(m))return!0}})}}};this.$rangeFromMatch=function(b,a,c){return new d(b,a,b,a+c)};this.$assembleRegExp=function(){var b=this.$options.regExp?this.$options.needle:j.escapeRegExp(this.$options.needle);this.$options.wholeWord&&(b="\\b"+b+"\\b");var a="g";this.$options.caseSensitive||(a+="i");return RegExp(b,a)};this.$forwardLineIterator=function(b){function a(a){var k=
b.getLine(a);c&&a==d.end.row&&(k=k.substring(0,d.end.column));q&&a==j.row&&(k=k.substring(0,j.column));return k}var c=this.$options.scope==k.SELECTION,d=b.getSelection().getRange(),j=b.getSelection().getCursor(),m=c?d.start.row:0,u=c?d.start.column:0,s=c?d.end.row:b.getLength()-1,y=this.$options.wrap,q=!1;return{forEach:function(b){var c=j.row,d=a(c),f=j.column,g=!1;for(q=!1;!b(d,f,c)&&!g;){c++;f=0;if(c>s)if(y)c=m,f=u,q=!0;else break;c==j.row&&(g=!0);d=a(c)}}}};this.$backwardLineIterator=function(b){var a=
this.$options.scope==k.SELECTION,c=b.getSelection().getRange(),d=a?c.end:c.start,j=a?c.start.row:0,m=a?c.start.column:0,u=a?c.end.row:b.getLength()-1,s=this.$options.wrap;return{forEach:function(k){for(var q=d.row,x=b.getLine(q).substring(0,d.column),A=0,B=!1,r=!1;!k(x,A,q)&&!B;){q--;A=0;if(q<j)if(s)q=u,r=!0;else break;q==d.row&&(B=!0);x=b.getLine(q);a&&(q==j?A=m:q==u&&(x=x.substring(0,c.end.column)));r&&q==d.row&&(A=d.column)}}}}}).call(k.prototype);m.Search=k});
define("ace/undomanager",["require","exports","module"],function(c,m){var j=function(){this.reset()};(function(){this.execute=function(b){var c=b.args[0];this.$doc=b.args[1];this.$undoStack.push(c);this.$redoStack=[]};this.undo=function(b){var c=this.$undoStack.pop(),k=null;c&&(k=this.$doc.undoChanges(c,b),this.$redoStack.push(c));return k};this.redo=function(b){var c=this.$redoStack.pop(),k=null;c&&(k=this.$doc.redoChanges(c,b),this.$undoStack.push(c));return k};this.reset=function(){this.$undoStack=
[];this.$redoStack=[]};this.hasUndo=function(){return 0<this.$undoStack.length};this.hasRedo=function(){return 0<this.$redoStack.length}}).call(j.prototype);m.UndoManager=j});
define("ace/virtual_renderer","require,exports,module,pilot/oop,pilot/dom,pilot/event,pilot/useragent,ace/layer/gutter,ace/layer/marker,ace/layer/text,ace/layer/cursor,ace/scrollbar,ace/renderloop,pilot/event_emitter,text/ace/css/editor.css".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/dom"),d=c("pilot/event"),k=c("pilot/useragent"),g=c("ace/layer/gutter").Gutter,a=c("ace/layer/marker").Marker,f=c("ace/layer/text").Text,n=c("ace/layer/cursor").Cursor,v=c("ace/scrollbar").ScrollBar,t=c("ace/renderloop").RenderLoop,
u=c("pilot/event_emitter").EventEmitter,s=c("text/ace/css/editor.css");b.importCssString(s);s=function(c,k){this.container=c;b.addCssClass(this.container,"ace_editor");this.setTheme(k);this.$gutter=b.createElement("div");this.$gutter.className="ace_gutter";this.container.appendChild(this.$gutter);this.scroller=b.createElement("div");this.scroller.className="ace_scroller";this.container.appendChild(this.scroller);this.content=b.createElement("div");this.content.className="ace_content";this.scroller.appendChild(this.content);
this.$gutterLayer=new g(this.$gutter);this.$markerBack=new a(this.content);var j=this.$textLayer=new f(this.content);this.canvas=j.element;this.$markerFront=new a(this.content);this.characterWidth=j.getCharacterWidth();this.lineHeight=j.getLineHeight();this.$cursorLayer=new n(this.content);this.$cursorPadding=8;this.$horizScrollAlwaysVisible=this.$horizScroll=!0;this.scrollBar=new v(c);this.scrollBar.addEventListener("scroll",this.onScroll.bind(this));this.scrollTop=0;this.cursorPos={row:0,column:0};
var m=this;this.$textLayer.addEventListener("changeCharaterSize",function(){m.characterWidth=j.getCharacterWidth();m.lineHeight=j.getLineHeight();m.$updatePrintMargin();m.onResize(!0);m.$loop.schedule(m.CHANGE_FULL)});d.addListener(this.$gutter,"click",this.$onGutterClick.bind(this));d.addListener(this.$gutter,"dblclick",this.$onGutterClick.bind(this));this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0};this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,
characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1};this.$loop=new t(this.$renderChanges.bind(this));this.$loop.schedule(this.CHANGE_FULL);this.setPadding(4);this.$updatePrintMargin()};(function(){this.showGutter=!0;this.CHANGE_CURSOR=1;this.CHANGE_MARKER=2;this.CHANGE_GUTTER=4;this.CHANGE_SCROLL=8;this.CHANGE_LINES=16;this.CHANGE_TEXT=32;this.CHANGE_SIZE=64;this.CHANGE_MARKER_BACK=128;this.CHANGE_MARKER_FRONT=256;this.CHANGE_FULL=512;j.implement(this,u);this.setSession=function(a){this.session=
a;this.$cursorLayer.setSession(a);this.$markerBack.setSession(a);this.$markerFront.setSession(a);this.$gutterLayer.setSession(a);this.$textLayer.setSession(a);this.$loop.schedule(this.CHANGE_FULL)};this.updateLines=function(a,b){void 0===b&&(b=Infinity);this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b};this.$loop.schedule(this.CHANGE_LINES)};this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)};
this.updateFull=function(){this.$loop.schedule(this.CHANGE_FULL)};this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()};this.onResize=function(a){var c=this.CHANGE_SIZE,d=this.$size,f=b.getInnerHeight(this.container);if(a||d.height!=f)d.height=f,this.scroller.style.height=f+"px",d.scrollerHeight=this.scroller.clientHeight,this.scrollBar.setHeight(d.scrollerHeight),this.session&&(this.scrollToY(this.getScrollTop()),c|=this.CHANGE_FULL);f=b.getInnerWidth(this.container);if(a||d.width!=
f){d.width=f;var g=this.showGutter?this.$gutter.offsetWidth:0;this.scroller.style.left=g+"px";d.scrollerWidth=Math.max(0,f-g-this.scrollBar.getWidth());this.scroller.style.width=d.scrollerWidth+"px";if(this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)c|=this.CHANGE_FULL}this.$loop.schedule(c)};this.adjustWrapLimit=function(){return this.session.adjustWrapLimit(Math.floor((this.$size.scrollerWidth-2*this.$padding)/this.characterWidth)-1)};this.$onGutterClick=function(a){var b=d.getDocumentX(a),
c=d.getDocumentY(a);this._dispatchEvent("gutter"+a.type,{row:this.screenToTextCoordinates(b,c).row,htmlEvent:a})};this.setShowInvisibles=function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)};this.getShowInvisibles=function(){return this.$textLayer.showInvisibles};this.$showPrintMargin=!0;this.setShowPrintMargin=function(a){this.$showPrintMargin=a;this.$updatePrintMargin()};this.getShowPrintMargin=function(){return this.$showPrintMargin};this.$printMarginColumn=80;
this.setPrintMarginColumn=function(a){this.$printMarginColumn=a;this.$updatePrintMargin()};this.getPrintMarginColumn=function(){return this.$printMarginColumn};this.getShowGutter=function(){return this.showGutter};this.setShowGutter=function(a){this.showGutter!==a&&(this.$gutter.style.display=a?"block":"none",this.showGutter=a,this.onResize(!0))};this.$updatePrintMargin=function(){var a;if(this.$showPrintMargin||this.$printMarginEl)this.$printMarginEl||(a=b.createElement("div"),a.className="ace_print_margin_layer",
this.$printMarginEl=b.createElement("div"),this.$printMarginEl.className="ace_print_margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.$textLayer.element)),a=this.$printMarginEl.style,a.left=this.characterWidth*this.$printMarginColumn+2*this.$padding+"px",a.visibility=this.$showPrintMargin?"visible":"hidden"};this.getContainerElement=function(){return this.container};this.getMouseEventTarget=function(){return this.content};this.getTextAreaContainer=function(){return this.container};
this.moveTextAreaToCursor=function(a){if(!k.isIE){var b=this.$cursorLayer.getPixelPosition();if(b){var c=this.content.getBoundingClientRect(),d=this.layerConfig.offset;a.style.left=c.left+b.left+this.$padding+"px";a.style.top=c.top+b.top-this.scrollTop+d+"px"}}};this.getFirstVisibleRow=function(){return this.layerConfig.firstRow};this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)};this.getLastFullyVisibleRow=function(){return this.layerConfig.firstRow-
1+Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight)};this.getLastVisibleRow=function(){return this.layerConfig.lastRow};this.$padding=null;this.setPadding=function(a){this.$padding=a;this.$textLayer.setPadding(a);this.$cursorLayer.setPadding(a);this.$markerFront.setPadding(a);this.$markerBack.setPadding(a);this.$loop.schedule(this.CHANGE_FULL);this.$updatePrintMargin()};this.getHScrollBarAlwaysVisible=function(){return this.$horizScrollAlwaysVisible};this.setHScrollBarAlwaysVisible=
function(a){this.$horizScrollAlwaysVisible!=a&&(this.$horizScrollAlwaysVisible=a,(!this.$horizScrollAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL))};this.onScroll=function(a){this.scrollToY(a.data)};this.$updateScrollBar=function(){this.scrollBar.setInnerHeight(this.layerConfig.maxHeight);this.scrollBar.setScrollTop(this.scrollTop)};this.$renderChanges=function(a){a&&this.session&&((a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL)&&
this.$computeLayerConfig(),a&this.CHANGE_FULL?(this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$updateScrollBar()):a&this.CHANGE_SCROLL?(a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig),
this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$updateScrollBar()):(a&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_LINES?(this.$updateLines(),this.$updateScrollBar(),this.showGutter&&this.$gutterLayer.update(this.layerConfig)):a&this.CHANGE_GUTTER&&this.showGutter&&this.$gutterLayer.update(this.layerConfig),a&this.CHANGE_CURSOR&&
this.$cursorLayer.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig),a&this.CHANGE_SIZE&&this.$updateScrollBar()))};this.$computeLayerConfig=function(){var a=this.session,b=this.scrollTop%this.lineHeight,c=this.$size.scrollerHeight+this.lineHeight,d=this.$getLongestLine(),f=this.$horizScrollAlwaysVisible||0>this.$size.scrollerWidth-d,g=this.$horizScroll!==
f;this.$horizScroll=f;g&&(this.scroller.style.overflowX=f?"scroll":"hidden");f=this.session.getScreenLength()*this.lineHeight;this.scrollTop=Math.max(0,Math.min(this.scrollTop,f-this.$size.scrollerHeight));var k=Math.ceil(c/this.lineHeight)-1,j=Math.max(0,Math.round((this.scrollTop-b)/this.lineHeight)),k=j+k,m,b={lineHeight:this.lineHeight},j=a.screenToDocumentRow(j,0);if(m=a.getFoldLine(j))j=m.start.row;m=a.documentToScreenRow(j,0);c=a.getRowHeight(b,j);k=Math.min(a.screenToDocumentRow(k,0),a.getLength()-
1);c=this.$size.scrollerHeight+a.getRowHeight(b,k)+c;b=this.scrollTop-m*this.lineHeight;this.layerConfig={width:d,padding:this.$padding,firstRow:j,firstRowScreen:m,lastRow:k,lineHeight:this.lineHeight,characterWidth:this.characterWidth,minHeight:c,maxHeight:f,offset:b,height:this.$size.scrollerHeight};this.$gutterLayer.element.style.marginTop=-b+"px";this.content.style.marginTop=-b+"px";this.content.style.width=d+"px";this.content.style.height=c+"px";this.$desiredScrollLeft&&(this.scrollToX(this.$desiredScrollLeft),
this.$desiredScrollLeft=0);if(g)this.onResize(!0)};this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;if(c.width!=this.$getLongestLine())return this.$textLayer.update(c);a>c.lastRow+1||b<c.firstRow||(Infinity===b?(this.showGutter&&this.$gutterLayer.update(c),this.$textLayer.update(c)):this.$textLayer.updateLines(c,a,b))};this.$getLongestLine=function(){var a=this.session.getScreenWidth()+1;this.$textLayer.showInvisibles&&
(a+=1);return Math.max(this.$size.scrollerWidth,Math.round(a*this.characterWidth))};this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0));this.$loop.schedule(this.CHANGE_MARKER_FRONT)};this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers());this.$loop.schedule(this.CHANGE_MARKER_BACK)};this.addGutterDecoration=function(a,b){this.$gutterLayer.addGutterDecoration(a,b);this.$loop.schedule(this.CHANGE_GUTTER)};this.removeGutterDecoration=
function(a,b){this.$gutterLayer.removeGutterDecoration(a,b);this.$loop.schedule(this.CHANGE_GUTTER)};this.setBreakpoints=function(a){this.$gutterLayer.setBreakpoints(a);this.$loop.schedule(this.CHANGE_GUTTER)};this.setAnnotations=function(a){this.$gutterLayer.setAnnotations(a);this.$loop.schedule(this.CHANGE_GUTTER)};this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)};this.hideCursor=function(){this.$cursorLayer.hideCursor()};this.showCursor=function(){this.$cursorLayer.showCursor()};
this.scrollCursorIntoView=function(){if(0!==this.$size.scrollerHeight){var a=this.$cursorLayer.getPixelPosition(),b=a.left+this.$padding,a=a.top;this.scrollTop>a&&this.scrollToY(a);this.scrollTop+this.$size.scrollerHeight<a+this.lineHeight&&this.scrollToY(a+this.lineHeight-this.$size.scrollerHeight);a=this.scroller.scrollLeft;a>b&&this.scrollToX(b);a+this.$size.scrollerWidth<b+this.characterWidth&&(b>this.layerConfig.width?this.$desiredScrollLeft=b+2*this.characterWidth:this.scrollToX(Math.round(b+
this.characterWidth-this.$size.scrollerWidth)))}};this.getScrollTop=function(){return this.scrollTop};this.getScrollLeft=function(){return this.scroller.scrollLeft};this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight};this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)};this.scrollToRow=function(a){this.scrollToY(a*this.lineHeight)};this.scrollToLine=function(a,b){for(var c={lineHeight:this.lineHeight},d=
0,f=1;f<a;f++)d+=this.session.getRowHeight(c,f-1);b&&(d-=this.$size.scrollerHeight/2);this.scrollToY(d)};this.scrollToY=function(a){a=Math.max(0,a);this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)};this.scrollToX=function(a){a<=this.$padding&&(a=0);this.scroller.scrollLeft=a};this.scrollBy=function(a,b){b&&this.scrollToY(this.scrollTop+b);a&&this.scrollToX(this.scroller.scrollLeft+a)};this.screenToTextCoordinates=function(a,c){var d=this.scroller.getBoundingClientRect(),
f=Math.round((a+this.scroller.scrollLeft-d.left-this.$padding-b.getPageScrollLeft())/this.characterWidth);return this.session.screenToDocumentPosition(Math.floor((c+this.scrollTop-d.top-b.getPageScrollTop())/this.lineHeight),Math.max(f,0))};this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),f=this.$padding+Math.round(d.column*this.characterWidth),d=d.row*this.lineHeight;return{pageX:c.left+f-this.getScrollLeft(),pageY:c.top+
d-this.getScrollTop()}};this.visualizeFocus=function(){b.addCssClass(this.container,"ace_focus")};this.visualizeBlur=function(){b.removeCssClass(this.container,"ace_focus")};this.showComposition=function(){this.$composition||(this.$composition=b.createElement("div"),this.$composition.className="ace_composition",this.content.appendChild(this.$composition));this.$composition.innerHTML="&#160;";var a=this.$cursorLayer.getPixelPosition(),c=this.$composition.style;c.top=a.top+"px";c.left=a.left+this.$padding+
"px";c.height=this.lineHeight+"px";this.hideCursor()};this.setCompositionText=function(a){b.setInnerText(this.$composition,a)};this.hideComposition=function(){this.showCursor();if(this.$composition){var a=this.$composition.style;a.top="-10000px";a.left="-10000px"}};this.setTheme=function(a){function d(a){f.$theme&&b.removeCssClass(f.container,f.$theme);f.$theme=a?a.cssClass:null;f.$theme&&b.addCssClass(f.container,f.$theme);f.$size&&(f.$size.width=0,f.onResize())}var f=this;this.$themeValue=a;!a||
"string"==typeof a?c([a||"ace/theme/textmate"],function(a){d(a)}):d(a)};this.getTheme=function(){return this.$themeValue};this.setStyle=function(a){b.addCssClass(this.container,a)};this.unsetStyle=function(a){b.removeCssClass(this.container,a)};this.destroy=function(){this.$textLayer.destroy();this.$cursorLayer.destroy()}}).call(s.prototype);m.VirtualRenderer=s});
define("ace/layer/gutter",["require","exports","module","pilot/dom"],function(c,m){var j=c("pilot/dom"),b=function(b){this.element=j.createElement("div");this.element.className="ace_layer ace_gutter-layer";b.appendChild(this.element);this.$breakpoints=[];this.$annotations=[];this.$decorations=[]};(function(){this.setSession=function(b){this.session=b};this.addGutterDecoration=function(b,c){this.$decorations[b]||(this.$decorations[b]="");this.$decorations[b]+=" ace_"+c};this.removeGutterDecoration=
function(b,c){this.$decorations[b]=this.$decorations[b].replace(" ace_"+c,"")};this.setBreakpoints=function(b){this.$breakpoints=b.concat()};this.setAnnotations=function(b){this.$annotations=[];for(var c in b)if(b.hasOwnProperty(c)){var g=b[c];if(g)for(var a=this.$annotations[c]={text:[]},f=0;f<g.length;f++){var j=g[f];a.text.push(j.text.replace(/"/g,"&quot;").replace(/'/g,"&#8217;").replace(/</,"&lt;"));j=j.type;"error"==j?a.className="ace_error":"warning"==j&&"ace_error"!=a.className?a.className=
"ace_warning":"info"==j&&!a.className&&(a.className="ace_info")}}};this.update=function(b){this.$config=b;for(var c={className:"",text:[]},g=[],a=b.firstRow,f=b.lastRow,m=this.session.getNextFold(a),v=m?m.start.row:Infinity;;){a>v&&(a=m.end.row+1,v=(m=this.session.getNextFold(a))?m.start.row:Infinity);if(a>f)break;var t=this.$annotations[a]||c;g.push("<div class='ace_gutter-cell",this.$decorations[a]||"",this.$breakpoints[a]?" ace_breakpoint ":" ",t.className,"' title='",t.text.join("\n"),"' style='height:",
b.lineHeight,"px;'>",a+1);for(t=this.session.getRowLength(a)-1;t--;)g.push("</div><div class='ace_gutter-cell' style='height:",b.lineHeight,"px'>&brvbar;</div>");g.push("</div>");a++}this.element=j.setInnerHtml(this.element,g.join(""));this.element.style.height=b.minHeight+"px"}}).call(b.prototype);m.Gutter=b});
define("ace/layer/marker",["require","exports","module","ace/range","pilot/dom"],function(c,m){var j=c("ace/range").Range,b=c("pilot/dom"),d=function(c){this.element=b.createElement("div");this.element.className="ace_layer ace_marker-layer";c.appendChild(this.element)};(function(){this.$padding=0;this.setPadding=function(b){this.$padding=b};this.setSession=function(b){this.session=b};this.setMarkers=function(b){this.markers=b};this.update=function(c){if(c=c||this.config){this.config=c;var d=[],a;
for(a in this.markers){var f=this.markers[a],j=f.range.clipRows(c.firstRow,c.lastRow);if(!j.isEmpty())if(j=j.toScreenRange(this.session),f.renderer){var m=this.$getTop(j.start.row,c),t=Math.round(this.$padding+j.start.column*c.characterWidth);f.renderer(d,j,t,m,c)}else j.isMultiLine()?"text"==f.type?this.drawTextMarker(d,j,f.clazz,c):this.drawMultiLineMarker(d,j,f.clazz,c,f.type):this.drawSingleLineMarker(d,j,f.clazz,c,null,f.type)}this.element=b.setInnerHtml(this.element,d.join(""))}};this.$getTop=
function(b,c){return(b-c.firstRowScreen)*c.lineHeight};this.drawTextMarker=function(b,c,a,d){var m=c.start.row,v=new j(m,c.start.column,m,this.session.getScreenLastRowColumn(m));this.drawSingleLineMarker(b,v,a,d,1,"text");m=c.end.row;v=new j(m,0,m,c.end.column);this.drawSingleLineMarker(b,v,a,d,0,"text");for(m=c.start.row+1;m<c.end.row;m++)v.start.row=m,v.end.row=m,v.end.column=this.session.getScreenLastRowColumn(m),this.drawSingleLineMarker(b,v,a,d,1,"text")};this.drawMultiLineMarker=function(b,
c,a,d,j){var j="background"===j?0:this.$padding,m=d.lineHeight,t=Math.round(d.width-c.start.column*d.characterWidth),u=this.$getTop(c.start.row,d),s=Math.round(j+c.start.column*d.characterWidth);b.push("<div class='",a,"' style='","height:",m,"px;","width:",t,"px;","top:",u,"px;","left:",s,"px;'></div>");u=this.$getTop(c.end.row,d);t=Math.round(c.end.column*d.characterWidth);b.push("<div class='",a,"' style='","height:",m,"px;","width:",t,"px;","top:",u,"px;","left:",j,"px;'></div>");m=(c.end.row-
c.start.row-1)*d.lineHeight;0>m||(u=this.$getTop(c.start.row+1,d),t=d.width,b.push("<div class='",a,"' style='","height:",m,"px;","width:",t,"px;","top:",u,"px;","left:",j,"px;'></div>"))};this.drawSingleLineMarker=function(b,c,a,d,j,m){var t="background"===m?0:this.$padding,u=d.lineHeight,j="background"===m?d.width:Math.round((c.end.column+(j||0)-c.start.column)*d.characterWidth),m=this.$getTop(c.start.row,d),c=Math.round(t+c.start.column*d.characterWidth);b.push("<div class='",a,"' style='","height:",
u,"px;","width:",j,"px;","top:",m,"px;","left:",c,"px;'></div>")}}).call(d.prototype);m.Marker=d});
define("ace/layer/text","require,exports,module,pilot/oop,pilot/dom,pilot/lang,pilot/useragent,pilot/event_emitter".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/dom"),d=c("pilot/lang"),k=c("pilot/useragent"),g=c("pilot/event_emitter").EventEmitter,a=function(a){this.element=b.createElement("div");this.element.className="ace_layer ace_text-layer";this.element.style.width="auto";a.appendChild(this.element);this.$characterSize=this.$measureSizes()||{width:0,height:0};this.$pollSizeChanges()};
(function(){j.implement(this,g);this.EOF_CHAR="&para;";this.EOL_CHAR="&not;";this.TAB_CHAR="&rarr;";this.SPACE_CHAR="&middot;";this.$padding=0;this.setPadding=function(a){this.$padding=a;this.element.style.padding="0 "+a+"px"};this.getLineHeight=function(){return this.$characterSize.height||1};this.getCharacterWidth=function(){return this.$characterSize.width||1};this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==
a.height))this.$characterSize=a,this._dispatchEvent("changeCharaterSize",{data:a})};this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)};this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1};this.$measureSizes=function(){if(!this.$measureNode){var a=this.$measureNode=b.createElement("div"),c=a.style;c.width=c.height="auto";c.left=c.top="-40000px";c.visibility="hidden";c.position="absolute";c.overflow=
"visible";c.whiteSpace="nowrap";a.innerHTML=d.stringRepeat("Xy",1E3);if(document.body)document.body.appendChild(a);else{for(c=this.element.parentNode;!b.hasCssClass(c,"ace_editor");)c=c.parentNode;c.appendChild(a)}}var c=this.$measureNode.style,a=b.computedStyle(this.element),g;for(g in this.$fontStyles)c[g]=a[g];g={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/2E3};return 0==g.width&&0==g.height?null:g};this.setSession=function(a){this.session=a};this.showInvisibles=!1;
this.setShowInvisibles=function(a){if(this.showInvisibles==a)return!1;this.showInvisibles=a;return!0};this.$tabStrings=[];this.$computeTabString=function(){for(var a=this.session.getTabSize(),b=this.$tabStrings=[0],c=1;c<a+1;c++)this.showInvisibles?b.push("<span class='ace_invisible'>"+this.TAB_CHAR+Array(c).join("&#160;")+"</span>"):b.push(Array(c+1).join("&#160;"))};this.updateLines=function(a,c,d){this.$computeTabString();(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a);
this.config=a;for(var g=Math.max(c,a.firstRow),d=Math.min(d,a.lastRow),c=this.element.childNodes,k=0,a=a.firstRow;a<g;a++){var j=this.session.getFoldLine(a);if(j)if(j.containsRow(g))break;else a=j.end.row;k++}for(;g<=d;g++)if(a=c[k++]){var j=[],m=this.session.getTokens(g,g);this.$renderLine(j,g,m[0].tokens,!0);b.setInnerHtml(a,j.join(""));g=this.session.getRowFoldEnd(g)}};this.scrollLines=function(a){this.$computeTabString();var b=this.config;this.config=a;if(!b||b.lastRow<a.firstRow||a.lastRow<b.firstRow)return this.update(a);
var c=this.element;if(b.firstRow<a.firstRow)for(var d=this.session.getFoldedRowCount(b.firstRow,a.firstRow-1);0<d;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);0<d;d--)c.removeChild(c.lastChild);a.firstRow<b.firstRow&&(d=this.$renderLinesFragment(a,a.firstRow,b.firstRow-1),c.firstChild?c.insertBefore(d,c.firstChild):c.appendChild(d));a.lastRow>b.lastRow&&(d=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow),c.appendChild(d))};this.$renderLinesFragment=
function(a,c,d){for(var a=document.createDocumentFragment(),g=this.session.getNextFold(c),k=g?g.start.row:Infinity;;){c>k&&(c=g.end.row+1,k=(g=this.session.getNextFold(c))?g.start.row:Infinity);if(c>d)break;var j=b.createElement("div"),m=[],q=this.session.getTokens(c,c);1==q.length&&this.$renderLine(m,c,q[0].tokens,!1);j.innerHTML=m.join("");for(j=j.childNodes;j.length;)a.appendChild(j[0]);c++}return a};this.update=function(a){this.$computeTabString();this.config=a;for(var c=[],d=a.lastRow,a=a.firstRow,
g=this.session.getNextFold(a),k=g?g.start.row:Infinity;;){a>k&&(a=g.end.row+1,k=(g=this.session.getNextFold(a))?g.start.row:Infinity);if(a>d)break;var j=this.session.getTokens(a,a);1==j.length&&this.$renderLine(c,a,j[0].tokens,!1);a++}this.element=b.setInnerHtml(this.element,c.join(""))};this.$textToken={text:!0,rparen:!0,lparen:!0};this.$renderToken=function(a,b,c,d){var g=this,j=d.replace(/\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,
function(a,c,d,f){if(32==a.charCodeAt(0))return Array(a.length+1).join("&#160;");if("\t"==a)return a=g.session.getScreenTabSize(b+f),b+=a-1,g.$tabStrings[a];if("&"==a)return k.isOldGecko?"&":"&amp;";if("<"==a)return"&lt;";if(a.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/))return g.showInvisibles?"<span class='ace_invisible'>"+Array(a.length+1).join(g.SPACE_CHAR)+"</span>":"&#160;";b+=1;return"<span class='ace_cjk' style='width:"+2*
g.config.characterWidth+"px'>"+a+"</span>"});this.$textToken[c.type]?a.push(j):(c="ace_"+c.type.replace(/\./g," ace_"),a.push("<span class='",c,"'>",j,"</span>"));return b+d.length};this.$renderLineCore=function(a,b,c,d,g){var k=0,j=0,m,x=0;m=!d||0==d.length?Number.MAX_VALUE:d[0];g||a.push("<div class='ace_line' style='height:",this.config.lineHeight,"px","'>");for(var A=0;A<c.length;A++){var B=c[A],r=B.value;if(k+r.length<m)x=this.$renderToken(a,x,B,r),k+=r.length;else{for(;k+r.length>=m;)this.$renderToken(a,
x,B,r.substring(0,m-k)),r=r.substring(m-k),k=m,g||a.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px","'>"),j++,x=0,m=d[j]||Number.MAX_VALUE;0!=r.length&&(k+=r.length,x=this.$renderToken(a,x,B,r))}}this.showInvisibles&&(b!==this.session.getLength()-1?a.push("<span class='ace_invisible'>"+this.EOL_CHAR+"</span>"):a.push("<span class='ace_invisible'>"+this.EOF_CHAR+"</span>"));a.push("</div>")};this.$renderLine=function(a,b,c,d){if(this.session.isRowFolded(b))this.$renderFoldLine(a,
b,c,d);else{var g=this.session.getRowSplitData(b);this.$renderLineCore(a,b,c,g,d)}};this.$renderFoldLine=function(a,b,c,d){var g=this.session.getFoldLine(b),k=[];g.walk(function(a,b,d,f,g){if(a)k.push({type:"fold",value:a});else if(g&&(c=this.session.getTokens(b,b)[0].tokens),0!=c.length)a:{a=c;for(g=b=0;g+a[b].value.length<f;)if(g+=a[b].value.length,b++,b==a.length)break a;if(g!=f){var j=a[b].value.substring(f-g);j.length>d-f&&(j=j.substring(0,d-f));k.push({type:a[b].type,value:j});g=f+j.length;
b+=1}for(;g<d;)j=a[b].value,j.length+g>d&&(j=j.substring(0,d-g)),k.push({type:a[b].type,value:j}),g+=j.length,b+=1}}.bind(this),g.end.row,this.session.getLine(g.end.row).length);this.$renderLineCore(a,b,k,this.session.$useWrapMode?this.session.$wrapData[b]:null,d)};this.destroy=function(){clearInterval(this.$pollSizeChangesTimer);this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode);delete this.$measureNode}}).call(a.prototype);m.Text=a});
define("ace/layer/cursor",["require","exports","module","pilot/dom"],function(c,m){var j=c("pilot/dom"),b=function(b){this.element=j.createElement("div");this.element.className="ace_layer ace_cursor-layer";b.appendChild(this.element);this.cursor=j.createElement("div");this.cursor.className="ace_cursor ace_hidden";this.element.appendChild(this.cursor);this.isVisible=!1};(function(){this.$padding=0;this.setPadding=function(b){this.$padding=b};this.setSession=function(b){this.session=b};this.hideCursor=
function(){this.isVisible=!1;j.addCssClass(this.cursor,"ace_hidden");clearInterval(this.blinkId)};this.showCursor=function(){this.isVisible=!0;j.removeCssClass(this.cursor,"ace_hidden");this.cursor.style.visibility="visible";this.restartTimer()};this.restartTimer=function(){clearInterval(this.blinkId);if(this.isVisible){var b=this.cursor;this.blinkId=setInterval(function(){b.style.visibility="hidden";setTimeout(function(){b.style.visibility="visible"},400)},1E3)}};this.getPixelPosition=function(b){if(!this.config||
!this.session)return{left:0,top:0};var c=this.session.documentToScreenPosition(this.session.selection.getCursor());return{left:Math.round(this.$padding+c.column*this.config.characterWidth),top:(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight}};this.update=function(b){this.config=b;this.pixelPos=this.getPixelPosition(!0);this.cursor.style.left=this.pixelPos.left+"px";this.cursor.style.top=this.pixelPos.top+"px";this.cursor.style.width=b.characterWidth+"px";this.cursor.style.height=b.lineHeight+
"px";b=this.session.getOverwrite();b!=this.overwrite&&((this.overwrite=b)?j.addCssClass(this.cursor,"ace_overwrite"):j.removeCssClass(this.cursor,"ace_overwrite"));this.restartTimer()};this.destroy=function(){clearInterval(this.blinkId)}}).call(b.prototype);m.Cursor=b});
define("ace/scrollbar","require,exports,module,pilot/oop,pilot/dom,pilot/event,pilot/event_emitter".split(","),function(c,m){var j=c("pilot/oop"),b=c("pilot/dom"),d=c("pilot/event"),k=c("pilot/event_emitter").EventEmitter,g=function(a){this.element=b.createElement("div");this.element.className="ace_sb";this.inner=b.createElement("div");this.element.appendChild(this.inner);a.appendChild(this.element);this.width=b.scrollbarWidth();this.element.style.width=(this.width||15)+"px";d.addListener(this.element,
"scroll",this.onScroll.bind(this))};(function(){j.implement(this,k);this.onScroll=function(){this._dispatchEvent("scroll",{data:this.element.scrollTop})};this.getWidth=function(){return this.width};this.setHeight=function(a){this.element.style.height=a+"px"};this.setInnerHeight=function(a){this.inner.style.height=a+"px"};this.setScrollTop=function(a){this.element.scrollTop=a}}).call(g.prototype);m.ScrollBar=g});
define("ace/renderloop",["require","exports","module","pilot/event"],function(c,m){var j=c("pilot/event"),b=function(b){this.onRender=b;this.pending=!1;this.changes=0};(function(){this.schedule=function(b){this.changes|=b;if(!this.pending){this.pending=!0;var c=this;this.setTimeoutZero(function(){c.pending=!1;var b=c.changes;c.changes=0;c.onRender(b)})}};(this.setTimeoutZero=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||
window.msRequestAnimationFrame)?this.setTimeoutZero=this.setTimeoutZero.bind(window):window.postMessage?(this.messageName="zero-timeout-message",this.setTimeoutZero=function(b){if(!this.attached){var c=this;j.addListener(window,"message",function(b){c.callback&&b.data==c.messageName&&(j.stopPropagation(b),c.callback())});this.attached=!0}this.callback=b;window.postMessage(this.messageName,"*")}):this.setTimeoutZero=function(b){setTimeout(b,0)}}).call(b.prototype);m.RenderLoop=b});
define("ace/theme/textmate",["require","exports","module","pilot/dom"],function(c,m){c("pilot/dom").importCssString(".ace-tm .ace_editor {  border: 2px solid rgb(159, 159, 159);}.ace-tm .ace_editor.ace_focus {  border: 2px solid #327fbd;}.ace-tm .ace_gutter {  width: 50px;  background: #e8e8e8;  color: #333;  overflow : hidden;}.ace-tm .ace_gutter-layer {  width: 100%;  text-align: right;}.ace-tm .ace_gutter-layer .ace_gutter-cell {  padding-right: 6px;}.ace-tm .ace_print_margin {  width: 1px;  background: #e8e8e8;}.ace-tm .ace_text-layer {  cursor: text;}.ace-tm .ace_cursor {  border-left: 2px solid black;}.ace-tm .ace_cursor.ace_overwrite {  border-left: 0px;  border-bottom: 1px solid black;}        .ace-tm .ace_line .ace_invisible {  color: rgb(191, 191, 191);}.ace-tm .ace_line .ace_keyword {  color: blue;}.ace-tm .ace_line .ace_constant.ace_buildin {  color: rgb(88, 72, 246);}.ace-tm .ace_line .ace_constant.ace_language {  color: rgb(88, 92, 246);}.ace-tm .ace_line .ace_constant.ace_library {  color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_invalid {  background-color: rgb(153, 0, 0);  color: white;}.ace-tm .ace_line .ace_fold {    background-color: #E4E4E4;    border-radius: 3px;}.ace-tm .ace_line .ace_support.ace_function {  color: rgb(60, 76, 114);}.ace-tm .ace_line .ace_support.ace_constant {  color: rgb(6, 150, 14);}.ace-tm .ace_line .ace_support.ace_type,.ace-tm .ace_line .ace_support.ace_class {  color: rgb(109, 121, 222);}.ace-tm .ace_line .ace_keyword.ace_operator {  color: rgb(104, 118, 135);}.ace-tm .ace_line .ace_string {  color: rgb(3, 106, 7);}.ace-tm .ace_line .ace_comment {  color: rgb(76, 136, 107);}.ace-tm .ace_line .ace_comment.ace_doc {  color: rgb(0, 102, 255);}.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {  color: rgb(128, 159, 191);}.ace-tm .ace_line .ace_constant.ace_numeric {  color: rgb(0, 0, 205);}.ace-tm .ace_line .ace_variable {  color: rgb(49, 132, 149);}.ace-tm .ace_line .ace_xml_pe {  color: rgb(104, 104, 91);}.ace-tm .ace_marker-layer .ace_selection {  background: rgb(181, 213, 255);}.ace-tm .ace_marker-layer .ace_step {  background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {  background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {  margin: -1px 0 0 -1px;  border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active_line {  background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_marker-layer .ace_selected_word {  background: rgb(250, 250, 255);  border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_string.ace_regex {  color: rgb(255, 0, 0)}");
m.cssClass="ace-tm"});define("pilot/environment",["require","exports","module","pilot/settings"],function(c,m){var j=c("pilot/settings").settings;m.create=function(){return{settings:j}}});define("text/cockpit/ui/cli_view.css",[],"#cockpitInput { padding-left: 16px; }.cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }.cptCompletion { padding: 0; position: absolute; z-index: -1000; }.cptCompletion.VALID { background: #FFF; }.cptCompletion.INCOMPLETE { background: #DDD; }.cptCompletion.INVALID { background: #DDD; }.cptCompletion span { color: #FFF; }.cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }.cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }span.cptPrompt { color: #66F; font-weight: bold; }.cptHints {  color: #000;  position: absolute;  border: 1px solid rgba(230, 230, 230, 0.8);  background: rgba(250, 250, 250, 0.8);  -moz-border-radius-topleft: 10px;  -moz-border-radius-topright: 10px;  border-top-left-radius: 10px; border-top-right-radius: 10px;  z-index: 1000;  padding: 8px;  display: none;}.cptFocusPopup { display: block; }.cptFocusPopup.cptNoPopup { display: none; }.cptHints ul { margin: 0; padding: 0 15px; }.cptGt { font-weight: bold; font-size: 120%; }");
define("text/cockpit/ui/request_view.css",[],".cptRowIn {  display: box; display: -moz-box; display: -webkit-box;  box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal;  box-align: center; -moz-box-align: center; -webkit-box-align: center;  color: #333;  background-color: #EEE;  width: 100%;  font-family: consolas, courier, monospace;}.cptRowIn > * { padding-left: 2px; padding-right: 2px; }.cptRowIn > img { cursor: pointer; }.cptHover { display: none; }.cptRowIn:hover > .cptHover { display: block; }.cptRowIn:hover > .cptHover.cptHidden { display: none; }.cptOutTyped {  box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1;  font-weight: bold; color: #000; font-size: 120%;}.cptRowOutput { padding-left: 10px; line-height: 1.2em; }.cptRowOutput strong,.cptRowOutput b,.cptRowOutput th,.cptRowOutput h1,.cptRowOutput h2,.cptRowOutput h3 { color: #000; }.cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }.cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }.cptRowOutput input[type=password],.cptRowOutput input[type=text],.cptRowOutput textarea {  color: #000; font-size: 120%;  background: transparent; padding: 3px;  border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}.cptRowOutput table,.cptRowOutput td,.cptRowOutput th { border: 0; padding: 0 2px; }.cptRowOutput .right { text-align: right; }");
define("text/ace/css/editor.css",[],'.ace_editor {    position: absolute;    overflow: hidden;    font-family: Monaco, "Menlo", "Courier New", monospace;    font-size: 12px;}.ace_scroller {    position: absolute;    overflow-x: scroll;    overflow-y: hidden;}.ace_content {    position: absolute;    box-sizing: border-box;    -moz-box-sizing: border-box;    -webkit-box-sizing: border-box;}.ace_composition {    position: absolute;    background: #555;    color: #DDD;    z-index: 4;}.ace_gutter {    position: absolute;    overflow-x: hidden;    overflow-y: hidden;    height: 100%;}.ace_gutter-cell.ace_error {    background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B");    background-repeat: no-repeat;    background-position: 4px center;}.ace_gutter-cell.ace_warning {    background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03\'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B");    background-repeat: no-repeat;    background-position: 4px center;}.ace_editor .ace_sb {    position: absolute;    overflow-x: hidden;    overflow-y: scroll;    right: 0;}.ace_editor .ace_sb div {    position: absolute;    width: 1px;    left: 0;}.ace_editor .ace_print_margin_layer {    z-index: 0;    position: absolute;    overflow: hidden;    margin: 0;    left: 0;    height: 100%;    width: 100%;}.ace_editor .ace_print_margin {    position: absolute;    height: 100%;}.ace_editor textarea {    position: fixed;    z-index: -1;    width: 10px;    height: 30px;    opacity: 0;    background: transparent;    appearance: none;    -moz-appearance: none;    border: none;    resize: none;    outline: none;    overflow: hidden;}.ace_layer {    z-index: 1;    position: absolute;    overflow: hidden;    white-space: nowrap;    height: 100%;    width: 100%;}.ace_text-layer {    color: black;}.ace_cjk {    display: inline-block;    text-align: center;}.ace_cursor-layer {    z-index: 4;    cursor: text;    /* setting pointer-events: none; here will break mouse wheel scrolling in Safari */}.ace_cursor {    z-index: 4;    position: absolute;}.ace_cursor.ace_hidden {    opacity: 0.2;}.ace_line {    white-space: nowrap;}.ace_marker-layer {    cursor: text;    pointer-events: none;}.ace_marker-layer .ace_step {    position: absolute;    z-index: 3;}.ace_marker-layer .ace_selection {    position: absolute;    z-index: 4;}.ace_marker-layer .ace_bracket {    position: absolute;    z-index: 5;}.ace_marker-layer .ace_active_line {    position: absolute;    z-index: 2;}.ace_marker-layer .ace_selected_word {    position: absolute;    z-index: 6;    box-sizing: border-box;    -moz-box-sizing: border-box;    -webkit-box-sizing: border-box;}.ace_line .ace_fold {    cursor: pointer;}.ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer {  cursor: move;}');
define("text/build/demo/styles.css",[],"html {    height: 100%;    width: 100%;    overflow: hidden;}body {    overflow: hidden;    margin: 0;    padding: 0;    height: 100%;    width: 100%;    font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;    font-size: 12px;    background: rgb(14, 98, 165);    color: white;}#logo {    padding: 15px;    margin-left: 65px;}#editor {    position: absolute;    top:  0px;    left: 280px;    bottom: 0px;    right: 0px;    background: white;}#controls {    padding: 5px;}#controls td {    text-align: right;}#controls td + td {    text-align: left;}#cockpitInput {    position: absolute;    left: 280px;    right: 0px;    bottom: 0;    border: none; outline: none;    font-family: consolas, courier, monospace;    font-size: 120%;}#cockpitOutput {    padding: 10px;    margin: 0 15px;    border: 1px solid #AAA;    -moz-border-radius-topleft: 10px;    -moz-border-radius-topright: 10px;    border-top-left-radius: 4px; border-top-right-radius: 4px;    background: #DDD; color: #000;}");
define("text/build_support/style.css",[],"body {    margin:0;    padding:0;    background-color:#e6f5fc;    }H2, H3, H4 {    font-family:Trebuchet MS;    font-weight:bold;    margin:0;    padding:0;}H2 {    font-size:28px;    color:#263842;    padding-bottom:6px;}H3 {    font-family:Trebuchet MS;    font-weight:bold;    font-size:22px;    color:#253741;    margin-top:43px;    margin-bottom:8px;}H4 {    font-family:Trebuchet MS;    font-weight:bold;    font-size:21px;    color:#222222;    margin-bottom:4px;}P {    padding:13px 0;    margin:0;    line-height:22px;}UL{    line-height : 22px;}PRE{    background : #333;    color : white;    padding : 10px;}#header {    height : 227px;    position:relative;    overflow:hidden;    background: url(images/background.png) repeat-x 0 0;    border-bottom:1px solid #c9e8fa;   }#header .content .signature {    font-family:Trebuchet MS;    font-size:11px;    color:#ebe4d6;    position:absolute;    bottom:5px;    right:42px;    letter-spacing : 1px;}.content {    width:970px;    position:relative;    overflow:hidden;    margin:0 auto;}#header .content {    height:184px;    margin-top:22px;}#header .content .logo {    width  : 282px;    height : 184px;    background:url(images/logo.png) no-repeat 0 0;    position:absolute;    top:0;    left:0;}#header .content .title {    width  : 605px;    height : 58px;    background:url(images/ace.png) no-repeat 0 0;    position:absolute;    top:98px;    left:329px;}#wrapper {    background:url(images/body_background.png) repeat-x 0 0;    min-height:250px;}#wrapper .content {    font-family:Arial;    font-size:14px;    color:#222222;    width:1000px;}#wrapper .content .column1 {    position:relative;    overflow:hidden;    float:left;    width:315px;    margin-right:31px;}#wrapper .content .column2 {    position:relative;    overflow:hidden;    float:left;    width:600px;    padding-top:47px;}.fork_on_github {    width:310px;    height:80px;    background:url(images/fork_on_github.png) no-repeat 0 0;    position:relative;    overflow:hidden;    margin-top:49px;    cursor:pointer;}.fork_on_github:hover {    background-position:0 -80px;}.divider {    height:3px;    background-color:#bedaea;    margin-bottom:3px;}.menu {    padding:23px 0 0 24px;}UL.content-list {    padding:15px;    margin:0;}UL.menu-list {    padding:0;    margin:0 0 20px 0;    list-style-type:none;    line-height : 16px;}UL.menu-list LI {    color:#2557b4;    font-family:Trebuchet MS;    font-size:14px;    padding:7px 0;    border-bottom:1px dotted #d6e2e7;}UL.menu-list LI:last-child {    border-bottom:0;}A {    color:#2557b4;    text-decoration:none;}A:hover {    text-decoration:underline;}P#first{    background : rgba(255,255,255,0.5);    padding : 20px;    font-size : 16px;    line-height : 24px;    margin : 0 0 20px 0;}#footer {    height:40px;    position:relative;    overflow:hidden;    background:url(images/bottombar.png) repeat-x 0 0;    position:relative;    margin-top:40px;}UL.menu-footer {    padding:0;    margin:8px 11px 0 0;    list-style-type:none;    float:right;}UL.menu-footer LI {    color:white;    font-family:Arial;    font-size:12px;    display:inline-block;    margin:0 1px;}UL.menu-footer LI A {    color:#8dd0ff;    text-decoration:none;}UL.menu-footer LI A:hover {    text-decoration:underline;}");
define("text/demo/styles.css",[],"html {    height: 100%;    width: 100%;    overflow: hidden;}body {    overflow: hidden;    margin: 0;    padding: 0;    height: 100%;    width: 100%;    font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;    font-size: 12px;    background: rgb(14, 98, 165);    color: white;}#logo {    padding: 15px;    margin-left: 65px;}#editor {    position: absolute;    top:  0px;    left: 280px;    bottom: 0px;    right: 0px;    background: white;}#controls {    padding: 5px;}#controls td {    text-align: right;}#controls td + td {    text-align: left;}#cockpitInput {    position: absolute;    left: 280px;    right: 0px;    bottom: 0;    border: none; outline: none;    font-family: consolas, courier, monospace;    font-size: 120%;}#cockpitOutput {    padding: 10px;    margin: 0 15px;    border: 1px solid #AAA;    -moz-border-radius-topleft: 10px;    -moz-border-radius-topright: 10px;    border-top-left-radius: 4px; border-top-right-radius: 4px;    background: #DDD; color: #000;}");
define("text/deps/csslint/demos/demo.css",[],'@charset "UTF-8";@import url("booya.css") print,screen;@import "whatup.css" screen;@import "wicked.css";@namespace "http://www.w3.org/1999/xhtml";@namespace svg "http://www.w3.org/2000/svg";li.inline #foo {  background: url("something.png");  display: inline;  padding-left: 3px;  padding-right: 7px;  border-right: 1px dotted #066;}li.last.first {  display: inline;  padding-left: 3px !important;  padding-right: 3px;  border-right: 0px;}@media print {    li.inline {      color: black;    }@charset "UTF-8"; @page {  margin: 10%;  counter-increment: page;  @top-center {    font-family: sans-serif;    font-weight: bold;    font-size: 2em;    content: counter(page);  }}');
define("text/deps/requirejs/dist/ie.css",[],"body .sect {    display: none;}#content ul.index {    list-style: none;}");define("text/deps/requirejs/dist/main.css",[],'@font-face {    font-family: Inconsolata;    src: url("fonts/Inconsolata.ttf");}* {    -moz-box-sizing: border-box;    -webkit-box-sizing: border-box;    box-sizing: border-box;    margin: 0;    padding: 0;}body {    font-size: 12px;    line-height: 21px;    background-color: #fff;    font-family: "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif;    color: #0a0a0a;}#wrapper {    margin: 0;}#grid {    position: fixed;    top: 0;    left: 0;    width: 796px;    background-image: url("i/grid.png");    z-index: 100;}pre {    line-height: 18px;    font-size: 13px;    margin: 7px 0 21px;    padding: 5px 10px;    overflow: auto;    background-color: #fafafa;    border: 1px solid #e6e6e6;    -moz-border-radius: 5px;    -webkit-border-radius: 5px;    border-radius: 5px;    -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);    -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);}/*    typography stuff*/.mono {    font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}.sans {    font-family: "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif;}.serif {    font-family: "Georgia", Times New Roman, Times, serif;}a {    color: #2e87dd;    text-decoration: none;}a:hover {    text-decoration: underline;}/*    navigation*/#navBg {    background-color: #f2f2f2;    background-image: url("i/shadow.png");    background-position: right top;    background-repeat: repeat-y;    width: 220px;    position: fixed;    top: 0;    left: 0;    z-index: 0;}#nav {    background-image: url("i/logo.png");    background-repeat: no-repeat;    background-position: center 10px;    width: 220px;    float: left;    margin: 0;    padding: 150px 20px 0;    font-size: 13px;    text-shadow: 1px 1px #fff;    position: relative;    z-index: 1;}#nav .homeImageLink {    position: absolute;    display: block;    top: 10px;    left: 0;    width: 220px;    height: 138px;}#nav ul {    list-style-type:none;    padding: 0;    margin: 21px 0 0 0;}#nav ul li {    width: 100%;}#nav ul li.version {    text-align: center;    color: #4d4d4d;}#nav h1 {    color: #4d4d4d;    text-align: center;    font-size: 15px;    font-weight: normal;    text-transform: uppercase;    letter-spacing: 3px;}span.spacer {    color: #2e87dd;    margin: 0 3px 0 5px;    background-image: url("i/dot.png");    background-repeat: repeat-x;    background-position: left 13px;}/*    icons*/span.icon {    width: 16px;    display: block;    background-image: url("i/sprite.png");    background-repeat: no-repeat;}span.icon.home {    background-position: center 5px;}span.icon.start {    background-position: center -27px;}span.icon.download {    background-position: center -59px;}span.icon.api {    background-position: center -89px;}span.icon.optimize {    background-position: center -119px;}span.icon.script {    background-position: center -150px;}span.icon.question {    background-position: center -182px;}span.icon.requirement {    background-position: center -214px;}span.icon.history {    background-position: center -247px;}span.icon.help {    background-position: center -279px;}span.icon.blog {    background-position: center -311px;}span.icon.twitter {    background-position: center -343px;}span.icon.git {    background-position: center -375px;}span.icon.fork {    background-position: center -407px;}/*    content*/#content {    margin: 0 0 0 220px;    padding: 0 20px;    background-color: #fff;    font-family: "Georgia", Times New Roman, Times, serif;    position: relative;}#content p {    padding: 7px 0;    color: #333;    font-size: 14px;}#content h1,#content h2,#content h3,#content h4,#content h5 {    font-weight: normal;    padding: 21px 0 7px;}#content h1 {    font-size: 21px;}#content h2 {    padding: 0 0 18px 0;    margin: 0 0 7px 0;    font-weight: normal;    font-size: 21px;    line-height: 24px;    text-align: center;    color: #222;    background-image: url("i/arrow.png");    background-repeat: no-repeat;    background-position: center bottom;    font-family: "Inconsolata", Andale Mono, Monaco, Monospace;    text-transform: uppercase;    letter-spacing: 2px;    text-shadow: 1px 1px 0 #fff;}#content h2 a {    color: #222;}#content h2 a:hover,#content h3 a:hover,#content h4 a:hover {    text-decoration: none;}span.sectionMark {    display: block;    color: #aaa;    text-shadow: 1px 1px 0 #fff;    font-size: 15px;    font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}#content h3 {    font-size: 17px;}#content h4 {    padding-top: 0;    font-size: 15px;}#content h5 {    font-size: 10px;}#content ul {    list-style-type: disc;}#content ul,#content ol {    /* border-left: 1px solid #333; */    color: #333;    font-size: 14px;    list-style-position: outside;    margin: 7px 0 21px 0;    /* padding: 0 0 0 28px; */}#content ul {    font-style: italic;}#content ol {    border: none;    list-style-position: inside;    padding: 0;    font-family: "Georgia", Times New Roman, Times, serif;}#content ul ul,#content ol ol {    border: none;    padding: 0;    margin: 0 0 0 28px;}#content .section {    padding: 48px 0;    background-image: url("i/line.png");    background-repeat: no-repeat;    background-position: center bottom;    width: 576px;    margin: 0 auto;}#content .section .subSection {    padding: 0 0 0 48px;    margin: 28px 0 0 0;    display: block;    border-left: 2px solid #ddd;}#content .section:last-child {    background-image: none;}#content .note {    color: #222;    background-color: #ffff99;    padding: 5px 10px;    margin: 7px 0;    display: inline-block;}/*    page directory*/#content #directory.section {    background-color: #fff;    width: 576px;}#content #directory.section ul ul ul {    margin: 0 0 0 48px;}#content #directory.section ul ul li {    background-image: url("i/sprite.png");    background-repeat: no-repeat;    background-position: left -437px;    padding-left: 18px;    font-style: normal;}#content #directory h1 {    padding: 0 0 65px 0;    margin: 0 0 14px 0;    font-weight: normal;    font-size: 21px;    text-align: center;    text-transform: uppercase;    letter-spacing: 2px;    color: #222;    background-image: url("i/arrow-x.png");    background-repeat: no-repeat;    background-position: center bottom;    font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}#content ul.index {    padding: 0;    background-color: transparent;    border: none;    -moz-box-shadow: none;    font-style: normal;    font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}#content ul.index li {    width: 100%;    font-size: 15px;    color: #333;    padding: 0 0 7px 0;}/*    intro page specific*/#content #intro {    width: 576px;    margin: 0 auto;    padding: 21px 0;}#content #intro p,#content #intro h1 {    font-size: 19px;    line-height: 28px;    color: green;    letter-spacing: 2px;    padding: 0 0 28px 0;}#content #intro p:last-child,#content #intro h1:last-child {    padding: 0;}#content #intro p a {    color: green;    text-decoration: underline;}/*    download page*/#content h4 a.download {    -webkit-border-radius: 5px;    -moz-border-radius: 5px;    background-color: #F2F2F2;    background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #FAFAFA 0%, #F2F2F2 100%);    background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #f2f2f2));    background-position: 7px -58px, center center;    background-repeat: no-repeat, no-repeat;    border: 1px solid #CCCCCC;    color: #333333;    font-size: 12px;    margin: 0 0 0 5px;    padding: 0 10px 0 25px;    text-shadow: 1px 1px 0 #FFFFFF;}/*    footer*/#footer {    color: #4d4d4d;    padding: 65px 20px 20px;    margin: 20px 0 0 220px;    text-align: center;    display: block;    font-size: 13px;    background-image: url("i/arrow-x.png");    background-repeat: no-repeat;    background-position: center top;    background-color: #fff;}#footer .line {    display: block;}#footer .line a {    color: #4d4d4d;    text-decoration: underline;}/*    Pygments manni style*/code {background-color: #fafafa; color: #333;}code .comment {color: green; font-style: italic}code .comment.preproc {color: #099; font-style: normal}code .comment.special {font-weight: bold}code .keyword {color: #069; font-weight: bold}code .keyword.pseudo {font-weight: normal}code .keyword.type {color: #078}code .operator {color: #555}code .operator.word {color: #000; font-weight: bold}code .name.builtin {color: #366}code .name.function {color: #c0f}code .name.class {color: #0a8; font-weight: bold}code .name.namespace {color: #0cf; font-weight: bold}code .name.exception {color: #c00; font-weight: bold}code .name.variable {color: #033}code .name.constant {color: #360}code .name.label {color: #99f}code .name.entity {color: #999; font-weight: bold}code .name.attribute {color: #309}code .name.tag {color: #309; font-weight: bold}code .name.decorator {color: #99f}code .string {color: #c30}code .string.doc {font-style: italic}code .string.interpol {color: #a00}code .string.escape {color: #c30; font-weight: bold}code .string.regex {color: #3aa}code .string.symbol {color: #fc3}code .string.other {color: #c30}code .number {color: #f60}/*    webkit scroll bars*/pre::-webkit-scrollbar {    width: 6px;    height: 6px;}pre::-webkit-scrollbar-button:start:decrement,pre::-webkit-scrollbar-button:end:increment {    display: block;    height: 0;    width: 0;}pre::-webkit-scrollbar-button:vertical:increment,pre::-webkit-scrollbar-button:horizontal:increment {    background-color: transparent;    display: block;    height: 0;    width: 0;}pre::-webkit-scrollbar-track-piece {    -webkit-border-radius: 3px;}pre::-webkit-scrollbar-thumb:vertical {    background-color: #aaa;    -webkit-border-radius: 3px;}pre::-webkit-scrollbar-thumb:horizontal {    background-color: #aaa;    -webkit-border-radius: 3px;}/*    hbox*/.hbox {\tdisplay: -webkit-box;\t-webkit-box-orient: horizontal;\t-webkit-box-align: stretch;\tdisplay: -moz-box;\t-moz-box-orient: horizontal;\t-moz-box-align: stretch;\tdisplay: box;\tbox-orient: horizontal;\tbox-align: stretch;\twidth: 100%;}.hbox > * {\t-webkit-box-flex: 0;\t-moz-box-flex: 0;\tbox-flex: 0;\tdisplay: block;}.vbox {\tdisplay: -webkit-box;\t-webkit-box-orient: vertical;\t-webkit-box-align: stretch;\tdisplay: -moz-box;\t-moz-box-orient: vertical;\t-moz-box-align: stretch;\tdisplay: box;\tbox-orient: vertical;\tbox-align: stretch;}.vbox > * {\t-webkit-box-flex: 0;\t-moz-box-flex: 0;\tbox-flex: 0;\tdisplay: block;}.spacer {\t-webkit-box-flex: 1;\t-moz-box-flex: 1;\tbox-flex: 1;}.reverse {\t-webkit-box-direction: reverse;\t-moz-box-direction: reverse;\tbox-direction: reverse;}.boxFlex0 {\t-webkit-box-flex: 0;\t-moz-box-flex: 0;\tbox-flex: 0;}.boxFlex1, .boxFlex {\t-webkit-box-flex: 1;\t-moz-box-flex: 1;\tbox-flex: 1;}.boxFlex2 {\t-webkit-box-flex: 2;\t-moz-box-flex: 2;\tbox-flex: 2;}.boxGroup1 {\t-webkit-box-flex-group: 1;\t-moz-box-flex-group: 1;\tbox-flex-group: 1;}.boxGroup2 {\t-webkit-box-flex-group: 2;\t-moz-box-flex-group: 2;\tbox-flex-group: 2;}.start {\t-webkit-box-pack: start;\t-moz-box-pack: start;\tbox-pack: start;}.end {\t-webkit-box-pack: end;\t-moz-box-pack: end;\tbox-pack: end;}.center {\t-webkit-box-pack: center;\t-moz-box-pack: center;\tbox-pack: center;}/*    clearfix*/.clearfix:after {\tcontent: ".";\tdisplay: block;\tclear: both;\tvisibility: hidden;\tline-height: 0;\theight: 0;}html[xmlns] .clearfix {\tdisplay: block;}* html .clearfix {\theight: 1%;}');
define("text/lib/ace/css/editor.css",[],'.ace_editor {    position: absolute;    overflow: hidden;    font-family: Monaco, "Menlo", "Courier New", monospace;    font-size: 12px;}.ace_scroller {    position: absolute;    overflow-x: scroll;    overflow-y: hidden;}.ace_content {    position: absolute;    box-sizing: border-box;    -moz-box-sizing: border-box;    -webkit-box-sizing: border-box;}.ace_composition {    position: absolute;    background: #555;    color: #DDD;    z-index: 4;}.ace_gutter {    position: absolute;    overflow-x: hidden;    overflow-y: hidden;    height: 100%;}.ace_gutter-cell.ace_error {    background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B");    background-repeat: no-repeat;    background-position: 4px center;}.ace_gutter-cell.ace_warning {    background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03\'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B");    background-repeat: no-repeat;    background-position: 4px center;}.ace_editor .ace_sb {    position: absolute;    overflow-x: hidden;    overflow-y: scroll;    right: 0;}.ace_editor .ace_sb div {    position: absolute;    width: 1px;    left: 0;}.ace_editor .ace_print_margin_layer {    z-index: 0;    position: absolute;    overflow: hidden;    margin: 0;    left: 0;    height: 100%;    width: 100%;}.ace_editor .ace_print_margin {    position: absolute;    height: 100%;}.ace_editor textarea {    position: fixed;    z-index: -1;    width: 10px;    height: 30px;    opacity: 0;    background: transparent;    appearance: none;    -moz-appearance: none;    border: none;    resize: none;    outline: none;    overflow: hidden;}.ace_layer {    z-index: 1;    position: absolute;    overflow: hidden;    white-space: nowrap;    height: 100%;    width: 100%;}.ace_text-layer {    color: black;}.ace_cjk {    display: inline-block;    text-align: center;}.ace_cursor-layer {    z-index: 4;    cursor: text;    /* setting pointer-events: none; here will break mouse wheel scrolling in Safari */}.ace_cursor {    z-index: 4;    position: absolute;}.ace_cursor.ace_hidden {    opacity: 0.2;}.ace_line {    white-space: nowrap;}.ace_marker-layer {    cursor: text;    pointer-events: none;}.ace_marker-layer .ace_step {    position: absolute;    z-index: 3;}.ace_marker-layer .ace_selection {    position: absolute;    z-index: 4;}.ace_marker-layer .ace_bracket {    position: absolute;    z-index: 5;}.ace_marker-layer .ace_active_line {    position: absolute;    z-index: 2;}.ace_marker-layer .ace_selected_word {    position: absolute;    z-index: 6;    box-sizing: border-box;    -moz-box-sizing: border-box;    -webkit-box-sizing: border-box;}.ace_line .ace_fold {    cursor: pointer;}.ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer {  cursor: move;}');
define("text/node_modules/uglify-js/docstyle.css",[],'html { font-family: "Lucida Grande","Trebuchet MS",sans-serif; font-size: 12pt; }body { max-width: 60em; }.title  { text-align: center; }.todo   { color: red; }.done   { color: green; }.tag    { background-color:lightblue; font-weight:normal }.target { }.timestamp { color: grey }.timestamp-kwd { color: CadetBlue }p.verse { margin-left: 3% }pre {  border: 1pt solid #AEBDCC;  background-color: #F3F5F7;  padding: 5pt;  font-family: monospace;  font-size: 90%;  overflow:auto;}pre.src {  background-color: #eee; color: #112; border: 1px solid #000;}table { border-collapse: collapse; }td, th { vertical-align: top; }dt { font-weight: bold; }div.figure { padding: 0.5em; }div.figure p { text-align: center; }.linenr { font-size:smaller }.code-highlighted {background-color:#ffff00;}.org-info-js_info-navigation { border-style:none; }#org-info-js_console-label { font-size:10px; font-weight:bold;  white-space:nowrap; }.org-info-js_search-highlight {background-color:#ffff00; color:#000000;  font-weight:bold; }sup {  vertical-align: baseline;  position: relative;  top: -0.5em;  font-size: 80%;}sup a:link, sup a:visited {  text-decoration: none;  color: #c00;}sup a:before { content: "["; color: #999; }sup a:after { content: "]"; color: #999; }h1.title { border-bottom: 4px solid #000; padding-bottom: 5px; margin-bottom: 2em; }#postamble {  color: #777;  font-size: 90%;  padding-top: 1em; padding-bottom: 1em; border-top: 1px solid #999;  margin-top: 2em;  padding-left: 2em;  padding-right: 2em;  text-align: right;}#postamble p { margin: 0; }#footnotes { border-top: 1px solid #000; }h1 { font-size: 200% }h2 { font-size: 175% }h3 { font-size: 150% }h4 { font-size: 125% }h1, h2, h3, h4 { font-family: "Bookman",Georgia,"Times New Roman",serif; font-weight: normal; }@media print {  html { font-size: 11pt; }}');
define("text/support/cockpit/lib/cockpit/ui/cli_view.css",[],"#cockpitInput { padding-left: 16px; }.cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }.cptCompletion { padding: 0; position: absolute; z-index: -1000; }.cptCompletion.VALID { background: #FFF; }.cptCompletion.INCOMPLETE { background: #DDD; }.cptCompletion.INVALID { background: #DDD; }.cptCompletion span { color: #FFF; }.cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }.cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }span.cptPrompt { color: #66F; font-weight: bold; }.cptHints {  color: #000;  position: absolute;  border: 1px solid rgba(230, 230, 230, 0.8);  background: rgba(250, 250, 250, 0.8);  -moz-border-radius-topleft: 10px;  -moz-border-radius-topright: 10px;  border-top-left-radius: 10px; border-top-right-radius: 10px;  z-index: 1000;  padding: 8px;  display: none;}.cptFocusPopup { display: block; }.cptFocusPopup.cptNoPopup { display: none; }.cptHints ul { margin: 0; padding: 0 15px; }.cptGt { font-weight: bold; font-size: 120%; }");
define("text/support/cockpit/lib/cockpit/ui/request_view.css",[],".cptRowIn {  display: box; display: -moz-box; display: -webkit-box;  box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal;  box-align: center; -moz-box-align: center; -webkit-box-align: center;  color: #333;  background-color: #EEE;  width: 100%;  font-family: consolas, courier, monospace;}.cptRowIn > * { padding-left: 2px; padding-right: 2px; }.cptRowIn > img { cursor: pointer; }.cptHover { display: none; }.cptRowIn:hover > .cptHover { display: block; }.cptRowIn:hover > .cptHover.cptHidden { display: none; }.cptOutTyped {  box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1;  font-weight: bold; color: #000; font-size: 120%;}.cptRowOutput { padding-left: 10px; line-height: 1.2em; }.cptRowOutput strong,.cptRowOutput b,.cptRowOutput th,.cptRowOutput h1,.cptRowOutput h2,.cptRowOutput h3 { color: #000; }.cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }.cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }.cptRowOutput input[type=password],.cptRowOutput input[type=text],.cptRowOutput textarea {  color: #000; font-size: 120%;  background: transparent; padding: 3px;  border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}.cptRowOutput table,.cptRowOutput td,.cptRowOutput th { border: 0; padding: 0 2px; }.cptRowOutput .right { text-align: right; }");
define("text/tool/Theme.tmpl.css",[],".%cssClass% .ace_editor {  border: 2px solid rgb(159, 159, 159);}.%cssClass% .ace_editor.ace_focus {  border: 2px solid #327fbd;}.%cssClass% .ace_gutter {  width: 50px;  background: #e8e8e8;  color: #333;  overflow : hidden;}.%cssClass% .ace_gutter-layer {  width: 100%;  text-align: right;}.%cssClass% .ace_gutter-layer .ace_gutter-cell {  padding-right: 6px;}.%cssClass% .ace_print_margin {  width: 1px;  background: %printMargin%;}.%cssClass% .ace_scroller {  background-color: %background%;}.%cssClass% .ace_text-layer {  cursor: text;  color: %foreground%;}.%cssClass% .ace_cursor {  border-left: 2px solid %cursor%;}.%cssClass% .ace_cursor.ace_overwrite {  border-left: 0px;  border-bottom: 1px solid %overwrite%;} .%cssClass% .ace_marker-layer .ace_selection {  background: %selection%;}.%cssClass% .ace_marker-layer .ace_step {  background: %step%;}.%cssClass% .ace_marker-layer .ace_bracket {  margin: -1px 0 0 -1px;  border: 1px solid %bracket%;}.%cssClass% .ace_marker-layer .ace_active_line {  background: %active_line%;}       .%cssClass% .ace_invisible {  %invisible%}.%cssClass% .ace_keyword {  %keyword%}.%cssClass% .ace_keyword.ace_operator {  %keyword.operator%}.%cssClass% .ace_constant {  %constant%}.%cssClass% .ace_constant.ace_language {  %constant.language%}.%cssClass% .ace_constant.ace_library {  %constant.library%}.%cssClass% .ace_constant.ace_numeric {  %constant.numeric%}.%cssClass% .ace_invalid {  %invalid%}.%cssClass% .ace_invalid.ace_illegal {  %invalid.illegal%}.%cssClass% .ace_invalid.ace_deprecated {  %invalid.deprecated%}.%cssClass% .ace_support {  %support%}.%cssClass% .ace_support.ace_function {  %support.function%}.%cssClass% .ace_function.ace_buildin {  %function.buildin%}.%cssClass% .ace_string {  %string%}.%cssClass% .ace_string.ace_regexp {  %string.regexp%}.%cssClass% .ace_comment {  %comment%}.%cssClass% .ace_comment.ace_doc {  %comment.doc%}.%cssClass% .ace_comment.ace_doc.ace_tag {  %comment.doc.tag%}.%cssClass% .ace_variable {  %variable%}.%cssClass% .ace_variable.ace_language {  %variable.language%}.%cssClass% .ace_xml_pe {  %xml_pe%}.%cssClass% .ace_collab.ace_user1 {  %collab.user1%   }");
define("text/styles.css",[],"html {    height: 100%;    width: 100%;    overflow: hidden;}body {    overflow: hidden;    margin: 0;    padding: 0;    height: 100%;    width: 100%;    font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;    font-size: 12px;    background: rgb(14, 98, 165);    color: white;}#logo {    padding: 15px;    margin-left: 65px;}#editor {    position: absolute;    top:  0px;    left: 280px;    bottom: 0px;    right: 0px;    background: white;}#controls {    padding: 5px;}#controls td {    text-align: right;}#controls td + td {    text-align: left;}#cockpitInput {    position: absolute;    left: 280px;    right: 0px;    bottom: 0;    border: none; outline: none;    font-family: consolas, courier, monospace;    font-size: 120%;}#cockpitOutput {    padding: 10px;    margin: 0 15px;    border: 1px solid #AAA;    -moz-border-radius-topleft: 10px;    -moz-border-radius-topright: 10px;    border-top-left-radius: 4px; border-top-right-radius: 4px;    background: #DDD; color: #000;}");
require(["ace/ace"],function(c){window.ace=c});
define("ace/mode/json","require,exports,module,pilot/oop,ace/mode/text,ace/tokenizer,ace/mode/json_highlight_rules,ace/mode/matching_brace_outdent,ace/range,ace/mode/behaviour/cstyle".split(","),function(c,m){var j=c("pilot/oop"),b=c("ace/mode/text").Mode,d=c("ace/tokenizer").Tokenizer,k=c("ace/mode/json_highlight_rules").JsonHighlightRules,g=c("ace/mode/matching_brace_outdent").MatchingBraceOutdent;c("ace/range");var a=c("ace/mode/behaviour/cstyle").CstyleBehaviour,f=function(){this.$tokenizer=new d((new k).getRules());
this.$outdent=new g;this.$behaviour=new a};j.inherits(f,b);(function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b);this.$tokenizer.getLineTokens(b,a);"start"==a&&b.match(/^.*[\{\(\[]\s*$/)&&(d+=c);return d};this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)};this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}).call(f.prototype);m.Mode=f});
define("ace/mode/json_highlight_rules","require,exports,module,pilot/oop,pilot/lang,ace/mode/text_highlight_rules".split(","),function(c,m){var j=c("pilot/oop");c("pilot/lang");var b=c("ace/mode/text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",
regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]}};j.inherits(d,b);m.JsonHighlightRules=d});
define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(c,m){var j=c("ace/range").Range,b=function(){};(function(){this.checkOutdent=function(b,c){return/^\s+$/.test(b)?/^\s*\}/.test(c):!1};this.autoOutdent=function(b,c){var g=b.getLine(c).match(/^(\s*\})/);if(!g)return 0;var g=g[1].length,a=b.findMatchingBracket({row:c,column:g});if(!a||a.row==c)return 0;a=this.$getIndent(b.getLine(a.row));b.replace(new j(c,0,c,g-1),a)};this.$getIndent=function(b){return(b=b.match(/^(\s+)/))?
b[1]:""}}).call(b.prototype);m.MatchingBraceOutdent=b});
define("ace/mode/behaviour/cstyle",["require","exports","module","pilot/oop","ace/mode/behaviour"],function(c,m){var j=c("pilot/oop"),b=c("ace/mode/behaviour").Behaviour,d=function(){this.add("braces","insertion",function(b,c,a,d,j){if("{"==j)return b=a.getSelectionRange(),d=d.doc.getTextRange(b),""!==d?{text:"{"+d+"}",selection:!1}:{text:"{}",selection:[1,1]};if("}"==j){if(a=a.getCursorPosition(),c=d.doc.getLine(a.row),j=c.substring(a.column,a.column+1),"}"==j&&null!==d.$findOpeningBracket("}",{column:a.column+
1,row:a.row}))return{text:"",selection:[1,1]}}else if("\n"==j&&(a=a.getCursorPosition(),c=d.doc.getLine(a.row),j=c.substring(a.column,a.column+1),"}"==j)){a=d.findMatchingBracket({row:a.row,column:a.column+1});if(!a)return!1;b=this.getNextLineIndent(b,c.substring(0,c.length-1),d.getTabString());d=this.$getIndent(d.doc.getLine(a.row));return{text:"\n"+b+"\n"+d,selection:[1,b.length,1,b.length]}}return!1});this.add("braces","deletion",function(b,c,a,d,j){b=d.doc.getTextRange(j);return!j.isMultiLine()&&
"{"==b&&"}"==d.doc.getLine(j.start.row).substring(j.end.column,j.end.column+1)?(j.end.column++,j):!1});this.add("parens","insertion",function(b,c,a,d,j){if("("==j)return b=a.getSelectionRange(),d=d.doc.getTextRange(b),""!==d?{text:"("+d+")",selection:!1}:{text:"()",selection:[1,1]};return")"==j&&(b=a.getCursorPosition(),")"==d.doc.getLine(b.row).substring(b.column,b.column+1)&&null!==d.$findOpeningBracket(")",{column:b.column+1,row:b.row}))?{text:"",selection:[1,1]}:!1});this.add("parens","deletion",
function(b,c,a,d,j){b=d.doc.getTextRange(j);return!j.isMultiLine()&&"("==b&&")"==d.doc.getLine(j.start.row).substring(j.start.column+1,j.start.column+2)?(j.end.column++,j):!1});this.add("string_dquotes","insertion",function(b,c,a,d,j){if('"'==j){b=a.getSelectionRange();c=d.doc.getTextRange(b);if(""!==c)return{text:'"'+c+'"',selection:!1};a=a.getCursorPosition();c=d.doc.getLine(a.row);if("\\"==c.substring(a.column-1,a.column))return!1;for(var d=d.getTokens(b.start.row,b.start.row)[0].tokens,j=0,m,
t=-1,u=0;u<d.length;u++){m=d[u];"string"==m.type?t=-1:0>t&&(t=m.value.indexOf('"'));if(m.value.length+j>b.start.column)break;j+=d[u].value.length}if(!m||0>t&&"comment"!==m.type&&("string"!==m.type||b.start.column!==m.value.length+j-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&"string"===m.type&&'"'==c.substring(a.column,a.column+1))return{text:"",selection:[1,1]}}return!1});this.add("string_dquotes","deletion",function(b,c,a,d,j){b=d.doc.getTextRange(j);
return!j.isMultiLine()&&'"'==b&&'"'==d.doc.getLine(j.start.row).substring(j.start.column+1,j.start.column+2)?(j.end.column++,j):!1})};j.inherits(d,b);m.CstyleBehaviour=d});
define("ace/theme/git-hubby",["require","exports","module"],function(c,m){c("pilot/dom").importCssString(".ace--git-hubby .ace_editor{border:2px solid rgb(159, 159, 159);}.ace--git-hubby .ace_editor.ace_focus{border:2px solid #327fbd;}.ace--git-hubby .ace_gutter{width:50px; background:#e8e8e8; color:#333; overflow :hidden;}.ace--git-hubby .ace_gutter-layer{width:100%; text-align:right;}.ace--git-hubby .ace_gutter-layer .ace_gutter-cell{padding-right:6px;}.ace--git-hubby .ace_print_margin{width:1px; background:#e8e8e8;}.ace--git-hubby .ace_scroller{background-color:#FFF;}.ace--git-hubby .ace_text-layer{cursor:text; color:#000000;}.ace--git-hubby .ace_cursor{border-left:2px solid #000000;}.ace--git-hubby .ace_cursor.ace_overwrite{border-left:0px; border-bottom:1px solid #000000;}.ace--git-hubby .ace_marker-layer .ace_selection{background:#BCD5FA;}.ace--git-hubby .ace_marker-layer .ace_step{background:rgb(198, 219, 174);}.ace--git-hubby .ace_marker-layer .ace_bracket{margin:-1px 0 0 -1px; border:1px solid #BFBFBF;}.ace--git-hubby .ace_marker-layer .ace_active_line{background:rgba(0, 0, 0, 0.071);}.ace--git-hubby .ace_invisible{color:#BFBFBF;}.ace--git-hubby .ace_keyword{color:#000000;}.ace--git-hubby .ace_constant.ace_language{color:#000000;}.ace--git-hubby .ace_constant.ace_numeric{color:#009999;}.ace--git-hubby .ace_string{color:#DD1144;}.ace--git-hubby .ace_string.ace_regexp{color:#009926;}.ace--git-hubby .ace_comment{font-style:italic; color:#999988;}.ace--git-hubby .ace_variable.ace_language{color:#108888;}.ace--git-hubby .ace_entity.ace_other.ace_attribute-name{color:#0A8585;}.ace--git-hubby .ace_markup.ace_underline{text-decoration:underline;}");m.cssClass=
"ace--git-hubby"});
function apprise(c,m,j){var b={confirm:!1,verify:!1,input:!1,animate:!1,textOk:"Ok",textCancel:"Cancel",textYes:"Yes",textNo:"No"};if(m)for(var d in b)"undefined"==typeof m[d]&&(m[d]=b[d]);b=$(document).height();d=$(document).width();$("body").append('<div class="appriseOverlay" id="aOverlay"></div>');$(".appriseOverlay").css("height",b).css("width",d).fadeIn(100);$("body").append('<div class="appriseOuter"></div>');$(".appriseOuter").append('<div class="appriseInner"></div>');$(".appriseInner").append(c);
$(".appriseOuter").css("left",($(window).width()-$(".appriseOuter").width())/2+$(window).scrollLeft()+"px");m?m.animate?(c=m.animate,isNaN(c)&&(c=400),$(".appriseOuter").css("top","-200px").show().animate({top:"100px"},c)):$(".appriseOuter").css("top","100px").fadeIn(200):$(".appriseOuter").css("top","100px").fadeIn(200);m&&m.input&&("string"==typeof m.input?$(".appriseInner").append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" value="'+m.input+'" /></div>'):$(".appriseInner").append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" /></div>'),
$(".aTextbox").focus());$(".appriseInner").append('<div class="aButtons"></div>');m?m.confirm||m.input?($(".aButtons").append('<button value="ok">'+m.textOk+"</button>"),$(".aButtons").append('<button value="cancel">'+m.textCancel+"</button>")):m.verify?($(".aButtons").append('<button value="ok">'+m.textYes+"</button>"),$(".aButtons").append('<button value="cancel">'+m.textNo+"</button>")):$(".aButtons").append('<button value="ok">'+m.textOk+"</button>"):$(".aButtons").append('<button value="ok">Ok</button>');
$(document).keydown(function(b){$(".appriseOverlay").is(":visible")&&(13==b.keyCode&&$('.aButtons > button[value="ok"]').click(),27==b.keyCode&&$('.aButtons > button[value="cancel"]').click())});var k=$(".aTextbox").val();k||(k=!1);$(".aTextbox").keyup(function(){k=$(this).val()});$(".aButtons > button").click(function(){$(".appriseOverlay").remove();$(".appriseOuter").remove();if(j){var b=$(this).attr("value");"ok"==b?m?m.input?j(k):j(!0):j(!0):"cancel"==b&&j(!1)}})}
!function(c){var m=function(c,b){this.init("tooltip",c,b)};m.prototype={constructor:m,init:function(j,b,d){this.type=j;this.$element=c(b);this.options=this.getOptions(d);this.enabled=!0;"manual"!=this.options.trigger&&(j="hover"==this.options.trigger?"mouseenter":"focus",b="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(j,this.options.selector,c.proxy(this.enter,this)),this.$element.on(b,this.options.selector,c.proxy(this.leave,this)));this.options.selector?this._options=c.extend({},
this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(j){j=c.extend({},c.fn[this.type].defaults,j,this.$element.data());j.delay&&"number"==typeof j.delay&&(j.delay={show:j.delay,hide:j.delay});return j},enter:function(j){var b=c(j.currentTarget)[this.type](this._options).data(this.type);!b.options.delay||!b.options.delay.show?b.show():(b.hoverState="in",setTimeout(function(){"in"==b.hoverState&&b.show()},b.options.delay.show))},leave:function(j){var b=c(j.currentTarget)[this.type](this._options).data(this.type);
!b.options.delay||!b.options.delay.hide?b.hide():(b.hoverState="out",setTimeout(function(){"out"==b.hoverState&&b.hide()},b.options.delay.hide))},show:function(){var c,b,d,k,g,a,f;if(this.hasContent()&&this.enabled){c=this.tip();this.setContent();this.options.animation&&c.addClass("fade");a="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement;b=/in/.test(a);c.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body);
d=this.getPosition(b);k=c[0].offsetWidth;g=c[0].offsetHeight;switch(b?a.split(" ")[1]:a){case "bottom":f={top:d.top+d.height,left:d.left+d.width/2-k/2};break;case "top":f={top:d.top-g,left:d.left+d.width/2-k/2};break;case "left":f={top:d.top+d.height/2-g/2,left:d.left-k};break;case "right":f={top:d.top+d.height/2-g/2,left:d.left+d.width}}c.css(f).addClass(a).addClass("in")}},setContent:function(){var c=this.tip();c.find(".tooltip-inner").html(this.getTitle());c.removeClass("fade in top bottom left right")},
hide:function(){function j(){var d=setTimeout(function(){b.off(c.support.transition.end).remove()},500);b.one(c.support.transition.end,function(){clearTimeout(d);b.remove()})}var b=this.tip();b.removeClass("in");c.support.transition&&this.$tip.hasClass("fade")?j():b.remove()},fixTitle:function(){var c=this.$element;if(c.attr("title")||"string"!=typeof c.attr("data-original-title"))c.attr("data-original-title",c.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},
getPosition:function(j){return c.extend({},j?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var c;c=this.$element;var b=this.options;c=c.attr("data-original-title")||("function"==typeof b.title?b.title.call(c[0]):b.title);return c=c.toString().replace(/(^\s*|\s*$)/,"")},tip:function(){return this.$tip=this.$tip||c(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.options=
this.$element=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}};c.fn.tooltip=function(j){return this.each(function(){var b=c(this),d=b.data("tooltip"),k="object"==typeof j&&j;d||b.data("tooltip",d=new m(this,k));if("string"==typeof j)d[j]()})};c.fn.tooltip.Constructor=m;c.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",
title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery);
!function(c){var m=function(c,b){this.init("popover",c,b)};m.prototype=c.extend({},c.fn.tooltip.Constructor.prototype,{constructor:m,setContent:function(){var j=this.tip(),b=this.getTitle(),d=this.getContent();j.find(".popover-title")["object"==c.type(b)?"append":"html"](b);j.find(".popover-content > *")["object"==c.type(d)?"append":"html"](d);j.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var c;c=this.$element;
var b=this.options;c=c.attr("data-content")||("function"==typeof b.content?b.content.call(c[0]):b.content);return c=c.toString().replace(/(^\s*|\s*$)/,"")},tip:function(){this.$tip||(this.$tip=c(this.options.template));return this.$tip}});c.fn.popover=function(j){return this.each(function(){var b=c(this),d=b.data("popover"),k="object"==typeof j&&j;d||b.data("popover",d=new m(this,k));if("string"==typeof j)d[j]()})};c.fn.popover.Constructor=m;c.fn.popover.defaults=c.extend({},c.fn.tooltip.defaults,
{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery);
!function(c){function m(){var a=this,b=setTimeout(function(){a.$element.off(c.support.transition.end);j.call(a)},500);this.$element.one(c.support.transition.end,function(){clearTimeout(b);j.call(a)})}function j(){this.$element.hide().trigger("hidden");b.call(this)}function b(a){var b=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var g=c.support.transition&&b;this.$backdrop=c('<div class="modal-backdrop '+b+'" />').appendTo(document.body);"static"!=this.options.backdrop&&
this.$backdrop.click(c.proxy(this.hide,this));g&&this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");g?this.$backdrop.one(c.support.transition.end,a):a()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),c.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(c.support.transition.end,c.proxy(d,this)):d.call(this)):a&&a()}function d(){this.$backdrop.remove();this.$backdrop=null}function k(){var a=this;if(this.isShown&&this.options.keyboard)c(document).on("keyup.dismiss.modal",
function(b){27==b.which&&a.hide()});else this.isShown||c(document).off("keyup.dismiss.modal")}var g=function(a,b){this.options=b;this.$element=c(a).delegate('[data-dismiss="modal"]',"click.dismiss.modal",c.proxy(this.hide,this))};g.prototype={constructor:g,toggle:function(){return this[!this.isShown?"show":"hide"]()},show:function(){var a=this;this.isShown||(c("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),k.call(this),b.call(this,function(){var b=c.support.transition&&
a.$element.hasClass("fade");!a.$element.parent().length&&a.$element.appendTo(document.body);a.$element.show();b&&a.$element[0].offsetWidth;a.$element.addClass("in");b?a.$element.one(c.support.transition.end,function(){a.$element.trigger("shown")}):a.$element.trigger("shown")}))},hide:function(a){a&&a.preventDefault();this.isShown&&(this.isShown=!1,c("body").removeClass("modal-open"),k.call(this),this.$element.trigger("hide").removeClass("in"),c.support.transition&&this.$element.hasClass("fade")?m.call(this):
j.call(this))}};c.fn.modal=function(a){return this.each(function(){var b=c(this),d=b.data("modal"),k=c.extend({},c.fn.modal.defaults,b.data(),"object"==typeof a&&a);d||b.data("modal",d=new g(this,k));if("string"==typeof a)d[a]();else k.show&&d.show()})};c.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0};c.fn.modal.Constructor=g;c(function(){c("body").on("click.modal.data-api",'[data-toggle="modal"]',function(a){var b=c(this),d,g=c(b.attr("data-target")||(d=b.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,
"")),b=g.data("modal")?"toggle":c.extend({},g.data(),b.data());a.preventDefault();g.modal(b)})})}(window.jQuery);jQuery.tablesorter.addParser({id:"size",is:function(c){return c.trim().match(/^\d+(\.\d+)? (Bytes|KB|MB|GB|TB|PB)$/)},format:function(c){c=c.trim().split(" ");return parseFloat(c.shift())*Math.pow(1024,_.indexOf("Bytes,KB,MB,GB,TB,PB".split(","),c.shift()))},type:"numeric"});
window.Genghis={Base:{},Models:{},Collections:{},Views:{},boot:function(c){c+="/"==c.charAt(c.length-1)?"":"/";window.App=new Genghis.Views.App({base_url:c});Backbone.history.start({pushState:!0,root:c})}};
Genghis.Util={route:function(c){return c.replace(Genghis.baseUrl,"").replace(/^\//,"")},parseQuery:function(c){var m={};c.length&&_.each(c.split("&"),function(c){var c=c.split("="),b=c.shift();m[b]=c.join("=")});return m},buildQuery:function(c){return _.map(c,function(c,j){return j+"="+c}).join("&")},humanizeSize:function(c){if(0==c)return"n/a";var m=parseInt(Math.floor(Math.log(c)/Math.log(1024)));return(0==m?c/Math.pow(1024,m):(c/Math.pow(1024,m)).toFixed(1))+" "+"Bytes,KB,MB,GB,TB,PB".split(",")[m]},
humanizeCount:function(c){var m="",c=c||0;1E3<c&&(c=Math.floor(c/1E3),m=" k");1E3<c&&(c=Math.floor(c/1E3),m=" M");return 1E3<c?"...":c+m},escape:function(c){if(c)return(""+c).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},formatJSON:function(c){function m(b,c,a){return'<span class="'+c+'">'+(a?b:null!=b?b.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):"")+"</span>"}function j(c){var g=typeof c,a=[];null==c?
a.push(m("null","null")):c&&c.constructor==Array?a.push(b(c)):"object"==g?a.push(d(c)):"number"==g?a.push(m(c,"num")):"string"==g?(g=m(c,"value"),/^https?:\/\/[^\s]+$/.test(c)&&(g='<a href="'+c+'">'+g+"</a>"),a.push(m('"'+g+'"',"string",!0))):"boolean"==g&&a.push(m(c,"bool"));return a.join("")}function b(b){b=_.map(b,function(b){return"<li>"+j(b)+"</li>"});return b.length?'[<ul class="array">'+b.join("")+"</ul>]":"[ ]"}function d(b){var c=_.detect(b,function(a,b){return _.include(["$id","_id"],b)})&&
_.detect(b,function(a,b){return"$ref"===b}),a="obj"+(c?" db-ref":""),b=_.map(b,function(a,b){return"<li"+(c&&_.include(["$ref","$id","_id","$db"],b)?' class="db-ref-'+b.substring(1)+'"':"")+">"+m(b,"prop")+j(a)+"</li>"});return b.length?'{<ul class="'+a+'">'+b.join("")+"</ul>}":"{ }"}return j(c)},attachCollapsers:function(c,m){$('<div class="collapser">-</div>').prependTo($(".document ul",c).parent("li, .document")).click(function(c){function b(b){var a=$(_.detect(b.find("> li > span.prop"),function(a){return/^\s*(name|title)\s*/i.test($(a).text())})).siblings("span");
0==a.length&&(a=$(_.detect(b.find("> li > span:not(.prop)"),function(a){a=$(a);return a.hasClass("num")||a.hasClass("boolean")||a.hasClass("string")&&64>a.text().length})));return a.length?'<span class="summary">'+a.siblings(".prop").text()+": "+a.text()+"</span>":""}var d=$(this).parent(),k=d.children("ul"),d=d.children(".collapser");k.is(":visible")?(k.hide(),$('<span class="ellipsis"> '+b(k)+" &hellip; </span>").insertBefore(k).click(arguments.callee),d.text("+")):(k.siblings(".ellipsis").remove(),
k.show(),d.text("-"));c.preventDefault()});m&&$(".document > .collapser",c).click()}};
Genghis.Base.RowView=Backbone.View.extend({tagName:"tr",events:{"click a.name":"navigate","click button.destroy":"destroy"},initialize:function(){_.bindAll(this,"render","navigate","remove","destroy");this.model.bind("change",this.render);this.model.bind("destroy",this.remove)},render:function(){$(this.el).html(this.template(this.model));$(this.el).find(".label[title]").tooltip({placement:"below"});this.$(".has-details").popover({html:!0,content:function(){return $(this).siblings(".details").html()},
title:function(){return $(this).siblings(".details").attr("title")},trigger:"manual"}).hoverIntent(function(){$(this).popover("show")},function(){$(this).popover("hide")});return this},navigate:function(c){c.preventDefault();App.Router.navigate(Genghis.Util.route($(c.target).attr("href")),!0)},remove:function(){$(this.el).remove()},destroy:function(){var c=this.model;apprise("Really? There is no undo.",{confirm:!0,textOk:"<strong>Yes</strong>, delete "+(c.has("name")?c.get("name"):"")+" forever"},
function(m){m&&c.destroy()})}});
Genghis.Base.SectionView=Backbone.View.extend({events:{"click .add-form button.show":"showAddForm","click .add-form button.add":"submitAddForm","click .add-form button.cancel":"closeAddForm","keyup .add-form input.name":"updateOnKeyup"},initialize:function(){_.bindAll(this,"render","updateTitle","showAddForm","submitAddForm","closeAddForm","updateOnKeyup","addModel","addModelAndUpdate","addAll");this.model&&this.model.bind("change",this.updateTitle);this.collection&&(this.collection.bind("reset",
this.render),this.collection.bind("add",this.addModelAndUpdate));this.render()},render:function(){$(this.el).html(this.template({}));this.addForm=this.$(".add-form");this.addButton=this.$(".add-form button.add");this.addInput=this.$(".add-form input");this.cancelButton=this.$(".add-form button.cancel");this.addAll();this.$(".help",this.addForm).tooltip();var c={};c[this.$("table thead th").length-1]={sorter:!1};this.$("table").tablesorter({headers:c,textExtraction:function(c){return $(".value",c).text()||
$(c).text()}});this.collection.size()&&this.$("table").trigger("sorton",[[[0,0]]]);return this},updateTitle:function(){this.$("> header h2").text(this.formatTitle(this.model))},showAddForm:function(){this.addForm.removeClass("inactive");this.addInput.focus()},submitAddForm:function(){this.collection.create({name:this.addInput.val()});this.closeAddForm()},closeAddForm:function(){this.addForm.addClass("inactive");this.addInput.val("")},updateOnKeyup:function(c){13==c.keyCode&&this.submitAddForm();27==
c.keyCode&&this.closeAddForm()},addModel:function(c){c=new this.rowView({model:c});this.$("table tbody").append(c.render().el)},addModelAndUpdate:function(c){this.addModel(c);this.$("table").trigger("update")},addAll:function(){this.$("table tbody").html("");this.collection.each(this.addModel);$(this.el).removeClass("spinning")}});Genghis.Models.Alert=Backbone.Model.extend({defaults:{level:"warning",block:!1}});Genghis.Models.Collection=Backbone.Model.extend({});Genghis.Models.Database=Backbone.Model.extend({});
Genghis.Models.Document=Backbone.Model.extend({initialize:function(){_.bindAll(this,"prettyPrint","JSONish");var c=this.get("_id");c&&(this.id=c.$id||c)},parse:function(c){c._id&&(this.id=c._id.$id||c._id);return c},url:function(){var c=(!this.collection||!this.collection.url?null:_.isFunction(this.collection.url)?this.collection.url():this.collection.url)||this.urlRoot||urlError(),c=c.split("?").shift();return this.isNew()?c:c+("/"==c.charAt(c.length-1)?"":"/")+encodeURIComponent(this.id)},prettyPrint:function(){return Genghis.Util.formatJSON(this.toJSON())},
JSONish:function(){return JSON.stringify(this.toJSON(),null,4)}});Genghis.Models.Pagination=Backbone.Model.extend({defaults:{page:1,pages:1,limit:50,count:0,total:0},initialize:function(){_.bindAll(this,"decrementTotal")},decrementTotal:function(){this.set({total:this.get("total")-1,count:this.get("count")-1})}});
Genghis.Models.Selection=Backbone.Model.extend({defaults:{server:null,database:null,collection:null,query:null,page:null},initialize:function(){_.bindAll(this,"select","update","nextPage","previousPage");this.bind("change",this.update);this.Pagination=new Genghis.Models.Pagination;this.Servers=new Genghis.Collections.Servers;this.CurrentServer=new Genghis.Models.Server;this.Databases=new Genghis.Collections.Databases;this.CurrentDatabase=new Genghis.Models.Database;this.Collections=new Genghis.Collections.Collections;
this.CurrentCollection=new Genghis.Models.Collection;this.Documents=new Genghis.Collections.Documents;this.CurrentDocument=new Genghis.Models.Document},select:function(c,m,j,b,d,k){this.set({server:c||null,database:m||null,collection:j||null,document:b||null,query:d||null,page:k||null})},update:function(){var c=this.get("server"),m=this.get("database"),j=this.get("collection"),b=this.get("document"),d=this.get("query"),k=this.get("page"),g=Genghis.baseUrl,a={},g=g+"servers";this.Servers.url=g;this.Servers.fetch();
c?(g=g+"/"+c,this.CurrentServer.url=g,this.CurrentServer.fetch(),g+="/databases",this.Databases.url=g,this.Databases.fetch()):(this.CurrentServer.clear(),this.Databases.reset());m?(g=g+"/"+m,this.CurrentDatabase.url=g,this.CurrentDatabase.fetch(),g+="/collections",this.Collections.url=g,this.Collections.fetch()):(this.CurrentDatabase.clear(),this.Collections.reset());if(j){g=g+"/"+j;this.CurrentCollection.url=g;this.CurrentCollection.fetch();g+="/documents";c="";if(d||k)d&&(a.q=encodeURIComponent(d)),
k&&(a.page=encodeURIComponent(k)),c="?"+Genghis.Util.buildQuery(a);this.Documents.url=g+c;this.Documents.fetch()}else this.CurrentCollection.clear(),this.Documents.reset();b&&(this.CurrentDocument.id=b,this.CurrentDocument.urlRoot=g,this.CurrentDocument.fetch())},nextPage:function(){return 1+(this.get("page")||1)},previousPage:function(){return Math.max(1,(this.get("page")||1)-1)}});Genghis.Models.Server=Backbone.Model.extend({});
Genghis.Collections.Alerts=Backbone.Collection.extend({model:Genghis.Models.Alert,initialize:function(){_.bindAll(this,"handleError")},handleError:function(c){if(0!=c.readyState){try{data=JSON.parse(c.responseText)}catch(m){data={error:c.responseText}}msg=data.error||"<strong>FAIL</strong> An unexpected server error has occurred.";this.add({level:"error",msg:msg,block:!msg.search(/<(p|ul|ol|div)[ >]/)})}}});Genghis.Collections.Collections=Backbone.Collection.extend({model:Genghis.Models.Collection});
Genghis.Collections.Databases=Backbone.Collection.extend({model:Genghis.Models.Database});Genghis.Collections.Documents=Backbone.Collection.extend({model:Genghis.Models.Document,parse:function(c){Genghis.Selection.Pagination.set({page:c.page,pages:c.pages,count:c.documents.length,total:c.count});return c.documents}});Genghis.Collections.Servers=Backbone.Collection.extend({model:Genghis.Models.Server});
Genghis.Views.Alert=Backbone.View.extend({tagName:"div",template:_.template($("#alert-template").html()),events:{"click a.close":"destroy"},initialize:function(){_.bindAll(this,"render","remove","destroy");this.model.bind("change",this.render);this.model.bind("destroy",this.remove)},render:function(){$(this.el).html(this.template(this.model.toJSON()));return this},destroy:function(){this.model.destroy()},remove:function(){$(this.el).remove()}});
Genghis.Views.Alerts=Backbone.View.extend({el:"aside#alerts",initialize:function(){_.bindAll(this,"render","addModel");this.collection.bind("reset",this.render);this.collection.bind("add",this.addModel)},render:function(){$(this.el).html("");return this},addModel:function(c){c=new Genghis.Views.Alert({model:c});$(this.el).append(c.render().el)}});
Genghis.Views.App=Backbone.View.extend({el:"section#genghis",initialize:function(){_.bindAll(this,"showSection");Genghis.baseUrl=this.options.base_url;Genghis.Selection=new Genghis.Models.Selection;Genghis.Alerts=new Genghis.Collections.Alerts;this.NavView=new Genghis.Views.Nav({model:Genghis.Selection});this.AlertsView=new Genghis.Views.Alerts({collection:Genghis.Alerts});this.ServersView=new Genghis.Views.Servers({collection:Genghis.Selection.Servers});this.DatabasesView=new Genghis.Views.Databases({model:Genghis.Selection.CurrentServer,
collection:Genghis.Selection.Databases});this.CollectionsView=new Genghis.Views.Collections({model:Genghis.Selection.CurrentDatabase,collection:Genghis.Selection.Collections});this.DocumentsView=new Genghis.Views.Documents({collection:Genghis.Selection.Documents});this.DocumentView=new Genghis.Views.Document({model:Genghis.Selection.CurrentDocument});this.Router=new Genghis.Router;$(".navbar a.brand").click(function(c){c.preventDefault();App.Router.navigate("",!0)});$.getJSON(Genghis.baseUrl+"check-status").error(Genghis.Alerts.handleError).success(function(c){_.each(c.alerts,
function(c){Genghis.Alerts.add(_.extend({block:!c.msg.search(/<(p|ul|ol|div)[ >]/i)},c))})});Genghis.Selection.change()},showSection:function(c){this.$("section").hide().filter("#"+(_.isArray(c)?c.join(",#"):c)).addClass("spinning").show();$(document).scrollTop(0)}});Genghis.Views.CollectionRow=Genghis.Base.RowView.extend({template:_.template($("#collection-row-template").html())});
Genghis.Views.Collections=Genghis.Base.SectionView.extend({el:"section#collections",template:_.template($("#collections-template").html()),rowView:Genghis.Views.CollectionRow,formatTitle:function(c){return c.id?c.id+" collections":"Collections"}});
Genghis.Views.DatabaseRow=Genghis.Base.RowView.extend({template:_.template($("#database-row-template").html()),destroy:function(){var c=this.model;apprise("<strong>Deleting is forever.</strong><br><br>Type <strong>DELETE</strong> to continue:",{input:!0,textOk:"Delete "+c.get("name")+" forever"},function(m){"DELETE"==m?c.destroy():apprise("<strong>Phew. That was close.</strong><br><br>"+c.get("name")+" was not deleted.")})}});
Genghis.Views.Databases=Genghis.Base.SectionView.extend({el:"section#databases",template:_.template($("#databases-template").html()),rowView:Genghis.Views.DatabaseRow,formatTitle:function(c){return c.id?c.id+" databases":"Databases"}});
Genghis.Views.Document=Backbone.View.extend({el:"section#document",template:_.template($("#document-template").html()),initialize:function(){_.bindAll(this,"render");this.model.bind("change",this.render)},render:function(){var c=new Genghis.Views.DocumentView({model:this.model});$(this.el).removeClass("spinning").html(this.template({model:this.model}));this.$(".content").html(c.render().el);Genghis.Util.attachCollapsers(c.el);return this}});
Genghis.Views.DocumentView=Backbone.View.extend({tagName:"article",template:_.template($("#document-view-template").html()),events:{"click a.id":"navigate","click button.edit":"openEditDialog","click button.save":"saveDocument","click button.cancel":"cancelEdit","click button.destroy":"destroy","click .db-ref-ref .value":"navigateColl","click .db-ref-db .value":"navigateDb","click .db-ref-id .value":"navigateId"},initialize:function(){_.bindAll(this,"render","updateDocument","navigate","openEditDialog",
"cancelEdit","saveDocument","destroy","remove","navigateColl","navigateDb","navigateId");this.model.bind("change",this.updateDocument);this.model.bind("destroy",this.remove)},render:function(){$(this.el).html(this.template(this.model));return this},updateDocument:function(){this.$(".document").html(this.model.prettyPrint()).show();Genghis.Util.attachCollapsers(this.el)},navigate:function(c){c.preventDefault();App.Router.navigate(Genghis.Util.route($(c.target).attr("href")),!0)},navigateDb:function(c){c=
$(c.target).parents(".db-ref").find(".db-ref-db .value").text();App.Router.redirectToDatabase(Genghis.Selection.CurrentServer.id,c)},navigateColl:function(c){var m=$(c.target).parents(".db-ref"),c=m.find(".db-ref-db  .value").text()||Genghis.Selection.CurrentDatabase.id,m=m.find(".db-ref-ref .value").text();App.Router.redirectToCollection(Genghis.Selection.CurrentServer.id,c,m)},navigateId:function(c){var m=$(c.target).parents(".db-ref"),c=m.find(".db-ref-db  .value").text()||Genghis.Selection.CurrentDatabase.id,
j=m.find(".db-ref-ref .value").text()||Genghis.Selection.CurrentCollection.id,m=m.find(".db-ref-id  .value").text();App.Router.redirectToDocument(Genghis.Selection.CurrentServer.id,c,j,m)},openEditDialog:function(){var c=this.$(".well"),m=Math.max(180,Math.min(600,c.height()+40));$(this.el).addClass("edit");c.height(m);c=$('<div id="editor-'+this.model.id+'" class="genghis-document-editor"></div>').text(this.model.JSONish()).appendTo(c).height(m);this.$(".document").hide();this.editor=ace.edit("editor-"+
this.model.id);this.editor.setTheme("ace/theme/git-hubby");this.editor.setHighlightActiveLine(!1);this.editor.setShowPrintMargin(!1);this.editor.renderer.setShowGutter(!1);m=require("ace/mode/json").Mode;this.editor.getSession().setMode(new m);c.resize(_.throttle(this.editor.resize,100))},cancelEdit:function(){$(this.el).removeClass("edit");this.editor.destroy();this.$(".genghis-document-editor").remove();this.updateDocument();this.$(".well").height("auto")},saveDocument:function(){var c=this.model,
m=this.cancelEdit;$.ajax({type:"POST",url:Genghis.baseUrl+"convert-json",data:this.editor.getSession().getValue(),contentType:"application/json",async:!1,success:function(j){c.clear({silent:!0});c.set(j);c.save();m()},dataType:"json"})},destroy:function(){var c=this.model;apprise("Really? There is no undo.",{confirm:!0,textCancel:"Cancel",textOk:"<strong>Yes</strong>, delete document forever"},function(m){m&&(c.destroy(),Genghis.Selection.Pagination.decrementTotal())})},remove:function(){$(this.el).remove()}});
Genghis.Views.Documents=Backbone.View.extend({el:"section#documents",template:_.template($("#documents-template").html()),events:{"click button.add-document":"createDocument"},initialize:function(){_.bindAll(this,"render","addAll","addDocument","createDocument");this.collection.bind("reset",this.addAll,this);this.collection.bind("add",this.addDocument,this);this.render()},render:function(){$(this.el).html(this.template({}));this.HeaderView=new Genghis.Views.DocumentsHeader({model:Genghis.Selection.Pagination});
this.NewDocumentView=new Genghis.Views.NewDocument({collection:Genghis.Selection.Documents});this.PaginationView=new Genghis.Views.Pagination({el:this.$(".pagination-wrapper"),model:Genghis.Selection.Pagination,collection:this.collection});this.addAll();return this},addAll:function(){this.$(".content").html("");this.collection.each(this.addDocument);$(this.el).removeClass("spinning")},addDocument:function(c){c=(new Genghis.Views.DocumentView({model:c})).render();this.$(".content").append(c.el);Genghis.Util.attachCollapsers(c.el,
3<this.collection.size())},createDocument:function(){this.NewDocumentView.show()}});
Genghis.Views.DocumentsHeader=Backbone.View.extend({el:"section#documents > header h2",initialize:function(){_.bindAll(this,"render");this.model.bind("change",this.render)},render:function(){var c,m=this.model.get("count"),j=this.model.get("page");this.model.get("pages");var b=this.model.get("limit"),d=this.model.get("total");c=""+d+" document"+(1!=d?"s":"");if(d!=m){var k=(j-1)*b+1,m=Math.min((j-1)*b+m,d);c=""+k+" - "+m+" of "+c}$(this.el).html(c);return this}});
Genghis.Views.Nav=Backbone.View.extend({el:".navbar nav",template:_.template($("#nav-template").html()),events:{"keypress input#navbar-query":"findDocuments","click a":"navigate"},initialize:function(){_.bindAll(this,"render","toggleSections","updateQuery","findDocuments","navigate");this.model.bind("change",this.toggleSections);this.model.bind("change",this.updateQuery);$("body").bind("click",function(){$(".dropdown-toggle, .menu").parent("li").removeClass("open")});this.render()},render:function(){$(this.el).html(this.template({query:this.model.get("query")}));
this.ServerNavView=new Genghis.Views.NavSection({el:$("li.server",this.el),model:this.model.CurrentServer,collection:this.model.Servers});this.DatabaseNavView=new Genghis.Views.NavSection({el:$("li.database",this.el),model:this.model.CurrentDatabase,collection:this.model.Databases});this.CollectionNavView=new Genghis.Views.NavSection({el:$("li.collection",this.el),model:this.model.CurrentCollection,collection:this.model.Collections});return this},toggleSections:function(){$(this.ServerNavView.el).toggle(null!=
this.model.get("server"));$(this.DatabaseNavView.el).toggle(null!=this.model.get("database"));$(this.CollectionNavView.el).toggle(null!=this.model.get("collection"));this.$("form").toggle(null!=this.model.get("collection"))},updateQuery:function(){var c=(this.model.get("query")||this.model.get("document")||"").trim().replace(/^\{\s*\}$/,"").replace(/^\{\s*(['"]?)_id\1\s*:\s*\{\s*(['"]?)\$id\2\s*:\s*(["'])([a-z\d]+)\3\s*\}\s*\}$/,"$4");this.$("input#navbar-query").val(c)},findDocuments:function(c){13==
c.keyCode&&(c.preventDefault(),c=$(c.target).val(),c=Genghis.Util.route(this.model.CurrentCollection.url+"/documents")+(c.match(/^([a-z\d]+)$/i)?"/"+c:"?"+Genghis.Util.buildQuery({q:encodeURIComponent(c)})),App.Router.navigate(c,!0))},navigate:function(c){c.preventDefault();App.Router.navigate(Genghis.Util.route($(c.target).attr("href")),!0)}});
Genghis.Views.NavSection=Backbone.View.extend({template:_.template($("#nav-section-template").html()),menuTemplate:_.template($("#nav-section-menu-template").html()),initialize:function(){_.bindAll(this,"render");this.model.bind("change",this.updateLink,this);this.collection.bind("reset",this.renderMenu,this);this.render()},render:function(){$(this.el).html(this.template({model:this.model}));this.$(".dropdown-toggle").hoverIntent(function(c){$(c.target).parent("li").addClass("open").siblings("li").removeClass("open")},
$.noop);return this},updateLink:function(){this.$("a.dropdown-toggle").text(this.model.id?this.model.id:"").attr("href",this.model.id?this.model.url:"")},renderMenu:function(){this.$("ul.dropdown-menu").html(this.menuTemplate({model:this.model,collection:this.collection}))}});
Genghis.Views.NewDocument=Backbone.View.extend({el:"#new-document",template:_.template($("#new-document-template").html()),initialize:function(){_.bindAll(this,"render","show","resizeEditor","closeModal","cancelEdit","saveDocument");this.render()},render:function(){this.el=$(this.template()).hide().appendTo("body");this.modal=this.el.modal("hide");this.modal.bind("hide",this.cancelEdit);this.editor=ace.edit("editor-new");this.editor.setTheme("ace/theme/git-hubby");this.editor.setHighlightActiveLine(!1);
this.editor.setShowPrintMargin(!1);this.editor.renderer.setShowGutter(!1);var c=require("ace/mode/json").Mode;this.editor.getSession().setMode(new c);$(window).resize(_.throttle(this.resizeEditor,100));this.modal.bind("shown",this.resizeEditor);this.modal.find("button.cancel").bind("click",this.closeModal);this.modal.find("button.save").bind("click",this.saveDocument);return this},show:function(){this.el.find("#editor-new").height($(window).height()-250);this.editor.getSession().setValue("{\n    \n}\n");
this.modal.css({marginTop:30-this.el.height()/2+"px"}).modal("show")},resizeEditor:function(){this.editor.resize()},closeModal:function(){this.modal.modal("hide")},cancelEdit:function(){this.editor.getSession().setValue("")},saveDocument:function(){var c=this.collection,m=this.closeModal;$.ajax({type:"POST",url:Genghis.baseUrl+"convert-json",data:this.editor.getSession().getValue(),contentType:"application/json",async:!1,success:function(j){c.create(j,{success:function(b){m();App.Router.navigate(Genghis.Util.route(b.url()),
!0)}})},dataType:"json"})}});
Genghis.Views.Pagination=Backbone.View.extend({template:_.template($("#pagination-template").html()),events:{"click a":"navigate"},initialize:function(){_.bindAll(this,"render","urlTemplate","navigate");this.model.bind("change",this.render)},render:function(){if(1==this.model.get("pages"))$(this.el).hide();else{var c=Math.ceil(4.5),m=this.model.get("page"),j=this.model.get("pages"),b=m>c?Math.max(m-(c-3),1):1,d=j-m>c?Math.min(m+(c-3),j):j,c=d==j?Math.max(j-6,1):b,b=1==b?Math.min(c+6,j):d;b>=j-2&&
(b=j);3>=c&&(c=1);var k=this.urlTemplate();$(this.el).html(this.template(_.extend(this.model.toJSON(),{page:m,pages:j,start:c,end:b,prev:Math.max(1,m-1),next:Math.min(m+1,j),url:function(b){return k.replace("{{ page }}",b)}}))).show()}return this},urlTemplate:function(){var c=this.collection.url.split("?"),m=c.shift(),c=Genghis.Util.parseQuery(c.join("?"));return m+"?"+Genghis.Util.buildQuery(_.extend(c,{page:"{{ page }}"}))},navigate:function(c){c.preventDefault();(c=$(c.target).attr("href"))&&App.Router.navigate(Genghis.Util.route(c),
!0)}});Genghis.Views.ServerRow=Genghis.Base.RowView.extend({template:_.template($("#server-row-template").html())});Genghis.Views.Servers=Genghis.Base.SectionView.extend({el:"section#servers",template:_.template($("#servers-template").html()),rowView:Genghis.Views.ServerRow,updateTitle:function(){}});
Genghis.Router=Backbone.Router.extend({routes:{"":"index",servers:"redirectToIndex","servers/:server":"server","servers/:server/databases":"redirectToServer","servers/:server/databases/:database":"database","servers/:server/databases/:database/collections":"redirectToDatabase","servers/:server/databases/:database/collections/:collection":"collection","servers/:server/databases/:database/collections/:collection/documents":"redirectToCollection","servers/:server/databases/:database/collections/:collection/documents?*query":"collectionQuery",
"servers/:server/databases/:database/collections/:collection/documents/:documentId":"document","*path":"notFound"},index:function(){document.title="Genghis";Genghis.Selection.select();App.showSection("servers")},redirectToIndex:function(){this.navigate("",!0)},server:function(c){document.title=this.buildTitle(c);Genghis.Selection.select(c);App.showSection("databases")},redirectToServer:function(c){this.navigate("servers/"+c,!0)},database:function(c,m){document.title=this.buildTitle(c,m);Genghis.Selection.select(c,
m);App.showSection("collections")},redirectToDatabase:function(c,m){this.navigate("servers/"+c+"/databases/"+m,!0)},collection:function(c,m,j){document.title=this.buildTitle(c,m,j);Genghis.Selection.select(c,m,j);App.showSection("documents")},redirectToCollection:function(c,m,j){this.navigate("servers/"+c+"/databases/"+m+"/collections/"+j,!0)},collectionQuery:function(c,m,j,b){document.title=this.buildTitle(c,m,j,"Query results");b=Genghis.Util.parseQuery(b);Genghis.Selection.select(c,m,j,null,b.q,
b.page);App.showSection("documents")},document:function(c,m,j,b){document.title=this.buildTitle(c,m,j,b);Genghis.Selection.select(c,m,j,b);App.showSection("document")},redirectToDocument:function(c,m,j,b){this.navigate("servers/"+c+"/databases/"+m+"/collections/"+j+"/documents/"+b,!0)},notFound:function(c){if(c.replace(/\/$/,"")==Genghis.baseUrl.replace(/\/$/,""))return App.Router.navigate("",!0);document.title=this.buildTitle("404: Not Found");$("section#genghis section#error").html("<header><h2>404: Not Found</h2></header><p>If you think you've reached this message in error, please press <strong>0</strong> to speak with an operator. Otherwise, hang up and try again.</p>");
App.showSection("error")},buildTitle:function(){var c=Array.prototype.slice.call(arguments);return c.length?"Genghis \u2014 "+c.join(" \u203a "):"Genghis"}});

Return current item: Genghis