diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1953fe --- /dev/null +++ b/.gitignore @@ -0,0 +1,217 @@ +################# +## Eclipse +################# + +*.pydevproject +.idea +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.publishproj + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[cod] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/api/.htaccess b/api/.htaccess new file mode 100644 index 0000000..16a3e29 --- /dev/null +++ b/api/.htaccess @@ -0,0 +1,4 @@ +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L] diff --git a/api/authentication.php b/api/authentication.php new file mode 100644 index 0000000..3164265 --- /dev/null +++ b/api/authentication.php @@ -0,0 +1,88 @@ +post('/login', function() use ($app) { + global $db; + require_once 'passwordHash.php'; + $r = json_decode($app->request->getBody()); + $db->verifyRequiredParams($r->customer,array('email', 'password')); + $response = array(); + $password = $r->customer->password; + $email = $r->customer->email; + $qu = $db->select("customers_auth", "*", array("email" => $email)); + $user = $qu['data'][0]; + $response['u'] = $user; + if ($user['uid']) { + $response['u'] = $user['uid']; + $response['p'] = $user->uid; + if(passwordHash::check_password($user['password'],$password)){ + $response['status'] = "success"; + $response['message'] = 'Удачная авторизация.'; + $response['name'] = $user['name']; + $response['uid'] = $user['uid']; + $response['email'] = $user['email']; + $response['phone'] = $user['phone']; + $response['address'] = $user['address']; + $response['city'] = $user['city']; + $response['createdAt'] = $user['created']; + if (!isset($_SESSION)) { + session_start(); + } + $_SESSION['uid'] = $user['uid']; + $_SESSION['email'] = $email; + $_SESSION['name'] = $user['name']; + $_SESSION['role'] = $user['role']; + } else { + $response['status'] = "error"; + $response['message'] = 'Войти не удалось. Неверные данные.'; + } + }else { + $response['status'] = "error"; + $response['message'] = 'Нет такого пользователя'; + } + echoResponse(200, $response); +}); +$app->post('/signUp', function() use ($app) { + global $db; + $response = array(); + $r = json_decode($app->request->getBody()); + require_once 'passwordHash.php'; + $phone = $r->customer->phone; + $name = $r->customer->name; + $email = $r->customer->email; + $address = $r->customer->address; + $password = $r->customer->password; + unset($r->customer->password2); + $isUserExists = $db->select("customers_auth", "uid", array("email" => $email)); + if($isUserExists['status'] == 'warning'){ + $r->customer->password = passwordHash::hash($password); + $result = $db->insert("customers_auth", $r->customer, array('email', 'password')); + if ($result['data']) { + $response["status"] = "success"; + $response["message"] = "Вы успешно зарегистрировались!"; + $response["uid"] = $result['data']; + if (!isset($_SESSION)) { + session_start(); + } + $_SESSION['uid'] = $response["uid"]; + $_SESSION['phone'] = $phone; + $_SESSION['name'] = $name; + $_SESSION['email'] = $email; + $_SESSION['role'] = 1; + echoResponse(200, $response); + } else { + $response["status"] = "error"; + $response["message"] = "Не удалось зарегистрировать Вас. Повторите позже. Спасибо."; + echoResponse(201, $response); + } + }else{ + $response["status"] = "error"; + $response["message"] = "Пользователь с таким email уже зарегистрирован."; + echoResponse(201, $response); + } +}); +$app->get('/logout', function() { + $session = destroySession(); + $response["status"] = "success"; + $response["message"] = "Вы успешно вышли!"; + echoResponse(200, $response); +}); +?> \ No newline at end of file diff --git a/api/config.php b/api/config.php new file mode 100644 index 0000000..8f70360 --- /dev/null +++ b/api/config.php @@ -0,0 +1,10 @@ + diff --git a/api/dbHelper.php b/api/dbHelper.php new file mode 100644 index 0000000..577c4a3 --- /dev/null +++ b/api/dbHelper.php @@ -0,0 +1,180 @@ +db = new PDO($dsn, DB_USERNAME, DB_PASSWORD, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); + } catch (PDOException $e) { + $response["status"] = "error"; + $response["message"] = 'Connection failed: ' . $e->getMessage(); + $response["data"] = null; + //echoResponse(200, $response); + exit; + } + } + function select($table, $columns, $where){ + try{ + $a = array(); + $w = ""; + foreach ($where as $key => $value) { + $w .= " and " .$key. " like :".$key; + $a[":".$key] = $value; + } + $stmt = $this->db->prepare("select ".$columns." from ".$table." where 1=1 ". $w); + $stmt->execute($a); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + if(count($rows)<=0){ + $response["status"] = "warning"; + $response["message"] = "Не найдено записей в БД"; + }else{ + $response["status"] = "success"; + $response["message"] = "Данные успешно извлечены из БД"; + } + $response["data"] = $rows; + }catch(PDOException $e){ + $response["status"] = "error"; + $response["message"] = 'Select Failed: ' .$e->getMessage(); + $response["data"] = null; + } + return $response; + } + function select2($table, $columns, $where, $order){ + try{ + $a = array(); + $w = ""; + foreach ($where as $key => $value) { + $w .= " and " .$key. " like :".$key; + $a[":".$key] = $value; + } + $stmt = $this->db->prepare("select ".$columns." from ".$table." where 1=1 ". $w." ".$order); + $stmt->execute($a); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + if(count($rows)<=0){ + $response["status"] = "warning"; + $response["message"] = "Не найдено записей в БД"; + }else{ + $response["status"] = "success"; + $response["message"] = "Данные успешно извлечены из БД"; + } + $response["data"] = $rows; + }catch(PDOException $e){ + $response["status"] = "error"; + $response["message"] = 'Select Failed: ' .$e->getMessage(); + $response["data"] = null; + } + return $response; + } + function insert($table, $columnsArray, $requiredColumnsArray) { + $this->verifyRequiredParams($columnsArray, $requiredColumnsArray); + try{ + $a = array(); + $c = ""; + $v = ""; + foreach ($columnsArray as $key => $value) { + $c .= $key. ", "; + $v .= ":".$key. ", "; + $a[":".$key] = $value; + } + $c = rtrim($c,', '); + $v = rtrim($v,', '); + $stmt = $this->db->prepare("INSERT INTO $table($c) VALUES($v)"); + $stmt->execute($a); + $affected_rows = $stmt->rowCount(); + $lastInsertId = $this->db->lastInsertId(); + $response["status"] = "success"; + $response["message"] = $affected_rows." ряд добавлеен в БД"; + $response["data"] = $lastInsertId; + }catch(PDOException $e){ + $response["status"] = "error"; + $response["message"] = 'Не удалось добавить запись в БД: ' .$e->getMessage(); + $response["data"] = 0; + } + return $response; + } + function update($table, $columnsArray, $where, $requiredColumnsArray){ + $this->verifyRequiredParams($columnsArray, $requiredColumnsArray); + try{ + $a = array(); + $w = ""; + $c = ""; + foreach ($where as $key => $value) { + $w .= " and " .$key. " = :".$key; + $a[":".$key] = $value; + } + foreach ($columnsArray as $key => $value) { + $c .= $key. " = :".$key.", "; + $a[":".$key] = $value; + } + $c = rtrim($c,", "); + + $stmt = $this->db->prepare("UPDATE $table SET $c WHERE 1=1 ".$w); + $stmt->execute($a); + $affected_rows = $stmt->rowCount(); + if($affected_rows<=0){ + $response["status"] = "warning"; + $response["message"] = "Ни одна запись в БД не затронута"; + }else{ + $response["status"] = "success"; + $response["message"] = $affected_rows." ряд(ы) обновлены в БД"; + } + }catch(PDOException $e){ + $response["status"] = "error"; + $response["message"] = "Не удалось обновить данные: " .$e->getMessage(); + } + return $response; + } + function delete($table, $where){ + if(count($where)<=0){ + $response["status"] = "warning"; + $response["message"] = "Удаление из БД не удалось: как минимум одно условие необходимо"; + }else{ + try{ + $a = array(); + $w = ""; + foreach ($where as $key => $value) { + $w .= " and " .$key. " = :".$key; + $a[":".$key] = $value; + } + $stmt = $this->db->prepare("DELETE FROM $table WHERE 1=1 ".$w); + $stmt->execute($a); + $affected_rows = $stmt->rowCount(); + if($affected_rows<=0){ + $response["status"] = "warning"; + $response["message"] = "Ни одного ряда не удалено"; + }else{ + $response["status"] = "success"; + $response["message"] = $affected_rows." ряд(ы) удалены из БД"; + } + }catch(PDOException $e){ + $response["status"] = "error"; + $response["message"] = 'Удаление из БД не удалось: ' .$e->getMessage(); + } + } + return $response; + } + + function verifyRequiredParams($request_params, $required_fields) { + $error = false; + $error_fields = ""; + foreach ($required_fields as $field) { + if (!isset($request_params->$field) || strlen(trim($request_params->$field)) <= 0) { + $error = true; + $error_fields .= $field . ', '; + } + } + + if ($error) { + // Required field(s) are missing or empty + // echo error json and stop the app + $response = array(); + $app = \Slim\Slim::getInstance(); + $response["status"] = "error"; + $response["message"] = 'Required field(s) ' . substr($error_fields, 0, -2) . ' is missing or empty'; + echoResponse(200, $response); + $app->stop(); + } + } +} +?> diff --git a/api/index.php b/api/index.php new file mode 100644 index 0000000..f367756 --- /dev/null +++ b/api/index.php @@ -0,0 +1,81 @@ +get('/site-settings', function() { + global $db; + $rows = $db->select("site_settings",'*',array(),"ORDER BY id"); + echoResponse(200, $rows); + +}); + + +$app->post('/user-data', function() use ($app){ + $data = json_decode($app->request->getBody()); + global $db; + $rows = $db->select("customers_auth", 'name,email,phone,address,city,created,role', $data); + echoResponse(200, $rows); +}); + + + +$app->post('/vx-update-data/:tableName/:searchBy/:id', function($tableName, $searchRow, $id) use ($app){ + $data = json_decode($app->request->getBody()); + $condition = array($searchRow=>$id); + $mandatory = array(); + global $db; + $rows = $db->update($tableName, $data, $condition, $mandatory); + echoResponse(200, $rows); +}); + +$app->put('/products/:id', function($id) use ($app) { + $data = json_decode($app->request->getBody()); + $condition = array('id'=>$id); + $mandatory = array(); + global $db; + $rows = $db->update("products", $data, $condition, $mandatory); + if($rows["status"]=="success") + $rows["message"] = "Продукт обновлен!"; + echoResponse(200, $rows); +}); + +$app->delete('/products/:id', function($id) { + global $db; + $rows = $db->delete("products", array('id'=>$id)); + if($rows["status"]=="success") + $rows["message"] = "Product removed successfully."; + echoResponse(200, $rows); +}); + +$app->get('/session', function() { + $session = getSession(); + echoResponse(200, $session); +}); + +function echoResponse($status_code, $response) { + global $app; + $app->status($status_code); + $app->contentType('application/json'); + echo json_encode($response,JSON_NUMERIC_CHECK); +} +$app->run(); +?> \ No newline at end of file diff --git a/api/libs/Slim/Environment.php b/api/libs/Slim/Environment.php new file mode 100644 index 0000000..d0f3f0e --- /dev/null +++ b/api/libs/Slim/Environment.php @@ -0,0 +1,224 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * Environment + * + * This class creates and returns a key/value array of common + * environment variables for the current HTTP request. + * + * This is a singleton class; derived environment variables will + * be common across multiple Slim applications. + * + * This class matches the Rack (Ruby) specification as closely + * as possible. More information available below. + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class Environment implements \ArrayAccess, \IteratorAggregate +{ + /** + * @var array + */ + protected $properties; + + /** + * @var \Slim\Environment + */ + protected static $environment; + + /** + * Get environment instance (singleton) + * + * This creates and/or returns an environment instance (singleton) + * derived from $_SERVER variables. You may override the global server + * variables by using `\Slim\Environment::mock()` instead. + * + * @param bool $refresh Refresh properties using global server variables? + * @return \Slim\Environment + */ + public static function getInstance($refresh = false) + { + if (is_null(self::$environment) || $refresh) { + self::$environment = new self(); + } + + return self::$environment; + } + + /** + * Get mock environment instance + * + * @param array $userSettings + * @return \Slim\Environment + */ + public static function mock($userSettings = array()) + { + $defaults = array( + 'REQUEST_METHOD' => 'GET', + 'SCRIPT_NAME' => '', + 'PATH_INFO' => '', + 'QUERY_STRING' => '', + 'SERVER_NAME' => 'localhost', + 'SERVER_PORT' => 80, + 'ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'ACCEPT_LANGUAGE' => 'en-US,en;q=0.8', + 'ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', + 'USER_AGENT' => 'Slim Framework', + 'REMOTE_ADDR' => '127.0.0.1', + 'slim.url_scheme' => 'http', + 'slim.input' => '', + 'slim.errors' => @fopen('php://stderr', 'w') + ); + self::$environment = new self(array_merge($defaults, $userSettings)); + + return self::$environment; + } + + /** + * Constructor (private access) + * + * @param array|null $settings If present, these are used instead of global server variables + */ + private function __construct($settings = null) + { + if ($settings) { + $this->properties = $settings; + } else { + $env = array(); + + //The HTTP request method + $env['REQUEST_METHOD'] = $_SERVER['REQUEST_METHOD']; + + //The IP + $env['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; + + // Server params + $scriptName = $_SERVER['SCRIPT_NAME']; // <-- "/foo/index.php" + $requestUri = $_SERVER['REQUEST_URI']; // <-- "/foo/bar?test=abc" or "/foo/index.php/bar?test=abc" + $queryString = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''; // <-- "test=abc" or "" + + // Physical path + if (strpos($requestUri, $scriptName) !== false) { + $physicalPath = $scriptName; // <-- Without rewriting + } else { + $physicalPath = str_replace('\\', '', dirname($scriptName)); // <-- With rewriting + } + $env['SCRIPT_NAME'] = rtrim($physicalPath, '/'); // <-- Remove trailing slashes + + // Virtual path + $env['PATH_INFO'] = substr_replace($requestUri, '', 0, strlen($physicalPath)); // <-- Remove physical path + $env['PATH_INFO'] = str_replace('?' . $queryString, '', $env['PATH_INFO']); // <-- Remove query string + $env['PATH_INFO'] = '/' . ltrim($env['PATH_INFO'], '/'); // <-- Ensure leading slash + + // Query string (without leading "?") + $env['QUERY_STRING'] = $queryString; + + //Name of server host that is running the script + $env['SERVER_NAME'] = $_SERVER['SERVER_NAME']; + + //Number of server port that is running the script + $env['SERVER_PORT'] = $_SERVER['SERVER_PORT']; + + //HTTP request headers (retains HTTP_ prefix to match $_SERVER) + $headers = \Slim\Http\Headers::extract($_SERVER); + foreach ($headers as $key => $value) { + $env[$key] = $value; + } + + //Is the application running under HTTPS or HTTP protocol? + $env['slim.url_scheme'] = empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off' ? 'http' : 'https'; + + //Input stream (readable one time only; not available for multipart/form-data requests) + $rawInput = @file_get_contents('php://input'); + if (!$rawInput) { + $rawInput = ''; + } + $env['slim.input'] = $rawInput; + + //Error stream + $env['slim.errors'] = @fopen('php://stderr', 'w'); + + $this->properties = $env; + } + } + + /** + * Array Access: Offset Exists + */ + public function offsetExists($offset) + { + return isset($this->properties[$offset]); + } + + /** + * Array Access: Offset Get + */ + public function offsetGet($offset) + { + if (isset($this->properties[$offset])) { + return $this->properties[$offset]; + } else { + return null; + } + } + + /** + * Array Access: Offset Set + */ + public function offsetSet($offset, $value) + { + $this->properties[$offset] = $value; + } + + /** + * Array Access: Offset Unset + */ + public function offsetUnset($offset) + { + unset($this->properties[$offset]); + } + + /** + * IteratorAggregate + * + * @return \ArrayIterator + */ + public function getIterator() + { + return new \ArrayIterator($this->properties); + } +} diff --git a/api/libs/Slim/Exception/Pass.php b/api/libs/Slim/Exception/Pass.php new file mode 100644 index 0000000..b7fe1ee --- /dev/null +++ b/api/libs/Slim/Exception/Pass.php @@ -0,0 +1,49 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Exception; + +/** + * Pass Exception + * + * This Exception will cause the Router::dispatch method + * to skip the current matching route and continue to the next + * matching route. If no subsequent routes are found, a + * HTTP 404 Not Found response will be sent to the client. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Pass extends \Exception +{ +} diff --git a/api/libs/Slim/Exception/Stop.php b/api/libs/Slim/Exception/Stop.php new file mode 100644 index 0000000..da03033 --- /dev/null +++ b/api/libs/Slim/Exception/Stop.php @@ -0,0 +1,47 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Exception; + +/** + * Stop Exception + * + * This Exception is thrown when the Slim application needs to abort + * processing and return control flow to the outer PHP script. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Stop extends \Exception +{ +} diff --git a/api/libs/Slim/Helper/Set.php b/api/libs/Slim/Helper/Set.php new file mode 100644 index 0000000..e447938 --- /dev/null +++ b/api/libs/Slim/Helper/Set.php @@ -0,0 +1,246 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Helper; + +class Set implements \ArrayAccess, \Countable, \IteratorAggregate +{ + /** + * Key-value array of arbitrary data + * @var array + */ + protected $data = array(); + + /** + * Constructor + * @param array $items Pre-populate set with this key-value array + */ + public function __construct($items = array()) + { + $this->replace($items); + } + + /** + * Normalize data key + * + * Used to transform data key into the necessary + * key format for this set. Used in subclasses + * like \Slim\Http\Headers. + * + * @param string $key The data key + * @return mixed The transformed/normalized data key + */ + protected function normalizeKey($key) + { + return $key; + } + + /** + * Set data key to value + * @param string $key The data key + * @param mixed $value The data value + */ + public function set($key, $value) + { + $this->data[$this->normalizeKey($key)] = $value; + } + + /** + * Get data value with key + * @param string $key The data key + * @param mixed $default The value to return if data key does not exist + * @return mixed The data value, or the default value + */ + public function get($key, $default = null) + { + if ($this->has($key)) { + $isInvokable = is_object($this->data[$this->normalizeKey($key)]) && method_exists($this->data[$this->normalizeKey($key)], '__invoke'); + + return $isInvokable ? $this->data[$this->normalizeKey($key)]($this) : $this->data[$this->normalizeKey($key)]; + } + + return $default; + } + + /** + * Add data to set + * @param array $items Key-value array of data to append to this set + */ + public function replace($items) + { + foreach ($items as $key => $value) { + $this->set($key, $value); // Ensure keys are normalized + } + } + + /** + * Fetch set data + * @return array This set's key-value data array + */ + public function all() + { + return $this->data; + } + + /** + * Fetch set data keys + * @return array This set's key-value data array keys + */ + public function keys() + { + return array_keys($this->data); + } + + /** + * Does this set contain a key? + * @param string $key The data key + * @return boolean + */ + public function has($key) + { + return array_key_exists($this->normalizeKey($key), $this->data); + } + + /** + * Remove value with key from this set + * @param string $key The data key + */ + public function remove($key) + { + unset($this->data[$this->normalizeKey($key)]); + } + + /** + * Property Overloading + */ + + public function __get($key) + { + return $this->get($key); + } + + public function __set($key, $value) + { + $this->set($key, $value); + } + + public function __isset($key) + { + return $this->has($key); + } + + public function __unset($key) + { + return $this->remove($key); + } + + /** + * Clear all values + */ + public function clear() + { + $this->data = array(); + } + + /** + * Array Access + */ + + public function offsetExists($offset) + { + return $this->has($offset); + } + + public function offsetGet($offset) + { + return $this->get($offset); + } + + public function offsetSet($offset, $value) + { + $this->set($offset, $value); + } + + public function offsetUnset($offset) + { + $this->remove($offset); + } + + /** + * Countable + */ + + public function count() + { + return count($this->data); + } + + /** + * IteratorAggregate + */ + + public function getIterator() + { + return new \ArrayIterator($this->data); + } + + /** + * Ensure a value or object will remain globally unique + * @param string $key The value or object name + * @param Closure The closure that defines the object + * @return mixed + */ + public function singleton($key, $value) + { + $this->set($key, function ($c) use ($value) { + static $object; + + if (null === $object) { + $object = $value($c); + } + + return $object; + }); + } + + /** + * Protect closure from being directly invoked + * @param Closure $callable A closure to keep from being invoked and evaluated + * @return Closure + */ + public function protect(\Closure $callable) + { + return function () use ($callable) { + return $callable; + }; + } +} diff --git a/api/libs/Slim/Http/Cookies.php b/api/libs/Slim/Http/Cookies.php new file mode 100644 index 0000000..f00a2b6 --- /dev/null +++ b/api/libs/Slim/Http/Cookies.php @@ -0,0 +1,91 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Http; + +class Cookies extends \Slim\Helper\Set +{ + /** + * Default cookie settings + * @var array + */ + protected $defaults = array( + 'value' => '', + 'domain' => null, + 'path' => null, + 'expires' => null, + 'secure' => false, + 'httponly' => false + ); + + /** + * Set cookie + * + * The second argument may be a single scalar value, in which case + * it will be merged with the default settings and considered the `value` + * of the merged result. + * + * The second argument may also be an array containing any or all of + * the keys shown in the default settings above. This array will be + * merged with the defaults shown above. + * + * @param string $key Cookie name + * @param mixed $value Cookie settings + */ + public function set($key, $value) + { + if (is_array($value)) { + $cookieSettings = array_replace($this->defaults, $value); + } else { + $cookieSettings = array_replace($this->defaults, array('value' => $value)); + } + parent::set($key, $cookieSettings); + } + + /** + * Remove cookie + * + * Unlike \Slim\Helper\Set, this will actually *set* a cookie with + * an expiration date in the past. This expiration date will force + * the client-side cache to remove its cookie with the given name + * and settings. + * + * @param string $key Cookie name + * @param array $settings Optional cookie settings + */ + public function remove($key, $settings = array()) + { + $settings['value'] = ''; + $settings['expires'] = time() - 86400; + $this->set($key, array_replace($this->defaults, $settings)); + } +} diff --git a/api/libs/Slim/Http/Headers.php b/api/libs/Slim/Http/Headers.php new file mode 100644 index 0000000..dc37a08 --- /dev/null +++ b/api/libs/Slim/Http/Headers.php @@ -0,0 +1,104 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Http; + + /** + * HTTP Headers + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class Headers extends \Slim\Helper\Set +{ + /******************************************************************************** + * Static interface + *******************************************************************************/ + + /** + * Special-case HTTP headers that are otherwise unidentifiable as HTTP headers. + * Typically, HTTP headers in the $_SERVER array will be prefixed with + * `HTTP_` or `X_`. These are not so we list them here for later reference. + * + * @var array + */ + protected static $special = array( + 'CONTENT_TYPE', + 'CONTENT_LENGTH', + 'PHP_AUTH_USER', + 'PHP_AUTH_PW', + 'PHP_AUTH_DIGEST', + 'AUTH_TYPE' + ); + + /** + * Extract HTTP headers from an array of data (e.g. $_SERVER) + * @param array $data + * @return array + */ + public static function extract($data) + { + $results = array(); + foreach ($data as $key => $value) { + $key = strtoupper($key); + if (strpos($key, 'X_') === 0 || strpos($key, 'HTTP_') === 0 || in_array($key, static::$special)) { + if ($key === 'HTTP_CONTENT_TYPE' || $key === 'HTTP_CONTENT_LENGTH') { + continue; + } + $results[$key] = $value; + } + } + + return $results; + } + + /******************************************************************************** + * Instance interface + *******************************************************************************/ + + /** + * Transform header name into canonical form + * @param string $key + * @return string + */ + protected function normalizeKey($key) + { + $key = strtolower($key); + $key = str_replace(array('-', '_'), ' ', $key); + $key = preg_replace('#^http #', '', $key); + $key = ucwords($key); + $key = str_replace(' ', '-', $key); + + return $key; + } +} diff --git a/api/libs/Slim/Http/Request.php b/api/libs/Slim/Http/Request.php new file mode 100644 index 0000000..ff8703f --- /dev/null +++ b/api/libs/Slim/Http/Request.php @@ -0,0 +1,609 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Http; + +/** + * Slim HTTP Request + * + * This class provides a human-friendly interface to the Slim environment variables; + * environment variables are passed by reference and will be modified directly. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Request +{ + const METHOD_HEAD = 'HEAD'; + const METHOD_GET = 'GET'; + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_PATCH = 'PATCH'; + const METHOD_DELETE = 'DELETE'; + const METHOD_OPTIONS = 'OPTIONS'; + const METHOD_OVERRIDE = '_METHOD'; + + /** + * @var array + */ + protected static $formDataMediaTypes = array('application/x-www-form-urlencoded'); + + /** + * Application Environment + * @var \Slim\Environment + */ + protected $env; + + /** + * HTTP Headers + * @var \Slim\Http\Headers + */ + public $headers; + + /** + * HTTP Cookies + * @var \Slim\Helper\Set + */ + public $cookies; + + /** + * Constructor + * @param \Slim\Environment $env + */ + public function __construct(\Slim\Environment $env) + { + $this->env = $env; + $this->headers = new \Slim\Http\Headers(\Slim\Http\Headers::extract($env)); + $this->cookies = new \Slim\Helper\Set(\Slim\Http\Util::parseCookieHeader($env['HTTP_COOKIE'])); + } + + /** + * Get HTTP method + * @return string + */ + public function getMethod() + { + return $this->env['REQUEST_METHOD']; + } + + /** + * Is this a GET request? + * @return bool + */ + public function isGet() + { + return $this->getMethod() === self::METHOD_GET; + } + + /** + * Is this a POST request? + * @return bool + */ + public function isPost() + { + return $this->getMethod() === self::METHOD_POST; + } + + /** + * Is this a PUT request? + * @return bool + */ + public function isPut() + { + return $this->getMethod() === self::METHOD_PUT; + } + + /** + * Is this a PATCH request? + * @return bool + */ + public function isPatch() + { + return $this->getMethod() === self::METHOD_PATCH; + } + + /** + * Is this a DELETE request? + * @return bool + */ + public function isDelete() + { + return $this->getMethod() === self::METHOD_DELETE; + } + + /** + * Is this a HEAD request? + * @return bool + */ + public function isHead() + { + return $this->getMethod() === self::METHOD_HEAD; + } + + /** + * Is this a OPTIONS request? + * @return bool + */ + public function isOptions() + { + return $this->getMethod() === self::METHOD_OPTIONS; + } + + /** + * Is this an AJAX request? + * @return bool + */ + public function isAjax() + { + if ($this->params('isajax')) { + return true; + } elseif (isset($this->headers['X_REQUESTED_WITH']) && $this->headers['X_REQUESTED_WITH'] === 'XMLHttpRequest') { + return true; + } else { + return false; + } + } + + /** + * Is this an XHR request? (alias of Slim_Http_Request::isAjax) + * @return bool + */ + public function isXhr() + { + return $this->isAjax(); + } + + /** + * Fetch GET and POST data + * + * This method returns a union of GET and POST data as a key-value array, or the value + * of the array key if requested; if the array key does not exist, NULL is returned. + * + * @param string $key + * @return array|mixed|null + */ + public function params($key = null) + { + $union = array_merge($this->get(), $this->post()); + if ($key) { + return isset($union[$key]) ? $union[$key] : null; + } + + return $union; + } + + /** + * Fetch GET data + * + * This method returns a key-value array of data sent in the HTTP request query string, or + * the value of the array key if requested; if the array key does not exist, NULL is returned. + * + * @param string $key + * @return array|mixed|null + */ + public function get($key = null) + { + if (!isset($this->env['slim.request.query_hash'])) { + $output = array(); + if (function_exists('mb_parse_str') && !isset($this->env['slim.tests.ignore_multibyte'])) { + mb_parse_str($this->env['QUERY_STRING'], $output); + } else { + parse_str($this->env['QUERY_STRING'], $output); + } + $this->env['slim.request.query_hash'] = Util::stripSlashesIfMagicQuotes($output); + } + if ($key) { + if (isset($this->env['slim.request.query_hash'][$key])) { + return $this->env['slim.request.query_hash'][$key]; + } else { + return null; + } + } else { + return $this->env['slim.request.query_hash']; + } + } + + /** + * Fetch POST data + * + * This method returns a key-value array of data sent in the HTTP request body, or + * the value of a hash key if requested; if the array key does not exist, NULL is returned. + * + * @param string $key + * @return array|mixed|null + * @throws \RuntimeException If environment input is not available + */ + public function post($key = null) + { + if (!isset($this->env['slim.input'])) { + throw new \RuntimeException('Missing slim.input in environment variables'); + } + if (!isset($this->env['slim.request.form_hash'])) { + $this->env['slim.request.form_hash'] = array(); + if ($this->isFormData() && is_string($this->env['slim.input'])) { + $output = array(); + if (function_exists('mb_parse_str') && !isset($this->env['slim.tests.ignore_multibyte'])) { + mb_parse_str($this->env['slim.input'], $output); + } else { + parse_str($this->env['slim.input'], $output); + } + $this->env['slim.request.form_hash'] = Util::stripSlashesIfMagicQuotes($output); + } else { + $this->env['slim.request.form_hash'] = Util::stripSlashesIfMagicQuotes($_POST); + } + } + if ($key) { + if (isset($this->env['slim.request.form_hash'][$key])) { + return $this->env['slim.request.form_hash'][$key]; + } else { + return null; + } + } else { + return $this->env['slim.request.form_hash']; + } + } + + /** + * Fetch PUT data (alias for \Slim\Http\Request::post) + * @param string $key + * @return array|mixed|null + */ + public function put($key = null) + { + return $this->post($key); + } + + /** + * Fetch PATCH data (alias for \Slim\Http\Request::post) + * @param string $key + * @return array|mixed|null + */ + public function patch($key = null) + { + return $this->post($key); + } + + /** + * Fetch DELETE data (alias for \Slim\Http\Request::post) + * @param string $key + * @return array|mixed|null + */ + public function delete($key = null) + { + return $this->post($key); + } + + /** + * Fetch COOKIE data + * + * This method returns a key-value array of Cookie data sent in the HTTP request, or + * the value of a array key if requested; if the array key does not exist, NULL is returned. + * + * @param string $key + * @return array|string|null + */ + public function cookies($key = null) + { + if ($key) { + return $this->cookies->get($key); + } + + return $this->cookies; + // if (!isset($this->env['slim.request.cookie_hash'])) { + // $cookieHeader = isset($this->env['COOKIE']) ? $this->env['COOKIE'] : ''; + // $this->env['slim.request.cookie_hash'] = Util::parseCookieHeader($cookieHeader); + // } + // if ($key) { + // if (isset($this->env['slim.request.cookie_hash'][$key])) { + // return $this->env['slim.request.cookie_hash'][$key]; + // } else { + // return null; + // } + // } else { + // return $this->env['slim.request.cookie_hash']; + // } + } + + /** + * Does the Request body contain parsed form data? + * @return bool + */ + public function isFormData() + { + $method = isset($this->env['slim.method_override.original_method']) ? $this->env['slim.method_override.original_method'] : $this->getMethod(); + + return ($method === self::METHOD_POST && is_null($this->getContentType())) || in_array($this->getMediaType(), self::$formDataMediaTypes); + } + + /** + * Get Headers + * + * This method returns a key-value array of headers sent in the HTTP request, or + * the value of a hash key if requested; if the array key does not exist, NULL is returned. + * + * @param string $key + * @param mixed $default The default value returned if the requested header is not available + * @return mixed + */ + public function headers($key = null, $default = null) + { + if ($key) { + return $this->headers->get($key, $default); + } + + return $this->headers; + // if ($key) { + // $key = strtoupper($key); + // $key = str_replace('-', '_', $key); + // $key = preg_replace('@^HTTP_@', '', $key); + // if (isset($this->env[$key])) { + // return $this->env[$key]; + // } else { + // return $default; + // } + // } else { + // $headers = array(); + // foreach ($this->env as $key => $value) { + // if (strpos($key, 'slim.') !== 0) { + // $headers[$key] = $value; + // } + // } + // + // return $headers; + // } + } + + /** + * Get Body + * @return string + */ + public function getBody() + { + return $this->env['slim.input']; + } + + /** + * Get Content Type + * @return string|null + */ + public function getContentType() + { + return $this->headers->get('CONTENT_TYPE'); + } + + /** + * Get Media Type (type/subtype within Content Type header) + * @return string|null + */ + public function getMediaType() + { + $contentType = $this->getContentType(); + if ($contentType) { + $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType); + + return strtolower($contentTypeParts[0]); + } + + return null; + } + + /** + * Get Media Type Params + * @return array + */ + public function getMediaTypeParams() + { + $contentType = $this->getContentType(); + $contentTypeParams = array(); + if ($contentType) { + $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType); + $contentTypePartsLength = count($contentTypeParts); + for ($i = 1; $i < $contentTypePartsLength; $i++) { + $paramParts = explode('=', $contentTypeParts[$i]); + $contentTypeParams[strtolower($paramParts[0])] = $paramParts[1]; + } + } + + return $contentTypeParams; + } + + /** + * Get Content Charset + * @return string|null + */ + public function getContentCharset() + { + $mediaTypeParams = $this->getMediaTypeParams(); + if (isset($mediaTypeParams['charset'])) { + return $mediaTypeParams['charset']; + } + + return null; + } + + /** + * Get Content-Length + * @return int + */ + public function getContentLength() + { + return $this->headers->get('CONTENT_LENGTH', 0); + } + + /** + * Get Host + * @return string + */ + public function getHost() + { + if (isset($this->env['HTTP_HOST'])) { + if (strpos($this->env['HTTP_HOST'], ':') !== false) { + $hostParts = explode(':', $this->env['HTTP_HOST']); + + return $hostParts[0]; + } + + return $this->env['HTTP_HOST']; + } + + return $this->env['SERVER_NAME']; + } + + /** + * Get Host with Port + * @return string + */ + public function getHostWithPort() + { + return sprintf('%s:%s', $this->getHost(), $this->getPort()); + } + + /** + * Get Port + * @return int + */ + public function getPort() + { + return (int)$this->env['SERVER_PORT']; + } + + /** + * Get Scheme (https or http) + * @return string + */ + public function getScheme() + { + return $this->env['slim.url_scheme']; + } + + /** + * Get Script Name (physical path) + * @return string + */ + public function getScriptName() + { + return $this->env['SCRIPT_NAME']; + } + + /** + * LEGACY: Get Root URI (alias for Slim_Http_Request::getScriptName) + * @return string + */ + public function getRootUri() + { + return $this->getScriptName(); + } + + /** + * Get Path (physical path + virtual path) + * @return string + */ + public function getPath() + { + return $this->getScriptName() . $this->getPathInfo(); + } + + /** + * Get Path Info (virtual path) + * @return string + */ + public function getPathInfo() + { + return $this->env['PATH_INFO']; + } + + /** + * LEGACY: Get Resource URI (alias for Slim_Http_Request::getPathInfo) + * @return string + */ + public function getResourceUri() + { + return $this->getPathInfo(); + } + + /** + * Get URL (scheme + host [ + port if non-standard ]) + * @return string + */ + public function getUrl() + { + $url = $this->getScheme() . '://' . $this->getHost(); + if (($this->getScheme() === 'https' && $this->getPort() !== 443) || ($this->getScheme() === 'http' && $this->getPort() !== 80)) { + $url .= sprintf(':%s', $this->getPort()); + } + + return $url; + } + + /** + * Get IP + * @return string + */ + public function getIp() + { + if (isset($this->env['X_FORWARDED_FOR'])) { + return $this->env['X_FORWARDED_FOR']; + } elseif (isset($this->env['CLIENT_IP'])) { + return $this->env['CLIENT_IP']; + } + + return $this->env['REMOTE_ADDR']; + } + + /** + * Get Referrer + * @return string|null + */ + public function getReferrer() + { + return $this->headers->get('HTTP_REFERER'); + } + + /** + * Get Referer (for those who can't spell) + * @return string|null + */ + public function getReferer() + { + return $this->getReferrer(); + } + + /** + * Get User Agent + * @return string|null + */ + public function getUserAgent() + { + return $this->headers->get('HTTP_USER_AGENT'); + } +} diff --git a/api/libs/Slim/Http/Response.php b/api/libs/Slim/Http/Response.php new file mode 100644 index 0000000..c7a6499 --- /dev/null +++ b/api/libs/Slim/Http/Response.php @@ -0,0 +1,511 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Http; + +/** + * Response + * + * This is a simple abstraction over top an HTTP response. This + * provides methods to set the HTTP status, the HTTP headers, + * and the HTTP body. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Response implements \ArrayAccess, \Countable, \IteratorAggregate +{ + /** + * @var int HTTP status code + */ + protected $status; + + /** + * @var \Slim\Http\Headers + */ + public $headers; + + /** + * @var \Slim\Http\Cookies + */ + public $cookies; + + /** + * @var string HTTP response body + */ + protected $body; + + /** + * @var int Length of HTTP response body + */ + protected $length; + + /** + * @var array HTTP response codes and messages + */ + protected static $messages = array( + //Informational 1xx + 100 => '100 Continue', + 101 => '101 Switching Protocols', + //Successful 2xx + 200 => '200 OK', + 201 => '201 Created', + 202 => '202 Accepted', + 203 => '203 Non-Authoritative Information', + 204 => '204 No Content', + 205 => '205 Reset Content', + 206 => '206 Partial Content', + //Redirection 3xx + 300 => '300 Multiple Choices', + 301 => '301 Moved Permanently', + 302 => '302 Found', + 303 => '303 See Other', + 304 => '304 Not Modified', + 305 => '305 Use Proxy', + 306 => '306 (Unused)', + 307 => '307 Temporary Redirect', + //Client Error 4xx + 400 => '400 Bad Request', + 401 => '401 Unauthorized', + 402 => '402 Payment Required', + 403 => '403 Forbidden', + 404 => '404 Not Found', + 405 => '405 Method Not Allowed', + 406 => '406 Not Acceptable', + 407 => '407 Proxy Authentication Required', + 408 => '408 Request Timeout', + 409 => '409 Conflict', + 410 => '410 Gone', + 411 => '411 Length Required', + 412 => '412 Precondition Failed', + 413 => '413 Request Entity Too Large', + 414 => '414 Request-URI Too Long', + 415 => '415 Unsupported Media Type', + 416 => '416 Requested Range Not Satisfiable', + 417 => '417 Expectation Failed', + 422 => '422 Unprocessable Entity', + 423 => '423 Locked', + //Server Error 5xx + 500 => '500 Internal Server Error', + 501 => '501 Not Implemented', + 502 => '502 Bad Gateway', + 503 => '503 Service Unavailable', + 504 => '504 Gateway Timeout', + 505 => '505 HTTP Version Not Supported' + ); + + /** + * Constructor + * @param string $body The HTTP response body + * @param int $status The HTTP response status + * @param \Slim\Http\Headers|array $headers The HTTP response headers + */ + public function __construct($body = '', $status = 200, $headers = array()) + { + $this->setStatus($status); + $this->headers = new \Slim\Http\Headers(array('Content-Type' => 'text/html')); + $this->headers->replace($headers); + $this->cookies = new \Slim\Http\Cookies(); + $this->write($body); + } + + public function getStatus() + { + return $this->status; + } + + public function setStatus($status) + { + $this->status = (int)$status; + } + + /** + * DEPRECATION WARNING! Use `getStatus` or `setStatus` instead. + * + * Get and set status + * @param int|null $status + * @return int + */ + public function status($status = null) + { + if (!is_null($status)) { + $this->status = (int) $status; + } + + return $this->status; + } + + /** + * DEPRECATION WARNING! Access `headers` property directly. + * + * Get and set header + * @param string $name Header name + * @param string|null $value Header value + * @return string Header value + */ + public function header($name, $value = null) + { + if (!is_null($value)) { + $this->headers->set($name, $value); + } + + return $this->headers->get($name); + } + + /** + * DEPRECATION WARNING! Access `headers` property directly. + * + * Get headers + * @return \Slim\Http\Headers + */ + public function headers() + { + return $this->headers; + } + + public function getBody() + { + return $this->body; + } + + public function setBody($content) + { + $this->write($content, true); + } + + /** + * DEPRECATION WARNING! use `getBody` or `setBody` instead. + * + * Get and set body + * @param string|null $body Content of HTTP response body + * @return string + */ + public function body($body = null) + { + if (!is_null($body)) { + $this->write($body, true); + } + + return $this->body; + } + + /** + * Append HTTP response body + * @param string $body Content to append to the current HTTP response body + * @param bool $replace Overwrite existing response body? + * @return string The updated HTTP response body + */ + public function write($body, $replace = false) + { + if ($replace) { + $this->body = $body; + } else { + $this->body .= (string)$body; + } + $this->length = strlen($this->body); + + return $this->body; + } + + public function getLength() + { + return $this->length; + } + + /** + * DEPRECATION WARNING! Use `getLength` or `write` or `body` instead. + * + * Get and set length + * @param int|null $length + * @return int + */ + public function length($length = null) + { + if (!is_null($length)) { + $this->length = (int) $length; + } + + return $this->length; + } + + /** + * Finalize + * + * This prepares this response and returns an array + * of [status, headers, body]. This array is passed to outer middleware + * if available or directly to the Slim run method. + * + * @return array[int status, array headers, string body] + */ + public function finalize() + { + // Prepare response + if (in_array($this->status, array(204, 304))) { + $this->headers->remove('Content-Type'); + $this->headers->remove('Content-Length'); + $this->setBody(''); + } + + return array($this->status, $this->headers, $this->body); + } + + /** + * DEPRECATION WARNING! Access `cookies` property directly. + * + * Set cookie + * + * Instead of using PHP's `setcookie()` function, Slim manually constructs the HTTP `Set-Cookie` + * header on its own and delegates this responsibility to the `Slim_Http_Util` class. This + * response's header is passed by reference to the utility class and is directly modified. By not + * relying on PHP's native implementation, Slim allows middleware the opportunity to massage or + * analyze the raw header before the response is ultimately delivered to the HTTP client. + * + * @param string $name The name of the cookie + * @param string|array $value If string, the value of cookie; if array, properties for + * cookie including: value, expire, path, domain, secure, httponly + */ + public function setCookie($name, $value) + { + // Util::setCookieHeader($this->header, $name, $value); + $this->cookies->set($name, $value); + } + + /** + * DEPRECATION WARNING! Access `cookies` property directly. + * + * Delete cookie + * + * Instead of using PHP's `setcookie()` function, Slim manually constructs the HTTP `Set-Cookie` + * header on its own and delegates this responsibility to the `Slim_Http_Util` class. This + * response's header is passed by reference to the utility class and is directly modified. By not + * relying on PHP's native implementation, Slim allows middleware the opportunity to massage or + * analyze the raw header before the response is ultimately delivered to the HTTP client. + * + * This method will set a cookie with the given name that has an expiration time in the past; this will + * prompt the HTTP client to invalidate and remove the client-side cookie. Optionally, you may + * also pass a key/value array as the second argument. If the "domain" key is present in this + * array, only the Cookie with the given name AND domain will be removed. The invalidating cookie + * sent with this response will adopt all properties of the second argument. + * + * @param string $name The name of the cookie + * @param array $settings Properties for cookie including: value, expire, path, domain, secure, httponly + */ + public function deleteCookie($name, $settings = array()) + { + $this->cookies->remove($name, $settings); + // Util::deleteCookieHeader($this->header, $name, $value); + } + + /** + * Redirect + * + * This method prepares this response to return an HTTP Redirect response + * to the HTTP client. + * + * @param string $url The redirect destination + * @param int $status The redirect HTTP status code + */ + public function redirect ($url, $status = 302) + { + $this->setStatus($status); + $this->headers->set('Location', $url); + } + + /** + * Helpers: Empty? + * @return bool + */ + public function isEmpty() + { + return in_array($this->status, array(201, 204, 304)); + } + + /** + * Helpers: Informational? + * @return bool + */ + public function isInformational() + { + return $this->status >= 100 && $this->status < 200; + } + + /** + * Helpers: OK? + * @return bool + */ + public function isOk() + { + return $this->status === 200; + } + + /** + * Helpers: Successful? + * @return bool + */ + public function isSuccessful() + { + return $this->status >= 200 && $this->status < 300; + } + + /** + * Helpers: Redirect? + * @return bool + */ + public function isRedirect() + { + return in_array($this->status, array(301, 302, 303, 307)); + } + + /** + * Helpers: Redirection? + * @return bool + */ + public function isRedirection() + { + return $this->status >= 300 && $this->status < 400; + } + + /** + * Helpers: Forbidden? + * @return bool + */ + public function isForbidden() + { + return $this->status === 403; + } + + /** + * Helpers: Not Found? + * @return bool + */ + public function isNotFound() + { + return $this->status === 404; + } + + /** + * Helpers: Client error? + * @return bool + */ + public function isClientError() + { + return $this->status >= 400 && $this->status < 500; + } + + /** + * Helpers: Server Error? + * @return bool + */ + public function isServerError() + { + return $this->status >= 500 && $this->status < 600; + } + + /** + * DEPRECATION WARNING! ArrayAccess interface will be removed from \Slim\Http\Response. + * Iterate `headers` or `cookies` properties directly. + */ + + /** + * Array Access: Offset Exists + */ + public function offsetExists($offset) + { + return isset($this->headers[$offset]); + } + + /** + * Array Access: Offset Get + */ + public function offsetGet($offset) + { + return $this->headers[$offset]; + } + + /** + * Array Access: Offset Set + */ + public function offsetSet($offset, $value) + { + $this->headers[$offset] = $value; + } + + /** + * Array Access: Offset Unset + */ + public function offsetUnset($offset) + { + unset($this->headers[$offset]); + } + + /** + * DEPRECATION WARNING! Countable interface will be removed from \Slim\Http\Response. + * Call `count` on `headers` or `cookies` properties directly. + * + * Countable: Count + */ + public function count() + { + return count($this->headers); + } + + /** + * DEPRECATION WARNING! IteratorAggregate interface will be removed from \Slim\Http\Response. + * Iterate `headers` or `cookies` properties directly. + * + * Get Iterator + * + * This returns the contained `\Slim\Http\Headers` instance which + * is itself iterable. + * + * @return \Slim\Http\Headers + */ + public function getIterator() + { + return $this->headers->getIterator(); + } + + /** + * Get message for HTTP status code + * @param int $status + * @return string|null + */ + public static function getMessageForCode($status) + { + if (isset(self::$messages[$status])) { + return self::$messages[$status]; + } else { + return null; + } + } +} diff --git a/api/libs/Slim/Http/Util.php b/api/libs/Slim/Http/Util.php new file mode 100644 index 0000000..e7cf698 --- /dev/null +++ b/api/libs/Slim/Http/Util.php @@ -0,0 +1,434 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Http; + +/** + * Slim HTTP Utilities + * + * This class provides useful methods for handling HTTP requests. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Util +{ + /** + * Strip slashes from string or array + * + * This method strips slashes from its input. By default, this method will only + * strip slashes from its input if magic quotes are enabled. Otherwise, you may + * override the magic quotes setting with either TRUE or FALSE as the send argument + * to force this method to strip or not strip slashes from its input. + * + * @param array|string $rawData + * @param bool $overrideStripSlashes + * @return array|string + */ + public static function stripSlashesIfMagicQuotes($rawData, $overrideStripSlashes = null) + { + $strip = is_null($overrideStripSlashes) ? get_magic_quotes_gpc() : $overrideStripSlashes; + if ($strip) { + return self::stripSlashes($rawData); + } else { + return $rawData; + } + } + + /** + * Strip slashes from string or array + * @param array|string $rawData + * @return array|string + */ + protected static function stripSlashes($rawData) + { + return is_array($rawData) ? array_map(array('self', 'stripSlashes'), $rawData) : stripslashes($rawData); + } + + /** + * Encrypt data + * + * This method will encrypt data using a given key, vector, and cipher. + * By default, this will encrypt data using the RIJNDAEL/AES 256 bit cipher. You + * may override the default cipher and cipher mode by passing your own desired + * cipher and cipher mode as the final key-value array argument. + * + * @param string $data The unencrypted data + * @param string $key The encryption key + * @param string $iv The encryption initialization vector + * @param array $settings Optional key-value array with custom algorithm and mode + * @return string + */ + public static function encrypt($data, $key, $iv, $settings = array()) + { + if ($data === '' || !extension_loaded('mcrypt')) { + return $data; + } + + //Merge settings with defaults + $defaults = array( + 'algorithm' => MCRYPT_RIJNDAEL_256, + 'mode' => MCRYPT_MODE_CBC + ); + $settings = array_merge($defaults, $settings); + + //Get module + $module = mcrypt_module_open($settings['algorithm'], '', $settings['mode'], ''); + + //Validate IV + $ivSize = mcrypt_enc_get_iv_size($module); + if (strlen($iv) > $ivSize) { + $iv = substr($iv, 0, $ivSize); + } + + //Validate key + $keySize = mcrypt_enc_get_key_size($module); + if (strlen($key) > $keySize) { + $key = substr($key, 0, $keySize); + } + + //Encrypt value + mcrypt_generic_init($module, $key, $iv); + $res = @mcrypt_generic($module, $data); + mcrypt_generic_deinit($module); + + return $res; + } + + /** + * Decrypt data + * + * This method will decrypt data using a given key, vector, and cipher. + * By default, this will decrypt data using the RIJNDAEL/AES 256 bit cipher. You + * may override the default cipher and cipher mode by passing your own desired + * cipher and cipher mode as the final key-value array argument. + * + * @param string $data The encrypted data + * @param string $key The encryption key + * @param string $iv The encryption initialization vector + * @param array $settings Optional key-value array with custom algorithm and mode + * @return string + */ + public static function decrypt($data, $key, $iv, $settings = array()) + { + if ($data === '' || !extension_loaded('mcrypt')) { + return $data; + } + + //Merge settings with defaults + $defaults = array( + 'algorithm' => MCRYPT_RIJNDAEL_256, + 'mode' => MCRYPT_MODE_CBC + ); + $settings = array_merge($defaults, $settings); + + //Get module + $module = mcrypt_module_open($settings['algorithm'], '', $settings['mode'], ''); + + //Validate IV + $ivSize = mcrypt_enc_get_iv_size($module); + if (strlen($iv) > $ivSize) { + $iv = substr($iv, 0, $ivSize); + } + + //Validate key + $keySize = mcrypt_enc_get_key_size($module); + if (strlen($key) > $keySize) { + $key = substr($key, 0, $keySize); + } + + //Decrypt value + mcrypt_generic_init($module, $key, $iv); + $decryptedData = @mdecrypt_generic($module, $data); + $res = rtrim($decryptedData, "\0"); + mcrypt_generic_deinit($module); + + return $res; + } + + /** + * Serialize Response cookies into raw HTTP header + * @param \Slim\Http\Headers $headers The Response headers + * @param \Slim\Http\Cookies $cookies The Response cookies + * @param array $config The Slim app settings + */ + public static function serializeCookies(\Slim\Http\Headers &$headers, \Slim\Http\Cookies $cookies, array $config) + { + if ($config['cookies.encrypt']) { + foreach ($cookies as $name => $settings) { + if (is_string($settings['expires'])) { + $expires = strtotime($settings['expires']); + } else { + $expires = (int) $settings['expires']; + } + + $settings['value'] = static::encodeSecureCookie( + $settings['value'], + $expires, + $config['cookies.secret_key'], + $config['cookies.cipher'], + $config['cookies.cipher_mode'] + ); + static::setCookieHeader($headers, $name, $settings); + } + } else { + foreach ($cookies as $name => $settings) { + static::setCookieHeader($headers, $name, $settings); + } + } + } + + /** + * Encode secure cookie value + * + * This method will create the secure value of an HTTP cookie. The + * cookie value is encrypted and hashed so that its value is + * secure and checked for integrity when read in subsequent requests. + * + * @param string $value The insecure HTTP cookie value + * @param int $expires The UNIX timestamp at which this cookie will expire + * @param string $secret The secret key used to hash the cookie value + * @param int $algorithm The algorithm to use for encryption + * @param int $mode The algorithm mode to use for encryption + * @return string + */ + public static function encodeSecureCookie($value, $expires, $secret, $algorithm, $mode) + { + $key = hash_hmac('sha1', $expires, $secret); + $iv = self::getIv($expires, $secret); + $secureString = base64_encode( + self::encrypt( + $value, + $key, + $iv, + array( + 'algorithm' => $algorithm, + 'mode' => $mode + ) + ) + ); + $verificationString = hash_hmac('sha1', $expires . $value, $key); + + return implode('|', array($expires, $secureString, $verificationString)); + } + + /** + * Decode secure cookie value + * + * This method will decode the secure value of an HTTP cookie. The + * cookie value is encrypted and hashed so that its value is + * secure and checked for integrity when read in subsequent requests. + * + * @param string $value The secure HTTP cookie value + * @param string $secret The secret key used to hash the cookie value + * @param int $algorithm The algorithm to use for encryption + * @param int $mode The algorithm mode to use for encryption + * @return bool|string + */ + public static function decodeSecureCookie($value, $secret, $algorithm, $mode) + { + if ($value) { + $value = explode('|', $value); + if (count($value) === 3 && ((int) $value[0] === 0 || (int) $value[0] > time())) { + $key = hash_hmac('sha1', $value[0], $secret); + $iv = self::getIv($value[0], $secret); + $data = self::decrypt( + base64_decode($value[1]), + $key, + $iv, + array( + 'algorithm' => $algorithm, + 'mode' => $mode + ) + ); + $verificationString = hash_hmac('sha1', $value[0] . $data, $key); + if ($verificationString === $value[2]) { + return $data; + } + } + } + + return false; + } + + /** + * Set HTTP cookie header + * + * This method will construct and set the HTTP `Set-Cookie` header. Slim + * uses this method instead of PHP's native `setcookie` method. This allows + * more control of the HTTP header irrespective of the native implementation's + * dependency on PHP versions. + * + * This method accepts the Slim_Http_Headers object by reference as its + * first argument; this method directly modifies this object instead of + * returning a value. + * + * @param array $header + * @param string $name + * @param string $value + */ + public static function setCookieHeader(&$header, $name, $value) + { + //Build cookie header + if (is_array($value)) { + $domain = ''; + $path = ''; + $expires = ''; + $secure = ''; + $httponly = ''; + if (isset($value['domain']) && $value['domain']) { + $domain = '; domain=' . $value['domain']; + } + if (isset($value['path']) && $value['path']) { + $path = '; path=' . $value['path']; + } + if (isset($value['expires'])) { + if (is_string($value['expires'])) { + $timestamp = strtotime($value['expires']); + } else { + $timestamp = (int) $value['expires']; + } + if ($timestamp !== 0) { + $expires = '; expires=' . gmdate('D, d-M-Y H:i:s e', $timestamp); + } + } + if (isset($value['secure']) && $value['secure']) { + $secure = '; secure'; + } + if (isset($value['httponly']) && $value['httponly']) { + $httponly = '; HttpOnly'; + } + $cookie = sprintf('%s=%s%s', urlencode($name), urlencode((string) $value['value']), $domain . $path . $expires . $secure . $httponly); + } else { + $cookie = sprintf('%s=%s', urlencode($name), urlencode((string) $value)); + } + + //Set cookie header + if (!isset($header['Set-Cookie']) || $header['Set-Cookie'] === '') { + $header['Set-Cookie'] = $cookie; + } else { + $header['Set-Cookie'] = implode("\n", array($header['Set-Cookie'], $cookie)); + } + } + + /** + * Delete HTTP cookie header + * + * This method will construct and set the HTTP `Set-Cookie` header to invalidate + * a client-side HTTP cookie. If a cookie with the same name (and, optionally, domain) + * is already set in the HTTP response, it will also be removed. Slim uses this method + * instead of PHP's native `setcookie` method. This allows more control of the HTTP header + * irrespective of PHP's native implementation's dependency on PHP versions. + * + * This method accepts the Slim_Http_Headers object by reference as its + * first argument; this method directly modifies this object instead of + * returning a value. + * + * @param array $header + * @param string $name + * @param array $value + */ + public static function deleteCookieHeader(&$header, $name, $value = array()) + { + //Remove affected cookies from current response header + $cookiesOld = array(); + $cookiesNew = array(); + if (isset($header['Set-Cookie'])) { + $cookiesOld = explode("\n", $header['Set-Cookie']); + } + foreach ($cookiesOld as $c) { + if (isset($value['domain']) && $value['domain']) { + $regex = sprintf('@%s=.*domain=%s@', urlencode($name), preg_quote($value['domain'])); + } else { + $regex = sprintf('@%s=@', urlencode($name)); + } + if (preg_match($regex, $c) === 0) { + $cookiesNew[] = $c; + } + } + if ($cookiesNew) { + $header['Set-Cookie'] = implode("\n", $cookiesNew); + } else { + unset($header['Set-Cookie']); + } + + //Set invalidating cookie to clear client-side cookie + self::setCookieHeader($header, $name, array_merge(array('value' => '', 'path' => null, 'domain' => null, 'expires' => time() - 100), $value)); + } + + /** + * Parse cookie header + * + * This method will parse the HTTP request's `Cookie` header + * and extract cookies into an associative array. + * + * @param string + * @return array + */ + public static function parseCookieHeader($header) + { + $cookies = array(); + $header = rtrim($header, "\r\n"); + $headerPieces = preg_split('@\s*[;,]\s*@', $header); + foreach ($headerPieces as $c) { + $cParts = explode('=', $c); + if (count($cParts) === 2) { + $key = urldecode($cParts[0]); + $value = urldecode($cParts[1]); + if (!isset($cookies[$key])) { + $cookies[$key] = $value; + } + } + } + + return $cookies; + } + + /** + * Generate a random IV + * + * This method will generate a non-predictable IV for use with + * the cookie encryption + * + * @param int $expires The UNIX timestamp at which this cookie will expire + * @param string $secret The secret key used to hash the cookie value + * @return string Hash + */ + private static function getIv($expires, $secret) + { + $data1 = hash_hmac('sha1', 'a'.$expires.'b', $secret); + $data2 = hash_hmac('sha1', 'z'.$expires.'y', $secret); + + return pack("h*", $data1.$data2); + } +} diff --git a/api/libs/Slim/Log.php b/api/libs/Slim/Log.php new file mode 100644 index 0000000..824a40d --- /dev/null +++ b/api/libs/Slim/Log.php @@ -0,0 +1,349 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * Log + * + * This is the primary logger for a Slim application. You may provide + * a Log Writer in conjunction with this Log to write to various output + * destinations (e.g. a file). This class provides this interface: + * + * debug( mixed $object, array $context ) + * info( mixed $object, array $context ) + * notice( mixed $object, array $context ) + * warning( mixed $object, array $context ) + * error( mixed $object, array $context ) + * critical( mixed $object, array $context ) + * alert( mixed $object, array $context ) + * emergency( mixed $object, array $context ) + * log( mixed $level, mixed $object, array $context ) + * + * This class assumes only that your Log Writer has a public `write()` method + * that accepts any object as its one and only argument. The Log Writer + * class may write or send its argument anywhere: a file, STDERR, + * a remote web API, etc. The possibilities are endless. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Log +{ + const EMERGENCY = 1; + const ALERT = 2; + const CRITICAL = 3; + const FATAL = 3; //DEPRECATED replace with CRITICAL + const ERROR = 4; + const WARN = 5; + const NOTICE = 6; + const INFO = 7; + const DEBUG = 8; + + /** + * @var array + */ + protected static $levels = array( + self::EMERGENCY => 'EMERGENCY', + self::ALERT => 'ALERT', + self::CRITICAL => 'CRITICAL', + self::ERROR => 'ERROR', + self::WARN => 'WARNING', + self::NOTICE => 'NOTICE', + self::INFO => 'INFO', + self::DEBUG => 'DEBUG' + ); + + /** + * @var mixed + */ + protected $writer; + + /** + * @var bool + */ + protected $enabled; + + /** + * @var int + */ + protected $level; + + /** + * Constructor + * @param mixed $writer + */ + public function __construct($writer) + { + $this->writer = $writer; + $this->enabled = true; + $this->level = self::DEBUG; + } + + /** + * Is logging enabled? + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enable or disable logging + * @param bool $enabled + */ + public function setEnabled($enabled) + { + if ($enabled) { + $this->enabled = true; + } else { + $this->enabled = false; + } + } + + /** + * Set level + * @param int $level + * @throws \InvalidArgumentException If invalid log level specified + */ + public function setLevel($level) + { + if (!isset(self::$levels[$level])) { + throw new \InvalidArgumentException('Invalid log level'); + } + $this->level = $level; + } + + /** + * Get level + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * Set writer + * @param mixed $writer + */ + public function setWriter($writer) + { + $this->writer = $writer; + } + + /** + * Get writer + * @return mixed + */ + public function getWriter() + { + return $this->writer; + } + + /** + * Is logging enabled? + * @return bool + */ + public function isEnabled() + { + return $this->enabled; + } + + /** + * Log debug message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function debug($object, $context = array()) + { + return $this->log(self::DEBUG, $object, $context); + } + + /** + * Log info message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function info($object, $context = array()) + { + return $this->log(self::INFO, $object, $context); + } + + /** + * Log notice message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function notice($object, $context = array()) + { + return $this->log(self::NOTICE, $object, $context); + } + + /** + * Log warning message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function warning($object, $context = array()) + { + return $this->log(self::WARN, $object, $context); + } + + /** + * DEPRECATED for function warning + * Log warning message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function warn($object, $context = array()) + { + return $this->log(self::WARN, $object, $context); + } + + /** + * Log error message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function error($object, $context = array()) + { + return $this->log(self::ERROR, $object, $context); + } + + /** + * Log critical message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function critical($object, $context = array()) + { + return $this->log(self::CRITICAL, $object, $context); + } + + /** + * DEPRECATED for function critical + * Log fatal message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function fatal($object, $context = array()) + { + return $this->log(self::CRITICAL, $object, $context); + } + + /** + * Log alert message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function alert($object, $context = array()) + { + return $this->log(self::ALERT, $object, $context); + } + + /** + * Log emergency message + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + */ + public function emergency($object, $context = array()) + { + return $this->log(self::EMERGENCY, $object, $context); + } + + /** + * Log message + * @param mixed $level + * @param mixed $object + * @param array $context + * @return mixed|bool What the Logger returns, or false if Logger not set or not enabled + * @throws \InvalidArgumentException If invalid log level + */ + public function log($level, $object, $context = array()) + { + if (!isset(self::$levels[$level])) { + throw new \InvalidArgumentException('Invalid log level supplied to function'); + } else if ($this->enabled && $this->writer && $level <= $this->level) { + $message = (string)$object; + if (count($context) > 0) { + if (isset($context['exception']) && $context['exception'] instanceof \Exception) { + $message .= ' - ' . $context['exception']; + unset($context['exception']); + } + $message = $this->interpolate($message, $context); + } + return $this->writer->write($message, $level); + } else { + return false; + } + } + + /** + * DEPRECATED for function log + * Log message + * @param mixed $object The object to log + * @param int $level The message level + * @return int|bool + */ + protected function write($object, $level) + { + return $this->log($level, $object); + } + + /** + * Interpolate log message + * @param mixed $message The log message + * @param array $context An array of placeholder values + * @return string The processed string + */ + protected function interpolate($message, $context = array()) + { + $replace = array(); + foreach ($context as $key => $value) { + $replace['{' . $key . '}'] = $value; + } + return strtr($message, $replace); + } +} diff --git a/api/libs/Slim/LogWriter.php b/api/libs/Slim/LogWriter.php new file mode 100644 index 0000000..e3d91b0 --- /dev/null +++ b/api/libs/Slim/LogWriter.php @@ -0,0 +1,75 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * Log Writer + * + * This class is used by Slim_Log to write log messages to a valid, writable + * resource handle (e.g. a file or STDERR). + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class LogWriter +{ + /** + * @var resource + */ + protected $resource; + + /** + * Constructor + * @param resource $resource + * @throws \InvalidArgumentException If invalid resource + */ + public function __construct($resource) + { + if (!is_resource($resource)) { + throw new \InvalidArgumentException('Cannot create LogWriter. Invalid resource handle.'); + } + $this->resource = $resource; + } + + /** + * Write message + * @param mixed $message + * @param int $level + * @return int|bool + */ + public function write($message, $level = null) + { + return fwrite($this->resource, (string) $message . PHP_EOL); + } +} diff --git a/api/libs/Slim/Middleware.php b/api/libs/Slim/Middleware.php new file mode 100644 index 0000000..f316b17 --- /dev/null +++ b/api/libs/Slim/Middleware.php @@ -0,0 +1,114 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * Middleware + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +abstract class Middleware +{ + /** + * @var \Slim\Slim Reference to the primary application instance + */ + protected $app; + + /** + * @var mixed Reference to the next downstream middleware + */ + protected $next; + + /** + * Set application + * + * This method injects the primary Slim application instance into + * this middleware. + * + * @param \Slim\Slim $application + */ + final public function setApplication($application) + { + $this->app = $application; + } + + /** + * Get application + * + * This method retrieves the application previously injected + * into this middleware. + * + * @return \Slim\Slim + */ + final public function getApplication() + { + return $this->app; + } + + /** + * Set next middleware + * + * This method injects the next downstream middleware into + * this middleware so that it may optionally be called + * when appropriate. + * + * @param \Slim|\Slim\Middleware + */ + final public function setNextMiddleware($nextMiddleware) + { + $this->next = $nextMiddleware; + } + + /** + * Get next middleware + * + * This method retrieves the next downstream middleware + * previously injected into this middleware. + * + * @return \Slim\Slim|\Slim\Middleware + */ + final public function getNextMiddleware() + { + return $this->next; + } + + /** + * Call + * + * Perform actions specific to this middleware and optionally + * call the next downstream middleware. + */ + abstract public function call(); +} diff --git a/api/libs/Slim/Middleware/ContentTypes.php b/api/libs/Slim/Middleware/ContentTypes.php new file mode 100644 index 0000000..3e024ee --- /dev/null +++ b/api/libs/Slim/Middleware/ContentTypes.php @@ -0,0 +1,174 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Middleware; + + /** + * Content Types + * + * This is middleware for a Slim application that intercepts + * the HTTP request body and parses it into the appropriate + * PHP data structure if possible; else it returns the HTTP + * request body unchanged. This is particularly useful + * for preparing the HTTP request body for an XML or JSON API. + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class ContentTypes extends \Slim\Middleware +{ + /** + * @var array + */ + protected $contentTypes; + + /** + * Constructor + * @param array $settings + */ + public function __construct($settings = array()) + { + $defaults = array( + 'application/json' => array($this, 'parseJson'), + 'application/xml' => array($this, 'parseXml'), + 'text/xml' => array($this, 'parseXml'), + 'text/csv' => array($this, 'parseCsv') + ); + $this->contentTypes = array_merge($defaults, $settings); + } + + /** + * Call + */ + public function call() + { + $mediaType = $this->app->request()->getMediaType(); + if ($mediaType) { + $env = $this->app->environment(); + $env['slim.input_original'] = $env['slim.input']; + $env['slim.input'] = $this->parse($env['slim.input'], $mediaType); + } + $this->next->call(); + } + + /** + * Parse input + * + * This method will attempt to parse the request body + * based on its content type if available. + * + * @param string $input + * @param string $contentType + * @return mixed + */ + protected function parse ($input, $contentType) + { + if (isset($this->contentTypes[$contentType]) && is_callable($this->contentTypes[$contentType])) { + $result = call_user_func($this->contentTypes[$contentType], $input); + if ($result) { + return $result; + } + } + + return $input; + } + + /** + * Parse JSON + * + * This method converts the raw JSON input + * into an associative array. + * + * @param string $input + * @return array|string + */ + protected function parseJson($input) + { + if (function_exists('json_decode')) { + $result = json_decode($input, true); + if ($result) { + return $result; + } + } + } + + /** + * Parse XML + * + * This method creates a SimpleXMLElement + * based upon the XML input. If the SimpleXML + * extension is not available, the raw input + * will be returned unchanged. + * + * @param string $input + * @return \SimpleXMLElement|string + */ + protected function parseXml($input) + { + if (class_exists('SimpleXMLElement')) { + try { + $backup = libxml_disable_entity_loader(true); + $result = new \SimpleXMLElement($input); + libxml_disable_entity_loader($backup); + return $result; + } catch (\Exception $e) { + // Do nothing + } + } + + return $input; + } + + /** + * Parse CSV + * + * This method parses CSV content into a numeric array + * containing an array of data for each CSV line. + * + * @param string $input + * @return array + */ + protected function parseCsv($input) + { + $temp = fopen('php://memory', 'rw'); + fwrite($temp, $input); + fseek($temp, 0); + $res = array(); + while (($data = fgetcsv($temp)) !== false) { + $res[] = $data; + } + fclose($temp); + + return $res; + } +} diff --git a/api/libs/Slim/Middleware/Flash.php b/api/libs/Slim/Middleware/Flash.php new file mode 100644 index 0000000..835ca01 --- /dev/null +++ b/api/libs/Slim/Middleware/Flash.php @@ -0,0 +1,212 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Middleware; + + /** + * Flash + * + * This is middleware for a Slim application that enables + * Flash messaging between HTTP requests. This allows you + * set Flash messages for the current request, for the next request, + * or to retain messages from the previous request through to + * the next request. + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class Flash extends \Slim\Middleware implements \ArrayAccess, \IteratorAggregate, \Countable +{ + /** + * @var array + */ + protected $settings; + + /** + * @var array + */ + protected $messages; + + /** + * Constructor + * @param array $settings + */ + public function __construct($settings = array()) + { + $this->settings = array_merge(array('key' => 'slim.flash'), $settings); + $this->messages = array( + 'prev' => array(), //flash messages from prev request (loaded when middleware called) + 'next' => array(), //flash messages for next request + 'now' => array() //flash messages for current request + ); + } + + /** + * Call + */ + public function call() + { + //Read flash messaging from previous request if available + $this->loadMessages(); + + //Prepare flash messaging for current request + $env = $this->app->environment(); + $env['slim.flash'] = $this; + $this->next->call(); + $this->save(); + } + + /** + * Now + * + * Specify a flash message for a given key to be shown for the current request + * + * @param string $key + * @param string $value + */ + public function now($key, $value) + { + $this->messages['now'][(string) $key] = $value; + } + + /** + * Set + * + * Specify a flash message for a given key to be shown for the next request + * + * @param string $key + * @param string $value + */ + public function set($key, $value) + { + $this->messages['next'][(string) $key] = $value; + } + + /** + * Keep + * + * Retain flash messages from the previous request for the next request + */ + public function keep() + { + foreach ($this->messages['prev'] as $key => $val) { + $this->messages['next'][$key] = $val; + } + } + + /** + * Save + */ + public function save() + { + $_SESSION[$this->settings['key']] = $this->messages['next']; + } + + /** + * Load messages from previous request if available + */ + public function loadMessages() + { + if (isset($_SESSION[$this->settings['key']])) { + $this->messages['prev'] = $_SESSION[$this->settings['key']]; + } + } + + /** + * Return array of flash messages to be shown for the current request + * + * @return array + */ + public function getMessages() + { + return array_merge($this->messages['prev'], $this->messages['now']); + } + + /** + * Array Access: Offset Exists + */ + public function offsetExists($offset) + { + $messages = $this->getMessages(); + + return isset($messages[$offset]); + } + + /** + * Array Access: Offset Get + */ + public function offsetGet($offset) + { + $messages = $this->getMessages(); + + return isset($messages[$offset]) ? $messages[$offset] : null; + } + + /** + * Array Access: Offset Set + */ + public function offsetSet($offset, $value) + { + $this->now($offset, $value); + } + + /** + * Array Access: Offset Unset + */ + public function offsetUnset($offset) + { + unset($this->messages['prev'][$offset], $this->messages['now'][$offset]); + } + + /** + * Iterator Aggregate: Get Iterator + * @return \ArrayIterator + */ + public function getIterator() + { + $messages = $this->getMessages(); + + return new \ArrayIterator($messages); + } + + /** + * Countable: Count + */ + public function count() + { + return count($this->getMessages()); + } + + + +} diff --git a/api/libs/Slim/Middleware/MethodOverride.php b/api/libs/Slim/Middleware/MethodOverride.php new file mode 100644 index 0000000..3b4c909 --- /dev/null +++ b/api/libs/Slim/Middleware/MethodOverride.php @@ -0,0 +1,94 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Middleware; + + /** + * HTTP Method Override + * + * This is middleware for a Slim application that allows traditional + * desktop browsers to submit pseudo PUT and DELETE requests by relying + * on a pre-determined request parameter. Without this middleware, + * desktop browsers are only able to submit GET and POST requests. + * + * This middleware is included automatically! + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class MethodOverride extends \Slim\Middleware +{ + /** + * @var array + */ + protected $settings; + + /** + * Constructor + * @param array $settings + */ + public function __construct($settings = array()) + { + $this->settings = array_merge(array('key' => '_METHOD'), $settings); + } + + /** + * Call + * + * Implements Slim middleware interface. This method is invoked and passed + * an array of environment variables. This middleware inspects the environment + * variables for the HTTP method override parameter; if found, this middleware + * modifies the environment settings so downstream middleware and/or the Slim + * application will treat the request with the desired HTTP method. + * + * @return array[status, header, body] + */ + public function call() + { + $env = $this->app->environment(); + if (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) { + // Header commonly used by Backbone.js and others + $env['slim.method_override.original_method'] = $env['REQUEST_METHOD']; + $env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']); + } elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') { + // HTML Form Override + $req = new \Slim\Http\Request($env); + $method = $req->post($this->settings['key']); + if ($method) { + $env['slim.method_override.original_method'] = $env['REQUEST_METHOD']; + $env['REQUEST_METHOD'] = strtoupper($method); + } + } + $this->next->call(); + } +} diff --git a/api/libs/Slim/Middleware/PrettyExceptions.php b/api/libs/Slim/Middleware/PrettyExceptions.php new file mode 100644 index 0000000..bc2dedd --- /dev/null +++ b/api/libs/Slim/Middleware/PrettyExceptions.php @@ -0,0 +1,116 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Middleware; + +/** + * Pretty Exceptions + * + * This middleware catches any Exception thrown by the surrounded + * application and displays a developer-friendly diagnostic screen. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class PrettyExceptions extends \Slim\Middleware +{ + /** + * @var array + */ + protected $settings; + + /** + * Constructor + * @param array $settings + */ + public function __construct($settings = array()) + { + $this->settings = $settings; + } + + /** + * Call + */ + public function call() + { + try { + $this->next->call(); + } catch (\Exception $e) { + $log = $this->app->getLog(); // Force Slim to append log to env if not already + $env = $this->app->environment(); + $env['slim.log'] = $log; + $env['slim.log']->error($e); + $this->app->contentType('text/html'); + $this->app->response()->status(500); + $this->app->response()->body($this->renderBody($env, $e)); + } + } + + /** + * Render response body + * @param array $env + * @param \Exception $exception + * @return string + */ + protected function renderBody(&$env, $exception) + { + $title = 'Slim Application Error'; + $code = $exception->getCode(); + $message = $exception->getMessage(); + $file = $exception->getFile(); + $line = $exception->getLine(); + $trace = $exception->getTraceAsString(); + $html = sprintf('

%s

', $title); + $html .= '

The application could not run because of the following error:

'; + $html .= '

Details

'; + $html .= sprintf('
Type: %s
', get_class($exception)); + if ($code) { + $html .= sprintf('
Code: %s
', $code); + } + if ($message) { + $html .= sprintf('
Message: %s
', $message); + } + if ($file) { + $html .= sprintf('
File: %s
', $file); + } + if ($line) { + $html .= sprintf('
Line: %s
', $line); + } + if ($trace) { + $html .= '

Trace

'; + $html .= sprintf('
%s
', $trace); + } + + return sprintf("%s%s", $title, $html); + } +} diff --git a/api/libs/Slim/Middleware/SessionCookie.php b/api/libs/Slim/Middleware/SessionCookie.php new file mode 100644 index 0000000..22e211b --- /dev/null +++ b/api/libs/Slim/Middleware/SessionCookie.php @@ -0,0 +1,210 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim\Middleware; + +/** + * Session Cookie + * + * This class provides an HTTP cookie storage mechanism + * for session data. This class avoids using a PHP session + * and instead serializes/unserializes the $_SESSION global + * variable to/from an HTTP cookie. + * + * You should NEVER store sensitive data in a client-side cookie + * in any format, encrypted (with cookies.encrypt) or not. If you + * need to store sensitive user information in a session, you should + * rely on PHP's native session implementation, or use other middleware + * to store session data in a database or alternative server-side cache. + * + * Because this class stores serialized session data in an HTTP cookie, + * you are inherently limited to 4 Kb. If you attempt to store + * more than this amount, serialization will fail. + * + * @package Slim + * @author Josh Lockhart + * @since 1.6.0 + */ +class SessionCookie extends \Slim\Middleware +{ + /** + * @var array + */ + protected $settings; + + /** + * Constructor + * + * @param array $settings + */ + public function __construct($settings = array()) + { + $defaults = array( + 'expires' => '20 minutes', + 'path' => '/', + 'domain' => null, + 'secure' => false, + 'httponly' => false, + 'name' => 'slim_session', + ); + $this->settings = array_merge($defaults, $settings); + if (is_string($this->settings['expires'])) { + $this->settings['expires'] = strtotime($this->settings['expires']); + } + + /** + * Session + * + * We must start a native PHP session to initialize the $_SESSION superglobal. + * However, we won't be using the native session store for persistence, so we + * disable the session cookie and cache limiter. We also set the session + * handler to this class instance to avoid PHP's native session file locking. + */ + ini_set('session.use_cookies', 0); + session_cache_limiter(false); + session_set_save_handler( + array($this, 'open'), + array($this, 'close'), + array($this, 'read'), + array($this, 'write'), + array($this, 'destroy'), + array($this, 'gc') + ); + } + + /** + * Call + */ + public function call() + { + $this->loadSession(); + $this->next->call(); + $this->saveSession(); + } + + /** + * Load session + */ + protected function loadSession() + { + if (session_id() === '') { + session_start(); + } + + $value = $this->app->getCookie($this->settings['name']); + + if ($value) { + try { + $_SESSION = unserialize($value); + } catch (\Exception $e) { + $this->app->getLog()->error('Error unserializing session cookie value! ' . $e->getMessage()); + } + } else { + $_SESSION = array(); + } + } + + /** + * Save session + */ + protected function saveSession() + { + $value = serialize($_SESSION); + + if (strlen($value) > 4096) { + $this->app->getLog()->error('WARNING! Slim\Middleware\SessionCookie data size is larger than 4KB. Content save failed.'); + } else { + $this->app->setCookie( + $this->settings['name'], + $value, + $this->settings['expires'], + $this->settings['path'], + $this->settings['domain'], + $this->settings['secure'], + $this->settings['httponly'] + ); + } + // session_destroy(); + } + + /******************************************************************************** + * Session Handler + *******************************************************************************/ + + /** + * @codeCoverageIgnore + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * @codeCoverageIgnore + */ + public function close() + { + return true; + } + + /** + * @codeCoverageIgnore + */ + public function read($id) + { + return ''; + } + + /** + * @codeCoverageIgnore + */ + public function write($id, $data) + { + return true; + } + + /** + * @codeCoverageIgnore + */ + public function destroy($id) + { + return true; + } + + /** + * @codeCoverageIgnore + */ + public function gc($maxlifetime) + { + return true; + } +} diff --git a/api/libs/Slim/Route.php b/api/libs/Slim/Route.php new file mode 100644 index 0000000..1136035 --- /dev/null +++ b/api/libs/Slim/Route.php @@ -0,0 +1,439 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * Route + * @package Slim + * @author Josh Lockhart, Thomas Bley + * @since 1.0.0 + */ +class Route +{ + /** + * @var string The route pattern (e.g. "/books/:id") + */ + protected $pattern; + + /** + * @var mixed The route callable + */ + protected $callable; + + /** + * @var array Conditions for this route's URL parameters + */ + protected $conditions = array(); + + /** + * @var array Default conditions applied to all route instances + */ + protected static $defaultConditions = array(); + + /** + * @var string The name of this route (optional) + */ + protected $name; + + /** + * @var array Key-value array of URL parameters + */ + protected $params = array(); + + /** + * @var array value array of URL parameter names + */ + protected $paramNames = array(); + + /** + * @var array key array of URL parameter names with + at the end + */ + protected $paramNamesPath = array(); + + /** + * @var array HTTP methods supported by this Route + */ + protected $methods = array(); + + /** + * @var array[Callable] Middleware to be run before only this route instance + */ + protected $middleware = array(); + + /** + * Constructor + * @param string $pattern The URL pattern (e.g. "/books/:id") + * @param mixed $callable Anything that returns TRUE for is_callable() + */ + public function __construct($pattern, $callable) + { + $this->setPattern($pattern); + $this->setCallable($callable); + $this->setConditions(self::getDefaultConditions()); + } + + /** + * Set default route conditions for all instances + * @param array $defaultConditions + */ + public static function setDefaultConditions(array $defaultConditions) + { + self::$defaultConditions = $defaultConditions; + } + + /** + * Get default route conditions for all instances + * @return array + */ + public static function getDefaultConditions() + { + return self::$defaultConditions; + } + + /** + * Get route pattern + * @return string + */ + public function getPattern() + { + return $this->pattern; + } + + /** + * Set route pattern + * @param string $pattern + */ + public function setPattern($pattern) + { + $this->pattern = $pattern; + } + + /** + * Get route callable + * @return mixed + */ + public function getCallable() + { + return $this->callable; + } + + /** + * Set route callable + * @param mixed $callable + * @throws \InvalidArgumentException If argument is not callable + */ + public function setCallable($callable) + { + if (!is_callable($callable)) { + throw new \InvalidArgumentException('Route callable must be callable'); + } + + $this->callable = $callable; + } + + /** + * Get route conditions + * @return array + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * Set route conditions + * @param array $conditions + */ + public function setConditions(array $conditions) + { + $this->conditions = $conditions; + } + + /** + * Get route name + * @return string|null + */ + public function getName() + { + return $this->name; + } + + /** + * Set route name + * @param string $name + */ + public function setName($name) + { + $this->name = (string) $name; + } + + /** + * Get route parameters + * @return array + */ + public function getParams() + { + return $this->params; + } + + /** + * Set route parameters + * @param array $params + */ + public function setParams($params) + { + $this->params = $params; + } + + /** + * Get route parameter value + * @param string $index Name of URL parameter + * @return string + * @throws \InvalidArgumentException If route parameter does not exist at index + */ + public function getParam($index) + { + if (!isset($this->params[$index])) { + throw new \InvalidArgumentException('Route parameter does not exist at specified index'); + } + + return $this->params[$index]; + } + + /** + * Set route parameter value + * @param string $index Name of URL parameter + * @param mixed $value The new parameter value + * @throws \InvalidArgumentException If route parameter does not exist at index + */ + public function setParam($index, $value) + { + if (!isset($this->params[$index])) { + throw new \InvalidArgumentException('Route parameter does not exist at specified index'); + } + $this->params[$index] = $value; + } + + /** + * Add supported HTTP method(s) + */ + public function setHttpMethods() + { + $args = func_get_args(); + $this->methods = $args; + } + + /** + * Get supported HTTP methods + * @return array + */ + public function getHttpMethods() + { + return $this->methods; + } + + /** + * Append supported HTTP methods + */ + public function appendHttpMethods() + { + $args = func_get_args(); + $this->methods = array_merge($this->methods, $args); + } + + /** + * Append supported HTTP methods (alias for Route::appendHttpMethods) + * @return \Slim\Route + */ + public function via() + { + $args = func_get_args(); + $this->methods = array_merge($this->methods, $args); + + return $this; + } + + /** + * Detect support for an HTTP method + * @param string $method + * @return bool + */ + public function supportsHttpMethod($method) + { + return in_array($method, $this->methods); + } + + /** + * Get middleware + * @return array[Callable] + */ + public function getMiddleware() + { + return $this->middleware; + } + + /** + * Set middleware + * + * This method allows middleware to be assigned to a specific Route. + * If the method argument `is_callable` (including callable arrays!), + * we directly append the argument to `$this->middleware`. Else, we + * assume the argument is an array of callables and merge the array + * with `$this->middleware`. Each middleware is checked for is_callable() + * and an InvalidArgumentException is thrown immediately if it isn't. + * + * @param Callable|array[Callable] + * @return \Slim\Route + * @throws \InvalidArgumentException If argument is not callable or not an array of callables. + */ + public function setMiddleware($middleware) + { + if (is_callable($middleware)) { + $this->middleware[] = $middleware; + } elseif (is_array($middleware)) { + foreach ($middleware as $callable) { + if (!is_callable($callable)) { + throw new \InvalidArgumentException('All Route middleware must be callable'); + } + } + $this->middleware = array_merge($this->middleware, $middleware); + } else { + throw new \InvalidArgumentException('Route middleware must be callable or an array of callables'); + } + + return $this; + } + + /** + * Matches URI? + * + * Parse this route's pattern, and then compare it to an HTTP resource URI + * This method was modeled after the techniques demonstrated by Dan Sosedoff at: + * + * http://blog.sosedoff.com/2009/09/20/rails-like-php-url-router/ + * + * @param string $resourceUri A Request URI + * @return bool + */ + public function matches($resourceUri) + { + //Convert URL params into regex patterns, construct a regex for this route, init params + $patternAsRegex = preg_replace_callback( + '#:([\w]+)\+?#', + array($this, 'matchesCallback'), + str_replace(')', ')?', (string) $this->pattern) + ); + if (substr($this->pattern, -1) === '/') { + $patternAsRegex .= '?'; + } + + //Cache URL params' names and values if this route matches the current HTTP request + if (!preg_match('#^' . $patternAsRegex . '$#', $resourceUri, $paramValues)) { + return false; + } + foreach ($this->paramNames as $name) { + if (isset($paramValues[$name])) { + if (isset($this->paramNamesPath[ $name ])) { + $this->params[$name] = explode('/', urldecode($paramValues[$name])); + } else { + $this->params[$name] = urldecode($paramValues[$name]); + } + } + } + + return true; + } + + /** + * Convert a URL parameter (e.g. ":id", ":id+") into a regular expression + * @param array $m URL parameters + * @return string Regular expression for URL parameter + */ + protected function matchesCallback($m) + { + $this->paramNames[] = $m[1]; + if (isset($this->conditions[ $m[1] ])) { + return '(?P<' . $m[1] . '>' . $this->conditions[ $m[1] ] . ')'; + } + if (substr($m[0], -1) === '+') { + $this->paramNamesPath[ $m[1] ] = 1; + + return '(?P<' . $m[1] . '>.+)'; + } + + return '(?P<' . $m[1] . '>[^/]+)'; + } + + /** + * Set route name + * @param string $name The name of the route + * @return \Slim\Route + */ + public function name($name) + { + $this->setName($name); + + return $this; + } + + /** + * Merge route conditions + * @param array $conditions Key-value array of URL parameter conditions + * @return \Slim\Route + */ + public function conditions(array $conditions) + { + $this->conditions = array_merge($this->conditions, $conditions); + + return $this; + } + + /** + * Dispatch route + * + * This method invokes the route object's callable. If middleware is + * registered for the route, each callable middleware is invoked in + * the order specified. + * + * @return bool + */ + public function dispatch() + { + foreach ($this->middleware as $mw) { + call_user_func_array($mw, array($this)); + } + + $return = call_user_func_array($this->getCallable(), array_values($this->getParams())); + return ($return === false)? false : true; + } +} diff --git a/api/libs/Slim/Router.php b/api/libs/Slim/Router.php new file mode 100644 index 0000000..3dcc646 --- /dev/null +++ b/api/libs/Slim/Router.php @@ -0,0 +1,257 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * Router + * + * This class organizes, iterates, and dispatches \Slim\Route objects. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Router +{ + /** + * @var Route The current route (most recently dispatched) + */ + protected $currentRoute; + + /** + * @var array Lookup hash of all route objects + */ + protected $routes; + + /** + * @var array Lookup hash of named route objects, keyed by route name (lazy-loaded) + */ + protected $namedRoutes; + + /** + * @var array Array of route objects that match the request URI (lazy-loaded) + */ + protected $matchedRoutes; + + /** + * @var array Array containing all route groups + */ + protected $routeGroups; + + /** + * Constructor + */ + public function __construct() + { + $this->routes = array(); + $this->routeGroups = array(); + } + + /** + * Get Current Route object or the first matched one if matching has been performed + * @return \Slim\Route|null + */ + public function getCurrentRoute() + { + if ($this->currentRoute !== null) { + return $this->currentRoute; + } + + if (is_array($this->matchedRoutes) && count($this->matchedRoutes) > 0) { + return $this->matchedRoutes[0]; + } + + return null; + } + + /** + * Return route objects that match the given HTTP method and URI + * @param string $httpMethod The HTTP method to match against + * @param string $resourceUri The resource URI to match against + * @param bool $reload Should matching routes be re-parsed? + * @return array[\Slim\Route] + */ + public function getMatchedRoutes($httpMethod, $resourceUri, $reload = false) + { + if ($reload || is_null($this->matchedRoutes)) { + $this->matchedRoutes = array(); + foreach ($this->routes as $route) { + if (!$route->supportsHttpMethod($httpMethod) && !$route->supportsHttpMethod("ANY")) { + continue; + } + + if ($route->matches($resourceUri)) { + $this->matchedRoutes[] = $route; + } + } + } + + return $this->matchedRoutes; + } + + /** + * Add a route object to the router + * @param \Slim\Route $route The Slim Route + */ + public function map(\Slim\Route $route) + { + list($groupPattern, $groupMiddleware) = $this->processGroups(); + + $route->setPattern($groupPattern . $route->getPattern()); + $this->routes[] = $route; + + + foreach ($groupMiddleware as $middleware) { + $route->setMiddleware($middleware); + } + } + + /** + * A helper function for processing the group's pattern and middleware + * @return array Returns an array with the elements: pattern, middlewareArr + */ + protected function processGroups() + { + $pattern = ""; + $middleware = array(); + foreach ($this->routeGroups as $group) { + $k = key($group); + $pattern .= $k; + if (is_array($group[$k])) { + $middleware = array_merge($middleware, $group[$k]); + } + } + return array($pattern, $middleware); + } + + /** + * Add a route group to the array + * @param string $group The group pattern (ie. "/books/:id") + * @param array|null $middleware Optional parameter array of middleware + * @return int The index of the new group + */ + public function pushGroup($group, $middleware = array()) + { + return array_push($this->routeGroups, array($group => $middleware)); + } + + /** + * Removes the last route group from the array + * @return bool True if successful, else False + */ + public function popGroup() + { + return (array_pop($this->routeGroups) !== null); + } + + /** + * Get URL for named route + * @param string $name The name of the route + * @param array $params Associative array of URL parameter names and replacement values + * @throws \RuntimeException If named route not found + * @return string The URL for the given route populated with provided replacement values + */ + public function urlFor($name, $params = array()) + { + if (!$this->hasNamedRoute($name)) { + throw new \RuntimeException('Named route not found for name: ' . $name); + } + $search = array(); + foreach ($params as $key => $value) { + $search[] = '#:' . preg_quote($key, '#') . '\+?(?!\w)#'; + } + $pattern = preg_replace($search, $params, $this->getNamedRoute($name)->getPattern()); + + //Remove remnants of unpopulated, trailing optional pattern segments, escaped special characters + return preg_replace('#\(/?:.+\)|\(|\)|\\\\#', '', $pattern); + } + + /** + * Add named route + * @param string $name The route name + * @param \Slim\Route $route The route object + * @throws \RuntimeException If a named route already exists with the same name + */ + public function addNamedRoute($name, \Slim\Route $route) + { + if ($this->hasNamedRoute($name)) { + throw new \RuntimeException('Named route already exists with name: ' . $name); + } + $this->namedRoutes[(string) $name] = $route; + } + + /** + * Has named route + * @param string $name The route name + * @return bool + */ + public function hasNamedRoute($name) + { + $this->getNamedRoutes(); + + return isset($this->namedRoutes[(string) $name]); + } + + /** + * Get named route + * @param string $name + * @return \Slim\Route|null + */ + public function getNamedRoute($name) + { + $this->getNamedRoutes(); + if ($this->hasNamedRoute($name)) { + return $this->namedRoutes[(string) $name]; + } else { + return null; + } + } + + /** + * Get named routes + * @return \ArrayIterator + */ + public function getNamedRoutes() + { + if (is_null($this->namedRoutes)) { + $this->namedRoutes = array(); + foreach ($this->routes as $route) { + if ($route->getName() !== null) { + $this->addNamedRoute($route->getName(), $route); + } + } + } + + return new \ArrayIterator($this->namedRoutes); + } +} diff --git a/api/libs/Slim/Slim.php b/api/libs/Slim/Slim.php new file mode 100644 index 0000000..2a68b6c --- /dev/null +++ b/api/libs/Slim/Slim.php @@ -0,0 +1,1394 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +// Ensure mcrypt constants are defined even if mcrypt extension is not loaded +if (!extension_loaded('mcrypt')) { + define('MCRYPT_MODE_CBC', 0); + define('MCRYPT_RIJNDAEL_256', 0); +} + +/** + * Slim + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class Slim +{ + /** + * @const string + */ + const VERSION = '2.3.5'; + + /** + * @var \Slim\Helper\Set + */ + public $container; + + /** + * @var array[\Slim] + */ + protected static $apps = array(); + + /** + * @var string + */ + protected $name; + + /** + * @var array + */ + protected $middleware; + + /** + * @var mixed Callable to be invoked if application error + */ + protected $error; + + /** + * @var mixed Callable to be invoked if no matching routes are found + */ + protected $notFound; + + /** + * @var array + */ + protected $hooks = array( + 'slim.before' => array(array()), + 'slim.before.router' => array(array()), + 'slim.before.dispatch' => array(array()), + 'slim.after.dispatch' => array(array()), + 'slim.after.router' => array(array()), + 'slim.after' => array(array()) + ); + + /******************************************************************************** + * PSR-0 Autoloader + * + * Do not use if you are using Composer to autoload dependencies. + *******************************************************************************/ + + /** + * Slim PSR-0 autoloader + */ + public static function autoload($className) + { + $thisClass = str_replace(__NAMESPACE__.'\\', '', __CLASS__); + + $baseDir = __DIR__; + + if (substr($baseDir, -strlen($thisClass)) === $thisClass) { + $baseDir = substr($baseDir, 0, -strlen($thisClass)); + } + + $className = ltrim($className, '\\'); + $fileName = $baseDir; + $namespace = ''; + if ($lastNsPos = strripos($className, '\\')) { + $namespace = substr($className, 0, $lastNsPos); + $className = substr($className, $lastNsPos + 1); + $fileName .= str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; + } + $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; + + if (file_exists($fileName)) { + require $fileName; + } + } + + /** + * Register Slim's PSR-0 autoloader + */ + public static function registerAutoloader() + { + spl_autoload_register(__NAMESPACE__ . "\\Slim::autoload"); + } + + /******************************************************************************** + * Instantiation and Configuration + *******************************************************************************/ + + /** + * Constructor + * @param array $userSettings Associative array of application settings + */ + public function __construct(array $userSettings = array()) + { + // Setup IoC container + $this->container = new \Slim\Helper\Set(); + $this->container['settings'] = array_merge(static::getDefaultSettings(), $userSettings); + + // Default environment + $this->container->singleton('environment', function ($c) { + return \Slim\Environment::getInstance(); + }); + + // Default request + $this->container->singleton('request', function ($c) { + return new \Slim\Http\Request($c['environment']); + }); + + // Default response + $this->container->singleton('response', function ($c) { + return new \Slim\Http\Response(); + }); + + // Default router + $this->container->singleton('router', function ($c) { + return new \Slim\Router(); + }); + + // Default view + $this->container->singleton('view', function ($c) { + $viewClass = $c['settings']['view']; + + return ($viewClass instanceOf \Slim\View) ? $viewClass : new $viewClass; + }); + + // Default log writer + $this->container->singleton('logWriter', function ($c) { + $logWriter = $c['settings']['log.writer']; + + return is_object($logWriter) ? $logWriter : new \Slim\LogWriter($c['environment']['slim.errors']); + }); + + // Default log + $this->container->singleton('log', function ($c) { + $log = new \Slim\Log($c['logWriter']); + $log->setEnabled($c['settings']['log.enabled']); + $log->setLevel($c['settings']['log.level']); + $env = $c['environment']; + $env['slim.log'] = $log; + + return $log; + }); + + // Default mode + $this->container['mode'] = function ($c) { + $mode = $c['settings']['mode']; + + if (isset($_ENV['SLIM_MODE'])) { + $mode = $_ENV['SLIM_MODE']; + } else { + $envMode = getenv('SLIM_MODE'); + if ($envMode !== false) { + $mode = $envMode; + } + } + + return $mode; + }; + + // Define default middleware stack + $this->middleware = array($this); + $this->add(new \Slim\Middleware\Flash()); + $this->add(new \Slim\Middleware\MethodOverride()); + + // Make default if first instance + if (is_null(static::getInstance())) { + $this->setName('default'); + } + } + + public function __get($name) + { + return $this->container[$name]; + } + + public function __set($name, $value) + { + $this->container[$name] = $value; + } + + public function __isset($name) + { + return isset($this->container[$name]); + } + + public function __unset($name) + { + unset($this->container[$name]); + } + + /** + * Get application instance by name + * @param string $name The name of the Slim application + * @return \Slim\Slim|null + */ + public static function getInstance($name = 'default') + { + return isset(static::$apps[$name]) ? static::$apps[$name] : null; + } + + /** + * Set Slim application name + * @param string $name The name of this Slim application + */ + public function setName($name) + { + $this->name = $name; + static::$apps[$name] = $this; + } + + /** + * Get Slim application name + * @return string|null + */ + public function getName() + { + return $this->name; + } + + /** + * Get default application settings + * @return array + */ + public static function getDefaultSettings() + { + return array( + // Application + 'mode' => 'development', + // Debugging + 'debug' => true, + // Logging + 'log.writer' => null, + 'log.level' => \Slim\Log::DEBUG, + 'log.enabled' => true, + // View + 'templates.path' => './templates', + 'view' => '\Slim\View', + // Cookies + 'cookies.encrypt' => false, + 'cookies.lifetime' => '20 minutes', + 'cookies.path' => '/', + 'cookies.domain' => null, + 'cookies.secure' => false, + 'cookies.httponly' => false, + // Encryption + 'cookies.secret_key' => 'CHANGE_ME', + 'cookies.cipher' => MCRYPT_RIJNDAEL_256, + 'cookies.cipher_mode' => MCRYPT_MODE_CBC, + // HTTP + 'http.version' => '1.1' + ); + } + + /** + * Configure Slim Settings + * + * This method defines application settings and acts as a setter and a getter. + * + * If only one argument is specified and that argument is a string, the value + * of the setting identified by the first argument will be returned, or NULL if + * that setting does not exist. + * + * If only one argument is specified and that argument is an associative array, + * the array will be merged into the existing application settings. + * + * If two arguments are provided, the first argument is the name of the setting + * to be created or updated, and the second argument is the setting value. + * + * @param string|array $name If a string, the name of the setting to set or retrieve. Else an associated array of setting names and values + * @param mixed $value If name is a string, the value of the setting identified by $name + * @return mixed The value of a setting if only one argument is a string + */ + public function config($name, $value = null) + { + if (func_num_args() === 1) { + if (is_array($name)) { + $this->settings = array_merge($this->settings, $name); + } else { + return isset($this->settings[$name]) ? $this->settings[$name] : null; + } + } else { + $settings = $this->settings; + $settings[$name] = $value; + $this->settings = $settings; + } + } + + /******************************************************************************** + * Application Modes + *******************************************************************************/ + + /** + * Get application mode + * + * This method determines the application mode. It first inspects the $_ENV + * superglobal for key `SLIM_MODE`. If that is not found, it queries + * the `getenv` function. Else, it uses the application `mode` setting. + * + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Configure Slim for a given mode + * + * This method will immediately invoke the callable if + * the specified mode matches the current application mode. + * Otherwise, the callable is ignored. This should be called + * only _after_ you initialize your Slim app. + * + * @param string $mode + * @param mixed $callable + * @return void + */ + public function configureMode($mode, $callable) + { + if ($mode === $this->getMode() && is_callable($callable)) { + call_user_func($callable); + } + } + + /******************************************************************************** + * Logging + *******************************************************************************/ + + /** + * Get application log + * @return \Slim\Log + */ + public function getLog() + { + return $this->log; + } + + /******************************************************************************** + * Routing + *******************************************************************************/ + + /** + * Add GET|POST|PUT|PATCH|DELETE route + * + * Adds a new route to the router with associated callable. This + * route will only be invoked when the HTTP request's method matches + * this route's method. + * + * ARGUMENTS: + * + * First: string The URL pattern (REQUIRED) + * In-Between: mixed Anything that returns TRUE for `is_callable` (OPTIONAL) + * Last: mixed Anything that returns TRUE for `is_callable` (REQUIRED) + * + * The first argument is required and must always be the + * route pattern (ie. '/books/:id'). + * + * The last argument is required and must always be the callable object + * to be invoked when the route matches an HTTP request. + * + * You may also provide an unlimited number of in-between arguments; + * each interior argument must be callable and will be invoked in the + * order specified before the route's callable is invoked. + * + * USAGE: + * + * Slim::get('/foo'[, middleware, middleware, ...], callable); + * + * @param array (See notes above) + * @return \Slim\Route + */ + protected function mapRoute($args) + { + $pattern = array_shift($args); + $callable = array_pop($args); + $route = new \Slim\Route($pattern, $callable); + $this->router->map($route); + if (count($args) > 0) { + $route->setMiddleware($args); + } + + return $route; + } + + /** + * Add generic route without associated HTTP method + * @see mapRoute() + * @return \Slim\Route + */ + public function map() + { + $args = func_get_args(); + + return $this->mapRoute($args); + } + + /** + * Add GET route + * @see mapRoute() + * @return \Slim\Route + */ + public function get() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_GET, \Slim\Http\Request::METHOD_HEAD); + } + + /** + * Add POST route + * @see mapRoute() + * @return \Slim\Route + */ + public function post() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_POST); + } + + /** + * Add PUT route + * @see mapRoute() + * @return \Slim\Route + */ + public function put() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_PUT); + } + + /** + * Add PATCH route + * @see mapRoute() + * @return \Slim\Route + */ + public function patch() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_PATCH); + } + + /** + * Add DELETE route + * @see mapRoute() + * @return \Slim\Route + */ + public function delete() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_DELETE); + } + + /** + * Add OPTIONS route + * @see mapRoute() + * @return \Slim\Route + */ + public function options() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via(\Slim\Http\Request::METHOD_OPTIONS); + } + + /** + * Route Groups + * + * This method accepts a route pattern and a callback all Route + * declarations in the callback will be prepended by the group(s) + * that it is in + * + * Accepts the same parameters as a standard route so: + * (pattern, middleware1, middleware2, ..., $callback) + */ + public function group() + { + $args = func_get_args(); + $pattern = array_shift($args); + $callable = array_pop($args); + $this->router->pushGroup($pattern, $args); + if (is_callable($callable)) { + call_user_func($callable); + } + $this->router->popGroup(); + } + + /* + * Add route for any HTTP method + * @see mapRoute() + * @return \Slim\Route + */ + public function any() + { + $args = func_get_args(); + + return $this->mapRoute($args)->via("ANY"); + } + + /** + * Not Found Handler + * + * This method defines or invokes the application-wide Not Found handler. + * There are two contexts in which this method may be invoked: + * + * 1. When declaring the handler: + * + * If the $callable parameter is not null and is callable, this + * method will register the callable to be invoked when no + * routes match the current HTTP request. It WILL NOT invoke the callable. + * + * 2. When invoking the handler: + * + * If the $callable parameter is null, Slim assumes you want + * to invoke an already-registered handler. If the handler has been + * registered and is callable, it is invoked and sends a 404 HTTP Response + * whose body is the output of the Not Found handler. + * + * @param mixed $callable Anything that returns true for is_callable() + */ + public function notFound ($callable = null) + { + if (is_callable($callable)) { + $this->notFound = $callable; + } else { + ob_start(); + if (is_callable($this->notFound)) { + call_user_func($this->notFound); + } else { + call_user_func(array($this, 'defaultNotFound')); + } + $this->halt(404, ob_get_clean()); + } + } + + /** + * Error Handler + * + * This method defines or invokes the application-wide Error handler. + * There are two contexts in which this method may be invoked: + * + * 1. When declaring the handler: + * + * If the $argument parameter is callable, this + * method will register the callable to be invoked when an uncaught + * Exception is detected, or when otherwise explicitly invoked. + * The handler WILL NOT be invoked in this context. + * + * 2. When invoking the handler: + * + * If the $argument parameter is not callable, Slim assumes you want + * to invoke an already-registered handler. If the handler has been + * registered and is callable, it is invoked and passed the caught Exception + * as its one and only argument. The error handler's output is captured + * into an output buffer and sent as the body of a 500 HTTP Response. + * + * @param mixed $argument Callable|\Exception + */ + public function error($argument = null) + { + if (is_callable($argument)) { + //Register error handler + $this->error = $argument; + } else { + //Invoke error handler + $this->response->status(500); + $this->response->body(''); + $this->response->write($this->callErrorHandler($argument)); + $this->stop(); + } + } + + /** + * Call error handler + * + * This will invoke the custom or default error handler + * and RETURN its output. + * + * @param \Exception|null $argument + * @return string + */ + protected function callErrorHandler($argument = null) + { + ob_start(); + if (is_callable($this->error)) { + call_user_func_array($this->error, array($argument)); + } else { + call_user_func_array(array($this, 'defaultError'), array($argument)); + } + + return ob_get_clean(); + } + + /******************************************************************************** + * Application Accessors + *******************************************************************************/ + + /** + * Get a reference to the Environment object + * @return \Slim\Environment + */ + public function environment() + { + return $this->environment; + } + + /** + * Get the Request object + * @return \Slim\Http\Request + */ + public function request() + { + return $this->request; + } + + /** + * Get the Response object + * @return \Slim\Http\Response + */ + public function response() + { + return $this->response; + } + + /** + * Get the Router object + * @return \Slim\Router + */ + public function router() + { + return $this->router; + } + + /** + * Get and/or set the View + * + * This method declares the View to be used by the Slim application. + * If the argument is a string, Slim will instantiate a new object + * of the same class. If the argument is an instance of View or a subclass + * of View, Slim will use the argument as the View. + * + * If a View already exists and this method is called to create a + * new View, data already set in the existing View will be + * transferred to the new View. + * + * @param string|\Slim\View $viewClass The name or instance of a \Slim\View subclass + * @return \Slim\View + */ + public function view($viewClass = null) + { + if (!is_null($viewClass)) { + $existingData = is_null($this->view) ? array() : $this->view->getData(); + if ($viewClass instanceOf \Slim\View) { + $this->view = $viewClass; + } else { + $this->view = new $viewClass(); + } + $this->view->appendData($existingData); + $this->view->setTemplatesDirectory($this->config('templates.path')); + } + + return $this->view; + } + + /******************************************************************************** + * Rendering + *******************************************************************************/ + + /** + * Render a template + * + * Call this method within a GET, POST, PUT, PATCH, DELETE, NOT FOUND, or ERROR + * callable to render a template whose output is appended to the + * current HTTP response body. How the template is rendered is + * delegated to the current View. + * + * @param string $template The name of the template passed into the view's render() method + * @param array $data Associative array of data made available to the view + * @param int $status The HTTP response status code to use (optional) + */ + public function render($template, $data = array(), $status = null) + { + if (!is_null($status)) { + $this->response->status($status); + } + $this->view->setTemplatesDirectory($this->config('templates.path')); + $this->view->appendData($data); + $this->view->display($template); + } + + /******************************************************************************** + * HTTP Caching + *******************************************************************************/ + + /** + * Set Last-Modified HTTP Response Header + * + * Set the HTTP 'Last-Modified' header and stop if a conditional + * GET request's `If-Modified-Since` header matches the last modified time + * of the resource. The `time` argument is a UNIX timestamp integer value. + * When the current request includes an 'If-Modified-Since' header that + * matches the specified last modified time, the application will stop + * and send a '304 Not Modified' response to the client. + * + * @param int $time The last modified UNIX timestamp + * @throws \InvalidArgumentException If provided timestamp is not an integer + */ + public function lastModified($time) + { + if (is_integer($time)) { + $this->response->headers->set('Last-Modified', gmdate('D, d M Y H:i:s T', $time)); + if ($time === strtotime($this->request->headers->get('IF_MODIFIED_SINCE'))) { + $this->halt(304); + } + } else { + throw new \InvalidArgumentException('Slim::lastModified only accepts an integer UNIX timestamp value.'); + } + } + + /** + * Set ETag HTTP Response Header + * + * Set the etag header and stop if the conditional GET request matches. + * The `value` argument is a unique identifier for the current resource. + * The `type` argument indicates whether the etag should be used as a strong or + * weak cache validator. + * + * When the current request includes an 'If-None-Match' header with + * a matching etag, execution is immediately stopped. If the request + * method is GET or HEAD, a '304 Not Modified' response is sent. + * + * @param string $value The etag value + * @param string $type The type of etag to create; either "strong" or "weak" + * @throws \InvalidArgumentException If provided type is invalid + */ + public function etag($value, $type = 'strong') + { + //Ensure type is correct + if (!in_array($type, array('strong', 'weak'))) { + throw new \InvalidArgumentException('Invalid Slim::etag type. Expected "strong" or "weak".'); + } + + //Set etag value + $value = '"' . $value . '"'; + if ($type === 'weak') { + $value = 'W/'.$value; + } + $this->response['ETag'] = $value; + + //Check conditional GET + if ($etagsHeader = $this->request->headers->get('IF_NONE_MATCH')) { + $etags = preg_split('@\s*,\s*@', $etagsHeader); + if (in_array($value, $etags) || in_array('*', $etags)) { + $this->halt(304); + } + } + } + + /** + * Set Expires HTTP response header + * + * The `Expires` header tells the HTTP client the time at which + * the current resource should be considered stale. At that time the HTTP + * client will send a conditional GET request to the server; the server + * may return a 200 OK if the resource has changed, else a 304 Not Modified + * if the resource has not changed. The `Expires` header should be used in + * conjunction with the `etag()` or `lastModified()` methods above. + * + * @param string|int $time If string, a time to be parsed by `strtotime()`; + * If int, a UNIX timestamp; + */ + public function expires($time) + { + if (is_string($time)) { + $time = strtotime($time); + } + $this->response->headers->set('Expires', gmdate('D, d M Y H:i:s T', $time)); + } + + /******************************************************************************** + * HTTP Cookies + *******************************************************************************/ + + /** + * Set HTTP cookie to be sent with the HTTP response + * + * @param string $name The cookie name + * @param string $value The cookie value + * @param int|string $time The duration of the cookie; + * If integer, should be UNIX timestamp; + * If string, converted to UNIX timestamp with `strtotime`; + * @param string $path The path on the server in which the cookie will be available on + * @param string $domain The domain that the cookie is available to + * @param bool $secure Indicates that the cookie should only be transmitted over a secure + * HTTPS connection to/from the client + * @param bool $httponly When TRUE the cookie will be made accessible only through the HTTP protocol + */ + public function setCookie($name, $value, $time = null, $path = null, $domain = null, $secure = null, $httponly = null) + { + $settings = array( + 'value' => $value, + 'expires' => is_null($time) ? $this->config('cookies.lifetime') : $time, + 'path' => is_null($path) ? $this->config('cookies.path') : $path, + 'domain' => is_null($domain) ? $this->config('cookies.domain') : $domain, + 'secure' => is_null($secure) ? $this->config('cookies.secure') : $secure, + 'httponly' => is_null($httponly) ? $this->config('cookies.httponly') : $httponly + ); + $this->response->cookies->set($name, $settings); + } + + /** + * Get value of HTTP cookie from the current HTTP request + * + * Return the value of a cookie from the current HTTP request, + * or return NULL if cookie does not exist. Cookies created during + * the current request will not be available until the next request. + * + * @param string $name + * @param bool $deleteIfInvalid + * @return string|null + */ + public function getCookie($name, $deleteIfInvalid = true) + { + // Get cookie value + $value = $this->request->cookies->get($name); + + // Decode if encrypted + if ($this->config('cookies.encrypt')) { + $value = \Slim\Http\Util::decodeSecureCookie( + $value, + $this->config('cookies.secret_key'), + $this->config('cookies.cipher'), + $this->config('cookies.cipher_mode') + ); + if ($value === false && $deleteIfInvalid) { + $this->deleteCookie($name); + } + } + + return $value; + } + + /** + * DEPRECATION WARNING! Use `setCookie` with the `cookies.encrypt` app setting set to `true`. + * + * Set encrypted HTTP cookie + * + * @param string $name The cookie name + * @param mixed $value The cookie value + * @param mixed $expires The duration of the cookie; + * If integer, should be UNIX timestamp; + * If string, converted to UNIX timestamp with `strtotime`; + * @param string $path The path on the server in which the cookie will be available on + * @param string $domain The domain that the cookie is available to + * @param bool $secure Indicates that the cookie should only be transmitted over a secure + * HTTPS connection from the client + * @param bool $httponly When TRUE the cookie will be made accessible only through the HTTP protocol + */ + public function setEncryptedCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = false, $httponly = false) + { + $this->setCookie($name, $value, $expires, $path, $domain, $secure, $httponly); + } + + /** + * DEPRECATION WARNING! Use `getCookie` with the `cookies.encrypt` app setting set to `true`. + * + * Get value of encrypted HTTP cookie + * + * Return the value of an encrypted cookie from the current HTTP request, + * or return NULL if cookie does not exist. Encrypted cookies created during + * the current request will not be available until the next request. + * + * @param string $name + * @param bool $deleteIfInvalid + * @return string|bool + */ + public function getEncryptedCookie($name, $deleteIfInvalid = true) + { + return $this->getCookie($name, $deleteIfInvalid); + } + + /** + * Delete HTTP cookie (encrypted or unencrypted) + * + * Remove a Cookie from the client. This method will overwrite an existing Cookie + * with a new, empty, auto-expiring Cookie. This method's arguments must match + * the original Cookie's respective arguments for the original Cookie to be + * removed. If any of this method's arguments are omitted or set to NULL, the + * default Cookie setting values (set during Slim::init) will be used instead. + * + * @param string $name The cookie name + * @param string $path The path on the server in which the cookie will be available on + * @param string $domain The domain that the cookie is available to + * @param bool $secure Indicates that the cookie should only be transmitted over a secure + * HTTPS connection from the client + * @param bool $httponly When TRUE the cookie will be made accessible only through the HTTP protocol + */ + public function deleteCookie($name, $path = null, $domain = null, $secure = null, $httponly = null) + { + $settings = array( + 'domain' => is_null($domain) ? $this->config('cookies.domain') : $domain, + 'path' => is_null($path) ? $this->config('cookies.path') : $path, + 'secure' => is_null($secure) ? $this->config('cookies.secure') : $secure, + 'httponly' => is_null($httponly) ? $this->config('cookies.httponly') : $httponly + ); + $this->response->cookies->remove($name, $settings); + } + + /******************************************************************************** + * Helper Methods + *******************************************************************************/ + + /** + * Get the absolute path to this Slim application's root directory + * + * This method returns the absolute path to the Slim application's + * directory. If the Slim application is installed in a public-accessible + * sub-directory, the sub-directory path will be included. This method + * will always return an absolute path WITH a trailing slash. + * + * @return string + */ + public function root() + { + return rtrim($_SERVER['DOCUMENT_ROOT'], '/') . rtrim($this->request->getRootUri(), '/') . '/'; + } + + /** + * Clean current output buffer + */ + protected function cleanBuffer() + { + if (ob_get_level() !== 0) { + ob_clean(); + } + } + + /** + * Stop + * + * The thrown exception will be caught in application's `call()` method + * and the response will be sent as is to the HTTP client. + * + * @throws \Slim\Exception\Stop + */ + public function stop() + { + throw new \Slim\Exception\Stop(); + } + + /** + * Halt + * + * Stop the application and immediately send the response with a + * specific status and body to the HTTP client. This may send any + * type of response: info, success, redirect, client error, or server error. + * If you need to render a template AND customize the response status, + * use the application's `render()` method instead. + * + * @param int $status The HTTP response status + * @param string $message The HTTP response body + */ + public function halt($status, $message = '') + { + $this->cleanBuffer(); + $this->response->status($status); + $this->response->body($message); + $this->stop(); + } + + /** + * Pass + * + * The thrown exception is caught in the application's `call()` method causing + * the router's current iteration to stop and continue to the subsequent route if available. + * If no subsequent matching routes are found, a 404 response will be sent to the client. + * + * @throws \Slim\Exception\Pass + */ + public function pass() + { + $this->cleanBuffer(); + throw new \Slim\Exception\Pass(); + } + + /** + * Set the HTTP response Content-Type + * @param string $type The Content-Type for the Response (ie. text/html) + */ + public function contentType($type) + { + $this->response->headers->set('Content-Type', $type); + } + + /** + * Set the HTTP response status code + * @param int $code The HTTP response status code + */ + public function status($code) + { + $this->response->setStatus($code); + } + + /** + * Get the URL for a named route + * @param string $name The route name + * @param array $params Associative array of URL parameters and replacement values + * @throws \RuntimeException If named route does not exist + * @return string + */ + public function urlFor($name, $params = array()) + { + return $this->request->getRootUri() . $this->router->urlFor($name, $params); + } + + /** + * Redirect + * + * This method immediately redirects to a new URL. By default, + * this issues a 302 Found response; this is considered the default + * generic redirect response. You may also specify another valid + * 3xx status code if you want. This method will automatically set the + * HTTP Location header for you using the URL parameter. + * + * @param string $url The destination URL + * @param int $status The HTTP redirect status code (optional) + */ + public function redirect($url, $status = 302) + { + $this->response->redirect($url, $status); + $this->halt($status); + } + + /******************************************************************************** + * Flash Messages + *******************************************************************************/ + + /** + * Set flash message for subsequent request + * @param string $key + * @param mixed $value + */ + public function flash($key, $value) + { + if (isset($this->environment['slim.flash'])) { + $this->environment['slim.flash']->set($key, $value); + } + } + + /** + * Set flash message for current request + * @param string $key + * @param mixed $value + */ + public function flashNow($key, $value) + { + if (isset($this->environment['slim.flash'])) { + $this->environment['slim.flash']->now($key, $value); + } + } + + /** + * Keep flash messages from previous request for subsequent request + */ + public function flashKeep() + { + if (isset($this->environment['slim.flash'])) { + $this->environment['slim.flash']->keep(); + } + } + + /******************************************************************************** + * Hooks + *******************************************************************************/ + + /** + * Assign hook + * @param string $name The hook name + * @param mixed $callable A callable object + * @param int $priority The hook priority; 0 = high, 10 = low + */ + public function hook($name, $callable, $priority = 10) + { + if (!isset($this->hooks[$name])) { + $this->hooks[$name] = array(array()); + } + if (is_callable($callable)) { + $this->hooks[$name][(int) $priority][] = $callable; + } + } + + /** + * Invoke hook + * @param string $name The hook name + * @param mixed $hookArg (Optional) Argument for hooked functions + */ + public function applyHook($name, $hookArg = null) + { + if (!isset($this->hooks[$name])) { + $this->hooks[$name] = array(array()); + } + if (!empty($this->hooks[$name])) { + // Sort by priority, low to high, if there's more than one priority + if (count($this->hooks[$name]) > 1) { + ksort($this->hooks[$name]); + } + foreach ($this->hooks[$name] as $priority) { + if (!empty($priority)) { + foreach ($priority as $callable) { + call_user_func($callable, $hookArg); + } + } + } + } + } + + /** + * Get hook listeners + * + * Return an array of registered hooks. If `$name` is a valid + * hook name, only the listeners attached to that hook are returned. + * Else, all listeners are returned as an associative array whose + * keys are hook names and whose values are arrays of listeners. + * + * @param string $name A hook name (Optional) + * @return array|null + */ + public function getHooks($name = null) + { + if (!is_null($name)) { + return isset($this->hooks[(string) $name]) ? $this->hooks[(string) $name] : null; + } else { + return $this->hooks; + } + } + + /** + * Clear hook listeners + * + * Clear all listeners for all hooks. If `$name` is + * a valid hook name, only the listeners attached + * to that hook will be cleared. + * + * @param string $name A hook name (Optional) + */ + public function clearHooks($name = null) + { + if (!is_null($name) && isset($this->hooks[(string) $name])) { + $this->hooks[(string) $name] = array(array()); + } else { + foreach ($this->hooks as $key => $value) { + $this->hooks[$key] = array(array()); + } + } + } + + /******************************************************************************** + * Middleware + *******************************************************************************/ + + /** + * Add middleware + * + * This method prepends new middleware to the application middleware stack. + * The argument must be an instance that subclasses Slim_Middleware. + * + * @param \Slim\Middleware + */ + public function add(\Slim\Middleware $newMiddleware) + { + $newMiddleware->setApplication($this); + $newMiddleware->setNextMiddleware($this->middleware[0]); + array_unshift($this->middleware, $newMiddleware); + } + + /******************************************************************************** + * Runner + *******************************************************************************/ + + /** + * Run + * + * This method invokes the middleware stack, including the core Slim application; + * the result is an array of HTTP status, header, and body. These three items + * are returned to the HTTP client. + */ + public function run() + { + set_error_handler(array('\Slim\Slim', 'handleErrors')); + + //Apply final outer middleware layers + if ($this->config('debug')) { + //Apply pretty exceptions only in debug to avoid accidental information leakage in production + $this->add(new \Slim\Middleware\PrettyExceptions()); + } + + //Invoke middleware and application stack + $this->middleware[0]->call(); + + //Fetch status, header, and body + list($status, $headers, $body) = $this->response->finalize(); + + // Serialize cookies (with optional encryption) + \Slim\Http\Util::serializeCookies($headers, $this->response->cookies, $this->settings); + + //Send headers + if (headers_sent() === false) { + //Send status + if (strpos(PHP_SAPI, 'cgi') === 0) { + header(sprintf('Status: %s', \Slim\Http\Response::getMessageForCode($status))); + } else { + header(sprintf('HTTP/%s %s', $this->config('http.version'), \Slim\Http\Response::getMessageForCode($status))); + } + + //Send headers + foreach ($headers as $name => $value) { + $hValues = explode("\n", $value); + foreach ($hValues as $hVal) { + header("$name: $hVal", false); + } + } + } + + //Send body, but only if it isn't a HEAD request + if (!$this->request->isHead()) { + echo $body; + } + + restore_error_handler(); + } + + /** + * Call + * + * This method finds and iterates all route objects that match the current request URI. + */ + public function call() + { + try { + if (isset($this->environment['slim.flash'])) { + $this->view()->setData('flash', $this->environment['slim.flash']); + } + $this->applyHook('slim.before'); + ob_start(); + $this->applyHook('slim.before.router'); + $dispatched = false; + $matchedRoutes = $this->router->getMatchedRoutes($this->request->getMethod(), $this->request->getResourceUri()); + foreach ($matchedRoutes as $route) { + try { + $this->applyHook('slim.before.dispatch'); + $dispatched = $route->dispatch(); + $this->applyHook('slim.after.dispatch'); + if ($dispatched) { + break; + } + } catch (\Slim\Exception\Pass $e) { + continue; + } + } + if (!$dispatched) { + $this->notFound(); + } + $this->applyHook('slim.after.router'); + $this->stop(); + } catch (\Slim\Exception\Stop $e) { + $this->response()->write(ob_get_clean()); + $this->applyHook('slim.after'); + } catch (\Exception $e) { + if ($this->config('debug')) { + throw $e; + } else { + try { + $this->error($e); + } catch (\Slim\Exception\Stop $e) { + // Do nothing + } + } + } + } + + /******************************************************************************** + * Error Handling and Debugging + *******************************************************************************/ + + /** + * Convert errors into ErrorException objects + * + * This method catches PHP errors and converts them into \ErrorException objects; + * these \ErrorException objects are then thrown and caught by Slim's + * built-in or custom error handlers. + * + * @param int $errno The numeric type of the Error + * @param string $errstr The error message + * @param string $errfile The absolute path to the affected file + * @param int $errline The line number of the error in the affected file + * @return bool + * @throws \ErrorException + */ + public static function handleErrors($errno, $errstr = '', $errfile = '', $errline = '') + { + if (!($errno & error_reporting())) { + return; + } + + throw new \ErrorException($errstr, $errno, 0, $errfile, $errline); + } + + /** + * Generate diagnostic template markup + * + * This method accepts a title and body content to generate an HTML document layout. + * + * @param string $title The title of the HTML template + * @param string $body The body content of the HTML template + * @return string + */ + protected static function generateTemplateMarkup($title, $body) + { + return sprintf("%s

%s

%s", $title, $title, $body); + } + + /** + * Default Not Found handler + */ + protected function defaultNotFound() + { + echo static::generateTemplateMarkup('404 Page Not Found', '

The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.

Visit the Home Page'); + } + + /** + * Default Error handler + */ + protected function defaultError($e) + { + $this->getLog()->error($e); + echo self::generateTemplateMarkup('Error', '

A website error has occurred. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.

'); + } +} diff --git a/api/libs/Slim/View.php b/api/libs/Slim/View.php new file mode 100644 index 0000000..c6c435a --- /dev/null +++ b/api/libs/Slim/View.php @@ -0,0 +1,276 @@ + + * @copyright 2011 Josh Lockhart + * @link http://www.slimframework.com + * @license http://www.slimframework.com/license + * @version 2.3.5 + * @package Slim + * + * MIT LICENSE + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +namespace Slim; + +/** + * View + * + * The view is responsible for rendering a template. The view + * should subclass \Slim\View and implement this interface: + * + * public render(string $template); + * + * This method should render the specified template and return + * the resultant string. + * + * @package Slim + * @author Josh Lockhart + * @since 1.0.0 + */ +class View +{ + /** + * Data available to the view templates + * @var \Slim\Helper\Set + */ + protected $data; + + /** + * Path to templates base directory (without trailing slash) + * @var string + */ + protected $templatesDirectory; + + /** + * Constructor + */ + public function __construct() + { + $this->data = new \Slim\Helper\Set(); + } + + /******************************************************************************** + * Data methods + *******************************************************************************/ + + /** + * Does view data have value with key? + * @param string $key + * @return boolean + */ + public function has($key) + { + return $this->data->has($key); + } + + /** + * Return view data value with key + * @param string $key + * @return mixed + */ + public function get($key) + { + return $this->data->get($key); + } + + /** + * Set view data value with key + * @param string $key + * @param mixed $value + */ + public function set($key, $value) + { + $this->data->set($key, $value); + } + + /** + * Set view data value as Closure with key + * @param string $key + * @param mixed $value + */ + public function keep($key, Closure $value) + { + $this->data->keep($key, $value); + } + + /** + * Return view data + * @return array + */ + public function all() + { + return $this->data->all(); + } + + /** + * Replace view data + * @param array $data + */ + public function replace(array $data) + { + $this->data->replace($data); + } + + /** + * Clear view data + */ + public function clear() + { + $this->data->clear(); + } + + /******************************************************************************** + * Legacy data methods + *******************************************************************************/ + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Get data from view + */ + public function getData($key = null) + { + if (!is_null($key)) { + return isset($this->data[$key]) ? $this->data[$key] : null; + } else { + return $this->data->all(); + } + } + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Set data for view + */ + public function setData() + { + $args = func_get_args(); + if (count($args) === 1 && is_array($args[0])) { + $this->data->replace($args[0]); + } elseif (count($args) === 2) { + // Ensure original behavior is maintained. DO NOT invoke stored Closures. + if (is_object($args[1]) && method_exists($args[1], '__invoke')) { + $this->data->set($args[0], $this->data->protect($args[1])); + } else { + $this->data->set($args[0], $args[1]); + } + } else { + throw new \InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`'); + } + } + + /** + * DEPRECATION WARNING! This method will be removed in the next major point release + * + * Append data to view + * @param array $data + */ + public function appendData($data) + { + if (!is_array($data)) { + throw new \InvalidArgumentException('Cannot append view data. Expected array argument.'); + } + $this->data->replace($data); + } + + /******************************************************************************** + * Resolve template paths + *******************************************************************************/ + + /** + * Set the base directory that contains view templates + * @param string $directory + * @throws \InvalidArgumentException If directory is not a directory + */ + public function setTemplatesDirectory($directory) + { + $this->templatesDirectory = rtrim($directory, DIRECTORY_SEPARATOR); + } + + /** + * Get templates base directory + * @return string + */ + public function getTemplatesDirectory() + { + return $this->templatesDirectory; + } + + /** + * Get fully qualified path to template file using templates base directory + * @param string $file The template file pathname relative to templates base directory + * @return string + */ + public function getTemplatePathname($file) + { + return $this->templatesDirectory . DIRECTORY_SEPARATOR . ltrim($file, DIRECTORY_SEPARATOR); + } + + /******************************************************************************** + * Rendering + *******************************************************************************/ + + /** + * Display template + * + * This method echoes the rendered template to the current output buffer + * + * @param string $template Pathname of template file relative to templates directory + */ + public function display($template) + { + echo $this->fetch($template); + } + + /** + * Return the contents of a rendered template file + * @var string $template The template pathname, relative to the template base directory + * @return string The rendered template + */ + public function fetch($template) + { + return $this->render($template); + } + + /** + * Render a template file + * + * NOTE: This method should be overridden by custom view subclasses + * + * @var string $template The template pathname, relative to the template base directory + * @return string The rendered template + * @throws \RuntimeException If resolved template pathname is not a valid file + */ + protected function render($template) + { + $templatePathname = $this->getTemplatePathname($template); + if (!is_file($templatePathname)) { + throw new \RuntimeException("View cannot render `$template` because the template does not exist"); + } + extract($this->data->all()); + ob_start(); + require $templatePathname; + + return ob_get_clean(); + } +} diff --git a/api/passwordHash.php b/api/passwordHash.php new file mode 100644 index 0000000..747d2b9 --- /dev/null +++ b/api/passwordHash.php @@ -0,0 +1,32 @@ + diff --git a/api/session.php b/api/session.php new file mode 100644 index 0000000..ada2ae9 --- /dev/null +++ b/api/session.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/app/admin/admin-index.html b/app/admin/admin-index.html new file mode 100644 index 0000000..1ad1e77 --- /dev/null +++ b/app/admin/admin-index.html @@ -0,0 +1,69 @@ +
+ + + + + + + + +
+ +
+ menu +
+ +
+ + +
+ + {{$siteLongName}} + + Админка / {{breadCrumbs}} + menu {{user.authenticated ? user.email : 'Вход/Регистрация'}} +
+
+ + + + + + + {{user.authenticated ? 'Личные данные' : 'Войти или зарегистрироваться'}} + + close + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/app/admin/adminMainCtrl.js b/app/admin/adminMainCtrl.js new file mode 100644 index 0000000..6580a9d --- /dev/null +++ b/app/admin/adminMainCtrl.js @@ -0,0 +1,7 @@ +app.controller('adminMainCtrl', function ($rootScope, $scope, $location, $filter, Data) { + + if(!$rootScope.user.authenticated === true && !$rootScope.user.role == 0){ + $location.path('/on/start'); + } + +}); \ No newline at end of file diff --git a/app/admin/blog/admin-blog.html b/app/admin/blog/admin-blog.html new file mode 100644 index 0000000..3277079 --- /dev/null +++ b/app/admin/blog/admin-blog.html @@ -0,0 +1 @@ +

Управление блогом

\ No newline at end of file diff --git a/app/admin/forum/admin-forum.html b/app/admin/forum/admin-forum.html new file mode 100644 index 0000000..d1a0f82 --- /dev/null +++ b/app/admin/forum/admin-forum.html @@ -0,0 +1 @@ +

Управление форумом

\ No newline at end of file diff --git a/app/admin/help/admin-help.html b/app/admin/help/admin-help.html new file mode 100644 index 0000000..63ab9c0 --- /dev/null +++ b/app/admin/help/admin-help.html @@ -0,0 +1 @@ +

Тиккеты и письма администрации

\ No newline at end of file diff --git a/app/admin/products/admin-products.html b/app/admin/products/admin-products.html new file mode 100644 index 0000000..5e9ec6c --- /dev/null +++ b/app/admin/products/admin-products.html @@ -0,0 +1 @@ +

Товары

\ No newline at end of file diff --git a/app/admin/start/admin-start.html b/app/admin/start/admin-start.html new file mode 100644 index 0000000..2384c89 --- /dev/null +++ b/app/admin/start/admin-start.html @@ -0,0 +1,3 @@ +

+ Страница настроек сайта. +

diff --git a/app/admin/start/settings/admin-start-settings.html b/app/admin/start/settings/admin-start-settings.html new file mode 100644 index 0000000..356bc20 --- /dev/null +++ b/app/admin/start/settings/admin-start-settings.html @@ -0,0 +1,10 @@ + + + + {{v.setting_description}}: + + + + + + \ No newline at end of file diff --git a/app/admin/start/themes/admin-start-themes.html b/app/admin/start/themes/admin-start-themes.html new file mode 100644 index 0000000..f3f82e4 --- /dev/null +++ b/app/admin/start/themes/admin-start-themes.html @@ -0,0 +1,18 @@ + + + + + Тема: "{{t}}" + menu + person_add + add + menu + person_add + add + {{t}} primary + {{t}} accent + {{t}} warn + {{t}} flat + + + \ No newline at end of file diff --git a/app/admin/users/admin-users.html b/app/admin/users/admin-users.html new file mode 100644 index 0000000..59f7294 --- /dev/null +++ b/app/admin/users/admin-users.html @@ -0,0 +1 @@ +

Управление пользователями

\ No newline at end of file diff --git a/app/app.js b/app/app.js new file mode 100644 index 0000000..9ae2cb9 --- /dev/null +++ b/app/app.js @@ -0,0 +1,130 @@ +var app = angular.module('verax', ['ngRoute', 'ngAnimate', 'ngMaterial', 'toaster']); + +app.config(['$routeProvider', '$locationProvider',//рабочие роуты + function($routeProvider, $locationProvider) { + $routeProvider + .when('/', { + redirectTo: 'on/start' + }) + .when('/admin/:mainRoute', { + title: 'Админка', + templateUrl: 'app/admin/admin-index.html', + controller: 'globalCtrl' + }) + .when('/admin/:mainRoute/:childRoute', { + title: 'Админка', + templateUrl: 'app/admin/admin-index.html', + controller: 'globalCtrl' + }) + .when('/on/:mainRoute', { + title: 'Клиент', + templateUrl: 'app/on/client-index.html', + controller: 'globalCtrl' + }) + .when('/on/:mainRoute/:childRoute', { + title: 'Клиент', + templateUrl: 'app/on/client-index.html', + controller: 'globalCtrl' + }) + .when('/error', { + title: 'Ошибка', + templateUrl: 'app/error.html' + }) + .otherwise({ + redirectTo: '/on/start' + }); + $locationProvider.html5Mode(false).hashPrefix("!"); +}]); + +app.run(function ($rootScope, $route, $location, Data, $templateCache) { + + angular.isDefined($rootScope.user) ? '' : $rootScope.user = {}; + + $rootScope.$on("$routeChangeStart", function (event, next, current){ //проверяем сессию(авторизацию) пользователя + var nextUrl = next.$$route.originalPath; + Data.get('session').then(function (results){ + if(results.uid){ + if(!$rootScope.user.authenticated){ + Data.post('user-data', {'uid': results.uid}).then(function(result){ + $rootScope.user = result.data[0]; + $rootScope.user.authenticated = true; + }); + } + }else{ + + } + }); + }); + + if(!angular.isDefined($rootScope.siteSettings)){ // достаем настройки сайта из БД на страте + $rootScope.siteSettings = {}; + Data.get('site-settings').then(function(data){ + angular.forEach(data.data, function(s, i){ + this[s.setting_name] = s; + + }, $rootScope.siteSettings); + $rootScope.$siteName = $rootScope.siteSettings['shortName'].value; + $rootScope.$siteLongName = $rootScope.siteSettings['longName'].value; + $rootScope.$siteTheme = $rootScope.siteSettings['siteTheme'].value; + }); + } + + $rootScope.timeStamp = new Date(); + +}); + +app.config(function($mdThemingProvider){ + + $mdThemingProvider.theme('brown') + .primaryPalette('brown') + .accentPalette('grey'); + + $mdThemingProvider.theme('brown-dark') + .primaryPalette('brown') + .accentPalette('grey') + .dark(); + + $mdThemingProvider.theme('blue') + .primaryPalette('blue',{ + 'default': '700' + }) + .accentPalette('light-blue'); + + $mdThemingProvider.theme('purple') + .primaryPalette('deep-purple') + .accentPalette('purple'); + + $mdThemingProvider.theme('orange') + .primaryPalette('deep-orange') + .accentPalette('orange'); + + $mdThemingProvider.theme('teal') + .primaryPalette('teal') + .accentPalette('green'); + + $mdThemingProvider.theme('red') + .primaryPalette('red') + .accentPalette('pink') + .warnPalette('deep-purple'); + + $mdThemingProvider.theme('amber') + .primaryPalette('amber') + .accentPalette('lime') + .warnPalette('deep-orange'); + + $mdThemingProvider.theme('green') + .primaryPalette('green') + .accentPalette('light-green'); + + $mdThemingProvider.theme('grey') + .primaryPalette('grey') + .accentPalette('blue-grey'); + + $mdThemingProvider.theme('ello', 'default') + .primaryPalette('yellow') + .dark(); + + $mdThemingProvider.alwaysWatchTheme(true); + +}); + \ No newline at end of file diff --git a/app/auth/authCtrl.js b/app/auth/authCtrl.js new file mode 100644 index 0000000..a618851 --- /dev/null +++ b/app/auth/authCtrl.js @@ -0,0 +1,39 @@ +app.controller('authCtrl', function ($scope, $rootScope, $routeParams, $location, $http, Data, $route) { + $scope.login = {}; + $scope.signup = {}; + $rootScope.user = {}; + $scope.doLogin = function (customer) { + Data.post('login', { + customer: customer + }).then(function (results) { + Data.toast(results); + if (results.status == "success") { + $route.reload(); + } + $scope.showNoty(results.status, results.message); + }); + }; + $scope.signup = {email:'',password:'',name:'',phone:'',address:'',role:'1'}; + $scope.signUp = function (customer) { + Data.post('signUp', { + customer: customer + }).then(function (results) { + Data.toast(results); + if (results.status == "success") { + $route.reload(); + } + $scope.showNoty(results.status, results.message); + }); + }; +}); + +app.controller('logoutCtrl', function ($scope,$rootScope ,$location, Data, $route) { + $scope.logout = function () { + $rootScope.user = {}; + $rootScope.user.authenticated = false; + Data.get('logout').then(function (results) { + $scope.showNoty(results.status, results.message); + $location.path('/', true); + }); + }; +}); \ No newline at end of file diff --git a/app/auth/client-data.html b/app/auth/client-data.html new file mode 100644 index 0000000..dcb706b --- /dev/null +++ b/app/auth/client-data.html @@ -0,0 +1,3 @@ + + Выход + \ No newline at end of file diff --git a/app/auth/dashboard.html b/app/auth/dashboard.html new file mode 100644 index 0000000..d62e749 --- /dev/null +++ b/app/auth/dashboard.html @@ -0,0 +1,33 @@ + +
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/app/auth/signup.html b/app/auth/signup.html new file mode 100644 index 0000000..8540854 --- /dev/null +++ b/app/auth/signup.html @@ -0,0 +1,67 @@ + + + + + +
+ + + + + + + + + + + Войти + +
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Зарегистрироваться + +
+
+
+
\ No newline at end of file diff --git a/app/data.js b/app/data.js new file mode 100644 index 0000000..d5480bd --- /dev/null +++ b/app/data.js @@ -0,0 +1,32 @@ +app.factory("Data", ['$http', 'toaster', + function ($http, toaster) { + + var serviceBase = 'api/'; + + var obj = {}; + + obj.toast = function (data) { + toaster.pop(data.status, "", data.message, 10000, 'trustedHtml'); + }; + obj.get = function (q) { + return $http.get(serviceBase + q).then(function (results) { + return results.data; + }); + }; + obj.post = function (q, object) { + return $http.post(serviceBase + q, object).then(function (results) { + return results.data; + }); + }; + obj.put = function (q, object) { + return $http.put(serviceBase + q, object).then(function (results) { + return results.data; + }); + }; + obj.delete = function (q) { + return $http.delete(serviceBase + q).then(function (results) { + return results.data; + }); + }; + return obj; +}]); diff --git a/app/error.html b/app/error.html new file mode 100644 index 0000000..a1641f6 --- /dev/null +++ b/app/error.html @@ -0,0 +1 @@ +

Ошибка доступа

\ No newline at end of file diff --git a/app/globalController.js b/app/globalController.js new file mode 100644 index 0000000..94c5dc4 --- /dev/null +++ b/app/globalController.js @@ -0,0 +1,100 @@ +'use strict'; + +app.controller('globalCtrl', function ($scope, $rootScope, $filter, Data, $route, $routeParams, $location, $mdSidenav, $mdDialog) { + + $scope.locationAbsUrl = $location.absUrl(); + $scope.locationUrl = $location.url(); + $scope.locationHost = $location.host(); + $scope.locationPath = $location.path(); + $scope.locationHash = $location.hash(); + $scope.blured = false; + + + $rootScope.go = function(url){ + url != $location.url() ? $location.url(url) : showNoty('warning', 'Вы уже на этой странице'); + }; + + $scope.siteThemes = [ + 'default', 'blue','purple', 'orange', 'ello', 'brown', 'teal', 'red', 'amber', 'green', 'grey' + ]; + + $scope.toggleLeftSidebar = function(){ + $mdSidenav('left').toggle(); + $scope.bluredToggle(); + }; + $scope.toggleRightSidebar = function(){ + $mdSidenav('right').toggle(); + $scope.bluredToggle(); + }; + + $scope.bluredToggle = function(){ + //$scope.blured ? $scope.blured = false : $scope.blured = true; + }; + + $rootScope.showDialog = function(title, content){ + var body = angular.element(document.body); + $mdDialog.show({ + parent: body, + templateUrl: 'app/md-dialog-big.html', + onComplete: function(){ + + }, + clickOutsideToClose: false, + controller: function dialogController($rootScope, $scope, $mdDialog){ + $scope.closeDialog = function(){ + $mdDialog.hide(); + }; + $scope.title = title; + $scope.content = content; + $scope.theme = $rootScope.$siteTheme; + angular.element('#ng-view').addClass('vx-blur'); + $scope.disableBlur = function(){ + angular.element('#ng-view').removeClass('vx-blur'); + }; + } + }); + }; + + + $scope.vxUpdateData = function(updLink, data){ // универсальный апдейтер. ссылка (строка) типа ':tableName/:searchRow/:id' и data - ассоциативный массив {изменяемый ряд => значение} + Data.post('vx-update-data/' + updLink, data).then(function (result) { + $scope.vxUpdateResult = result; + $scope.showNoty(result.status, result.message); + }); + }; + + $scope.showNoty = function(type, message){ + var hd, title, toastClass, cm, icon; + if(type == 'error'){ + toastClass = 'md-warn'; title = "Ошибка!"; hd = false; cm = 'Произошла ошибка!!! :('; + icon = 'error_outline'; + console.error(message); + }else if(type == 'warning'){ + toastClass = 'md-accent'; title = "Предупреждение!"; hd = 5000; cm = 'Данные НЕ обновлены!'; + icon = 'warning'; + console.warn(message); + }else if(type == 'success'){ + toastClass = 'md-primary'; title = "Успешно!"; hd = 2500; cm = 'Данные успешно обновлены! '; + icon = 'check'; + console.info(message); + } + noty({ + type: type, + theme: false, + template: ''+ + ''+ title + + ''+ icon +'' + + ''+ + '

'+ message +'

'+ + '
', + speed: 200, + timeout: hd + }); + }; + + //$scope.setSiteTheme = function(theme){ + // $mdThemingProvider.setDefaultTheme(theme); + //}; + //$scope.setSiteTheme($scope.siteSettings[3].value); + +}); \ No newline at end of file diff --git a/app/globalDirectives.js b/app/globalDirectives.js new file mode 100644 index 0000000..0002c2d --- /dev/null +++ b/app/globalDirectives.js @@ -0,0 +1,151 @@ + +app.directive('formElement', function() { + return { + restrict: 'E', + transclude: true, + scope: { + label : "@", + model : "=" + }, + link: function(scope, element, attrs) { + scope.disabled = attrs.hasOwnProperty('disabled'); + scope.required = attrs.hasOwnProperty('required'); + scope.pattern = attrs.pattern || '.*'; + }, + template: '
' + }; + +}); + +app.directive('onlyNumbers', function() { + return function(scope, element, attrs) { + var keyCode = [8,9,13,37,39,46,48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105,110,190]; + element.bind("keydown", function(event) { + if($.inArray(event.which,keyCode) == -1) { + scope.$apply(function(){ + scope.$eval(attrs.onlyNum); + event.preventDefault(); + }); + event.preventDefault(); + } + + }); + }; +}); + +app.directive('focus', function() { + return function(scope, element) { + element[0].focus(); + }; +}); + +app.directive('passwordMatch', [function () { + return { + restrict: 'A', + scope:true, + require: 'ngModel', + link: function (scope, elem , attrs, control) { + var checker = function () { + + //get the value of the first password + var e1 = scope.$eval(attrs.ngModel); + + //get the value of the other password + var e2 = scope.$eval(attrs.passwordMatch); + if(e2!=null) + return e1 == e2; + }; + scope.$watch(checker, function (n) { + + //set the form control to valid if both + //passwords are the same, else invalid + control.$setValidity("passwordNoMatch", n); + }); + } + }; +}]); + +app.directive('animateOnChange', function($animate) { + return function(scope, elem, attr) { + scope.$watch(attr.animateOnChange, function(nv,ov) { + if (nv!=ov) { + var c = 'change-up'; + $animate.addClass(elem,c, function() { + $animate.removeClass(elem,c); + }); + } + }); + }; +}); + +app.directive('vxEditable', function() { + return { + restrict: 'E', + scope: { + vxFn: '&updatefn', + data: '=' + }, + template: '{{data}}'+ + ''+ + '
'+ + ''+ + ''+ + ''+ + '
', + link: function(scope, element, attrs){ + scope.data = scope.data || '!'; + element.css({ + padding: '0px 10px', + width: '100%' + }); + } + }; +}); + +app.directive('fileChange', function(){ + return { + restrict: 'A', + link: function(scope, element, attrs){ + var fileChangeHandler = scope.$eval(attrs.fileChange); + element.bind('change', fileChangeHandler); + } + }; +}); + +app.directive('vxDraggable', ['$document', function($document) { + return { + link: function(scope, element, attr) { + var startX = 0, startY = 0, x = 0, y = 0; + + element.css({ + position: 'relative', + border: '1px solid red', + backgroundColor: 'lightgrey', + cursor: 'pointer' + }); + + element.on('mousedown', function(event) { + // Prevent default dragging of selected content + event.preventDefault(); + startX = event.pageX - x; + startY = event.pageY - y; + $document.on('mousemove', mousemove); + $document.on('mouseup', mouseup); + }); + + function mousemove(event) { + y = event.pageY - startY; + x = event.pageX - startX; + element.css({ + top: y + 'px', + left: x + 'px' + }); + } + + function mouseup() { + $document.off('mousemove', mousemove); + $document.off('mouseup', mouseup); + } + } + }; +}]); \ No newline at end of file diff --git a/app/md-dialog-big.html b/app/md-dialog-big.html new file mode 100644 index 0000000..8ce5e83 --- /dev/null +++ b/app/md-dialog-big.html @@ -0,0 +1,13 @@ + + +
+ {{title}} +
+ close +
+
+
+ +

{{content}}

+
+
\ No newline at end of file diff --git a/app/on/blog/client-blog-page.html b/app/on/blog/client-blog-page.html new file mode 100644 index 0000000..3c13e46 --- /dev/null +++ b/app/on/blog/client-blog-page.html @@ -0,0 +1 @@ +

Блог

\ No newline at end of file diff --git a/app/on/client-index.html b/app/on/client-index.html new file mode 100644 index 0000000..36f894b --- /dev/null +++ b/app/on/client-index.html @@ -0,0 +1,69 @@ +
+ + + + + + +
+ +
+ menu +
+ +
+ + + + +
+ + {{$siteLongName}} + + Главная страница / {{breadCrumbs}} + menu {{user.authenticated ? user.email : 'Вход/Регистрация'}} +
+
+ + + + + + + {{user.authenticated ? 'Личные данные' : 'Войти или зарегистрироваться'}} + + close + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/app/on/clientMainCtrl.js b/app/on/clientMainCtrl.js new file mode 100644 index 0000000..5924828 --- /dev/null +++ b/app/on/clientMainCtrl.js @@ -0,0 +1,7 @@ +'use strict'; + +app.controller('clientMainCtrl', function ($scope, $rootScope, $filter, Data, $route, $routeParams, $location, $mdSidenav) { + + + +}); \ No newline at end of file diff --git a/app/on/forum/client-forum-page.html b/app/on/forum/client-forum-page.html new file mode 100644 index 0000000..b1ff785 --- /dev/null +++ b/app/on/forum/client-forum-page.html @@ -0,0 +1 @@ +

Форум

\ No newline at end of file diff --git a/app/on/help/client-help-page.html b/app/on/help/client-help-page.html new file mode 100644 index 0000000..14cea9f --- /dev/null +++ b/app/on/help/client-help-page.html @@ -0,0 +1 @@ +

Страница помощи

\ No newline at end of file diff --git a/app/on/products/client-products-page.html b/app/on/products/client-products-page.html new file mode 100644 index 0000000..5e9ec6c --- /dev/null +++ b/app/on/products/client-products-page.html @@ -0,0 +1 @@ +

Товары

\ No newline at end of file diff --git a/app/on/start/about/on-start-about.html b/app/on/start/about/on-start-about.html new file mode 100644 index 0000000..6bcf662 --- /dev/null +++ b/app/on/start/about/on-start-about.html @@ -0,0 +1,4 @@ +

О сайте "{{siteSettings.shortName}}"

+

+ {{siteSettings.description}} +

\ No newline at end of file diff --git a/app/on/start/activity/on-start-activity.html b/app/on/start/activity/on-start-activity.html new file mode 100644 index 0000000..22ffe01 --- /dev/null +++ b/app/on/start/activity/on-start-activity.html @@ -0,0 +1,10 @@ +

Последние новости {{siteSettings.shortName['value']}}

+{{routeParams}} +

+ {{user | json}}{{$routeParams | json}} + admin +

+

+ locationAbsUrl:{{locationAbsUrl | json}}
+ locationUrl:{{locationUrl | json}}
+

\ No newline at end of file diff --git a/app/on/start/on-start.html b/app/on/start/on-start.html new file mode 100644 index 0000000..d7c35d5 --- /dev/null +++ b/app/on/start/on-start.html @@ -0,0 +1 @@ +

Основная информация

\ No newline at end of file diff --git a/app/on/user/client-user-page.html b/app/on/user/client-user-page.html new file mode 100644 index 0000000..884bdf0 --- /dev/null +++ b/app/on/user/client-user-page.html @@ -0,0 +1,2 @@ + +

Пользователь

\ No newline at end of file diff --git a/app/veraxRoutesController.js b/app/veraxRoutesController.js new file mode 100644 index 0000000..c0493b7 --- /dev/null +++ b/app/veraxRoutesController.js @@ -0,0 +1,146 @@ +'use strict'; + +app.controller('veraxRoutesController', function ($scope, $rootScope, $filter, Data, $route, $routeParams, $location, $mdSidenav, $mdDialog) { + $scope.veraxRouteCollection = {}; // массив для заполнения в контроллере + + $scope.veraxRoutes = {}; // коллекция форматированных роутов. Работать во фронтэнде нужно с этим массивом + +// partials должны быть в папке admin + $scope.veraxRouteCollection.admin = { // location.path - admin. Если корневая, то veraxRootUrl + start: { + id: 0, name: 'Настройки', theme: 'teal', child:{ // страница в папке admin/start/admin-start.html + settings: {id: 0, name: 'Основные настройки'}, // страница admin/start/settings/admin-start-settings.html + themes: {id:1, name: 'Темы'}, + routes: {id:2, name: 'Routes(разделы сайта)'} + } + }, + products: { + id: 1, name: 'Товары', theme: 'brown', child:{ + all:{id: 0, name: 'Все товары'}, + categories:{id: 1, name: 'Категории товаров'}, + 'import':{id: 2, name: 'Импорт товаров'}, + 'export':{id: 3, name: 'Прайс лист и экспорт'}, + senders:{id: 4, name: 'Поставщики'} + } + }, + blog: { + id: 2, name: 'Блог', theme: 'orange' + }, + forum: { + id: 3, name: 'Форум', theme: 'purple' + }, + users: { + id: 4, name: 'Пользователи', theme: 'green' + }, + help: { + id: 5, name: 'Помощь', theme: 'blue' + } + }; + + $scope.veraxRouteCollection.on = { + 'start': { + id: 0, name: 'Информация', theme: 'teal', child:{ + activity: {id: 0, name: 'Сводка новостей'}, + about: {id: 1, name: 'О сайте'} + } + }, + 'products': { + id: 1, name: 'Товары', theme: 'brown' + }, + 'blog': { + id: 2, name: 'Блог', theme: 'orange' + }, + 'forum': { + id: 3, name: 'Форум', theme: 'purple' + }, + 'user': { + id: 4, name: 'Личный кабинет', theme: 'green' + }, + 'help': { + id: 5, name: 'Помощь', theme: 'blue' + } + }; + + + // превращаем $scope.veraxRouteCollection в $scope.veraxRoutes + // добавляя в массив url и адреса страниц-partials. + function doFormattedVeraxRoutes(){ + angular.forEach($scope.veraxRouteCollection, function(mainRoute, mainKey){ + mainKey == 'veraxRootUrl' ? mainKey = '' : ''; + var formatted = {}; + angular.forEach(mainRoute, function(route, routeKey){ + var mainUrl = mainKey + '/' + routeKey; + var mainPartial = 'app/' + mainKey + '/' + routeKey + '/' + mainKey + '-' + routeKey + '.html'; + var child = route.child || false; + if(child){ //если есть дочерние направления + var allChildes = {}; + angular.forEach(child, function(r, rKey){ + var cUrl = mainUrl + '/' + rKey; + var cPartial = 'app/' + mainKey + '/' + routeKey + '/' + rKey + '/' + mainKey + '-' + routeKey + '-' + rKey + '.html'; + allChildes[rKey] = {id: r.id, name: r.name, url: cUrl, partial: cPartial}; + }); + }else{ + var allChildes = false; + } + this[routeKey] = {id: route.id, name: route.name, theme: route.theme, url: mainUrl, partial: mainPartial, child: allChildes}; + }, formatted); + this[mainKey] = formatted; + }, $scope.veraxRoutes) + } + + doFormattedVeraxRoutes(); + + // работа с идентификацией содержимого в зависимости от URL + $scope.routeParams = $routeParams; + $scope.urlStr = $location.url(); + var urlStr = $location.url(); // достаем значения адресной строки для маршрутизации + urlStr = urlStr[0] == '/' ? urlStr.slice(1) : urlStr; + urlStr = urlStr.charAt(urlStr.length) == '/' ? urlStr.slice(urlStr.length) : urlStr; + $scope.urlObj = urlStr.split('/'); + + var currentRootRout = $scope.urlObj[0] || 'veraxRootUrl'; // вычисляем главный маршрут forum или products, например + var currentMainRout = $scope.urlObj[1] || false; + var currentChildRout = $scope.urlObj[2] || false; + + $scope.activeMainRouteId = 0; + $scope.activeChildRouteId = 0; + + if(currentRootRout in $scope.veraxRoutes){ + var rootRoute = $scope.veraxRoutes[currentRootRout]; + console.log('currentRootRout - ' + currentRootRout); + if(currentMainRout in rootRoute){ + var mainRoute = rootRoute[currentMainRout]; + console.log('currentMainRout - ' + currentMainRout); + $scope.activeMainRouteId = mainRoute.id; + if(mainRoute.child){ + if(currentChildRout in mainRoute.child){ + console.log('currentChildRout - ' + currentChildRout); + $scope.activeChildRouteId = mainRoute.child[currentChildRout].id; + } + } + }else{ + $rootScope.showDialog('Ошибка!', 'Ошибка доступа: "currentRootRout: "'+ currentRootRout + ' | "currentMainRout: "' + currentMainRout + ' | "currentChildRout: "' + currentChildRout); + } + } + + // работа после выбора роута + $scope.routeOnSelect = function(route, parentRoute){ + $rootScope.breadCrumbs = parentRoute ? parentRoute.name + ' / ' + route.name : route.name; + $rootScope.mainRouteContentPartial = parentRoute ? parentRoute.partial : route.partial; + $rootScope.$siteTheme = !parentRoute ? route.theme : $rootScope.$siteTheme; + if($location.url() != route.url){ + $scope.setUrlNotReload(route.url); + } + }; + + var original = $location.path; //костыли для НЕперезагрузки контроллера при смене location.path + $scope.setUrlNotReload = function (path) { + var lastRoute = $route.current; + var un = $rootScope.$on('$locationChangeSuccess', function () { + $route.current = lastRoute; + un(); + }); + return original.apply($location, [path]); + }; + +}); \ No newline at end of file diff --git a/css/MaterialIcons-Regular.eot b/css/MaterialIcons-Regular.eot new file mode 100644 index 0000000..b902922 Binary files /dev/null and b/css/MaterialIcons-Regular.eot differ diff --git a/css/MaterialIcons-Regular.ttf b/css/MaterialIcons-Regular.ttf new file mode 100644 index 0000000..0768c78 Binary files /dev/null and b/css/MaterialIcons-Regular.ttf differ diff --git a/css/MaterialIcons-Regular.woff b/css/MaterialIcons-Regular.woff new file mode 100644 index 0000000..3a08d45 Binary files /dev/null and b/css/MaterialIcons-Regular.woff differ diff --git a/css/MaterialIcons-Regular.woff2 b/css/MaterialIcons-Regular.woff2 new file mode 100644 index 0000000..b1ffe8c Binary files /dev/null and b/css/MaterialIcons-Regular.woff2 differ diff --git a/css/angular-material.min.css b/css/angular-material.min.css new file mode 100644 index 0000000..91bebb4 --- /dev/null +++ b/css/angular-material.min.css @@ -0,0 +1,6 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v0.10.0 + */body,html{height:100%;color:rgba(0,0,0,.87);background:#fff;position:relative}body{margin:0;padding:0}[tabindex='-1']:focus{outline:0}.inset{padding:10px}button.md-no-style{font-weight:400;background-color:inherit;text-align:left;border:none;padding:0;margin:0}button,input,select,textarea{vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default}textarea{vertical-align:top;overflow:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box;-webkit-box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.md-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-transform:none;width:1px}.md-shadow{position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;pointer-events:none}.md-button.md-fab,.md-button.md-fab.md-focused:not([disabled]),.md-button.md-raised.md-focused:not([disabled]),.md-button.md-raised:not([disabled]),.md-shadow-bottom-z-1{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button.md-fab:not([disabled]):active,.md-button.md-raised:not([disabled]):active,.md-shadow-bottom-z-2{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-shadow-animated.md-shadow{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.md-ripple-container{pointer-events:none;position:absolute;overflow:hidden;left:0;top:0;width:100%;height:100%;transition:all .55s cubic-bezier(.25,.8,.25,1)}.md-ripple{position:absolute;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:0;border-radius:50%}.md-ripple.md-ripple-placed{transition:left 1.8s cubic-bezier(.25,.8,.25,1),top 1.8s cubic-bezier(.25,.8,.25,1),margin 1.3s cubic-bezier(.25,.8,.25,1),border 1.3s cubic-bezier(.25,.8,.25,1),width 1.3s cubic-bezier(.25,.8,.25,1),height 1.3s cubic-bezier(.25,.8,.25,1),opacity 1.3s cubic-bezier(.25,.8,.25,1),-webkit-transform 1.3s cubic-bezier(.25,.8,.25,1);transition:left 1.8s cubic-bezier(.25,.8,.25,1),top 1.8s cubic-bezier(.25,.8,.25,1),margin 1.3s cubic-bezier(.25,.8,.25,1),border 1.3s cubic-bezier(.25,.8,.25,1),width 1.3s cubic-bezier(.25,.8,.25,1),height 1.3s cubic-bezier(.25,.8,.25,1),opacity 1.3s cubic-bezier(.25,.8,.25,1),transform 1.3s cubic-bezier(.25,.8,.25,1)}.md-ripple.md-ripple-scaled{-webkit-transform:scale(1);transform:scale(1)}.md-ripple.md-ripple-active,.md-ripple.md-ripple-full,.md-ripple.md-ripple-visible{opacity:.2}.md-padding{padding:8px}.md-margin{margin:8px}.md-scroll-mask{position:absolute;background-color:transparent;top:0;right:0;bottom:0;left:0}.md-scroll-mask>.md-scroll-mask-bar{display:block;position:absolute;background-color:#fafafa;right:0;top:0;bottom:0;z-index:65;box-shadow:inset 0 0 1px rgba(0,0,0,.3)}@media (min-width:600px){.md-padding{padding:16px}}body,html{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6,md-card,md-list,md-select,md-toolbar,ol,p,ul{text-rendering:optimizeLegibility}.md-display-4{font-size:112px;font-weight:300;letter-spacing:-.01em;line-height:112px}.md-display-3{font-size:56px;font-weight:400;letter-spacing:-.005em;line-height:56px}.md-display-2{font-size:45px;font-weight:400;line-height:64px}.md-display-1{font-size:34px;font-weight:400;line-height:40px}.md-headline{font-size:24px;font-weight:400;line-height:32px}.md-title,.md-toolbar-tools{font-size:20px;font-weight:500;letter-spacing:.005em}.md-subhead,md-list-item.md-2-line .md-list-item-text h3,md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list-item.md-3-line .md-list-item-text h3,md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:16px;font-weight:400;letter-spacing:.01em;line-height:24px}.md-body-1{font-size:14px;font-weight:400;letter-spacing:.01em;line-height:20px}.md-body-2,md-list .md-subheader,md-list-item.md-2-line .md-list-item-text h4,md-list-item.md-2-line .md-list-item-text p,md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list-item.md-3-line .md-list-item-text h4,md-list-item.md-3-line .md-list-item-text p,md-list-item.md-3-line>.md-no-style .md-list-item-text h4,md-list-item.md-3-line>.md-no-style .md-list-item-text p{font-size:14px;font-weight:500;letter-spacing:.01em;line-height:24px}.md-caption{font-size:12px;letter-spacing:.02em}.md-button{letter-spacing:.01em}button,html,input,select,textarea{font-family:RobotoDraft,Roboto,'Helvetica Neue',sans-serif}button,input,select,textarea{font-size:100%}[layout]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[layout-padding]>[flex-lt-md],[layout-padding]>[flex-sm]{padding:4px}[layout-padding],[layout-padding]>[flex-gt-sm],[layout-padding]>[flex-lt-lg],[layout-padding]>[flex-md],[layout-padding]>[flex]{padding:8px}[layout-padding]>[flex-gt-md],[layout-padding]>[flex-lg]{padding:16px}[layout-margin]>[flex-lt-md],[layout-margin]>[flex-sm]{margin:4px}[layout-margin],[layout-margin]>[flex-gt-sm],[layout-margin]>[flex-lt-lg],[layout-margin]>[flex-md],[layout-margin]>[flex]{margin:8px}[layout-margin]>[flex-gt-md],[layout-margin]>[flex-lg]{margin:16px}[layout-wrap]{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}[layout-fill]{margin:0;min-height:100%;width:100%}@-moz-document url-prefix(){[layout-fill]{margin:0;width:100%;min-height:auto;height:inherit}}[flex]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex="0"]{max-width:0}[layout=column]>[flex="0"]{max-height:0}[flex="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex="5"]{max-width:5%}[layout=column]>[flex="5"]{max-height:5%}[flex="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex="10"]{max-width:10%}[layout=column]>[flex="10"]{max-height:10%}[flex="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex="15"]{max-width:15%}[layout=column]>[flex="15"]{max-height:15%}[flex="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex="20"]{max-width:20%}[layout=column]>[flex="20"]{max-height:20%}[flex="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex="25"]{max-width:25%}[layout=column]>[flex="25"]{max-height:25%}[flex="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex="30"]{max-width:30%}[layout=column]>[flex="30"]{max-height:30%}[flex="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex="35"]{max-width:35%}[layout=column]>[flex="35"]{max-height:35%}[flex="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex="40"]{max-width:40%}[layout=column]>[flex="40"]{max-height:40%}[flex="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex="45"]{max-width:45%}[layout=column]>[flex="45"]{max-height:45%}[flex="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex="50"]{max-width:50%}[layout=column]>[flex="50"]{max-height:50%}[flex="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex="55"]{max-width:55%}[layout=column]>[flex="55"]{max-height:55%}[flex="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex="60"]{max-width:60%}[layout=column]>[flex="60"]{max-height:60%}[flex="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex="65"]{max-width:65%}[layout=column]>[flex="65"]{max-height:65%}[flex="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex="70"]{max-width:70%}[layout=column]>[flex="70"]{max-height:70%}[flex="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex="75"]{max-width:75%}[layout=column]>[flex="75"]{max-height:75%}[flex="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex="80"]{max-width:80%}[layout=column]>[flex="80"]{max-height:80%}[flex="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex="85"]{max-width:85%}[layout=column]>[flex="85"]{max-height:85%}[flex="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex="90"]{max-width:90%}[layout=column]>[flex="90"]{max-height:90%}[flex="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex="95"]{max-width:95%}[layout=column]>[flex="95"]{max-height:95%}[flex="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex="100"]{max-width:100%}[layout=column]>[flex="100"]{max-height:100%}[flex="33"],[flex="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex="66"],[flex="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex="33"],[layout=row]>[flex="34"]{max-width:33.33%}[layout=row]>[flex="66"],[layout=row]>[flex="67"]{max-width:66.66%}[layout=column]>[flex="33"],[layout=column]>[flex="34"]{max-height:33.33%}[layout=column]>[flex="66"],[layout=column]>[flex="67"]{max-height:66.66%}[layout-align=center],[layout-align="center center"],[layout-align="center start"],[layout-align="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align=end],[layout-align="end center"],[layout-align="end start"],[layout-align="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align=space-around],[layout-align="space-around center"],[layout-align="space-around start"],[layout-align="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align=space-between],[layout-align="space-between center"],[layout-align="space-between start"],[layout-align="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align="center center"],[layout-align="end center"],[layout-align="space-around center"],[layout-align="space-between center"],[layout-align="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align="center start"],[layout-align="end start"],[layout-align="space-around start"],[layout-align="space-between start"],[layout-align="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align="center end"],[layout-align="end end"],[layout-align="space-around end"],[layout-align="space-between end"],[layout-align="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[flex-order="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[offset="5"]{margin-left:5%}[offset="10"]{margin-left:10%}[offset="15"]{margin-left:15%}[offset="20"]{margin-left:20%}[offset="25"]{margin-left:25%}[offset="30"]{margin-left:30%}[offset="35"]{margin-left:35%}[offset="40"]{margin-left:40%}[offset="45"]{margin-left:45%}[offset="50"]{margin-left:50%}[offset="55"]{margin-left:55%}[offset="60"]{margin-left:60%}[offset="65"]{margin-left:65%}[offset="70"]{margin-left:70%}[offset="75"]{margin-left:75%}[offset="80"]{margin-left:80%}[offset="85"]{margin-left:85%}[offset="90"]{margin-left:90%}[offset="95"]{margin-left:95%}[offset="33"],[offset="34"]{margin-left:33.33%}[offset="66"],[offset="67"]{margin-left:66.66%}@media (max-width:599px){[hide-sm]:not([show-sm]):not([show]),[hide]:not([show-sm]):not([show]){display:none}[flex-order-sm="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order-sm="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order-sm="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order-sm="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order-sm="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order-sm="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order-sm="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order-sm="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order-sm="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order-sm="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[layout-align-sm=center],[layout-align-sm="center center"],[layout-align-sm="center start"],[layout-align-sm="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align-sm=end],[layout-align-sm="end center"],[layout-align-sm="end start"],[layout-align-sm="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align-sm=space-around],[layout-align-sm="space-around center"],[layout-align-sm="space-around start"],[layout-align-sm="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align-sm=space-between],[layout-align-sm="space-between center"],[layout-align-sm="space-between start"],[layout-align-sm="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align-sm="center center"],[layout-align-sm="end center"],[layout-align-sm="space-around center"],[layout-align-sm="space-between center"],[layout-align-sm="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align-sm="center start"],[layout-align-sm="end start"],[layout-align-sm="space-around start"],[layout-align-sm="space-between start"],[layout-align-sm="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align-sm="center end"],[layout-align-sm="end end"],[layout-align-sm="space-around end"],[layout-align-sm="space-between end"],[layout-align-sm="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[layout-sm]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout-sm=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout-sm=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[offset-sm="5"]{margin-left:5%}[offset-sm="10"]{margin-left:10%}[offset-sm="15"]{margin-left:15%}[offset-sm="20"]{margin-left:20%}[offset-sm="25"]{margin-left:25%}[offset-sm="30"]{margin-left:30%}[offset-sm="35"]{margin-left:35%}[offset-sm="40"]{margin-left:40%}[offset-sm="45"]{margin-left:45%}[offset-sm="50"]{margin-left:50%}[offset-sm="55"]{margin-left:55%}[offset-sm="60"]{margin-left:60%}[offset-sm="65"]{margin-left:65%}[offset-sm="70"]{margin-left:70%}[offset-sm="75"]{margin-left:75%}[offset-sm="80"]{margin-left:80%}[offset-sm="85"]{margin-left:85%}[offset-sm="90"]{margin-left:90%}[offset-sm="95"]{margin-left:95%}[offset-sm="33"],[offset-sm="34"]{margin-left:33.33%}[offset-sm="66"],[offset-sm="67"]{margin-left:66.66%}[flex-sm]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex-sm="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex-sm="0"]{max-width:0}[layout=column]>[flex-sm="0"]{max-height:0}[flex-sm="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex-sm="5"]{max-width:5%}[layout=column]>[flex-sm="5"]{max-height:5%}[flex-sm="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex-sm="10"]{max-width:10%}[layout=column]>[flex-sm="10"]{max-height:10%}[flex-sm="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex-sm="15"]{max-width:15%}[layout=column]>[flex-sm="15"]{max-height:15%}[flex-sm="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex-sm="20"]{max-width:20%}[layout=column]>[flex-sm="20"]{max-height:20%}[flex-sm="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex-sm="25"]{max-width:25%}[layout=column]>[flex-sm="25"]{max-height:25%}[flex-sm="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex-sm="30"]{max-width:30%}[layout=column]>[flex-sm="30"]{max-height:30%}[flex-sm="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex-sm="35"]{max-width:35%}[layout=column]>[flex-sm="35"]{max-height:35%}[flex-sm="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex-sm="40"]{max-width:40%}[layout=column]>[flex-sm="40"]{max-height:40%}[flex-sm="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex-sm="45"]{max-width:45%}[layout=column]>[flex-sm="45"]{max-height:45%}[flex-sm="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex-sm="50"]{max-width:50%}[layout=column]>[flex-sm="50"]{max-height:50%}[flex-sm="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex-sm="55"]{max-width:55%}[layout=column]>[flex-sm="55"]{max-height:55%}[flex-sm="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex-sm="60"]{max-width:60%}[layout=column]>[flex-sm="60"]{max-height:60%}[flex-sm="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex-sm="65"]{max-width:65%}[layout=column]>[flex-sm="65"]{max-height:65%}[flex-sm="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex-sm="70"]{max-width:70%}[layout=column]>[flex-sm="70"]{max-height:70%}[flex-sm="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex-sm="75"]{max-width:75%}[layout=column]>[flex-sm="75"]{max-height:75%}[flex-sm="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex-sm="80"]{max-width:80%}[layout=column]>[flex-sm="80"]{max-height:80%}[flex-sm="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex-sm="85"]{max-width:85%}[layout=column]>[flex-sm="85"]{max-height:85%}[flex-sm="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex-sm="90"]{max-width:90%}[layout=column]>[flex-sm="90"]{max-height:90%}[flex-sm="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex-sm="95"]{max-width:95%}[layout=column]>[flex-sm="95"]{max-height:95%}[flex-sm="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex-sm="100"]{max-width:100%}[layout=column]>[flex-sm="100"]{max-height:100%}[flex-sm="33"],[flex-sm="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex-sm="66"],[flex-sm="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex-sm="33"],[layout=row]>[flex-sm="34"]{max-width:33.33%}[layout=row]>[flex-sm="66"],[layout=row]>[flex-sm="67"]{max-width:66.66%}[layout=column]>[flex-sm="33"],[layout=column]>[flex-sm="34"]{max-height:33.33%}[layout=column]>[flex-sm="66"],[layout=column]>[flex-sm="67"]{max-height:66.66%}}@media (min-width:600px){[flex-order-gt-sm="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order-gt-sm="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order-gt-sm="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order-gt-sm="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order-gt-sm="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order-gt-sm="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order-gt-sm="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order-gt-sm="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order-gt-sm="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order-gt-sm="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[layout-align-gt-sm=center],[layout-align-gt-sm="center center"],[layout-align-gt-sm="center start"],[layout-align-gt-sm="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align-gt-sm=end],[layout-align-gt-sm="end center"],[layout-align-gt-sm="end start"],[layout-align-gt-sm="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align-gt-sm=space-around],[layout-align-gt-sm="space-around center"],[layout-align-gt-sm="space-around start"],[layout-align-gt-sm="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align-gt-sm=space-between],[layout-align-gt-sm="space-between center"],[layout-align-gt-sm="space-between start"],[layout-align-gt-sm="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align-gt-sm="center center"],[layout-align-gt-sm="end center"],[layout-align-gt-sm="space-around center"],[layout-align-gt-sm="space-between center"],[layout-align-gt-sm="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align-gt-sm="center start"],[layout-align-gt-sm="end start"],[layout-align-gt-sm="space-around start"],[layout-align-gt-sm="space-between start"],[layout-align-gt-sm="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align-gt-sm="center end"],[layout-align-gt-sm="end end"],[layout-align-gt-sm="space-around end"],[layout-align-gt-sm="space-between end"],[layout-align-gt-sm="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[layout-gt-sm]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout-gt-sm=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout-gt-sm=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[offset-gt-sm="5"]{margin-left:5%}[offset-gt-sm="10"]{margin-left:10%}[offset-gt-sm="15"]{margin-left:15%}[offset-gt-sm="20"]{margin-left:20%}[offset-gt-sm="25"]{margin-left:25%}[offset-gt-sm="30"]{margin-left:30%}[offset-gt-sm="35"]{margin-left:35%}[offset-gt-sm="40"]{margin-left:40%}[offset-gt-sm="45"]{margin-left:45%}[offset-gt-sm="50"]{margin-left:50%}[offset-gt-sm="55"]{margin-left:55%}[offset-gt-sm="60"]{margin-left:60%}[offset-gt-sm="65"]{margin-left:65%}[offset-gt-sm="70"]{margin-left:70%}[offset-gt-sm="75"]{margin-left:75%}[offset-gt-sm="80"]{margin-left:80%}[offset-gt-sm="85"]{margin-left:85%}[offset-gt-sm="90"]{margin-left:90%}[offset-gt-sm="95"]{margin-left:95%}[offset-gt-sm="33"],[offset-gt-sm="34"]{margin-left:33.33%}[offset-gt-sm="66"],[offset-gt-sm="67"]{margin-left:66.66%}[flex-gt-sm]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex-gt-sm="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex-gt-sm="0"]{max-width:0}[layout=column]>[flex-gt-sm="0"]{max-height:0}[flex-gt-sm="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex-gt-sm="5"]{max-width:5%}[layout=column]>[flex-gt-sm="5"]{max-height:5%}[flex-gt-sm="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex-gt-sm="10"]{max-width:10%}[layout=column]>[flex-gt-sm="10"]{max-height:10%}[flex-gt-sm="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex-gt-sm="15"]{max-width:15%}[layout=column]>[flex-gt-sm="15"]{max-height:15%}[flex-gt-sm="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex-gt-sm="20"]{max-width:20%}[layout=column]>[flex-gt-sm="20"]{max-height:20%}[flex-gt-sm="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex-gt-sm="25"]{max-width:25%}[layout=column]>[flex-gt-sm="25"]{max-height:25%}[flex-gt-sm="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex-gt-sm="30"]{max-width:30%}[layout=column]>[flex-gt-sm="30"]{max-height:30%}[flex-gt-sm="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex-gt-sm="35"]{max-width:35%}[layout=column]>[flex-gt-sm="35"]{max-height:35%}[flex-gt-sm="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex-gt-sm="40"]{max-width:40%}[layout=column]>[flex-gt-sm="40"]{max-height:40%}[flex-gt-sm="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex-gt-sm="45"]{max-width:45%}[layout=column]>[flex-gt-sm="45"]{max-height:45%}[flex-gt-sm="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex-gt-sm="50"]{max-width:50%}[layout=column]>[flex-gt-sm="50"]{max-height:50%}[flex-gt-sm="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex-gt-sm="55"]{max-width:55%}[layout=column]>[flex-gt-sm="55"]{max-height:55%}[flex-gt-sm="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex-gt-sm="60"]{max-width:60%}[layout=column]>[flex-gt-sm="60"]{max-height:60%}[flex-gt-sm="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex-gt-sm="65"]{max-width:65%}[layout=column]>[flex-gt-sm="65"]{max-height:65%}[flex-gt-sm="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex-gt-sm="70"]{max-width:70%}[layout=column]>[flex-gt-sm="70"]{max-height:70%}[flex-gt-sm="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex-gt-sm="75"]{max-width:75%}[layout=column]>[flex-gt-sm="75"]{max-height:75%}[flex-gt-sm="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex-gt-sm="80"]{max-width:80%}[layout=column]>[flex-gt-sm="80"]{max-height:80%}[flex-gt-sm="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex-gt-sm="85"]{max-width:85%}[layout=column]>[flex-gt-sm="85"]{max-height:85%}[flex-gt-sm="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex-gt-sm="90"]{max-width:90%}[layout=column]>[flex-gt-sm="90"]{max-height:90%}[flex-gt-sm="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex-gt-sm="95"]{max-width:95%}[layout=column]>[flex-gt-sm="95"]{max-height:95%}[flex-gt-sm="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex-gt-sm="100"]{max-width:100%}[layout=column]>[flex-gt-sm="100"]{max-height:100%}[flex-gt-sm="33"],[flex-gt-sm="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex-gt-sm="66"],[flex-gt-sm="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex-gt-sm="33"],[layout=row]>[flex-gt-sm="34"]{max-width:33.33%}[layout=row]>[flex-gt-sm="66"],[layout=row]>[flex-gt-sm="67"]{max-width:66.66%}[layout=column]>[flex-gt-sm="33"],[layout=column]>[flex-gt-sm="34"]{max-height:33.33%}[layout=column]>[flex-gt-sm="66"],[layout=column]>[flex-gt-sm="67"]{max-height:66.66%}}@media (min-width:600px) and (max-width:959px){[hide-gt-sm]:not([show-gt-sm]):not([show-md]):not([show]),[hide-md]:not([show-md]):not([show]),[hide]:not([show-gt-sm]):not([show-md]):not([show]){display:none}[flex-order-md="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order-md="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order-md="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order-md="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order-md="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order-md="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order-md="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order-md="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order-md="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order-md="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[layout-align-md=center],[layout-align-md="center center"],[layout-align-md="center start"],[layout-align-md="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align-md=end],[layout-align-md="end center"],[layout-align-md="end start"],[layout-align-md="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align-md=space-around],[layout-align-md="space-around center"],[layout-align-md="space-around start"],[layout-align-md="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align-md=space-between],[layout-align-md="space-between center"],[layout-align-md="space-between start"],[layout-align-md="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align-md="center center"],[layout-align-md="end center"],[layout-align-md="space-around center"],[layout-align-md="space-between center"],[layout-align-md="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align-md="center start"],[layout-align-md="end start"],[layout-align-md="space-around start"],[layout-align-md="space-between start"],[layout-align-md="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align-md="center end"],[layout-align-md="end end"],[layout-align-md="space-around end"],[layout-align-md="space-between end"],[layout-align-md="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[layout-md]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout-md=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout-md=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[offset-md="5"]{margin-left:5%}[offset-md="10"]{margin-left:10%}[offset-md="15"]{margin-left:15%}[offset-md="20"]{margin-left:20%}[offset-md="25"]{margin-left:25%}[offset-md="30"]{margin-left:30%}[offset-md="35"]{margin-left:35%}[offset-md="40"]{margin-left:40%}[offset-md="45"]{margin-left:45%}[offset-md="50"]{margin-left:50%}[offset-md="55"]{margin-left:55%}[offset-md="60"]{margin-left:60%}[offset-md="65"]{margin-left:65%}[offset-md="70"]{margin-left:70%}[offset-md="75"]{margin-left:75%}[offset-md="80"]{margin-left:80%}[offset-md="85"]{margin-left:85%}[offset-md="90"]{margin-left:90%}[offset-md="95"]{margin-left:95%}[offset-md="33"],[offset-md="34"]{margin-left:33.33%}[offset-md="66"],[offset-md="67"]{margin-left:66.66%}[flex-md]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex-md="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex-md="0"]{max-width:0}[layout=column]>[flex-md="0"]{max-height:0}[flex-md="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex-md="5"]{max-width:5%}[layout=column]>[flex-md="5"]{max-height:5%}[flex-md="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex-md="10"]{max-width:10%}[layout=column]>[flex-md="10"]{max-height:10%}[flex-md="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex-md="15"]{max-width:15%}[layout=column]>[flex-md="15"]{max-height:15%}[flex-md="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex-md="20"]{max-width:20%}[layout=column]>[flex-md="20"]{max-height:20%}[flex-md="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex-md="25"]{max-width:25%}[layout=column]>[flex-md="25"]{max-height:25%}[flex-md="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex-md="30"]{max-width:30%}[layout=column]>[flex-md="30"]{max-height:30%}[flex-md="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex-md="35"]{max-width:35%}[layout=column]>[flex-md="35"]{max-height:35%}[flex-md="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex-md="40"]{max-width:40%}[layout=column]>[flex-md="40"]{max-height:40%}[flex-md="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex-md="45"]{max-width:45%}[layout=column]>[flex-md="45"]{max-height:45%}[flex-md="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex-md="50"]{max-width:50%}[layout=column]>[flex-md="50"]{max-height:50%}[flex-md="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex-md="55"]{max-width:55%}[layout=column]>[flex-md="55"]{max-height:55%}[flex-md="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex-md="60"]{max-width:60%}[layout=column]>[flex-md="60"]{max-height:60%}[flex-md="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex-md="65"]{max-width:65%}[layout=column]>[flex-md="65"]{max-height:65%}[flex-md="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex-md="70"]{max-width:70%}[layout=column]>[flex-md="70"]{max-height:70%}[flex-md="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex-md="75"]{max-width:75%}[layout=column]>[flex-md="75"]{max-height:75%}[flex-md="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex-md="80"]{max-width:80%}[layout=column]>[flex-md="80"]{max-height:80%}[flex-md="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex-md="85"]{max-width:85%}[layout=column]>[flex-md="85"]{max-height:85%}[flex-md="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex-md="90"]{max-width:90%}[layout=column]>[flex-md="90"]{max-height:90%}[flex-md="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex-md="95"]{max-width:95%}[layout=column]>[flex-md="95"]{max-height:95%}[flex-md="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex-md="100"]{max-width:100%}[layout=column]>[flex-md="100"]{max-height:100%}[flex-md="33"],[flex-md="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex-md="66"],[flex-md="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex-md="33"],[layout=row]>[flex-md="34"]{max-width:33.33%}[layout=row]>[flex-md="66"],[layout=row]>[flex-md="67"]{max-width:66.66%}[layout=column]>[flex-md="33"],[layout=column]>[flex-md="34"]{max-height:33.33%}[layout=column]>[flex-md="66"],[layout=column]>[flex-md="67"]{max-height:66.66%}}@media (min-width:960px){[flex-order-gt-md="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order-gt-md="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order-gt-md="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order-gt-md="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order-gt-md="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order-gt-md="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order-gt-md="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order-gt-md="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order-gt-md="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order-gt-md="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[layout-align-gt-md=center],[layout-align-gt-md="center center"],[layout-align-gt-md="center start"],[layout-align-gt-md="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align-gt-md=end],[layout-align-gt-md="end center"],[layout-align-gt-md="end start"],[layout-align-gt-md="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align-gt-md=space-around],[layout-align-gt-md="space-around center"],[layout-align-gt-md="space-around start"],[layout-align-gt-md="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align-gt-md=space-between],[layout-align-gt-md="space-between center"],[layout-align-gt-md="space-between start"],[layout-align-gt-md="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align-gt-md="center center"],[layout-align-gt-md="end center"],[layout-align-gt-md="space-around center"],[layout-align-gt-md="space-between center"],[layout-align-gt-md="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align-gt-md="center start"],[layout-align-gt-md="end start"],[layout-align-gt-md="space-around start"],[layout-align-gt-md="space-between start"],[layout-align-gt-md="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align-gt-md="center end"],[layout-align-gt-md="end end"],[layout-align-gt-md="space-around end"],[layout-align-gt-md="space-between end"],[layout-align-gt-md="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[layout-gt-md]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout-gt-md=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout-gt-md=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[offset-gt-md="5"]{margin-left:5%}[offset-gt-md="10"]{margin-left:10%}[offset-gt-md="15"]{margin-left:15%}[offset-gt-md="20"]{margin-left:20%}[offset-gt-md="25"]{margin-left:25%}[offset-gt-md="30"]{margin-left:30%}[offset-gt-md="35"]{margin-left:35%}[offset-gt-md="40"]{margin-left:40%}[offset-gt-md="45"]{margin-left:45%}[offset-gt-md="50"]{margin-left:50%}[offset-gt-md="55"]{margin-left:55%}[offset-gt-md="60"]{margin-left:60%}[offset-gt-md="65"]{margin-left:65%}[offset-gt-md="70"]{margin-left:70%}[offset-gt-md="75"]{margin-left:75%}[offset-gt-md="80"]{margin-left:80%}[offset-gt-md="85"]{margin-left:85%}[offset-gt-md="90"]{margin-left:90%}[offset-gt-md="95"]{margin-left:95%}[offset-gt-md="33"],[offset-gt-md="34"]{margin-left:33.33%}[offset-gt-md="66"],[offset-gt-md="67"]{margin-left:66.66%}[flex-gt-md]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex-gt-md="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex-gt-md="0"]{max-width:0}[layout=column]>[flex-gt-md="0"]{max-height:0}[flex-gt-md="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex-gt-md="5"]{max-width:5%}[layout=column]>[flex-gt-md="5"]{max-height:5%}[flex-gt-md="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex-gt-md="10"]{max-width:10%}[layout=column]>[flex-gt-md="10"]{max-height:10%}[flex-gt-md="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex-gt-md="15"]{max-width:15%}[layout=column]>[flex-gt-md="15"]{max-height:15%}[flex-gt-md="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex-gt-md="20"]{max-width:20%}[layout=column]>[flex-gt-md="20"]{max-height:20%}[flex-gt-md="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex-gt-md="25"]{max-width:25%}[layout=column]>[flex-gt-md="25"]{max-height:25%}[flex-gt-md="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex-gt-md="30"]{max-width:30%}[layout=column]>[flex-gt-md="30"]{max-height:30%}[flex-gt-md="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex-gt-md="35"]{max-width:35%}[layout=column]>[flex-gt-md="35"]{max-height:35%}[flex-gt-md="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex-gt-md="40"]{max-width:40%}[layout=column]>[flex-gt-md="40"]{max-height:40%}[flex-gt-md="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex-gt-md="45"]{max-width:45%}[layout=column]>[flex-gt-md="45"]{max-height:45%}[flex-gt-md="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex-gt-md="50"]{max-width:50%}[layout=column]>[flex-gt-md="50"]{max-height:50%}[flex-gt-md="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex-gt-md="55"]{max-width:55%}[layout=column]>[flex-gt-md="55"]{max-height:55%}[flex-gt-md="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex-gt-md="60"]{max-width:60%}[layout=column]>[flex-gt-md="60"]{max-height:60%}[flex-gt-md="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex-gt-md="65"]{max-width:65%}[layout=column]>[flex-gt-md="65"]{max-height:65%}[flex-gt-md="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex-gt-md="70"]{max-width:70%}[layout=column]>[flex-gt-md="70"]{max-height:70%}[flex-gt-md="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex-gt-md="75"]{max-width:75%}[layout=column]>[flex-gt-md="75"]{max-height:75%}[flex-gt-md="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex-gt-md="80"]{max-width:80%}[layout=column]>[flex-gt-md="80"]{max-height:80%}[flex-gt-md="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex-gt-md="85"]{max-width:85%}[layout=column]>[flex-gt-md="85"]{max-height:85%}[flex-gt-md="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex-gt-md="90"]{max-width:90%}[layout=column]>[flex-gt-md="90"]{max-height:90%}[flex-gt-md="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex-gt-md="95"]{max-width:95%}[layout=column]>[flex-gt-md="95"]{max-height:95%}[flex-gt-md="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex-gt-md="100"]{max-width:100%}[layout=column]>[flex-gt-md="100"]{max-height:100%}[flex-gt-md="33"],[flex-gt-md="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex-gt-md="66"],[flex-gt-md="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex-gt-md="33"],[layout=row]>[flex-gt-md="34"]{max-width:33.33%}[layout=row]>[flex-gt-md="66"],[layout=row]>[flex-gt-md="67"]{max-width:66.66%}[layout=column]>[flex-gt-md="33"],[layout=column]>[flex-gt-md="34"]{max-height:33.33%}[layout=column]>[flex-gt-md="66"],[layout=column]>[flex-gt-md="67"]{max-height:66.66%}}@media (min-width:960px) and (max-width:1199px){[hide-gt-md]:not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]),[hide-gt-sm]:not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]),[hide-lg]:not([show-lg]):not([show]),[hide]:not([show-gt-sm]):not([show-gt-md]):not([show-lg]):not([show]){display:none}[flex-order-lg="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order-lg="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order-lg="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order-lg="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order-lg="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order-lg="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order-lg="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order-lg="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order-lg="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order-lg="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[layout-align-lg=center],[layout-align-lg="center center"],[layout-align-lg="center start"],[layout-align-lg="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align-lg=end],[layout-align-lg="end center"],[layout-align-lg="end start"],[layout-align-lg="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align-lg=space-around],[layout-align-lg="space-around center"],[layout-align-lg="space-around start"],[layout-align-lg="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align-lg=space-between],[layout-align-lg="space-between center"],[layout-align-lg="space-between start"],[layout-align-lg="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align-lg="center center"],[layout-align-lg="end center"],[layout-align-lg="space-around center"],[layout-align-lg="space-between center"],[layout-align-lg="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align-lg="center start"],[layout-align-lg="end start"],[layout-align-lg="space-around start"],[layout-align-lg="space-between start"],[layout-align-lg="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align-lg="center end"],[layout-align-lg="end end"],[layout-align-lg="space-around end"],[layout-align-lg="space-between end"],[layout-align-lg="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[layout-lg]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout-lg=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout-lg=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[offset-lg="5"]{margin-left:5%}[offset-lg="10"]{margin-left:10%}[offset-lg="15"]{margin-left:15%}[offset-lg="20"]{margin-left:20%}[offset-lg="25"]{margin-left:25%}[offset-lg="30"]{margin-left:30%}[offset-lg="35"]{margin-left:35%}[offset-lg="40"]{margin-left:40%}[offset-lg="45"]{margin-left:45%}[offset-lg="50"]{margin-left:50%}[offset-lg="55"]{margin-left:55%}[offset-lg="60"]{margin-left:60%}[offset-lg="65"]{margin-left:65%}[offset-lg="70"]{margin-left:70%}[offset-lg="75"]{margin-left:75%}[offset-lg="80"]{margin-left:80%}[offset-lg="85"]{margin-left:85%}[offset-lg="90"]{margin-left:90%}[offset-lg="95"]{margin-left:95%}[offset-lg="33"],[offset-lg="34"]{margin-left:33.33%}[offset-lg="66"],[offset-lg="67"]{margin-left:66.66%}[flex-lg]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex-lg="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex-lg="0"]{max-width:0}[layout=column]>[flex-lg="0"]{max-height:0}[flex-lg="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex-lg="5"]{max-width:5%}[layout=column]>[flex-lg="5"]{max-height:5%}[flex-lg="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex-lg="10"]{max-width:10%}[layout=column]>[flex-lg="10"]{max-height:10%}[flex-lg="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex-lg="15"]{max-width:15%}[layout=column]>[flex-lg="15"]{max-height:15%}[flex-lg="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex-lg="20"]{max-width:20%}[layout=column]>[flex-lg="20"]{max-height:20%}[flex-lg="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex-lg="25"]{max-width:25%}[layout=column]>[flex-lg="25"]{max-height:25%}[flex-lg="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex-lg="30"]{max-width:30%}[layout=column]>[flex-lg="30"]{max-height:30%}[flex-lg="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex-lg="35"]{max-width:35%}[layout=column]>[flex-lg="35"]{max-height:35%}[flex-lg="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex-lg="40"]{max-width:40%}[layout=column]>[flex-lg="40"]{max-height:40%}[flex-lg="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex-lg="45"]{max-width:45%}[layout=column]>[flex-lg="45"]{max-height:45%}[flex-lg="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex-lg="50"]{max-width:50%}[layout=column]>[flex-lg="50"]{max-height:50%}[flex-lg="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex-lg="55"]{max-width:55%}[layout=column]>[flex-lg="55"]{max-height:55%}[flex-lg="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex-lg="60"]{max-width:60%}[layout=column]>[flex-lg="60"]{max-height:60%}[flex-lg="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex-lg="65"]{max-width:65%}[layout=column]>[flex-lg="65"]{max-height:65%}[flex-lg="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex-lg="70"]{max-width:70%}[layout=column]>[flex-lg="70"]{max-height:70%}[flex-lg="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex-lg="75"]{max-width:75%}[layout=column]>[flex-lg="75"]{max-height:75%}[flex-lg="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex-lg="80"]{max-width:80%}[layout=column]>[flex-lg="80"]{max-height:80%}[flex-lg="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex-lg="85"]{max-width:85%}[layout=column]>[flex-lg="85"]{max-height:85%}[flex-lg="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex-lg="90"]{max-width:90%}[layout=column]>[flex-lg="90"]{max-height:90%}[flex-lg="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex-lg="95"]{max-width:95%}[layout=column]>[flex-lg="95"]{max-height:95%}[flex-lg="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex-lg="100"]{max-width:100%}[layout=column]>[flex-lg="100"]{max-height:100%}[flex-lg="33"],[flex-lg="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex-lg="66"],[flex-lg="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex-lg="33"],[layout=row]>[flex-lg="34"]{max-width:33.33%}[layout=row]>[flex-lg="66"],[layout=row]>[flex-lg="67"]{max-width:66.66%}[layout=column]>[flex-lg="33"],[layout=column]>[flex-lg="34"]{max-height:33.33%}[layout=column]>[flex-lg="66"],[layout=column]>[flex-lg="67"]{max-height:66.66%}}@media (min-width:1200px){[hide-gt-lg]:not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show]),[hide-gt-md]:not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show]),[hide-gt-sm]:not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show]),[hide]:not([show-gt-sm]):not([show-gt-md]):not([show-gt-lg]):not([show]){display:none}[flex-order-gt-lg="0"]{-webkit-order:0;-ms-flex-order:0;order:0}[flex-order-gt-lg="1"]{-webkit-order:1;-ms-flex-order:1;order:1}[flex-order-gt-lg="2"]{-webkit-order:2;-ms-flex-order:2;order:2}[flex-order-gt-lg="3"]{-webkit-order:3;-ms-flex-order:3;order:3}[flex-order-gt-lg="4"]{-webkit-order:4;-ms-flex-order:4;order:4}[flex-order-gt-lg="5"]{-webkit-order:5;-ms-flex-order:5;order:5}[flex-order-gt-lg="6"]{-webkit-order:6;-ms-flex-order:6;order:6}[flex-order-gt-lg="7"]{-webkit-order:7;-ms-flex-order:7;order:7}[flex-order-gt-lg="8"]{-webkit-order:8;-ms-flex-order:8;order:8}[flex-order-gt-lg="9"]{-webkit-order:9;-ms-flex-order:9;order:9}[layout-align-gt-lg=center],[layout-align-gt-lg="center center"],[layout-align-gt-lg="center start"],[layout-align-gt-lg="center end"]{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[layout-align-gt-lg=end],[layout-align-gt-lg="end center"],[layout-align-gt-lg="end start"],[layout-align-gt-lg="end end"]{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[layout-align-gt-lg=space-around],[layout-align-gt-lg="space-around center"],[layout-align-gt-lg="space-around start"],[layout-align-gt-lg="space-around end"]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}[layout-align-gt-lg=space-between],[layout-align-gt-lg="space-between center"],[layout-align-gt-lg="space-between start"],[layout-align-gt-lg="space-between end"]{-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}[layout-align-gt-lg="center center"],[layout-align-gt-lg="end center"],[layout-align-gt-lg="space-around center"],[layout-align-gt-lg="space-between center"],[layout-align-gt-lg="start center"]{-webkit-align-items:center;-ms-flex-align:center;align-items:center}[layout-align-gt-lg="center start"],[layout-align-gt-lg="end start"],[layout-align-gt-lg="space-around start"],[layout-align-gt-lg="space-between start"],[layout-align-gt-lg="start start"]{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[layout-align-gt-lg="center end"],[layout-align-gt-lg="end end"],[layout-align-gt-lg="space-around end"],[layout-align-gt-lg="space-between end"],[layout-align-gt-lg="start end"]{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[layout-gt-lg]{box-sizing:border-box;display:-webkit-flex;display:-moz-flex;display:-ms-flexbox;display:flex}[layout-gt-lg=column]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}[layout-gt-lg=row]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}[offset-gt-lg="5"]{margin-left:5%}[offset-gt-lg="10"]{margin-left:10%}[offset-gt-lg="15"]{margin-left:15%}[offset-gt-lg="20"]{margin-left:20%}[offset-gt-lg="25"]{margin-left:25%}[offset-gt-lg="30"]{margin-left:30%}[offset-gt-lg="35"]{margin-left:35%}[offset-gt-lg="40"]{margin-left:40%}[offset-gt-lg="45"]{margin-left:45%}[offset-gt-lg="50"]{margin-left:50%}[offset-gt-lg="55"]{margin-left:55%}[offset-gt-lg="60"]{margin-left:60%}[offset-gt-lg="65"]{margin-left:65%}[offset-gt-lg="70"]{margin-left:70%}[offset-gt-lg="75"]{margin-left:75%}[offset-gt-lg="80"]{margin-left:80%}[offset-gt-lg="85"]{margin-left:85%}[offset-gt-lg="90"]{margin-left:90%}[offset-gt-lg="95"]{margin-left:95%}[offset-gt-lg="33"],[offset-gt-lg="34"]{margin-left:33.33%}[offset-gt-lg="66"],[offset-gt-lg="67"]{margin-left:66.66%}[flex-gt-lg]{box-sizing:border-box;-webkit-flex:1;-ms-flex:1;flex:1}[flex-gt-lg="0"]{-webkit-flex:0 0 0;-ms-flex:0 0 0;flex:0 0 0}[layout=row]>[flex-gt-lg="0"]{max-width:0}[layout=column]>[flex-gt-lg="0"]{max-height:0}[flex-gt-lg="5"]{-webkit-flex:0 0 5%;-ms-flex:0 0 5%;flex:0 0 5%}[layout=row]>[flex-gt-lg="5"]{max-width:5%}[layout=column]>[flex-gt-lg="5"]{max-height:5%}[flex-gt-lg="10"]{-webkit-flex:0 0 10%;-ms-flex:0 0 10%;flex:0 0 10%}[layout=row]>[flex-gt-lg="10"]{max-width:10%}[layout=column]>[flex-gt-lg="10"]{max-height:10%}[flex-gt-lg="15"]{-webkit-flex:0 0 15%;-ms-flex:0 0 15%;flex:0 0 15%}[layout=row]>[flex-gt-lg="15"]{max-width:15%}[layout=column]>[flex-gt-lg="15"]{max-height:15%}[flex-gt-lg="20"]{-webkit-flex:0 0 20%;-ms-flex:0 0 20%;flex:0 0 20%}[layout=row]>[flex-gt-lg="20"]{max-width:20%}[layout=column]>[flex-gt-lg="20"]{max-height:20%}[flex-gt-lg="25"]{-webkit-flex:0 0 25%;-ms-flex:0 0 25%;flex:0 0 25%}[layout=row]>[flex-gt-lg="25"]{max-width:25%}[layout=column]>[flex-gt-lg="25"]{max-height:25%}[flex-gt-lg="30"]{-webkit-flex:0 0 30%;-ms-flex:0 0 30%;flex:0 0 30%}[layout=row]>[flex-gt-lg="30"]{max-width:30%}[layout=column]>[flex-gt-lg="30"]{max-height:30%}[flex-gt-lg="35"]{-webkit-flex:0 0 35%;-ms-flex:0 0 35%;flex:0 0 35%}[layout=row]>[flex-gt-lg="35"]{max-width:35%}[layout=column]>[flex-gt-lg="35"]{max-height:35%}[flex-gt-lg="40"]{-webkit-flex:0 0 40%;-ms-flex:0 0 40%;flex:0 0 40%}[layout=row]>[flex-gt-lg="40"]{max-width:40%}[layout=column]>[flex-gt-lg="40"]{max-height:40%}[flex-gt-lg="45"]{-webkit-flex:0 0 45%;-ms-flex:0 0 45%;flex:0 0 45%}[layout=row]>[flex-gt-lg="45"]{max-width:45%}[layout=column]>[flex-gt-lg="45"]{max-height:45%}[flex-gt-lg="50"]{-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%}[layout=row]>[flex-gt-lg="50"]{max-width:50%}[layout=column]>[flex-gt-lg="50"]{max-height:50%}[flex-gt-lg="55"]{-webkit-flex:0 0 55%;-ms-flex:0 0 55%;flex:0 0 55%}[layout=row]>[flex-gt-lg="55"]{max-width:55%}[layout=column]>[flex-gt-lg="55"]{max-height:55%}[flex-gt-lg="60"]{-webkit-flex:0 0 60%;-ms-flex:0 0 60%;flex:0 0 60%}[layout=row]>[flex-gt-lg="60"]{max-width:60%}[layout=column]>[flex-gt-lg="60"]{max-height:60%}[flex-gt-lg="65"]{-webkit-flex:0 0 65%;-ms-flex:0 0 65%;flex:0 0 65%}[layout=row]>[flex-gt-lg="65"]{max-width:65%}[layout=column]>[flex-gt-lg="65"]{max-height:65%}[flex-gt-lg="70"]{-webkit-flex:0 0 70%;-ms-flex:0 0 70%;flex:0 0 70%}[layout=row]>[flex-gt-lg="70"]{max-width:70%}[layout=column]>[flex-gt-lg="70"]{max-height:70%}[flex-gt-lg="75"]{-webkit-flex:0 0 75%;-ms-flex:0 0 75%;flex:0 0 75%}[layout=row]>[flex-gt-lg="75"]{max-width:75%}[layout=column]>[flex-gt-lg="75"]{max-height:75%}[flex-gt-lg="80"]{-webkit-flex:0 0 80%;-ms-flex:0 0 80%;flex:0 0 80%}[layout=row]>[flex-gt-lg="80"]{max-width:80%}[layout=column]>[flex-gt-lg="80"]{max-height:80%}[flex-gt-lg="85"]{-webkit-flex:0 0 85%;-ms-flex:0 0 85%;flex:0 0 85%}[layout=row]>[flex-gt-lg="85"]{max-width:85%}[layout=column]>[flex-gt-lg="85"]{max-height:85%}[flex-gt-lg="90"]{-webkit-flex:0 0 90%;-ms-flex:0 0 90%;flex:0 0 90%}[layout=row]>[flex-gt-lg="90"]{max-width:90%}[layout=column]>[flex-gt-lg="90"]{max-height:90%}[flex-gt-lg="95"]{-webkit-flex:0 0 95%;-ms-flex:0 0 95%;flex:0 0 95%}[layout=row]>[flex-gt-lg="95"]{max-width:95%}[layout=column]>[flex-gt-lg="95"]{max-height:95%}[flex-gt-lg="100"]{-webkit-flex:0 0 100%;-ms-flex:0 0 100%;flex:0 0 100%}[layout=row]>[flex-gt-lg="100"]{max-width:100%}[layout=column]>[flex-gt-lg="100"]{max-height:100%}[flex-gt-lg="33"],[flex-gt-lg="34"]{-webkit-flex:0 0 33.33%;-ms-flex:0 0 33.33%;flex:0 0 33.33%}[flex-gt-lg="66"],[flex-gt-lg="67"]{-webkit-flex:0 0 66.66%;-ms-flex:0 0 66.66%;flex:0 0 66.66%}[layout=row]>[flex-gt-lg="33"],[layout=row]>[flex-gt-lg="34"]{max-width:33.33%}[layout=row]>[flex-gt-lg="66"],[layout=row]>[flex-gt-lg="67"]{max-width:66.66%}[layout=column]>[flex-gt-lg="33"],[layout=column]>[flex-gt-lg="34"]{max-height:33.33%}[layout=column]>[flex-gt-lg="66"],[layout=column]>[flex-gt-lg="67"]{max-height:66.66%}}@-webkit-keyframes md-autocomplete-list-out{0%{-webkit-animation-timing-function:linear;animation-timing-function:linear}50%{opacity:0;height:40px;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{height:0;opacity:0}}@keyframes md-autocomplete-list-out{0%{-webkit-animation-timing-function:linear;animation-timing-function:linear}50%{opacity:0;height:40px;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{height:0;opacity:0}}@-webkit-keyframes md-autocomplete-list-in{0%{opacity:0;height:0;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{opacity:0;height:40px}100%{opacity:1;height:40px}}@keyframes md-autocomplete-list-in{0%{opacity:0;height:0;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{opacity:0;height:40px}100%{opacity:1;height:40px}}md-autocomplete{border-radius:2px;display:block;height:40px;position:relative;overflow:visible;min-width:190px}md-autocomplete[disabled] input{cursor:not-allowed}md-autocomplete[md-floating-label]{padding-bottom:26px;border-radius:0;background:0 0;height:auto}md-autocomplete[md-floating-label] md-input-container{padding-bottom:0}md-autocomplete[md-floating-label] md-autocomplete-wrap{height:auto}md-autocomplete[md-floating-label] button{position:absolute;top:auto;bottom:0;right:0;width:30px;height:30px}md-autocomplete md-autocomplete-wrap{display:block;position:relative;overflow:visible;height:40px}md-autocomplete md-autocomplete-wrap md-progress-linear[md-mode=indeterminate]{position:absolute;bottom:0;left:0;width:100%;height:3px;transition:none}md-autocomplete md-autocomplete-wrap md-progress-linear[md-mode=indeterminate] .md-container{transition:none;top:auto;height:3px}md-autocomplete md-autocomplete-wrap md-progress-linear[md-mode=indeterminate].ng-enter{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear[md-mode=indeterminate].ng-enter.ng-enter-active{opacity:1}md-autocomplete md-autocomplete-wrap md-progress-linear[md-mode=indeterminate].ng-leave{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear[md-mode=indeterminate].ng-leave.ng-leave-active{opacity:0}md-autocomplete input:not(.md-input){width:100%;box-sizing:border-box;border:none;box-shadow:none;padding:0 15px;font-size:14px;line-height:40px;height:40px;outline:0;background:0 0}md-autocomplete input:not(.md-input)::-ms-clear{display:none}md-autocomplete button{position:relative;line-height:20px;text-align:center;width:30px;height:30px;cursor:pointer;border:none;border-radius:50%;padding:0;font-size:12px;background:0 0;margin:auto 5px}md-autocomplete button:after{content:'';position:absolute;top:-6px;right:-6px;bottom:-6px;left:-6px;border-radius:50%;-webkit-transform:scale(0);transform:scale(0);opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-autocomplete button:focus{outline:0}md-autocomplete button:focus:after{-webkit-transform:scale(1);transform:scale(1);opacity:1}md-autocomplete button md-icon{position:absolute;top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)}md-autocomplete button md-icon path{stroke-width:0}md-autocomplete button.ng-enter{-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .15s ease-out;transition:transform .15s ease-out}md-autocomplete button.ng-enter.ng-enter-active{-webkit-transform:scale(1);transform:scale(1)}md-autocomplete button.ng-leave{transition:-webkit-transform .15s ease-out;transition:transform .15s ease-out}md-autocomplete button.ng-leave.ng-leave-active{-webkit-transform:scale(0);transform:scale(0)}@media screen and (-ms-high-contrast:active){md-autocomplete input{border:1px solid #fff}md-autocomplete li:focus{color:#fff}}.md-autocomplete-suggestions{position:absolute;margin:0;list-style:none;padding:0;overflow:auto;max-height:225.5px;z-index:100}.md-autocomplete-suggestions li{cursor:pointer;font-size:14px;overflow:hidden;padding:0 15px;line-height:48px;height:48px;transition:background .15s linear;margin:0;white-space:nowrap;text-overflow:ellipsis}.md-autocomplete-suggestions li.ng-enter,.md-autocomplete-suggestions li.ng-hide-remove{transition:none;-webkit-animation:md-autocomplete-list-in .2s;animation:md-autocomplete-list-in .2s}.md-autocomplete-suggestions li.ng-hide-add,.md-autocomplete-suggestions li.ng-leave{transition:none;-webkit-animation:md-autocomplete-list-out .2s;animation:md-autocomplete-list-out .2s}.md-autocomplete-suggestions li:focus{outline:0}@media screen and (-ms-high-contrast:active){.md-autocomplete-suggestions,md-autocomplete{border:1px solid #fff}}md-backdrop{z-index:50;background-color:transparent;position:absolute;height:100%;left:0;right:0}md-backdrop.md-select-backdrop{z-index:81}md-backdrop.md-dialog-backdrop{z-index:79}md-backdrop.md-bottom-sheet-backdrop{z-index:69}md-backdrop.md-sidenav-backdrop{z-index:59}md-backdrop.md-click-catcher{top:0;position:fixed}md-backdrop.ng-enter{-webkit-animation:cubic-bezier(.25,.8,.25,1) mdBackdropFadeIn .5s both;animation:cubic-bezier(.25,.8,.25,1) mdBackdropFadeIn .5s both}md-backdrop.ng-leave{-webkit-animation:cubic-bezier(.55,0,.55,.2) mdBackdropFadeOut .2s both;animation:cubic-bezier(.55,0,.55,.2) mdBackdropFadeOut .2s both}@-webkit-keyframes mdBackdropFadeIn{from{opacity:0}to{opacity:1}}@keyframes mdBackdropFadeIn{from{opacity:0}to{opacity:1}}@-webkit-keyframes mdBackdropFadeOut{from{opacity:1}to{opacity:0}}@keyframes mdBackdropFadeOut{from{opacity:1}to{opacity:0}}.md-button{box-sizing:border-box;color:currentColor;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;outline:0;border:0;display:inline-table;padding:0 6px;margin:6px 8px;line-height:36px;min-height:36px;background:0 0;white-space:nowrap;min-width:88px;text-align:center;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;cursor:pointer;overflow:hidden;transition:box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.md-button *,.md-button :after,.md-button :before{box-sizing:border-box}.md-button:focus{outline:0}.md-button:focus,.md-button:hover{text-decoration:none}.md-button.ng-hide,.md-button.ng-leave{transition:none}.md-button.md-cornered{border-radius:0}.md-button.md-icon{padding:0;background:0 0}.md-button.md-icon-button{margin:0 6px;height:48px;min-width:0;line-height:48px;padding-left:0;padding-right:0;width:48px;border-radius:50%}.md-button.md-icon-button .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab{z-index:20;line-height:56px;min-width:0;width:56px;height:56px;vertical-align:middle;border-radius:50%;background-clip:padding-box;overflow:hidden;transition:.2s linear;transition-property:background-color,box-shadow}.md-button.md-fab.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}.md-button.md-fab.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}.md-button.md-fab.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}.md-button.md-fab.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}.md-button.md-fab .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab md-icon{margin-top:0}.md-button.md-fab.md-mini{line-height:40px;width:40px;height:40px}.md-toast-open-top .md-button.md-fab-top-left,.md-toast-open-top .md-button.md-fab-top-right{-webkit-transform:translate3d(0,42px,0);transform:translate3d(0,42px,0)}.md-toast-open-top .md-button.md-fab-top-left:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-left:not([disabled]):hover,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]):hover{-webkit-transform:translate3d(0,41px,0);transform:translate3d(0,41px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left,.md-toast-open-bottom .md-button.md-fab-bottom-right{-webkit-transform:translate3d(0,-42px,0);transform:translate3d(0,-42px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):hover,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):hover{-webkit-transform:translate3d(0,-43px,0);transform:translate3d(0,-43px,0)}.md-button-group{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;width:100%}.md-button-group>.md-button{-webkit-flex:1;-ms-flex:1;flex:1;display:block;overflow:hidden;width:0;border-width:1px 0 1px 1px;border-radius:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.md-button-group>.md-button:first-child{border-radius:2px 0 0 2px}.md-button-group>.md-button:last-child{border-right-width:1px;border-radius:0 2px 2px 0}@media screen and (-ms-high-contrast:active){.md-button.md-fab,.md-button.md-raised{border:1px solid #fff}}md-bottom-sheet{position:absolute;left:0;right:0;bottom:0;padding:8px 16px 88px;z-index:70;border-top-width:1px;border-top-style:solid;-webkit-transform:translate3d(0,80px,0);transform:translate3d(0,80px,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:-webkit-transform;transition-property:transform}md-bottom-sheet.md-has-header{padding-top:0}md-bottom-sheet.ng-enter{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}md-bottom-sheet.ng-enter-active{opacity:1;display:block;-webkit-transform:translate3d(0,80px,0)!important;transform:translate3d(0,80px,0)!important}md-bottom-sheet.ng-leave-active{-webkit-transform:translate3d(0,100%,0)!important;transform:translate3d(0,100%,0)!important;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-bottom-sheet .md-subheader{background-color:transparent;font-family:RobotoDraft,Roboto,'Helvetica Neue',sans-serif;line-height:56px;padding:0;white-space:nowrap}md-bottom-sheet md-inline-icon{display:inline-block;height:24px;width:24px;fill:#444}md-bottom-sheet md-list-item{display:-webkit-flex;display:-ms-flexbox;display:flex;outline:0}md-bottom-sheet md-list-item:hover{cursor:pointer}md-bottom-sheet.md-list md-list-item{padding:0;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:48px}md-bottom-sheet.md-list md-list-item div.md-icon-container{display:inline-block;height:24px;margin-right:32px}md-bottom-sheet.md-grid{padding-left:24px;padding-right:24px;padding-top:0}md-bottom-sheet.md-grid md-list{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;transition:all .5s;-webkit-align-items:center;-ms-flex-align:center;align-items:center}md-bottom-sheet.md-grid md-list-item{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-ms-flex-align:center;align-items:center;transition:all .5s;height:96px;margin-top:8px;margin-bottom:8px}@media screen and (max-width:600px){md-bottom-sheet.md-grid md-list-item{-webkit-flex:1 1 33.33333%;-ms-flex:1 1 33.33333%;flex:1 1 33.33333%;max-width:33.33333%}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n+1){-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n){-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}}@media screen and (min-width:600px) and (max-width:960px){md-bottom-sheet.md-grid md-list-item{-webkit-flex:1 1 25%;-ms-flex:1 1 25%;flex:1 1 25%;max-width:25%}}@media screen and (min-width:960px) and (max-width:1200px){md-bottom-sheet.md-grid md-list-item{-webkit-flex:1 1 16.66667%;-ms-flex:1 1 16.66667%;flex:1 1 16.66667%;max-width:16.66667%}}@media screen and (min-width:1200px){md-bottom-sheet.md-grid md-list-item{-webkit-flex:1 1 14.28571%;-ms-flex:1 1 14.28571%;flex:1 1 14.28571%;max-width:14.28571%}}md-bottom-sheet.md-grid md-list-item .md-list-item-content{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:48px;padding-bottom:16px}md-bottom-sheet.md-grid md-list-item .md-grid-item-content{border:1px solid transparent;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:80px}md-bottom-sheet.md-grid md-list-item .md-icon-container{display:inline-block;box-sizing:border-box;height:48px;width:48px;margin:0}md-bottom-sheet.md-grid md-list-item .md-grid-text{font-weight:400;line-height:16px;font-size:13px;margin:0;white-space:nowrap;width:64px;text-align:center;text-transform:none;padding-top:8px}@media screen and (-ms-high-contrast:active){md-bottom-sheet{border:1px solid #fff}}md-card{box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin:8px;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}md-card>:not(md-card-content) img,md-card>img{width:100%}md-card md-card-content{padding:16px}md-card .md-actions{margin:0}md-card .md-actions .md-button{margin:8px 4px}md-card md-card-footer{padding:16px}@media screen and (-ms-high-contrast:active){md-card{border:1px solid #fff}}md-checkbox{box-sizing:border-box;display:block;margin:8px;white-space:nowrap;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-left:18px;padding-right:0;position:relative;line-height:26px;min-width:18px;min-height:18px}html[dir=rtl] md-checkbox{padding-left:0;padding-right:18px}md-checkbox *,md-checkbox :after,md-checkbox :before{box-sizing:border-box}md-checkbox.md-focused:not([disabled]) .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-checkbox.md-focused:not([disabled]):not(.md-checked) .md-container:before{background-color:rgba(0,0,0,.12)}md-checkbox .md-container{position:absolute;top:50%;display:inline-block;width:18px;height:18px;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;right:auto}html[dir=rtl] md-checkbox .md-container{left:auto;right:0}md-checkbox .md-container:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-checkbox .md-container:after{content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-checkbox .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-checkbox .md-icon{transition:240ms;position:absolute;top:0;left:0;width:18px;height:18px;border-width:2px;border-style:solid;border-radius:2px}md-checkbox.md-checked .md-icon{border:none}md-checkbox[disabled]{cursor:no-drop}md-checkbox.md-checked .md-icon:after{-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;left:6px;top:2px;display:table;width:6px;height:12px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox .md-label{position:relative;display:inline-block;vertical-align:middle;white-space:normal;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}md-checkbox .md-label span{margin-left:10px;margin-right:0}html[dir=rtl] md-checkbox .md-label span{margin-left:0;margin-right:10px}md-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}md-content[md-scroll-y]{overflow-y:auto;overflow-x:hidden}md-content[md-scroll-x]{overflow-x:auto;overflow-y:hidden}md-content.autoScroll{-webkit-overflow-scrolling:auto}.md-contact-chips .md-chips .md-chip{padding:0 8px 0 0}.md-contact-chips .md-chips .md-chip .md-contact-avatar{float:left}.md-contact-chips .md-chips .md-chip .md-contact-avatar img{height:32px;border-radius:16px}.md-contact-chips .md-chips .md-chip .md-contact-name{display:inline-block;height:32px;margin-left:8px}.md-contact-suggestion{height:56px}.md-contact-suggestion img{height:40px;border-radius:20px;margin-top:8px}.md-contact-suggestion .md-contact-name{margin-left:8px;width:120px}.md-contact-suggestion .md-contact-email,.md-contact-suggestion .md-contact-name{display:inline-block;overflow:hidden;text-overflow:ellipsis}.md-contact-chips-suggestions li{height:100%}.md-chips{display:block;font-family:RobotoDraft,Roboto,'Helvetica Neue',sans-serif;font-size:13px;padding:0 0 8px;vertical-align:middle;cursor:text}.md-chips:after{content:'';display:table;clear:both}.md-chips .md-chip{cursor:default;border-radius:16px;display:block;height:32px;line-height:32px;margin:8px 8px 0 0;padding:0 8px 0 12px;float:left}.md-chips .md-chip .md-chip-content{display:block;padding-right:4px;float:left;white-space:nowrap}.md-chips .md-chip .md-chip-content:focus{outline:0}.md-chips .md-chip .md-chip-remove-container{display:inline-block;margin-right:-5px}.md-chips .md-chip .md-chip-remove{text-align:center;width:32px;height:32px;min-width:0;padding:0;background:0 0;border:none;box-shadow:none;margin:0;position:relative}.md-chips .md-chip .md-chip-remove md-icon{height:18px;width:18px;position:absolute;top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.md-chips .md-chip-input-container{display:block;line-height:32px;margin:8px 8px 0 0;padding:0 8px 0 12px;float:left}.md-chips .md-chip-input-container input:not([type]),.md-chips .md-chip-input-container input[type=email],.md-chips .md-chip-input-container input[type=number],.md-chips .md-chip-input-container input[type=tel],.md-chips .md-chip-input-container input[type=url],.md-chips .md-chip-input-container input[type=text]{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:not([type]):focus,.md-chips .md-chip-input-container input[type=email]:focus,.md-chips .md-chip-input-container input[type=number]:focus,.md-chips .md-chip-input-container input[type=tel]:focus,.md-chips .md-chip-input-container input[type=url]:focus,.md-chips .md-chip-input-container input[type=text]:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{background:0 0}.md-chips .md-chip-input-container md-autocomplete md-autocomplete-wrap{box-shadow:none}.md-chips .md-chip-input-container input{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{height:32px}.md-chips .md-chip-input-container md-autocomplete{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container:not(:first-child){margin:8px 8px 0 0}.md-chips .md-chip-input-container input{background:0 0;border-width:0}.md-chips md-autocomplete button{display:none}@media screen and (-ms-high-contrast:active){.md-chip-input-container,md-chip{border:1px solid #fff}.md-chip-input-container md-autocomplete{border:none}}.md-dialog-is-showing{max-height:100%}.md-dialog-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:80}md-dialog{opacity:0;min-width:240px;max-width:80%;max-height:80%;position:relative;overflow:hidden;box-shadow:0 8px 10px -5px rgba(0,0,0,.14),0 16px 24px 2px rgba(0,0,0,.098),0 6px 30px 5px rgba(0,0,0,.084);display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}md-dialog.transition-in{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1)}md-dialog.transition-out{transition:all .4s cubic-bezier(.25,.8,.25,1);-webkit-transform:translate3d(0,100%,0) scale(.2);transform:translate3d(0,100%,0) scale(.2)}md-dialog>form{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;overflow:auto}md-dialog md-dialog-content{-webkit-order:1;-ms-flex-order:1;order:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:24px;overflow:auto;-webkit-overflow-scrolling:touch}md-dialog md-dialog-content:not([layout=row])>:first-child:not(.md-subheader){margin-top:0}md-dialog md-dialog-content:focus{outline:0}md-dialog md-dialog-content .md-subheader{margin:0}md-dialog md-dialog-content .md-subheader.sticky-clone{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}md-dialog md-dialog-content.sticky-container{padding:0}md-dialog md-dialog-content.sticky-container>div{padding:0 24px 24px}md-dialog .md-actions{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-order:2;-ms-flex-order:2;order:2;box-sizing:border-box;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;margin-bottom:0;padding-right:8px;padding-left:16px;min-height:52px}md-dialog .md-actions .md-button{margin:8px 0 8px 8px}md-dialog.md-content-overflow .md-actions{border-top-width:1px;border-top-style:solid}@media screen and (-ms-high-contrast:active){md-dialog{border:1px solid #fff}}md-divider{display:block;border-top-width:1px;border-top-style:solid;margin:0}md-divider[md-inset]{margin-left:80px}md-fab-speed-dial{position:relative;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}md-fab-speed-dial .md-css-variables{z-index:20}md-fab-speed-dial.md-is-open .md-fab-action-item{visibility:visible}md-fab-speed-dial md-fab-actions{display:-webkit-flex;display:-ms-flexbox;display:flex;height:100%}md-fab-speed-dial md-fab-actions .md-fab-action-item{visibility:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-down{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}md-fab-speed-dial.md-down md-fab-trigger{-webkit-order:1;-ms-flex-order:1;order:1}md-fab-speed-dial.md-down md-fab-actions{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-order:2;-ms-flex-order:2;order:2}md-fab-speed-dial.md-up{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}md-fab-speed-dial.md-up md-fab-trigger{-webkit-order:2;-ms-flex-order:2;order:2}md-fab-speed-dial.md-up md-fab-actions{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;-webkit-order:1;-ms-flex-order:1;order:1}md-fab-speed-dial.md-left{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}md-fab-speed-dial.md-left md-fab-trigger{-webkit-order:2;-ms-flex-order:2;order:2}md-fab-speed-dial.md-left md-fab-actions{-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-order:1;-ms-flex-order:1;order:1}md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-right{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}md-fab-speed-dial.md-right md-fab-trigger{-webkit-order:1;-ms-flex-order:1;order:1}md-fab-speed-dial.md-right md-fab-actions{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-order:2;-ms-flex-order:2;order:2}md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-scale .md-fab-action-item{opacity:0;-webkit-transform:scale(0);transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.14286s}md-fab-toolbar{display:block}md-fab-toolbar .md-fab-toolbar-wrapper{display:block;position:relative;overflow:hidden;height:6.8rem}md-fab-toolbar md-fab-trigger{position:absolute;z-index:20}md-fab-toolbar md-fab-trigger button{overflow:visible!important}md-fab-toolbar md-fab-trigger .md-fab-toolbar-background{display:block;position:absolute;z-index:21;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-toolbar md-fab-trigger md-icon{position:relative;z-index:22;opacity:1;transition:all 200ms ease-in}md-fab-toolbar.md-left md-fab-trigger{left:0}md-fab-toolbar.md-left .md-toolbar-tools{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}md-fab-toolbar.md-right md-fab-trigger{right:0}md-fab-toolbar.md-right .md-toolbar-tools{-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}md-fab-toolbar.md-right .md-toolbar-tools>.md-button:first-child{margin-left:.6rem;margin-right:-.8rem}md-fab-toolbar.md-right .md-toolbar-tools>.md-button:last-child{margin-right:8px}md-fab-toolbar md-toolbar{background-color:transparent!important;z-index:23}md-fab-toolbar md-toolbar .md-toolbar-tools{padding:0 20px;margin-top:3px}md-fab-toolbar md-toolbar .md-fab-action-item{opacity:0;-webkit-transform:scale(0);transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.15s}md-fab-toolbar.md-is-open md-fab-trigger>button{box-shadow:none}md-fab-toolbar.md-is-open md-fab-trigger>button md-icon{opacity:0}md-fab-toolbar.md-is-open .md-fab-action-item{opacity:1;-webkit-transform:scale(1);transform:scale(1)}md-grid-list{box-sizing:border-box;display:block;position:relative}md-grid-list *,md-grid-list :after,md-grid-list :before{box-sizing:border-box}md-grid-list md-grid-tile{display:block;position:absolute}md-grid-list md-grid-tile figure{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;padding:0;margin:0}md-grid-list md-grid-tile md-grid-tile-footer,md-grid-list md-grid-tile md-grid-tile-header{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.18);overflow:hidden;position:absolute;left:0;right:0}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h3,md-grid-list md-grid-tile md-grid-tile-header h4{font-weight:400;margin:0 0 0 16px}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-header h3{font-size:14px}md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h4{font-size:12px}md-grid-list md-grid-tile md-grid-tile-header{top:0}md-grid-list md-grid-tile md-grid-tile-footer{bottom:0}@media screen and (-ms-high-contrast:active){md-grid-tile{border:1px solid #fff}md-grid-tile-footer{border-top:1px solid #fff}}md-icon{margin:auto;background-repeat:no-repeat no-repeat;display:inline-block;vertical-align:middle;fill:currentColor;height:24px;width:24px}md-icon svg{pointer-events:none}md-icon[md-font-icon]{line-height:1;width:auto}md-list{display:block;padding:8px 0}md-list .md-subheader{line-height:.75em}md-list-item.md-proxy-focus.md-focused .md-no-style{transition:background-color .15s linear}md-list-item .md-no-style,md-list-item.md-no-proxy{position:relative;padding:0 16px;-webkit-flex:1;-ms-flex:1;flex:1}md-list-item .md-no-style.md-button,md-list-item.md-no-proxy.md-button{font-size:inherit;height:inherit;text-align:left;text-transform:none;width:100%;white-space:normal}md-list-item .md-no-style:focus,md-list-item.md-no-proxy:focus{outline:0}md-list-item.md-with-secondary{position:relative}md-list-item.md-clickable:hover{cursor:pointer}md-list-item md-divider{position:absolute;bottom:0;left:0;width:100%}md-list-item md-divider[md-inset]{left:96px;width:calc(100% - 96px);margin:0}md-list-item,md-list-item .md-list-item-inner{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:48px}md-list-item .md-list-item-inner>div.md-primary>md-icon,md-list-item .md-list-item-inner>div.md-secondary>md-icon,md-list-item .md-list-item-inner>md-icon.md-secondary,md-list-item .md-list-item-inner>md-icon:first-child,md-list-item>div.md-primary>md-icon,md-list-item>div.md-secondary>md-icon,md-list-item>md-icon.md-secondary,md-list-item>md-icon:first-child{width:24px;margin-top:16px;margin-bottom:12px;box-sizing:content-box}md-list-item .md-list-item-inner md-checkbox.md-secondary,md-list-item .md-list-item-inner>div.md-primary>md-checkbox,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox,md-list-item .md-list-item-inner>md-checkbox:first-child,md-list-item md-checkbox.md-secondary,md-list-item>div.md-primary>md-checkbox,md-list-item>div.md-secondary>md-checkbox,md-list-item>md-checkbox:first-child{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}md-list-item .md-list-item-inner md-checkbox.md-secondary .md-label,md-list-item .md-list-item-inner>div.md-primary>md-checkbox .md-label,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox .md-label,md-list-item .md-list-item-inner>md-checkbox:first-child .md-label,md-list-item md-checkbox.md-secondary .md-label,md-list-item>div.md-primary>md-checkbox .md-label,md-list-item>div.md-secondary>md-checkbox .md-label,md-list-item>md-checkbox:first-child .md-label{display:none}md-list-item .md-list-item-inner>md-icon:first-child,md-list-item>md-icon:first-child{margin-right:32px}md-list-item .md-list-item-inner>md-checkbox:first-child,md-list-item>md-checkbox:first-child{width:24px;margin-left:3px;margin-right:29px}md-list-item .md-list-item-inner>.md-avatar:first-child,md-list-item>.md-avatar:first-child{width:40px;height:40px;margin-top:8px;margin-bottom:8px;margin-right:16px;border-radius:50%;box-sizing:content-box}md-list-item .md-list-item-inner md-checkbox.md-secondary,md-list-item .md-list-item-inner md-switch.md-secondary,md-list-item md-checkbox.md-secondary,md-list-item md-switch.md-secondary{margin-right:0;margin-top:0;margin-bottom:0}md-list-item .md-list-item-inner button.md-button.md-secondary-container,md-list-item button.md-button.md-secondary-container{background-color:transparent;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-radius:50%;margin:0;min-width:0}md-list-item .md-list-item-inner button.md-button.md-secondary-container .md-ripple,md-list-item .md-list-item-inner button.md-button.md-secondary-container .md-ripple-container,md-list-item button.md-button.md-secondary-container .md-ripple,md-list-item button.md-button.md-secondary-container .md-ripple-container{border-radius:50%}md-list-item .md-list-item-inner .md-secondary,md-list-item .md-list-item-inner .md-secondary-container,md-list-item .md-secondary,md-list-item .md-secondary-container{margin-left:16px;position:absolute;right:16px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}md-list-item .md-list-item-inner>.md-button.md-secondary-container>.md-secondary,md-list-item>.md-button.md-secondary-container>.md-secondary{margin-left:0;position:static}md-list-item .md-list-item-inner>.md-list-item-inner>p,md-list-item .md-list-item-inner>p,md-list-item>.md-list-item-inner>p,md-list-item>p{-webkit-flex:1;-ms-flex:1;flex:1;margin:0}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style,md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text,md-list-item.md-3-line .md-list-item-text,md-list-item.md-3-line>.md-no-style .md-list-item-text{-webkit-flex:1;-ms-flex:1;flex:1;padding:16px 0;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text.md-offset,md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list-item.md-3-line .md-list-item-text.md-offset,md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}md-list-item.md-2-line .md-list-item-text h3,md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list-item.md-3-line .md-list-item-text h3,md-list-item.md-3-line>.md-no-style .md-list-item-text h3{margin:0 0 6px;line-height:.75em}md-list-item.md-2-line .md-list-item-text h4,md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list-item.md-3-line .md-list-item-text h4,md-list-item.md-3-line>.md-no-style .md-list-item-text h4{font-weight:400;margin:10px 0 5px;line-height:.75em}md-list-item.md-2-line .md-list-item-text p,md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list-item.md-3-line .md-list-item-text p,md-list-item.md-3-line>.md-no-style .md-list-item-text p{margin:0;line-height:1.6em}md-list-item.md-2-line>.md-avatar:first-child,md-list-item.md-2-line>.md-no-style>.md-avatar:first-child{margin-top:12px}md-list-item.md-2-line>.md-no-style>md-icon:first-child,md-list-item.md-2-line>md-icon:first-child{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text{-webkit-flex:1;-ms-flex:1;flex:1;padding-top:19px}md-list-item.md-3-line>.md-avatar:first-child,md-list-item.md-3-line>.md-no-style>.md-avatar:first-child,md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list-item.md-3-line>md-icon:first-child{margin-top:16px}md-input-container{display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:2px 2px 26px}md-input-container>md-icon{position:absolute;top:5px;left:2px}md-input-container>md-icon+input{margin-left:36px}md-input-container input[type=search],md-input-container input[type=email],md-input-container input[type=number],md-input-container input[type=tel],md-input-container input[type=url],md-input-container input[type=text],md-input-container input[type=password],md-input-container input[type=datetime],md-input-container input[type=datetime-local],md-input-container input[type=date],md-input-container input[type=month],md-input-container input[type=time],md-input-container input[type=week],md-input-container input[type=color],md-input-container textarea{-moz-appearance:none;-webkit-appearance:none}md-input-container input[type=datetime-local],md-input-container input[type=date],md-input-container input[type=month],md-input-container input[type=time],md-input-container input[type=week]{min-height:26px}md-input-container textarea{resize:none;overflow:hidden}md-input-container textarea.md-input{min-height:56px;-ms-flex-preferred-size:auto}md-input-container label{position:relative;top:-2px}md-input-container .md-placeholder:not(.md-select-label),md-input-container label:not(.md-no-float){-webkit-order:1;-ms-flex-order:1;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:2px;z-index:1;-webkit-transform:translate3d(0,28px,0) scale(1);transform:translate3d(0,28px,0) scale(1);transition:-webkit-transform cubic-bezier(.25,.8,.25,1) .25s;transition:transform cubic-bezier(.25,.8,.25,1) .25s;-webkit-transform-origin:left top;transform-origin:left top}html[dir=rtl] md-input-container .md-placeholder:not(.md-select-label),html[dir=rtl] md-input-container label:not(.md-no-float){-webkit-transform-origin:right top;transform-origin:right top}md-input-container .md-placeholder:not(.md-select-label){position:absolute;top:0;opacity:0;transition-property:opacity,-webkit-transform;transition-property:opacity,transform;-webkit-transform:translate3d(0,30px,0);transform:translate3d(0,30px,0)}md-input-container.md-input-focused .md-placeholder{opacity:1;-webkit-transform:translate3d(0,24px,0);transform:translate3d(0,24px,0)}md-input-container.md-input-has-value .md-placeholder{transition:none;opacity:0}md-input-container:not(.md-input-has-value) input:not(:focus){color:transparent}md-input-container .md-input{-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-order:2;-ms-flex-order:2;order:2;display:block;background:0 0;padding:2px 2px 1px;border-width:0 0 1px;line-height:26px;-ms-flex-preferred-size:26px;border-radius:0}md-input-container .md-input:focus{outline:0}md-input-container .md-input:invalid{outline:0;box-shadow:none}md-input-container [data-ng-messages],md-input-container [ng-messages],md-input-container [x-ng-messages],md-input-container data-ng-messages,md-input-container ng-messages,md-input-container x-ng-messages{-webkit-order:3;-ms-flex-order:3;order:3;position:relative}md-input-container .md-char-counter,md-input-container [data-ng-message],md-input-container [ng-message],md-input-container [x-ng-message],md-input-container data-ng-message,md-input-container ng-message,md-input-container x-ng-message{-webkit-font-smoothing:antialiased;position:absolute;font-size:12px;line-height:24px}md-input-container .md-char-counter:not(.md-char-counter),md-input-container [data-ng-message]:not(.md-char-counter),md-input-container [ng-message]:not(.md-char-counter),md-input-container [x-ng-message]:not(.md-char-counter),md-input-container data-ng-message:not(.md-char-counter),md-input-container ng-message:not(.md-char-counter),md-input-container x-ng-message:not(.md-char-counter){padding-right:30px}md-input-container .md-char-counter.ng-enter,md-input-container [data-ng-message].ng-enter,md-input-container [ng-message].ng-enter,md-input-container [x-ng-message].ng-enter,md-input-container data-ng-message.ng-enter,md-input-container ng-message.ng-enter,md-input-container x-ng-message.ng-enter{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-delay:.2s}md-input-container .md-char-counter.ng-leave,md-input-container [data-ng-message].ng-leave,md-input-container [ng-message].ng-leave,md-input-container [x-ng-message].ng-leave,md-input-container data-ng-message.ng-leave,md-input-container ng-message.ng-leave,md-input-container x-ng-message.ng-leave{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-input-container .md-char-counter.ng-enter,md-input-container .md-char-counter.ng-leave.ng-leave-active,md-input-container [data-ng-message].ng-enter,md-input-container [data-ng-message].ng-leave.ng-leave-active,md-input-container [ng-message].ng-enter,md-input-container [ng-message].ng-leave.ng-leave-active,md-input-container [x-ng-message].ng-enter,md-input-container [x-ng-message].ng-leave.ng-leave-active,md-input-container data-ng-message.ng-enter,md-input-container data-ng-message.ng-leave.ng-leave-active,md-input-container ng-message.ng-enter,md-input-container ng-message.ng-leave.ng-leave-active,md-input-container x-ng-message.ng-enter,md-input-container x-ng-message.ng-leave.ng-leave-active{opacity:0;-webkit-transform:translate3d(0,-20%,0);transform:translate3d(0,-20%,0)}md-input-container .md-char-counter.ng-enter.ng-enter-active,md-input-container .md-char-counter.ng-leave,md-input-container [data-ng-message].ng-enter.ng-enter-active,md-input-container [data-ng-message].ng-leave,md-input-container [ng-message].ng-enter.ng-enter-active,md-input-container [ng-message].ng-leave,md-input-container [x-ng-message].ng-enter.ng-enter-active,md-input-container [x-ng-message].ng-leave,md-input-container data-ng-message.ng-enter.ng-enter-active,md-input-container data-ng-message.ng-leave,md-input-container ng-message.ng-enter.ng-enter-active,md-input-container ng-message.ng-leave,md-input-container x-ng-message.ng-enter.ng-enter-active,md-input-container x-ng-message.ng-leave{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}md-input-container .md-char-counter{bottom:2px;right:2px}md-input-container.md-input-focused label:not(.md-no-float),md-input-container.md-input-has-value label:not(.md-no-float){-webkit-transform:translate3d(0,6px,0) scale(.75);transform:translate3d(0,6px,0) scale(.75)}md-input-container .md-input.ng-invalid.ng-dirty,md-input-container.md-input-focused .md-input{padding-bottom:0;border-width:0 0 2px}[disabled] md-input-container .md-input,md-input-container .md-input[disabled]{background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x;margin-bottom:-1px}md-input-container.md-icon-float{margin-top:-16px;transition:margin-top .5s cubic-bezier(.25,.8,.25,1)}md-input-container.md-icon-float>label{pointer-events:none;position:absolute;margin-left:36px}md-input-container.md-icon-float>md-icon{top:26px;left:2px}md-input-container.md-icon-float>md-icon+input{margin-left:36px}md-input-container.md-icon-float>input{padding-top:24px}md-input-container.md-icon-float.md-input-focused,md-input-container.md-icon-float.md-input-has-value{margin-top:-8px}md-input-container.md-icon-float.md-input-focused label,md-input-container.md-icon-float.md-input-has-value label{-webkit-transform:translate3d(0,6px,0) scale(.75);transform:translate3d(0,6px,0) scale(.75);transition:-webkit-transform cubic-bezier(.25,.8,.25,1) .5s;transition:transform cubic-bezier(.25,.8,.25,1) .5s}@media screen and (-ms-high-contrast:active){md-input-container.md-default-theme>md-icon{fill:#fff}}.md-open-menu-container{position:fixed;left:0;top:0;z-index:99;opacity:0}.md-open-menu-container md-menu-divider{margin-top:4px;margin-bottom:4px;height:1px;width:100%}.md-open-menu-container md-menu-content>*{opacity:0}.md-open-menu-container:not(.md-clickable){pointer-events:none}.md-open-menu-container.md-active{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:200ms}.md-open-menu-container.md-active>md-menu-content>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:200ms;transition-delay:100ms}.md-open-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-menu-content{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:8px 0}md-menu-content.md-dense md-menu-item{height:32px}md-menu-item{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:48px;-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}md-menu-item>*{width:100%;margin:auto 0;padding-left:16px;padding-right:16px}md-menu-item>.md-button{border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;text-align:start;height:100%;padding-left:16px;padding-right:16px;display:-webkit-flex;display:-ms-flexbox;display:flex}md-menu-item>.md-button md-icon{margin:auto 16px auto 0}md-menu-item>.md-button p{margin:auto;-webkit-flex:1;-ms-flex:1;flex:1}.md-menu{padding:8px 0}md-toolbar .md-menu{height:auto;margin:auto}@media (max-width:599px){md-menu-content{min-width:112px}md-menu-content[width="3"]{min-width:168px}md-menu-content[width="4"]{min-width:224px}md-menu-content[width="5"]{min-width:280px}md-menu-content[width="6"]{min-width:336px}md-menu-content[width="7"]{min-width:392px}}@media (min-width:600px){md-menu-content{min-width:96px}md-menu-content[width="3"]{min-width:192px}md-menu-content[width="4"]{min-width:256px}md-menu-content[width="5"]{min-width:320px}md-menu-content[width="6"]{min-width:384px}md-menu-content[width="7"]{min-width:448px}}@-webkit-keyframes outer-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes outer-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes left-wobble{0%,100%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}}@keyframes left-wobble{0%,100%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}}@-webkit-keyframes right-wobble{0%,100%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}}@keyframes right-wobble{0%,100%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}}@-webkit-keyframes sporadic-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}@keyframes sporadic-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg);transform:rotate(1080deg)}}md-progress-circular{width:50px;height:50px;display:block;position:relative;padding-top:0!important;margin-bottom:0!important;overflow:hidden}md-progress-circular .md-inner{width:50px;height:50px;position:relative}md-progress-circular .md-inner .md-gap{position:absolute;left:24px;right:24px;top:0;bottom:0;border-top-width:5px;border-top-style:solid;box-sizing:border-box}md-progress-circular .md-inner .md-left,md-progress-circular .md-inner .md-right{position:absolute;top:0;height:50px;width:25px;overflow:hidden}md-progress-circular .md-inner .md-left .md-half-circle,md-progress-circular .md-inner .md-right .md-half-circle{position:absolute;top:0;width:50px;height:50px;box-sizing:border-box;border-width:5px;border-style:solid;border-bottom-color:transparent;border-radius:50%}md-progress-circular .md-inner .md-left{left:0}md-progress-circular .md-inner .md-left .md-half-circle{left:0;border-right-color:transparent}md-progress-circular .md-inner .md-right{right:0}md-progress-circular .md-inner .md-right .md-half-circle{right:0;border-left-color:transparent}md-progress-circular[value="0"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="0"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}md-progress-circular[value="0"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="1"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="1"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-131.4deg);transform:rotate(-131.4deg)}md-progress-circular[value="1"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="2"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="2"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-127.8deg);transform:rotate(-127.8deg)}md-progress-circular[value="2"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="3"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="3"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-124.2deg);transform:rotate(-124.2deg)}md-progress-circular[value="3"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="4"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="4"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-120.6deg);transform:rotate(-120.6deg)}md-progress-circular[value="4"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="5"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="5"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-117deg);transform:rotate(-117deg)}md-progress-circular[value="5"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="6"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="6"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-113.4deg);transform:rotate(-113.4deg)}md-progress-circular[value="6"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="7"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="7"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-109.8deg);transform:rotate(-109.8deg)}md-progress-circular[value="7"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="8"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="8"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-106.2deg);transform:rotate(-106.2deg)}md-progress-circular[value="8"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="9"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="9"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-102.6deg);transform:rotate(-102.6deg)}md-progress-circular[value="9"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="10"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="10"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-99deg);transform:rotate(-99deg)}md-progress-circular[value="10"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="11"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="11"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-95.4deg);transform:rotate(-95.4deg)}md-progress-circular[value="11"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="12"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="12"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-91.8deg);transform:rotate(-91.8deg)}md-progress-circular[value="12"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="13"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="13"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-88.2deg);transform:rotate(-88.2deg)}md-progress-circular[value="13"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="14"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="14"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-84.6deg);transform:rotate(-84.6deg)}md-progress-circular[value="14"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="15"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="15"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-81deg);transform:rotate(-81deg)}md-progress-circular[value="15"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="16"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="16"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-77.4deg);transform:rotate(-77.4deg)}md-progress-circular[value="16"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="17"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="17"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-73.8deg);transform:rotate(-73.8deg)}md-progress-circular[value="17"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="18"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="18"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-70.2deg);transform:rotate(-70.2deg)}md-progress-circular[value="18"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="19"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="19"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-66.6deg);transform:rotate(-66.6deg)}md-progress-circular[value="19"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="20"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="20"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-63deg);transform:rotate(-63deg)}md-progress-circular[value="20"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="21"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="21"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-59.4deg);transform:rotate(-59.4deg)}md-progress-circular[value="21"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="22"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="22"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-55.8deg);transform:rotate(-55.8deg)}md-progress-circular[value="22"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="23"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="23"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-52.2deg);transform:rotate(-52.2deg)}md-progress-circular[value="23"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="24"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="24"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-48.6deg);transform:rotate(-48.6deg)}md-progress-circular[value="24"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="25"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="25"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}md-progress-circular[value="25"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="26"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="26"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-41.4deg);transform:rotate(-41.4deg)}md-progress-circular[value="26"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="27"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="27"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-37.8deg);transform:rotate(-37.8deg)}md-progress-circular[value="27"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="28"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="28"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-34.2deg);transform:rotate(-34.2deg)}md-progress-circular[value="28"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="29"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="29"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-30.6deg);transform:rotate(-30.6deg)}md-progress-circular[value="29"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="30"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="30"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-27deg);transform:rotate(-27deg)}md-progress-circular[value="30"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="31"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="31"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-23.4deg);transform:rotate(-23.4deg)}md-progress-circular[value="31"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="32"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="32"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-19.8deg);transform:rotate(-19.8deg)}md-progress-circular[value="32"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="33"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="33"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-16.2deg);transform:rotate(-16.2deg)}md-progress-circular[value="33"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="34"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="34"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-12.6deg);transform:rotate(-12.6deg)}md-progress-circular[value="34"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="35"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="35"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-9deg);transform:rotate(-9deg)}md-progress-circular[value="35"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="36"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="36"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-5.4deg);transform:rotate(-5.4deg)}md-progress-circular[value="36"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="37"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="37"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(-1.8deg);transform:rotate(-1.8deg)}md-progress-circular[value="37"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="38"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="38"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(1.8deg);transform:rotate(1.8deg)}md-progress-circular[value="38"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="39"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="39"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(5.4deg);transform:rotate(5.4deg)}md-progress-circular[value="39"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="40"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="40"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(9deg);transform:rotate(9deg)}md-progress-circular[value="40"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="41"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="41"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(12.6deg);transform:rotate(12.6deg)}md-progress-circular[value="41"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="42"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="42"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(16.2deg);transform:rotate(16.2deg)}md-progress-circular[value="42"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="43"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="43"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(19.8deg);transform:rotate(19.8deg)}md-progress-circular[value="43"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="44"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="44"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(23.4deg);transform:rotate(23.4deg)}md-progress-circular[value="44"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="45"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="45"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(27deg);transform:rotate(27deg)}md-progress-circular[value="45"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="46"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="46"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(30.6deg);transform:rotate(30.6deg)}md-progress-circular[value="46"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="47"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="47"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(34.2deg);transform:rotate(34.2deg)}md-progress-circular[value="47"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="48"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="48"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(37.8deg);transform:rotate(37.8deg)}md-progress-circular[value="48"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="49"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="49"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(41.4deg);transform:rotate(41.4deg)}md-progress-circular[value="49"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="50"] .md-inner .md-left .md-half-circle{-webkit-transform:rotate(135deg);transform:rotate(135deg)}md-progress-circular[value="50"] .md-inner .md-right .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="50"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:transparent!important}md-progress-circular[value="51"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(138.6deg);transform:rotate(138.6deg)}md-progress-circular[value="51"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="51"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="52"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(142.2deg);transform:rotate(142.2deg)}md-progress-circular[value="52"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="52"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="53"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(145.8deg);transform:rotate(145.8deg)}md-progress-circular[value="53"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="53"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="54"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(149.4deg);transform:rotate(149.4deg)}md-progress-circular[value="54"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="54"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="55"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(153deg);transform:rotate(153deg)}md-progress-circular[value="55"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="55"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="56"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(156.6deg);transform:rotate(156.6deg)}md-progress-circular[value="56"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="56"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="57"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(160.2deg);transform:rotate(160.2deg)}md-progress-circular[value="57"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="57"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="58"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(163.8deg);transform:rotate(163.8deg)}md-progress-circular[value="58"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="58"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="59"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(167.4deg);transform:rotate(167.4deg)}md-progress-circular[value="59"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="59"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="60"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(171deg);transform:rotate(171deg)}md-progress-circular[value="60"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="60"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="61"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(174.6deg);transform:rotate(174.6deg)}md-progress-circular[value="61"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="61"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="62"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(178.2deg);transform:rotate(178.2deg)}md-progress-circular[value="62"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="62"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="63"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(181.8deg);transform:rotate(181.8deg)}md-progress-circular[value="63"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="63"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="64"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(185.4deg);transform:rotate(185.4deg)}md-progress-circular[value="64"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="64"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="65"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(189deg);transform:rotate(189deg)}md-progress-circular[value="65"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="65"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="66"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(192.6deg);transform:rotate(192.6deg)}md-progress-circular[value="66"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="66"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="67"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(196.2deg);transform:rotate(196.2deg)}md-progress-circular[value="67"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="67"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="68"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(199.8deg);transform:rotate(199.8deg)}md-progress-circular[value="68"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="68"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="69"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(203.4deg);transform:rotate(203.4deg)}md-progress-circular[value="69"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="69"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="70"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(207deg);transform:rotate(207deg)}md-progress-circular[value="70"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="70"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="71"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(210.6deg);transform:rotate(210.6deg)}md-progress-circular[value="71"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="71"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="72"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(214.2deg);transform:rotate(214.2deg)}md-progress-circular[value="72"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="72"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="73"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(217.8deg);transform:rotate(217.8deg)}md-progress-circular[value="73"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="73"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="74"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(221.4deg);transform:rotate(221.4deg)}md-progress-circular[value="74"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="74"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="75"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(225deg);transform:rotate(225deg)}md-progress-circular[value="75"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="75"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="76"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(228.6deg);transform:rotate(228.6deg)}md-progress-circular[value="76"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="76"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="77"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(232.2deg);transform:rotate(232.2deg)}md-progress-circular[value="77"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="77"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="78"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(235.8deg);transform:rotate(235.8deg)}md-progress-circular[value="78"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="78"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="79"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(239.4deg);transform:rotate(239.4deg)}md-progress-circular[value="79"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="79"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="80"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(243deg);transform:rotate(243deg)}md-progress-circular[value="80"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="80"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="81"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(246.6deg);transform:rotate(246.6deg)}md-progress-circular[value="81"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="81"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="82"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(250.2deg);transform:rotate(250.2deg)}md-progress-circular[value="82"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="82"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="83"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(253.8deg);transform:rotate(253.8deg)}md-progress-circular[value="83"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="83"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="84"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(257.4deg);transform:rotate(257.4deg)}md-progress-circular[value="84"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="84"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="85"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(261deg);transform:rotate(261deg)}md-progress-circular[value="85"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="85"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="86"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(264.6deg);transform:rotate(264.6deg)}md-progress-circular[value="86"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="86"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="87"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(268.2deg);transform:rotate(268.2deg)}md-progress-circular[value="87"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="87"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="88"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(271.8deg);transform:rotate(271.8deg)}md-progress-circular[value="88"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="88"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="89"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(275.4deg);transform:rotate(275.4deg)}md-progress-circular[value="89"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="89"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="90"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(279deg);transform:rotate(279deg)}md-progress-circular[value="90"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="90"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="91"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(282.6deg);transform:rotate(282.6deg)}md-progress-circular[value="91"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="91"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="92"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(286.2deg);transform:rotate(286.2deg)}md-progress-circular[value="92"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="92"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="93"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(289.8deg);transform:rotate(289.8deg)}md-progress-circular[value="93"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="93"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="94"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(293.4deg);transform:rotate(293.4deg)}md-progress-circular[value="94"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="94"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="95"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(297deg);transform:rotate(297deg)}md-progress-circular[value="95"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="95"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="96"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(300.6deg);transform:rotate(300.6deg)}md-progress-circular[value="96"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="96"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="97"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(304.2deg);transform:rotate(304.2deg)}md-progress-circular[value="97"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="97"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="98"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(307.8deg);transform:rotate(307.8deg)}md-progress-circular[value="98"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="98"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="99"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(311.4deg);transform:rotate(311.4deg)}md-progress-circular[value="99"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="99"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[value="100"] .md-inner .md-left .md-half-circle{transition:-webkit-transform .1s linear;transition:transform .1s linear;-webkit-transform:rotate(315deg);transform:rotate(315deg)}md-progress-circular[value="100"] .md-inner .md-right .md-half-circle{-webkit-transform:rotate(45deg);transform:rotate(45deg)}md-progress-circular[value="100"] .md-inner .md-gap{border-bottom-width:5px;border-bottom-style:solid;transition:border-bottom-color .1s linear}md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper{-webkit-animation:outer-rotate 2.91667s linear infinite;animation:outer-rotate 2.91667s linear infinite}md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner{-webkit-animation:sporadic-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite;animation:sporadic-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite}md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-left .md-half-circle,md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-right .md-half-circle{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-duration:1.3125s;animation-duration:1.3125s;-webkit-animation-timing-function:cubic-bezier(.35,0,.25,1);animation-timing-function:cubic-bezier(.35,0,.25,1)}md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-left .md-half-circle{-webkit-animation-name:left-wobble;animation-name:left-wobble}md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-right .md-half-circle{-webkit-animation-name:right-wobble;animation-name:right-wobble}.ng-hide md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper,.ng-hide md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner,md-progress-circular.ng-hide[md-mode=indeterminate] .md-spinner-wrapper,md-progress-circular.ng-hide[md-mode=indeterminate] .md-spinner-wrapper .md-inner{-webkit-animation:none;animation:none}.ng-hide md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-left .md-half-circle,.ng-hide md-progress-circular[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-right .md-half-circle,md-progress-circular.ng-hide[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-left .md-half-circle,md-progress-circular.ng-hide[md-mode=indeterminate] .md-spinner-wrapper .md-inner .md-right .md-half-circle{-webkit-animation-name:none;animation-name:none}md-progress-linear:not([md-mode=indeterminate]){display:block;width:100%;height:5px}md-progress-linear:not([md-mode=indeterminate]) .md-container{overflow:hidden;position:relative;height:5px;top:5px;-webkit-transform:translate(0,5px) scale(1,0);transform:translate(0,5px) scale(1,0);transition:all .3s linear}md-progress-linear:not([md-mode=indeterminate]) .md-container.md-ready{-webkit-transform:translate(0,0) scale(1,1);transform:translate(0,0) scale(1,1)}md-progress-linear:not([md-mode=indeterminate]) .md-bar{height:5px;position:absolute;width:100%}md-progress-linear:not([md-mode=indeterminate]) .md-bar1,md-progress-linear:not([md-mode=indeterminate]) .md-bar2{transition:all .2s linear}md-progress-linear:not([md-mode=indeterminate])[md-mode=determinate] .md-bar1{display:none}md-progress-linear:not([md-mode=indeterminate])[md-mode=buffer] .md-container{background-color:transparent!important}md-progress-linear:not([md-mode=indeterminate])[md-mode=buffer] .md-dashed:before{content:"";display:block;height:5px;width:100%;margin-top:0;position:absolute;background-color:transparent;background-size:10px 10px!important;background-position:0 -23px;-webkit-animation:buffer 3s infinite linear;animation:buffer 3s infinite linear}md-progress-linear:not([md-mode=indeterminate])[md-mode=query] .md-bar2{-webkit-animation:query .8s infinite cubic-bezier(.39,.575,.565,1);animation:query .8s infinite cubic-bezier(.39,.575,.565,1)}md-progress-linear[md-mode=indeterminate]{display:block;width:100%;height:5px;position:relative}md-progress-linear[md-mode=indeterminate] .md-container{width:100%;overflow:hidden;position:relative;height:5px;top:5px;transition:all .3s linear}md-progress-linear[md-mode=indeterminate] .md-container .md-bar{height:5px;left:0;width:80%;position:absolute;top:0;bottom:0}md-progress-linear[md-mode=indeterminate] .md-container .md-bar1{-webkit-animation:md-progress-linear-indeterminate-scale-1 4s infinite,md-progress-linear-indeterminate-1 4s infinite;animation:md-progress-linear-indeterminate-scale-1 4s infinite,md-progress-linear-indeterminate-1 4s infinite}md-progress-linear[md-mode=indeterminate] .md-container .md-bar2{-webkit-animation:md-progress-linear-indeterminate-scale-2 4s infinite,md-progress-linear-indeterminate-2 4s infinite;animation:md-progress-linear-indeterminate-scale-2 4s infinite,md-progress-linear-indeterminate-2 4s infinite}@-webkit-keyframes query{0%{opacity:1;-webkit-transform:translateX(35%) scale(.3,1);transform:translateX(35%) scale(.3,1)}100%{opacity:0;-webkit-transform:translateX(-50%) scale(0,1);transform:translateX(-50%) scale(0,1)}}@keyframes query{0%{opacity:1;-webkit-transform:translateX(35%) scale(.3,1);transform:translateX(35%) scale(.3,1)}100%{opacity:0;-webkit-transform:translateX(-50%) scale(0,1);transform:translateX(-50%) scale(0,1)}}@-webkit-keyframes buffer{0%{opacity:1;background-position:0 -23px}50%{opacity:0}100%{opacity:1;background-position:-200px -23px}}@keyframes buffer{0%{opacity:1;background-position:0 -23px}50%{opacity:0}100%{opacity:1;background-position:-200px -23px}}@-webkit-keyframes md-progress-linear-indeterminate-scale-1{0%{-webkit-transform:scaleX(.1);transform:scaleX(.1);-webkit-animation-timing-function:linear;animation-timing-function:linear}36.6%{-webkit-transform:scaleX(.1);transform:scaleX(.1);-webkit-animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);animation-timing-function:cubic-bezier(.33473,.12482,.78584,1)}69.15%{-webkit-transform:scaleX(.83);transform:scaleX(.83);-webkit-animation-timing-function:cubic-bezier(.22573,0,.23365,1.37098);animation-timing-function:cubic-bezier(.22573,0,.23365,1.37098)}100%{-webkit-transform:scaleX(.1);transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-scale-1{0%{-webkit-transform:scaleX(.1);transform:scaleX(.1);-webkit-animation-timing-function:linear;animation-timing-function:linear}36.6%{-webkit-transform:scaleX(.1);transform:scaleX(.1);-webkit-animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);animation-timing-function:cubic-bezier(.33473,.12482,.78584,1)}69.15%{-webkit-transform:scaleX(.83);transform:scaleX(.83);-webkit-animation-timing-function:cubic-bezier(.22573,0,.23365,1.37098);animation-timing-function:cubic-bezier(.22573,0,.23365,1.37098)}100%{-webkit-transform:scaleX(.1);transform:scaleX(.1)}}@-webkit-keyframes md-progress-linear-indeterminate-1{0%{left:-105.16667%;-webkit-animation-timing-function:linear;animation-timing-function:linear}20%{left:-105.16667%;-webkit-animation-timing-function:cubic-bezier(.5,0,.70173,.49582);animation-timing-function:cubic-bezier(.5,0,.70173,.49582)}69.15%{left:21.5%;-webkit-animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635)}100%{left:95.44444%}}@keyframes md-progress-linear-indeterminate-1{0%{left:-105.16667%;-webkit-animation-timing-function:linear;animation-timing-function:linear}20%{left:-105.16667%;-webkit-animation-timing-function:cubic-bezier(.5,0,.70173,.49582);animation-timing-function:cubic-bezier(.5,0,.70173,.49582)}69.15%{left:21.5%;-webkit-animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635)}100%{left:95.44444%}}@-webkit-keyframes md-progress-linear-indeterminate-scale-2{0%{-webkit-transform:scaleX(.1);transform:scaleX(.1);-webkit-animation-timing-function:cubic-bezier(.20503,.05705,.57661,.45397);animation-timing-function:cubic-bezier(.20503,.05705,.57661,.45397)}19.15%{-webkit-transform:scaleX(.57);transform:scaleX(.57);-webkit-animation-timing-function:cubic-bezier(.15231,.19643,.64837,1.00432);animation-timing-function:cubic-bezier(.15231,.19643,.64837,1.00432)}44.15%{-webkit-transform:scaleX(.91);transform:scaleX(.91);-webkit-animation-timing-function:cubic-bezier(.25776,-.00316,.21176,1.38179);animation-timing-function:cubic-bezier(.25776,-.00316,.21176,1.38179)}100%{-webkit-transform:scaleX(.1);transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-scale-2{0%{-webkit-transform:scaleX(.1);transform:scaleX(.1);-webkit-animation-timing-function:cubic-bezier(.20503,.05705,.57661,.45397);animation-timing-function:cubic-bezier(.20503,.05705,.57661,.45397)}19.15%{-webkit-transform:scaleX(.57);transform:scaleX(.57);-webkit-animation-timing-function:cubic-bezier(.15231,.19643,.64837,1.00432);animation-timing-function:cubic-bezier(.15231,.19643,.64837,1.00432)}44.15%{-webkit-transform:scaleX(.91);transform:scaleX(.91);-webkit-animation-timing-function:cubic-bezier(.25776,-.00316,.21176,1.38179);animation-timing-function:cubic-bezier(.25776,-.00316,.21176,1.38179)}100%{-webkit-transform:scaleX(.1);transform:scaleX(.1)}}@-webkit-keyframes md-progress-linear-indeterminate-2{0%{left:-54.88889%;-webkit-animation-timing-function:cubic-bezier(.15,0,.51506,.40968);animation-timing-function:cubic-bezier(.15,0,.51506,.40968)}25%{left:-17.25%;-webkit-animation-timing-function:cubic-bezier(.31033,.28406,.8,.73372);animation-timing-function:cubic-bezier(.31033,.28406,.8,.73372)}48.35%{left:29.5%;-webkit-animation-timing-function:cubic-bezier(.4,.62703,.6,.90203);animation-timing-function:cubic-bezier(.4,.62703,.6,.90203)}100%{left:117.38889%}}@keyframes md-progress-linear-indeterminate-2{0%{left:-54.88889%;-webkit-animation-timing-function:cubic-bezier(.15,0,.51506,.40968);animation-timing-function:cubic-bezier(.15,0,.51506,.40968)}25%{left:-17.25%;-webkit-animation-timing-function:cubic-bezier(.31033,.28406,.8,.73372);animation-timing-function:cubic-bezier(.31033,.28406,.8,.73372)}48.35%{left:29.5%;-webkit-animation-timing-function:cubic-bezier(.4,.62703,.6,.90203);animation-timing-function:cubic-bezier(.4,.62703,.6,.90203)}100%{left:117.38889%}}.md-switch-thumb,md-radio-button{box-sizing:border-box;display:block;margin:15px;white-space:nowrap;cursor:pointer}.md-switch-thumb *,.md-switch-thumb :after,.md-switch-thumb :before,md-radio-button *,md-radio-button :after,md-radio-button :before{box-sizing:border-box}.md-switch-thumb input,md-radio-button input{display:none}.md-switch-thumb .md-container,md-radio-button .md-container{position:relative;top:4px;display:inline-block;width:16px;height:16px;cursor:pointer}.md-switch-thumb .md-container .md-ripple-container,md-radio-button .md-container .md-ripple-container{position:absolute;display:block;width:48px;height:48px;left:-16px;top:-16px}.md-switch-thumb .md-container:before,md-radio-button .md-container:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}.md-switch-thumb .md-off,md-radio-button .md-off{position:absolute;top:0;left:0;width:16px;height:16px;border-style:solid;border-width:2px;border-radius:50%;transition:border-color ease .28s}.md-switch-thumb .md-on,md-radio-button .md-on{position:absolute;top:0;left:0;width:16px;height:16px;border-radius:50%;transition:-webkit-transform ease .28s;transition:transform ease .28s;-webkit-transform:scale(0);transform:scale(0)}.md-switch-thumb.md-checked .md-on,md-radio-button.md-checked .md-on{-webkit-transform:scale(.5);transform:scale(.5)}.md-switch-thumb .md-label,md-radio-button .md-label{position:relative;display:inline-block;margin-left:10px;margin-right:10px;vertical-align:middle;white-space:normal;pointer-events:none;width:auto}.md-switch-thumb .circle,md-radio-button .circle{border-radius:50%}md-radio-group:focus{outline:0}md-radio-group.md-focused .md-checked .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}@media screen and (-ms-high-contrast:active){md-radio-button.md-default-theme .md-on{background-color:#fff}}.md-select-menu-container{position:fixed;left:0;top:0;z-index:99;opacity:0}.md-select-menu-container:not(.md-clickable){pointer-events:none}.md-select-menu-container md-progress-circular{display:table;margin:24px auto!important}.md-select-menu-container.md-active{opacity:1}.md-select-menu-container.md-active md-select-menu{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:200ms}.md-select-menu-container.md-active md-select-menu>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:200ms;transition-delay:100ms}.md-select-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-input-container>md-select{margin:3px 0 0}md-select{padding:24px 2px 26px;display:-webkit-flex;display:-ms-flexbox;display:flex}md-select:focus{outline:0}md-select[disabled]:hover{cursor:default}md-select:not([disabled]):hover{cursor:pointer}md-select:not([disabled]).ng-invalid.ng-dirty .md-select-label,md-select:not([disabled]):focus .md-select-label{border-bottom-width:2px;border-bottom-style:solid;padding-bottom:0}.md-select-label{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding:2px 2px 1px;border-bottom-width:1px;border-bottom-style:solid;position:relative;box-sizing:content-box;min-width:64px;min-height:26px}.md-select-label :first-child{-webkit-flex:1;-ms-flex:1;flex:1;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:calc(100% - 2*8px);-webkit-transform:translate3d(0,2px,0);transform:translate3d(0,2px,0)}.md-select-label .md-select-icon{-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;text-align:end;width:24px;margin:0 4px;-webkit-transform:translate3d(0,1px,0);transform:translate3d(0,1px,0)}.md-select-label .md-select-icon:after{display:block;content:'\25BC';position:relative;top:2px;speak:none;-webkit-transform:scaleY(.6) scaleX(1);transform:scaleY(.6) scaleX(1)}md-select-menu{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084);max-height:256px;min-height:48px;overflow-y:hidden;-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:scale(1);transform:scale(1)}md-select-menu.md-reverse{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}md-select-menu:not(.md-overflow) md-content{padding-top:8px;padding-bottom:8px}html[dir=rtl] md-select-menu{-webkit-transform-origin:right top;transform-origin:right top}md-select-menu md-content{min-width:136px;min-height:48px;max-height:256px;overflow-y:auto}md-select-menu>*{opacity:0}md-option{cursor:pointer;position:relative;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:auto;padding:0 16px;height:48px}md-option:focus{outline:0}md-option .md-text{width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}md-optgroup{display:block}md-optgroup label{display:block;font-size:14px;text-transform:uppercase;padding:16px;font-weight:500}md-optgroup md-option{padding-left:32px;padding-right:32px}@media screen and (-ms-high-contrast:active){.md-select-backdrop{background-color:transparent}md-select-menu{border:1px solid #fff}}@-webkit-keyframes sliderFocusThumb{0%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{opacity:0}}@keyframes sliderFocusThumb{0%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{opacity:0}}md-slider{height:48px;position:relative;display:block;margin-left:4px;margin-right:4px;padding:0}md-slider *,md-slider :after{box-sizing:border-box}md-slider .md-slider-wrapper{position:relative}md-slider .md-track-container{width:100%;position:absolute;top:23px;height:2px}md-slider .md-track{position:absolute;left:0;right:0;height:100%}md-slider .md-track-fill{transition:width .05s linear}md-slider .md-track-ticks{position:absolute;left:0;right:0;height:100%}md-slider .md-thumb-container{position:absolute;left:0;top:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);transition:left .1s linear}md-slider .md-thumb{z-index:1;position:absolute;left:-19px;top:5px;width:38px;height:38px;border-radius:38px;-webkit-transform:scale(.5);transform:scale(.5);transition:all .1s linear}md-slider .md-thumb:after{content:'';position:absolute;left:3px;top:3px;width:32px;height:32px;border-radius:32px;border-width:3px;border-style:solid}md-slider .md-sign{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:absolute;left:-14px;top:-20px;width:28px;height:28px;border-radius:28px;-webkit-transform:scale(.4) translate3d(0,70px,0);transform:scale(.4) translate3d(0,70px,0);transition:all .2s ease-in-out}md-slider .md-sign:after{position:absolute;content:'';left:0;border-radius:16px;top:19px;border-left:14px solid transparent;border-right:14px solid transparent;border-top-width:16px;border-top-style:solid;opacity:0;-webkit-transform:translate3d(0,-8px,0);transform:translate3d(0,-8px,0);transition:all .2s ease-in-out}md-slider .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider .md-focus-thumb{position:absolute;left:-24px;top:0;width:48px;height:48px;border-radius:48px;display:none;opacity:0;background-color:silver;-webkit-animation:sliderFocusThumb .4s linear;animation:sliderFocusThumb .4s linear}md-slider .md-focus-ring{position:absolute;left:-24px;top:0;width:48px;height:48px;border-radius:48px;border:2px solid #D6D6D6;background-color:transparent;-webkit-transform:scale(0);transform:scale(0);transition:all .2s linear}md-slider .md-disabled-thumb{position:absolute;left:-22px;top:2px;width:44px;height:44px;border-radius:44px;-webkit-transform:scale(.35);transform:scale(.35);border-width:6px;border-style:solid;display:none}md-slider.md-min .md-thumb:after{background-color:#fff}md-slider.md-min .md-sign{opacity:0}md-slider:focus{outline:0}md-slider.dragging .md-thumb-container,md-slider.dragging .md-track-fill{transition:none}md-slider:not([md-discrete]) .md-sign,md-slider:not([md-discrete]) .md-track-ticks{display:none}md-slider:not([md-discrete]):not([disabled]):hover .md-thumb{-webkit-transform:scale(.6);transform:scale(.6)}md-slider:not([md-discrete]):not([disabled]).active .md-focus-thumb,md-slider:not([md-discrete]):not([disabled]):focus .md-focus-thumb{display:block}md-slider:not([md-discrete]):not([disabled]).active .md-focus-ring,md-slider:not([md-discrete]):not([disabled]):focus .md-focus-ring{-webkit-transform:scale(1);transform:scale(1)}md-slider:not([md-discrete]):not([disabled]).active .md-thumb,md-slider:not([md-discrete]):not([disabled]):focus .md-thumb{-webkit-transform:scale(.85);transform:scale(.85)}md-slider[md-discrete] .md-focus-ring,md-slider[md-discrete] .md-focus-thumb{display:none}md-slider[md-discrete]:not([disabled]).active .md-sign,md-slider[md-discrete]:not([disabled]).active .md-sign:after,md-slider[md-discrete]:not([disabled]):focus .md-sign,md-slider[md-discrete]:not([disabled]):focus .md-sign:after{opacity:1;-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1)}md-slider[disabled] .md-sign,md-slider[disabled] .md-track-fill{display:none}md-slider[disabled] .md-thumb{-webkit-transform:scale(.35);transform:scale(.35)}md-slider[disabled] .md-disabled-thumb{display:block}@media screen and (-ms-high-contrast:active){md-slider.md-default-theme .md-track{border-bottom:1px solid #fff}}.md-sticky-clone{z-index:2;top:0;left:0;right:0;position:absolute!important;-webkit-transform:translate3d(-9999px,-9999px,0);transform:translate3d(-9999px,-9999px,0)}.md-sticky-clone[sticky-state=active]{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.md-sticky-clone[sticky-state=active]:not(.md-sticky-no-effect) .md-subheader-inner{-webkit-animation:subheaderStickyHoverIn .3s ease-out both;animation:subheaderStickyHoverIn .3s ease-out both}md-sidenav{box-sizing:border-box;position:absolute;width:304px;min-width:304px;max-width:304px;bottom:0;z-index:60;background-color:#fff;overflow:auto;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}md-sidenav *,md-sidenav :after,md-sidenav :before{box-sizing:border-box}md-sidenav ul{list-style:none}md-sidenav.md-closed{display:none}md-sidenav.md-closed-add,md-sidenav.md-closed-remove{display:-webkit-flex;display:-ms-flexbox;display:flex;transition:0s all}md-sidenav.md-closed-add.md-closed-add-active,md-sidenav.md-closed-remove.md-closed-remove-active{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-sidenav.md-locked-open-add,md-sidenav.md-locked-open-remove{position:static;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}md-sidenav.md-locked-open{width:304px;min-width:304px;max-width:304px}md-sidenav.md-locked-open,md-sidenav.md-locked-open-remove.md-closed,md-sidenav.md-locked-open.md-closed,md-sidenav.md-locked-open.md-closed.md-sidenav-left,md-sidenav.md-locked-open.md-closed.md-sidenav-right{position:static;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}md-sidenav.md-locked-open-remove-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:0;min-width:0}md-sidenav.md-closed.md-locked-open-add{width:0;min-width:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}md-sidenav.md-closed.md-locked-open-add-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:304px;min-width:304px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.md-sidenav-backdrop.md-locked-open{display:none}.md-sidenav-left,md-sidenav{left:0;top:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.md-sidenav-left.md-closed,md-sidenav.md-closed{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.md-sidenav-right{left:100%;top:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.md-sidenav-right.md-closed{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (max-width:360px){md-sidenav{width:85%}}@media screen and (-ms-high-contrast:active){.md-sidenav-left,md-sidenav{border-right:1px solid #fff}.md-sidenav-right{border-left:1px solid #fff}}@-webkit-keyframes subheaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes subheaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@-webkit-keyframes subheaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}@keyframes subheaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}.md-subheader{display:block;font-size:14px;font-weight:500;line-height:1em;margin:0 16px 0 0;position:relative}.md-subheader .md-subheader-inner{padding:16px 0 16px 16px}.md-subheader:not(.md-sticky-no-effect){transition:.2s ease-out margin}.md-subheader:not(.md-sticky-no-effect):after{position:absolute;left:0;bottom:0;top:0;right:-16px;content:''}.md-subheader:not(.md-sticky-no-effect).md-sticky-clone{z-index:2}.md-subheader:not(.md-sticky-no-effect)[sticky-state=active]{margin-top:-2px}.md-subheader:not(.md-sticky-no-effect):not(.md-sticky-clone)[sticky-prev-state=active] .md-subheader-inner:after{-webkit-animation:subheaderStickyHoverOut .3s ease-out both;animation:subheaderStickyHoverOut .3s ease-out both}.md-subheader .md-subheader-content{z-index:1;position:relative}md-switch{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:15px;white-space:nowrap;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}md-switch .md-container{cursor:-webkit-grab;cursor:grab;width:36px;height:24px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:8px}md-switch:not([disabled]) .md-dragging,md-switch:not([disabled]).md-dragging .md-container{cursor:-webkit-grabbing;cursor:grabbing}md-switch.md-focused:not([disabled]) .md-thumb:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-switch.md-focused:not([disabled]):not(.md-checked) .md-thumb:before{background-color:rgba(0,0,0,.12)}md-switch .md-label{border-color:transparent;border-width:0}md-switch .md-bar{left:1px;width:34px;top:5px;height:14px;border-radius:8px;position:absolute}md-switch .md-thumb-container{top:2px;left:0;width:16px;position:absolute;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:1}md-switch.md-checked .md-thumb-container{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}md-switch .md-thumb{position:absolute;margin:0;left:0;top:0;outline:0;height:20px;width:20px;border-radius:50%;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}md-switch .md-thumb:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-switch .md-thumb .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-20px;top:-20px;right:-20px;bottom:-20px}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb,md-switch:not(.md-dragging) .md-thumb-container{transition:all .5s cubic-bezier(.35,0,.25,1);transition-property:-webkit-transform,background-color;transition-property:transform,background-color}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb{transition-delay:.05s}@media screen and (-ms-high-contrast:active){md-switch.md-default-theme .md-bar{background-color:#666}md-switch.md-default-theme.md-checked .md-bar{background-color:#9E9E9E}md-switch.md-default-theme .md-thumb{background-color:#fff}}@-webkit-keyframes md-tab-content-hide{0%,50%{opacity:1}100%{opacity:0}}@keyframes md-tab-content-hide{0%,50%{opacity:1}100%{opacity:0}}md-tab-data{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;opacity:0}md-tabs{display:block;margin:0;border-radius:2px;overflow:hidden;position:relative;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}md-tabs.ng-animate{transition:height .5s cubic-bezier(.35,0,.25,1)}md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){}md-tabs[md-align-tabs=bottom] md-tabs-wrapper{position:absolute;bottom:0;left:0;right:0;height:48px}md-tabs[md-align-tabs=bottom] md-tabs-content-wrapper{top:0;bottom:48px}md-tabs.md-dynamic-height md-tabs-content-wrapper{min-height:0;position:relative;top:auto;left:auto;right:auto;bottom:auto;overflow:visible}md-tabs.md-dynamic-height md-tab-content.md-active{position:relative}md-tabs[md-border-bottom] md-tabs-wrapper{border-width:0 0 1px;border-style:solid}md-tabs[md-border-bottom]:not(.md-dynamic-height) md-tabs-content-wrapper{top:49px}md-tabs-wrapper{display:block;position:relative}md-tabs-wrapper md-next-button,md-tabs-wrapper md-prev-button{height:100%;width:32px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1em;z-index:2;cursor:pointer;font-size:16px;background:center center no-repeat;transition:all .5s cubic-bezier(.35,0,.25,1)}md-tabs-wrapper md-next-button:focus,md-tabs-wrapper md-prev-button:focus{outline:0}md-tabs-wrapper md-next-button.md-disabled,md-tabs-wrapper md-prev-button.md-disabled{opacity:.25;cursor:default}md-tabs-wrapper md-next-button.ng-leave,md-tabs-wrapper md-prev-button.ng-leave{transition:none}md-tabs-wrapper md-next-button md-icon,md-tabs-wrapper md-prev-button md-icon{position:absolute;top:50%;left:50%;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}md-tabs-wrapper md-prev-button{left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMjA4IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyIAkJIiBzdHlsZT0iZmlsbDp3aGl0ZTsiLz4gPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+IDwvZz4gPC9nPiA8ZyBpZD0iR3JpZCIgZGlzcGxheT0ibm9uZSI+IDxnIGRpc3BsYXk9ImlubGluZSI+IDwvZz4gPC9nPiA8L3N2Zz4NCg==)}md-tabs-wrapper md-next-button{right:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMzM2IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTAsNiA4LjYsNy40IDEzLjIsMTIgOC42LDE2LjYgMTAsMTggMTYsMTIgCQkiIHN0eWxlPSJmaWxsOndoaXRlOyIvPiA8cmVjdCBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz4gPC9nPiA8L2c+IDxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4gPGcgZGlzcGxheT0iaW5saW5lIj4gPC9nPiA8L2c+IDwvc3ZnPg0K)}md-tabs-wrapper md-next-button md-icon{-webkit-transform:translate3d(-50%,-50%,0) rotate(180deg);transform:translate3d(-50%,-50%,0) rotate(180deg)}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper{width:100%;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper md-tab-item{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1}md-tabs-canvas{position:relative;overflow:hidden;display:block;height:48px}md-tabs-canvas:after{content:'';display:table;clear:both}md-tabs-canvas .md-dummy-wrapper{position:absolute;top:0;left:0}md-tabs-canvas.md-paginated{margin:0 32px}md-tabs-canvas.md-center-tabs{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;text-align:center}md-tabs-canvas.md-center-tabs .md-tab{float:none;display:inline-block}md-pagination-wrapper{height:48px;display:block;transition:-webkit-transform .5s cubic-bezier(.35,0,.25,1);transition:transform .5s cubic-bezier(.35,0,.25,1);position:absolute;width:999999px;left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}md-pagination-wrapper:after{content:'';display:table;clear:both}md-pagination-wrapper.md-center-tabs{position:relative;width:initial;-webkit-flex:1;-ms-flex:1;flex:1;margin:0 auto}md-tabs-content-wrapper{display:block;position:absolute;top:48px;left:0;right:0;bottom:0;overflow:hidden}md-tab-content{display:block;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0);transition:-webkit-transform .5s cubic-bezier(.35,0,.25,1);transition:transform .5s cubic-bezier(.35,0,.25,1);overflow:auto}md-tab-content.md-no-scroll{bottom:auto;overflow:hidden}md-tab-content.md-no-transition,md-tab-content.ng-leave{transition:none}md-tab-content.md-left{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-animation:1s md-tab-content-hide;animation:1s md-tab-content-hide;opacity:0}md-tab-content.md-left *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content.md-right{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-animation:1s md-tab-content-hide;animation:1s md-tab-content-hide;opacity:0}md-tab-content.md-right *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content>div.ng-leave{-webkit-animation:1s md-tab-content-hide;animation:1s md-tab-content-hide}md-ink-bar{position:absolute;left:auto;right:auto;bottom:0;height:2px}md-ink-bar.md-left{transition:left .225s cubic-bezier(.35,0,.25,1),right .5s cubic-bezier(.35,0,.25,1)}md-ink-bar.md-right{transition:left .5s cubic-bezier(.35,0,.25,1),right .225s cubic-bezier(.35,0,.25,1)}md-tab{position:absolute;z-index:-1;left:-9999px}.md-tab{font-size:14px;text-align:center;line-height:24px;padding:12px 24px;transition:background-color .35s cubic-bezier(.35,0,.25,1);cursor:pointer;white-space:nowrap;position:relative;text-transform:uppercase;float:left;font-weight:500;box-sizing:border-box}.md-tab.md-focused{box-shadow:none;outline:0}.md-tab.md-active{cursor:default}.md-tab.md-disabled{pointer-events:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none;opacity:.5;cursor:default}.md-tab.ng-leave{transition:none}md-toolbar+md-tabs{border-top-left-radius:0;border-top-right-radius:0}md-toast{display:-webkit-flex;display:-ms-flexbox;display:flex;position:absolute;box-sizing:border-box;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:48px;padding-left:24px;padding-right:24px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;font-size:14px;cursor:default;max-width:100%;max-height:40px;height:24px;z-index:90;opacity:1;-webkit-transform:translate3d(0,0,0) rotateZ(0deg);transform:translate3d(0,0,0) rotateZ(0deg);transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast.md-capsule{border-radius:24px}md-toast.ng-leave-active{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-toast.md-swipedown,md-toast.md-swipeleft,md-toast.md-swiperight,md-toast.md-swipeup{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast.ng-enter{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);opacity:0}md-toast.ng-enter.md-top{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}md-toast.ng-enter.ng-enter-active{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}md-toast.ng-leave.ng-leave-active{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}md-toast.ng-leave.ng-leave-active.md-top{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}md-toast.ng-leave.ng-leave-active.md-swipeleft{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}md-toast.ng-leave.ng-leave-active.md-swiperight{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}md-toast .md-action{line-height:19px;margin-left:24px;cursor:pointer;text-transform:uppercase;float:right}md-toast .md-action.md-button{min-width:0}@media (max-width:600px){md-toast{left:0;right:0;width:100%;max-width:100%;min-width:0;border-radius:0;bottom:0}md-toast.md-top{bottom:auto;top:0}}@media (min-width:600px){md-toast{min-width:288px}md-toast.md-bottom{bottom:8px}md-toast.md-left{left:8px}md-toast.md-right{right:8px}md-toast.md-top{top:8px}md-toast.ng-leave.ng-leave-active.md-swipeleft{-webkit-transform:translate3d(-100%,25%,0) rotateZ(-15deg);transform:translate3d(-100%,25%,0) rotateZ(-15deg)}md-toast.ng-leave.ng-leave-active.md-swiperight{-webkit-transform:translate3d(100%,25%,0) rotateZ(15deg);transform:translate3d(100%,25%,0) rotateZ(15deg)}md-toast.ng-leave.ng-leave-active.md-top.md-swipeleft{-webkit-transform:translate3d(-100%,0,0) rotateZ(-15deg);transform:translate3d(-100%,0,0) rotateZ(-15deg)}md-toast.ng-leave.ng-leave-active.md-top.md-swiperight{-webkit-transform:translate3d(100%,0,0) rotateZ(15deg);transform:translate3d(100%,0,0) rotateZ(15deg)}}@media (min-width:1200px){md-toast{max-width:568px}}@media screen and (-ms-high-contrast:active){md-toast{border:1px solid #fff}}md-toolbar{box-sizing:border-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:relative;z-index:2;font-size:20px;min-height:64px;width:100%}md-toolbar.md-whiteframe-z1-add,md-toolbar.md-whiteframe-z1-remove{transition:box-shadow .5s linear}md-toolbar *,md-toolbar :after,md-toolbar :before{box-sizing:border-box}md-toolbar.md-tall{height:128px;min-height:128px;max-height:128px}md-toolbar.md-medium-tall{height:88px;min-height:88px;max-height:88px}md-toolbar.md-medium-tall .md-toolbar-tools{height:48px;min-height:48px;max-height:48px}md-toolbar .md-indent{margin-left:64px}md-toolbar~md-content>md-list{padding:0}md-toolbar~md-content>md-list md-list-item:last-child md-divider{display:none}.md-toolbar-tools{font-weight:400;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;width:100%;height:64px;max-height:64px;padding:0 16px;margin:0}.md-toolbar-tools h1,.md-toolbar-tools h2,.md-toolbar-tools h3{font-size:inherit;font-weight:inherit;margin:inherit}.md-toolbar-tools a{color:inherit;text-decoration:none}.md-toolbar-tools .fill-height{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.md-toolbar-tools .md-button{margin-top:0;margin-bottom:0}.md-toolbar-tools>.md-button:first-child{margin-left:-8px}.md-toolbar-tools>.md-button:last-child{margin-right:-8px}@media screen and (-ms-high-contrast:active){.md-toolbar-tools{border-bottom:1px solid #fff}}md-tooltip{position:absolute;z-index:100;overflow:hidden;pointer-events:none;border-radius:4px;font-weight:500;font-size:14px}@media screen and (min-width:600px){md-tooltip{font-size:10px}}md-tooltip .md-background{position:absolute;border-radius:50%;-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0);opacity:1}md-tooltip .md-background.md-show-add{transition:all .4s cubic-bezier(.25,.8,.25,1);-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0);opacity:0}md-tooltip .md-background.md-show,md-tooltip .md-background.md-show-add-active{-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1}md-tooltip .md-background.md-show-remove{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip .md-background.md-show-remove.md-show-remove-active{-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0);opacity:0}md-tooltip .md-content{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:0 0;opacity:0;height:32px;line-height:32px;padding-left:16px;padding-right:16px}@media screen and (min-width:600px){md-tooltip .md-content{height:22px;line-height:22px;padding-left:8px;padding-right:8px}}md-tooltip .md-content.md-show-add{transition:all .4s cubic-bezier(.25,.8,.25,1);opacity:0}md-tooltip .md-content.md-show,md-tooltip .md-content.md-show-add-active{opacity:1}md-tooltip .md-content.md-show-remove{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip .md-content.md-show-remove.md-show-remove-active{opacity:0}md-tooltip.md-hide{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip.md-show{transition:all .4s cubic-bezier(.25,.8,.25,1);pointer-events:auto;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.md-whiteframe-z1{box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}.md-whiteframe-z2{box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084)}.md-whiteframe-z3{box-shadow:0 3px 5px -1px rgba(0,0,0,.14),0 6px 10px 0 rgba(0,0,0,.098),0 1px 18px 0 rgba(0,0,0,.084)}.md-whiteframe-z4{box-shadow:0 5px 5px -3px rgba(0,0,0,.14),0 8px 10px 1px rgba(0,0,0,.098),0 3px 14px 2px rgba(0,0,0,.084)}.md-whiteframe-z5{box-shadow:0 8px 10px -5px rgba(0,0,0,.14),0 16px 24px 2px rgba(0,0,0,.098),0 6px 30px 5px rgba(0,0,0,.084)}@media screen and (-ms-high-contrast:active){md-whiteframe{border:1px solid #fff}} \ No newline at end of file diff --git a/css/custom.css b/css/custom.css new file mode 100644 index 0000000..2fdd4de --- /dev/null +++ b/css/custom.css @@ -0,0 +1,112 @@ +html{ + +} +body{ +} +/* ng-cloak */ +[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng.ng-cloak { + display: none; +} + +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(/css/MaterialIcons-Regular.eot); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url(/css/MaterialIcons-Regular.woff2) format('woff2'), + url(/css/MaterialIcons-Regular.woff) format('woff'), + url(/css/MaterialIcons-Regular.ttf) format('truetype'); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} + +.forCategories{ + /*background-color: #d9534f;*/ + display: inline-table; + list-style: inside none none; + padding: 0 20px; + text-align: center; +} +#forCategories{ + text-align: center; + width: 100%; +} +.forCategories a{ + color: #d9534f; +} +/*#forCategories span a{*/ + /*-moz-transform: rotate(-90deg);*/ + /*-ms-transform: rotate(-90deg);*/ + /*-o-transform: rotate(-90deg);*/ + /*-webkit-transform: rotate(-90deg);*/ +/*}*/ +.activeHref{ + color: #cd0a0a; +} + +.hidedEdit{ + display: none; +} +.shownEdit textarea{ + height: 100%; + width: 100%; +} + +.bolded{ + font-weight: bold; + font-size: larger; +} + +.emptySell{ + background-color: #fbc9fb !important; + border-color: #b5b5b5 !important; +} + +.vx-blur{ + -webkit-filter: blur(5px); + -moz-filter: blur(5px); + -o-filter: blur(5px); + -ms-filter: blur(5px); + filter: blur(5px); +} + +md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) { + height: 100%; +} + +md-tabs-canvas { + height: 30px; +} + +.md-tab { + line-height: 17px; + padding: 7px 24px; +} +md-tabs-content-wrapper { + top: 30px; +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..786011d --- /dev/null +++ b/index.html @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/angular-animate.min.js b/js/angular-animate.min.js new file mode 100644 index 0000000..ad78298 --- /dev/null +++ b/js/angular-animate.min.js @@ -0,0 +1,52 @@ +/* + AngularJS v1.4.1 + (c) 2010-2015 Google, Inc. http://angularjs.org + License: MIT +*/ +(function(F,t,W){'use strict';function ua(a,b,c){if(!a)throw ngMinErr("areq",b||"?",c||"required");return a}function va(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;X(a)&&(a=a.join(" "));X(b)&&(b=b.join(" "));return a+" "+b}function Ea(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function ba(a,b,c){var d="";a=X(a)?a:a&&U(a)&&a.length?a.split(/\s+/):[];u(a,function(a,s){a&&0=F&&b>=J&&(C=!0,h())}if(!K){var x,p=[],l=function(a){if(C)D&&a&&(D=!1,h());else if(D=!a,y.animationDuration)if(a=ma(k,D),D)m.push(a);else{var b=m,c=b.indexOf(a);0<=a&&b.splice(c,1)}},r=0< +U&&(y.transitionDuration&&0===T.transitionDuration||y.animationDuration&&0===T.animationDuration)&&Math.max(T.animationDelay,T.transitionDelay);r?n(b,Math.floor(r*U*1E3),!1):b();t.resume=function(){l(!0)};t.pause=function(){l(!1)}}}var k=A(a);c=ia(c);var m=[],r=a.attr("class"),v=Ea(c),K,D,C,p,t,H,F,J,G;if(0===c.duration||!l.animations&&!l.transitions)return x();var aa=c.event&&X(c.event)?c.event.join(" "):c.event,R="",N="";aa&&c.structural?R=ba(aa,"ng-",!0):aa&&(R=aa);c.addClass&&(N+=ba(c.addClass, +"-add"));c.removeClass&&(N.length&&(N+=" "),N+=ba(c.removeClass,"-remove"));c.applyClassesEarly&&N.length&&(B(a,c),N="");var Y=[R,N].join(" ").trim(),fa=r+" "+Y,W=ba(Y,"-active"),r=v.to&&0-1&&e-1}function p(){return E.length?E[0]:null}function h(){return E.length?E[E.length-1]:null}function b(e,o,r,a){r=r||g;for(var d=u(o);;){if(!i(d))return null;var c=d+(e?-1:1),l=null;if(i(c)?l=E[c]:n&&(l=e?h():p(),c=u(l)),null===l||c===a)return null;if(r(l))return l;t.isUndefined(a)&&(a=c),d=c}}var g=function(){return!0};e&&!t.isArray(e)&&(e=Array.prototype.slice.call(e)),n=!!n;var E=e||[];return{items:o,count:r,inRange:i,contains:f,indexOf:u,itemAt:c,findBy:l,add:m,remove:s,first:p,last:h,next:t.bind(null,b,!1),previous:t.bind(null,b,!0),hasPrevious:d,hasNext:a}}t.module("material.core").config(["$provide",function(t){t.decorator("$mdUtil",["$delegate",function(t){return t.iterator=e,t}])}])}(),function(){function e(e,n,o){function r(e){var n=u[e];t.isUndefined(n)&&(n=u[e]=i(e));var o=p[n];return t.isUndefined(o)&&(o=a(n)),o}function i(t){return e.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)}function a(e){var t=f[e]=o.matchMedia(e);return t.addListener(d),p[t.media]=!!t.matches}function d(e){n.$evalAsync(function(){p[e.media]=!!e.matches})}function c(e){return f[e]}function l(t,n){for(var o=0;o
');return a.appendChild(d[0]),d.on("wheel",o),d.on("touchmove",o),i.on("keydown",n),function(){d.off("wheel"),d.off("touchmove"),d[0].parentNode.removeChild(d[0]),i.off("keydown",n),delete s.disableScrollAround._enableScrolling}}function o(){var e=a.getAttribute("style")||"",t=a.scrollTop+a.parentElement.scrollTop;return r(a,{position:"fixed",width:"100%",overflowY:"scroll",top:-t+"px"}),function(){a.setAttribute("style",e),a.scrollTop=t}}function r(e,t){for(var n in t)e.style[n]=t[n]}if(s.disableScrollAround._enableScrolling)return s.disableScrollAround._enableScrolling;e=t.element(e);var a=i[0].body,d=o(),l=n();return s.disableScrollAround._enableScrolling=function(){d(),l(),delete s.disableScrollAround._enableScrolling}},enableScrolling:function(){var e=this.disableScrollAround._enableScrolling;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===n){var e=t.element('
');i[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(t){var n=t[0]||t;document.addEventListener("click",function r(e){e.target===n&&e.$focus&&(n.focus(),e.stopImmediatePropagation(),e.preventDefault(),n.removeEventListener("click",r))},!0);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!1,!0,e,{},0,0,0,0,!1,!1,!1,!1,0,null),o.$material=!0,o.$focus=!0,n.dispatchEvent(o)},transitionEndPromise:function(e,t){function n(t){t&&t.target!==e[0]||(e.off(l.CSS.TRANSITIONEND,n),o.resolve())}t=t||{};var o=d.defer();return e.on(l.CSS.TRANSITIONEND,n),t.timeout&&a(n,t.timeout),o.promise},fakeNgModel:function(){return{$fake:!0,$setTouched:t.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:t.noop}},debounce:function(e,t,o,r){var i;return function(){var d=o,c=Array.prototype.slice.call(arguments);a.cancel(i),i=a(function(){i=n,e.apply(d,c)},t||10,r)}},throttle:function(e,t){var n;return function(){var o=this,r=arguments,i=s.now();(!n||i-n>t)&&(e.apply(o,r),n=i)}},time:function(e){var t=s.now();return e(),s.now()-t},nextUid:function(){return""+o++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,n,o){if(e instanceof t.element&&(e=e[0]),n=n.toUpperCase(),o&&(e=e.parentNode),!e)return null;do if(e.nodeName===n)return e;while(e=e.parentNode);return null},extractElementByName:function(e,n){for(var o=0,r=e.length;r>o;o++)if(e[o].nodeName.toLowerCase()===n)return t.element(e[o]);return e},initOptionalProperties:function(e,n,o){o=o||{},t.forEach(e.$$isolateBindings,function(r,i){if(r.optional&&t.isUndefined(e[i])){var a=n.hasOwnProperty(n.$normalize(r.attrName));e[i]=t.isDefined(o[i])?o[i]:a}})}}}]),t.element.prototype.focus=t.element.prototype.focus||function(){return this.length&&this[0].focus(),this},t.element.prototype.blur=t.element.prototype.blur||function(){return this.length&&this[0].blur(),this}}(),function(){function e(e,n,o){function r(e,o,r){var i=e[0]||e;!i||i.hasAttribute(o)&&0!==i.getAttribute(o).length||c(i,o)||(r=t.isString(r)?r.trim():"",r.length?e.attr(o,r):n.warn('ARIA: Attribute "',o,'", required for accessibility, is missing on node:',i))}function i(t,n,o){e(function(){r(t,n,o())})}function a(e,t){i(e,t,function(){return d(e)})}function d(e){return e.text().trim()}function c(e,t){function n(e){var t=e.currentStyle?e.currentStyle:o.getComputedStyle(e);return"none"===t.display}var r=e.hasChildNodes(),i=!1;if(r)for(var a=e.childNodes,d=0;d").html(n.trim()).contents(),a=r(o);return{locals:e,element:o,link:function(n){if(e.$scope=n,m){var r=i(m,e,!0);h&&t.extend(r.instance,e);var d=r();o.data("$ngControllerController",d),o.children().data("$ngControllerController",d),s&&(n[s]=d)}return a(n)}}})}}t.module("material.core").service("$mdCompiler",e),e.$inject=["$q","$http","$injector","$compile","$controller","$templateCache"]}(),function(){function n(){}function o(n,o,r){function i(e,t,n){var o=f[t.replace(/^\$md./,"")];if(!o)throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(f).join(", "));return o.registerElement(e,n)}function a(e,o){var r=new n(e);return t.extend(r,o),f[e]=r,h}var c=navigator.userAgent||navigator.vendor||e.opera,m=c.match(/ipad|iphone|ipod/i),s=c.match(/android/i),u="undefined"!=typeof e.jQuery&&t.element===e.jQuery,h={handler:a,register:i,isHijackingClicks:(m||s)&&!u&&!p};return h.isHijackingClicks&&h.handler("click",{options:{maxDistance:6},onEnd:function(e,t){t.distancethis.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,o=Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,o=Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=d(e),l(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:o.throttle(function(e){this.state.isRunning&&(l(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(l(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){if(Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance){var n="left"==t.directionX?"$md.swipeleft":"$md.swiperight";this.dispatchEvent(e,n)}}})}function r(e){this.name=e,this.state={}}function i(){function n(e,n,o){o=o||s;var r=new t.element.Event(n);r.$material=!0,r.pointer=o,r.srcEvent=e,t.extend(r,{clientX:o.x,clientY:o.y,screenX:o.x,screenY:o.y,pageX:o.x,pageY:o.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),t.element(o.target).trigger(r)}function o(t,n,o){o=o||s;var r;"click"===n?(r=document.createEvent("MouseEvents"),r.initMouseEvent("click",!0,!0,e,t.detail,o.x,o.y,o.x,o.y,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget||null)):(r=document.createEvent("CustomEvent"),r.initCustomEvent(n,!0,!0,{})),r.$material=!0,r.pointer=o,r.srcEvent=t,o.target.dispatchEvent(r)}var i="undefined"!=typeof e.jQuery&&t.element===e.jQuery;return r.prototype={options:{},dispatchEvent:i?n:o,onStart:t.noop,onMove:t.noop,onEnd:t.noop,onCancel:t.noop,start:function(e,n){if(!this.state.isRunning){var o=this.getNearestParent(e.target),r=o&&o.$mdGesture[this.name]||{};this.state={isRunning:!0,options:t.extend({},this.options,r),registeredParent:o},this.onStart(e,n)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){function n(){delete e[0].$mdGesture[o.name],e.off("$destroy",n)}var o=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",n),n}},r}function a(e,n){function o(e,t){var o;for(var r in f)o=f[r],o instanceof n&&("start"===e&&o.cancel(),o[e](t,s))}function r(e){if(!s){var t=+Date.now();u&&!c(e,u)&&t-u.endTime<1500||(s=d(e),o("start",e))}}function i(e){s&&c(e,s)&&(l(e,s),o("move",e))}function a(e){s&&c(e,s)&&(l(e,s),s.endTime=+Date.now(),o("end",e),u=s,s=null)}document.contains||(document.contains=function(e){return document.body.contains(e)}),!h&&e.isHijackingClicks&&(document.addEventListener("click",function(e){var t=0===e.clientX&&0===e.clientY;t||e.$material||e.isIonicTap||(e.preventDefault(),e.stopPropagation())},!0),h=!0);var m="mousedown touchstart pointerdown",p="mousemove touchmove pointermove",b="mouseup mouseleave touchend touchcancel pointerup pointercancel";t.element(document).on(m,r).on(p,i).on(b,a).on("$$mdGestureReset",function(){u=s=null})}function d(e){var t=m(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function c(e,t){return e&&t&&e.type.charAt(0)===t.type}function l(e,t){var n=m(e),o=t.x=n.pageX,r=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=r-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=t.distanceX>0?"right":t.distanceX<0?"left":"",t.directionY=t.distanceY>0?"up":t.distanceY<0?"down":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function m(e){return e=e.originalEvent||e,e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}var s,u,f={},p=!1,h=!1;t.module("material.core.gestures",[]).provider("$mdGesture",n).factory("$$MdGestureHandler",i).run(a),n.prototype={skipClickHijack:function(){return p=!0},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new o(e,t,n)}]},o.$inject=["$$MdGestureHandler","$$rAF","$timeout"],a.$inject=["$mdGesture","$$MdGestureHandler"]}(),function(){function e(){function e(e){function n(e){return c.optionsFactory=e.options,c.methods=(e.methods||[]).concat(a),l}function o(e,t){return d[e]=t,l}function r(t,n){if(n=n||{},n.methods=n.methods||[],n.options=n.options||function(){return{}},/^cancel|hide|show$/.test(t))throw new Error("Preset '"+t+"' in "+e+" is reserved!");if(n.methods.indexOf("_options")>-1)throw new Error("Method '_options' in "+e+" is reserved!");return c.presets[t]={methods:n.methods.concat(a),optionsFactory:n.options,argOption:n.argOption},l}function i(n,o,r){function i(e){return e&&e._options&&(e=e._options),s.show(t.extend({},m,e))}function a(t,n){var o={};return o[e]=u,r.invoke(t||function(){return n},{},o)}var l,m,s=n(),u={hide:s.hide,cancel:s.cancel,show:i};return l=c.methods||[],m=a(c.optionsFactory,{}),t.forEach(d,function(e,t){u[t]=e}),t.forEach(c.presets,function(e,n){function o(e){this._options=t.extend({},r,e)}var r=a(e.optionsFactory,{}),i=(e.methods||[]).concat(l);if(t.extend(r,{$type:n}),t.forEach(i,function(e){o.prototype[e]=function(t){return this._options[e]=t,this}}),e.argOption){var d="show"+n.charAt(0).toUpperCase()+n.slice(1);u[d]=function(e){var t=u[n](e);return u.show(t)}}u[n]=function(n){return arguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(new o)[e.argOption](n):new o(n)}}),u}var a=["onHide","onShow","onRemove"],d={},c={presets:{}},l={setDefaults:n,addPreset:r,addMethod:o,$get:i};return l.addPreset("build",{methods:["controller","controllerAs","resolve","template","templateUrl","themable","transformTemplate","parent"]}),i.$inject=["$$interimElement","$animate","$injector"],l}function o(e,o,r,i,a,d,c,l,m){function s(e){return e&&t.isString(e)?e.replace(/\{\{/g,u).replace(/}}/g,f):e}var u=c.startSymbol(),f=c.endSymbol(),p="{{"===u&&"}}"===f,h=p?t.identity:s;return function(){function c(e){if(b.length)return p.cancel().then(function(){return c(e)});var t=new f(e);return b.push(t),t.show().then(function(){return t.deferred.promise})}function s(e){var t=b.shift();return t&&t.remove().then(function(){t.deferred.resolve(e)})}function u(e){var t=b.shift();return o.when(t&&t.remove().then(function(){t.deferred.reject(e)}))}function f(c){var s,u,f,b,g;return c=c||{},c=t.extend({preserveScope:!1,scope:c.scope||r.$new(c.isolateScope),onShow:function(e,t,n){return d.enter(t,n.parent)},onRemove:function(e,t,n){return t&&d.leave(t)||o.when()}},c),c.template&&(c.template=h(c.template)),s={options:c,deferred:o.defer(),show:function(){var n;return n=c.skipCompile?o(function(e){e({locals:{},link:function(){return c.element}})}):l.compile(c),b=n.then(function(n){function r(){c.hideDelay&&(u=i(p.cancel,c.hideDelay))}if(t.extend(n.locals,s.options),f=n.link(c.scope),t.isFunction(c.parent)?c.parent=c.parent(c.scope,f,c):t.isString(c.parent)&&(c.parent=t.element(e[0].querySelector(c.parent))),!(c.parent||{}).length){var d;a[0]&&a[0].querySelector&&(d=a[0].querySelector(":not(svg) > body")),d||(d=a[0]),"#comment"==d.nodeName&&(d=e[0].body),c.parent=t.element(d)}c.themable&&m(f);var l=c.onShow(c.scope,f,c);return o.when(l).then(function(){(c.onComplete||t.noop)(c.scope,f,c),r()})},function(e){b=!0,s.deferred.reject(e)})},cancelTimeout:function(){u&&(i.cancel(u),u=n)},remove:function(){return s.cancelTimeout(),g=o.when(b).then(function(){var e=f?c.onRemove(c.scope,f,c):!0;return o.when(e).then(function(){c.preserveScope||c.scope.$destroy(),g=!0})})}}}var p,b=[];return p={show:c,hide:s,cancel:u}}}return e.$get=o,o.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$interpolate","$mdCompiler","$mdTheming"],e}t.module("material.core").provider("$$interimElement",e)}(),function(){function e(e,n){function o(e){return e&&""!==e}var r,i=[],a={};return r={notFoundError:function(t){e.error("No instance found for handle",t)},getInstances:function(){return i},get:function(e){if(!o(e))return null;var t,n,r;for(t=0,n=i.length;n>t;t++)if(r=i[t],r.$$mdHandle===e)return r;return null},register:function(e,n){function o(){var t=i.indexOf(e);-1!==t&&i.splice(t,1)}function r(){var t=a[n];t&&(t.resolve(e),delete a[n])}return n?(e.$$mdHandle=n,i.push(e),r(),o):t.noop},when:function(e){if(o(e)){var t=n.defer(),i=r.get(e);return i?t.resolve(i):a[e]=t,t.promise}return n.reject("Invalid `md-component-id` value.")}}}t.module("material.core").factory("$mdComponentRegistry",e),e.$inject=["$log","$q"]}(),function(){!function(){function e(e){function n(n,r,i){var a=o(r);return e.attach(n,r,t.extend(a,i))}function o(e){return e.hasClass("md-icon-button")?{isMenuItem:e.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:e.hasClass("md-menu-item"),dimBackground:!0}}return{attach:n}}t.module("material.core").factory("$mdButtonInkRipple",e),e.$inject=["$mdInkRipple"]}()}(),function(){!function(){function e(e){function n(n,o,r){return e.attach(n,o,t.extend({center:!0,dimBackground:!1,fitRipple:!0},r))}return{attach:n}}t.module("material.core").factory("$mdCheckboxInkRipple",e),e.$inject=["$mdInkRipple"]}()}(),function(){!function(){function e(e){function n(n,o,r){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},r))}return{attach:n}}t.module("material.core").factory("$mdListInkRipple",e),e.$inject=["$mdInkRipple"]}()}(),function(){function e(e,n){return{controller:t.noop,link:function(t,o,r){r.hasOwnProperty("mdInkRippleCheckbox")?n.attach(t,o):e.attach(t,o)}}}function n(e,n){function o(o,r,i){function a(){var e=r.data("$mdRippleContainer");return e?e:(e=t.element('
'),r.append(e),r.data("$mdRippleContainer",e),e)}function d(e){function t(e){var t="#"===e.charAt(0)?e.substr(1):e,n=t.length/3,o=t.substr(0,n),r=t.substr(n,n),i=t.substr(2*n);return 1===n&&(o+=o,r+=r,i+=i),"rgba("+parseInt(o,16)+","+parseInt(r,16)+","+parseInt(i,16)+",0.1)"}function n(e){return e.replace(")",", 0.1)").replace("(","a(")}if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,"0.1)"):0===e.indexOf("rgb")?n(e):0===e.indexOf("#")?t(e):void 0}function c(e,t){g.splice(g.indexOf(e),1),0===g.length&&a().css({backgroundColor:""}),n(function(){e.remove()},t,!1)}function l(e){var t=g.indexOf(e),n=E[t]||{},o=g.length>1?!1:M,r=g.length>1?!1:$;o||n.animating||r?e.addClass("md-ripple-visible"):e&&(e.removeClass("md-ripple-visible"),i.outline&&e.css({width:p+"px",height:p+"px",marginLeft:-1*p+"px",marginTop:-1*p+"px"}),c(e,i.outline?450:650))}function m(o,c){function m(e){var n=t.element('
');return g.unshift(n),E.unshift({animating:!0}),f.append(n),e&&n.css(e),n}function s(e,t){var n,o,r,a=f.prop("offsetWidth"),d=f.prop("offsetHeight");return i.isMenuItem?o=Math.sqrt(Math.pow(a,2)+Math.pow(d,2)):i.outline?(r=A.getBoundingClientRect(),e-=r.left,t-=r.top,a=Math.max(e,a-e),d=Math.max(t,d-t),o=2*Math.sqrt(Math.pow(a,2)+Math.pow(d,2))):(n=i.fullRipple?1.1:.8,o=Math.sqrt(Math.pow(a,2)+Math.pow(d,2))*n,i.fitRipple&&(o=Math.min(d,a,o))),o}function u(e,t,n){function o(e){return e.replace("rgba","rgb").replace(/,[^\),]+\)/,")")}var r=A.getBoundingClientRect(),a={backgroundColor:o(T),borderColor:o(T),width:e+"px",height:e+"px"};return i.outline?(a.width=0,a.height=0):a.marginLeft=a.marginTop=e*-.5+"px",i.center?a.left=a.top="50%":(a.left=Math.round((t-r.left)/f.prop("offsetWidth")*100)+"%",a.top=Math.round((n-r.top)/f.prop("offsetHeight")*100)+"%"),a}T=d(r.attr("md-ink-ripple"))||d(e.getComputedStyle(i.colorElement[0]).color||"rgb(0, 0, 0)");var f=a(),h=s(o,c),v=u(h,o,c),M=m(v),$=g.indexOf(M),C=E[$]||{};return p=h,C.animating=!0,n(function(){i.dimBackground&&f.css({backgroundColor:T}),M.addClass("md-ripple-placed md-ripple-scaled"),M.css(i.outline?{borderWidth:.5*h+"px",marginLeft:h*-.5+"px",marginTop:h*-.5+"px"}:{left:"50%",top:"50%"}),l(M),n(function(){C.animating=!1,l(M)},i.outline?450:225,!1)},0,!1),M}function s(e){f()&&(m(e.pointer.x,e.pointer.y),$=!0)}function u(){$=!1;var e=g[g.length-1];n(function(){l(e)},0,!1)}function f(){function e(e){return e&&e.hasAttribute&&e.hasAttribute("disabled")}var t=A.parentNode,n=t&&t.parentNode,o=n&&n.parentNode;return!(e(A)||e(t)||e(n)||e(o))}if(r.controller("mdNoInk"))return t.noop;i=t.extend({colorElement:r,mousedown:!0,hover:!0,focus:!0,center:!1,mousedownPauseTime:150,dimBackground:!1,outline:!1,fullRipple:!0,isMenuItem:!1,fitRipple:!1},i);var p,h=r.controller("mdInkRipple")||{},b=0,g=[],E=[],v=r.attr("md-highlight"),M=!1,$=!1,A=r[0],C=r.attr("md-ripple-size"),T=d(r.attr("md-ink-ripple"))||d(i.colorElement.length&&e.getComputedStyle(i.colorElement[0]).color||"rgb(0, 0, 0)");switch(C){case"full":i.fullRipple=!0;break;case"partial":i.fullRipple=!1}return i.mousedown&&r.on("$md.pressdown",s).on("$md.pressup",u),h.createRipple=m,v&&o.$watch(v,function(e){M=e,M&&!g.length&&n(function(){m(0,0)},0,!1),t.forEach(g,l)}),function(){r.off("$md.pressdown",s).off("$md.pressup",u),a().remove()}}return{attach:o}}function o(){return function(){return{controller:t.noop}}}t.module("material.core").factory("$mdInkRipple",n).directive("mdInkRipple",e).directive("mdNoInk",o()).directive("mdNoBar",o()).directive("mdNoStretch",o()),e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],n.$inject=["$window","$timeout"]}(),function(){!function(){function e(e){function n(n,o,r){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},r))}return{attach:n}}t.module("material.core").factory("$mdTabInkRipple",e),e.$inject=["$mdInkRipple"]}()}(),function(){t.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900 A700",contrastStrongLightColors:"500 600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700 800"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037", + 800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",1000:"#000000",A100:"#ffffff",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300",contrastStrongLightColors:"400 500"}})}(),function(){function e(e){function o(e,t){return t=t||{},m[e]=a(e,t),g}function r(e,n){return a(e,t.extend({},m[e]||{},n))}function a(e,t){var n=T.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function d(e,n){if(s[e])return s[e];n=n||"default";var o="string"==typeof n?s[n]:n,r=new c(e);return o&&t.forEach(o.colors,function(e,n){r.colors[n]={name:e.name,hues:t.extend({},e.hues)}}),s[e]=r,r}function c(e){function n(e){if(e=0===arguments.length?!0:!!e,e!==o.isDark){o.isDark=e,o.foregroundPalette=o.isDark?p:f,o.foregroundShadow=o.isDark?h:b;var n=o.isDark?C:A,r=o.isDark?A:C;return t.forEach(n,function(e,t){var n=o.colors[t],i=r[t];if(n)for(var a in n.hues)n.hues[a]===i[a]&&(n.hues[a]=e[a])}),o}}var o=this;o.name=e,o.colors={},o.dark=n,n(!1),M.forEach(function(e){var n=(o.isDark?C:A)[e];o[e+"Palette"]=function(r,i){var a=o.colors[e]={name:r,hues:t.extend({},n,i)};return Object.keys(a.hues).forEach(function(e){if(!n[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",o.name).replace("%3",r).replace("%4",Object.keys(n).join(", ")))}),Object.keys(a.hues).map(function(e){return a.hues[e]}).forEach(function(t){if(-1==T.indexOf(t))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",t).replace("%2",o.name).replace("%3",e).replace("%4",r).replace("%5",T.join(", ")))}),o},o[e+"Color"]=function(){var t=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+e+"Color() has been deprecated. Use $mdThemingProviderTheme."+e+"Palette() instead."),o[e+"Palette"].apply(o,t)}})}function u(e,o){function r(e){return e===n||""===e?!0:i.THEMES[e]!==n}function i(t,o){o===n&&(o=t,t=n),t===n&&(t=e),i.inherit(o,o)}return i.inherit=function(n,i){function a(e){r(e)||o.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e)}var d=i.controller("mdTheme"),c=n.attr("md-theme-watch");if((v||t.isDefined(c))&&"false"!=c){var l=e.$watch(function(){return d&&d.$mdTheme||E},a);n.on("$destroy",l)}else{var m=d&&d.$mdTheme||E;a(m)}},i.THEMES=t.extend({},s),i.defaultTheme=function(){return E},i.registered=r,i}m={},s={};var g,E="default",v=!1;return t.extend(m,e),u.$inject=["$rootScope","$log"],g={definePalette:o,extendPalette:r,theme:d,setDefaultTheme:function(e){E=e},alwaysWatchTheme:function(e){v=e},$get:u,_LIGHT_DEFAULT_HUES:A,_DARK_DEFAULT_HUES:C,_PALETTES:m,_THEMES:s,_parseRules:i,_rgba:l}}function o(e,t,n){return{priority:100,link:{pre:function(o,r,i){var a={$setTheme:function(t){e.registered(t)||n.warn("attempted to use unregistered theme '"+t+"'"),a.$mdTheme=t}};r.data("$mdThemeController",a),a.$setTheme(t(i.mdTheme)(o)),i.$observe("mdTheme",a.$setTheme)}}}}function r(e){return e}function i(e,n,o){d(e,n),o=o.replace(/THEME_NAME/g,e.name);var r=[],i=e.colors[n],a=new RegExp(".md-"+e.name+"-theme","g"),c=new RegExp("('|\")?{{\\s*("+n+")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),s=/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow)-?(\d\.?\d*)?\s*\}\}'?"?/g,u=m[i.name];return o=o.replace(s,function(t,n,o,r){return"foreground"===n?"shadow"==o?e.foregroundShadow:e.foregroundPalette[o]||e.foregroundPalette[1]:(0===o.indexOf("hue")&&(o=e.colors[n].hues[o]),l((m[e.colors[n].name][o]||"").value,r))}),t.forEach(i.hues,function(t,n){var i=o.replace(c,function(e,n,o,r,i){return l(u[t]["color"===r?"value":"contrast"],i)});"default"!==n&&(i=i.replace(a,".md-"+e.name+"-theme.md-"+n)),"default"==e.name&&(i=i.replace(/\.md-default-theme/g,"")),r.push(i)}),r}function a(e){function n(e){var n=e.contrastDefaultColor,o=e.contrastLightColors||[],r=e.contrastStrongLightColors||[],i=e.contrastDarkColors||[];"string"==typeof o&&(o=o.split(" ")),"string"==typeof r&&(r=r.split(" ")),"string"==typeof i&&(i=i.split(" ")),delete e.contrastDefaultColor,delete e.contrastLightColors,delete e.contrastStrongLightColors,delete e.contrastDarkColors,t.forEach(e,function(a,d){function l(){return"light"===n?i.indexOf(d)>-1?g:r.indexOf(d)>-1?v:E:o.indexOf(d)>-1?r.indexOf(d)>-1?v:E:g}if(!t.isObject(a)){var m=c(a);if(!m)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",a).replace("%2",e.name).replace("%3",d));e[d]={value:m,contrast:l()}}})}var o=document.getElementsByTagName("head")[0],r=o?o.firstElementChild:null,a=e.has("$MD_THEME_CSS")?e.get("$MD_THEME_CSS"):"";if(r&&0!==a.length){t.forEach(m,n);var d={},l=a.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.length}).map(function(e){return e.trim()+"}"}),f=new RegExp("md-("+M.join("|")+")","g");M.forEach(function(e){d[e]=""}),l.forEach(function(e){for(var t,n=(e.match(f),0);t=M[n];n++)if(e.indexOf(".md-"+t)>-1)return d[t]+=e;for(n=0;t=M[n];n++)if(e.indexOf(t)>-1)return d[t]+=e;return d[$]+=e}),t.forEach(s,function(e){u[e.name]||(M.forEach(function(t){for(var n=i(e,t,d[t]);n.length;){var a=document.createElement("style");a.setAttribute("type","text/css"),a.appendChild(document.createTextNode(n.shift())),o.insertBefore(a,r)}}),e.colors.primary.name==e.colors.accent.name&&console.warn("$mdThemingProvider: Using the same palette for primary and accent. This violates the material design spec."),u[e.name]=!0)})}}function d(e,t){if(!m[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(m).join(", ")))}function c(e){if(t.isArray(e)&&3==e.length)return e;if(/^rgb/.test(e))return e.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==e.charAt(0)&&(e=e.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(e)){var n=e.length/3,o=e.substr(0,n),r=e.substr(n,n),i=e.substr(2*n);return 1===n&&(o+=o,r+=r,i+=i),[parseInt(o,16),parseInt(r,16),parseInt(i,16)]}}function l(e,n){return e?(4==e.length&&(e=t.copy(e),n?e.pop():n=e.pop()),n&&("number"==typeof n||"string"==typeof n&&n.length)?"rgba("+e.join(",")+","+n+")":"rgb("+e.join(",")+")"):"rgb('0,0,0')"}t.module("material.core.theming",["material.core.theming.palette"]).directive("mdTheme",o).directive("mdThemable",r).provider("$mdTheming",e).run(a);var m,s,u={},f={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.26)",4:"rgba(0,0,0,0.12)"},p={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.3)",4:"rgba(255,255,255,0.12)"},h="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",b="",g=c("rgba(0,0,0,0.87)"),E=c("rgba(255,255,255,0.87"),v=c("rgb(255,255,255)"),M=["primary","accent","warn","background"],$="primary",A={accent:{"default":"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{"default":"A100","hue-1":"300","hue-2":"800","hue-3":"900"}},C={background:{"default":"800","hue-1":"300","hue-2":"600","hue-3":"900"}};M.forEach(function(e){var t={"default":"500","hue-1":"300","hue-2":"800","hue-3":"A100"};A[e]||(A[e]=t),C[e]||(C[e]=t)});var T=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"];e.$inject=["$mdColorPalette"],o.$inject=["$mdTheming","$interpolate","$log"],r.$inject=["$mdTheming"],a.$inject=["$injector"]}(),function(){t.module("material.components.autocomplete",["material.core","material.components.icon"])}(),function(){function e(e){return e}t.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",e),e.$inject=["$mdTheming"]}(),function(){function e(e,n,o,r){function i(e){return t.isDefined(e.href)||t.isDefined(e.ngHref)||t.isDefined(e.ngLink)||t.isDefined(e.uiSref)}function a(e,t){return i(t)?'':''}function d(a,d,c){var l=d[0];n(d),e.attach(a,d);var m=l.textContent.trim();m||o.expect(d,"aria-label"),i(c)&&t.isDefined(c.ngDisabled)&&a.$watch(c.ngDisabled,function(e){d.attr("tabindex",e?-1:0)}),d.on("click",function(e){c.disabled===!0&&(e.preventDefault(),e.stopImmediatePropagation())}),a.mouseActive=!1,d.on("mousedown",function(){a.mouseActive=!0,r(function(){a.mouseActive=!1},100)}).on("focus",function(){a.mouseActive===!1&&d.addClass("md-focused")}).on("blur",function(){d.removeClass("md-focused")})}return{restrict:"EA",replace:!0,transclude:!0,template:a,link:d}}t.module("material.components.button",["material.core"]).directive("mdButton",e),e.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"]}(),function(){function e(){return{restrict:"E"}}function n(e){function n(e,n,i,a,d,c,l,m,s){function u(o,r,s){r=i.extractElementByName(r,"md-bottom-sheet"),h=d('')(o),h.on("click",function(){a(l.cancel)}),c.inherit(h,s.parent),e.enter(h,s.parent,null);var u=new p(r,s.parent);return s.bottomSheet=u,s.targetEvent&&t.element(s.targetEvent.target).blur(),c.inherit(u.element,s.parent),s.disableParentScroll&&(s.lastOverflow=s.parent.css("overflow"),s.parent.css("overflow","hidden")),e.enter(u.element,s.parent).then(function(){var e=t.element(r[0].querySelector("button")||r[0].querySelector("a")||r[0].querySelector("[ng-click]"));e.focus(),s.escapeToClose&&(s.rootElementKeyupCallback=function(e){e.keyCode===n.KEY_CODE.ESCAPE&&a(l.cancel)},m.on("keyup",s.rootElementKeyupCallback))})}function f(n,o,r){var i=r.bottomSheet;return e.leave(h),e.leave(i.element).then(function(){r.disableParentScroll&&(r.parent.css("overflow",r.lastOverflow),delete r.lastOverflow),i.cleanup(),r.targetEvent&&t.element(r.targetEvent.target).focus()})}function p(e,t){function i(t){e.css(n.CSS.TRANSITION_DURATION,"0ms")}function d(t){var o=t.pointer.distanceY;5>o&&(o=Math.max(-r,o/2)),e.css(n.CSS.TRANSFORM,"translate3d(0,"+(r+o)+"px,0)")}function c(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>o)){var r=e.prop("offsetHeight")-t.pointer.distanceY,i=Math.min(r/t.pointer.velocityY*.75,500);e.css(n.CSS.TRANSITION_DURATION,i+"ms"),a(l.cancel)}else e.css(n.CSS.TRANSITION_DURATION,""),e.css(n.CSS.TRANSFORM,"")}var m=s.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",i).on("$md.drag",d).on("$md.dragend",c),{element:e,cleanup:function(){m(),t.off("$md.dragstart",i).off("$md.drag",d).off("$md.dragend",c)}}}var h;return{themable:!0,targetEvent:null,onShow:u,onRemove:f,escapeToClose:!0,disableParentScroll:!0}}var o=.5,r=80;return n.$inject=["$animate","$mdConstant","$mdUtil","$timeout","$compile","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","targetEvent"],options:n})}t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",n),n.$inject=["$$interimElementProvider"]}(),function(){function e(e){return{restrict:"E",link:function(t,n,o){e(n)}}}t.module("material.components.card",["material.core"]).directive("mdCard",e),e.$inject=["$mdTheming"]}(),function(){function e(e,n,o,r,i,a,d){function c(n,c){return c.type="checkbox",c.tabindex=c.tabindex||"0",n.attr("role",c.type),function(n,c,m,s){function u(e,t,o){m[e]&&n.$watch(m[e],function(e){o[e]&&c.attr(t,o[e])})}function f(e){var t=e.which||e.keyCode;(t===r.KEY_CODE.SPACE||t===r.KEY_CODE.ENTER)&&(e.preventDefault(),c.hasClass("md-focused")||c.addClass("md-focused"),p(e))}function p(e){c[0].hasAttribute("disabled")||n.$apply(function(){var t=m.ngChecked?m.checked:!s.$viewValue;s.$setViewValue(t,e&&e.type),s.$render()})}function h(){s.$viewValue?c.addClass(l):c.removeClass(l)}s=s||a.fakeNgModel(),i(c),m.ngChecked&&n.$watch(n.$eval.bind(n,m.ngChecked),s.$setViewValue.bind(s)),u("ngDisabled","tabindex",{"true":"-1","false":m.tabindex}),o.expectWithText(c,"aria-label"),e.link.pre(n,{on:t.noop,0:{}},m,[s]),n.mouseActive=!1,c.on("click",p).on("keypress",f).on("mousedown",function(){n.mouseActive=!0,d(function(){n.mouseActive=!1},100)}).on("focus",function(){n.mouseActive===!1&&c.addClass("md-focused")}).on("blur",function(){c.removeClass("md-focused")}),s.$render=h}}e=e[0];var l="md-checked";return{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'
',compile:c}}t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e),e.$inject=["inputDirective","$mdInkRipple","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"]}(),function(){function e(e){function t(e,t){this.$scope=e,this.$element=t}return{restrict:"E",controller:["$scope","$element",t],link:function(t,o,r){o[0];e(o),t.$broadcast("$mdContentLoaded",o),n(o[0])}}}function n(e){t.element(e).on("$md.pressdown",function(t){"t"===t.pointer.type&&(t.$materialScrollFixed||(t.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}t.module("material.components.content",["material.core"]).directive("mdContent",e),e.$inject=["$mdTheming"]}(),function(){t.module("material.components.chips",["material.core","material.components.autocomplete"])}(),function(){function e(e,t){return{restrict:"E",link:function(n,o,r){t(o),e(function(){var e=o[0].querySelector("md-dialog-content");e&&e.scrollHeight>e.clientHeight&&o.addClass("md-content-overflow")})}}}function n(e){function n(e,t){return{template:['','','

{{ dialog.title }}

',"

{{ dialog.content }}

","
",'
','',"{{ dialog.cancel }}","",'',"{{ dialog.ok }}","","
","
"].join(""),controller:function(){this.hide=function(){e.hide(!0)},this.abort=function(){e.cancel()}},controllerAs:"dialog",bindToController:!0,theme:t.defaultTheme()}}function o(e,n,o,r,i,a,d,c,l,m,s){function u(e){var t=document.querySelector("md-dialog");t&&!t.contains(e.target)&&(e.stopImmediatePropagation(),t.focus())}function f(e,m,s){function f(){var e=m[0].querySelector(".dialog-close");if(!e){var n=m[0].querySelectorAll(".md-actions button");e=n[n.length-1]}return t.element(e)}t.element(n[0].body).addClass("md-dialog-is-showing"),m=o.extractElementByName(m,"md-dialog"),s.parent=t.element(s.parent),s.popInTarget=t.element((s.targetEvent||{}).target);var p=f();if(s.hasBackdrop){var b=s.parent[0]==n[0].body&&n[0].documentElement&&n[0].documentElement.scrollTop?t.element(n[0].documentElement):s.parent,v=b.prop("scrollTop");s.backdrop=t.element(''),s.backdrop.css("top",v+"px"),i.inherit(s.backdrop,s.parent),l.enter(s.backdrop,s.parent),m.css("top",v+"px")}var M="dialog",$=p;return"alert"===s.$type&&(M="alertdialog",$=m.find("md-dialog-content")),h(m.find("md-dialog"),M,s),document.addEventListener("focus",u,!0),s.disableParentScroll&&(s.lastOverflow=s.parent.css("overflow"),s.parent.css("overflow","hidden")),E(m,s.parent,s.popInTarget&&s.popInTarget.length&&s.popInTarget).then(function(){g(m,!0),s.escapeToClose&&(s.rootElementKeyupCallback=function(e){e.keyCode===r.KEY_CODE.ESCAPE&&d(a.cancel)},c.on("keyup",s.rootElementKeyupCallback)),s.clickOutsideToClose&&(s.dialogClickOutsideCallback=function(e){e.target===m[0]&&d(a.cancel)},m.on("click",s.dialogClickOutsideCallback)),s.focusOnOpen&&$.focus()})}function p(e,o,r){return t.element(n[0].body).removeClass("md-dialog-is-showing"),r.backdrop&&l.leave(r.backdrop),r.disableParentScroll&&(r.parent.css("overflow",r.lastOverflow),delete r.lastOverflow),r.escapeToClose&&c.off("keyup",r.rootElementKeyupCallback),r.clickOutsideToClose&&o.off("click",r.dialogClickOutsideCallback),g(o,!1),document.removeEventListener("focus",u,!0),v(o,r.parent,r.popInTarget&&r.popInTarget.length&&r.popInTarget).then(function(){o.remove(),r.popInTarget&&r.popInTarget.focus()})}function h(t,n,r){t.attr({role:n,tabIndex:"-1"});var i=t.find("md-dialog-content");0===i.length&&(i=t);var a=t.attr("id")||"dialog_"+o.nextUid();i.attr("id",a),t.attr("aria-describedby",a),r.ariaLabel?e.expect(t,"aria-label",r.ariaLabel):e.expectAsync(t,"aria-label",function(){var e=i.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")})}function b(e,t){return-1!==t.indexOf(e.nodeName)?!0:void 0}function g(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var r=e.parentNode.children,i=0;i'+e+"
"}}}return n.$inject=["$mdDialog","$mdTheming"],o.$inject=["$mdAria","$document","$mdUtil","$mdConstant","$mdTheming","$mdDialog","$timeout","$rootElement","$animate","$$rAF","$q"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","parent"],options:o}).addPreset("alert",{methods:["title","content","ariaLabel","ok","theme"],options:n}).addPreset("confirm",{methods:["title","content","ariaLabel","ok","cancel","theme"],options:n})}t.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",n),e.$inject=["$$rAF","$mdTheming"],n.$inject=["$$interimElementProvider"]}(),function(){function e(e){return{restrict:"E",link:e}}t.module("material.components.divider",["material.core"]).directive("mdDivider",e),e.$inject=["$mdTheming"]}(),function(){!function(){function e(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],link:function(e,n,o,r){var i=r[0]||r[1];i&&t.forEach(n.children(),function(e){t.element(e).on("focus",i.open),t.element(e).on("blur",i.close)}),n.children().wrap('
')}}}t.module("material.components.fabActions",["material.core"]).directive("mdFabActions",e)}()}(),function(){!function(){function e(){function e(e,t){t.prepend('
')}function t(e,t,n){function o(){a.direction=a.direction||"down",a.isOpen=a.isOpen||!1}function r(){t.on("mouseenter",a.open),t.on("mouseleave",a.close)}function i(){e.$watch("vm.direction",function(e,o){n.removeClass(t,"md-"+o),n.addClass(t,"md-"+e)}),e.$watch("vm.isOpen",function(e){var o=e?"md-is-open":"",r=e?"":"md-is-open";n.setClass(t,o,r)})}var a=this;a.open=function(){e.$apply("vm.isOpen = true")},a.close=function(){e.$apply("vm.isOpen = false")},o(),r(),i()}return t.$inject=["$scope","$element","$animate"],{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:t,controllerAs:"vm",link:e}}function n(){function e(e){var n=e[0],o=e.controller("mdFabSpeedDial"),r=n.querySelectorAll(".md-fab-action-item"),i=n.querySelector(".md-css-variables"),a=i.style.zIndex;t.forEach(r,function(e,t){var n=e.style;n.transform="",n.transitionDelay="",n.opacity=1,e.style.zIndex=r.length-t+a}),o.isOpen||t.forEach(r,function(e,t){var n,r;switch(o.direction){case"up":n=e.scrollHeight*(t+1),r="Y";break;case"down":n=-e.scrollHeight*(t+1),r="Y";break;case"left":n=e.scrollWidth*(t+1),r="X";break;case"right":n=-e.scrollWidth*(t+1),r="X"}e.style.transform="translate"+r+"("+n+"px)"})}return{addClass:function(t,n,o){t.hasClass("md-fling")&&e(t)},removeClass:function(t,n,o){e(t)}}}function o(){function e(e){var o=e[0],r=e.controller("mdFabSpeedDial"),i=o.querySelectorAll(".md-fab-action-item");t.forEach(i,function(e,t){var o=e.style,a=t*n;o.opacity=r.isOpen?1:0,o.transform=r.isOpen?"scale(1)":"scale(0)",o.transitionDelay=(r.isOpen?a:i.length-a)+"ms"})}var n=65;return{addClass:function(t,n,o){e(t)},removeClass:function(t,n,o){e(t)}}}t.module("material.components.fabSpeedDial",["material.core","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabSpeedDial",e).animation(".md-fling",n).animation(".md-scale",o)}()}(),function(){!function(){function n(){function e(e,t,n){var o=this;o.isOpen=o.isOpen||!1,o.open=function(){o.isOpen=!0,e.$apply()},o.close=function(){o.isOpen=!1,e.$apply()},t.addClass("md-fab-toolbar"),t.on("mouseenter",o.open),t.on("mouseleave",o.close),e.$watch("vm.isOpen",function(e){var o=e?"md-is-open":"",r=e?"":"md-is-open";n.setClass(t,o,r)})}function t(e,t,n){t.find("md-fab-trigger").find("button").attr("tabindex","-1"),t.find("md-fab-trigger").find("button").prepend('
')}return e.$inject=["$scope","$element","$animate"],{restrict:"E",transclude:!0,template:'
',scope:{isOpen:"=?mdOpen"},bindToController:!0,controller:e,controllerAs:"vm",link:t}}function o(){function n(n,o,r){var i=n[0],a=n.controller("mdFabToolbar"),d=i.querySelector(".md-fab-toolbar-background"),c=i.querySelector("md-fab-trigger button"),l=i.querySelector("md-fab-trigger button md-icon"),m=n.find("md-fab-actions").children();if(c&&d){var s=e.getComputedStyle(c).getPropertyValue("background-color"),u=i.offsetWidth,f=(i.offsetHeight,2*u);d.style.backgroundColor=s,d.style.borderRadius=u+"px",a.isOpen?(d.style.width=f+"px",d.style.height=f+"px",d.style.top=-(f/2)+"px",n.hasClass("md-left")&&(d.style.left=-(f/2)+"px",d.style.right=null),n.hasClass("md-right")&&(d.style.right=-(f/2)+"px",d.style.left=null),d.style.transitionDelay="0ms",l.style.transitionDelay=".3s",t.forEach(m,function(e,t){e.style.transitionDelay=25*(m.length-t)+"ms"})):(d.style.width=c.offsetWidth+"px",d.style.height=c.offsetHeight+"px",d.style.top="0px",n.hasClass("md-left")&&(d.style.left="0px",d.style.right=null),n.hasClass("md-right")&&(d.style.right="0px",d.style.left=null),d.style.transitionDelay="200ms",l.style.transitionDelay="0ms",t.forEach(m,function(e,t){e.style.transitionDelay=25*t+"ms"}))}}return{addClass:function(e,t,o){n(e,t,o)},removeClass:function(e,t,o){n(e,t,o)}}}t.module("material.components.fabToolbar",["material.core","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabToolbar",n).animation(".md-fab-toolbar",o)}()}(),function(){!function(){function e(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],link:function(e,n,o,r){var i=r[0]||r[1];i&&t.forEach(n.children(),function(e){t.element(e).on("focus",i.open),t.element(e).on("blur",i.close)})}}}t.module("material.components.fabTrigger",["material.core"]).directive("mdFabTrigger",e)}()}(),function(){function e(e,o,r,i){function a(n,a,d,c){function l(){for(var e in o.MEDIA)i(e),i.getQuery(o.MEDIA[e]).addListener(C);return i.watchResponsiveAttributes(["md-cols","md-row-height"],d,s)}function m(){c.layoutDelegate=t.noop,T();for(var e in o.MEDIA)i.getQuery(o.MEDIA[e]).removeListener(C)}function s(e){null==e?c.invalidateLayout():i(e)&&c.invalidateLayout()}function u(e){var o=b(),i={tileSpans:g(o),colCount:E(),rowMode:$(),rowHeight:M(),gutter:v()};if(e||!t.equals(i,y)){var d=r(i.colCount,i.tileSpans,o).map(function(e,n){return{grid:{element:a,style:h(i.colCount,n,i.gutter,i.rowMode,i.rowHeight)},tiles:e.map(function(e,n){return{element:t.element(o[n]),style:p(e.position,e.spans,i.colCount,i.rowCount,i.gutter,i.rowMode,i.rowHeight)}})}}).reflow().performance();n.mdOnLayout({$event:{performance:d}}),y=i}}function f(e){return k+e+w}function p(e,t,n,o,r,i,a){var d=1/n*100,c=(n-1)/n,l=x({share:d,gutterShare:c,gutter:r}),m={left:N({unit:l,offset:e.col,gutter:r}),width:_({unit:l,span:t.col,gutter:r}),paddingTop:"",marginTop:"",top:"",height:""};switch(i){case"fixed":m.top=N({unit:a,offset:e.row,gutter:r}),m.height=_({unit:a,span:t.row,gutter:r});break;case"ratio":var s=d/a,u=x({share:s,gutterShare:c,gutter:r});m.paddingTop=_({unit:u,span:t.row,gutter:r}),m.marginTop=N({unit:u,offset:e.row,gutter:r});break;case"fit":var f=(o-1)/o,s=1/o*100,u=x({share:s,gutterShare:f,gutter:r});m.top=N({unit:u,offset:e.row,gutter:r}),m.height=_({unit:u,span:t.row,gutter:r})}return m}function h(e,t,n,o,r){var i={height:"",paddingBottom:""};switch(o){case"fixed":i.height=_({unit:r,span:t,gutter:n});break;case"ratio":var a=1===e?0:(e-1)/e,d=1/e*100,c=d*(1/r),l=x({share:c,gutterShare:a,gutter:n});i.paddingBottom=_({unit:l,span:t,gutter:n});break;case"fit":}return i}function b(){return[].filter.call(a.children(),function(e){return"MD-GRID-TILE"==e.tagName})}function g(e){return[].map.call(e,function(e){var n=t.element(e).controller("mdGridTile");return{row:parseInt(i.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(i.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}function E(){var e=parseInt(i.getResponsiveAttribute(d,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}function v(){return A(i.getResponsiveAttribute(d,"md-gutter")||1)}function M(){var e=i.getResponsiveAttribute(d,"md-row-height");switch($()){case"fixed":return A(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}function $(){var e=i.getResponsiveAttribute(d,"md-row-height");return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}function A(e){return/\D$/.test(e)?e:e+"px"}a.attr("role","list"),c.layoutDelegate=u;var C=t.bind(c,c.invalidateLayout),T=l();n.$on("$destroy",m);var y,k=e.startSymbol(),w=e.endSymbol(),x=e(f("share")+"% - ("+f("gutter")+" * "+f("gutterShare")+")"),N=e("calc(("+f("unit")+" + "+f("gutter")+") * "+f("offset")+")"),_=e("calc(("+f("unit")+") * "+f("span")+" + ("+f("span")+" - 1) * "+f("gutter")+")")}return{restrict:"E",controller:n,scope:{mdOnLayout:"&"},link:a}}function n(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e,this.layoutDelegate=t.noop}function o(e){function n(t,n){var o,a,d,c,l,m;return c=e.time(function(){a=r(t,n)}),o={layoutInfo:function(){return a},map:function(t){return l=e.time(function(){var e=o.layoutInfo();d=t(e.positioning,e.rowCount)}),o},reflow:function(t){return m=e.time(function(){var e=t||i;e(d.grid,d.tiles)}),o},performance:function(){return{tileCount:n.length,layoutTime:c,mapTime:l,reflowTime:m,totalTime:c+l+m}}}}function o(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}function r(e,t){function n(t,n){if(t.col>e)throw"md-grid-list: Tile at position "+n+" has a colspan ("+t.col+") that exceeds the column count ("+e+")";for(var a=0,m=0;m-a=e?o():(a=l.indexOf(0,d),-1!==a&&-1!==(m=i(a+1))?d=m+1:(a=m=0,o()));return r(a,t.col,t.row),d=a+t.col,{col:a,row:c}}function o(){d=0,c++,r(0,e,-1)}function r(e,t,n){for(var o=e;e+t>o;o++)l[o]=Math.max(l[o]+n,0)}function i(e){var t;for(t=e;tn;n++)t.push(0);return t}var d=0,c=0,l=a();return{positioning:t.map(function(e,t){return{spans:e,position:n(e,t)}}),rowCount:c+Math.max.apply(Math,l)}}var i=o;return n.animateWith=function(e){i=t.isFunction(e)?e:o},n}function r(e){function n(n,o,r,i){o.attr("role","listitem");var a=e.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,t.bind(i,i.invalidateLayout));i.invalidateTiles(),n.$on("$destroy",function(){a(),i.invalidateLayout()}),t.isDefined(n.$parent.$index)&&n.$watch(function(){return n.$parent.$index},function(e,t){e!==t&&i.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"
",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:n}}function i(){return{template:"
",transclude:!0}}t.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",r).directive("mdGridTileFooter",i).directive("mdGridTileHeader",i).factory("$mdGridLayout",o),e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],n.$inject=["$timeout"],n.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(t.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},o.$inject=["$mdUtil"],r.$inject=["$mdMedia"]}(),function(){function e(e,t,n,o){function r(o,r,i){function a(){var e=r.parent();return e.attr("aria-label")||e.text()?!0:e.parent().attr("aria-label")||e.parent().text()?!0:!1}function d(){o.svgIcon||o.svgSrc||(o.fontIcon?(r.addClass("md-font"),r.addClass(o.fontIcon)):r.addClass(e.fontSet(o.fontSet)))}t(r),d();var c=i.alt||o.fontIcon||o.svgIcon||r.text(),l=i.$normalize(i.$attr.mdSvgIcon||i.$attr.mdSvgSrc||"");i["aria-label"]||(""==c||a()?r.text()||n.expect(r,"aria-hidden","true"):(n.expect(r,"aria-label",c),n.expect(r,"role","img"))),l&&i.$observe(l,function(t){r.empty(),t&&e(t).then(function(e){r.append(e)})})}return{scope:{fontSet:"@mdFontSet",fontIcon:"@mdFontIcon",svgIcon:"@mdSvgIcon",svgSrc:"@mdSvgSrc"},restrict:"E",link:r}}t.module("material.components.icon",["material.core"]).directive("mdIcon",e),e.$inject=["$mdIcon","$mdTheming","$mdAria","$interpolate"]}(),function(){function e(){}function n(e,t){this.url=e,this.viewBoxSize=t||r.defaultViewBoxSize}function o(e,n,o,r,i){function a(e){return e=e||"",E[e]?o.when(E[e].clone()):v.test(e)?s(e).then(c(e)):(-1==e.indexOf(":")&&(e="$default:"+e),l(e)["catch"](m)["catch"](u)["catch"](f).then(c(e)))}function d(n){var o=t.isUndefined(n)||!(n&&n.length);if(o)return e.defaultFontSet;var r=n;return t.forEach(e.fontSets,function(e){e.alias==n&&(r=e.fontSet||r)}),r}function c(t){return function(n){return E[t]=p(n)?n:new h(n,e[t]),E[t].clone()}}function l(t){var n=e[t];return n?s(n.url).then(function(e){return new h(e,n)}):o.reject(t)}function m(t){function n(e){var n=t.slice(t.lastIndexOf(":")+1),r=e.querySelector("#"+n);return r?new h(r,i):o.reject(t)}var r=t.substring(0,t.lastIndexOf(":"))||"$default",i=e[r];return i?s(i.url).then(n):o.reject(t)}function s(e){return n.get(e,{cache:i}).then(function(e){return t.element("
").append(e.data).find("svg")[0]})}function u(e){ + var n;return t.isString(e)&&(n="icon "+e+" not found",r.warn(n)),o.reject(n||e)}function f(e){var n=t.isString(e)?e:e.message||e.data||e.statusText;return r.warn(n),o.reject(n)}function p(e){return t.isDefined(e.element)&&t.isDefined(e.config)}function h(e,n){"svg"!=e.tagName&&(e=t.element('').append(e)[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=n,this.prepare()}function b(){var n=this.config?this.config.viewBoxSize:e.defaultViewBoxSize;t.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+n+" "+n},function(e,t){this.element.setAttribute(t,e)},this),t.forEach({"pointer-events":"none",display:"block"},function(e,t){this.element.style[t]=e},this)}function g(){return this.element.cloneNode(!0)}var E={},v=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/i;return h.prototype={clone:g,prepare:b},a.fontSet=d,a}t.module("material.components.icon").provider("$mdIcon",e);var r={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};e.prototype={icon:function(e,t,o){return-1==e.indexOf(":")&&(e="$default:"+e),r[e]=new n(t,o),this},iconSet:function(e,t,o){return r[e]=new n(t,o),this},defaultIconSet:function(e,t){var o="$default";return r[o]||(r[o]=new n(e,t)),r[o].viewBoxSize=t||r.defaultViewBoxSize,this},defaultViewBoxSize:function(e){return r.defaultViewBoxSize=e,this},fontSet:function(e,t){r.fontSets.push({alias:e,fontSet:t||e})},defaultFontSet:function(e){return r.defaultFontSet=e?e:"",this},defaultIconSize:function(e){return r.defaultIconSize=e,this},preloadIcons:function(e){var t=this,n=[{id:"md-tabs-arrow",url:"md-tabs-arrow.svg",svg:''},{id:"md-close",url:"md-close.svg",svg:''},{id:"md-cancel",url:"md-cancel.svg",svg:''},{id:"md-menu",url:"md-menu.svg",svg:''},{id:"md-toggle-arrow",url:"md-toggle-arrow-svg",svg:''}];n.forEach(function(n){t.icon(n.id,n.url),e.put(n.url,n.svg)})},$get:["$http","$q","$log","$templateCache",function(e,t,n,i){return this.preloadIcons(i),o(r,e,t,n,i)}]}}(),function(){function e(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function n(e,n,o){var r=["md-checkbox","md-switch"];return{restrict:"E",controller:"MdListController",compile:function(i,a){function d(){for(var e,t,n=["md-switch","md-checkbox"],o=0;t=n[o];++o)if((e=i.find(t)[0])&&!e.hasAttribute("aria-label")){var r=i.find("p")[0];if(!r)return;e.setAttribute("aria-label","Toggle "+r.textContent)}}function c(n){var o;if("div"==n)o=t.element('
'),o.append(i.contents()),i.addClass("md-proxy-focus");else{o=t.element('
');var r=["ng-click","aria-label","ng-disabled"];t.forEach(r,function(e){i[0].hasAttribute(e)&&(o[0].setAttribute(e,i[0].getAttribute(e)),i[0].removeAttribute(e))}),o.children().eq(0).append(i.contents())}if(i[0].setAttribute("tabindex","-1"),i.append(o),f&&f.hasAttribute("ng-click")){e.expect(f,"aria-label");var d=t.element('');d.attr("ng-click",f.getAttribute("ng-click")),f.removeAttribute("ng-click"),f.setAttribute("tabindex","-1"),f.classList.remove("md-secondary"),d.append(f),f=d[0]}f&&(f.hasAttribute("ng-click")||a.ngClick&&l(f))&&(i.addClass("md-with-secondary"),i.append(f))}function l(e){return-1!=r.indexOf(e.nodeName.toLowerCase())}function m(e,i,a,d){function c(){var e=i.children();e.length&&!e[0].hasAttribute("ng-click")&&t.forEach(r,function(e){t.forEach(s.querySelectorAll(e),function(e){m.push(e)})})}function l(){(m.length||u)&&(i.addClass("md-clickable"),d.attachRipple(e,t.element(i[0].querySelector(".md-no-style"))))}var m=[],s=i[0].firstElementChild,u=s&&s.hasAttribute("ng-click");c(),l(),i.hasClass("md-proxy-focus")&&m.length&&t.forEach(m,function(n){n=t.element(n),e.mouseActive=!1,n.on("mousedown",function(){e.mouseActive=!0,o(function(){e.mouseActive=!1},100)}).on("focus",function(){e.mouseActive===!1&&i.addClass("md-focused"),n.on("blur",function t(){i.removeClass("md-focused"),n.off("blur",t)})})}),u||m.length||s&&s.addEventListener("keypress",function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName){var t=e.which||e.keyCode;t==n.KEY_CODE.SPACE&&s&&(s.click(),e.preventDefault(),e.stopPropagation())}}),i.off("click"),i.off("keypress"),m.length&&s&&i.children().eq(0).on("click",function(e){s.contains(e.target)&&t.forEach(m,function(n){e.target===n||n.contains(e.target)||t.element(n).triggerHandler("click")})})}var s,u,f=i[0].querySelector(".md-secondary");if(i[0].setAttribute("role","listitem"),a.ngClick)c("button");else{for(var p,h=0;p=r[h];++h)if(u=i[0].querySelector(p)){s=!0;break}s?c("div"):i[0].querySelector("md-button")||i.addClass("md-no-proxy")}return d(),m}}}function o(e,t,n){function o(e,t){var o={};n.attach(e,t,o)}var r=this;r.attachRipple=o}t.module("material.components.list",["material.core"]).controller("MdListController",o).directive("mdList",e).directive("mdListItem",n),e.$inject=["$mdTheming"],n.$inject=["$mdAria","$mdConstant","$timeout"],o.$inject=["$scope","$element","$mdListInkRipple"]}(),function(){function e(e,t){function n(t,n,o){e(n)}function o(e,n,o){var r=this;r.isErrorGetter=o.mdIsError&&t(o.mdIsError),r.delegateClick=function(){r.input.focus()},r.element=n,r.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},r.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},r.setInvalid=function(e){n.toggleClass("md-input-invalid",!!e)},e.$watch(function(){return r.label&&r.input},function(e){e&&!r.label.attr("for")&&r.label.attr("for",r.input.attr("id"))})}return o.$inject=["$scope","$element","$attrs"],{restrict:"E",link:n,controller:o}}function n(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,o){o&&!n.mdNoFloat&&(o.label=t,e.$on("$destroy",function(){o.label=null}))}}}function o(e,n,o){function r(r,i,a,d){function c(e){return s.setHasValue(!u.$isEmpty(e)),e}function l(){s.setHasValue(i.val().length>0||(i[0].validity||{}).badInput)}function m(){function o(e){return m(),e}function a(){l.style.height="auto",l.scrollTop=0;var e=d();e&&(l.style.height=e+"px")}function d(){var e=l.scrollHeight-l.offsetHeight;return l.offsetHeight+(e>0?e:0)}function c(e){l.scrollTop=0;var t=l.scrollHeight-l.offsetHeight,n=l.offsetHeight+t;l.style.height=n+"px"}var l=i[0],m=e.debounce(a,1);u?(u.$formatters.push(o),u.$viewChangeListeners.push(o)):m(),i.on("keydown input",m),i.on("scroll",c),t.element(n).on("resize",m),r.$on("$destroy",function(){t.element(n).off("resize",m)})}var s=d[0],u=d[1]||e.fakeNgModel(),f=t.isDefined(a.readonly);if(s){if(s.input)throw new Error(" can only have *one* or ",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(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,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(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=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("