Refactor input to use Aura/Web, set up minifier for css/js, and reorganize route config format
This commit is contained in:
parent
b7323b93e6
commit
567b6a3a9d
@ -44,5 +44,30 @@ class BaseApiModel extends BaseModel {
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt login via the api
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @return bool
|
||||
*/
|
||||
public function authenticate($username, $password)
|
||||
{
|
||||
$result = $this->client->post('https://hummingbird.me/api/v1/users/authenticate', [
|
||||
'body' => [
|
||||
'username' => $this->config->hummingbird_username,
|
||||
'password' => $password
|
||||
]
|
||||
]);
|
||||
|
||||
if ($result->getStatusCode() === 201)
|
||||
{
|
||||
$_SESSION['hummingbird_anime_token'] = $result->json();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
// End of BaseApiModel.php
|
@ -3,6 +3,8 @@
|
||||
* Base Controller
|
||||
*/
|
||||
|
||||
use Aura\Web\WebFactory;
|
||||
|
||||
/**
|
||||
* Base class for controllers, defines output methods
|
||||
*/
|
||||
@ -14,6 +16,18 @@ class BaseController {
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* Request object
|
||||
* @var object $request
|
||||
*/
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Response object
|
||||
* @var object $response
|
||||
*/
|
||||
protected $response;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@ -21,17 +35,37 @@ class BaseController {
|
||||
{
|
||||
global $config;
|
||||
$this->config = $config;
|
||||
|
||||
$web_factory = new WebFactory([
|
||||
'_GET' => $_GET,
|
||||
'_POST' => $_POST,
|
||||
'_COOKIE' => $_COOKIE,
|
||||
'_SERVER' => $_SERVER,
|
||||
'_FILES' => $_FILES
|
||||
]);
|
||||
$this->request = $web_factory->newRequest();
|
||||
$this->response = $web_factory->newResponse();
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
$this->output();
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a template to HTML, using the provided data
|
||||
* Get the string output of a partial template
|
||||
*
|
||||
* @param string $template
|
||||
* @param array|object $data
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function outputHTML($template, $data=[])
|
||||
public function load_partial($template, $data=[])
|
||||
{
|
||||
if (isset($this->base_data))
|
||||
{
|
||||
$data = array_merge($this->base_data, $data);
|
||||
}
|
||||
|
||||
global $router, $defaultHandler;
|
||||
$route = $router->get_route();
|
||||
$data['route_path'] = ($route) ? $router->get_route()->path : "";
|
||||
@ -54,9 +88,22 @@ class BaseController {
|
||||
$buffer = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
header("Content-type: text/html;charset=utf-8");
|
||||
echo $buffer;
|
||||
die();
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a template to HTML, using the provided data
|
||||
*
|
||||
* @param string $template
|
||||
* @param array|object $data
|
||||
* @return void
|
||||
*/
|
||||
public function outputHTML($template, $data=[])
|
||||
{
|
||||
$buffer = $this->load_partial($template, $data);
|
||||
|
||||
$this->response->content->setType('text/html');
|
||||
$this->response->content->set($buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,8 +119,8 @@ class BaseController {
|
||||
$data = json_encode($data);
|
||||
}
|
||||
|
||||
header("Content-type: application/json");
|
||||
echo $data;
|
||||
$this->response->content->setType('application/json');
|
||||
$this->response->content->set($data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -95,7 +142,21 @@ class BaseController {
|
||||
|
||||
header("HTTP/1.1 {$code} {$codes[$code]}");
|
||||
header("Location: {$url}");
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a message box to the page
|
||||
*
|
||||
* @param string $type
|
||||
* @param string $message
|
||||
* @return string
|
||||
*/
|
||||
public function show_message($type, $message)
|
||||
{
|
||||
return $this->load_partial('message', [
|
||||
'stat_class' => $type,
|
||||
'message' => $message
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -106,7 +167,71 @@ class BaseController {
|
||||
public function logout()
|
||||
{
|
||||
session_destroy();
|
||||
$this->redirect('');
|
||||
$this->response->redirect->seeOther(full_url(''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the login form
|
||||
*
|
||||
* @param string $status
|
||||
* @return void
|
||||
*/
|
||||
public function login($status="")
|
||||
{
|
||||
$message = "";
|
||||
|
||||
if ($status != "")
|
||||
{
|
||||
$message = $this->show_message('error', $status);
|
||||
}
|
||||
|
||||
$this->outputHTML('login', [
|
||||
'title' => 'Api login',
|
||||
'message' => $message
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to log in with the api
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function login_action()
|
||||
{
|
||||
if ($this->model->authenticate($this->config->hummingbird_username, $this->request->post->get('password')))
|
||||
{
|
||||
$this->response->redirect->afterPost(full_url('', $this->base_data['url_type']));
|
||||
$this->output();
|
||||
return;
|
||||
}
|
||||
|
||||
$this->login("Invalid username or password.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the appropriate response
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function output()
|
||||
{
|
||||
// send status
|
||||
header($this->response->status->get(), true, $this->response->status->getCode());
|
||||
|
||||
// headers
|
||||
foreach($this->response->headers->get() as $label => $value)
|
||||
{
|
||||
header("{$label}: {$value}");
|
||||
}
|
||||
|
||||
// cookies
|
||||
foreach($this->response->cookies->get() as $name => $cookie)
|
||||
{
|
||||
setcookie($name, $cookie['value'], $cookie['expire'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httponly']);
|
||||
}
|
||||
|
||||
// send the actual response
|
||||
echo $this->response->content->get();
|
||||
}
|
||||
}
|
||||
// End of BaseController.php
|
@ -119,6 +119,10 @@ class Router {
|
||||
*/
|
||||
private function _setup_routes()
|
||||
{
|
||||
$route_map = [
|
||||
'anime' => 'AnimeController',
|
||||
'manga' => 'MangaController',
|
||||
];
|
||||
$route_type = "anime";
|
||||
|
||||
if ($this->config->manga_host !== "" && strpos($_SERVER['HTTP_HOST'], $this->config->manga_host) !== FALSE)
|
||||
@ -132,39 +136,33 @@ class Router {
|
||||
|
||||
$routes = $this->config->routes;
|
||||
|
||||
// Add routes for the current controller
|
||||
foreach($routes[$route_type] as $name => $route)
|
||||
// Add routes
|
||||
foreach(['common', $route_type] as $key)
|
||||
{
|
||||
$path = $route['path'];
|
||||
unset($route['path']);
|
||||
|
||||
if ( ! array_key_exists('tokens', $route))
|
||||
{
|
||||
$this->router->add($name, $path)->addValues($route);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tokens = $route['tokens'];
|
||||
unset($route['tokens']);
|
||||
|
||||
$this->router->add($name, $path)
|
||||
->addValues($route)
|
||||
->addTokens($tokens);
|
||||
}
|
||||
}
|
||||
|
||||
// Add routes by required http verb
|
||||
foreach(['get', 'post'] as $verb)
|
||||
{
|
||||
$add = "add" . ucfirst($verb);
|
||||
|
||||
foreach($routes[$verb] as $name => $route)
|
||||
foreach($routes[$key] as $name => &$route)
|
||||
{
|
||||
$path = $route['path'];
|
||||
unset($route['path']);
|
||||
|
||||
$this->router->$add($name, $path)
|
||||
->addValues($route);
|
||||
// Prepend the controller to the route parameters
|
||||
array_unshift($route['action'], $route_map[$route_type]);
|
||||
|
||||
// Select the appropriate router method based on the http verb
|
||||
$add = (array_key_exists('verb', $route)) ? "add" . ucfirst(strtolower($route['verb'])) : "addGet";
|
||||
|
||||
if ( ! array_key_exists('tokens', $route))
|
||||
{
|
||||
$this->router->$add($name, $path)->addValues($route);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tokens = $route['tokens'];
|
||||
unset($route['tokens']);
|
||||
|
||||
$this->router->$add($name, $path)
|
||||
->addValues($route)
|
||||
->addTokens($tokens);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,16 @@
|
||||
* Global functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* Check if the user is currently logged in
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_logged_in()
|
||||
{
|
||||
return array_key_exists('hummingbird_anime_token', $_SESSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* HTML selection helper function
|
||||
*
|
||||
@ -28,6 +38,44 @@ function is_not_selected($a, $b)
|
||||
return ($a !== $b) ? 'selected' : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the base url for css/js/images
|
||||
*
|
||||
* @param string $type - (optional) The controller
|
||||
* @return string
|
||||
*/
|
||||
function asset_url(/*$type="anime"*,...*/)
|
||||
{
|
||||
global $config;
|
||||
|
||||
$args = func_get_args();
|
||||
$base_url = rtrim($config->asset_path, '/');
|
||||
|
||||
array_unshift($args, $base_url);
|
||||
|
||||
return implode("/", $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the base url from the config
|
||||
*
|
||||
* @param string $type - (optional) The controller
|
||||
* @return string
|
||||
*/
|
||||
function base_url($type="anime")
|
||||
{
|
||||
global $config;
|
||||
|
||||
$config_path = trim($config->{"{$type}_path"}, "/");
|
||||
$config_host = $config->{"{$type}_host"};
|
||||
|
||||
// Set the appropriate HTTP host
|
||||
$host = ($config_host !== '') ? $config_host : $_SERVER['HTTP_HOST'];
|
||||
$path = ($config_path !== '') ? $config_path : "";
|
||||
|
||||
return implode("/", ['/', $host, $path]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate full url path from the route path based on config
|
||||
*
|
||||
@ -39,7 +87,7 @@ function full_url($path="", $type="anime")
|
||||
{
|
||||
global $config;
|
||||
|
||||
$config_path = $config->{"{$type}_path"};
|
||||
$config_path = trim($config->{"{$type}_path"}, "/");
|
||||
$config_host = $config->{"{$type}_host"};
|
||||
$config_default_route = $config->{"default_{$type}_path"};
|
||||
|
||||
@ -50,6 +98,9 @@ function full_url($path="", $type="anime")
|
||||
// Remove any optional parameters from the route
|
||||
$path = preg_replace('`{/.*?}`i', '', $path);
|
||||
|
||||
// Set the appropriate HTTP host
|
||||
$host = ($config_host !== '') ? $config_host : $_SERVER['HTTP_HOST'];
|
||||
|
||||
// Set the default view
|
||||
if ($path === '')
|
||||
{
|
||||
@ -57,9 +108,6 @@ function full_url($path="", $type="anime")
|
||||
if ($config->default_to_list_view) $path .= '/list';
|
||||
}
|
||||
|
||||
// Set the appropriate HTTP host
|
||||
$host = ($config_host !== '') ? $config_host : $_SERVER['HTTP_HOST'];
|
||||
|
||||
// Set an leading folder
|
||||
if ($config_path !== '')
|
||||
{
|
||||
|
@ -12,6 +12,9 @@ return (object)[
|
||||
// do you wish to show the anime collection tab?
|
||||
'show_anime_collection' => TRUE,
|
||||
|
||||
// path to public directory
|
||||
'asset_path' => '//' . $_SERVER['HTTP_HOST'] . '/public',
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Routing
|
||||
//
|
||||
|
@ -1,10 +1,33 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// Routes on all controllers
|
||||
'common' => [
|
||||
'update' => [
|
||||
'path' => '/update',
|
||||
'action' => ['update'],
|
||||
'verb' => 'post'
|
||||
],
|
||||
'login_form' => [
|
||||
'path' => '/login',
|
||||
'action' => ['login'],
|
||||
'verb' => 'get'
|
||||
],
|
||||
'login_action' => [
|
||||
'path' => '/login',
|
||||
'action' => ['login_action'],
|
||||
'verb' => 'post'
|
||||
],
|
||||
'logout' => [
|
||||
'path' => '/logout',
|
||||
'action' => ['logout']
|
||||
],
|
||||
],
|
||||
// Routes on anime controller
|
||||
'anime' => [
|
||||
'index' => [
|
||||
'path' => '/',
|
||||
'action' => ['AnimeController', 'redirect'],
|
||||
'action' => ['redirect'],
|
||||
'params' => [
|
||||
'url' => '', // Determined by config
|
||||
'code' => '301'
|
||||
@ -12,7 +35,7 @@ return [
|
||||
],
|
||||
'all' => [
|
||||
'path' => '/all{/view}',
|
||||
'action' => ['AnimeController', 'anime_list'],
|
||||
'action' => ['anime_list'],
|
||||
'params' => [
|
||||
'type' => 'all',
|
||||
'title' => WHOSE . " Anime List · All"
|
||||
@ -23,7 +46,7 @@ return [
|
||||
],
|
||||
'watching' => [
|
||||
'path' => '/watching{/view}',
|
||||
'action' => ['AnimeController', 'anime_list'],
|
||||
'action' => ['anime_list'],
|
||||
'params' => [
|
||||
'type' => 'currently-watching',
|
||||
'title' => WHOSE . " Anime List · Watching"
|
||||
@ -34,7 +57,7 @@ return [
|
||||
],
|
||||
'plan_to_watch' => [
|
||||
'path' => '/plan_to_watch{/view}',
|
||||
'action' => ['AnimeController', 'anime_list'],
|
||||
'action' => ['anime_list'],
|
||||
'params' => [
|
||||
'type' => 'plan-to-watch',
|
||||
'title' => WHOSE . " Anime List · Plan to Watch"
|
||||
@ -45,7 +68,7 @@ return [
|
||||
],
|
||||
'on_hold' => [
|
||||
'path' => '/on_hold{/view}',
|
||||
'action' => ['AnimeController', 'anime_list'],
|
||||
'action' => ['anime_list'],
|
||||
'params' => [
|
||||
'type' => 'on-hold',
|
||||
'title' => WHOSE . " Anime List · On Hold"
|
||||
@ -56,7 +79,7 @@ return [
|
||||
],
|
||||
'dropped' => [
|
||||
'path' => '/dropped{/view}',
|
||||
'action' => ['AnimeController', 'anime_list'],
|
||||
'action' => ['anime_list'],
|
||||
'params' => [
|
||||
'type' => 'dropped',
|
||||
'title' => WHOSE . " Anime List · Dropped"
|
||||
@ -67,7 +90,7 @@ return [
|
||||
],
|
||||
'completed' => [
|
||||
'path' => '/completed{/view}',
|
||||
'action' => ['AnimeController', 'anime_list'],
|
||||
'action' => ['anime_list'],
|
||||
'params' => [
|
||||
'type' => 'completed',
|
||||
'title' => WHOSE . " Anime List · Completed"
|
||||
@ -78,7 +101,7 @@ return [
|
||||
],
|
||||
'collection' => [
|
||||
'path' => '/collection{/view}',
|
||||
'action' => ['AnimeController', 'collection'],
|
||||
'action' => ['collection'],
|
||||
'params' => [],
|
||||
'tokens' => [
|
||||
'view' => '[a-z_]+'
|
||||
@ -88,7 +111,7 @@ return [
|
||||
'manga' => [
|
||||
'index' => [
|
||||
'path' => '/',
|
||||
'action' => ['MangaController', 'redirect'],
|
||||
'action' => ['redirect'],
|
||||
'params' => [
|
||||
'url' => '', // Determined by config
|
||||
'code' => '301',
|
||||
@ -97,7 +120,7 @@ return [
|
||||
],
|
||||
'all' => [
|
||||
'path' => '/all{/view}',
|
||||
'action' => ['MangaController', 'manga_list'],
|
||||
'action' => ['manga_list'],
|
||||
'params' => [
|
||||
'type' => 'all',
|
||||
'title' => WHOSE . " Manga List · All"
|
||||
@ -108,7 +131,7 @@ return [
|
||||
],
|
||||
'reading' => [
|
||||
'path' => '/reading{/view}',
|
||||
'action' => ['MangaController', 'manga_list'],
|
||||
'action' => ['manga_list'],
|
||||
'params' => [
|
||||
'type' => 'Reading',
|
||||
'title' => WHOSE . " Manga List · Reading"
|
||||
@ -119,7 +142,7 @@ return [
|
||||
],
|
||||
'plan_to_read' => [
|
||||
'path' => '/plan_to_read{/view}',
|
||||
'action' => ['MangaController', 'manga_list'],
|
||||
'action' => ['manga_list'],
|
||||
'params' => [
|
||||
'type' => 'Plan to Read',
|
||||
'title' => WHOSE . " Manga List · Plan to Read"
|
||||
@ -130,7 +153,7 @@ return [
|
||||
],
|
||||
'on_hold' => [
|
||||
'path' => '/on_hold{/view}',
|
||||
'action' => ['MangaController', 'manga_list'],
|
||||
'action' => ['manga_list'],
|
||||
'params' => [
|
||||
'type' => 'On Hold',
|
||||
'title' => WHOSE . " Manga List · On Hold"
|
||||
@ -141,7 +164,7 @@ return [
|
||||
],
|
||||
'dropped' => [
|
||||
'path' => '/dropped{/view}',
|
||||
'action' => ['MangaController', 'manga_list'],
|
||||
'action' => ['manga_list'],
|
||||
'params' => [
|
||||
'type' => 'Dropped',
|
||||
'title' => WHOSE . " Manga List · Dropped"
|
||||
@ -152,7 +175,7 @@ return [
|
||||
],
|
||||
'completed' => [
|
||||
'path' => '/completed{/view}',
|
||||
'action' => ['MangaController', 'manga_list'],
|
||||
'action' => ['manga_list'],
|
||||
'params' => [
|
||||
'type' => 'Completed',
|
||||
'title' => WHOSE . " Manga List · Completed"
|
||||
@ -160,23 +183,6 @@ return [
|
||||
'tokens' => [
|
||||
'view' => '[a-z_]+'
|
||||
]
|
||||
],
|
||||
],
|
||||
// These routes are limited to a specific HTTP verb
|
||||
'get' => [
|
||||
'login_form' => [
|
||||
'path' => '/login',
|
||||
'action' => ['AnimeController', 'login'],
|
||||
],
|
||||
'logout' => [
|
||||
'path' => '/logout',
|
||||
'action' => ['BaseController', 'logout']
|
||||
]
|
||||
],
|
||||
'post' => [
|
||||
'login_action' => [
|
||||
'path' => '/login',
|
||||
'action' => ['AnimeController', 'login_action'],
|
||||
]
|
||||
]
|
||||
];
|
@ -24,7 +24,7 @@ class AnimeController extends BaseController {
|
||||
* Data to ve sent to all routes in this controller
|
||||
* @var array $base_data
|
||||
*/
|
||||
private $base_data;
|
||||
protected $base_data;
|
||||
|
||||
/**
|
||||
* Route mapping for main navigation
|
||||
@ -55,6 +55,7 @@ class AnimeController extends BaseController {
|
||||
$this->model = new AnimeModel();
|
||||
$this->collection_model = new AnimeCollectionModel();
|
||||
$this->base_data = [
|
||||
'message' => '',
|
||||
'url_type' => 'anime',
|
||||
'other_type' => 'manga',
|
||||
'nav_routes' => $this->nav_routes,
|
||||
@ -79,10 +80,10 @@ class AnimeController extends BaseController {
|
||||
? $this->model->get_list($type)
|
||||
: $this->model->get_all_lists();
|
||||
|
||||
$this->outputHTML('anime/' . $view_map[$view], array_merge($this->base_data, [
|
||||
$this->outputHTML('anime/' . $view_map[$view], [
|
||||
'title' => $title,
|
||||
'sections' => $data
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,35 +100,20 @@ class AnimeController extends BaseController {
|
||||
|
||||
$data = $this->collection_model->get_collection();
|
||||
|
||||
$this->outputHTML('anime/' . $view_map[$view], array_merge($this->base_data, [
|
||||
$this->outputHTML('anime/' . $view_map[$view], [
|
||||
'title' => WHOSE . " Anime Collection",
|
||||
'sections' => $data
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the login form
|
||||
* Update an anime item
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function login()
|
||||
public function update()
|
||||
{
|
||||
$this->outputHTML('login', array_merge($this->base_data, [
|
||||
'title' => 'Api login'
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to log in with the api
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function login_action()
|
||||
{
|
||||
if ($this->model->authenticate($this->config->hummingbird_username, $_POST['password']))
|
||||
{
|
||||
$this->redirect('');
|
||||
}
|
||||
print_r($this->model->update($this->request->post->get()));
|
||||
}
|
||||
}
|
||||
// End of AnimeController.php
|
@ -12,7 +12,14 @@ class MangaController extends BaseController {
|
||||
* The manga model
|
||||
* @var object $model
|
||||
*/
|
||||
private $model;
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* Data to ve sent to all routes in this controller
|
||||
* @var array $base_data
|
||||
*/
|
||||
protected $base_data;
|
||||
|
||||
|
||||
/**
|
||||
* Route mapping for main navigation
|
||||
@ -34,6 +41,21 @@ class MangaController extends BaseController {
|
||||
{
|
||||
parent::__construct();
|
||||
$this->model = new MangaModel();
|
||||
$this->base_data = [
|
||||
'url_type' => 'manga',
|
||||
'other_type' => 'anime',
|
||||
'nav_routes' => $this->nav_routes
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an anime item
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
$this->outputJSON($this->model->update($this->request->post->get()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,10 +78,7 @@ class MangaController extends BaseController {
|
||||
: $this->model->get_all_lists();
|
||||
|
||||
$this->outputHTML('manga/' . $view_map[$view], [
|
||||
'url_type' => 'manga',
|
||||
'other_type' => 'anime',
|
||||
'title' => $title,
|
||||
'nav_routes' => $this->nav_routes,
|
||||
'sections' => $data
|
||||
]);
|
||||
}
|
||||
|
@ -22,28 +22,20 @@ class AnimeModel extends BaseApiModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt login via the api
|
||||
* Update the selected anime
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @return bool
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public function authenticate($username, $password)
|
||||
public function update($data)
|
||||
{
|
||||
$result = $this->client->post('users/authenticate', [
|
||||
'form_params' => [
|
||||
'username' => $this->config->hummingbird_username,
|
||||
'password' => $password
|
||||
]
|
||||
$data['auth_token'] = $_SESSION['hummingbird_anime_token'];
|
||||
|
||||
$result = $this->client->post("libraries/{$data['id']}", [
|
||||
'body' => $data
|
||||
]);
|
||||
|
||||
if ($response->getStatusCode() === 201)
|
||||
{
|
||||
$_SESSION['hummingbird_anime_token'] = $response->json();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return $result->json();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -123,6 +115,52 @@ class AnimeModel extends BaseApiModel {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information about an anime from its id
|
||||
*
|
||||
* @param string $anime_id
|
||||
* @return array
|
||||
*/
|
||||
public function get_anime($anime_id)
|
||||
{
|
||||
$config = [
|
||||
'query' => [
|
||||
'id' => $anime_id
|
||||
]
|
||||
];
|
||||
|
||||
$response = $this->client->get("anime/{$anime_id}", $config);
|
||||
|
||||
return $response->json();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for anime by name
|
||||
*
|
||||
* @param string $name
|
||||
* @return array
|
||||
*/
|
||||
public function search($name)
|
||||
{
|
||||
global $defaultHandler;
|
||||
|
||||
$config = [
|
||||
'query' => [
|
||||
'query' => $name
|
||||
]
|
||||
];
|
||||
|
||||
$response = $this->client->get('search/anime', $config);
|
||||
$defaultHandler->addDataTable('anime_search_response', (array)$response);
|
||||
|
||||
if ($response->getStatusCode() != 200)
|
||||
{
|
||||
throw new Exception($response->getEffectiveUrl());
|
||||
}
|
||||
|
||||
return $response->json();
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually retreive the data from the api
|
||||
*
|
||||
@ -182,52 +220,6 @@ class AnimeModel extends BaseApiModel {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get information about an anime from its id
|
||||
*
|
||||
* @param string $anime_id
|
||||
* @return array
|
||||
*/
|
||||
public function get_anime($anime_id)
|
||||
{
|
||||
$config = [
|
||||
'query' => [
|
||||
'id' => $anime_id
|
||||
]
|
||||
];
|
||||
|
||||
$response = $this->client->get("anime/{$anime_id}", $config);
|
||||
|
||||
return $response->json();
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for anime by name
|
||||
*
|
||||
* @param string $name
|
||||
* @return array
|
||||
*/
|
||||
public function search($name)
|
||||
{
|
||||
global $defaultHandler;
|
||||
|
||||
$config = [
|
||||
'query' => [
|
||||
'query' => $name
|
||||
]
|
||||
];
|
||||
|
||||
$response = $this->client->get('search/anime', $config);
|
||||
$defaultHandler->addDataTable('anime_search_response', (array)$response);
|
||||
|
||||
if ($response->getStatusCode() != 200)
|
||||
{
|
||||
throw new Exception($response->getEffectiveUrl());
|
||||
}
|
||||
|
||||
return $response->json();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the list by title
|
||||
*
|
||||
|
@ -21,6 +21,25 @@ class MangaModel extends BaseApiModel {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the selected manga
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
$id = $data['id'];
|
||||
unset($data['id']);
|
||||
|
||||
$result = $this->client->put("manga_library_entries/{$id}", [
|
||||
'cookies' => ['token' => $_SESSION['hummingbird_anime_token']],
|
||||
'json' => ['manga_library_entry' => $data]
|
||||
]);
|
||||
|
||||
return $result->json();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full set of anime lists
|
||||
*
|
||||
@ -144,6 +163,8 @@ class MangaModel extends BaseApiModel {
|
||||
}
|
||||
}
|
||||
|
||||
//file_put_contents(_dir($this->config->data_cache_path, "manga-processed.json"), json_encode($data, JSON_PRETTY_PRINT));
|
||||
|
||||
return (array_key_exists($status, $data)) ? $data[$status] : $data;
|
||||
}
|
||||
|
||||
|
@ -4,17 +4,24 @@
|
||||
<h2><?= $name ?></h2>
|
||||
<section class="media-wrap">
|
||||
<?php foreach($items as $item): ?>
|
||||
<a href="<?= $item['anime']['url'] ?>">
|
||||
<article class="media" id="a-<?= $item['anime']['id'] ?>">
|
||||
<?php if (is_logged_in()): ?>
|
||||
<button class="plus_one" hidden>+1 Episode</button>
|
||||
<?php endif ?>
|
||||
<img src="<?= $item['anime']['cover_image'] ?>" />
|
||||
<div class="name">
|
||||
<a href="<?= $item['anime']['url'] ?>">
|
||||
<?= $item['anime']['title'] ?>
|
||||
<?= ($item['anime']['alternate_title'] != "") ? "<br />({$item['anime']['alternate_title']})" : ""; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="row">
|
||||
<div class="user_rating">Rating: <?= ($item['rating']['value'] > 0) ? (int)($item['rating']['value'] * 2) : " - " ?> / 10</div>
|
||||
<div class="completion">Episodes: <?= $item['episodes_watched'] ?> / <?= ($item['anime']['episode_count'] != 0) ? $item['anime']['episode_count'] : "-" ?></div>
|
||||
<div class="completion">Episodes:
|
||||
<span class="completed_number"><?= $item['episodes_watched'] ?></span> /
|
||||
<span class="total_number"><?= ($item['anime']['episode_count'] != 0) ? $item['anime']['episode_count'] : "-" ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="media_type"><?= $item['anime']['show_type'] ?></div>
|
||||
@ -23,9 +30,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</main>
|
||||
<?php if (is_logged_in()): ?>
|
||||
<script src="<?= asset_url('js.php?g=edit') ?>"></script>
|
||||
<?php endif ?>
|
||||
|
@ -33,10 +33,4 @@
|
||||
</table>
|
||||
<?php endforeach ?>
|
||||
</main>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="/public/js/table_sorter/jquery.tablesorter.min.js"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('table').tablesorter();
|
||||
});
|
||||
</script>
|
||||
<script src="<?= asset_url('js.php?g=table') ?>"></script>
|
@ -2,8 +2,12 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/public/css/marx.css" />
|
||||
<link rel="stylesheet" href="/public/css/base.css" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="<?= asset_url('css.php?g=base') ?>" />
|
||||
<script>
|
||||
var BASE_URL = "<?= base_url($url_type) ?>";
|
||||
var CONTROLLER = "<?= $url_type ?>";
|
||||
</script>
|
||||
</head>
|
||||
<body class="<?= $url_type ?> list">
|
||||
<h1><?= WHOSE ?> <?= ucfirst($url_type) ?> <?= (strpos($route_path, 'collection') !== FALSE) ? 'Collection' : 'List' ?> [<a href="<?= full_url("", $other_type) ?>"><?= ucfirst($other_type) ?> List</a>]</h1>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<main>
|
||||
<?= $message ?>
|
||||
<aside>
|
||||
<form method="post" action="<?= full_url('/login', $url_type) ?>">
|
||||
<dl>
|
||||
|
@ -4,27 +4,46 @@
|
||||
<h2><?= $name ?></h2>
|
||||
<section class="media-wrap">
|
||||
<?php foreach($items as $item): ?>
|
||||
<a href="https://hummingbird.me/manga/<?= $item['manga']['id'] ?>">
|
||||
<article class="media" id="manga-<?= $item['manga']['id'] ?>">
|
||||
<article class="media" id="manga-<?= $item['id'] ?>">
|
||||
<?php if (is_logged_in()): ?>
|
||||
<div class="edit_buttons" hidden>
|
||||
<button class="plus_one_chapter">+1 Chapter</button>
|
||||
<button class="plus_one_volume">+1 Volume</button>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<img src="<?= $item['manga']['poster_image'] ?>" />
|
||||
<div class="name">
|
||||
<a href="https://hummingbird.me/manga/<?= $item['manga_id'] ?>">
|
||||
<?= $item['manga']['romaji_title'] ?>
|
||||
<?= (isset($item['manga']['english_title'])) ? "<br />({$item['manga']['english_title']})" : ""; ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="media_metadata">
|
||||
<div class="user_rating">Rating: <?= ($item['rating'] > 0) ? (int)($item['rating'] * 2) : '-' ?> / 10</div>
|
||||
<div class="completion">
|
||||
Chapters: <?= $item['chapters_read'] ?> / <?= ($item['manga']['chapter_count'] > 0) ? $item['manga']['chapter_count'] : "-" ?><?php /*<br />
|
||||
Volumes: <?= $item['volumes_read'] ?> / <?= ($item['manga']['volume_count'] > 0) ? $item['manga']['volume_count'] : "-" ?>*/ ?>
|
||||
<div class="table">
|
||||
<div class="row">
|
||||
<div class="user_rating">Rating: <?= ($item['rating'] > 0) ? (int)($item['rating'] * 2) : '-' ?> / 10</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="chapter_completion">
|
||||
Chapters: <span class="chapters_read"><?= $item['chapters_read'] ?></span> /
|
||||
<span class="chapter_count"><?= ($item['manga']['chapter_count'] > 0) ? $item['manga']['chapter_count'] : "-" ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="volume_completion">
|
||||
Volumes: <span class="volumes_read"><?= $item['volumes_read'] ?></span> /
|
||||
<span class="volume_count"><?= ($item['manga']['volume_count'] > 0) ? $item['manga']['volume_count'] : "-" ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php /*<div class="medium_metadata">
|
||||
<div class="media_type"><?= $item['manga']['manga_type'] ?></div>
|
||||
</div> */ ?>
|
||||
</article>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
</section>
|
||||
<?php endforeach ?>
|
||||
</main>
|
||||
</main>
|
||||
<?php if (is_logged_in()): ?>
|
||||
<script src="<?= asset_url('js.php?g=edit') ?>"></script>
|
||||
<?php endif ?>
|
@ -31,10 +31,4 @@
|
||||
</table>
|
||||
<?php endforeach ?>
|
||||
</main>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script src="/public/js/table_sorter/jquery.tablesorter.min.js"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('table').tablesorter();
|
||||
});
|
||||
</script>
|
||||
<script src="<?= asset_url('js.php?g=table') ?>"></script>
|
5
app/views/message.php
Normal file
5
app/views/message.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div class="message <?= $stat_class ?>">
|
||||
<span class="icon"></span>
|
||||
<?= $message ?>
|
||||
<span class="close" onclick="this.parentElement.style.display='none'">x</span>
|
||||
</div>
|
@ -3,6 +3,7 @@
|
||||
"guzzlehttp/guzzle": "5.3.*",
|
||||
"filp/whoops": "1.1.*",
|
||||
"aura/router": "2.2.*",
|
||||
"aura/web": "2.0.*",
|
||||
"aviat4ion/query": "2.0.*",
|
||||
"robmorgan/phinx": "*",
|
||||
"abeautifulsite/simpleimage": "*"
|
||||
|
71
public/config/config.php
Normal file
71
public/config/config.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* Easy Min
|
||||
*
|
||||
* Simple minification for better website performance
|
||||
*
|
||||
* @author Timothy J. Warren
|
||||
* @copyright Copyright (c) 2012
|
||||
* @link https://github.com/aviat4ion/Easy-Min
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// Should we use myth to preprocess?
|
||||
$use_myth = TRUE;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Document Root
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The folder where the index of the website exists. In most situations,
|
||||
| this will not need to be changed.
|
||||
|
|
||||
| If the website is in a folder off of the domain name, like:
|
||||
| http://example.com/website/
|
||||
| you will need to add that folder to the document root.
|
||||
|
|
||||
*/
|
||||
$document_root = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| CSS Folder
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The folder where css files exist, in relation to the document root
|
||||
|
|
||||
*/
|
||||
$css_root = $document_root. '/public/css/';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Path from
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Path fragment to rewrite in css files
|
||||
|
|
||||
*/
|
||||
$path_from = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Path to
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The path fragment replacement for the css files
|
||||
|
|
||||
*/
|
||||
$path_to = '';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JS Folder
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The folder where javascript files exist, in relation to the document root
|
||||
|
|
||||
*/
|
||||
$js_root = $document_root. '/public/js/';
|
36
public/config/css_groups.php
Normal file
36
public/config/css_groups.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Easy Min
|
||||
*
|
||||
* Simple minification for better website performance
|
||||
*
|
||||
* @author Timothy J. Warren
|
||||
* @copyright Copyright (c) 2012
|
||||
* @link https://github.com/aviat4ion/Easy-Min
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* This is the config array for css files to concatenate and minify
|
||||
*/
|
||||
return [
|
||||
/*-----
|
||||
Css
|
||||
-----*/
|
||||
|
||||
/*
|
||||
For each group create an array like so
|
||||
|
||||
'my_group' => array(
|
||||
'path/to/css/file1.css',
|
||||
'path/to/css/file2.css'
|
||||
),
|
||||
*/
|
||||
'base' => [
|
||||
'marx.css',
|
||||
'base.css'
|
||||
]
|
||||
];
|
||||
// End of css_groups.php
|
40
public/config/js_groups.php
Normal file
40
public/config/js_groups.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Easy Min
|
||||
*
|
||||
* Simple minification for better website performance
|
||||
*
|
||||
* @author Timothy J. Warren
|
||||
* @copyright Copyright (c) 2012
|
||||
* @link https://github.com/aviat4ion/Easy-Min
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* This is the config array for javascript files to concatenate and minify
|
||||
*/
|
||||
return [
|
||||
/*
|
||||
For each group create an array like so
|
||||
|
||||
'my_group' => array(
|
||||
'path/to/js/file1.js',
|
||||
'path/to/js/file2.js'
|
||||
),
|
||||
*/
|
||||
'table' => [
|
||||
'lib/jquery.min.js',
|
||||
'lib/table_sorter/jquery.tablesorter.min.js',
|
||||
'sort_tables.js'
|
||||
],
|
||||
'edit' => [
|
||||
'lib/jquery.min.js',
|
||||
'show_message.js',
|
||||
'anime_edit.js',
|
||||
'manga_edit.js'
|
||||
]
|
||||
];
|
||||
|
||||
// End of js_groups.php
|
138
public/css.php
Normal file
138
public/css.php
Normal file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* Easy Min
|
||||
*
|
||||
* Simple minification for better website performance
|
||||
*
|
||||
* @author Timothy J. Warren
|
||||
* @copyright Copyright (c) 2012
|
||||
* @link https://github.com/aviat4ion/Easy-Min
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//Get config files
|
||||
require('./config/config.php');
|
||||
|
||||
//Include the css groups
|
||||
$groups = require("./config/css_groups.php");
|
||||
|
||||
//Function for compressing the CSS as tightly as possible
|
||||
function compress($buffer) {
|
||||
|
||||
//Remove CSS comments
|
||||
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
|
||||
|
||||
//Remove tabs, spaces, newlines, etc.
|
||||
$buffer = preg_replace('`\s+`', ' ', $buffer);
|
||||
$replace = array(
|
||||
' )' => ')',
|
||||
') ' => ')',
|
||||
' }' => '}',
|
||||
'} ' => '}',
|
||||
' {' => '{',
|
||||
'{ ' => '{',
|
||||
', ' => ',',
|
||||
': ' => ':',
|
||||
'; ' => ';',
|
||||
);
|
||||
|
||||
//Eradicate every last space!
|
||||
$buffer = trim(strtr($buffer, $replace));
|
||||
$buffer = str_replace('{ ', '{', $buffer);
|
||||
$buffer = str_replace('} ', '}', $buffer);
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
function get_last_modifed()
|
||||
{
|
||||
global $groups, $css_root;
|
||||
|
||||
$modified = array();
|
||||
|
||||
// Get all the css files, and concatenate them together
|
||||
if(isset($groups[$_GET['g']]))
|
||||
{
|
||||
foreach($groups[$_GET['g']] as $file)
|
||||
{
|
||||
$new_file = realpath($css_root.$file);
|
||||
$modified[] = filemtime($new_file);
|
||||
}
|
||||
}
|
||||
|
||||
//Add myth css file for last modified check
|
||||
$modified[] = filemtime(realpath("css/base.myth.css"));
|
||||
|
||||
//Add this page for last modified check
|
||||
$modified[] = filemtime(__FILE__);
|
||||
|
||||
//Get the latest modified date
|
||||
rsort($modified);
|
||||
$last_modified = $modified[0];
|
||||
|
||||
return $last_modified;
|
||||
}
|
||||
|
||||
function get_css()
|
||||
{
|
||||
global $groups, $path_from, $path_to, $css_root;
|
||||
|
||||
$css = '';
|
||||
|
||||
if(isset($groups[$_GET['g']]))
|
||||
{
|
||||
foreach($groups[$_GET['g']] as $file)
|
||||
{
|
||||
$new_file = realpath($css_root.$file);
|
||||
$css .= file_get_contents($new_file);
|
||||
$modified[] = filemtime($new_file);
|
||||
}
|
||||
}
|
||||
|
||||
// If not in debug mode, minify the css
|
||||
if( ! isset($_GET['debug']))
|
||||
{
|
||||
$css = compress($css);
|
||||
}
|
||||
|
||||
// Correct paths that have changed due to concatenation
|
||||
// based on rules in the config file
|
||||
$css = strtr($css, $path_from, $path_to);
|
||||
|
||||
return $css;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
$last_modified = get_last_modifed();
|
||||
|
||||
$requested_time=(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
|
||||
? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])
|
||||
: 0;
|
||||
|
||||
// Send 304 when not modified for faster response
|
||||
if($last_modified === $requested_time)
|
||||
{
|
||||
header("HTTP/1.1 304 Not Modified");
|
||||
exit();
|
||||
}
|
||||
else // Re-compress after running myth
|
||||
{
|
||||
$cmd = "/usr/bin/myth -c {$css_root}base.myth.css {$css_root}base.css";
|
||||
exec($cmd);
|
||||
}
|
||||
|
||||
//This GZIPs the CSS for transmission to the user
|
||||
//making file size smaller and transfer rate quicker
|
||||
ob_start("ob_gzhandler");
|
||||
|
||||
header("Content-Type: text/css; charset=utf8");
|
||||
header("Cache-control: public, max-age=691200, must-revalidate");
|
||||
header("Last-Modified: ".gmdate('D, d M Y H:i:s', $last_modified)." GMT");
|
||||
header("Expires: ".gmdate('D, d M Y H:i:s', (filemtime(basename(__FILE__)) + 691200))." GMT");
|
||||
|
||||
echo get_css();
|
||||
|
||||
ob_end_flush();
|
||||
//End of css.php
|
File diff suppressed because one or more lines are too long
@ -3,6 +3,7 @@
|
||||
--title-overlay: rgba(0, 0, 0, 0.45);
|
||||
--text-color: #ffffff;
|
||||
--normal-padding: 0.25em;
|
||||
--radius: 0.5em;
|
||||
}
|
||||
|
||||
body {
|
||||
@ -27,27 +28,22 @@ tbody > tr:nth-child(odd) {
|
||||
}
|
||||
|
||||
.round_all {
|
||||
border-radius:0.5em;
|
||||
border-radius:var(--radius);
|
||||
}
|
||||
|
||||
.round_top {
|
||||
border-radius: 0;
|
||||
border-top-right-radius:0.5em;
|
||||
border-top-left-radius:0.5em;
|
||||
border-top-right-radius:var(--radius);
|
||||
border-top-left-radius:var(--radius);
|
||||
}
|
||||
|
||||
.round_bottom {
|
||||
border-radius: 0;
|
||||
border-bottom-right-radius:0.5em;
|
||||
border-bottom-left-radius:0.5em;
|
||||
border-bottom-right-radius:var(--radius);
|
||||
border-bottom-left-radius:var(--radius);
|
||||
}
|
||||
|
||||
.media-wrap {
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
align-content: space-around;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
text-align:center;
|
||||
margin:0 auto;
|
||||
}
|
||||
@ -62,6 +58,11 @@ tbody > tr:nth-child(odd) {
|
||||
margin: var(--normal-padding);
|
||||
}
|
||||
|
||||
button {
|
||||
background:rgba(255,255,255,0.65);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.name,
|
||||
.media_metadata > div,
|
||||
.medium_metadata > div,
|
||||
@ -102,6 +103,12 @@ tbody > tr:nth-child(odd) {
|
||||
background:rgba(0,0,0,0.75);
|
||||
}
|
||||
|
||||
.media:hover > button[hidden],
|
||||
.media:hover > .edit_buttons[hidden]
|
||||
{
|
||||
display:block;
|
||||
}
|
||||
|
||||
.media > .name > a {
|
||||
text-align:justify;
|
||||
background:none;
|
||||
@ -109,16 +116,68 @@ tbody > tr:nth-child(odd) {
|
||||
text-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Message boxes
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
.message{
|
||||
position:relative;
|
||||
margin:0.5em auto;
|
||||
padding:0.5em;
|
||||
width:95%;
|
||||
}
|
||||
|
||||
.message .close{
|
||||
width:1em;
|
||||
height:1em;
|
||||
position:absolute;
|
||||
right:0.5em;
|
||||
top:0.5em;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
line-height:1em;
|
||||
}
|
||||
|
||||
.message .close:hover {
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.message .icon{
|
||||
left:0.5em;
|
||||
top:0.5em;
|
||||
margin-right:1em;
|
||||
}
|
||||
|
||||
.message.error{
|
||||
border:1px solid #924949;
|
||||
background: #f3e6e6;
|
||||
}
|
||||
|
||||
.message.success{
|
||||
border:1px solid #1f8454;
|
||||
background: #70dda9;
|
||||
}
|
||||
|
||||
.message.info{
|
||||
border:1px solid #bfbe3a;
|
||||
background: #FFFFCC;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Anime-list-specific styles
|
||||
------------------------------------------------------------------------------*/
|
||||
.anime .name {
|
||||
.anime .name, .manga .name {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding:0.5em 0.6em;;
|
||||
padding:0.5em 0;
|
||||
}
|
||||
|
||||
.anime .name > a {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding:0.5em 1em;
|
||||
}
|
||||
|
||||
.anime .media_type,
|
||||
.anime .airing_status,
|
||||
.anime .user_rating,
|
||||
@ -129,25 +188,24 @@ tbody > tr:nth-child(odd) {
|
||||
}
|
||||
|
||||
|
||||
.anime .table {
|
||||
.anime .table, .manga .table {
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
left:0;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.anime .row {
|
||||
.anime .row, .manga .row {
|
||||
width:100%;
|
||||
background: var(--title-overlay);
|
||||
display:table;
|
||||
display: flex;
|
||||
align-content:center;
|
||||
align-content: space-around;
|
||||
justify-content: space-around;
|
||||
text-align:center;
|
||||
padding:0 inherit;
|
||||
}
|
||||
|
||||
.anime .row > div {
|
||||
.anime .row > div, .manga .row > div {
|
||||
font-size:0.8em;
|
||||
display:flex-item;
|
||||
align-self:center;
|
||||
@ -155,15 +213,15 @@ tbody > tr:nth-child(odd) {
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
.anime .media > button.plus_one {
|
||||
position:absolute;
|
||||
top: calc(50% - (43px / 2));
|
||||
left: calc(50% - (97px / 2 + 18));
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Manga-list-specific styles
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
.manga .media > .name {
|
||||
padding:0.5em;
|
||||
margin:1em;
|
||||
}
|
||||
|
||||
.manga .media {
|
||||
border:1px solid #ddd;
|
||||
width:200px;
|
||||
@ -171,7 +229,8 @@ tbody > tr:nth-child(odd) {
|
||||
margin:0.25em;
|
||||
}
|
||||
|
||||
.manga .media_metadata {
|
||||
padding: var(--normal-padding);
|
||||
margin: 0.75em;
|
||||
.manga .media > .edit_buttons {
|
||||
position:absolute;
|
||||
top: calc(50% - (85px / 2));
|
||||
left: calc(50% - (163px / 2));
|
||||
}
|
||||
|
182
public/js.php
Normal file
182
public/js.php
Normal file
@ -0,0 +1,182 @@
|
||||
<?php
|
||||
/**
|
||||
* Easy Min
|
||||
*
|
||||
* Simple minification for better website performance
|
||||
*
|
||||
* @author Timothy J. Warren
|
||||
* @copyright Copyright (c) 2012
|
||||
* @link https://github.com/aviat4ion/Easy-Min
|
||||
* @license http://philsturgeon.co.uk/code/dbad-license
|
||||
*/
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//Get config files
|
||||
require('./config/config.php');
|
||||
|
||||
//Include the js groups
|
||||
$groups_file = "./config/js_groups.php";
|
||||
$groups = require($groups_file);
|
||||
|
||||
//The name of this file
|
||||
$this_file = basename(__FILE__);
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Get Files
|
||||
*
|
||||
* Concatenates the javascript files for the current
|
||||
* group as a string
|
||||
* @return string
|
||||
*/
|
||||
function get_files()
|
||||
{
|
||||
global $groups, $js_root;
|
||||
|
||||
$js = '';
|
||||
|
||||
foreach($groups[$_GET['g']] as $file)
|
||||
{
|
||||
$new_file = realpath($js_root.$file);
|
||||
$js .= file_get_contents($new_file);
|
||||
}
|
||||
|
||||
return $js;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Google Min
|
||||
*
|
||||
* Minifies javascript using google's closure compiler
|
||||
* @param string $new_file
|
||||
* @return string
|
||||
*/
|
||||
function google_min($new_file)
|
||||
{
|
||||
//Get a much-minified version from Google's closure compiler
|
||||
$ch = curl_init('http://closure-compiler.appspot.com/compile');
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, 'output_info=compiled_code&output_format=text&compilation_level=SIMPLE_OPTIMIZATIONS&js_code=' . urlencode($new_file));
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return $output;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//Creative rewriting of /g/groupname to ?g=groupname
|
||||
$pi = $_SERVER['PATH_INFO'];
|
||||
$pia = explode('/', $pi);
|
||||
|
||||
$pia_len = count($pia);
|
||||
$i = 1;
|
||||
|
||||
while($i < $pia_len)
|
||||
{
|
||||
$j = $i+1;
|
||||
$j = (isset($pia[$j])) ? $j : $i;
|
||||
|
||||
$_GET[$pia[$i]] = $pia[$j];
|
||||
|
||||
$i = $j + 1;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
$js = '';
|
||||
$modified = array();
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//Aggregate the last modified times of the files
|
||||
if(isset($groups[$_GET['g']]))
|
||||
{
|
||||
$cache_file = $js_root.'cache/'.$_GET['g'];
|
||||
|
||||
foreach($groups[$_GET['g']] as $file)
|
||||
{
|
||||
$new_file = realpath($js_root.$file);
|
||||
$modified[] = filemtime($new_file);
|
||||
}
|
||||
|
||||
//Add this page too, as well as the groups file
|
||||
$modified[] = filemtime($this_file);
|
||||
$modified[] = filemtime($groups_file);
|
||||
|
||||
$cache_modified = 0;
|
||||
|
||||
//Add the cache file
|
||||
if(is_file($cache_file))
|
||||
{
|
||||
$cache_modified = filemtime($cache_file);
|
||||
}
|
||||
}
|
||||
else //Nothing to display? Just exit
|
||||
{
|
||||
die("You must specify a group that exists");
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//Get the latest modified date
|
||||
rsort($modified);
|
||||
$last_modified = $modified[0];
|
||||
|
||||
$requested_time=(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
|
||||
? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])
|
||||
: time();
|
||||
|
||||
// If the browser's cached version is up to date,
|
||||
// don't resend the file
|
||||
if($last_modified === $requested_time)
|
||||
{
|
||||
header("HTTP/1.1 304 Not Modified");
|
||||
exit();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//Determine what to do: rebuild cache, send files as is, or send cache.
|
||||
if($cache_modified < $last_modified)
|
||||
{
|
||||
$js = google_min(get_files());
|
||||
$cs = file_put_contents($cache_file, $js);
|
||||
|
||||
//Make sure cache file gets created/updated
|
||||
if($cs === FALSE)
|
||||
{
|
||||
die("Cache file was not created. Make sure you have the correct folder permissions.");
|
||||
}
|
||||
}
|
||||
// If debug is set, just concatenate
|
||||
else if(isset($_GET['debug']))
|
||||
{
|
||||
$js = get_files();
|
||||
}
|
||||
// Otherwise, send the cached file
|
||||
else
|
||||
{
|
||||
$js = file_get_contents($cache_file);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
//This GZIPs the js for transmission to the user
|
||||
//making file size smaller and transfer rate quicker
|
||||
ob_start("ob_gzhandler");
|
||||
|
||||
// Set important caching headers
|
||||
header("Content-Type: application/javascript; charset=utf8");
|
||||
header("Cache-control: public, max-age=691200, must-revalidate");
|
||||
header("Last-Modified: ".gmdate('D, d M Y H:i:s', $last_modified)." GMT");
|
||||
header("Expires: ".gmdate('D, d M Y H:i:s', (filemtime($this_file) + 691200))." GMT");
|
||||
|
||||
echo $js;
|
||||
|
||||
ob_end_flush();
|
||||
//end of js.php
|
52
public/js/anime_edit.js
Normal file
52
public/js/anime_edit.js
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Javascript for editing anime, if logged in
|
||||
*/
|
||||
(function($, undefined){
|
||||
|
||||
if (CONTROLLER !== "anime") return;
|
||||
|
||||
// Action to increment episode count
|
||||
$(".media button.plus_one").on("click", function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var this_sel = $(this);
|
||||
var parent_sel = $(this).closest("article");
|
||||
var self = this;
|
||||
|
||||
var watched_count = parseInt(parent_sel.find('.completed_number').text(), 10);
|
||||
var total_count = parseInt(parent_sel.find('.total_number').text(), 10);
|
||||
var title = parent_sel.find('.name a').text();
|
||||
|
||||
// Setup the update data
|
||||
var data = {
|
||||
id: this_sel.parent('article').attr('id').replace('a-', ''),
|
||||
increment_episodes: true
|
||||
};
|
||||
|
||||
// If the episode count is 0, and incremented,
|
||||
// change status to currently watching
|
||||
if (isNaN(watched_count) || watched_count === 0)
|
||||
{
|
||||
data.status = "currently-watching";
|
||||
}
|
||||
|
||||
// If you increment at the last episode, mark as completed
|
||||
if (( ! isNaN(watched_count)) && (watched_count + 1) === total_count)
|
||||
{
|
||||
delete data.increment_episodes;
|
||||
data.status = "completed";
|
||||
}
|
||||
|
||||
// okay, lets actually make some changes!
|
||||
$.post(BASE_URL + 'update', data, function(res) {
|
||||
if (res.status === 'completed')
|
||||
{
|
||||
parent_sel.hide();
|
||||
}
|
||||
|
||||
add_message('success', "Sucessfully updated " + title);
|
||||
parent_sel.find('.completed_number').text(++watched_count);
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
170
public/js/cache/edit
vendored
Normal file
170
public/js/cache/edit
vendored
Normal file
@ -0,0 +1,170 @@
|
||||
!function(n,L){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?L(n,!0):function(n){if(!n.document)throw Error("jQuery requires a window with a document");return L(n)}:L(n)}("undefined"!=typeof window?window:this,function(n,L){function z(a){var b="length"in a&&a.length,c=d.type(a);return"function"===c||d.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&0<b&&b-1 in a}function qa(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){return!!b.call(a,
|
||||
d,a)!==c});if(b.nodeType)return d.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(Jb.test(b))return d.filter(b,a,c);b=d.filter(b,a)}return d.grep(a,function(a){return 0<=ra.call(b,a)!==c})}function D(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function S(a){var b=Va[a]={};return d.each(a.match(Q)||[],function(a,d){b[d]=!0}),b}function H(){u.removeEventListener("DOMContentLoaded",H,!1);n.removeEventListener("load",H,!1);d.ready()}function P(){Object.defineProperty(this.cache={},0,
|
||||
{get:function(){return{}}});this.expando=d.expando+P.uid++}function Wa(a,b,c){var e;if(void 0===c&&1===a.nodeType)if(e="data-"+b.replace(Kb,"-$1").toLowerCase(),c=a.getAttribute(e),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:Lb.test(c)?d.parseJSON(c):c}catch(f){}C.set(a,b,c)}else c=void 0;return c}function W(){return!0}function X(){return!1}function Xa(){try{return u.activeElement}catch(a){}}function Ya(a,b){return d.nodeName(a,"table")&&d.nodeName(11!==b.nodeType?
|
||||
b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Mb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Nb(a){var b=Ob.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){for(var c=0,d=a.length;d>c;c++)r.set(a[c],"globalEval",!b||r.get(b[c],"globalEval"))}function Za(a,b){var c,e,f,g,h,k;if(1===b.nodeType){if(r.hasData(a)&&(c=r.access(a),e=r.set(b,c),k=c.events))for(f in delete e.handle,
|
||||
e.events={},k)for(c=0,e=k[f].length;e>c;c++)d.event.add(b,f,k[f][c]);C.hasData(a)&&(g=C.access(a),h=d.extend({},g),C.set(b,h))}}function A(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&d.nodeName(a,b)?d.merge([a],c):c}function $a(a,b){var c,e=d(b.createElement(a)).appendTo(b.body),f=n.getDefaultComputedStyle&&(c=n.getDefaultComputedStyle(e[0]))?c.display:d.css(e[0],"display");return e.detach(),f}function Ha(a){var b=
|
||||
u,c=ab[a];return c||(c=$a(a,b),"none"!==c&&c||(sa=(sa||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=sa[0].contentDocument,b.write(),b.close(),c=$a(a,b),sa.detach()),ab[a]=c),c}function T(a,b,c){var e,f,g,h,k=a.style;return c=c||ta(a),c&&(h=c.getPropertyValue(b)||c[b]),c&&(""!==h||d.contains(a.ownerDocument,a)||(h=d.style(a,b)),Ia.test(h)&&bb.test(b)&&(e=k.width,f=k.minWidth,g=k.maxWidth,k.minWidth=k.maxWidth=k.width=h,h=c.width,k.width=e,k.minWidth=f,k.maxWidth=
|
||||
g)),void 0!==h?h+"":h}function cb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function db(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,f=eb.length;f--;)if(b=eb[f]+c,b in a)return b;return d}function fb(a,b,c){return(a=Pb.exec(b))?Math.max(0,a[1]-(c||0))+(a[2]||"px"):b}function gb(a,b,c,e,f){b=c===(e?"border":"content")?4:"width"===b?1:0;for(var g=0;4>b;b+=2)"margin"===c&&(g+=d.css(a,c+Y[b],!0,f)),e?("content"===c&&(g-=d.css(a,
|
||||
"padding"+Y[b],!0,f)),"margin"!==c&&(g-=d.css(a,"border"+Y[b]+"Width",!0,f))):(g+=d.css(a,"padding"+Y[b],!0,f),"padding"!==c&&(g+=d.css(a,"border"+Y[b]+"Width",!0,f)));return g}function hb(a,b,c){var e=!0,f="width"===b?a.offsetWidth:a.offsetHeight,g=ta(a),h="border-box"===d.css(a,"boxSizing",!1,g);if(0>=f||null==f){if(f=T(a,b,g),(0>f||null==f)&&(f=a.style[b]),Ia.test(f))return f;e=h&&(v.boxSizingReliable()||f===a.style[b]);f=parseFloat(f)||0}return f+gb(a,b,c||(h?"border":"content"),e,g)+"px"}function ib(a,
|
||||
b){for(var c,e,f,g=[],h=0,k=a.length;k>h;h++)e=a[h],e.style&&(g[h]=r.get(e,"olddisplay"),c=e.style.display,b?(g[h]||"none"!==c||(e.style.display=""),""===e.style.display&&ha(e)&&(g[h]=r.access(e,"olddisplay",Ha(e.nodeName)))):(f=ha(e),"none"===c&&f||r.set(e,"olddisplay",f?c:d.css(e,"display"))));for(h=0;k>h;h++)e=a[h],e.style&&(b&&"none"!==e.style.display&&""!==e.style.display||(e.style.display=b?g[h]||"":"none"));return a}function E(a,b,c,d,f){return new E.prototype.init(a,b,c,d,f)}function jb(){return setTimeout(function(){Z=
|
||||
void 0}),Z=d.now()}function ua(a,b){var c,d=0,f={height:a};for(b=b?1:0;4>d;d+=2-b)c=Y[d],f["margin"+c]=f["padding"+c]=a;return b&&(f.opacity=f.width=a),f}function kb(a,b,c){for(var d,f=(ia[b]||[]).concat(ia["*"]),g=0,h=f.length;h>g;g++)if(d=f[g].call(c,b,a))return d}function Qb(a,b){var c,e,f,g,h;for(c in a)if(e=d.camelCase(c),f=b[e],g=a[c],d.isArray(g)&&(f=g[1],g=a[c]=g[0]),c!==e&&(a[e]=g,delete a[c]),h=d.cssHooks[e],h&&"expand"in h)for(c in g=h.expand(g),delete a[e],g)c in a||(a[c]=g[c],b[c]=f);
|
||||
else b[e]=f}function lb(a,b,c){var e,f=0,g=da.length,h=d.Deferred().always(function(){delete k.elem}),k=function(){if(e)return!1;for(var b=Z||jb(),b=Math.max(0,l.startTime+l.duration-b),c=1-(b/l.duration||0),d=0,f=l.tweens.length;f>d;d++)l.tweens[d].run(c);return h.notifyWith(a,[l,c,b]),1>c&&f?b:(h.resolveWith(a,[l]),!1)},l=h.promise({elem:a,props:d.extend({},b),opts:d.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Z||jb(),duration:c.duration,tweens:[],createTween:function(b,
|
||||
c){var e=d.Tween(a,l.opts,b,c,l.opts.specialEasing[b]||l.opts.easing);return l.tweens.push(e),e},stop:function(b){var c=0,d=b?l.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)l.tweens[c].run(1);return b?h.resolveWith(a,[l,b]):h.rejectWith(a,[l,b]),this}});c=l.props;for(Qb(c,l.opts.specialEasing);g>f;f++)if(b=da[f].call(l,a,c,l.opts))return b;return d.map(c,kb,l),d.isFunction(l.opts.start)&&l.opts.start.call(a,l),d.fx.timer(d.extend(k,{elem:a,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,
|
||||
l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var e,f=0,g=b.toLowerCase().match(Q)||[];if(d.isFunction(c))for(;e=g[f++];)"+"===e[0]?(e=e.slice(1)||"*",(a[e]=a[e]||[]).unshift(c)):(a[e]=a[e]||[]).push(c)}}function nb(a,b,c,e){function f(k){var l;return g[k]=!0,d.each(a[k]||[],function(a,d){var k=d(b,c,e);return"string"!=typeof k||h||g[k]?h?!(l=k):void 0:(b.dataTypes.unshift(k),f(k),!1)}),l}var g={},h=a===Ja;return f(b.dataTypes[0])||
|
||||
!g["*"]&&f("*")}function Ka(a,b){var c,e,f=d.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((f[c]?a:e||(e={}))[c]=b[c]);return e&&d.extend(!0,a,e),a}function La(a,b,c,e){var f;if(d.isArray(b))d.each(b,function(b,d){c||Rb.test(a)?e(a,d):La(a+"["+("object"==typeof d?b:"")+"]",d,c,e)});else if(c||"object"!==d.type(b))e(a,b);else for(f in b)La(a+"["+f+"]",b[f],c,e)}function ob(a){return d.isWindow(a)?a:9===a.nodeType&&a.defaultView}var aa=[],N=aa.slice,pb=aa.concat,Ma=aa.push,ra=aa.indexOf,va=
|
||||
{},Sb=va.toString,Na=va.hasOwnProperty,v={},u=n.document,d=function(a,b){return new d.fn.init(a,b)},Tb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Ub=/^-ms-/,Vb=/-([\da-z])/gi,Wb=function(a,b){return b.toUpperCase()};d.fn=d.prototype={jquery:"2.1.4",constructor:d,selector:"",length:0,toArray:function(){return N.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:N.call(this)},pushStack:function(a){a=d.merge(this.constructor(),a);return a.prevObject=this,a.context=this.context,a},each:function(a,
|
||||
b){return d.each(this,a,b)},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(N.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length;a=+a+(0>a?b:0);return this.pushStack(0<=a&&b>a?[this[a]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Ma,sort:aa.sort,splice:aa.splice};d.extend=d.fn.extend=function(){var a,b,c,e,f,g,h=arguments[0]||
|
||||
{},k=1,l=arguments.length,t=!1;"boolean"==typeof h&&(t=h,h=arguments[k]||{},k++);"object"==typeof h||d.isFunction(h)||(h={});for(k===l&&(h=this,k--);l>k;k++)if(null!=(a=arguments[k]))for(b in a)c=h[b],e=a[b],h!==e&&(t&&e&&(d.isPlainObject(e)||(f=d.isArray(e)))?(f?(f=!1,g=c&&d.isArray(c)?c:[]):g=c&&d.isPlainObject(c)?c:{},h[b]=d.extend(t,g,e)):void 0!==e&&(h[b]=e));return h};d.extend({expando:"jQuery"+("2.1.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw Error(a);},noop:function(){},
|
||||
isFunction:function(a){return"function"===d.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!d.isArray(a)&&0<=a-parseFloat(a)+1},isPlainObject:function(a){return"object"!==d.type(a)||a.nodeType||d.isWindow(a)?!1:a.constructor&&!Na.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){for(var b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?va[Sb.call(a)]||"object":
|
||||
typeof a},globalEval:function(a){var b,c=eval;(a=d.trim(a))&&(1===a.indexOf("use strict")?(b=u.createElement("script"),b.text=a,u.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(Ub,"ms-").replace(Vb,Wb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,f=0,g=a.length,h=z(a);if(c)if(h)for(;g>f&&(d=b.apply(a[f],c),!1!==d);f++);else for(f in a){if(d=b.apply(a[f],c),!1===d)break}else if(h)for(;g>
|
||||
f&&(d=b.call(a[f],f,a[f]),!1!==d);f++);else for(f in a)if(d=b.call(a[f],f,a[f]),!1===d)break;return a},trim:function(a){return null==a?"":(a+"").replace(Tb,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(z(Object(a))?d.merge(c,"string"==typeof a?[a]:a):Ma.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:ra.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,f=a.length;c>d;d++)a[f++]=b[d];return a.length=f,a},grep:function(a,b,c){for(var d=[],f=0,g=a.length,h=!c;g>f;f++)c=!b(a[f],
|
||||
f),c!==h&&d.push(a[f]);return d},map:function(a,b,c){var d,f=0,g=a.length,h=[];if(z(a))for(;g>f;f++)d=b(a[f],f,c),null!=d&&h.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&h.push(d);return pb.apply([],h)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),d.isFunction(a)?(e=N.call(arguments,2),f=function(){return a.apply(b||this,e.concat(N.call(arguments)))},f.guid=a.guid=a.guid||d.guid++,f):void 0},now:Date.now,support:v});d.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
|
||||
function(a,b){va["[object "+b+"]"]=b.toLowerCase()});var U=function(a){function b(a,b,c,d){var e,f,g,h,k;if((b?b.ownerDocument||b:O)!==G&&ka(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&J){if(11!==h&&(e=ua.exec(a)))if(g=e[1])if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else{if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&D(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return ea.apply(c,b.getElementsByTagName(a)),
|
||||
c;if((g=e[3])&&x.getElementsByClassName)return ea.apply(c,b.getElementsByClassName(g)),c}if(x.qsa&&(!F||!F.test(a))){if(f=e=y,g=b,k=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){h=ya(a);(e=b.getAttribute("id"))?f=e.replace(va,"\\$&"):b.setAttribute("id",f);f="[id='"+f+"'] ";for(g=h.length;g--;)h[g]=f+w(h[g]);g=da.test(a)&&p(b.parentNode)||b;k=h.join(",")}if(k)try{return ea.apply(c,g.querySelectorAll(k)),c}catch(l){}finally{e||b.removeAttribute("id")}}}return A(a.replace(T,"$1"),b,c,d)}function c(){function a(c,
|
||||
d){return b.push(c+" ")>q.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[y]=!0,a}function f(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}function g(a,b){for(var c=a.split("|"),d=a.length;d--;)q.attrHandle[c[d]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||-2147483648)-(~a.sourceIndex||-2147483648);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;
|
||||
return a?1:-1}function k(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function l(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function t(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function p(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function m(){}function w(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;
|
||||
return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=P++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,k,Oa=[I,f];if(g)for(;b=b[d];){if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(k=b[y]||(b[y]={}),(h=k[d])&&h[0]===I&&h[1]===f)return Oa[2]=h[2];if(k[d]=Oa,Oa[2]=a(b,c,g))return!0}}}function r(a){return 1<a.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function u(a,
|
||||
b,c,d,e){for(var f,g=[],h=0,k=a.length,l=null!=b;k>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),l&&b.push(h));return g}function v(a,c,f,g,h,k){return g&&!g[y]&&(g=v(g)),h&&!h[y]&&(h=v(h,k)),d(function(d,e,k,l){var m,ja,p=[],t=[],w=e.length,q;if(!(q=d)){q=c||"*";for(var n=k.nodeType?[k]:k,r=[],B=0,y=n.length;y>B;B++)b(q,n[B],r);q=r}q=!a||!d&&c?q:u(q,p,a,k,l);n=f?h||(d?a:w||g)?[]:e:q;if(f&&f(q,n,k,l),g)for(m=u(n,t),g(m,[],k,l),k=m.length;k--;)(ja=m[k])&&(n[t[k]]=!(q[t[k]]=ja));if(d){if(h||a){if(h){m=
|
||||
[];for(k=n.length;k--;)(ja=n[k])&&m.push(q[k]=ja);h(null,n=[],m,l)}for(k=n.length;k--;)(ja=n[k])&&-1<(m=h?la(d,ja):p[k])&&(d[m]=!(e[m]=ja))}}else n=u(n===e?n.splice(w,n.length):n),h?h(null,e,n,l):ea.apply(e,n)})}function C(a){var b,c,d,e=a.length,f=q.relative[a[0].type];c=f||q.relative[" "];for(var g=f?1:0,h=n(function(a){return a===b},c,!0),k=n(function(a){return-1<la(b,a)},c,!0),l=[function(a,c,d){a=!f&&(d||c!==E)||((b=c).nodeType?h(a,c,d):k(a,c,d));return b=null,a}];e>g;g++)if(c=q.relative[a[g].type])l=
|
||||
[n(r(l),c)];else{if(c=q.filter[a[g].type].apply(null,a[g].matches),c[y]){for(d=++g;e>d&&!q.relative[a[d].type];d++);return v(1<g&&r(l),1<g&&w(a.slice(0,g-1).concat({value:" "===a[g-2].type?"*":""})).replace(T,"$1"),c,d>g&&C(a.slice(g,d)),e>d&&C(a=a.slice(d)),e>d&&w(a))}l.push(c)}return r(l)}function z(a,c){var f=0<c.length,g=0<a.length,h=function(d,e,h,k,l){var m,Ca,t,p=0,w="0",n=d&&[],r=[],B=E,y=d||g&&q.find.TAG("*",l),za=I+=null==B?1:Math.random()||.1,v=y.length;for(l&&(E=e!==G&&e);w!==v&&null!=
|
||||
(m=y[w]);w++){if(g&&m){for(Ca=0;t=a[Ca++];)if(t(m,e,h)){k.push(m);break}l&&(I=za)}f&&((m=!t&&m)&&p--,d&&n.push(m))}if(p+=w,f&&w!==p){for(Ca=0;t=c[Ca++];)t(n,r,e,h);if(d){if(0<p)for(;w--;)n[w]||r[w]||(r[w]=V.call(k));r=u(r)}ea.apply(k,r);l&&!d&&0<r.length&&1<p+c.length&&b.uniqueSort(k)}return l&&(I=za,E=B),n};return f?d(h):h}var wa,x,q,H,za,ya,Pa,A,E,fa,xa,ka,G,R,J,F,ma,M,D,y="sizzle"+1*new Date,O=a.document,I=0,P=0,K=c(),qa=c(),Q=c(),L=function(a,b){return a===b&&(xa=!0),0},S={}.hasOwnProperty,N=
|
||||
[],V=N.pop,Y=N.push,ea=N.push,X=N.slice,la=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},Z="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),aa="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+Z+"))|)[\\x20\\t\\r\\n\\f]*\\]",U=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+
|
||||
aa+")*)|.*)\\)|)",ga=RegExp("[\\x20\\t\\r\\n\\f]+","g"),T=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ha=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,ia=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,oa=RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),pa=new RegExp(U),ra=new RegExp("^"+Z+"$"),W={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG:new RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w",
|
||||
"w*")+")"),ATTR:new RegExp("^"+aa),PSEUDO:new RegExp("^"+U),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},
|
||||
sa=/^(?:input|select|textarea|button)$/i,ta=/^h\d$/i,Aa=/^[^{]+\{\s*\[native \w/,ua=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,da=/[+~]/,va=/'|\\/g,ba=RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),ca=function(a,b,c){a="0x"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},na=function(){ka()};try{ea.apply(N=X.call(O.childNodes),O.childNodes),N[O.childNodes.length].nodeType}catch(Ba){ea={apply:N.length?function(a,b){Y.apply(a,
|
||||
X.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}x=b.support={};za=b.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};ka=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,R=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",na,!1):c.attachEvent&&c.attachEvent("onunload",na)),J=!za(d),x.attributes=f(function(a){return a.className=
|
||||
"i",!a.getAttribute("className")}),x.getElementsByTagName=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),x.getElementsByClassName=Aa.test(d.getElementsByClassName),x.getById=f(function(a){return R.appendChild(a).id=y,!d.getElementsByName||!d.getElementsByName(y).length}),x.getById?(q.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&J){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},q.filter.ID=function(a){var b=a.replace(ba,ca);
|
||||
return function(a){return a.getAttribute("id")===b}}):(delete q.find.ID,q.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return(a="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id"))&&a.value===b}}),q.find.TAG=x.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):x.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},
|
||||
q.find.CLASS=x.getElementsByClassName&&function(a,b){return J?b.getElementsByClassName(a):void 0},ma=[],F=[],(x.qsa=Aa.test(d.querySelectorAll))&&(f(function(a){R.appendChild(a).innerHTML="<a id='"+y+"'></a><select id='"+y+"-\f]' msallowcapture=''><option selected=''></option></select>";a.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");a.querySelectorAll("[selected]").length||F.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
|
||||
a.querySelectorAll("[id~="+y+"-]").length||F.push("~=");a.querySelectorAll(":checked").length||F.push(":checked");a.querySelectorAll("a#"+y+"+*").length||F.push(".#.+[+~]")}),f(function(a){var b=d.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("name","D");a.querySelectorAll("[name=d]").length&&F.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");a.querySelectorAll(":enabled").length||F.push(":enabled",":disabled");a.querySelectorAll("*,:x");F.push(",.*:")})),(x.matchesSelector=
|
||||
Aa.test(M=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&f(function(a){x.disconnectedMatch=M.call(a,"div");M.call(a,"[s!='']:x");ma.push("!=",U)}),F=F.length&&new RegExp(F.join("|")),ma=ma.length&&new RegExp(ma.join("|")),b=Aa.test(R.compareDocumentPosition),D=b||Aa.test(R.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&
|
||||
16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},L=b?function(a,b){if(a===b)return xa=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!x.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&D(O,a)?-1:b===d||b.ownerDocument===O&&D(O,b)?1:fa?la(fa,a)-la(fa,b):0:4&c?-1:1)}:function(a,b){if(a===b)return xa=!0,0;var c,
|
||||
e=0;c=a.parentNode;var f=b.parentNode,g=[a],k=[b];if(!c||!f)return a===d?-1:b===d?1:c?-1:f?1:fa?la(fa,a)-la(fa,b):0;if(c===f)return h(a,b);for(c=a;c=c.parentNode;)g.unshift(c);for(c=b;c=c.parentNode;)k.unshift(c);for(;g[e]===k[e];)e++;return e?h(g[e],k[e]):g[e]===O?-1:k[e]===O?1:0},d):G};b.matches=function(a,c){return b(a,null,null,c)};b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&ka(a),c=c.replace(oa,"='$1']"),!(!x.matchesSelector||!J||ma&&ma.test(c)||F&&F.test(c)))try{var d=M.call(a,
|
||||
c);if(d||x.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return 0<b(c,G,null,[a]).length};b.contains=function(a,b){return(a.ownerDocument||a)!==G&&ka(a),D(a,b)};b.attr=function(a,b){(a.ownerDocument||a)!==G&&ka(a);var c=q.attrHandle[b.toLowerCase()],c=c&&S.call(q.attrHandle,b.toLowerCase())?c(a,b,!J):void 0;return void 0!==c?c:x.attributes||!J?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};b.error=function(a){throw Error("Syntax error, unrecognized expression: "+
|
||||
a);};b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(xa=!x.detectDuplicates,fa=!x.sortStable&&a.slice(0),a.sort(L),xa){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return fa=null,a};H=b.getText=function(a){var b,c="",d=0;if(b=a.nodeType)if(1===b||9===b||11===b){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=H(a)}else{if(3===b||4===b)return a.nodeValue}else for(;b=a[d++];)c+=H(b);return c};q=b.selectors={cacheLength:50,createPseudo:d,
|
||||
match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&
|
||||
b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&pa.test(c)&&(b=ya(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=K[a+" "];return b||(b=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"))&&
|
||||
K(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){e=b.attr(e,a);return null==e?"!="===c:c?(e+="","="===c?e===d:"!="===c?e!==d:"^="===c?d&&0===e.indexOf(d):"*="===c?d&&-1<e.indexOf(d):"$="===c?d&&e.slice(-d.length)===d:"~="===c?-1<(" "+e.replace(ga," ")+" ").indexOf(d):"|="===c?e===d||e.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,
|
||||
3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,k){var l,m,p,t,w;c=f!==g?"nextSibling":"previousSibling";var q=b.parentNode,n=h&&b.nodeName.toLowerCase();k=!k&&!h;if(q){if(f){for(;c;){for(m=b;m=m[c];)if(h?m.nodeName.toLowerCase()===n:1===m.nodeType)return!1;w=c="only"===a&&!w&&"nextSibling"}return!0}if(w=[g?q.firstChild:q.lastChild],g&&k)for(k=q[y]||(q[y]={}),l=k[a]||[],t=l[0]===I&&l[1],p=l[0]===I&&l[2],m=t&&q.childNodes[t];m=++t&&m&&m[c]||
|
||||
(p=t=0)||w.pop();){if(1===m.nodeType&&++p&&m===b){k[a]=[I,t,p];break}}else if(k&&(l=(b[y]||(b[y]={}))[a])&&l[0]===I)p=l[1];else for(;(m=++t&&m&&m[c]||(p=t=0)||w.pop())&&((h?m.nodeName.toLowerCase()!==n:1!==m.nodeType)||!++p||(k&&((m[y]||(m[y]={}))[a]=[I,p]),m!==b)););return p-=e,p===d||0===p%d&&0<=p/d}}},PSEUDO:function(a,c){var f,g=q.pseudos[a]||q.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return g[y]?g(c):1<g.length?(f=[a,a,"",c],q.setFilters.hasOwnProperty(a.toLowerCase())?
|
||||
d(function(a,b){for(var d,e=g(a,c),f=e.length;f--;)d=la(a,e[f]),a[d]=!(b[d]=e[f])}):function(a){return g(a,0,f)}):g}},pseudos:{not:d(function(a){var b=[],c=[],f=Pa(a.replace(T,"$1"));return f[y]?d(function(a,b,c,d){var e;c=f(a,null,d,[]);for(d=a.length;d--;)(e=c[d])&&(a[d]=!(b[d]=e))}):function(a,d,e){return b[0]=a,f(b,null,e,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return 0<b(a,c).length}}),contains:d(function(a){return a=a.replace(ba,ca),function(b){return-1<(b.textContent||
|
||||
b.innerText||H(b)).indexOf(a)}}),lang:d(function(a){return ra.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=J?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===R},focus:function(a){return a===G.activeElement&&(!G.hasFocus||
|
||||
G.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!q.pseudos.empty(a)},header:function(a){return ta.test(a.nodeName)},
|
||||
input:function(a){return sa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:t(function(){return[0]}),last:t(function(a,b){return[b-1]}),eq:t(function(a,b,c){return[0>c?c+b:c]}),even:t(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:t(function(a,b){for(var c=1;b>c;c+=
|
||||
2)a.push(c);return a}),lt:t(function(a,b,c){for(b=0>c?c+b:c;0<=--b;)a.push(b);return a}),gt:t(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};q.pseudos.nth=q.pseudos.eq;for(wa in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})q.pseudos[wa]=k(wa);for(wa in{submit:!0,reset:!0})q.pseudos[wa]=l(wa);m.prototype=q.filters=q.pseudos;q.setFilters=new m;ya=b.tokenize=function(a,c){var d,e,f,g,h,k,l;if(h=qa[a+" "])return c?0:h.slice(0);h=a;k=[];for(l=q.preFilter;h;){d&&!(e=ha.exec(h))||(e&&
|
||||
(h=h.slice(e[0].length)||h),k.push(f=[]));d=!1;(e=ia.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(T," ")}),h=h.slice(d.length));for(g in q.filter)!(e=W[g].exec(h))||l[g]&&!(e=l[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):qa(a,k).slice(0)};return Pa=b.compile=function(a,b){var c,d=[],e=[],f=Q[a+" "];if(!f){b||(b=ya(a));for(c=b.length;c--;)f=C(b[c]),f[y]?d.push(f):e.push(f);f=Q(a,z(e,d));f.selector=a}return f},A=
|
||||
b.select=function(a,b,c,d){var e,f,g,h,k,l="function"==typeof a&&a,m=!d&&ya(a=l.selector||a);if(c=c||[],1===m.length){if(f=m[0]=m[0].slice(0),2<f.length&&"ID"===(g=f[0]).type&&x.getById&&9===b.nodeType&&J&&q.relative[f[1].type]){if(b=(q.find.ID(g.matches[0].replace(ba,ca),b)||[])[0],!b)return c;l&&(b=b.parentNode);a=a.slice(f.shift().value.length)}for(e=W.needsContext.test(a)?0:f.length;e--&&(g=f[e],!q.relative[h=g.type]);)if((k=q.find[h])&&(d=k(g.matches[0].replace(ba,ca),da.test(f[0].type)&&p(b.parentNode)||
|
||||
b))){if(f.splice(e,1),a=d.length&&w(f),!a)return ea.apply(c,d),c;break}}return(l||Pa(a,m))(d,b,!J,c,da.test(a)&&p(b.parentNode)||b),c},x.sortStable=y.split("").sort(L).join("")===y,x.detectDuplicates=!!xa,ka(),x.sortDetached=f(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),f(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||g("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),
|
||||
x.attributes&&f(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||g("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),f(function(a){return null==a.getAttribute("disabled")})||g("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(a,b,c){var d;return c?void 0:!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&
|
||||
d.specified?d.value:null}),b}(n);d.find=U;d.expr=U.selectors;d.expr[":"]=d.expr.pseudos;d.unique=U.uniqueSort;d.text=U.getText;d.isXMLDoc=U.isXML;d.contains=U.contains;var qb=d.expr.match.needsContext,rb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Jb=/^.[^:#\[\.,]*$/;d.filter=function(a,b,c){var e=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===e.nodeType?d.find.matchesSelector(e,a)?[e]:[]:d.find.matches(a,d.grep(b,function(a){return 1===a.nodeType}))};d.fn.extend({find:function(a){var b,c=this.length,e=[],f=
|
||||
this;if("string"!=typeof a)return this.pushStack(d(a).filter(function(){for(b=0;c>b;b++)if(d.contains(f[b],this))return!0}));for(b=0;c>b;b++)d.find(a,f[b],e);return e=this.pushStack(1<c?d.unique(e):e),e.selector=this.selector?this.selector+" "+a:a,e},filter:function(a){return this.pushStack(qa(this,a||[],!1))},not:function(a){return this.pushStack(qa(this,a||[],!0))},is:function(a){return!!qa(this,"string"==typeof a&&qb.test(a)?d(a):a||[],!1).length}});var na,Xb=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
|
||||
(d.fn.init=function(a,b){var c,e;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&3<=a.length?[null,a,null]:Xb.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||na).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof d?b[0]:b,d.merge(this,d.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:u,!0)),rb.test(c[1])&&d.isPlainObject(b))for(c in b)d.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return e=u.getElementById(c[2]),e&&e.parentNode&&(this.length=
|
||||
1,this[0]=e),this.context=u,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):d.isFunction(a)?"undefined"!=typeof na.ready?na.ready(a):a(d):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),d.makeArray(a,this))}).prototype=d.fn;na=d(u);var Yb=/^(?:parents|prev(?:Until|All))/,Zb={children:!0,contents:!0,next:!0,prev:!0};d.extend({dir:function(a,b,c){for(var e=[],f=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(f&&d(a).is(c))break;e.push(a)}return e},
|
||||
sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});d.fn.extend({has:function(a){var b=d(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(d.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,e=0,f=this.length,g=[],h=qb.test(a)||"string"!=typeof a?d(a,b||this.context):0;f>e;e++)for(c=this[e];c&&c!==b;c=c.parentNode)if(11>c.nodeType&&(h?-1<h.index(c):1===c.nodeType&&d.find.matchesSelector(c,a))){g.push(c);break}return this.pushStack(1<
|
||||
g.length?d.unique(g):g)},index:function(a){return a?"string"==typeof a?ra.call(d(a),this[0]):ra.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(d.unique(d.merge(this.get(),d(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});d.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,
|
||||
b,c){return d.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return a.contentDocument||
|
||||
d.merge([],a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c);return"Until"!==a.slice(-5)&&(e=c),e&&"string"==typeof e&&(f=d.filter(e,f)),1<this.length&&(Zb[a]||d.unique(f),Yb.test(a)&&f.reverse()),this.pushStack(f)}});var Q=/\S+/g,Va={};d.Callbacks=function(a){a="string"==typeof a?Va[a]||S(a):d.extend({},a);var b,c,e,f,g,h,k=[],l=!a.once&&[],t=function(d){b=a.memory&&d;c=!0;h=f||0;f=0;g=k.length;for(e=!0;k&&g>h;h++)if(!1===k[h].apply(d[0],d[1])&&a.stopOnFalse){b=!1;break}e=
|
||||
!1;k&&(l?l.length&&t(l.shift()):b?k=[]:p.disable())},p={add:function(){if(k){var c=k.length;!function B(b){d.each(b,function(b,c){var e=d.type(c);"function"===e?a.unique&&p.has(c)||k.push(c):c&&c.length&&"string"!==e&&B(c)})}(arguments);e?g=k.length:b&&(f=c,t(b))}return this},remove:function(){return k&&d.each(arguments,function(a,b){for(var c;-1<(c=d.inArray(b,k,c));)k.splice(c,1),e&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return a?-1<d.inArray(a,k):!(!k||!k.length)},empty:function(){return k=
|
||||
[],g=0,this},disable:function(){return k=l=b=void 0,this},disabled:function(){return!k},lock:function(){return l=void 0,b||p.disable(),this},locked:function(){return!l},fireWith:function(a,b){return!k||c&&!l||(b=b||[],b=[a,b.slice?b.slice():b],e?l.push(b):t(b)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!c}};return p};d.extend({Deferred:function(a){var b=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),
|
||||
"rejected"],["notify","progress",d.Callbacks("memory")]],c="pending",e={state:function(){return c},always:function(){return f.done(arguments).fail(arguments),this},then:function(){var a=arguments;return d.Deferred(function(c){d.each(b,function(b,l){var t=d.isFunction(a[b])&&a[b];f[l[1]](function(){var a=t&&t.apply(this,arguments);a&&d.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[l[0]+"With"](this===e?c.promise():this,t?[a]:arguments)})});a=null}).promise()},
|
||||
promise:function(a){return null!=a?d.extend(a,e):e}},f={};return e.pipe=e.then,d.each(b,function(a,d){var k=d[2],l=d[3];e[d[1]]=k.add;l&&k.add(function(){c=l},b[1^a][2].disable,b[2][2].lock);f[d[0]]=function(){return f[d[0]+"With"](this===f?e:this,arguments),this};f[d[0]+"With"]=k.fireWith}),e.promise(f),a&&a.call(f,f),f},when:function(a){var b=0,c=N.call(arguments),e=c.length,f=1!==e||a&&d.isFunction(a.promise)?e:0,g=1===f?a:d.Deferred(),h=function(a,b,c){return function(d){b[a]=this;c[a]=1<arguments.length?
|
||||
N.call(arguments):d;c===k?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},k,l,t;if(1<e)for(k=Array(e),l=Array(e),t=Array(e);e>b;b++)c[b]&&d.isFunction(c[b].promise)?c[b].promise().done(h(b,t,c)).fail(g.reject).progress(h(b,l,k)):--f;return f||g.resolveWith(t,c),g.promise()}});var Ba;d.fn.ready=function(a){return d.ready.promise().done(a),this};d.extend({isReady:!1,readyWait:1,holdReady:function(a){a?d.readyWait++:d.ready(!0)},ready:function(a){(!0===a?--d.readyWait:d.isReady)||(d.isReady=!0,!0!==a&&0<
|
||||
--d.readyWait||(Ba.resolveWith(u,[d]),d.fn.triggerHandler&&(d(u).triggerHandler("ready"),d(u).off("ready"))))}});d.ready.promise=function(a){return Ba||(Ba=d.Deferred(),"complete"===u.readyState?setTimeout(d.ready):(u.addEventListener("DOMContentLoaded",H,!1),n.addEventListener("load",H,!1))),Ba.promise(a)};d.ready.promise();var V=d.access=function(a,b,c,e,f,g,h){var k=0,l=a.length,t=null==c;if("object"===d.type(c))for(k in f=!0,c)d.access(a,b,k,c[k],!0,g,h);else if(void 0!==e&&(f=!0,d.isFunction(e)||
|
||||
(h=!0),t&&(h?(b.call(a,e),b=null):(t=b,b=function(a,b,c){return t.call(d(a),c)})),b))for(;l>k;k++)b(a[k],c,h?e:e.call(a[k],k,b(a[k],c)));return f?a:t?b.call(a):l?b(a[0],c):g};d.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};P.uid=1;P.accepts=d.acceptData;P.prototype={key:function(a){if(!P.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=P.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(e){b[this.expando]=c,d.extend(a,b)}}return this.cache[c]||
|
||||
(this.cache[c]={}),c},set:function(a,b,c){var e;a=this.key(a);var f=this.cache[a];if("string"==typeof b)f[b]=c;else if(d.isEmptyObject(f))d.extend(this.cache[a],b);else for(e in b)f[e]=b[e];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var e;return void 0===b||b&&"string"==typeof b&&void 0===c?(e=this.get(a,b),void 0!==e?e:this.get(a,d.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,e,f=this.key(a),g=this.cache[f];
|
||||
if(void 0===b)this.cache[f]={};else for(d.isArray(b)?e=b.concat(b.map(d.camelCase)):(c=d.camelCase(b),b in g?e=[b,c]:(e=c,e=e in g?[e]:e.match(Q)||[])),c=e.length;c--;)delete g[e[c]]},hasData:function(a){return!d.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var r=new P,C=new P,Lb=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Kb=/([A-Z])/g;d.extend({hasData:function(a){return C.hasData(a)||r.hasData(a)},data:function(a,b,c){return C.access(a,
|
||||
b,c)},removeData:function(a,b){C.remove(a,b)},_data:function(a,b,c){return r.access(a,b,c)},_removeData:function(a,b){r.remove(a,b)}});d.fn.extend({data:function(a,b){var c,e,f,g=this[0],h=g&&g.attributes;if(void 0===a){if(this.length&&(f=C.get(g),1===g.nodeType&&!r.get(g,"hasDataAttrs"))){for(c=h.length;c--;)h[c]&&(e=h[c].name,0===e.indexOf("data-")&&(e=d.camelCase(e.slice(5)),Wa(g,e,f[e])));r.set(g,"hasDataAttrs",!0)}return f}return"object"==typeof a?this.each(function(){C.set(this,a)}):V(this,
|
||||
function(b){var c,e=d.camelCase(a);if(g&&void 0===b){if((c=C.get(g,a),void 0!==c)||(c=C.get(g,e),void 0!==c)||(c=Wa(g,e,void 0),void 0!==c))return c}else this.each(function(){var c=C.get(this,e);C.set(this,e,b);-1!==a.indexOf("-")&&void 0!==c&&C.set(this,a,b)})},null,b,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){C.remove(this,a)})}});d.extend({queue:function(a,b,c){var e;return a?(b=(b||"fx")+"queue",e=r.get(a,b),c&&(!e||d.isArray(c)?e=r.access(a,b,d.makeArray(c)):
|
||||
e.push(c)),e||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=d.queue(a,b),e=c.length,f=c.shift(),g=d._queueHooks(a,b),h=function(){d.dequeue(a,b)};"inprogress"===f&&(f=c.shift(),e--);f&&("fx"===b&&c.unshift("inprogress"),delete g.stop,f.call(a,h,g));!e&&g&&g.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return r.get(a,c)||r.access(a,c,{empty:d.Callbacks("once memory").add(function(){r.remove(a,[b+"queue",c])})})}});d.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&
|
||||
(b=a,a="fx",c--),arguments.length<c?d.queue(this[0],a):void 0===b?this:this.each(function(){var c=d.queue(this,a,b);d._queueHooks(this,a);"fx"===a&&"inprogress"!==c[0]&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,e=1,f=d.Deferred(),g=this,h=this.length,k=function(){--e||f.resolveWith(g,[g])};"string"!=typeof a&&(b=a,a=void 0);for(a=a||"fx";h--;)(c=r.get(g[h],a+"queueHooks"))&&
|
||||
c.empty&&(e++,c.empty.add(k));return k(),f.promise(b)}});var Da=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=["Top","Right","Bottom","Left"],ha=function(a,b){return a=b||a,"none"===d.css(a,"display")||!d.contains(a.ownerDocument,a)},sb=/^(?:checkbox|radio)$/i;!function(){var a=u.createDocumentFragment().appendChild(u.createElement("div")),b=u.createElement("input");b.setAttribute("type","radio");b.setAttribute("checked","checked");b.setAttribute("name","t");a.appendChild(b);v.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked;
|
||||
a.innerHTML="<textarea>x</textarea>";v.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue}();v.focusinBubbles="onfocusin"in n;var $b=/^key/,ac=/^(?:mouse|pointer|contextmenu)|click/,tb=/^(?:focusinfocus|focusoutblur)$/,ub=/^([^.]*)(?:\.(.+)|)$/;d.event={global:{},add:function(a,b,c,e,f){var g,h,k,l,t,p,m,n,B,u;if(t=r.get(a))for(c.handler&&(g=c,c=g.handler,f=g.selector),c.guid||(c.guid=d.guid++),(l=t.events)||(l=t.events={}),(h=t.handle)||(h=t.handle=function(b){return"undefined"!==typeof d&&
|
||||
d.event.triggered!==b.type?d.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(Q)||[""],t=b.length;t--;)k=ub.exec(b[t])||[],B=u=k[1],k=(k[2]||"").split(".").sort(),B&&(m=d.event.special[B]||{},B=(f?m.delegateType:m.bindType)||B,m=d.event.special[B]||{},p=d.extend({type:B,origType:u,data:e,handler:c,guid:c.guid,selector:f,needsContext:f&&d.expr.match.needsContext.test(f),namespace:k.join(".")},g),(n=l[B])||(n=l[B]=[],n.delegateCount=0,m.setup&&!1!==m.setup.call(a,e,k,h)||a.addEventListener&&
|
||||
a.addEventListener(B,h,!1)),m.add&&(m.add.call(a,p),p.handler.guid||(p.handler.guid=c.guid)),f?n.splice(n.delegateCount++,0,p):n.push(p),d.event.global[B]=!0)},remove:function(a,b,c,e,f){var g,h,k,l,t,p,m,n,B,u,v,C=r.hasData(a)&&r.get(a);if(C&&(l=C.events)){b=(b||"").match(Q)||[""];for(t=b.length;t--;)if(k=ub.exec(b[t])||[],B=v=k[1],u=(k[2]||"").split(".").sort(),B){m=d.event.special[B]||{};B=(e?m.delegateType:m.bindType)||B;n=l[B]||[];k=k[2]&&new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.|)")+"(\\.|$)");
|
||||
for(h=g=n.length;g--;)p=n[g],!f&&v!==p.origType||c&&c.guid!==p.guid||k&&!k.test(p.namespace)||e&&e!==p.selector&&("**"!==e||!p.selector)||(n.splice(g,1),p.selector&&n.delegateCount--,m.remove&&m.remove.call(a,p));h&&!n.length&&(m.teardown&&!1!==m.teardown.call(a,u,C.handle)||d.removeEvent(a,B,C.handle),delete l[B])}else for(B in l)d.event.remove(a,B+b[t],c,e,!0);d.isEmptyObject(l)&&(delete C.handle,r.remove(a,"events"))}},trigger:function(a,b,c,e){var f,g,h,k,l,t,p,m=[c||u],w=Na.call(a,"type")?a.type:
|
||||
a;f=Na.call(a,"namespace")?a.namespace.split("."):[];if(g=h=c=c||u,3!==c.nodeType&&8!==c.nodeType&&!tb.test(w+d.event.triggered)&&(0<=w.indexOf(".")&&(f=w.split("."),w=f.shift(),f.sort()),l=0>w.indexOf(":")&&"on"+w,a=a[d.expando]?a:new d.Event(w,"object"==typeof a&&a),a.isTrigger=e?2:3,a.namespace=f.join("."),a.namespace_re=a.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=c),b=null==b?[a]:d.makeArray(b,[a]),p=d.event.special[w]||{},e||!p.trigger||
|
||||
!1!==p.trigger.apply(c,b))){if(!e&&!p.noBubble&&!d.isWindow(c)){k=p.delegateType||w;for(tb.test(k+w)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(c.ownerDocument||u)&&m.push(h.defaultView||h.parentWindow||n)}for(f=0;(g=m[f++])&&!a.isPropagationStopped();)a.type=1<f?k:p.bindType||w,(t=(r.get(g,"events")||{})[a.type]&&r.get(g,"handle"))&&t.apply(g,b),(t=l&&g[l])&&t.apply&&d.acceptData(g)&&(a.result=t.apply(g,b),!1===a.result&&a.preventDefault());return a.type=w,e||a.isDefaultPrevented()||p._default&&
|
||||
!1!==p._default.apply(m.pop(),b)||!d.acceptData(c)||l&&d.isFunction(c[w])&&!d.isWindow(c)&&(h=c[l],h&&(c[l]=null),d.event.triggered=w,c[w](),d.event.triggered=void 0,h&&(c[l]=h)),a.result}},dispatch:function(a){a=d.event.fix(a);var b,c,e,f,g,h=[],k=N.call(arguments);b=(r.get(this,"events")||{})[a.type]||[];var l=d.event.special[a.type]||{};if(k[0]=a,a.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,a)){h=d.event.handlers.call(this,a,b);for(b=0;(f=h[b++])&&!a.isPropagationStopped();)for(a.currentTarget=
|
||||
f.elem,c=0;(g=f.handlers[c++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(g.namespace)||(a.handleObj=g,a.data=g.data,e=((d.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,k),void 0===e||!1!==(a.result=e)||(a.preventDefault(),a.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,e,f,g,h=[],k=b.delegateCount,l=a.target;if(k&&l.nodeType&&(!a.button||"click"!==a.type))for(;l!==this;l=l.parentNode||
|
||||
this)if(!0!==l.disabled||"click"!==a.type){e=[];for(c=0;k>c;c++)g=b[c],f=g.selector+" ",void 0===e[f]&&(e[f]=g.needsContext?0<=d(f,this).index(l):d.find(f,this,null,[l]).length),e[f]&&e.push(g);e.length&&h.push({elem:l,handlers:e})}return k<b.length&&h.push({elem:this,handlers:b.slice(k)}),h},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,
|
||||
b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||u,d=c.documentElement,f=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||f&&f.scrollLeft||0)-(d&&d.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||f&&f.scrollTop||0)-(d&&d.clientTop||f&&f.clientTop||
|
||||
0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[d.expando])return a;var b,c,e;b=a.type;var f=a,g=this.fixHooks[b];g||(this.fixHooks[b]=g=ac.test(b)?this.mouseHooks:$b.test(b)?this.keyHooks:{});e=g.props?this.props.concat(g.props):this.props;a=new d.Event(f);for(b=e.length;b--;)c=e[b],a[c]=f[c];return a.target||(a.target=u),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==
|
||||
Xa()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===Xa()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&d.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return d.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,e){a=d.extend(new d.Event,
|
||||
c,{type:a,isSimulated:!0,originalEvent:{}});e?d.event.trigger(a,null,b):d.event.dispatch.call(b,a);a.isDefaultPrevented()&&c.preventDefault()}};d.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)};d.Event=function(a,b){return this instanceof d.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&!1===a.returnValue?W:X):this.type=a,b&&d.extend(this,b),this.timeStamp=a&&a.timeStamp||d.now(),void(this[d.expando]=
|
||||
!0)):new d.Event(a,b)};d.Event.prototype={isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=W;a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=W;a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=W;a&&a.stopImmediatePropagation&&a.stopImmediatePropagation();
|
||||
this.stopPropagation()}};d.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){d.event.special[a]={delegateType:b,bindType:b,handle:function(a){var e,f=a.relatedTarget,g=a.handleObj;return(!f||f!==this&&!d.contains(this,f))&&(a.type=g.origType,e=g.handler.apply(this,arguments),a.type=b),e}}});v.focusinBubbles||d.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){d.event.simulate(b,a.target,d.event.fix(a),!0)};d.event.special[b]=
|
||||
{setup:function(){var d=this.ownerDocument||this,f=r.access(d,b);f||d.addEventListener(a,c,!0);r.access(d,b,(f||0)+1)},teardown:function(){var d=this.ownerDocument||this,f=r.access(d,b)-1;f?r.access(d,b,f):(d.removeEventListener(a,c,!0),r.remove(d,b))}}});d.fn.extend({on:function(a,b,c,e,f){var g,h;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(h in a)this.on(h,b,c,a[h],f);return this}if(null==c&&null==e?(e=b,c=b=void 0):null==e&&("string"==typeof b?(e=c,c=void 0):(e=c,c=b,b=void 0)),
|
||||
!1===e)e=X;else if(!e)return this;return 1===f&&(g=e,e=function(a){return d().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=d.guid++)),this.each(function(){d.event.add(this,a,e,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,d(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,b,a[f]);return this}return(!1===
|
||||
b||"function"==typeof b)&&(c=b,b=void 0),!1===c&&(c=X),this.each(function(){d.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?d.event.trigger(a,b,c,!0):void 0}});var vb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,wb=/<([\w:]+)/,bc=/<|&#?\w+;/,cc=/<(?:script|style|link)/i,dc=/checked\s*(?:[^=]|=\s*.checked.)/i,xb=/^$|\/(?:java|ecma)script/i,Ob=/^true\/(.*)/,ec=
|
||||
/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,K={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};K.optgroup=K.option;K.tbody=K.tfoot=K.colgroup=K.caption=K.thead;K.th=K.td;d.extend({clone:function(a,b,c){var e,f,g,h,k=a.cloneNode(!0),l=d.contains(a.ownerDocument,a);if(!(v.noCloneChecked||1!==a.nodeType&&
|
||||
11!==a.nodeType||d.isXMLDoc(a)))for(h=A(k),g=A(a),e=0,f=g.length;f>e;e++){var n=g[e],p=h[e],m=p.nodeName.toLowerCase();"input"===m&&sb.test(n.type)?p.checked=n.checked:("input"===m||"textarea"===m)&&(p.defaultValue=n.defaultValue)}if(b)if(c)for(g=g||A(a),h=h||A(k),e=0,f=g.length;f>e;e++)Za(g[e],h[e]);else Za(a,k);return h=A(k,"script"),0<h.length&&Ga(h,!l&&A(a,"script")),k},buildFragment:function(a,b,c,e){for(var f,g,h,k,l=b.createDocumentFragment(),n=[],p=0,m=a.length;m>p;p++)if(f=a[p],f||0===f)if("object"===
|
||||
d.type(f))d.merge(n,f.nodeType?[f]:f);else if(bc.test(f)){g=g||l.appendChild(b.createElement("div"));h=(wb.exec(f)||["",""])[1].toLowerCase();h=K[h]||K._default;g.innerHTML=h[1]+f.replace(vb,"<$1></$2>")+h[2];for(h=h[0];h--;)g=g.lastChild;d.merge(n,g.childNodes);g=l.firstChild;g.textContent=""}else n.push(b.createTextNode(f));l.textContent="";for(p=0;f=n[p++];)if((!e||-1===d.inArray(f,e))&&(k=d.contains(f.ownerDocument,f),g=A(l.appendChild(f),"script"),k&&Ga(g),c))for(h=0;f=g[h++];)xb.test(f.type||
|
||||
"")&&c.push(f);return l},cleanData:function(a){for(var b,c,e,f,g=d.event.special,h=0;void 0!==(c=a[h]);h++){if(d.acceptData(c)&&(f=c[r.expando],f&&(b=r.cache[f]))){if(b.events)for(e in b.events)g[e]?d.event.remove(c,e):d.removeEvent(c,e,b.handle);r.cache[f]&&delete r.cache[f]}delete C.cache[c[C.expando]]}}});d.fn.extend({text:function(a){return V(this,function(a){return void 0===a?d.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=
|
||||
a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ya(this,a).appendChild(a)})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ya(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,
|
||||
function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,e=a?d.filter(a,this):this,f=0;null!=(c=e[f]);f++)b||1!==c.nodeType||d.cleanData(A(c)),c.parentNode&&(b&&d.contains(c.ownerDocument,c)&&Ga(A(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(d.cleanData(A(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return d.clone(this,
|
||||
a,b)})},html:function(a){return V(this,function(a){var c=this[0]||{},e=0,f=this.length;if(void 0===a&&1===c.nodeType)return c.innerHTML;if("string"==typeof a&&!cc.test(a)&&!K[(wb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(vb,"<$1></$2>");try{for(;f>e;e++)c=this[e]||{},1===c.nodeType&&(d.cleanData(A(c,!1)),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode;d.cleanData(A(this));
|
||||
a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=pb.apply([],a);var c,e,f,g,h=0,k=this.length,l=this,n=k-1,p=a[0],m=d.isFunction(p);if(m||1<k&&"string"==typeof p&&!v.checkClone&&dc.test(p))return this.each(function(c){var d=l.eq(c);m&&(a[0]=p.call(this,c,d.html()));d.domManip(a,b)});if(k&&(c=d.buildFragment(a,this[0].ownerDocument,!1,this),e=c.firstChild,1===c.childNodes.length&&(c=e),e)){e=d.map(A(c,"script"),
|
||||
Mb);for(f=e.length;k>h;h++)g=c,h!==n&&(g=d.clone(g,!0,!0),f&&d.merge(e,A(g,"script"))),b.call(this[h],g,h);if(f)for(c=e[e.length-1].ownerDocument,d.map(e,Nb),h=0;f>h;h++)g=e[h],xb.test(g.type||"")&&!r.access(g,"globalEval")&&d.contains(c,g)&&(g.src?d._evalUrl&&d._evalUrl(g.src):d.globalEval(g.textContent.replace(ec,"")))}return this}});d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(a){for(var e=[],f=
|
||||
d(a),g=f.length-1,h=0;g>=h;h++)a=h===g?this:this.clone(!0),d(f[h])[b](a),Ma.apply(e,a.get());return this.pushStack(e)}});var sa,ab={},bb=/^margin/,Ia=new RegExp("^("+Da+")(?!px)[a-z%]+$","i"),ta=function(a){return a.ownerDocument.defaultView.opener?a.ownerDocument.defaultView.getComputedStyle(a,null):n.getComputedStyle(a,null)};!function(){var a,b,c=u.documentElement,e=u.createElement("div"),f=u.createElement("div");if(f.style){var g=function(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";
|
||||
f.innerHTML="";c.appendChild(e);var d=n.getComputedStyle(f,null);a="1%"!==d.top;b="4px"===d.width;c.removeChild(e)};f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";v.clearCloneStyle="content-box"===f.style.backgroundClip;e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute";e.appendChild(f);n.getComputedStyle&&d.extend(v,{pixelPosition:function(){return g(),a},boxSizingReliable:function(){return null==b&&g(),b},reliableMarginRight:function(){var a,
|
||||
b=f.appendChild(u.createElement("div"));return b.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",b.style.marginRight=b.style.width="0",f.style.width="1px",c.appendChild(e),a=!parseFloat(n.getComputedStyle(b,null).marginRight),c.removeChild(e),f.removeChild(b),a}})}}();d.swap=function(a,b,c,d){var f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];c=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];
|
||||
return c};var fc=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+Da+")(.*)$","i"),gc=new RegExp("^([+-])=("+Da+")","i"),hc={position:"absolute",visibility:"hidden",display:"block"},yb={letterSpacing:"0",fontWeight:"400"},eb=["Webkit","O","Moz","ms"];d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=T(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},
|
||||
cssProps:{"float":"cssFloat"},style:function(a,b,c,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,k=d.camelCase(b),l=a.style;return b=d.cssProps[k]||(d.cssProps[k]=db(l,k)),h=d.cssHooks[b]||d.cssHooks[k],void 0===c?h&&"get"in h&&void 0!==(f=h.get(a,!1,e))?f:l[b]:(g=typeof c,"string"===g&&(f=gc.exec(c))&&(c=(f[1]+1)*f[2]+parseFloat(d.css(a,b)),g="number"),null!=c&&c===c&&("number"!==g||d.cssNumber[k]||(c+="px"),v.clearCloneStyle||""!==c||0!==b.indexOf("background")||(l[b]="inherit"),h&&
|
||||
"set"in h&&void 0===(c=h.set(a,c,e))||(l[b]=c)),void 0)}},css:function(a,b,c,e){var f,g,h,k=d.camelCase(b);return b=d.cssProps[k]||(d.cssProps[k]=db(a.style,k)),h=d.cssHooks[b]||d.cssHooks[k],h&&"get"in h&&(f=h.get(a,!0,c)),void 0===f&&(f=T(a,b,e)),"normal"===f&&b in yb&&(f=yb[b]),""===c||c?(g=parseFloat(f),!0===c||d.isNumeric(g)?g||0:f):f}});d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,e,f){return e?fc.test(d.css(a,"display"))&&0===a.offsetWidth?d.swap(a,hc,function(){return hb(a,
|
||||
b,f)}):hb(a,b,f):void 0},set:function(a,e,f){var g=f&&ta(a);return fb(a,e,f?gb(a,b,f,"border-box"===d.css(a,"boxSizing",!1,g),g):0)}}});d.cssHooks.marginRight=cb(v.reliableMarginRight,function(a,b){return b?d.swap(a,{display:"inline-block"},T,[a,"marginRight"]):void 0});d.each({margin:"",padding:"",border:"Width"},function(a,b){d.cssHooks[a+b]={expand:function(c){var d=0,f={};for(c="string"==typeof c?c.split(" "):[c];4>d;d++)f[a+Y[d]+b]=c[d]||c[d-2]||c[0];return f}};bb.test(a)||(d.cssHooks[a+b].set=
|
||||
fb)});d.fn.extend({css:function(a,b){return V(this,function(a,b,f){var g,h={},k=0;if(d.isArray(b)){f=ta(a);for(g=b.length;g>k;k++)h[b[k]]=d.css(a,b[k],!1,f);return h}return void 0!==f?d.style(a,b,f):d.css(a,b)},a,b,1<arguments.length)},show:function(){return ib(this,!0)},hide:function(){return ib(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ha(this)?d(this).show():d(this).hide()})}});d.Tween=E;E.prototype={constructor:E,init:function(a,b,c,e,f,
|
||||
g){this.elem=a;this.prop=c;this.easing=f||"swing";this.options=b;this.start=this.now=this.cur();this.end=e;this.unit=g||(d.cssNumber[c]?"":"px")},cur:function(){var a=E.propHooks[this.prop];return a&&a.get?a.get(this):E.propHooks._default.get(this)},run:function(a){var b,c=E.propHooks[this.prop];return this.options.duration?this.pos=b=d.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,
|
||||
this.now,this),c&&c.set?c.set(this):E.propHooks._default.set(this),this}};E.prototype.init.prototype=E.prototype;E.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=d.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){d.fx.step[a.prop]?d.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[d.cssProps[a.prop]]||d.cssHooks[a.prop])?d.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};E.propHooks.scrollTop=
|
||||
E.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};d.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};d.fx=E.prototype.init;d.fx.step={};var Z,Ea,ic=/^(?:toggle|show|hide)$/,zb=new RegExp("^(?:([+-])=|)("+Da+")([a-z%]*)$","i"),jc=/queueHooks$/,da=[function(a,b,c){var e,f,g,h,k,l,n,p=this,m={},w=a.style,u=a.nodeType&&ha(a),v=r.get(a,"fxshow");c.queue||(h=d._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,k=
|
||||
h.empty.fire,h.empty.fire=function(){h.unqueued||k()}),h.unqueued++,p.always(function(){p.always(function(){h.unqueued--;d.queue(a,"fx").length||h.empty.fire()})}));1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[w.overflow,w.overflowX,w.overflowY],l=d.css(a,"display"),n="none"===l?r.get(a,"olddisplay")||Ha(a.nodeName):l,"inline"===n&&"none"===d.css(a,"float")&&(w.display="inline-block"));c.overflow&&(w.overflow="hidden",p.always(function(){w.overflow=c.overflow[0];w.overflowX=c.overflow[1];
|
||||
w.overflowY=c.overflow[2]}));for(e in b)if(f=b[e],ic.exec(f)){if(delete b[e],g=g||"toggle"===f,f===(u?"hide":"show")){if("show"!==f||!v||void 0===v[e])continue;u=!0}m[e]=v&&v[e]||d.style(a,e)}else l=void 0;if(d.isEmptyObject(m))"inline"===("none"===l?Ha(a.nodeName):l)&&(w.display=l);else for(e in v?"hidden"in v&&(u=v.hidden):v=r.access(a,"fxshow",{}),g&&(v.hidden=!u),u?d(a).show():p.done(function(){d(a).hide()}),p.done(function(){var b;r.remove(a,"fxshow");for(b in m)d.style(a,b,m[b])}),m)b=kb(u?
|
||||
v[e]:0,e,p),e in v||(v[e]=b.start,u&&(b.end=b.start,b.start="width"===e||"height"===e?1:0))}],ia={"*":[function(a,b){var c=this.createTween(a,b),e=c.cur(),f=zb.exec(b),g=f&&f[3]||(d.cssNumber[a]?"":"px"),h=(d.cssNumber[a]||"px"!==g&&+e)&&zb.exec(d.css(c.elem,a)),k=1,l=20;if(h&&h[3]!==g){g=g||h[3];f=f||[];h=+e||1;do k=k||".5",h/=k,d.style(c.elem,a,h+g);while(k!==(k=c.cur()/e)&&1!==k&&--l)}return f&&(h=c.start=+h||+e||0,c.unit=g,c.end=f[1]?h+(f[1]+1)*f[2]:+f[2]),c}]};d.Animation=d.extend(lb,{tweener:function(a,
|
||||
b){d.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,e=0,f=a.length;f>e;e++)c=a[e],ia[c]=ia[c]||[],ia[c].unshift(b)},prefilter:function(a,b){b?da.unshift(a):da.push(a)}});d.speed=function(a,b,c){var e=a&&"object"==typeof a?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};return e.duration=d.fx.off?0:"number"==typeof e.duration?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,(null==e.queue||!0===e.queue)&&(e.queue=
|
||||
"fx"),e.old=e.complete,e.complete=function(){d.isFunction(e.old)&&e.old.call(this);e.queue&&d.dequeue(this,e.queue)},e};d.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ha).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.isEmptyObject(a),g=d.speed(b,c,e);b=function(){var b=lb(this,d.extend({},a),g);(f||r.get(this,"finish"))&&b.stop(!0)};return b.finish=b,f||!1===g.queue?this.each(b):this.queue(g.queue,b)},stop:function(a,b,c){var e=function(a){var b=
|
||||
a.stop;delete a.stop;b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&!1!==a&&this.queue(a||"fx",[]),this.each(function(){var b=!0,g=null!=a&&a+"queueHooks",h=d.timers,k=r.get(this);if(g)k[g]&&k[g].stop&&e(k[g]);else for(g in k)k[g]&&k[g].stop&&jc.test(g)&&e(k[g]);for(g=h.length;g--;)h[g].elem!==this||null!=a&&h[g].queue!==a||(h[g].anim.stop(c),b=!1,h.splice(g,1));!b&&c||d.dequeue(this,a)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var b,c=r.get(this),e=c[a+"queue"];
|
||||
b=c[a+"queueHooks"];var f=d.timers,g=e?e.length:0;c.finish=!0;d.queue(this,a,[]);b&&b.stop&&b.stop.call(this,!0);for(b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)e[b]&&e[b].finish&&e[b].finish.call(this);delete c.finish})}});d.each(["toggle","show","hide"],function(a,b){var c=d.fn[b];d.fn[b]=function(a,d,g){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(ua(b,!0),a,d,g)}});d.each({slideDown:ua("show"),slideUp:ua("hide"),
|
||||
slideToggle:ua("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,d,f){return this.animate(b,a,d,f)}});d.timers=[];d.fx.tick=function(){var a,b=0,c=d.timers;for(Z=d.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||d.fx.stop();Z=void 0};d.fx.timer=function(a){d.timers.push(a);a()?d.fx.start():d.timers.pop()};d.fx.interval=13;d.fx.start=function(){Ea||(Ea=setInterval(d.fx.tick,d.fx.interval))};d.fx.stop=function(){clearInterval(Ea);
|
||||
Ea=null};d.fx.speeds={slow:600,fast:200,_default:400};d.fn.delay=function(a,b){return a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,d){var f=setTimeout(b,a);d.stop=function(){clearTimeout(f)}})};(function(){var a=u.createElement("input"),b=u.createElement("select"),c=b.appendChild(u.createElement("option"));a.type="checkbox";v.checkOn=""!==a.value;v.optSelected=c.selected;b.disabled=!0;v.optDisabled=!c.disabled;a=u.createElement("input");a.value="t";a.type="radio";v.radioValue="t"===
|
||||
a.value})();var Ab,oa=d.expr.attrHandle;d.fn.extend({attr:function(a,b){return V(this,d.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){d.removeAttr(this,a)})}});d.extend({attr:function(a,b,c){var e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return"undefined"===typeof a.getAttribute?d.prop(a,b,c):(1===g&&d.isXMLDoc(a)||(b=b.toLowerCase(),e=d.attrHooks[b]||(d.expr.match.bool.test(b)?Ab:void 0)),void 0===c?e&&"get"in e&&null!==(f=e.get(a,b))?f:(f=d.find.attr(a,b),null==
|
||||
f?void 0:f):null!==c?e&&"set"in e&&void 0!==(f=e.set(a,c,b))?f:(a.setAttribute(b,c+""),c):void d.removeAttr(a,b))},removeAttr:function(a,b){var c,e,f=0,g=b&&b.match(Q);if(g&&1===a.nodeType)for(;c=g[f++];)e=d.propFix[c]||c,d.expr.match.bool.test(c)&&(a[e]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!v.radioValue&&"radio"===b&&d.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}});Ab={set:function(a,b,c){return!1===b?d.removeAttr(a,c):a.setAttribute(c,
|
||||
c),c}};d.each(d.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oa[b]||d.find.attr;oa[b]=function(a,b,d){var h,k;return d||(k=oa[b],oa[b]=h,h=null!=c(a,b,d)?b.toLowerCase():null,oa[b]=k),h}});var kc=/^(?:input|select|textarea|button)$/i;d.fn.extend({prop:function(a,b){return V(this,d.prop,a,b,1<arguments.length)},removeProp:function(a){return this.each(function(){delete this[d.propFix[a]||a]})}});d.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var e,f,g,h=a.nodeType;
|
||||
if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!d.isXMLDoc(a),g&&(b=d.propFix[b]||b,f=d.propHooks[b]),void 0!==c?f&&"set"in f&&void 0!==(e=f.set(a,c,b))?e:a[b]=c:f&&"get"in f&&null!==(e=f.get(a,b))?e:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||kc.test(a.nodeName)||a.href?a.tabIndex:-1}}}});v.optSelected||(d.propHooks.selected={get:function(a){a=a.parentNode;return a&&a.parentNode&&a.parentNode.selectedIndex,null}});d.each("tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" "),
|
||||
function(){d.propFix[this.toLowerCase()]=this});var Qa=/[\t\r\n\f]/g;d.fn.extend({addClass:function(a){var b,c,e,f,g;b="string"==typeof a&&a;var h=0,k=this.length;if(d.isFunction(a))return this.each(function(b){d(this).addClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(Q)||[];k>h;h++)if(c=this[h],e=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Qa," "):" ")){for(g=0;f=b[g++];)0>e.indexOf(" "+f+" ")&&(e+=f+" ");e=d.trim(e);c.className!==e&&(c.className=e)}return this},removeClass:function(a){var b,
|
||||
c,e,f,g;b=0===arguments.length||"string"==typeof a&&a;var h=0,k=this.length;if(d.isFunction(a))return this.each(function(b){d(this).removeClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(Q)||[];k>h;h++)if(c=this[h],e=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Qa," "):"")){for(g=0;f=b[g++];)for(;0<=e.indexOf(" "+f+" ");)e=e.replace(" "+f+" "," ");e=a?d.trim(e):"";c.className!==e&&(c.className=e)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&
|
||||
"string"===c?b?this.addClass(a):this.removeClass(a):this.each(d.isFunction(a)?function(c){d(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,f=0,g=d(this),h=a.match(Q)||[];b=h[f++];)g.hasClass(b)?g.removeClass(b):g.addClass(b);else("undefined"===c||"boolean"===c)&&(this.className&&r.set(this,"__className__",this.className),this.className=this.className||!1===a?"":r.get(this,"__className__")||"")})},hasClass:function(a){a=" "+a+" ";for(var b=0,c=this.length;c>
|
||||
b;b++)if(1===this[b].nodeType&&0<=(" "+this[b].className+" ").replace(Qa," ").indexOf(a))return!0;return!1}});var lc=/\r/g;d.fn.extend({val:function(a){var b,c,e,f=this[0];if(arguments.length)return e=d.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,d(this).val()):a,null==f?f="":"number"==typeof f?f+="":d.isArray(f)&&(f=d.map(f,function(a){return null==a?"":a+""})),b=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,f,
|
||||
"value")||(this.value=f))});if(f)return b=d.valHooks[f.type]||d.valHooks[f.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(f,"value"))?c:(c=f.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}});d.extend({valHooks:{option:{get:function(a){var b=d.find.attr(a,"value");return null!=b?b:d.trim(d.text(a))}},select:{get:function(a){for(var b,c=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:c.length,k=0>e?h:f?e:0;h>k;k++)if(b=c[k],!(!b.selected&&k!==e||(v.optDisabled?
|
||||
b.disabled:null!==b.getAttribute("disabled"))||b.parentNode.disabled&&d.nodeName(b.parentNode,"optgroup"))){if(a=d(b).val(),f)return a;g.push(a)}return g},set:function(a,b){for(var c,e,f=a.options,g=d.makeArray(b),h=f.length;h--;)e=f[h],(e.selected=0<=d.inArray(e.value,g))&&(c=!0);return c||(a.selectedIndex=-1),g}}}});d.each(["radio","checkbox"],function(){d.valHooks[this]={set:function(a,b){return d.isArray(b)?a.checked=0<=d.inArray(d(a).val(),b):void 0}};v.checkOn||(d.valHooks[this].get=function(a){return null===
|
||||
a.getAttribute("value")?"on":a.value})});d.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(a,b){d.fn[b]=function(a,d){return 0<arguments.length?this.on(b,null,a,d):this.trigger(b)}});d.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,
|
||||
b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Ra=d.now(),Sa=/\?/;d.parseJSON=function(a){return JSON.parse(a+"")};d.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(e){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&d.error("Invalid XML: "+a),b};var mc=/#.*$/,Bb=/([?&])_=[^&]*/,
|
||||
nc=/^(.*?):[ \t]*([^\r\n]*)$/gm,oc=/^(?:GET|HEAD)$/,pc=/^\/\//,Cb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Db={},Ja={},Eb="*/".concat("*"),Ta=n.location.href,ga=Cb.exec(Ta.toLowerCase())||[];d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ta,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ga[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Eb,text:"text/plain",html:"text/html",
|
||||
xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ka(Ka(a,d.ajaxSettings),b):Ka(d.ajaxSettings,a)},ajaxPrefilter:mb(Db),ajaxTransport:mb(Ja),ajax:function(a,b){function c(a,b,c,h){var l,p,x,D,G=b;if(2!==
|
||||
z){z=2;k&&clearTimeout(k);e=void 0;g=h||"";q.readyState=0<a?4:0;h=200<=a&&300>a||304===a;if(c){x=m;for(var E=q,J,F,A,M,N=x.contents,y=x.dataTypes;"*"===y[0];)y.shift(),void 0===J&&(J=x.mimeType||E.getResponseHeader("Content-Type"));if(J)for(F in N)if(N[F]&&N[F].test(J)){y.unshift(F);break}if(y[0]in c)A=y[0];else{for(F in c){if(!y[0]||x.converters[F+" "+y[0]]){A=F;break}M||(M=F)}A=A||M}x=A?(A!==y[0]&&y.unshift(A),c[A]):void 0}var O;a:{c=m;J=x;F=q;A=h;var I,P,K;x={};E=c.dataTypes.slice();if(E[1])for(I in c.converters)x[I.toLowerCase()]=
|
||||
c.converters[I];for(M=E.shift();M;)if(c.responseFields[M]&&(F[c.responseFields[M]]=J),!K&&A&&c.dataFilter&&(J=c.dataFilter(J,c.dataType)),K=M,M=E.shift())if("*"===M)M=K;else if("*"!==K&&K!==M){if(I=x[K+" "+M]||x["* "+M],!I)for(O in x)if(P=O.split(" "),P[1]===M&&(I=x[K+" "+P[0]]||x["* "+P[0]])){!0===I?I=x[O]:!0!==x[O]&&(M=P[0],E.unshift(P[1]));break}if(!0!==I)if(I&&c["throws"])J=I(J);else try{J=I(J)}catch(L){O={state:"parsererror",error:I?L:"No conversion from "+K+" to "+M};break a}}O={state:"success",
|
||||
data:J}}x=O;h?(m.ifModified&&(D=q.getResponseHeader("Last-Modified"),D&&(d.lastModified[f]=D),D=q.getResponseHeader("etag"),D&&(d.etag[f]=D)),204===a||"HEAD"===m.type?G="nocontent":304===a?G="notmodified":(G=x.state,l=x.data,p=x.error,h=!p)):(p=G,(a||!G)&&(G="error",0>a&&(a=0)));q.status=a;q.statusText=(b||G)+"";h?v.resolveWith(r,[l,G,q]):v.rejectWith(r,[q,G,p]);q.statusCode(H);H=void 0;n&&u.trigger(h?"ajaxSuccess":"ajaxError",[q,m,h?l:p]);C.fireWith(r,[q,G]);n&&(u.trigger("ajaxComplete",[q,m]),--d.active||
|
||||
d.event.trigger("ajaxStop"))}}"object"==typeof a&&(b=a,a=void 0);b=b||{};var e,f,g,h,k,l,n,p,m=d.ajaxSetup({},b),r=m.context||m,u=m.context&&(r.nodeType||r.jquery)?d(r):d.event,v=d.Deferred(),C=d.Callbacks("once memory"),H=m.statusCode||{},D={},E={},z=0,x="canceled",q={readyState:0,getResponseHeader:function(a){var b;if(2===z){if(!h)for(h={};b=nc.exec(g);)h[b[1].toLowerCase()]=b[2];b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===z?g:null},setRequestHeader:function(a,
|
||||
b){var c=a.toLowerCase();return z||(a=E[c]=E[c]||a,D[a]=b),this},overrideMimeType:function(a){return z||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>z)for(b in a)H[b]=[H[b],a[b]];else q.always(a[q.status]);return this},abort:function(a){a=a||x;return e&&e.abort(a),c(0,a),this}};if(v.promise(q).complete=C.add,q.success=q.done,q.error=q.fail,m.url=((a||m.url||Ta)+"").replace(mc,"").replace(pc,ga[1]+"//"),m.type=b.method||b.type||m.method||m.type,m.dataTypes=d.trim(m.dataType||"*").toLowerCase().match(Q)||
|
||||
[""],null==m.crossDomain&&(l=Cb.exec(m.url.toLowerCase()),m.crossDomain=!(!l||l[1]===ga[1]&&l[2]===ga[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(ga[3]||("http:"===ga[1]?"80":"443")))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=d.param(m.data,m.traditional)),nb(Db,m,b,q),2===z)return q;(n=d.event&&m.global)&&0===d.active++&&d.event.trigger("ajaxStart");m.type=m.type.toUpperCase();m.hasContent=!oc.test(m.type);f=m.url;m.hasContent||(m.data&&(f=m.url+=(Sa.test(f)?"&":"?")+m.data,delete m.data),
|
||||
!1===m.cache&&(m.url=Bb.test(f)?f.replace(Bb,"$1_="+Ra++):f+(Sa.test(f)?"&":"?")+"_="+Ra++));m.ifModified&&(d.lastModified[f]&&q.setRequestHeader("If-Modified-Since",d.lastModified[f]),d.etag[f]&&q.setRequestHeader("If-None-Match",d.etag[f]));(m.data&&m.hasContent&&!1!==m.contentType||b.contentType)&&q.setRequestHeader("Content-Type",m.contentType);q.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+Eb+"; q=0.01":""):m.accepts["*"]);
|
||||
for(p in m.headers)q.setRequestHeader(p,m.headers[p]);if(m.beforeSend&&(!1===m.beforeSend.call(r,q,m)||2===z))return q.abort();x="abort";for(p in{success:1,error:1,complete:1})q[p](m[p]);if(e=nb(Ja,m,b,q)){q.readyState=1;n&&u.trigger("ajaxSend",[q,m]);m.async&&0<m.timeout&&(k=setTimeout(function(){q.abort("timeout")},m.timeout));try{z=1,e.send(D,c)}catch(A){if(!(2>z))throw A;c(-1,A)}}else c(-1,"No Transport");return q},getJSON:function(a,b,c){return d.get(a,b,c,"json")},getScript:function(a,b){return d.get(a,
|
||||
void 0,b,"script")}});d.each(["get","post"],function(a,b){d[b]=function(a,e,f,g){return d.isFunction(e)&&(g=g||f,f=e,e=void 0),d.ajax({url:a,type:b,dataType:g,data:e,success:f})}});d._evalUrl=function(a){return d.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};d.fn.extend({wrapAll:function(a){var b;return d.isFunction(a)?this.each(function(b){d(this).wrapAll(a.call(this,b))}):(this[0]&&(b=d(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),
|
||||
b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(d.isFunction(a)?function(b){d(this).wrapInner(a.call(this,b))}:function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=d.isFunction(a);return this.each(function(c){d(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()}});
|
||||
d.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight};d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)};var qc=/%20/g,Rb=/\[\]$/,Fb=/\r?\n/g,rc=/^(?:submit|button|image|reset|file)$/i,sc=/^(?:input|select|textarea|keygen)/i;d.param=function(a,b){var c,e=[],f=function(a,b){b=d.isFunction(b)?b():null==b?"":b;e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,
|
||||
function(){f(this.name,this.value)});else for(c in a)La(c,a[c],b,f);return e.join("&").replace(qc,"+")};d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=d.prop(this,"elements");return a?d.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!d(this).is(":disabled")&&sc.test(this.nodeName)&&!rc.test(a)&&(this.checked||!sb.test(a))}).map(function(a,b){var c=d(this).val();return null==c?null:d.isArray(c)?
|
||||
d.map(c,function(a){return{name:b.name,value:a.replace(Fb,"\r\n")}}):{name:b.name,value:c.replace(Fb,"\r\n")}}).get()}});d.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var tc=0,Fa={},uc={0:200,1223:204},pa=d.ajaxSettings.xhr();n.attachEvent&&n.attachEvent("onunload",function(){for(var a in Fa)Fa[a]()});v.cors=!!pa&&"withCredentials"in pa;v.ajax=pa=!!pa;d.ajaxTransport(function(a){var b;return v.cors||pa&&!a.crossDomain?{send:function(c,d){var f,g=a.xhr(),h=++tc;if(g.open(a.type,
|
||||
a.url,a.async,a.username,a.password),a.xhrFields)for(f in a.xhrFields)g[f]=a.xhrFields[f];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType);a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(f in c)g.setRequestHeader(f,c[f]);b=function(a){return function(){b&&(delete Fa[h],b=g.onload=g.onerror=null,"abort"===a?g.abort():"error"===a?d(g.status,g.statusText):d(uc[g.status]||g.status,g.statusText,"string"==typeof g.responseText?{text:g.responseText}:void 0,
|
||||
g.getAllResponseHeaders()))}};g.onload=b();g.onerror=b("error");b=Fa[h]=b("abort");try{g.send(a.hasContent&&a.data||null)}catch(k){if(b)throw k;}},abort:function(){b&&b()}}:void 0});d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return d.globalEval(a),a}}});d.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type=
|
||||
"GET")});d.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=d("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove();c=null;a&&f("error"===a.type?404:200,a.type)});u.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gb=[],Ua=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gb.pop()||d.expando+"_"+Ra++;return this[a]=!0,a}});d.ajaxPrefilter("json jsonp",function(a,b,c){var e,
|
||||
f,g,h=!1!==a.jsonp&&(Ua.test(a.url)?"url":"string"==typeof a.data&&!(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ua.test(a.data)&&"data");return h||"jsonp"===a.dataTypes[0]?(e=a.jsonpCallback=d.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,h?a[h]=a[h].replace(Ua,"$1"+e):!1!==a.jsonp&&(a.url+=(Sa.test(a.url)?"&":"?")+a.jsonp+"="+e),a.converters["script json"]=function(){return g||d.error(e+" was not called"),g[0]},a.dataTypes[0]="json",f=n[e],n[e]=function(){g=
|
||||
arguments},c.always(function(){n[e]=f;a[e]&&(a.jsonpCallback=b.jsonpCallback,Gb.push(e));g&&d.isFunction(f)&&f(g[0]);g=f=void 0}),"script"):void 0});d.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1);b=b||u;var e=rb.exec(a);c=!c&&[];return e?[b.createElement(e[1])]:(e=d.buildFragment([a],b,c),c&&c.length&&d(c).remove(),d.merge([],e.childNodes))};var Hb=d.fn.load;d.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var e,
|
||||
f,g,h=this,k=a.indexOf(" ");return 0<=k&&(e=d.trim(a.slice(k)),a=a.slice(0,k)),d.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),0<h.length&&d.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){g=arguments;h.html(e?d("<div>").append(d.parseHTML(a)).find(e):a)}).complete(c&&function(a,b){h.each(c,g||[a.responseText,b,a])}),this};d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.on(b,a)}});d.expr.filters.animated=
|
||||
function(a){return d.grep(d.timers,function(b){return a===b.elem}).length};var Ib=n.document.documentElement;d.offset={setOffset:function(a,b,c){var e,f,g,h,k,l,n=d.css(a,"position"),p=d(a),m={};"static"===n&&(a.style.position="relative");k=p.offset();g=d.css(a,"top");l=d.css(a,"left");("absolute"===n||"fixed"===n)&&-1<(g+l).indexOf("auto")?(e=p.position(),h=e.top,f=e.left):(h=parseFloat(g)||0,f=parseFloat(l)||0);d.isFunction(b)&&(b=b.call(a,c,k));null!=b.top&&(m.top=b.top-k.top+h);null!=b.left&&
|
||||
(m.left=b.left-k.left+f);"using"in b?b.using.call(a,m):p.css(m)}};d.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){d.offset.setOffset(this,a,b)});var b,c,e=this[0],f={top:0,left:0},g=e&&e.ownerDocument;if(g)return b=g.documentElement,d.contains(b,e)?("undefined"!==typeof e.getBoundingClientRect&&(f=e.getBoundingClientRect()),c=ob(g),{top:f.top+c.pageYOffset-b.clientTop,left:f.left+c.pageXOffset-b.clientLeft}):f},position:function(){if(this[0]){var a,
|
||||
b,c=this[0],e={top:0,left:0};return"fixed"===d.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),d.nodeName(a[0],"html")||(e=a.offset()),e.top+=d.css(a[0],"borderTopWidth",!0),e.left+=d.css(a[0],"borderLeftWidth",!0)),{top:b.top-e.top-d.css(c,"marginTop",!0),left:b.left-e.left-d.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Ib;a&&!d.nodeName(a,"html")&&"static"===d.css(a,"position");)a=a.offsetParent;return a||
|
||||
Ib})}});d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;d.fn[a]=function(d){return V(this,function(a,d,e){var k=ob(a);return void 0===e?k?k[b]:a[d]:void(k?k.scrollTo(c?n.pageXOffset:e,c?e:n.pageYOffset):a[d]=e)},a,d,arguments.length,null)}});d.each(["top","left"],function(a,b){d.cssHooks[b]=cb(v.pixelPosition,function(a,e){return e?(e=T(a,b),Ia.test(e)?d(a).position()[b]+"px":e):void 0})});d.each({Height:"height",Width:"width"},function(a,b){d.each({padding:"inner"+
|
||||
a,content:b,"":"outer"+a},function(c,e){d.fn[e]=function(e,g){var h=arguments.length&&(c||"boolean"!=typeof e),k=c||(!0===e||!0===g?"margin":"border");return V(this,function(b,c,e){var f;return d.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?d.css(b,c,k):d.style(b,c,e,k)},b,h?e:void 0,h,null)}})});d.fn.size=function(){return this.length};d.fn.andSelf=d.fn.addBack;
|
||||
"function"==typeof define&&define.amd&&define("jquery",[],function(){return d});var vc=n.jQuery,wc=n.$;return d.noConflict=function(a){return n.$===d&&(n.$=wc),a&&n.jQuery===d&&(n.jQuery=vc),d},"undefined"===typeof L&&(n.jQuery=n.$=d),d});function add_message(n,L){var z='<div class="message '+n+'"><span class="icon"></span>'+L+'<span class="close" onclick="this.parentElement.style.display=\'none\'">x</span></div>';0<$(".message").length?$(".message").replaceWith(z):$("main").prepend(z)}
|
||||
(function(n,L){if("anime"===CONTROLLER)n(".media button.plus_one").on("click",function(z){z.stopPropagation();var L=this,D=parseInt(n(this).parent("article").find(".completed_number").text(),10);z=parseInt(n(this).parent("article").find(".total_number").text(),10);var S=n(this).parent("article").find(".name a").text(),H={id:n(this).parent("article").attr("id").replace("a-",""),increment_episodes:!0};if(isNaN(D)||0===D)H.status="currently-watching";isNaN(D)||D+1!==z||(delete H.increment_episodes,H.status=
|
||||
"completed");n.post(BASE_URL+"update",H,function(z){"completed"===z.status&&n(L).parent("article").hide();add_message("success","Sucessfully updated "+S);n(L).parent("article").find(".completed_number").text(++D)})})})(jQuery);
|
||||
(function(n,L){if("manga"===CONTROLLER)n(".edit_buttons button").on("click",function(z){var L=n(this),D=n(this).closest("article");z=D.attr("id").replace("manga-","");var S=L.is(".plus_one_chapter")?"chapter":"volume",H=parseInt(D.find("."+S+"s_read").text(),10),L=parseInt(D.find("."+S+"_count").text(),10);console.log(H);console.log(L);isNaN(H)&&(H=0);z={id:z};z[S+"s_read"]=++H;n.post(BASE_URL+"update",z,function(n){console.table(n);D.find("."+S+"s_read").text(H);add_message("success","Sucessfully updated "+
|
||||
n.manga[0].romaji_title)})})})(jQuery);
|
189
public/js/cache/table
vendored
Normal file
189
public/js/cache/table
vendored
Normal file
@ -0,0 +1,189 @@
|
||||
!function(n,z){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?z(n,!0):function(n){if(!n.document)throw Error("jQuery requires a window with a document");return z(n)}:z(n)}("undefined"!=typeof window?window:this,function(n,z){function m(a){var b="length"in a&&a.length,c=d.type(a);return"function"===c||d.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&0<b&&b-1 in a}function P(a,b,c){if(d.isFunction(b))return d.grep(a,function(a,d){return!!b.call(a,
|
||||
d,a)!==c});if(b.nodeType)return d.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(zb.test(b))return d.filter(b,a,c);b=d.filter(b,a)}return d.grep(a,function(a){return 0<=ya.call(b,a)!==c})}function C(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function V(a){var b=ab[a]={};return d.each(a.match(W)||[],function(a,d){b[d]=!0}),b}function N(){D.removeEventListener("DOMContentLoaded",N,!1);n.removeEventListener("load",N,!1);d.ready()}function U(){Object.defineProperty(this.cache={},0,
|
||||
{get:function(){return{}}});this.expando=d.expando+U.uid++}function X(a,b,c){var e;if(void 0===c&&1===a.nodeType)if(e="data-"+b.replace(Ab,"-$1").toLowerCase(),c=a.getAttribute(e),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:Bb.test(c)?d.parseJSON(c):c}catch(f){}J.set(a,b,c)}else c=void 0;return c}function ma(){return!0}function R(){return!1}function Y(){try{return D.activeElement}catch(a){}}function na(a,b){return d.nodeName(a,"table")&&d.nodeName(11!==b.nodeType?
|
||||
b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Ca(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Oa(a){var b=Cb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function oa(a,b){for(var c=0,d=a.length;d>c;c++)y.set(a[c],"globalEval",!b||y.get(b[c],"globalEval"))}function Da(a,b){var c,e,f,g,h,l;if(1===b.nodeType){if(y.hasData(a)&&(c=y.access(a),e=y.set(b,c),l=c.events))for(f in delete e.handle,
|
||||
e.events={},l)for(c=0,e=l[f].length;e>c;c++)d.event.add(b,f,l[f][c]);J.hasData(a)&&(g=J.access(a),h=d.extend({},g),J.set(b,h))}}function M(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&d.nodeName(a,b)?d.merge([a],c):c}function Z(a,b){var c,e=d(b.createElement(a)).appendTo(b.body),f=n.getDefaultComputedStyle&&(c=n.getDefaultComputedStyle(e[0]))?c.display:d.css(e[0],"display");return e.detach(),f}function Q(a){var b=
|
||||
D,c=bb[a];return c||(c=Z(a,b),"none"!==c&&c||(Ea=(Ea||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Ea[0].contentDocument,b.write(),b.close(),c=Z(a,b),Ea.detach()),bb[a]=c),c}function L(a,b,c){var e,f,g,h,l=a.style;return c=c||Fa(a),c&&(h=c.getPropertyValue(b)||c[b]),c&&(""!==h||d.contains(a.ownerDocument,a)||(h=d.style(a,b)),Pa.test(h)&&cb.test(b)&&(e=l.width,f=l.minWidth,g=l.maxWidth,l.minWidth=l.maxWidth=l.width=h,h=c.width,l.width=e,l.minWidth=f,l.maxWidth=
|
||||
g)),void 0!==h?h+"":h}function k(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function r(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,f=db.length;f--;)if(b=db[f]+c,b in a)return b;return d}function A(a,b,c){return(a=Db.exec(b))?Math.max(0,a[1]-(c||0))+(a[2]||"px"):b}function w(a,b,c,e,f){b=c===(e?"border":"content")?4:"width"===b?1:0;for(var g=0;4>b;b+=2)"margin"===c&&(g+=d.css(a,c+ia[b],!0,f)),e?("content"===c&&(g-=d.css(a,
|
||||
"padding"+ia[b],!0,f)),"margin"!==c&&(g-=d.css(a,"border"+ia[b]+"Width",!0,f))):(g+=d.css(a,"padding"+ia[b],!0,f),"padding"!==c&&(g+=d.css(a,"border"+ia[b]+"Width",!0,f)));return g}function x(a,b,c){var e=!0,f="width"===b?a.offsetWidth:a.offsetHeight,g=Fa(a),h="border-box"===d.css(a,"boxSizing",!1,g);if(0>=f||null==f){if(f=L(a,b,g),(0>f||null==f)&&(f=a.style[b]),Pa.test(f))return f;e=h&&(E.boxSizingReliable()||f===a.style[b]);f=parseFloat(f)||0}return f+w(a,b,c||(h?"border":"content"),e,g)+"px"}function H(a,
|
||||
b){for(var c,e,f,g=[],h=0,l=a.length;l>h;h++)e=a[h],e.style&&(g[h]=y.get(e,"olddisplay"),c=e.style.display,b?(g[h]||"none"!==c||(e.style.display=""),""===e.style.display&&ta(e)&&(g[h]=y.access(e,"olddisplay",Q(e.nodeName)))):(f=ta(e),"none"===c&&f||y.set(e,"olddisplay",f?c:d.css(e,"display"))));for(h=0;l>h;h++)e=a[h],e.style&&(b&&"none"!==e.style.display&&""!==e.style.display||(e.style.display=b?g[h]||"":"none"));return a}function t(a,b,c,d,f){return new t.prototype.init(a,b,c,d,f)}function B(){return setTimeout(function(){pa=
|
||||
void 0}),pa=d.now()}function u(a,b){var c,d=0,f={height:a};for(b=b?1:0;4>d;d+=2-b)c=ia[d],f["margin"+c]=f["padding"+c]=a;return b&&(f.opacity=f.width=a),f}function G(a,b,c){for(var d,f=(ja[b]||[]).concat(ja["*"]),g=0,h=f.length;h>g;g++)if(d=f[g].call(c,b,a))return d}function za(a,b){var c,e,f,g,h;for(c in a)if(e=d.camelCase(c),f=b[e],g=a[c],d.isArray(g)&&(f=g[1],g=a[c]=g[0]),c!==e&&(a[e]=g,delete a[c]),h=d.cssHooks[e],h&&"expand"in h)for(c in g=h.expand(g),delete a[e],g)c in a||(a[c]=g[c],b[c]=f);
|
||||
else b[e]=f}function K(a,b,c){var e,f=0,g=Ga.length,h=d.Deferred().always(function(){delete l.elem}),l=function(){if(e)return!1;for(var b=pa||B(),b=Math.max(0,q.startTime+q.duration-b),c=1-(b/q.duration||0),d=0,f=q.tweens.length;f>d;d++)q.tweens[d].run(c);return h.notifyWith(a,[q,c,b]),1>c&&f?b:(h.resolveWith(a,[q]),!1)},q=h.promise({elem:a,props:d.extend({},b),opts:d.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:pa||B(),duration:c.duration,tweens:[],createTween:function(b,
|
||||
c){var e=d.Tween(a,q.opts,b,c,q.opts.specialEasing[b]||q.opts.easing);return q.tweens.push(e),e},stop:function(b){var c=0,d=b?q.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)q.tweens[c].run(1);return b?h.resolveWith(a,[q,b]):h.rejectWith(a,[q,b]),this}});c=q.props;for(za(c,q.opts.specialEasing);g>f;f++)if(b=Ga[f].call(q,a,c,q.opts))return b;return d.map(c,G,q),d.isFunction(q.opts.start)&&q.opts.start.call(a,q),d.fx.timer(d.extend(l,{elem:a,anim:q,queue:q.opts.queue})),q.progress(q.opts.progress).done(q.opts.done,
|
||||
q.opts.complete).fail(q.opts.fail).always(q.opts.always)}function aa(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var e,f=0,g=b.toLowerCase().match(W)||[];if(d.isFunction(c))for(;e=g[f++];)"+"===e[0]?(e=e.slice(1)||"*",(a[e]=a[e]||[]).unshift(c)):(a[e]=a[e]||[]).push(c)}}function Aa(a,b,c,e){function f(l){var q;return g[l]=!0,d.each(a[l]||[],function(a,d){var l=d(b,c,e);return"string"!=typeof l||h||g[l]?h?!(q=l):void 0:(b.dataTypes.unshift(l),f(l),!1)}),q}var g={},h=a===Qa;return f(b.dataTypes[0])||
|
||||
!g["*"]&&f("*")}function Ba(a,b){var c,e,f=d.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((f[c]?a:e||(e={}))[c]=b[c]);return e&&d.extend(!0,a,e),a}function Ra(a,b,c,e){var f;if(d.isArray(b))d.each(b,function(b,d){c||Fb.test(a)?e(a,d):Ra(a+"["+("object"==typeof d?b:"")+"]",d,c,e)});else if(c||"object"!==d.type(b))e(a,b);else for(f in b)Ra(a+"["+f+"]",b[f],c,e)}function eb(a){return d.isWindow(a)?a:9===a.nodeType&&a.defaultView}var ba=[],ca=ba.slice,fb=ba.concat,Sa=ba.push,ya=ba.indexOf,
|
||||
Ha={},Gb=Ha.toString,Ta=Ha.hasOwnProperty,E={},D=n.document,d=function(a,b){return new d.fn.init(a,b)},Hb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Ib=/^-ms-/,Jb=/-([\da-z])/gi,Kb=function(a,b){return b.toUpperCase()};d.fn=d.prototype={jquery:"2.1.4",constructor:d,selector:"",length:0,toArray:function(){return ca.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:ca.call(this)},pushStack:function(a){a=d.merge(this.constructor(),a);return a.prevObject=this,a.context=this.context,
|
||||
a},each:function(a,b){return d.each(this,a,b)},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(ca.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length;a=+a+(0>a?b:0);return this.pushStack(0<=a&&b>a?[this[a]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Sa,sort:ba.sort,splice:ba.splice};d.extend=d.fn.extend=function(){var a,
|
||||
b,c,e,f,g,h=arguments[0]||{},l=1,q=arguments.length,k=!1;"boolean"==typeof h&&(k=h,h=arguments[l]||{},l++);"object"==typeof h||d.isFunction(h)||(h={});for(l===q&&(h=this,l--);q>l;l++)if(null!=(a=arguments[l]))for(b in a)c=h[b],e=a[b],h!==e&&(k&&e&&(d.isPlainObject(e)||(f=d.isArray(e)))?(f?(f=!1,g=c&&d.isArray(c)?c:[]):g=c&&d.isPlainObject(c)?c:{},h[b]=d.extend(k,g,e)):void 0!==e&&(h[b]=e));return h};d.extend({expando:"jQuery"+("2.1.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw Error(a);
|
||||
},noop:function(){},isFunction:function(a){return"function"===d.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!d.isArray(a)&&0<=a-parseFloat(a)+1},isPlainObject:function(a){return"object"!==d.type(a)||a.nodeType||d.isWindow(a)?!1:a.constructor&&!Ta.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){for(var b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?
|
||||
Ha[Gb.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;(a=d.trim(a))&&(1===a.indexOf("use strict")?(b=D.createElement("script"),b.text=a,D.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(Ib,"ms-").replace(Jb,Kb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,f=0,g=a.length,h=m(a);if(c)if(h)for(;g>f&&(d=b.apply(a[f],c),!1!==d);f++);else for(f in a){if(d=b.apply(a[f],c),!1===
|
||||
d)break}else if(h)for(;g>f&&(d=b.call(a[f],f,a[f]),!1!==d);f++);else for(f in a)if(d=b.call(a[f],f,a[f]),!1===d)break;return a},trim:function(a){return null==a?"":(a+"").replace(Hb,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(m(Object(a))?d.merge(c,"string"==typeof a?[a]:a):Sa.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:ya.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,f=a.length;c>d;d++)a[f++]=b[d];return a.length=f,a},grep:function(a,b,c){for(var d=[],f=0,g=a.length,
|
||||
h=!c;g>f;f++)c=!b(a[f],f),c!==h&&d.push(a[f]);return d},map:function(a,b,c){var d,f=0,g=a.length,h=[];if(m(a))for(;g>f;f++)d=b(a[f],f,c),null!=d&&h.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&h.push(d);return fb.apply([],h)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),d.isFunction(a)?(e=ca.call(arguments,2),f=function(){return a.apply(b||this,e.concat(ca.call(arguments)))},f.guid=a.guid=a.guid||d.guid++,f):void 0},now:Date.now,support:E});d.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
|
||||
function(a,b){Ha["[object "+b+"]"]=b.toLowerCase()});var qa=function(a){function b(a,b,c,d){var e,f,g,h,l;if((b?b.ownerDocument||b:da)!==T&&C(b),b=b||T,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&ha){if(11!==h&&(e=ta.exec(a)))if(g=e[1])if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else{if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&J(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return L.apply(c,b.getElementsByTagName(a)),
|
||||
c;if((g=e[3])&&u.getElementsByClassName)return L.apply(c,b.getElementsByClassName(g)),c}if(u.qsa&&(!S||!S.test(a))){if(f=e=I,g=b,l=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){h=H(a);(e=b.getAttribute("id"))?f=e.replace(va,"\\$&"):b.setAttribute("id",f);f="[id='"+f+"'] ";for(g=h.length;g--;)h[g]=f+r(h[g]);g=ja.test(a)&&n(b.parentNode)||b;l=h.join(",")}if(l)try{return L.apply(c,g.querySelectorAll(l)),c}catch(q){}finally{e||b.removeAttribute("id")}}}return P(a.replace(X,"$1"),b,c,d)}function c(){function a(c,
|
||||
d){return b.push(c+" ")>v.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[I]=!0,a}function f(a){var b=T.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}function g(a,b){for(var c=a.split("|"),d=a.length;d--;)v.attrHandle[c[d]]=b}function h(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||-2147483648)-(~a.sourceIndex||-2147483648);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;
|
||||
return a?1:-1}function l(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function q(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function k(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function n(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function p(){}function r(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;
|
||||
return d}function m(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=M++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,l,Ua=[ea,f];if(g)for(;b=b[d];){if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(l=b[I]||(b[I]={}),(h=l[d])&&h[0]===ea&&h[1]===f)return Ua[2]=h[2];if(l[d]=Ua,Ua[2]=a(b,c,g))return!0}}}function A(a){return 1<a.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}
|
||||
function x(a,b,c,d,e){for(var f,g=[],h=0,l=a.length,q=null!=b;l>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),q&&b.push(h));return g}function t(a,c,f,g,h,l){return g&&!g[I]&&(g=t(g)),h&&!h[I]&&(h=t(h,l)),d(function(d,e,l,q){var p,k,n=[],Va=[],r=e.length,m;if(!(m=d)){m=c||"*";for(var F=l.nodeType?[l]:l,A=[],t=0,u=F.length;u>t;t++)b(m,F[t],A);m=A}m=!a||!d&&c?m:x(m,n,a,l,q);F=f?h||(d?a:r||g)?[]:e:m;if(f&&f(m,F,l,q),g)for(p=x(F,Va),g(p,[],l,q),l=p.length;l--;)(k=p[l])&&(F[Va[l]]=!(m[Va[l]]=k));if(d){if(h||
|
||||
a){if(h){p=[];for(l=F.length;l--;)(k=F[l])&&p.push(m[l]=k);h(null,F=[],p,q)}for(l=F.length;l--;)(k=F[l])&&-1<(p=h?R(d,k):n[l])&&(d[p]=!(e[p]=k))}}else F=x(F===e?F.splice(r,F.length):F),h?h(null,e,F,q):L.apply(e,F)})}function w(a){var b,c,d,e=a.length,f=v.relative[a[0].type];c=f||v.relative[" "];for(var g=f?1:0,h=m(function(a){return a===b},c,!0),l=m(function(a){return-1<R(b,a)},c,!0),q=[function(a,c,d){a=!f&&(d||c!==K)||((b=c).nodeType?h(a,c,d):l(a,c,d));return b=null,a}];e>g;g++)if(c=v.relative[a[g].type])q=
|
||||
[m(A(q),c)];else{if(c=v.filter[a[g].type].apply(null,a[g].matches),c[I]){for(d=++g;e>d&&!v.relative[a[d].type];d++);return t(1<g&&A(q),1<g&&r(a.slice(0,g-1).concat({value:" "===a[g-2].type?"*":""})).replace(X,"$1"),c,d>g&&w(a.slice(g,d)),e>d&&w(a=a.slice(d)),e>d&&r(a))}q.push(c)}return A(q)}function B(a,c){var f=0<c.length,g=0<a.length,h=function(d,e,h,l,q){var p,k,F,wa=0,n="0",m=d&&[],r=[],A=K,t=d||g&&v.find.TAG("*",q),u=ea+=null==A?1:Math.random()||.1,Eb=t.length;for(q&&(K=e!==T&&e);n!==Eb&&null!=
|
||||
(p=t[n]);n++){if(g&&p){for(k=0;F=a[k++];)if(F(p,e,h)){l.push(p);break}q&&(ea=u)}f&&((p=!F&&p)&&wa--,d&&m.push(p))}if(wa+=n,f&&n!==wa){for(k=0;F=c[k++];)F(m,r,e,h);if(d){if(0<wa)for(;n--;)m[n]||r[n]||(r[n]=V.call(l));r=x(r)}L.apply(l,r);q&&!d&&0<r.length&&1<wa+c.length&&b.uniqueSort(l)}return q&&(ea=u,K=A),m};return f?d(h):h}var y,u,v,G,D,H,E,P,K,z,xa,C,T,fa,ha,S,ua,Ia,J,I="sizzle"+1*new Date,da=a.document,ea=0,M=0,aa=c(),N=c(),Q=c(),za=function(a,b){return a===b&&(xa=!0),0},U={}.hasOwnProperty,O=
|
||||
[],V=O.pop,W=O.push,L=O.push,Aa=O.slice,R=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},ca="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),ga="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ca+"))|)[\\x20\\t\\r\\n\\f]*\\]",Z=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+
|
||||
ga+")*)|.*)\\)|)",ia=RegExp("[\\x20\\t\\r\\n\\f]+","g"),X=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ma=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,na=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,oa=RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),pa=new RegExp(Z),Ba=new RegExp("^"+ca+"$"),ba={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG:new RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w",
|
||||
"w*")+")"),ATTR:new RegExp("^"+ga),PSEUDO:new RegExp("^"+Z),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},
|
||||
qa=/^(?:input|select|textarea|button)$/i,ra=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,ta=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ja=/[+~]/,va=/'|\\/g,ka=RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),la=function(a,b,c){a="0x"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,1023&a|56320)},sa=function(){C()};try{L.apply(O=Aa.call(da.childNodes),da.childNodes),O[da.childNodes.length].nodeType}catch(ya){L={apply:O.length?function(a,b){W.apply(a,
|
||||
Aa.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}u=b.support={};D=b.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};C=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:da;return d!==T&&9===d.nodeType&&d.documentElement?(T=d,fa=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",sa,!1):c.attachEvent&&c.attachEvent("onunload",sa)),ha=!D(d),u.attributes=f(function(a){return a.className=
|
||||
"i",!a.getAttribute("className")}),u.getElementsByTagName=f(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),u.getElementsByClassName=Y.test(d.getElementsByClassName),u.getById=f(function(a){return fa.appendChild(a).id=I,!d.getElementsByName||!d.getElementsByName(I).length}),u.getById?(v.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&ha){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},v.filter.ID=function(a){var b=a.replace(ka,la);
|
||||
return function(a){return a.getAttribute("id")===b}}):(delete v.find.ID,v.filter.ID=function(a){var b=a.replace(ka,la);return function(a){return(a="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id"))&&a.value===b}}),v.find.TAG=u.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):u.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},
|
||||
v.find.CLASS=u.getElementsByClassName&&function(a,b){return ha?b.getElementsByClassName(a):void 0},ua=[],S=[],(u.qsa=Y.test(d.querySelectorAll))&&(f(function(a){fa.appendChild(a).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\f]' msallowcapture=''><option selected=''></option></select>";a.querySelectorAll("[msallowcapture^='']").length&&S.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");a.querySelectorAll("[selected]").length||S.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
|
||||
a.querySelectorAll("[id~="+I+"-]").length||S.push("~=");a.querySelectorAll(":checked").length||S.push(":checked");a.querySelectorAll("a#"+I+"+*").length||S.push(".#.+[+~]")}),f(function(a){var b=d.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("name","D");a.querySelectorAll("[name=d]").length&&S.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");a.querySelectorAll(":enabled").length||S.push(":enabled",":disabled");a.querySelectorAll("*,:x");S.push(",.*:")})),(u.matchesSelector=
|
||||
Y.test(Ia=fa.matches||fa.webkitMatchesSelector||fa.mozMatchesSelector||fa.oMatchesSelector||fa.msMatchesSelector))&&f(function(a){u.disconnectedMatch=Ia.call(a,"div");Ia.call(a,"[s!='']:x");ua.push("!=",Z)}),S=S.length&&new RegExp(S.join("|")),ua=ua.length&&new RegExp(ua.join("|")),b=Y.test(fa.compareDocumentPosition),J=b||Y.test(fa.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&
|
||||
16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},za=b?function(a,b){if(a===b)return xa=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!u.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===da&&J(da,a)?-1:b===d||b.ownerDocument===da&&J(da,b)?1:z?R(z,a)-R(z,b):0:4&c?-1:1)}:function(a,b){if(a===b)return xa=!0,0;var c,
|
||||
e=0;c=a.parentNode;var f=b.parentNode,g=[a],l=[b];if(!c||!f)return a===d?-1:b===d?1:c?-1:f?1:z?R(z,a)-R(z,b):0;if(c===f)return h(a,b);for(c=a;c=c.parentNode;)g.unshift(c);for(c=b;c=c.parentNode;)l.unshift(c);for(;g[e]===l[e];)e++;return e?h(g[e],l[e]):g[e]===da?-1:l[e]===da?1:0},d):T};b.matches=function(a,c){return b(a,null,null,c)};b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==T&&C(a),c=c.replace(oa,"='$1']"),!(!u.matchesSelector||!ha||ua&&ua.test(c)||S&&S.test(c)))try{var d=Ia.call(a,
|
||||
c);if(d||u.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return 0<b(c,T,null,[a]).length};b.contains=function(a,b){return(a.ownerDocument||a)!==T&&C(a),J(a,b)};b.attr=function(a,b){(a.ownerDocument||a)!==T&&C(a);var c=v.attrHandle[b.toLowerCase()],c=c&&U.call(v.attrHandle,b.toLowerCase())?c(a,b,!ha):void 0;return void 0!==c?c:u.attributes||!ha?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};b.error=function(a){throw Error("Syntax error, unrecognized expression: "+
|
||||
a);};b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(xa=!u.detectDuplicates,z=!u.sortStable&&a.slice(0),a.sort(za),xa){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return z=null,a};G=b.getText=function(a){var b,c="",d=0;if(b=a.nodeType)if(1===b||9===b||11===b){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=G(a)}else{if(3===b||4===b)return a.nodeValue}else for(;b=a[d++];)c+=G(b);return c};v=b.selectors={cacheLength:50,createPseudo:d,
|
||||
match:ba,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ka,la),a[3]=(a[3]||a[4]||a[5]||"").replace(ka,la),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&
|
||||
b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return ba.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&pa.test(c)&&(b=H(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ka,la).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=aa[a+" "];return b||(b=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"))&&
|
||||
aa(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){e=b.attr(e,a);return null==e?"!="===c:c?(e+="","="===c?e===d:"!="===c?e!==d:"^="===c?d&&0===e.indexOf(d):"*="===c?d&&-1<e.indexOf(d):"$="===c?d&&e.slice(-d.length)===d:"~="===c?-1<(" "+e.replace(ia," ")+" ").indexOf(d):"|="===c?e===d||e.slice(0,d.length+1)===d+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,
|
||||
3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,l){var q,p,k,n,F;c=f!==g?"nextSibling":"previousSibling";var m=b.parentNode,r=h&&b.nodeName.toLowerCase();l=!l&&!h;if(m){if(f){for(;c;){for(p=b;p=p[c];)if(h?p.nodeName.toLowerCase()===r:1===p.nodeType)return!1;F=c="only"===a&&!F&&"nextSibling"}return!0}if(F=[g?m.firstChild:m.lastChild],g&&l)for(l=m[I]||(m[I]={}),q=l[a]||[],n=q[0]===ea&&q[1],k=q[0]===ea&&q[2],p=n&&m.childNodes[n];p=++n&&p&&
|
||||
p[c]||(k=n=0)||F.pop();){if(1===p.nodeType&&++k&&p===b){l[a]=[ea,n,k];break}}else if(l&&(q=(b[I]||(b[I]={}))[a])&&q[0]===ea)k=q[1];else for(;(p=++n&&p&&p[c]||(k=n=0)||F.pop())&&((h?p.nodeName.toLowerCase()!==r:1!==p.nodeType)||!++k||(l&&((p[I]||(p[I]={}))[a]=[ea,k]),p!==b)););return k-=e,k===d||0===k%d&&0<=k/d}}},PSEUDO:function(a,c){var f,g=v.pseudos[a]||v.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return g[I]?g(c):1<g.length?(f=[a,a,"",c],v.setFilters.hasOwnProperty(a.toLowerCase())?
|
||||
d(function(a,b){for(var d,e=g(a,c),f=e.length;f--;)d=R(a,e[f]),a[d]=!(b[d]=e[f])}):function(a){return g(a,0,f)}):g}},pseudos:{not:d(function(a){var b=[],c=[],f=E(a.replace(X,"$1"));return f[I]?d(function(a,b,c,d){var e;c=f(a,null,d,[]);for(d=a.length;d--;)(e=c[d])&&(a[d]=!(b[d]=e))}):function(a,d,e){return b[0]=a,f(b,null,e,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return 0<b(a,c).length}}),contains:d(function(a){return a=a.replace(ka,la),function(b){return-1<(b.textContent||b.innerText||
|
||||
G(b)).indexOf(a)}}),lang:d(function(a){return Ba.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(ka,la).toLowerCase(),function(b){var c;do if(c=ha?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===fa},focus:function(a){return a===T.activeElement&&(!T.hasFocus||T.hasFocus())&&
|
||||
!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!v.pseudos.empty(a)},header:function(a){return ra.test(a.nodeName)},input:function(a){return qa.test(a.nodeName)},
|
||||
button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:k(function(){return[0]}),last:k(function(a,b){return[b-1]}),eq:k(function(a,b,c){return[0>c?c+b:c]}),even:k(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:k(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:k(function(a,b,c){for(b=
|
||||
0>c?c+b:c;0<=--b;)a.push(b);return a}),gt:k(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};v.pseudos.nth=v.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})v.pseudos[y]=l(y);for(y in{submit:!0,reset:!0})v.pseudos[y]=q(y);p.prototype=v.filters=v.pseudos;v.setFilters=new p;H=b.tokenize=function(a,c){var d,e,f,g,h,l,q;if(h=N[a+" "])return c?0:h.slice(0);h=a;l=[];for(q=v.preFilter;h;){d&&!(e=ma.exec(h))||(e&&(h=h.slice(e[0].length)||h),l.push(f=[]));d=!1;(e=na.exec(h))&&
|
||||
(d=e.shift(),f.push({value:d,type:e[0].replace(X," ")}),h=h.slice(d.length));for(g in v.filter)!(e=ba[g].exec(h))||q[g]&&!(e=q[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):N(a,l).slice(0)};return E=b.compile=function(a,b){var c,d=[],e=[],f=Q[a+" "];if(!f){b||(b=H(a));for(c=b.length;c--;)f=w(b[c]),f[I]?d.push(f):e.push(f);f=Q(a,B(e,d));f.selector=a}return f},P=b.select=function(a,b,c,d){var e,f,g,h,l,q="function"==typeof a&&
|
||||
a,p=!d&&H(a=q.selector||a);if(c=c||[],1===p.length){if(f=p[0]=p[0].slice(0),2<f.length&&"ID"===(g=f[0]).type&&u.getById&&9===b.nodeType&&ha&&v.relative[f[1].type]){if(b=(v.find.ID(g.matches[0].replace(ka,la),b)||[])[0],!b)return c;q&&(b=b.parentNode);a=a.slice(f.shift().value.length)}for(e=ba.needsContext.test(a)?0:f.length;e--&&(g=f[e],!v.relative[h=g.type]);)if((l=v.find[h])&&(d=l(g.matches[0].replace(ka,la),ja.test(f[0].type)&&n(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&r(f),!a)return L.apply(c,
|
||||
d),c;break}}return(q||E(a,p))(d,b,!ha,c,ja.test(a)&&n(b.parentNode)||b),c},u.sortStable=I.split("").sort(za).join("")===I,u.detectDuplicates=!!xa,C(),u.sortDetached=f(function(a){return 1&a.compareDocumentPosition(T.createElement("div"))}),f(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||g("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),u.attributes&&f(function(a){return a.innerHTML="<input/>",
|
||||
a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||g("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),f(function(a){return null==a.getAttribute("disabled")})||g("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",function(a,b,c){var d;return c?void 0:!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(n);d.find=qa;d.expr=
|
||||
qa.selectors;d.expr[":"]=d.expr.pseudos;d.unique=qa.uniqueSort;d.text=qa.getText;d.isXMLDoc=qa.isXML;d.contains=qa.contains;var gb=d.expr.match.needsContext,hb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,zb=/^.[^:#\[\.,]*$/;d.filter=function(a,b,c){var e=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===e.nodeType?d.find.matchesSelector(e,a)?[e]:[]:d.find.matches(a,d.grep(b,function(a){return 1===a.nodeType}))};d.fn.extend({find:function(a){var b,c=this.length,e=[],f=this;if("string"!=typeof a)return this.pushStack(d(a).filter(function(){for(b=
|
||||
0;c>b;b++)if(d.contains(f[b],this))return!0}));for(b=0;c>b;b++)d.find(a,f[b],e);return e=this.pushStack(1<c?d.unique(e):e),e.selector=this.selector?this.selector+" "+a:a,e},filter:function(a){return this.pushStack(P(this,a||[],!1))},not:function(a){return this.pushStack(P(this,a||[],!0))},is:function(a){return!!P(this,"string"==typeof a&&gb.test(a)?d(a):a||[],!1).length}});var Ja,Mb=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(d.fn.init=function(a,b){var c,e;if(!a)return this;if("string"==typeof a){if(c=
|
||||
"<"===a[0]&&">"===a[a.length-1]&&3<=a.length?[null,a,null]:Mb.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||Ja).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof d?b[0]:b,d.merge(this,d.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:D,!0)),hb.test(c[1])&&d.isPlainObject(b))for(c in b)d.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return e=D.getElementById(c[2]),e&&e.parentNode&&(this.length=1,this[0]=e),this.context=D,this.selector=a,this}return a.nodeType?(this.context=
|
||||
this[0]=a,this.length=1,this):d.isFunction(a)?"undefined"!=typeof Ja.ready?Ja.ready(a):a(d):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),d.makeArray(a,this))}).prototype=d.fn;Ja=d(D);var Nb=/^(?:parents|prev(?:Until|All))/,Ob={children:!0,contents:!0,next:!0,prev:!0};d.extend({dir:function(a,b,c){for(var e=[],f=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(f&&d(a).is(c))break;e.push(a)}return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&
|
||||
a!==b&&c.push(a);return c}});d.fn.extend({has:function(a){var b=d(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(d.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,e=0,f=this.length,g=[],h=gb.test(a)||"string"!=typeof a?d(a,b||this.context):0;f>e;e++)for(c=this[e];c&&c!==b;c=c.parentNode)if(11>c.nodeType&&(h?-1<h.index(c):1===c.nodeType&&d.find.matchesSelector(c,a))){g.push(c);break}return this.pushStack(1<g.length?d.unique(g):g)},index:function(a){return a?
|
||||
"string"==typeof a?ya.call(d(a),this[0]):ya.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(d.unique(d.merge(this.get(),d(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});d.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return C(a,
|
||||
"nextSibling")},prev:function(a){return C(a,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return a.contentDocument||d.merge([],a.childNodes)}},function(a,
|
||||
b){d.fn[a]=function(c,e){var f=d.map(this,b,c);return"Until"!==a.slice(-5)&&(e=c),e&&"string"==typeof e&&(f=d.filter(e,f)),1<this.length&&(Ob[a]||d.unique(f),Nb.test(a)&&f.reverse()),this.pushStack(f)}});var W=/\S+/g,ab={};d.Callbacks=function(a){a="string"==typeof a?ab[a]||V(a):d.extend({},a);var b,c,e,f,g,h,l=[],q=!a.once&&[],k=function(d){b=a.memory&&d;c=!0;h=f||0;f=0;g=l.length;for(e=!0;l&&g>h;h++)if(!1===l[h].apply(d[0],d[1])&&a.stopOnFalse){b=!1;break}e=!1;l&&(q?q.length&&k(q.shift()):b?l=[]:
|
||||
n.disable())},n={add:function(){if(l){var c=l.length;!function Lb(b){d.each(b,function(b,c){var e=d.type(c);"function"===e?a.unique&&n.has(c)||l.push(c):c&&c.length&&"string"!==e&&Lb(c)})}(arguments);e?g=l.length:b&&(f=c,k(b))}return this},remove:function(){return l&&d.each(arguments,function(a,b){for(var c;-1<(c=d.inArray(b,l,c));)l.splice(c,1),e&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return a?-1<d.inArray(a,l):!(!l||!l.length)},empty:function(){return l=[],g=0,this},disable:function(){return l=
|
||||
q=b=void 0,this},disabled:function(){return!l},lock:function(){return q=void 0,b||n.disable(),this},locked:function(){return!q},fireWith:function(a,b){return!l||c&&!q||(b=b||[],b=[a,b.slice?b.slice():b],e?q.push(b):k(b)),this},fire:function(){return n.fireWith(this,arguments),this},fired:function(){return!!c}};return n};d.extend({Deferred:function(a){var b=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),"rejected"],["notify","progress",d.Callbacks("memory")]],
|
||||
c="pending",e={state:function(){return c},always:function(){return f.done(arguments).fail(arguments),this},then:function(){var a=arguments;return d.Deferred(function(c){d.each(b,function(b,q){var k=d.isFunction(a[b])&&a[b];f[q[1]](function(){var a=k&&k.apply(this,arguments);a&&d.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[q[0]+"With"](this===e?c.promise():this,k?[a]:arguments)})});a=null}).promise()},promise:function(a){return null!=a?d.extend(a,e):e}},f=
|
||||
{};return e.pipe=e.then,d.each(b,function(a,d){var l=d[2],q=d[3];e[d[1]]=l.add;q&&l.add(function(){c=q},b[1^a][2].disable,b[2][2].lock);f[d[0]]=function(){return f[d[0]+"With"](this===f?e:this,arguments),this};f[d[0]+"With"]=l.fireWith}),e.promise(f),a&&a.call(f,f),f},when:function(a){var b=0,c=ca.call(arguments),e=c.length,f=1!==e||a&&d.isFunction(a.promise)?e:0,g=1===f?a:d.Deferred(),h=function(a,b,c){return function(d){b[a]=this;c[a]=1<arguments.length?ca.call(arguments):d;c===l?g.notifyWith(b,
|
||||
c):--f||g.resolveWith(b,c)}},l,q,k;if(1<e)for(l=Array(e),q=Array(e),k=Array(e);e>b;b++)c[b]&&d.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,q,l)):--f;return f||g.resolveWith(k,c),g.promise()}});var Ka;d.fn.ready=function(a){return d.ready.promise().done(a),this};d.extend({isReady:!1,readyWait:1,holdReady:function(a){a?d.readyWait++:d.ready(!0)},ready:function(a){(!0===a?--d.readyWait:d.isReady)||(d.isReady=!0,!0!==a&&0<--d.readyWait||(Ka.resolveWith(D,[d]),d.fn.triggerHandler&&
|
||||
(d(D).triggerHandler("ready"),d(D).off("ready"))))}});d.ready.promise=function(a){return Ka||(Ka=d.Deferred(),"complete"===D.readyState?setTimeout(d.ready):(D.addEventListener("DOMContentLoaded",N,!1),n.addEventListener("load",N,!1))),Ka.promise(a)};d.ready.promise();var ga=d.access=function(a,b,c,e,f,g,h){var l=0,q=a.length,k=null==c;if("object"===d.type(c))for(l in f=!0,c)d.access(a,b,l,c[l],!0,g,h);else if(void 0!==e&&(f=!0,d.isFunction(e)||(h=!0),k&&(h?(b.call(a,e),b=null):(k=b,b=function(a,b,
|
||||
c){return k.call(d(a),c)})),b))for(;q>l;l++)b(a[l],c,h?e:e.call(a[l],l,b(a[l],c)));return f?a:k?b.call(a):q?b(a[0],c):g};d.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};U.uid=1;U.accepts=d.acceptData;U.prototype={key:function(a){if(!U.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=U.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(e){b[this.expando]=c,d.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var e;a=
|
||||
this.key(a);var f=this.cache[a];if("string"==typeof b)f[b]=c;else if(d.isEmptyObject(f))d.extend(this.cache[a],b);else for(e in b)f[e]=b[e];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var e;return void 0===b||b&&"string"==typeof b&&void 0===c?(e=this.get(a,b),void 0!==e?e:this.get(a,d.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else for(d.isArray(b)?
|
||||
e=b.concat(b.map(d.camelCase)):(c=d.camelCase(b),b in g?e=[b,c]:(e=c,e=e in g?[e]:e.match(W)||[])),c=e.length;c--;)delete g[e[c]]},hasData:function(a){return!d.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var y=new U,J=new U,Bb=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ab=/([A-Z])/g;d.extend({hasData:function(a){return J.hasData(a)||y.hasData(a)},data:function(a,b,c){return J.access(a,b,c)},removeData:function(a,b){J.remove(a,b)},
|
||||
_data:function(a,b,c){return y.access(a,b,c)},_removeData:function(a,b){y.remove(a,b)}});d.fn.extend({data:function(a,b){var c,e,f,g=this[0],h=g&&g.attributes;if(void 0===a){if(this.length&&(f=J.get(g),1===g.nodeType&&!y.get(g,"hasDataAttrs"))){for(c=h.length;c--;)h[c]&&(e=h[c].name,0===e.indexOf("data-")&&(e=d.camelCase(e.slice(5)),X(g,e,f[e])));y.set(g,"hasDataAttrs",!0)}return f}return"object"==typeof a?this.each(function(){J.set(this,a)}):ga(this,function(b){var c,e=d.camelCase(a);if(g&&void 0===
|
||||
b){if((c=J.get(g,a),void 0!==c)||(c=J.get(g,e),void 0!==c)||(c=X(g,e,void 0),void 0!==c))return c}else this.each(function(){var c=J.get(this,e);J.set(this,e,b);-1!==a.indexOf("-")&&void 0!==c&&J.set(this,a,b)})},null,b,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){J.remove(this,a)})}});d.extend({queue:function(a,b,c){var e;return a?(b=(b||"fx")+"queue",e=y.get(a,b),c&&(!e||d.isArray(c)?e=y.access(a,b,d.makeArray(c)):e.push(c)),e||[]):void 0},dequeue:function(a,b){b=
|
||||
b||"fx";var c=d.queue(a,b),e=c.length,f=c.shift(),g=d._queueHooks(a,b),h=function(){d.dequeue(a,b)};"inprogress"===f&&(f=c.shift(),e--);f&&("fx"===b&&c.unshift("inprogress"),delete g.stop,f.call(a,h,g));!e&&g&&g.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return y.get(a,c)||y.access(a,c,{empty:d.Callbacks("once memory").add(function(){y.remove(a,[b+"queue",c])})})}});d.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?d.queue(this[0],
|
||||
a):void 0===b?this:this.each(function(){var c=d.queue(this,a,b);d._queueHooks(this,a);"fx"===a&&"inprogress"!==c[0]&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,e=1,f=d.Deferred(),g=this,h=this.length,l=function(){--e||f.resolveWith(g,[g])};"string"!=typeof a&&(b=a,a=void 0);for(a=a||"fx";h--;)(c=y.get(g[h],a+"queueHooks"))&&c.empty&&(e++,c.empty.add(l));return l(),f.promise(b)}});
|
||||
var La=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ia=["Top","Right","Bottom","Left"],ta=function(a,b){return a=b||a,"none"===d.css(a,"display")||!d.contains(a.ownerDocument,a)},ib=/^(?:checkbox|radio)$/i;!function(){var a=D.createDocumentFragment().appendChild(D.createElement("div")),b=D.createElement("input");b.setAttribute("type","radio");b.setAttribute("checked","checked");b.setAttribute("name","t");a.appendChild(b);E.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked;a.innerHTML="<textarea>x</textarea>";
|
||||
E.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue}();E.focusinBubbles="onfocusin"in n;var Pb=/^key/,Qb=/^(?:mouse|pointer|contextmenu)|click/,jb=/^(?:focusinfocus|focusoutblur)$/,kb=/^([^.]*)(?:\.(.+)|)$/;d.event={global:{},add:function(a,b,c,e,f){var g,h,l,q,k,n,p,m,r,A;if(k=y.get(a))for(c.handler&&(g=c,c=g.handler,f=g.selector),c.guid||(c.guid=d.guid++),(q=k.events)||(q=k.events={}),(h=k.handle)||(h=k.handle=function(b){return"undefined"!==typeof d&&d.event.triggered!==b.type?d.event.dispatch.apply(a,
|
||||
arguments):void 0}),b=(b||"").match(W)||[""],k=b.length;k--;)l=kb.exec(b[k])||[],r=A=l[1],l=(l[2]||"").split(".").sort(),r&&(p=d.event.special[r]||{},r=(f?p.delegateType:p.bindType)||r,p=d.event.special[r]||{},n=d.extend({type:r,origType:A,data:e,handler:c,guid:c.guid,selector:f,needsContext:f&&d.expr.match.needsContext.test(f),namespace:l.join(".")},g),(m=q[r])||(m=q[r]=[],m.delegateCount=0,p.setup&&!1!==p.setup.call(a,e,l,h)||a.addEventListener&&a.addEventListener(r,h,!1)),p.add&&(p.add.call(a,
|
||||
n),n.handler.guid||(n.handler.guid=c.guid)),f?m.splice(m.delegateCount++,0,n):m.push(n),d.event.global[r]=!0)},remove:function(a,b,c,e,f){var g,h,l,q,k,n,p,m,r,A,t,u=y.hasData(a)&&y.get(a);if(u&&(q=u.events)){b=(b||"").match(W)||[""];for(k=b.length;k--;)if(l=kb.exec(b[k])||[],r=t=l[1],A=(l[2]||"").split(".").sort(),r){p=d.event.special[r]||{};r=(e?p.delegateType:p.bindType)||r;m=q[r]||[];l=l[2]&&new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)");for(h=g=m.length;g--;)n=m[g],!f&&t!==n.origType||
|
||||
c&&c.guid!==n.guid||l&&!l.test(n.namespace)||e&&e!==n.selector&&("**"!==e||!n.selector)||(m.splice(g,1),n.selector&&m.delegateCount--,p.remove&&p.remove.call(a,n));h&&!m.length&&(p.teardown&&!1!==p.teardown.call(a,A,u.handle)||d.removeEvent(a,r,u.handle),delete q[r])}else for(r in q)d.event.remove(a,r+b[k],c,e,!0);d.isEmptyObject(q)&&(delete u.handle,y.remove(a,"events"))}},trigger:function(a,b,c,e){var f,g,h,l,q,k,r,p=[c||D],m=Ta.call(a,"type")?a.type:a;f=Ta.call(a,"namespace")?a.namespace.split("."):
|
||||
[];if(g=h=c=c||D,3!==c.nodeType&&8!==c.nodeType&&!jb.test(m+d.event.triggered)&&(0<=m.indexOf(".")&&(f=m.split("."),m=f.shift(),f.sort()),q=0>m.indexOf(":")&&"on"+m,a=a[d.expando]?a:new d.Event(m,"object"==typeof a&&a),a.isTrigger=e?2:3,a.namespace=f.join("."),a.namespace_re=a.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=c),b=null==b?[a]:d.makeArray(b,[a]),r=d.event.special[m]||{},e||!r.trigger||!1!==r.trigger.apply(c,b))){if(!e&&!r.noBubble&&
|
||||
!d.isWindow(c)){l=r.delegateType||m;for(jb.test(l+m)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(c.ownerDocument||D)&&p.push(h.defaultView||h.parentWindow||n)}for(f=0;(g=p[f++])&&!a.isPropagationStopped();)a.type=1<f?l:r.bindType||m,(k=(y.get(g,"events")||{})[a.type]&&y.get(g,"handle"))&&k.apply(g,b),(k=q&&g[q])&&k.apply&&d.acceptData(g)&&(a.result=k.apply(g,b),!1===a.result&&a.preventDefault());return a.type=m,e||a.isDefaultPrevented()||r._default&&!1!==r._default.apply(p.pop(),b)||!d.acceptData(c)||
|
||||
q&&d.isFunction(c[m])&&!d.isWindow(c)&&(h=c[q],h&&(c[q]=null),d.event.triggered=m,c[m](),d.event.triggered=void 0,h&&(c[q]=h)),a.result}},dispatch:function(a){a=d.event.fix(a);var b,c,e,f,g,h=[],l=ca.call(arguments);b=(y.get(this,"events")||{})[a.type]||[];var k=d.event.special[a.type]||{};if(l[0]=a,a.delegateTarget=this,!k.preDispatch||!1!==k.preDispatch.call(this,a)){h=d.event.handlers.call(this,a,b);for(b=0;(f=h[b++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,c=0;(g=f.handlers[c++])&&
|
||||
!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(g.namespace)||(a.handleObj=g,a.data=g.data,e=((d.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,l),void 0===e||!1!==(a.result=e)||(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,e,f,g,h=[],l=b.delegateCount,k=a.target;if(l&&k.nodeType&&(!a.button||"click"!==a.type))for(;k!==this;k=k.parentNode||this)if(!0!==k.disabled||"click"!==
|
||||
a.type){e=[];for(c=0;l>c;c++)g=b[c],f=g.selector+" ",void 0===e[f]&&(e[f]=g.needsContext?0<=d(f,this).index(k):d.find(f,this,null,[k]).length),e[f]&&e.push(g);e.length&&h.push({elem:k,handlers:e})}return l<b.length&&h.push({elem:this,handlers:b.slice(l)}),h},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,b){return null==a.which&&
|
||||
(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||D,d=c.documentElement,f=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||f&&f.scrollLeft||0)-(d&&d.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||f&&f.scrollTop||0)-(d&&d.clientTop||f&&f.clientTop||0)),a.which||
|
||||
void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[d.expando])return a;var b,c,e;b=a.type;var f=a,g=this.fixHooks[b];g||(this.fixHooks[b]=g=Qb.test(b)?this.mouseHooks:Pb.test(b)?this.keyHooks:{});e=g.props?this.props.concat(g.props):this.props;a=new d.Event(f);for(b=e.length;b--;)c=e[b],a[c]=f[c];return a.target||(a.target=D),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==Y()&&this.focus?
|
||||
(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===Y()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&d.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return d.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,e){a=d.extend(new d.Event,c,{type:a,
|
||||
isSimulated:!0,originalEvent:{}});e?d.event.trigger(a,null,b):d.event.dispatch.call(b,a);a.isDefaultPrevented()&&c.preventDefault()}};d.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)};d.Event=function(a,b){return this instanceof d.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&!1===a.returnValue?ma:R):this.type=a,b&&d.extend(this,b),this.timeStamp=a&&a.timeStamp||d.now(),void(this[d.expando]=
|
||||
!0)):new d.Event(a,b)};d.Event.prototype={isDefaultPrevented:R,isPropagationStopped:R,isImmediatePropagationStopped:R,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ma;a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ma;a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ma;a&&a.stopImmediatePropagation&&a.stopImmediatePropagation();
|
||||
this.stopPropagation()}};d.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){d.event.special[a]={delegateType:b,bindType:b,handle:function(a){var e,f=a.relatedTarget,g=a.handleObj;return(!f||f!==this&&!d.contains(this,f))&&(a.type=g.origType,e=g.handler.apply(this,arguments),a.type=b),e}}});E.focusinBubbles||d.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){d.event.simulate(b,a.target,d.event.fix(a),!0)};d.event.special[b]=
|
||||
{setup:function(){var d=this.ownerDocument||this,f=y.access(d,b);f||d.addEventListener(a,c,!0);y.access(d,b,(f||0)+1)},teardown:function(){var d=this.ownerDocument||this,f=y.access(d,b)-1;f?y.access(d,b,f):(d.removeEventListener(a,c,!0),y.remove(d,b))}}});d.fn.extend({on:function(a,b,c,e,f){var g,h;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(h in a)this.on(h,b,c,a[h],f);return this}if(null==c&&null==e?(e=b,c=b=void 0):null==e&&("string"==typeof b?(e=c,c=void 0):(e=c,c=b,b=void 0)),
|
||||
!1===e)e=R;else if(!e)return this;return 1===f&&(g=e,e=function(a){return d().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=d.guid++)),this.each(function(){d.event.add(this,a,e,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,d(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,b,a[f]);return this}return(!1===
|
||||
b||"function"==typeof b)&&(c=b,b=void 0),!1===c&&(c=R),this.each(function(){d.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){d.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?d.event.trigger(a,b,c,!0):void 0}});var lb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,mb=/<([\w:]+)/,Rb=/<|&#?\w+;/,Sb=/<(?:script|style|link)/i,Tb=/checked\s*(?:[^=]|=\s*.checked.)/i,nb=/^$|\/(?:java|ecma)script/i,Cb=/^true\/(.*)/,Ub=
|
||||
/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,O={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};O.optgroup=O.option;O.tbody=O.tfoot=O.colgroup=O.caption=O.thead;O.th=O.td;d.extend({clone:function(a,b,c){var e,f,g,h,l=a.cloneNode(!0),k=d.contains(a.ownerDocument,a);if(!(E.noCloneChecked||1!==a.nodeType&&
|
||||
11!==a.nodeType||d.isXMLDoc(a)))for(h=M(l),g=M(a),e=0,f=g.length;f>e;e++){var n=g[e],m=h[e],p=m.nodeName.toLowerCase();"input"===p&&ib.test(n.type)?m.checked=n.checked:("input"===p||"textarea"===p)&&(m.defaultValue=n.defaultValue)}if(b)if(c)for(g=g||M(a),h=h||M(l),e=0,f=g.length;f>e;e++)Da(g[e],h[e]);else Da(a,l);return h=M(l,"script"),0<h.length&&oa(h,!k&&M(a,"script")),l},buildFragment:function(a,b,c,e){for(var f,g,h,l,k=b.createDocumentFragment(),n=[],m=0,p=a.length;p>m;m++)if(f=a[m],f||0===f)if("object"===
|
||||
d.type(f))d.merge(n,f.nodeType?[f]:f);else if(Rb.test(f)){g=g||k.appendChild(b.createElement("div"));h=(mb.exec(f)||["",""])[1].toLowerCase();h=O[h]||O._default;g.innerHTML=h[1]+f.replace(lb,"<$1></$2>")+h[2];for(h=h[0];h--;)g=g.lastChild;d.merge(n,g.childNodes);g=k.firstChild;g.textContent=""}else n.push(b.createTextNode(f));k.textContent="";for(m=0;f=n[m++];)if((!e||-1===d.inArray(f,e))&&(l=d.contains(f.ownerDocument,f),g=M(k.appendChild(f),"script"),l&&oa(g),c))for(h=0;f=g[h++];)nb.test(f.type||
|
||||
"")&&c.push(f);return k},cleanData:function(a){for(var b,c,e,f,g=d.event.special,h=0;void 0!==(c=a[h]);h++){if(d.acceptData(c)&&(f=c[y.expando],f&&(b=y.cache[f]))){if(b.events)for(e in b.events)g[e]?d.event.remove(c,e):d.removeEvent(c,e,b.handle);y.cache[f]&&delete y.cache[f]}delete J.cache[c[J.expando]]}}});d.fn.extend({text:function(a){return ga(this,function(a){return void 0===a?d.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=
|
||||
a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||na(this,a).appendChild(a)})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=na(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,
|
||||
function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,e=a?d.filter(a,this):this,f=0;null!=(c=e[f]);f++)b||1!==c.nodeType||d.cleanData(M(c)),c.parentNode&&(b&&d.contains(c.ownerDocument,c)&&oa(M(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(d.cleanData(M(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return d.clone(this,
|
||||
a,b)})},html:function(a){return ga(this,function(a){var c=this[0]||{},e=0,f=this.length;if(void 0===a&&1===c.nodeType)return c.innerHTML;if("string"==typeof a&&!Sb.test(a)&&!O[(mb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(lb,"<$1></$2>");try{for(;f>e;e++)c=this[e]||{},1===c.nodeType&&(d.cleanData(M(c,!1)),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode;d.cleanData(M(this));
|
||||
a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=fb.apply([],a);var c,e,f,g,h=0,l=this.length,k=this,n=l-1,m=a[0],p=d.isFunction(m);if(p||1<l&&"string"==typeof m&&!E.checkClone&&Tb.test(m))return this.each(function(c){var d=k.eq(c);p&&(a[0]=m.call(this,c,d.html()));d.domManip(a,b)});if(l&&(c=d.buildFragment(a,this[0].ownerDocument,!1,this),e=c.firstChild,1===c.childNodes.length&&(c=e),e)){e=d.map(M(c,"script"),
|
||||
Ca);for(f=e.length;l>h;h++)g=c,h!==n&&(g=d.clone(g,!0,!0),f&&d.merge(e,M(g,"script"))),b.call(this[h],g,h);if(f)for(c=e[e.length-1].ownerDocument,d.map(e,Oa),h=0;f>h;h++)g=e[h],nb.test(g.type||"")&&!y.access(g,"globalEval")&&d.contains(c,g)&&(g.src?d._evalUrl&&d._evalUrl(g.src):d.globalEval(g.textContent.replace(Ub,"")))}return this}});d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(a){for(var e=[],f=
|
||||
d(a),g=f.length-1,h=0;g>=h;h++)a=h===g?this:this.clone(!0),d(f[h])[b](a),Sa.apply(e,a.get());return this.pushStack(e)}});var Ea,bb={},cb=/^margin/,Pa=new RegExp("^("+La+")(?!px)[a-z%]+$","i"),Fa=function(a){return a.ownerDocument.defaultView.opener?a.ownerDocument.defaultView.getComputedStyle(a,null):n.getComputedStyle(a,null)};!function(){var a,b,c=D.documentElement,e=D.createElement("div"),f=D.createElement("div");if(f.style){var g=function(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";
|
||||
f.innerHTML="";c.appendChild(e);var d=n.getComputedStyle(f,null);a="1%"!==d.top;b="4px"===d.width;c.removeChild(e)};f.style.backgroundClip="content-box";f.cloneNode(!0).style.backgroundClip="";E.clearCloneStyle="content-box"===f.style.backgroundClip;e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute";e.appendChild(f);n.getComputedStyle&&d.extend(E,{pixelPosition:function(){return g(),a},boxSizingReliable:function(){return null==b&&g(),b},reliableMarginRight:function(){var a,
|
||||
b=f.appendChild(D.createElement("div"));return b.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",b.style.marginRight=b.style.width="0",f.style.width="1px",c.appendChild(e),a=!parseFloat(n.getComputedStyle(b,null).marginRight),c.removeChild(e),f.removeChild(b),a}})}}();d.swap=function(a,b,c,d){var f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];c=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];
|
||||
return c};var Vb=/^(none|table(?!-c[ea]).+)/,Db=new RegExp("^("+La+")(.*)$","i"),Wb=new RegExp("^([+-])=("+La+")","i"),Xb={position:"absolute",visibility:"hidden",display:"block"},ob={letterSpacing:"0",fontWeight:"400"},db=["Webkit","O","Moz","ms"];d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=L(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},
|
||||
cssProps:{"float":"cssFloat"},style:function(a,b,c,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,l=d.camelCase(b),k=a.style;return b=d.cssProps[l]||(d.cssProps[l]=r(k,l)),h=d.cssHooks[b]||d.cssHooks[l],void 0===c?h&&"get"in h&&void 0!==(f=h.get(a,!1,e))?f:k[b]:(g=typeof c,"string"===g&&(f=Wb.exec(c))&&(c=(f[1]+1)*f[2]+parseFloat(d.css(a,b)),g="number"),null!=c&&c===c&&("number"!==g||d.cssNumber[l]||(c+="px"),E.clearCloneStyle||""!==c||0!==b.indexOf("background")||(k[b]="inherit"),h&&
|
||||
"set"in h&&void 0===(c=h.set(a,c,e))||(k[b]=c)),void 0)}},css:function(a,b,c,e){var f,g,h,l=d.camelCase(b);return b=d.cssProps[l]||(d.cssProps[l]=r(a.style,l)),h=d.cssHooks[b]||d.cssHooks[l],h&&"get"in h&&(f=h.get(a,!0,c)),void 0===f&&(f=L(a,b,e)),"normal"===f&&b in ob&&(f=ob[b]),""===c||c?(g=parseFloat(f),!0===c||d.isNumeric(g)?g||0:f):f}});d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,e,f){return e?Vb.test(d.css(a,"display"))&&0===a.offsetWidth?d.swap(a,Xb,function(){return x(a,
|
||||
b,f)}):x(a,b,f):void 0},set:function(a,e,f){var g=f&&Fa(a);return A(a,e,f?w(a,b,f,"border-box"===d.css(a,"boxSizing",!1,g),g):0)}}});d.cssHooks.marginRight=k(E.reliableMarginRight,function(a,b){return b?d.swap(a,{display:"inline-block"},L,[a,"marginRight"]):void 0});d.each({margin:"",padding:"",border:"Width"},function(a,b){d.cssHooks[a+b]={expand:function(c){var d=0,f={};for(c="string"==typeof c?c.split(" "):[c];4>d;d++)f[a+ia[d]+b]=c[d]||c[d-2]||c[0];return f}};cb.test(a)||(d.cssHooks[a+b].set=
|
||||
A)});d.fn.extend({css:function(a,b){return ga(this,function(a,b,f){var g,h={},l=0;if(d.isArray(b)){f=Fa(a);for(g=b.length;g>l;l++)h[b[l]]=d.css(a,b[l],!1,f);return h}return void 0!==f?d.style(a,b,f):d.css(a,b)},a,b,1<arguments.length)},show:function(){return H(this,!0)},hide:function(){return H(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ta(this)?d(this).show():d(this).hide()})}});d.Tween=t;t.prototype={constructor:t,init:function(a,b,c,e,f,g){this.elem=
|
||||
a;this.prop=c;this.easing=f||"swing";this.options=b;this.start=this.now=this.cur();this.end=e;this.unit=g||(d.cssNumber[c]?"":"px")},cur:function(){var a=t.propHooks[this.prop];return a&&a.get?a.get(this):t.propHooks._default.get(this)},run:function(a){var b,c=t.propHooks[this.prop];return this.options.duration?this.pos=b=d.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,
|
||||
this.now,this),c&&c.set?c.set(this):t.propHooks._default.set(this),this}};t.prototype.init.prototype=t.prototype;t.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=d.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){d.fx.step[a.prop]?d.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[d.cssProps[a.prop]]||d.cssHooks[a.prop])?d.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};t.propHooks.scrollTop=
|
||||
t.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};d.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};d.fx=t.prototype.init;d.fx.step={};var pa,Ma,Yb=/^(?:toggle|show|hide)$/,pb=new RegExp("^(?:([+-])=|)("+La+")([a-z%]*)$","i"),Zb=/queueHooks$/,Ga=[function(a,b,c){var e,f,g,h,l,k,m,n=this,p={},r=a.style,A=a.nodeType&&ta(a),t=y.get(a,"fxshow");c.queue||(h=d._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,l=
|
||||
h.empty.fire,h.empty.fire=function(){h.unqueued||l()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--;d.queue(a,"fx").length||h.empty.fire()})}));1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[r.overflow,r.overflowX,r.overflowY],k=d.css(a,"display"),m="none"===k?y.get(a,"olddisplay")||Q(a.nodeName):k,"inline"===m&&"none"===d.css(a,"float")&&(r.display="inline-block"));c.overflow&&(r.overflow="hidden",n.always(function(){r.overflow=c.overflow[0];r.overflowX=c.overflow[1];
|
||||
r.overflowY=c.overflow[2]}));for(e in b)if(f=b[e],Yb.exec(f)){if(delete b[e],g=g||"toggle"===f,f===(A?"hide":"show")){if("show"!==f||!t||void 0===t[e])continue;A=!0}p[e]=t&&t[e]||d.style(a,e)}else k=void 0;if(d.isEmptyObject(p))"inline"===("none"===k?Q(a.nodeName):k)&&(r.display=k);else for(e in t?"hidden"in t&&(A=t.hidden):t=y.access(a,"fxshow",{}),g&&(t.hidden=!A),A?d(a).show():n.done(function(){d(a).hide()}),n.done(function(){var b;y.remove(a,"fxshow");for(b in p)d.style(a,b,p[b])}),p)b=G(A?t[e]:
|
||||
0,e,n),e in t||(t[e]=b.start,A&&(b.end=b.start,b.start="width"===e||"height"===e?1:0))}],ja={"*":[function(a,b){var c=this.createTween(a,b),e=c.cur(),f=pb.exec(b),g=f&&f[3]||(d.cssNumber[a]?"":"px"),h=(d.cssNumber[a]||"px"!==g&&+e)&&pb.exec(d.css(c.elem,a)),l=1,k=20;if(h&&h[3]!==g){g=g||h[3];f=f||[];h=+e||1;do l=l||".5",h/=l,d.style(c.elem,a,h+g);while(l!==(l=c.cur()/e)&&1!==l&&--k)}return f&&(h=c.start=+h||+e||0,c.unit=g,c.end=f[1]?h+(f[1]+1)*f[2]:+f[2]),c}]};d.Animation=d.extend(K,{tweener:function(a,
|
||||
b){d.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,e=0,f=a.length;f>e;e++)c=a[e],ja[c]=ja[c]||[],ja[c].unshift(b)},prefilter:function(a,b){b?Ga.unshift(a):Ga.push(a)}});d.speed=function(a,b,c){var e=a&&"object"==typeof a?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};return e.duration=d.fx.off?0:"number"==typeof e.duration?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,(null==e.queue||!0===e.queue)&&(e.queue=
|
||||
"fx"),e.old=e.complete,e.complete=function(){d.isFunction(e.old)&&e.old.call(this);e.queue&&d.dequeue(this,e.queue)},e};d.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ta).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){var f=d.isEmptyObject(a),g=d.speed(b,c,e);b=function(){var b=K(this,d.extend({},a),g);(f||y.get(this,"finish"))&&b.stop(!0)};return b.finish=b,f||!1===g.queue?this.each(b):this.queue(g.queue,b)},stop:function(a,b,c){var e=function(a){var b=
|
||||
a.stop;delete a.stop;b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&!1!==a&&this.queue(a||"fx",[]),this.each(function(){var b=!0,g=null!=a&&a+"queueHooks",h=d.timers,l=y.get(this);if(g)l[g]&&l[g].stop&&e(l[g]);else for(g in l)l[g]&&l[g].stop&&Zb.test(g)&&e(l[g]);for(g=h.length;g--;)h[g].elem!==this||null!=a&&h[g].queue!==a||(h[g].anim.stop(c),b=!1,h.splice(g,1));!b&&c||d.dequeue(this,a)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var b,c=y.get(this),e=c[a+"queue"];
|
||||
b=c[a+"queueHooks"];var f=d.timers,g=e?e.length:0;c.finish=!0;d.queue(this,a,[]);b&&b.stop&&b.stop.call(this,!0);for(b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)e[b]&&e[b].finish&&e[b].finish.call(this);delete c.finish})}});d.each(["toggle","show","hide"],function(a,b){var c=d.fn[b];d.fn[b]=function(a,d,g){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(u(b,!0),a,d,g)}});d.each({slideDown:u("show"),slideUp:u("hide"),
|
||||
slideToggle:u("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,d,f){return this.animate(b,a,d,f)}});d.timers=[];d.fx.tick=function(){var a,b=0,c=d.timers;for(pa=d.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||d.fx.stop();pa=void 0};d.fx.timer=function(a){d.timers.push(a);a()?d.fx.start():d.timers.pop()};d.fx.interval=13;d.fx.start=function(){Ma||(Ma=setInterval(d.fx.tick,d.fx.interval))};d.fx.stop=function(){clearInterval(Ma);
|
||||
Ma=null};d.fx.speeds={slow:600,fast:200,_default:400};d.fn.delay=function(a,b){return a=d.fx?d.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,d){var f=setTimeout(b,a);d.stop=function(){clearTimeout(f)}})};(function(){var a=D.createElement("input"),b=D.createElement("select"),c=b.appendChild(D.createElement("option"));a.type="checkbox";E.checkOn=""!==a.value;E.optSelected=c.selected;b.disabled=!0;E.optDisabled=!c.disabled;a=D.createElement("input");a.value="t";a.type="radio";E.radioValue="t"===
|
||||
a.value})();var qb,va=d.expr.attrHandle;d.fn.extend({attr:function(a,b){return ga(this,d.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){d.removeAttr(this,a)})}});d.extend({attr:function(a,b,c){var e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return"undefined"===typeof a.getAttribute?d.prop(a,b,c):(1===g&&d.isXMLDoc(a)||(b=b.toLowerCase(),e=d.attrHooks[b]||(d.expr.match.bool.test(b)?qb:void 0)),void 0===c?e&&"get"in e&&null!==(f=e.get(a,b))?f:(f=d.find.attr(a,b),null==
|
||||
f?void 0:f):null!==c?e&&"set"in e&&void 0!==(f=e.set(a,c,b))?f:(a.setAttribute(b,c+""),c):void d.removeAttr(a,b))},removeAttr:function(a,b){var c,e,f=0,g=b&&b.match(W);if(g&&1===a.nodeType)for(;c=g[f++];)e=d.propFix[c]||c,d.expr.match.bool.test(c)&&(a[e]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!E.radioValue&&"radio"===b&&d.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}});qb={set:function(a,b,c){return!1===b?d.removeAttr(a,c):a.setAttribute(c,
|
||||
c),c}};d.each(d.expr.match.bool.source.match(/\w+/g),function(a,b){var c=va[b]||d.find.attr;va[b]=function(a,b,d){var h,l;return d||(l=va[b],va[b]=h,h=null!=c(a,b,d)?b.toLowerCase():null,va[b]=l),h}});var $b=/^(?:input|select|textarea|button)$/i;d.fn.extend({prop:function(a,b){return ga(this,d.prop,a,b,1<arguments.length)},removeProp:function(a){return this.each(function(){delete this[d.propFix[a]||a]})}});d.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var e,f,g,h=a.nodeType;
|
||||
if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!d.isXMLDoc(a),g&&(b=d.propFix[b]||b,f=d.propHooks[b]),void 0!==c?f&&"set"in f&&void 0!==(e=f.set(a,c,b))?e:a[b]=c:f&&"get"in f&&null!==(e=f.get(a,b))?e:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||$b.test(a.nodeName)||a.href?a.tabIndex:-1}}}});E.optSelected||(d.propHooks.selected={get:function(a){a=a.parentNode;return a&&a.parentNode&&a.parentNode.selectedIndex,null}});d.each("tabIndex readOnly maxLength cellSpacing cellPadding rowSpan colSpan useMap frameBorder contentEditable".split(" "),
|
||||
function(){d.propFix[this.toLowerCase()]=this});var Wa=/[\t\r\n\f]/g;d.fn.extend({addClass:function(a){var b,c,e,f,g;b="string"==typeof a&&a;var h=0,l=this.length;if(d.isFunction(a))return this.each(function(b){d(this).addClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(W)||[];l>h;h++)if(c=this[h],e=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Wa," "):" ")){for(g=0;f=b[g++];)0>e.indexOf(" "+f+" ")&&(e+=f+" ");e=d.trim(e);c.className!==e&&(c.className=e)}return this},removeClass:function(a){var b,
|
||||
c,e,f,g;b=0===arguments.length||"string"==typeof a&&a;var h=0,l=this.length;if(d.isFunction(a))return this.each(function(b){d(this).removeClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(W)||[];l>h;h++)if(c=this[h],e=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(Wa," "):"")){for(g=0;f=b[g++];)for(;0<=e.indexOf(" "+f+" ");)e=e.replace(" "+f+" "," ");e=a?d.trim(e):"";c.className!==e&&(c.className=e)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&
|
||||
"string"===c?b?this.addClass(a):this.removeClass(a):this.each(d.isFunction(a)?function(c){d(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,f=0,g=d(this),h=a.match(W)||[];b=h[f++];)g.hasClass(b)?g.removeClass(b):g.addClass(b);else("undefined"===c||"boolean"===c)&&(this.className&&y.set(this,"__className__",this.className),this.className=this.className||!1===a?"":y.get(this,"__className__")||"")})},hasClass:function(a){a=" "+a+" ";for(var b=0,c=this.length;c>
|
||||
b;b++)if(1===this[b].nodeType&&0<=(" "+this[b].className+" ").replace(Wa," ").indexOf(a))return!0;return!1}});var ac=/\r/g;d.fn.extend({val:function(a){var b,c,e,f=this[0];if(arguments.length)return e=d.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,d(this).val()):a,null==f?f="":"number"==typeof f?f+="":d.isArray(f)&&(f=d.map(f,function(a){return null==a?"":a+""})),b=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,f,
|
||||
"value")||(this.value=f))});if(f)return b=d.valHooks[f.type]||d.valHooks[f.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(f,"value"))?c:(c=f.value,"string"==typeof c?c.replace(ac,""):null==c?"":c)}});d.extend({valHooks:{option:{get:function(a){var b=d.find.attr(a,"value");return null!=b?b:d.trim(d.text(a))}},select:{get:function(a){for(var b,c=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:c.length,l=0>e?h:f?e:0;h>l;l++)if(b=c[l],!(!b.selected&&l!==e||(E.optDisabled?
|
||||
b.disabled:null!==b.getAttribute("disabled"))||b.parentNode.disabled&&d.nodeName(b.parentNode,"optgroup"))){if(a=d(b).val(),f)return a;g.push(a)}return g},set:function(a,b){for(var c,e,f=a.options,g=d.makeArray(b),h=f.length;h--;)e=f[h],(e.selected=0<=d.inArray(e.value,g))&&(c=!0);return c||(a.selectedIndex=-1),g}}}});d.each(["radio","checkbox"],function(){d.valHooks[this]={set:function(a,b){return d.isArray(b)?a.checked=0<=d.inArray(d(a).val(),b):void 0}};E.checkOn||(d.valHooks[this].get=function(a){return null===
|
||||
a.getAttribute("value")?"on":a.value})});d.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(a,b){d.fn[b]=function(a,d){return 0<arguments.length?this.on(b,null,a,d):this.trigger(b)}});d.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,
|
||||
b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var Xa=d.now(),Ya=/\?/;d.parseJSON=function(a){return JSON.parse(a+"")};d.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(e){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&d.error("Invalid XML: "+a),b};var bc=/#.*$/,rb=/([?&])_=[^&]*/,
|
||||
cc=/^(.*?):[ \t]*([^\r\n]*)$/gm,dc=/^(?:GET|HEAD)$/,ec=/^\/\//,sb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,tb={},Qa={},ub="*/".concat("*"),Za=n.location.href,ra=sb.exec(Za.toLowerCase())||[];d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Za,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ra[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",
|
||||
xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ba(Ba(a,d.ajaxSettings),b):Ba(d.ajaxSettings,a)},ajaxPrefilter:aa(tb),ajaxTransport:aa(Qa),ajax:function(a,b){function c(a,b,c,h){var k,m,q,w,B=b;if(2!==
|
||||
y){y=2;l&&clearTimeout(l);e=void 0;g=h||"";v.readyState=0<a?4:0;h=200<=a&&300>a||304===a;if(c){q=p;for(var G=v,D,F,H,E,z=q.contents,I=q.dataTypes;"*"===I[0];)I.shift(),void 0===D&&(D=q.mimeType||G.getResponseHeader("Content-Type"));if(D)for(F in z)if(z[F]&&z[F].test(D)){I.unshift(F);break}if(I[0]in c)H=I[0];else{for(F in c){if(!I[0]||q.converters[F+" "+I[0]]){H=F;break}E||(E=F)}H=H||E}q=H?(H!==I[0]&&I.unshift(H),c[H]):void 0}var C;a:{c=p;D=q;F=v;H=h;var K,P,J;q={};G=c.dataTypes.slice();if(G[1])for(K in c.converters)q[K.toLowerCase()]=
|
||||
c.converters[K];for(E=G.shift();E;)if(c.responseFields[E]&&(F[c.responseFields[E]]=D),!J&&H&&c.dataFilter&&(D=c.dataFilter(D,c.dataType)),J=E,E=G.shift())if("*"===E)E=J;else if("*"!==J&&J!==E){if(K=q[J+" "+E]||q["* "+E],!K)for(C in q)if(P=C.split(" "),P[1]===E&&(K=q[J+" "+P[0]]||q["* "+P[0]])){!0===K?K=q[C]:!0!==q[C]&&(E=P[0],G.unshift(P[1]));break}if(!0!==K)if(K&&c["throws"])D=K(D);else try{D=K(D)}catch(aa){C={state:"parsererror",error:K?aa:"No conversion from "+J+" to "+E};break a}}C={state:"success",
|
||||
data:D}}q=C;h?(p.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(d.lastModified[f]=w),w=v.getResponseHeader("etag"),w&&(d.etag[f]=w)),204===a||"HEAD"===p.type?B="nocontent":304===a?B="notmodified":(B=q.state,k=q.data,m=q.error,h=!m)):(m=B,(a||!B)&&(B="error",0>a&&(a=0)));v.status=a;v.statusText=(b||B)+"";h?A.resolveWith(r,[k,B,v]):A.rejectWith(r,[v,B,m]);v.statusCode(x);x=void 0;n&&t.trigger(h?"ajaxSuccess":"ajaxError",[v,p,h?k:m]);u.fireWith(r,[v,B]);n&&(t.trigger("ajaxComplete",[v,p]),--d.active||
|
||||
d.event.trigger("ajaxStop"))}}"object"==typeof a&&(b=a,a=void 0);b=b||{};var e,f,g,h,l,k,n,m,p=d.ajaxSetup({},b),r=p.context||p,t=p.context&&(r.nodeType||r.jquery)?d(r):d.event,A=d.Deferred(),u=d.Callbacks("once memory"),x=p.statusCode||{},w={},B={},y=0,G="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===y){if(!h)for(h={};b=cc.exec(g);)h[b[1].toLowerCase()]=b[2];b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===y?g:null},setRequestHeader:function(a,
|
||||
b){var c=a.toLowerCase();return y||(a=B[c]=B[c]||a,w[a]=b),this},overrideMimeType:function(a){return y||(p.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>y)for(b in a)x[b]=[x[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){a=a||G;return e&&e.abort(a),c(0,a),this}};if(A.promise(v).complete=u.add,v.success=v.done,v.error=v.fail,p.url=((a||p.url||Za)+"").replace(bc,"").replace(ec,ra[1]+"//"),p.type=b.method||b.type||p.method||p.type,p.dataTypes=d.trim(p.dataType||"*").toLowerCase().match(W)||
|
||||
[""],null==p.crossDomain&&(k=sb.exec(p.url.toLowerCase()),p.crossDomain=!(!k||k[1]===ra[1]&&k[2]===ra[2]&&(k[3]||("http:"===k[1]?"80":"443"))===(ra[3]||("http:"===ra[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=d.param(p.data,p.traditional)),Aa(tb,p,b,v),2===y)return v;(n=d.event&&p.global)&&0===d.active++&&d.event.trigger("ajaxStart");p.type=p.type.toUpperCase();p.hasContent=!dc.test(p.type);f=p.url;p.hasContent||(p.data&&(f=p.url+=(Ya.test(f)?"&":"?")+p.data,delete p.data),
|
||||
!1===p.cache&&(p.url=rb.test(f)?f.replace(rb,"$1_="+Xa++):f+(Ya.test(f)?"&":"?")+"_="+Xa++));p.ifModified&&(d.lastModified[f]&&v.setRequestHeader("If-Modified-Since",d.lastModified[f]),d.etag[f]&&v.setRequestHeader("If-None-Match",d.etag[f]));(p.data&&p.hasContent&&!1!==p.contentType||b.contentType)&&v.setRequestHeader("Content-Type",p.contentType);v.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+ub+"; q=0.01":""):p.accepts["*"]);
|
||||
for(m in p.headers)v.setRequestHeader(m,p.headers[m]);if(p.beforeSend&&(!1===p.beforeSend.call(r,v,p)||2===y))return v.abort();G="abort";for(m in{success:1,error:1,complete:1})v[m](p[m]);if(e=Aa(Qa,p,b,v)){v.readyState=1;n&&t.trigger("ajaxSend",[v,p]);p.async&&0<p.timeout&&(l=setTimeout(function(){v.abort("timeout")},p.timeout));try{y=1,e.send(w,c)}catch(D){if(!(2>y))throw D;c(-1,D)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return d.get(a,b,c,"json")},getScript:function(a,b){return d.get(a,
|
||||
void 0,b,"script")}});d.each(["get","post"],function(a,b){d[b]=function(a,e,f,g){return d.isFunction(e)&&(g=g||f,f=e,e=void 0),d.ajax({url:a,type:b,dataType:g,data:e,success:f})}});d._evalUrl=function(a){return d.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})};d.fn.extend({wrapAll:function(a){var b;return d.isFunction(a)?this.each(function(b){d(this).wrapAll(a.call(this,b))}):(this[0]&&(b=d(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),
|
||||
b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(d.isFunction(a)?function(b){d(this).wrapInner(a.call(this,b))}:function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=d.isFunction(a);return this.each(function(c){d(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()}});
|
||||
d.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight};d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)};var fc=/%20/g,Fb=/\[\]$/,vb=/\r?\n/g,gc=/^(?:submit|button|image|reset|file)$/i,hc=/^(?:input|select|textarea|keygen)/i;d.param=function(a,b){var c,e=[],f=function(a,b){b=d.isFunction(b)?b():null==b?"":b;e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,
|
||||
function(){f(this.name,this.value)});else for(c in a)Ra(c,a[c],b,f);return e.join("&").replace(fc,"+")};d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=d.prop(this,"elements");return a?d.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!d(this).is(":disabled")&&hc.test(this.nodeName)&&!gc.test(a)&&(this.checked||!ib.test(a))}).map(function(a,b){var c=d(this).val();return null==c?null:d.isArray(c)?
|
||||
d.map(c,function(a){return{name:b.name,value:a.replace(vb,"\r\n")}}):{name:b.name,value:c.replace(vb,"\r\n")}}).get()}});d.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var ic=0,Na={},jc={0:200,1223:204},sa=d.ajaxSettings.xhr();n.attachEvent&&n.attachEvent("onunload",function(){for(var a in Na)Na[a]()});E.cors=!!sa&&"withCredentials"in sa;E.ajax=sa=!!sa;d.ajaxTransport(function(a){var b;return E.cors||sa&&!a.crossDomain?{send:function(c,d){var f,g=a.xhr(),h=++ic;if(g.open(a.type,
|
||||
a.url,a.async,a.username,a.password),a.xhrFields)for(f in a.xhrFields)g[f]=a.xhrFields[f];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType);a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(f in c)g.setRequestHeader(f,c[f]);b=function(a){return function(){b&&(delete Na[h],b=g.onload=g.onerror=null,"abort"===a?g.abort():"error"===a?d(g.status,g.statusText):d(jc[g.status]||g.status,g.statusText,"string"==typeof g.responseText?{text:g.responseText}:void 0,
|
||||
g.getAllResponseHeaders()))}};g.onload=b();g.onerror=b("error");b=Na[h]=b("abort");try{g.send(a.hasContent&&a.data||null)}catch(l){if(b)throw l;}},abort:function(){b&&b()}}:void 0});d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return d.globalEval(a),a}}});d.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type=
|
||||
"GET")});d.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=d("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove();c=null;a&&f("error"===a.type?404:200,a.type)});D.head.appendChild(b[0])},abort:function(){c&&c()}}}});var wb=[],$a=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=wb.pop()||d.expando+"_"+Xa++;return this[a]=!0,a}});d.ajaxPrefilter("json jsonp",function(a,b,c){var e,
|
||||
f,g,h=!1!==a.jsonp&&($a.test(a.url)?"url":"string"==typeof a.data&&!(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&$a.test(a.data)&&"data");return h||"jsonp"===a.dataTypes[0]?(e=a.jsonpCallback=d.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,h?a[h]=a[h].replace($a,"$1"+e):!1!==a.jsonp&&(a.url+=(Ya.test(a.url)?"&":"?")+a.jsonp+"="+e),a.converters["script json"]=function(){return g||d.error(e+" was not called"),g[0]},a.dataTypes[0]="json",f=n[e],n[e]=function(){g=
|
||||
arguments},c.always(function(){n[e]=f;a[e]&&(a.jsonpCallback=b.jsonpCallback,wb.push(e));g&&d.isFunction(f)&&f(g[0]);g=f=void 0}),"script"):void 0});d.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1);b=b||D;var e=hb.exec(a);c=!c&&[];return e?[b.createElement(e[1])]:(e=d.buildFragment([a],b,c),c&&c.length&&d(c).remove(),d.merge([],e.childNodes))};var xb=d.fn.load;d.fn.load=function(a,b,c){if("string"!=typeof a&&xb)return xb.apply(this,arguments);var e,
|
||||
f,g,h=this,l=a.indexOf(" ");return 0<=l&&(e=d.trim(a.slice(l)),a=a.slice(0,l)),d.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),0<h.length&&d.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){g=arguments;h.html(e?d("<div>").append(d.parseHTML(a)).find(e):a)}).complete(c&&function(a,b){h.each(c,g||[a.responseText,b,a])}),this};d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.on(b,a)}});d.expr.filters.animated=
|
||||
function(a){return d.grep(d.timers,function(b){return a===b.elem}).length};var yb=n.document.documentElement;d.offset={setOffset:function(a,b,c){var e,f,g,h,l,k,m=d.css(a,"position"),n=d(a),p={};"static"===m&&(a.style.position="relative");l=n.offset();g=d.css(a,"top");k=d.css(a,"left");("absolute"===m||"fixed"===m)&&-1<(g+k).indexOf("auto")?(e=n.position(),h=e.top,f=e.left):(h=parseFloat(g)||0,f=parseFloat(k)||0);d.isFunction(b)&&(b=b.call(a,c,l));null!=b.top&&(p.top=b.top-l.top+h);null!=b.left&&
|
||||
(p.left=b.left-l.left+f);"using"in b?b.using.call(a,p):n.css(p)}};d.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){d.offset.setOffset(this,a,b)});var b,c,e=this[0],f={top:0,left:0},g=e&&e.ownerDocument;if(g)return b=g.documentElement,d.contains(b,e)?("undefined"!==typeof e.getBoundingClientRect&&(f=e.getBoundingClientRect()),c=eb(g),{top:f.top+c.pageYOffset-b.clientTop,left:f.left+c.pageXOffset-b.clientLeft}):f},position:function(){if(this[0]){var a,
|
||||
b,c=this[0],e={top:0,left:0};return"fixed"===d.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),d.nodeName(a[0],"html")||(e=a.offset()),e.top+=d.css(a[0],"borderTopWidth",!0),e.left+=d.css(a[0],"borderLeftWidth",!0)),{top:b.top-e.top-d.css(c,"marginTop",!0),left:b.left-e.left-d.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||yb;a&&!d.nodeName(a,"html")&&"static"===d.css(a,"position");)a=a.offsetParent;return a||
|
||||
yb})}});d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;d.fn[a]=function(d){return ga(this,function(a,d,e){var l=eb(a);return void 0===e?l?l[b]:a[d]:void(l?l.scrollTo(c?n.pageXOffset:e,c?e:n.pageYOffset):a[d]=e)},a,d,arguments.length,null)}});d.each(["top","left"],function(a,b){d.cssHooks[b]=k(E.pixelPosition,function(a,e){return e?(e=L(a,b),Pa.test(e)?d(a).position()[b]+"px":e):void 0})});d.each({Height:"height",Width:"width"},function(a,b){d.each({padding:"inner"+
|
||||
a,content:b,"":"outer"+a},function(c,e){d.fn[e]=function(e,g){var h=arguments.length&&(c||"boolean"!=typeof e),l=c||(!0===e||!0===g?"margin":"border");return ga(this,function(b,c,e){var f;return d.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?d.css(b,c,l):d.style(b,c,e,l)},b,h?e:void 0,h,null)}})});d.fn.size=function(){return this.length};d.fn.andSelf=d.fn.addBack;
|
||||
"function"==typeof define&&define.amd&&define("jquery",[],function(){return d});var kc=n.jQuery,lc=n.$;return d.noConflict=function(a){return n.$===d&&(n.$=lc),a&&n.jQuery===d&&(n.jQuery=kc),d},"undefined"===typeof z&&(n.jQuery=n.$=d),d});
|
||||
(function(n){n.extend({tablesorter:new function(){function m(k,m){z(k+","+((new Date).getTime()-m.getTime())+"ms")}function z(k){"undefined"!=typeof console&&"undefined"!=typeof console.debug?console.log(k):alert(k)}function C(k,m){if(k.config.debug)var A="";if(0!=k.tBodies.length){var w=k.tBodies[0].rows;if(w[0])for(var x=[],H=w[0].cells.length,t=0;t<H;t++){var B=!1;n.metadata&&n(m[t]).metadata()&&n(m[t]).metadata().sorter?B=V(n(m[t]).metadata().sorter):k.config.headers[t]&&k.config.headers[t].sorter&&
|
||||
(B=V(k.config.headers[t].sorter));if(!B)a:{for(var B=k,u=w,G=-1,C=t,K=Q.length,aa=!1,M=!1,L=!0;""==M&&L;)G++,u[G]?(aa=u[G].cells[C],M=n.trim(U(B.config,aa)),B.config.debug&&z("Checking if value was empty on row:"+G)):L=!1;for(u=1;u<K;u++)if(Q[u].is(M,B,aa)){B=Q[u];break a}B=Q[0]}k.config.debug&&(A+="column:"+t+" parser:"+B.id+"\n");x.push(B)}k.config.debug&&z(A);return x}}function V(k){for(var m=Q.length,n=0;n<m;n++)if(Q[n].id.toLowerCase()==k.toLowerCase())return Q[n];return!1}function N(k){if(k.config.debug)var r=
|
||||
new Date;for(var A=k.tBodies[0]&&k.tBodies[0].rows.length||0,w=k.tBodies[0].rows[0]&&k.tBodies[0].rows[0].cells.length||0,x=k.config.parsers,H={row:[],normalized:[]},t=0;t<A;++t){var B=n(k.tBodies[0].rows[t]),u=[];if(B.hasClass(k.config.cssChildRow))H.row[H.row.length-1]=H.row[H.row.length-1].add(B);else{H.row.push(B);for(var G=0;G<w;++G)u.push(x[G].format(U(k.config,B[0].cells[G]),k,B[0].cells[G]));u.push(H.normalized.length);H.normalized.push(u)}}k.config.debug&&m("Building cache for "+A+" rows:",
|
||||
r);return H}function U(k,m){var A="";if(!m)return"";k.supportsTextContent||(k.supportsTextContent=m.textContent||!1);return A="simple"==k.textExtraction?k.supportsTextContent?m.textContent:m.childNodes[0]&&m.childNodes[0].hasChildNodes()?m.childNodes[0].innerHTML:m.innerHTML:"function"==typeof k.textExtraction?k.textExtraction(m):n(m).text()}function X(k,r){if(k.config.debug)var A=new Date;for(var w=r.row,x=r.normalized,H=x.length,t=x[0].length-1,B=n(k.tBodies[0]),u=[],G=0;G<H;G++){var z=x[G][t];
|
||||
u.push(w[z]);if(!k.config.appender)for(var K=w[z].length,C=0;C<K;C++)B[0].appendChild(w[z][C])}k.config.appender&&k.config.appender(k,u);u=null;k.config.debug&&m("Rebuilt table:",A);na(k);setTimeout(function(){n(k).trigger("sortEnd")},0)}function ma(k){if(k.config.debug)var r=new Date;var A=R(k);$tableHeaders=n(k.config.selectorHeaders,k).each(function(m){this.column=A[this.parentNode.rowIndex+"-"+this.cellIndex];var r;r=k.config.sortInitialOrder;r="Number"!=typeof r?"desc"==r.toLowerCase()?1:0:1==
|
||||
r?1:0;this.count=this.order=r;r=n.metadata&&!1===n(this).metadata().sorter?!0:!1;r||(r=k.config.headers[m]&&!1===k.config.headers[m].sorter?!0:!1);r&&(this.sortDisabled=!0);Y(k,m)&&(this.order=this.lockedOrder=Y(k,m));this.sortDisabled||(r=n(this).addClass(k.config.cssHeader),k.config.onRenderHeader&&k.config.onRenderHeader.apply(r));k.config.headerList[m]=this});k.config.debug&&(m("Built headers:",r),z($tableHeaders));return $tableHeaders}function R(k){var m=[],n={};k=k.getElementsByTagName("THEAD")[0].getElementsByTagName("TR");
|
||||
for(var w=0;w<k.length;w++)for(var x=k[w].cells,H=0;H<x.length;H++){var t=x[H],B=t.parentNode.rowIndex,u=B+"-"+t.cellIndex,G=t.rowSpan||1,t=t.colSpan||1,z;"undefined"==typeof m[B]&&(m[B]=[]);for(var C=0;C<m[B].length+1;C++)if("undefined"==typeof m[B][C]){z=C;break}n[u]=z;for(C=B;C<B+G;C++){"undefined"==typeof m[C]&&(m[C]=[]);for(var u=m[C],P=z;P<z+t;P++)u[P]="x"}}return n}function Y(k,m){return k.config.headers[m]&&k.config.headers[m].lockedOrder?k.config.headers[m].lockedOrder:!1}function na(k){for(var m=
|
||||
k.config.widgets,n=m.length,w=0;w<n;w++)Ca(m[w]).format(k)}function Ca(k){for(var m=L.length,n=0;n<m;n++)if(L[n].id.toLowerCase()==k.toLowerCase())return L[n]}function Oa(k,m){for(var n=m.length,w=0;w<n;w++)if(m[w][0]==k)return!0;return!1}function oa(k,m,A,w){m.removeClass(w[0]).removeClass(w[1]);var x=[];m.each(function(k){this.sortDisabled||(x[this.column]=n(this))});k=A.length;for(m=0;m<k;m++)x[A[m][0]].addClass(w[A[m][1]])}function Da(k,m){if(k.config.widthFixed){var A=n("<colgroup>");n("tr:first td",
|
||||
k.tBodies[0]).each(function(){A.append(n("<col>").css("width",n(this).width()))});n(k).prepend(A)}}function M(k,n,A){if(k.config.debug)var w=new Date;for(var x="var sortWrapper = function(a,b) {",C=n.length,t=0;t<C;t++)var B=n[t][0],u=n[t][1],B="text"==k.config.parsers[B].type?0==u?Z("text","asc",B):Z("text","desc",B):0==u?Z("numeric","asc",B):Z("numeric","desc",B),G="e"+t,x=x+("var "+G+" = "+B),x=x+("if("+G+") { return "+G+"; } "),x=x+"else { ";t=A.normalized[0].length-1;x+="return a["+t+"]-b["+
|
||||
t+"];";for(t=0;t<C;t++)x+="}; ";x+="return 0; }; ";k.config.debug&&m("Evaling expression:"+x,new Date);eval(x);A.normalized.sort(sortWrapper);k.config.debug&&m("Sorting on "+n.toString()+" and dir "+u+" time:",w);return A}function Z(k,m,n){var w="a["+n+"]";n="b["+n+"]";if("text"==k&&"asc"==m)return"("+w+" == "+n+" ? 0 : ("+w+" === null ? Number.POSITIVE_INFINITY : ("+n+" === null ? Number.NEGATIVE_INFINITY : ("+w+" < "+n+") ? -1 : 1 )));";if("text"==k&&"desc"==m)return"("+w+" == "+n+" ? 0 : ("+w+
|
||||
" === null ? Number.POSITIVE_INFINITY : ("+n+" === null ? Number.NEGATIVE_INFINITY : ("+n+" < "+w+") ? -1 : 1 )));";if("numeric"==k&&"asc"==m)return"("+w+" === null && "+n+" === null) ? 0 :("+w+" === null ? Number.POSITIVE_INFINITY : ("+n+" === null ? Number.NEGATIVE_INFINITY : "+w+" - "+n+"));";if("numeric"==k&&"desc"==m)return"("+w+" === null && "+n+" === null) ? 0 :("+w+" === null ? Number.POSITIVE_INFINITY : ("+n+" === null ? Number.NEGATIVE_INFINITY : "+n+" - "+w+"));"}var Q=[],L=[];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=m;this.construct=function(k){return this.each(function(){if(this.tHead&&
|
||||
this.tBodies){var m,A,w,x;this.config={};x=n.extend(this.config,n.tablesorter.defaults,k);m=n(this);n.data(this,"tablesorter",x);A=ma(this);this.config.parsers=C(this,A);w=N(this);var z=[x.cssDesc,x.cssAsc];Da(this);A.click(function(k){var B=m[0].tBodies[0]&&m[0].tBodies[0].rows.length||0;if(!this.sortDisabled&&0<B){m.trigger("sortStart");n(this);B=this.column;this.order=this.count++%2;this.lockedOrder&&(this.order=this.lockedOrder);if(k[x.sortMultiSortKey])if(Oa(B,x.sortList))for(k=0;k<x.sortList.length;k++){var u=
|
||||
x.sortList[k],C=x.headerList[u[0]];u[0]==B&&(C.count=u[1],C.count++,u[1]=C.count%2)}else x.sortList.push([B,this.order]);else{x.sortList=[];if(null!=x.sortForce)for(u=x.sortForce,k=0;k<u.length;k++)u[k][0]!=B&&x.sortList.push(u[k]);x.sortList.push([B,this.order])}setTimeout(function(){oa(m[0],A,x.sortList,z);X(m[0],M(m[0],x.sortList,w))},1);return!1}}).mousedown(function(){if(x.cancelSelection)return this.onselectstart=function(){return!1},!1});m.bind("update",function(){var k=this;setTimeout(function(){k.config.parsers=
|
||||
C(k,A);w=N(k)},1)}).bind("updateCell",function(k,m){var n=this.config,r=[m.parentNode.rowIndex-1,m.cellIndex];w.normalized[r[0]][r[1]]=n.parsers[r[1]].format(U(n,m),m)}).bind("sorton",function(k,m){n(this).trigger("sortStart");x.sortList=m;for(var r=x.sortList,C=this.config,P=r.length,K=0;K<P;K++){var L=r[K],N=C.headerList[L[0]];N.count=L[1];N.count++}oa(this,A,r,z);X(this,M(this,r,w))}).bind("appendCache",function(){X(this,w)}).bind("applyWidgetId",function(k,m){Ca(m).format(this)}).bind("applyWidgets",
|
||||
function(){na(this)});n.metadata&&n(this).metadata()&&n(this).metadata().sortlist&&(x.sortList=n(this).metadata().sortlist);0<x.sortList.length&&m.trigger("sorton",[x.sortList]);na(this)}})};this.addParser=function(k){for(var m=Q.length,n=!0,w=0;w<m;w++)Q[w].id.toLowerCase()==k.id.toLowerCase()&&(n=!1);n&&Q.push(k)};this.addWidget=function(k){L.push(k)};this.formatFloat=function(k){k=parseFloat(k);return isNaN(k)?0:k};this.formatInt=function(k){k=parseInt(k);return isNaN(k)?0:k};this.isDigit=function(k,
|
||||
m){return/^[-+]?\d*$/.test(n.trim(k.replace(/[,.']/g,"")))};this.clearTableBody=function(k){n.browser.msie?function(){for(;this.firstChild;)this.removeChild(this.firstChild)}.apply(k.tBodies[0]):k.tBodies[0].innerHTML=""}}});n.fn.extend({tablesorter:n.tablesorter.construct});var z=n.tablesorter;z.addParser({id:"text",is:function(m){return!0},format:function(m){return n.trim(m.toLocaleLowerCase())},type:"text"});z.addParser({id:"digit",is:function(m,z){return n.tablesorter.isDigit(m,z.config)},format:function(m){return n.tablesorter.formatFloat(m)},
|
||||
type:"numeric"});z.addParser({id:"currency",is:function(m){return/^[\u00a3$\u20ac?.]/.test(m)},format:function(m){return n.tablesorter.formatFloat(m.replace(new RegExp(/[\u00a3$\u20ac]/g),""))},type:"numeric"});z.addParser({id:"ipAddress",is:function(m){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(m)},format:function(m){m=m.split(".");for(var z="",C=m.length,V=0;V<C;V++)var N=m[V],z=2==N.length?z+("0"+N):z+N;return n.tablesorter.formatFloat(z)},type:"numeric"});z.addParser({id:"url",is:function(m){return/^(https?|ftp|file):\/\/$/.test(m)},
|
||||
format:function(m){return jQuery.trim(m.replace(new RegExp(/(https?|ftp|file):\/\//),""))},type:"text"});z.addParser({id:"isoDate",is:function(m){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(m)},format:function(m){return n.tablesorter.formatFloat(""!=m?(new Date(m.replace(new RegExp(/-/g),"/"))).getTime():"0")},type:"numeric"});z.addParser({id:"percent",is:function(m){return/\%$/.test(n.trim(m))},format:function(m){return n.tablesorter.formatFloat(m.replace(new RegExp(/%/g),""))},type:"numeric"});
|
||||
z.addParser({id:"usLongDate",is:function(m){return m.match(new 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(m){return n.tablesorter.formatFloat((new Date(m)).getTime())},type:"numeric"});z.addParser({id:"shortDate",is:function(m){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(m)},format:function(m,z){var C=z.config;m=m.replace(/\-/g,"/");if("us"==C.dateFormat)m=m.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,
|
||||
"$3/$1/$2");else if("uk"==C.dateFormat)m=m.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");else if("dd/mm/yy"==C.dateFormat||"dd-mm-yy"==C.dateFormat)m=m.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");return n.tablesorter.formatFloat((new Date(m)).getTime())},type:"numeric"});z.addParser({id:"time",is:function(m){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(m)},format:function(m){return n.tablesorter.formatFloat((new Date("2000/01/01 "+m)).getTime())},
|
||||
type:"numeric"});z.addParser({id:"metadata",is:function(m){return!1},format:function(m,z,C){m=z.config;m=m.parserMetadataName?m.parserMetadataName:"sortValue";return n(C).metadata()[m]},type:"numeric"});z.addWidget({id:"zebra",format:function(m){if(m.config.debug)var z=new Date;var C,V=-1,N;n("tr:visible",m.tBodies[0]).each(function(z){C=n(this);C.hasClass(m.config.cssChildRow)||V++;N=0==V%2;C.removeClass(m.config.widgetZebra.css[N?0:1]).addClass(m.config.widgetZebra.css[N?1:0])});m.config.debug&&
|
||||
n.tablesorter.benchmark("Applying Zebra widget",z)}})})(jQuery);$(function(){$("table").tablesorter()});
|
1
public/js/lib/jquery.min.js
vendored
Normal file
1
public/js/lib/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
38
public/js/manga_edit.js
Normal file
38
public/js/manga_edit.js
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Javascript for editing manga, if logged in
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
|
||||
if (CONTROLLER !== "manga") return;
|
||||
|
||||
$(".edit_buttons button").on("click", function(e) {
|
||||
var this_sel = $(this);
|
||||
var parent_sel = $(this).closest("article");
|
||||
var manga_id = parent_sel.attr("id").replace("manga-", "");
|
||||
var type = this_sel.is(".plus_one_chapter") ? 'chapter' : 'volume';
|
||||
var completed = parseInt(parent_sel.find("." + type + "s_read").text(), 10);
|
||||
var total = parseInt(parent_sel.find("."+type+"_count").text(), 10);
|
||||
|
||||
console.log(completed);
|
||||
console.log(total);
|
||||
|
||||
if (isNaN(completed))
|
||||
{
|
||||
completed = 0;
|
||||
}
|
||||
|
||||
var data = {
|
||||
id: manga_id
|
||||
};
|
||||
|
||||
// Update the total count
|
||||
data[type + "s_read"] = ++completed;
|
||||
|
||||
$.post(BASE_URL + 'update', data, function(res) {
|
||||
console.table(res);
|
||||
parent_sel.find("."+type+"s_read").text(completed);
|
||||
add_message('success', "Sucessfully updated " + res.manga[0].romaji_title);
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
13
public/js/show_message.js
Normal file
13
public/js/show_message.js
Normal file
@ -0,0 +1,13 @@
|
||||
function add_message(type, message)
|
||||
{
|
||||
var template = '<div class="message ' + type + '"><span class="icon"></span>' + message + '<span class="close" onclick="this.parentElement.style.display=\'none\'">x</span></div>';
|
||||
|
||||
if ($(".message").length > 0)
|
||||
{
|
||||
$(".message").replaceWith(template);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("main").prepend(template);
|
||||
}
|
||||
}
|
3
public/js/sort_tables.js
Normal file
3
public/js/sort_tables.js
Normal file
@ -0,0 +1,3 @@
|
||||
$(function() {
|
||||
$('table').tablesorter();
|
||||
});
|
Loading…
Reference in New Issue
Block a user